jr-common-micro 1.1.131 → 1.1.133

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.
Files changed (27) hide show
  1. package/dist/proto/micro/v1/mining/mining_messages_nest.d.ts +1 -0
  2. package/dist/proto/micro/v1/mining/mining_messages_pb.d.ts +1 -0
  3. package/dist/proto/micro/v1/mining/mining_messages_pb.js +2 -0
  4. package/dist/proto/micro/v1/news/app_version_message_nest.d.ts +5 -0
  5. package/dist/proto/micro/v1/news/app_version_message_pb.d.ts +13 -0
  6. package/dist/proto/micro/v1/news/app_version_message_pb.js +30 -1
  7. package/dist/proto/micro/v1/news/services_connect.d.ts +8 -2
  8. package/dist/proto/micro/v1/news/services_connect.js +7 -1
  9. package/dist/proto/micro/v1/news/services_nest.d.ts +5 -3
  10. package/dist/proto/micro/v1/news/services_nest.js +1 -1
  11. package/dist/proto/micro/v1/notification/notification_messages_nest.d.ts +10 -0
  12. package/dist/proto/micro/v1/notification/notification_messages_pb.d.ts +26 -0
  13. package/dist/proto/micro/v1/notification/notification_messages_pb.js +59 -1
  14. package/dist/proto/micro/v1/notification/services_connect.d.ts +7 -1
  15. package/dist/proto/micro/v1/notification/services_connect.js +6 -0
  16. package/dist/proto/micro/v1/notification/services_nest.d.ts +3 -1
  17. package/dist/proto/micro/v1/notification/services_nest.js +1 -0
  18. package/dist/proto/micro/v1/user/profile_messages_nest.d.ts +2 -0
  19. package/dist/proto/micro/v1/user/profile_messages_pb.d.ts +2 -0
  20. package/dist/proto/micro/v1/user/profile_messages_pb.js +4 -0
  21. package/package.json +1 -1
  22. package/proto/micro/v1/mining/mining_messages.proto +2 -0
  23. package/proto/micro/v1/news/app_version_message.proto +11 -0
  24. package/proto/micro/v1/news/services.proto +2 -1
  25. package/proto/micro/v1/notification/notification_messages.proto +17 -0
  26. package/proto/micro/v1/notification/services.proto +1 -0
  27. package/proto/micro/v1/user/profile_messages.proto +4 -0
@@ -559,6 +559,7 @@ export interface AdminGiftRecipient {
559
559
  amount: string;
560
560
  state: string;
561
561
  given_week: string;
562
+ given_day: string;
562
563
  }
563
564
  export interface AdminGiftPreviewResponse {
564
565
  status: ResponseStatus | undefined;
@@ -1092,6 +1092,7 @@ export declare class AdminGiftRecipient extends Message<AdminGiftRecipient> {
1092
1092
  amount: string;
1093
1093
  state: string;
1094
1094
  givenWeek: string;
1095
+ givenDay: string;
1095
1096
  constructor(data?: PartialMessage<AdminGiftRecipient>);
1096
1097
  static readonly runtime: typeof proto3;
1097
1098
  static readonly typeName = "micro.v1.mining.AdminGiftRecipient";
@@ -2371,6 +2371,7 @@ class AdminGiftRecipient extends protobuf_1.Message {
2371
2371
  amount = "";
2372
2372
  state = "";
2373
2373
  givenWeek = "";
2374
+ givenDay = "";
2374
2375
  constructor(data) {
2375
2376
  super();
2376
2377
  protobuf_1.proto3.util.initPartial(data, this);
@@ -2384,6 +2385,7 @@ class AdminGiftRecipient extends protobuf_1.Message {
2384
2385
  { no: 4, name: "amount", kind: "scalar", T: 9 },
2385
2386
  { no: 5, name: "state", kind: "scalar", T: 9 },
2386
2387
  { no: 6, name: "given_week", kind: "scalar", T: 9 },
2388
+ { no: 7, name: "given_day", kind: "scalar", T: 9 },
2387
2389
  ]);
2388
2390
  static fromBinary(bytes, options) {
2389
2391
  return new AdminGiftRecipient().fromBinary(bytes, options);
@@ -9,6 +9,7 @@ export interface AppVersionDto {
9
9
  [key: string]: string;
10
10
  };
11
11
  mandatory: boolean;
12
+ push_sent_at: string;
12
13
  }
13
14
  export interface AppVersionDto_DescriptionEntry {
14
15
  key: string;
@@ -37,4 +38,8 @@ export interface AppVersionListResponse {
37
38
  data: AppVersionDto[];
38
39
  status: ResponseStatus | undefined;
39
40
  }
41
+ export interface AppVersionPushClaimRequest {
42
+ id: string;
43
+ release: boolean;
44
+ }
40
45
  export declare const MICRO_V1_NEWS_PACKAGE_NAME = "micro.v1.news";
@@ -10,6 +10,7 @@ export declare class AppVersionDto extends Message<AppVersionDto> {
10
10
  [key: string]: string;
11
11
  };
12
12
  mandatory: boolean;
13
+ pushSentAt: string;
13
14
  constructor(data?: PartialMessage<AppVersionDto>);
14
15
  static readonly runtime: typeof proto3;
15
16
  static readonly typeName = "micro.v1.news.AppVersionDto";
@@ -70,3 +71,15 @@ export declare class AppVersionListResponse extends Message<AppVersionListRespon
70
71
  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AppVersionListResponse;
71
72
  static equals(a: AppVersionListResponse | PlainMessage<AppVersionListResponse> | undefined, b: AppVersionListResponse | PlainMessage<AppVersionListResponse> | undefined): boolean;
72
73
  }
74
+ export declare class AppVersionPushClaimRequest extends Message<AppVersionPushClaimRequest> {
75
+ id: string;
76
+ release: boolean;
77
+ constructor(data?: PartialMessage<AppVersionPushClaimRequest>);
78
+ static readonly runtime: typeof proto3;
79
+ static readonly typeName = "micro.v1.news.AppVersionPushClaimRequest";
80
+ static readonly fields: FieldList;
81
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AppVersionPushClaimRequest;
82
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AppVersionPushClaimRequest;
83
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AppVersionPushClaimRequest;
84
+ static equals(a: AppVersionPushClaimRequest | PlainMessage<AppVersionPushClaimRequest> | undefined, b: AppVersionPushClaimRequest | PlainMessage<AppVersionPushClaimRequest> | undefined): boolean;
85
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AppVersionListResponse = exports.RemoveAppVersionRequest = exports.AddAppVersionRequest = exports.AppVersionResponse = exports.AppVersionDto = void 0;
3
+ exports.AppVersionPushClaimRequest = exports.AppVersionListResponse = exports.RemoveAppVersionRequest = exports.AddAppVersionRequest = exports.AppVersionResponse = exports.AppVersionDto = void 0;
4
4
  const protobuf_1 = require("@bufbuild/protobuf");
5
5
  const general_pb_js_1 = require("../general_pb.js");
6
6
  class AppVersionDto extends protobuf_1.Message {
@@ -10,6 +10,7 @@ class AppVersionDto extends protobuf_1.Message {
10
10
  iosVersion = 0;
11
11
  description = {};
12
12
  mandatory = false;
13
+ pushSentAt = "";
13
14
  constructor(data) {
14
15
  super();
15
16
  protobuf_1.proto3.util.initPartial(data, this);
@@ -23,6 +24,7 @@ class AppVersionDto extends protobuf_1.Message {
23
24
  { no: 4, name: "ios_version", kind: "scalar", T: 5 },
24
25
  { no: 5, name: "description", kind: "map", K: 9, V: { kind: "scalar", T: 9 } },
25
26
  { no: 6, name: "mandatory", kind: "scalar", T: 8 },
27
+ { no: 7, name: "push_sent_at", kind: "scalar", T: 9 },
26
28
  ]);
27
29
  static fromBinary(bytes, options) {
28
30
  return new AppVersionDto().fromBinary(bytes, options);
@@ -148,3 +150,30 @@ class AppVersionListResponse extends protobuf_1.Message {
148
150
  }
149
151
  }
150
152
  exports.AppVersionListResponse = AppVersionListResponse;
153
+ class AppVersionPushClaimRequest extends protobuf_1.Message {
154
+ id = "";
155
+ release = false;
156
+ constructor(data) {
157
+ super();
158
+ protobuf_1.proto3.util.initPartial(data, this);
159
+ }
160
+ static runtime = protobuf_1.proto3;
161
+ static typeName = "micro.v1.news.AppVersionPushClaimRequest";
162
+ static fields = protobuf_1.proto3.util.newFieldList(() => [
163
+ { no: 1, name: "id", kind: "scalar", T: 9 },
164
+ { no: 2, name: "release", kind: "scalar", T: 8 },
165
+ ]);
166
+ static fromBinary(bytes, options) {
167
+ return new AppVersionPushClaimRequest().fromBinary(bytes, options);
168
+ }
169
+ static fromJson(jsonValue, options) {
170
+ return new AppVersionPushClaimRequest().fromJson(jsonValue, options);
171
+ }
172
+ static fromJsonString(jsonString, options) {
173
+ return new AppVersionPushClaimRequest().fromJsonString(jsonString, options);
174
+ }
175
+ static equals(a, b) {
176
+ return protobuf_1.proto3.util.equals(AppVersionPushClaimRequest, a, b);
177
+ }
178
+ }
179
+ exports.AppVersionPushClaimRequest = AppVersionPushClaimRequest;
@@ -5,7 +5,7 @@ import { NewsAdminPaginateRequest, NewsPaginateDateAdminResponse, NewsPagination
5
5
  import { BlogPaginateDateAdminResponse, BlogPaginationAdminResponse, BlogPaginationResponse, BlogPublishRequest, BlogReadCategories, BlogReadSlots, BlogSingleAdminResponse, BlogSingleResponse, BlogUpdateRequest } from "./blog_messages_pb.js";
6
6
  import { CalendarPaginateDateResponse, CalendarPaginationResponse, CalendarSingleResponse, CalendarStoreRequest } from "./calendar_messages_pb.js";
7
7
  import { EconomicCalendarResponse, StoreEconomicCalendarRequest } from "./economic_calendar_messages_pb.js";
8
- import { AddAppVersionRequest, AppVersionListResponse, AppVersionResponse } from "./app_version_message_pb.js";
8
+ import { AddAppVersionRequest, AppVersionListResponse, AppVersionPushClaimRequest, AppVersionResponse } from "./app_version_message_pb.js";
9
9
  import { CheckSeoRequest, CheckSeoResponse, CheckSlugRequest, CheckSlugResponse, GenerateAiContentOnlyRequest, GenerateAiContentOnlyResponse, GenerateAiContentRequest, GenerateAiContentResponse, GenerateAiMetaOnlyRequest, GenerateAiMetaOnlyResponse, JrBlogCategoryCreateRequest, JrBlogCategoryResponse, JrBlogCreateRequest, JrBlogEditRequest, JrBlogListRequest, JrBlogListResponse, JrBlogPublishRequest, JrBlogReadCategories, JrBlogReadSlots, JrBlogSingleResponse, JrBlogSlotCreateRequest, JrBlogSlotResponse, SeoRequirementsResponse } from "./jr_blog_messages_pb.js";
10
10
  export declare const PSundownService: {
11
11
  readonly typeName: "micro.v1.news.PSundownService";
@@ -359,7 +359,7 @@ export declare const PAppVersionAdminService: {
359
359
  readonly storeAppVersion: {
360
360
  readonly name: "StoreAppVersion";
361
361
  readonly I: typeof AddAppVersionRequest;
362
- readonly O: typeof EmptyResponse;
362
+ readonly O: typeof AppVersionResponse;
363
363
  readonly kind: MethodKind.ServerStreaming;
364
364
  };
365
365
  readonly removeAppVersion: {
@@ -374,6 +374,12 @@ export declare const PAppVersionAdminService: {
374
374
  readonly O: typeof AppVersionListResponse;
375
375
  readonly kind: MethodKind.ServerStreaming;
376
376
  };
377
+ readonly claimAppVersionPush: {
378
+ readonly name: "ClaimAppVersionPush";
379
+ readonly I: typeof AppVersionPushClaimRequest;
380
+ readonly O: typeof AppVersionResponse;
381
+ readonly kind: MethodKind.ServerStreaming;
382
+ };
377
383
  };
378
384
  };
379
385
  export declare const PJrBlogAdminService: {
@@ -362,7 +362,7 @@ exports.PAppVersionAdminService = {
362
362
  storeAppVersion: {
363
363
  name: "StoreAppVersion",
364
364
  I: app_version_message_pb_js_1.AddAppVersionRequest,
365
- O: general_pb_js_1.EmptyResponse,
365
+ O: app_version_message_pb_js_1.AppVersionResponse,
366
366
  kind: protobuf_1.MethodKind.ServerStreaming,
367
367
  },
368
368
  removeAppVersion: {
@@ -377,6 +377,12 @@ exports.PAppVersionAdminService = {
377
377
  O: app_version_message_pb_js_1.AppVersionListResponse,
378
378
  kind: protobuf_1.MethodKind.ServerStreaming,
379
379
  },
380
+ claimAppVersionPush: {
381
+ name: "ClaimAppVersionPush",
382
+ I: app_version_message_pb_js_1.AppVersionPushClaimRequest,
383
+ O: app_version_message_pb_js_1.AppVersionResponse,
384
+ kind: protobuf_1.MethodKind.ServerStreaming,
385
+ },
380
386
  }
381
387
  };
382
388
  exports.PJrBlogAdminService = {
@@ -1,7 +1,7 @@
1
1
  import type { Metadata } from "@grpc/grpc-js";
2
2
  import { Observable } from "rxjs";
3
3
  import { ByIdRequest, EmptyRequest, EmptyResponse, PaginateFromRequest, PaginateRequest } from "../general_nest";
4
- import { AddAppVersionRequest, AppVersionListResponse, AppVersionResponse } from "./app_version_message_nest";
4
+ import { AddAppVersionRequest, AppVersionListResponse, AppVersionPushClaimRequest, AppVersionResponse } from "./app_version_message_nest";
5
5
  import { BlogPaginateDateAdminResponse, BlogPaginationAdminResponse, BlogPaginationResponse, BlogPublishRequest, BlogReadCategories, BlogReadSlots, BlogSingleAdminResponse, BlogSingleResponse, BlogUpdateRequest } from "./blog_messages_nest";
6
6
  import { CalendarPaginateDateResponse, CalendarPaginationResponse, CalendarSingleResponse, CalendarStoreRequest } from "./calendar_messages_nest";
7
7
  import { EconomicCalendarResponse, StoreEconomicCalendarRequest } from "./economic_calendar_messages_nest";
@@ -161,14 +161,16 @@ export interface PAppVersionServiceController {
161
161
  export declare function PAppVersionServiceControllerMethods(): (constructor: Function) => void;
162
162
  export declare const P_APP_VERSION_SERVICE_NAME = "PAppVersionService";
163
163
  export interface PAppVersionAdminServiceClient {
164
- storeAppVersion(request: AddAppVersionRequest, metadata?: Metadata): Observable<EmptyResponse>;
164
+ storeAppVersion(request: AddAppVersionRequest, metadata?: Metadata): Observable<AppVersionResponse>;
165
165
  removeAppVersion(request: ByIdRequest, metadata?: Metadata): Observable<EmptyResponse>;
166
166
  getAllAppVersions(request: EmptyRequest, metadata?: Metadata): Observable<AppVersionListResponse>;
167
+ claimAppVersionPush(request: AppVersionPushClaimRequest, metadata?: Metadata): Observable<AppVersionResponse>;
167
168
  }
168
169
  export interface PAppVersionAdminServiceController {
169
- storeAppVersion(request: AddAppVersionRequest, metadata?: Metadata): Observable<EmptyResponse>;
170
+ storeAppVersion(request: AddAppVersionRequest, metadata?: Metadata): Observable<AppVersionResponse>;
170
171
  removeAppVersion(request: ByIdRequest, metadata?: Metadata): Observable<EmptyResponse>;
171
172
  getAllAppVersions(request: EmptyRequest, metadata?: Metadata): Observable<AppVersionListResponse>;
173
+ claimAppVersionPush(request: AppVersionPushClaimRequest, metadata?: Metadata): Observable<AppVersionResponse>;
172
174
  }
173
175
  export declare function PAppVersionAdminServiceControllerMethods(): (constructor: Function) => void;
174
176
  export declare const P_APP_VERSION_ADMIN_SERVICE_NAME = "PAppVersionAdminService";
@@ -181,7 +181,7 @@ function PAppVersionServiceControllerMethods() {
181
181
  exports.P_APP_VERSION_SERVICE_NAME = "PAppVersionService";
182
182
  function PAppVersionAdminServiceControllerMethods() {
183
183
  return function (constructor) {
184
- const grpcMethods = ["storeAppVersion", "removeAppVersion", "getAllAppVersions"];
184
+ const grpcMethods = ["storeAppVersion", "removeAppVersion", "getAllAppVersions", "claimAppVersionPush"];
185
185
  for (const method of grpcMethods) {
186
186
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
187
187
  (0, microservices_1.GrpcMethod)("PAppVersionAdminService", method)(constructor.prototype[method], method, descriptor);
@@ -77,6 +77,8 @@ export interface SaveDeviceTokenRequest {
77
77
  platform: string;
78
78
  deviceToken: string;
79
79
  language?: string | undefined;
80
+ app_version?: string | undefined;
81
+ app_build?: number | undefined;
80
82
  }
81
83
  export interface RemoveDeviceTokenRequest {
82
84
  deviceToken: string;
@@ -232,4 +234,12 @@ export interface GetMobileNotificationsPaginationResponse {
232
234
  pagination: PaginationMetaResult | undefined;
233
235
  data: GetMobileNotificationsResponseDto[];
234
236
  }
237
+ export interface SendAppUpdatePushRequest {
238
+ ios_build: number;
239
+ android_build: number;
240
+ }
241
+ export interface SendAppUpdatePushResponse {
242
+ status: ResponseStatus | undefined;
243
+ devices: number;
244
+ }
235
245
  export declare const MICRO_V1_NOTIFICATION_PACKAGE_NAME = "micro.v1.notification";
@@ -142,6 +142,8 @@ export declare class SaveDeviceTokenRequest extends Message<SaveDeviceTokenReque
142
142
  platform: string;
143
143
  deviceToken: string;
144
144
  language?: string;
145
+ appVersion?: string;
146
+ appBuild?: number;
145
147
  constructor(data?: PartialMessage<SaveDeviceTokenRequest>);
146
148
  static readonly runtime: typeof proto3;
147
149
  static readonly typeName = "micro.v1.notification.SaveDeviceTokenRequest";
@@ -421,3 +423,27 @@ export declare class GetMobileNotificationsPaginationResponse extends Message<Ge
421
423
  static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetMobileNotificationsPaginationResponse;
422
424
  static equals(a: GetMobileNotificationsPaginationResponse | PlainMessage<GetMobileNotificationsPaginationResponse> | undefined, b: GetMobileNotificationsPaginationResponse | PlainMessage<GetMobileNotificationsPaginationResponse> | undefined): boolean;
423
425
  }
426
+ export declare class SendAppUpdatePushRequest extends Message<SendAppUpdatePushRequest> {
427
+ iosBuild: number;
428
+ androidBuild: number;
429
+ constructor(data?: PartialMessage<SendAppUpdatePushRequest>);
430
+ static readonly runtime: typeof proto3;
431
+ static readonly typeName = "micro.v1.notification.SendAppUpdatePushRequest";
432
+ static readonly fields: FieldList;
433
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SendAppUpdatePushRequest;
434
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SendAppUpdatePushRequest;
435
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SendAppUpdatePushRequest;
436
+ static equals(a: SendAppUpdatePushRequest | PlainMessage<SendAppUpdatePushRequest> | undefined, b: SendAppUpdatePushRequest | PlainMessage<SendAppUpdatePushRequest> | undefined): boolean;
437
+ }
438
+ export declare class SendAppUpdatePushResponse extends Message<SendAppUpdatePushResponse> {
439
+ status?: ResponseStatus;
440
+ devices: number;
441
+ constructor(data?: PartialMessage<SendAppUpdatePushResponse>);
442
+ static readonly runtime: typeof proto3;
443
+ static readonly typeName = "micro.v1.notification.SendAppUpdatePushResponse";
444
+ static readonly fields: FieldList;
445
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SendAppUpdatePushResponse;
446
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SendAppUpdatePushResponse;
447
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SendAppUpdatePushResponse;
448
+ static equals(a: SendAppUpdatePushResponse | PlainMessage<SendAppUpdatePushResponse> | undefined, b: SendAppUpdatePushResponse | PlainMessage<SendAppUpdatePushResponse> | undefined): boolean;
449
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetMobileNotificationsPaginationResponse = exports.GetMobileNotificationsResponseDto = exports.GetUserMobileNotificationPaginationResponse = exports.GetUserMobileNotificationSingleResponseDto = exports.GetUserMobileNotificationRequest = exports.SaveMobileNotificationRequest = exports.NotificationPaginationResponse = exports.NotificationPaginationDto = exports.SendChatMentionRequest = exports.SendUserPushRequest = exports.SendNotificationRequest_NotificationMessage = exports.SendNotificationRequest = exports.SendTestNotificationRequest = exports.GetUserNotificationPreferencesResponse = exports.GetUserNotificationPreferencesRequest = exports.SaveUserNotificationPreferencesRequest = exports.RemoveDeviceTokenRequest = exports.SaveDeviceTokenRequest = exports.AddBrowserTokenRequest = exports.UpdateUserPreferencesRequest = exports.CreateNotificationRequest = exports.NotificationChannel = exports.NotificationTarget = exports.UserPreferencesResponse = exports.GetUserNotificationPreferencesDto = exports.UserPreferencesDto = void 0;
3
+ exports.SendAppUpdatePushResponse = exports.SendAppUpdatePushRequest = exports.GetMobileNotificationsPaginationResponse = exports.GetMobileNotificationsResponseDto = exports.GetUserMobileNotificationPaginationResponse = exports.GetUserMobileNotificationSingleResponseDto = exports.GetUserMobileNotificationRequest = exports.SaveMobileNotificationRequest = exports.NotificationPaginationResponse = exports.NotificationPaginationDto = exports.SendChatMentionRequest = exports.SendUserPushRequest = exports.SendNotificationRequest_NotificationMessage = exports.SendNotificationRequest = exports.SendTestNotificationRequest = exports.GetUserNotificationPreferencesResponse = exports.GetUserNotificationPreferencesRequest = exports.SaveUserNotificationPreferencesRequest = exports.RemoveDeviceTokenRequest = exports.SaveDeviceTokenRequest = exports.AddBrowserTokenRequest = exports.UpdateUserPreferencesRequest = exports.CreateNotificationRequest = exports.NotificationChannel = exports.NotificationTarget = exports.UserPreferencesResponse = exports.GetUserNotificationPreferencesDto = exports.UserPreferencesDto = void 0;
4
4
  const protobuf_1 = require("@bufbuild/protobuf");
5
5
  const general_pb_js_1 = require("../general_pb.js");
6
6
  class UserPreferencesDto extends protobuf_1.Message {
@@ -304,6 +304,8 @@ class SaveDeviceTokenRequest extends protobuf_1.Message {
304
304
  platform = "";
305
305
  deviceToken = "";
306
306
  language;
307
+ appVersion;
308
+ appBuild;
307
309
  constructor(data) {
308
310
  super();
309
311
  protobuf_1.proto3.util.initPartial(data, this);
@@ -315,6 +317,8 @@ class SaveDeviceTokenRequest extends protobuf_1.Message {
315
317
  { no: 2, name: "platform", kind: "scalar", T: 9 },
316
318
  { no: 3, name: "deviceToken", kind: "scalar", T: 9 },
317
319
  { no: 4, name: "language", kind: "scalar", T: 9, opt: true },
320
+ { no: 5, name: "app_version", kind: "scalar", T: 9, opt: true },
321
+ { no: 6, name: "app_build", kind: "scalar", T: 5, opt: true },
318
322
  ]);
319
323
  static fromBinary(bytes, options) {
320
324
  return new SaveDeviceTokenRequest().fromBinary(bytes, options);
@@ -901,3 +905,57 @@ class GetMobileNotificationsPaginationResponse extends protobuf_1.Message {
901
905
  }
902
906
  }
903
907
  exports.GetMobileNotificationsPaginationResponse = GetMobileNotificationsPaginationResponse;
908
+ class SendAppUpdatePushRequest extends protobuf_1.Message {
909
+ iosBuild = 0;
910
+ androidBuild = 0;
911
+ constructor(data) {
912
+ super();
913
+ protobuf_1.proto3.util.initPartial(data, this);
914
+ }
915
+ static runtime = protobuf_1.proto3;
916
+ static typeName = "micro.v1.notification.SendAppUpdatePushRequest";
917
+ static fields = protobuf_1.proto3.util.newFieldList(() => [
918
+ { no: 1, name: "ios_build", kind: "scalar", T: 5 },
919
+ { no: 2, name: "android_build", kind: "scalar", T: 5 },
920
+ ]);
921
+ static fromBinary(bytes, options) {
922
+ return new SendAppUpdatePushRequest().fromBinary(bytes, options);
923
+ }
924
+ static fromJson(jsonValue, options) {
925
+ return new SendAppUpdatePushRequest().fromJson(jsonValue, options);
926
+ }
927
+ static fromJsonString(jsonString, options) {
928
+ return new SendAppUpdatePushRequest().fromJsonString(jsonString, options);
929
+ }
930
+ static equals(a, b) {
931
+ return protobuf_1.proto3.util.equals(SendAppUpdatePushRequest, a, b);
932
+ }
933
+ }
934
+ exports.SendAppUpdatePushRequest = SendAppUpdatePushRequest;
935
+ class SendAppUpdatePushResponse extends protobuf_1.Message {
936
+ status;
937
+ devices = 0;
938
+ constructor(data) {
939
+ super();
940
+ protobuf_1.proto3.util.initPartial(data, this);
941
+ }
942
+ static runtime = protobuf_1.proto3;
943
+ static typeName = "micro.v1.notification.SendAppUpdatePushResponse";
944
+ static fields = protobuf_1.proto3.util.newFieldList(() => [
945
+ { no: 1, name: "status", kind: "message", T: general_pb_js_1.ResponseStatus },
946
+ { no: 2, name: "devices", kind: "scalar", T: 5 },
947
+ ]);
948
+ static fromBinary(bytes, options) {
949
+ return new SendAppUpdatePushResponse().fromBinary(bytes, options);
950
+ }
951
+ static fromJson(jsonValue, options) {
952
+ return new SendAppUpdatePushResponse().fromJson(jsonValue, options);
953
+ }
954
+ static fromJsonString(jsonString, options) {
955
+ return new SendAppUpdatePushResponse().fromJsonString(jsonString, options);
956
+ }
957
+ static equals(a, b) {
958
+ return protobuf_1.proto3.util.equals(SendAppUpdatePushResponse, a, b);
959
+ }
960
+ }
961
+ exports.SendAppUpdatePushResponse = SendAppUpdatePushResponse;
@@ -1,5 +1,5 @@
1
1
  import { ByIdRequest, EmptyRequest, EmptyResponse, PaginateRequest } from "../general_pb.js";
2
- import { AddBrowserTokenRequest, CreateNotificationRequest, GetMobileNotificationsPaginationResponse, GetUserMobileNotificationPaginationResponse, GetUserMobileNotificationRequest, GetUserNotificationPreferencesRequest, GetUserNotificationPreferencesResponse, NotificationPaginationResponse, RemoveDeviceTokenRequest, SaveDeviceTokenRequest, SaveMobileNotificationRequest, SaveUserNotificationPreferencesRequest, SendChatMentionRequest, SendNotificationRequest, SendTestNotificationRequest, SendUserPushRequest, UpdateUserPreferencesRequest, UserPreferencesResponse } from "./notification_messages_pb.js";
2
+ import { AddBrowserTokenRequest, CreateNotificationRequest, GetMobileNotificationsPaginationResponse, GetUserMobileNotificationPaginationResponse, GetUserMobileNotificationRequest, GetUserNotificationPreferencesRequest, GetUserNotificationPreferencesResponse, NotificationPaginationResponse, RemoveDeviceTokenRequest, SaveDeviceTokenRequest, SaveMobileNotificationRequest, SaveUserNotificationPreferencesRequest, SendAppUpdatePushRequest, SendAppUpdatePushResponse, SendChatMentionRequest, SendNotificationRequest, SendTestNotificationRequest, SendUserPushRequest, UpdateUserPreferencesRequest, UserPreferencesResponse } from "./notification_messages_pb.js";
3
3
  import { MethodKind } from "@bufbuild/protobuf";
4
4
  import { SendContactMessageRequest, SendForgotPasswordRequest, SendUserVerificationRequest, SendWelcomeRequest } from "./mail_messages_pb.js";
5
5
  export declare const PNotificationService: {
@@ -83,6 +83,12 @@ export declare const PNotificationService: {
83
83
  readonly O: typeof EmptyResponse;
84
84
  readonly kind: MethodKind.ServerStreaming;
85
85
  };
86
+ readonly sendAppUpdatePush: {
87
+ readonly name: "SendAppUpdatePush";
88
+ readonly I: typeof SendAppUpdatePushRequest;
89
+ readonly O: typeof SendAppUpdatePushResponse;
90
+ readonly kind: MethodKind.ServerStreaming;
91
+ };
86
92
  readonly getUserNotificationPreferences: {
87
93
  readonly name: "GetUserNotificationPreferences";
88
94
  readonly I: typeof GetUserNotificationPreferencesRequest;
@@ -86,6 +86,12 @@ exports.PNotificationService = {
86
86
  O: general_pb_js_1.EmptyResponse,
87
87
  kind: protobuf_1.MethodKind.ServerStreaming,
88
88
  },
89
+ sendAppUpdatePush: {
90
+ name: "SendAppUpdatePush",
91
+ I: notification_messages_pb_js_1.SendAppUpdatePushRequest,
92
+ O: notification_messages_pb_js_1.SendAppUpdatePushResponse,
93
+ kind: protobuf_1.MethodKind.ServerStreaming,
94
+ },
89
95
  getUserNotificationPreferences: {
90
96
  name: "GetUserNotificationPreferences",
91
97
  I: notification_messages_pb_js_1.GetUserNotificationPreferencesRequest,
@@ -2,7 +2,7 @@ import type { Metadata } from "@grpc/grpc-js";
2
2
  import { Observable } from "rxjs";
3
3
  import { ByIdRequest, EmptyRequest, EmptyResponse, PaginateRequest } from "../general_nest";
4
4
  import { SendContactMessageRequest, SendForgotPasswordRequest, SendUserVerificationRequest, SendWelcomeRequest } from "./mail_messages_nest";
5
- import { AddBrowserTokenRequest, CreateNotificationRequest, GetMobileNotificationsPaginationResponse, GetUserMobileNotificationPaginationResponse, GetUserMobileNotificationRequest, GetUserNotificationPreferencesRequest, GetUserNotificationPreferencesResponse, NotificationPaginationResponse, RemoveDeviceTokenRequest, SaveDeviceTokenRequest, SaveMobileNotificationRequest, SaveUserNotificationPreferencesRequest, SendChatMentionRequest, SendNotificationRequest, SendTestNotificationRequest, SendUserPushRequest, UpdateUserPreferencesRequest, UserPreferencesResponse } from "./notification_messages_nest";
5
+ import { AddBrowserTokenRequest, CreateNotificationRequest, GetMobileNotificationsPaginationResponse, GetUserMobileNotificationPaginationResponse, GetUserMobileNotificationRequest, GetUserNotificationPreferencesRequest, GetUserNotificationPreferencesResponse, NotificationPaginationResponse, RemoveDeviceTokenRequest, SaveDeviceTokenRequest, SaveMobileNotificationRequest, SaveUserNotificationPreferencesRequest, SendAppUpdatePushRequest, SendAppUpdatePushResponse, SendChatMentionRequest, SendNotificationRequest, SendTestNotificationRequest, SendUserPushRequest, UpdateUserPreferencesRequest, UserPreferencesResponse } from "./notification_messages_nest";
6
6
  export declare const protobufPackage = "micro.v1.notification";
7
7
  export declare const MICRO_V1_NOTIFICATION_PACKAGE_NAME = "micro.v1.notification";
8
8
  export interface PNotificationServiceClient {
@@ -19,6 +19,7 @@ export interface PNotificationServiceClient {
19
19
  sendNotification(request: SendNotificationRequest, metadata?: Metadata): Observable<EmptyResponse>;
20
20
  sendChatMention(request: SendChatMentionRequest, metadata?: Metadata): Observable<EmptyResponse>;
21
21
  sendUserPush(request: SendUserPushRequest, metadata?: Metadata): Observable<EmptyResponse>;
22
+ sendAppUpdatePush(request: SendAppUpdatePushRequest, metadata?: Metadata): Observable<SendAppUpdatePushResponse>;
22
23
  getUserNotificationPreferences(request: GetUserNotificationPreferencesRequest, metadata?: Metadata): Observable<GetUserNotificationPreferencesResponse>;
23
24
  saveMobileNotification(request: SaveMobileNotificationRequest, metadata?: Metadata): Observable<EmptyResponse>;
24
25
  getUserMobileNotification(request: GetUserMobileNotificationRequest, metadata?: Metadata): Observable<GetUserMobileNotificationPaginationResponse>;
@@ -38,6 +39,7 @@ export interface PNotificationServiceController {
38
39
  sendNotification(request: SendNotificationRequest, metadata?: Metadata): Observable<EmptyResponse>;
39
40
  sendChatMention(request: SendChatMentionRequest, metadata?: Metadata): Observable<EmptyResponse>;
40
41
  sendUserPush(request: SendUserPushRequest, metadata?: Metadata): Observable<EmptyResponse>;
42
+ sendAppUpdatePush(request: SendAppUpdatePushRequest, metadata?: Metadata): Observable<SendAppUpdatePushResponse>;
41
43
  getUserNotificationPreferences(request: GetUserNotificationPreferencesRequest, metadata?: Metadata): Observable<GetUserNotificationPreferencesResponse>;
42
44
  saveMobileNotification(request: SaveMobileNotificationRequest, metadata?: Metadata): Observable<EmptyResponse>;
43
45
  getUserMobileNotification(request: GetUserMobileNotificationRequest, metadata?: Metadata): Observable<GetUserMobileNotificationPaginationResponse>;
@@ -23,6 +23,7 @@ function PNotificationServiceControllerMethods() {
23
23
  "sendNotification",
24
24
  "sendChatMention",
25
25
  "sendUserPush",
26
+ "sendAppUpdatePush",
26
27
  "getUserNotificationPreferences",
27
28
  "saveMobileNotification",
28
29
  "getUserMobileNotification",
@@ -87,10 +87,12 @@ export interface ProfileIdListResponse {
87
87
  }
88
88
  export interface ResolveUsernamesRequest {
89
89
  usernames: string[];
90
+ emails: string[];
90
91
  }
91
92
  export interface ResolvedUsername {
92
93
  username: string;
93
94
  user_id: string;
95
+ email: string;
94
96
  }
95
97
  export interface ResolveUsernamesResponse {
96
98
  status: ResponseStatus | undefined;
@@ -216,6 +216,7 @@ export declare class ProfileIdListResponse extends Message<ProfileIdListResponse
216
216
  }
217
217
  export declare class ResolveUsernamesRequest extends Message<ResolveUsernamesRequest> {
218
218
  usernames: string[];
219
+ emails: string[];
219
220
  constructor(data?: PartialMessage<ResolveUsernamesRequest>);
220
221
  static readonly runtime: typeof proto3;
221
222
  static readonly typeName = "micro.v1.user.ResolveUsernamesRequest";
@@ -228,6 +229,7 @@ export declare class ResolveUsernamesRequest extends Message<ResolveUsernamesReq
228
229
  export declare class ResolvedUsername extends Message<ResolvedUsername> {
229
230
  username: string;
230
231
  userId: string;
232
+ email: string;
231
233
  constructor(data?: PartialMessage<ResolvedUsername>);
232
234
  static readonly runtime: typeof proto3;
233
235
  static readonly typeName = "micro.v1.user.ResolvedUsername";
@@ -479,6 +479,7 @@ class ProfileIdListResponse extends protobuf_1.Message {
479
479
  exports.ProfileIdListResponse = ProfileIdListResponse;
480
480
  class ResolveUsernamesRequest extends protobuf_1.Message {
481
481
  usernames = [];
482
+ emails = [];
482
483
  constructor(data) {
483
484
  super();
484
485
  protobuf_1.proto3.util.initPartial(data, this);
@@ -487,6 +488,7 @@ class ResolveUsernamesRequest extends protobuf_1.Message {
487
488
  static typeName = "micro.v1.user.ResolveUsernamesRequest";
488
489
  static fields = protobuf_1.proto3.util.newFieldList(() => [
489
490
  { no: 1, name: "usernames", kind: "scalar", T: 9, repeated: true },
491
+ { no: 2, name: "emails", kind: "scalar", T: 9, repeated: true },
490
492
  ]);
491
493
  static fromBinary(bytes, options) {
492
494
  return new ResolveUsernamesRequest().fromBinary(bytes, options);
@@ -505,6 +507,7 @@ exports.ResolveUsernamesRequest = ResolveUsernamesRequest;
505
507
  class ResolvedUsername extends protobuf_1.Message {
506
508
  username = "";
507
509
  userId = "";
510
+ email = "";
508
511
  constructor(data) {
509
512
  super();
510
513
  protobuf_1.proto3.util.initPartial(data, this);
@@ -514,6 +517,7 @@ class ResolvedUsername extends protobuf_1.Message {
514
517
  static fields = protobuf_1.proto3.util.newFieldList(() => [
515
518
  { no: 1, name: "username", kind: "scalar", T: 9 },
516
519
  { no: 2, name: "user_id", kind: "scalar", T: 9 },
520
+ { no: 3, name: "email", kind: "scalar", T: 9 },
517
521
  ]);
518
522
  static fromBinary(bytes, options) {
519
523
  return new ResolvedUsername().fromBinary(bytes, options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jr-common-micro",
3
- "version": "1.1.131",
3
+ "version": "1.1.133",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -818,6 +818,8 @@ message AdminGiftRecipient {
818
818
  string state = 5;
819
819
  // Already gifted to them in the last 7 days.
820
820
  string given_week = 6;
821
+ // Of that, in the last 24 hours.
822
+ string given_day = 7;
821
823
  }
822
824
 
823
825
  message AdminGiftPreviewResponse {
@@ -11,6 +11,9 @@ message AppVersionDto {
11
11
  int32 ios_version = 4;
12
12
  map<string, string> description = 5;
13
13
  bool mandatory = 6;
14
+ // When the "update available" push went out for this version; empty
15
+ // while it has not.
16
+ string push_sent_at = 7;
14
17
  }
15
18
 
16
19
  message AppVersionResponse {
@@ -33,3 +36,11 @@ message AppVersionListResponse {
33
36
  repeated AppVersionDto data = 1;
34
37
  ResponseStatus status = 2;
35
38
  }
39
+
40
+ // Marks the version's update push as sent, once: the answer is 200 with the
41
+ // version for the first caller, 409 when it was already sent, 404 when there
42
+ // is no such version. release=true undoes it (the push could not be queued).
43
+ message AppVersionPushClaimRequest {
44
+ string id = 1;
45
+ bool release = 2;
46
+ }
@@ -107,9 +107,10 @@ service PAppVersionService {
107
107
  }
108
108
 
109
109
  service PAppVersionAdminService {
110
- rpc StoreAppVersion(AddAppVersionRequest) returns(stream EmptyResponse) {}
110
+ rpc StoreAppVersion(AddAppVersionRequest) returns(stream AppVersionResponse) {}
111
111
  rpc RemoveAppVersion(ByIdRequest) returns(stream EmptyResponse) {}
112
112
  rpc GetAllAppVersions(EmptyRequest) returns(stream AppVersionListResponse) {}
113
+ rpc ClaimAppVersionPush(AppVersionPushClaimRequest) returns(stream AppVersionResponse) {}
113
114
  }
114
115
 
115
116
  service PJrBlogAdminService {
@@ -96,6 +96,11 @@ message SaveDeviceTokenRequest {
96
96
  string platform = 2;
97
97
  string deviceToken = 3;
98
98
  optional string language = 4;
99
+ // The app's version ("2.6.5") and build (iOS buildNumber / Android
100
+ // versionCode) from the request headers. Absent from builds older than
101
+ // the one that started sending them.
102
+ optional string app_version = 5;
103
+ optional int32 app_build = 6;
99
104
  }
100
105
 
101
106
  message RemoveDeviceTokenRequest {
@@ -261,3 +266,15 @@ message GetMobileNotificationsPaginationResponse {
261
266
  repeated GetMobileNotificationsResponseDto data = 3;
262
267
  }
263
268
 
269
+ // One push to every device still on an older build than the given ones,
270
+ // telling it an update is out (text written micro-side, every app language).
271
+ // Not kept in the notification history. A build of 0 skips that platform.
272
+ message SendAppUpdatePushRequest {
273
+ int32 ios_build = 1;
274
+ int32 android_build = 2;
275
+ }
276
+
277
+ message SendAppUpdatePushResponse {
278
+ ResponseStatus status = 1;
279
+ int32 devices = 2;
280
+ }
@@ -22,6 +22,7 @@ service PNotificationService {
22
22
  // Generic targeted push for other services (JR session end ...): the
23
23
  // caller gives the text per language and the data the tap routes with.
24
24
  rpc SendUserPush(SendUserPushRequest) returns(stream EmptyResponse) {}
25
+ rpc SendAppUpdatePush(SendAppUpdatePushRequest) returns(stream SendAppUpdatePushResponse) {}
25
26
  rpc GetUserNotificationPreferences(GetUserNotificationPreferencesRequest) returns(stream GetUserNotificationPreferencesResponse) {}
26
27
  rpc SaveMobileNotification(SaveMobileNotificationRequest) returns(stream EmptyResponse) {}
27
28
  rpc GetUserMobileNotification(GetUserMobileNotificationRequest) returns(stream GetUserMobileNotificationPaginationResponse) {}
@@ -121,11 +121,15 @@ message ProfileIdListResponse {
121
121
  // JR gifts). A username that matches no account is simply absent.
122
122
  message ResolveUsernamesRequest {
123
123
  repeated string usernames = 1;
124
+ // Accounts looked up by e-mail as well (the admin panel's direct push).
125
+ repeated string emails = 2;
124
126
  }
125
127
 
126
128
  message ResolvedUsername {
127
129
  string username = 1;
128
130
  string user_id = 2;
131
+ // Set on an e-mail match: the address as asked.
132
+ string email = 3;
129
133
  }
130
134
 
131
135
  message ResolveUsernamesResponse {