@mamindom/contracts 1.0.127 → 1.0.129

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.
@@ -44,6 +44,38 @@ export declare enum TelegramTopic {
44
44
  GENERAL = 9,
45
45
  UNRECOGNIZED = -1
46
46
  }
47
+ export interface BrandingEmpty {
48
+ }
49
+ /**
50
+ * Поля що поверталися з resolved-merge (DB ∪ env). Порожні рядки означають
51
+ * "взяти fallback з env" при наступному GET.
52
+ */
53
+ export interface BrandingProfile {
54
+ logoUrl: string;
55
+ brandName: string;
56
+ brandUrl: string;
57
+ supportEmail: string;
58
+ footerHtml: string;
59
+ updatedAt: number;
60
+ updatedBy: string;
61
+ /**
62
+ * resolved: остаточні значення, що використовуються wrapper'ом
63
+ * (DB override → env fallback). Для UI щоб показати "поточне значення".
64
+ */
65
+ resolvedLogoUrl: string;
66
+ resolvedBrandName: string;
67
+ resolvedBrandUrl: string;
68
+ resolvedSupportEmail: string;
69
+ }
70
+ export interface UpdateBrandingRequest {
71
+ /** optional: відсутність → не оновлювати; порожній рядок → скинути до NULL у БД. */
72
+ logoUrl?: string | undefined;
73
+ brandName?: string | undefined;
74
+ brandUrl?: string | undefined;
75
+ supportEmail?: string | undefined;
76
+ footerHtml?: string | undefined;
77
+ actorId: string;
78
+ }
47
79
  export interface NotificationTemplate {
48
80
  id: string;
49
81
  key: string;
@@ -277,3 +309,15 @@ export interface TelegramChatsServiceController {
277
309
  }
278
310
  export declare function TelegramChatsServiceControllerMethods(): (constructor: Function) => void;
279
311
  export declare const TELEGRAM_CHATS_SERVICE_NAME = "TelegramChatsService";
312
+ /** Брендинг email-шаблонів — singleton редагується адміном. */
313
+ export interface BrandingServiceClient {
314
+ getBranding(request: BrandingEmpty): Observable<BrandingProfile>;
315
+ updateBranding(request: UpdateBrandingRequest): Observable<BrandingProfile>;
316
+ }
317
+ /** Брендинг email-шаблонів — singleton редагується адміном. */
318
+ export interface BrandingServiceController {
319
+ getBranding(request: BrandingEmpty): Promise<BrandingProfile> | Observable<BrandingProfile> | BrandingProfile;
320
+ updateBranding(request: UpdateBrandingRequest): Promise<BrandingProfile> | Observable<BrandingProfile> | BrandingProfile;
321
+ }
322
+ export declare function BrandingServiceControllerMethods(): (constructor: Function) => void;
323
+ export declare const BRANDING_SERVICE_NAME = "BrandingService";
@@ -5,10 +5,11 @@
5
5
  // protoc v3.21.12
6
6
  // source: notification.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.TELEGRAM_CHATS_SERVICE_NAME = exports.NOTIFICATION_LOGS_SERVICE_NAME = exports.NOTIFICATION_TEMPLATE_SERVICE_NAME = exports.NOTIFICATION_V1_PACKAGE_NAME = exports.TelegramTopic = exports.NotificationStatus = exports.NotificationCategory = exports.NotificationLocale = exports.NotificationChannel = exports.protobufPackage = void 0;
8
+ exports.BRANDING_SERVICE_NAME = exports.TELEGRAM_CHATS_SERVICE_NAME = exports.NOTIFICATION_LOGS_SERVICE_NAME = exports.NOTIFICATION_TEMPLATE_SERVICE_NAME = exports.NOTIFICATION_V1_PACKAGE_NAME = exports.TelegramTopic = exports.NotificationStatus = exports.NotificationCategory = exports.NotificationLocale = exports.NotificationChannel = exports.protobufPackage = void 0;
9
9
  exports.NotificationTemplateServiceControllerMethods = NotificationTemplateServiceControllerMethods;
10
10
  exports.NotificationLogsServiceControllerMethods = NotificationLogsServiceControllerMethods;
11
11
  exports.TelegramChatsServiceControllerMethods = TelegramChatsServiceControllerMethods;
12
+ exports.BrandingServiceControllerMethods = BrandingServiceControllerMethods;
12
13
  /* eslint-disable */
13
14
  const microservices_1 = require("@nestjs/microservices");
14
15
  exports.protobufPackage = "notification.v1";
@@ -117,3 +118,18 @@ function TelegramChatsServiceControllerMethods() {
117
118
  };
118
119
  }
119
120
  exports.TELEGRAM_CHATS_SERVICE_NAME = "TelegramChatsService";
121
+ function BrandingServiceControllerMethods() {
122
+ return function (constructor) {
123
+ const grpcMethods = ["getBranding", "updateBranding"];
124
+ for (const method of grpcMethods) {
125
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
126
+ (0, microservices_1.GrpcMethod)("BrandingService", method)(constructor.prototype[method], method, descriptor);
127
+ }
128
+ const grpcStreamMethods = [];
129
+ for (const method of grpcStreamMethods) {
130
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
131
+ (0, microservices_1.GrpcStreamMethod)("BrandingService", method)(constructor.prototype[method], method, descriptor);
132
+ }
133
+ };
134
+ }
135
+ exports.BRANDING_SERVICE_NAME = "BrandingService";
@@ -29,6 +29,42 @@ service TelegramChatsService {
29
29
  rpc TestSendTelegram (TestSendTelegramRequest) returns (TestSendTelegramResponse);
30
30
  }
31
31
 
32
+ // Брендинг email-шаблонів — singleton редагується адміном.
33
+ service BrandingService {
34
+ rpc GetBranding (BrandingEmpty) returns (BrandingProfile);
35
+ rpc UpdateBranding (UpdateBrandingRequest) returns (BrandingProfile);
36
+ }
37
+
38
+ message BrandingEmpty {}
39
+
40
+ // Поля що поверталися з resolved-merge (DB ∪ env). Порожні рядки означають
41
+ // "взяти fallback з env" при наступному GET.
42
+ message BrandingProfile {
43
+ string logo_url = 1;
44
+ string brand_name = 2;
45
+ string brand_url = 3;
46
+ string support_email = 4;
47
+ string footer_html = 5;
48
+ int64 updated_at = 6;
49
+ string updated_by = 7;
50
+ // resolved: остаточні значення, що використовуються wrapper'ом
51
+ // (DB override → env fallback). Для UI щоб показати "поточне значення".
52
+ string resolved_logo_url = 8;
53
+ string resolved_brand_name = 9;
54
+ string resolved_brand_url = 10;
55
+ string resolved_support_email = 11;
56
+ }
57
+
58
+ message UpdateBrandingRequest {
59
+ // optional: відсутність → не оновлювати; порожній рядок → скинути до NULL у БД.
60
+ optional string logo_url = 1;
61
+ optional string brand_name = 2;
62
+ optional string brand_url = 3;
63
+ optional string support_email = 4;
64
+ optional string footer_html = 5;
65
+ string actor_id = 6;
66
+ }
67
+
32
68
 
33
69
  enum NotificationChannel {
34
70
  NOTIFICATION_CHANNEL_UNSPECIFIED = 0;
@@ -59,6 +59,41 @@ export enum TelegramTopic {
59
59
  UNRECOGNIZED = -1,
60
60
  }
61
61
 
62
+ export interface BrandingEmpty {
63
+ }
64
+
65
+ /**
66
+ * Поля що поверталися з resolved-merge (DB ∪ env). Порожні рядки означають
67
+ * "взяти fallback з env" при наступному GET.
68
+ */
69
+ export interface BrandingProfile {
70
+ logoUrl: string;
71
+ brandName: string;
72
+ brandUrl: string;
73
+ supportEmail: string;
74
+ footerHtml: string;
75
+ updatedAt: number;
76
+ updatedBy: string;
77
+ /**
78
+ * resolved: остаточні значення, що використовуються wrapper'ом
79
+ * (DB override → env fallback). Для UI щоб показати "поточне значення".
80
+ */
81
+ resolvedLogoUrl: string;
82
+ resolvedBrandName: string;
83
+ resolvedBrandUrl: string;
84
+ resolvedSupportEmail: string;
85
+ }
86
+
87
+ export interface UpdateBrandingRequest {
88
+ /** optional: відсутність → не оновлювати; порожній рядок → скинути до NULL у БД. */
89
+ logoUrl?: string | undefined;
90
+ brandName?: string | undefined;
91
+ brandUrl?: string | undefined;
92
+ supportEmail?: string | undefined;
93
+ footerHtml?: string | undefined;
94
+ actorId: string;
95
+ }
96
+
62
97
  export interface NotificationTemplate {
63
98
  id: string;
64
99
  key: string;
@@ -425,3 +460,38 @@ export function TelegramChatsServiceControllerMethods() {
425
460
  }
426
461
 
427
462
  export const TELEGRAM_CHATS_SERVICE_NAME = "TelegramChatsService";
463
+
464
+ /** Брендинг email-шаблонів — singleton редагується адміном. */
465
+
466
+ export interface BrandingServiceClient {
467
+ getBranding(request: BrandingEmpty): Observable<BrandingProfile>;
468
+
469
+ updateBranding(request: UpdateBrandingRequest): Observable<BrandingProfile>;
470
+ }
471
+
472
+ /** Брендинг email-шаблонів — singleton редагується адміном. */
473
+
474
+ export interface BrandingServiceController {
475
+ getBranding(request: BrandingEmpty): Promise<BrandingProfile> | Observable<BrandingProfile> | BrandingProfile;
476
+
477
+ updateBranding(
478
+ request: UpdateBrandingRequest,
479
+ ): Promise<BrandingProfile> | Observable<BrandingProfile> | BrandingProfile;
480
+ }
481
+
482
+ export function BrandingServiceControllerMethods() {
483
+ return function (constructor: Function) {
484
+ const grpcMethods: string[] = ["getBranding", "updateBranding"];
485
+ for (const method of grpcMethods) {
486
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
487
+ GrpcMethod("BrandingService", method)(constructor.prototype[method], method, descriptor);
488
+ }
489
+ const grpcStreamMethods: string[] = [];
490
+ for (const method of grpcStreamMethods) {
491
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
492
+ GrpcStreamMethod("BrandingService", method)(constructor.prototype[method], method, descriptor);
493
+ }
494
+ };
495
+ }
496
+
497
+ export const BRANDING_SERVICE_NAME = "BrandingService";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mamindom/contracts",
3
3
  "description": "proto",
4
- "version": "1.0.127",
4
+ "version": "1.0.129",
5
5
  "main": "./dist/src/index.js",
6
6
  "types": "./dist/src/index.d.ts",
7
7
  "exports": {
@@ -29,6 +29,42 @@ service TelegramChatsService {
29
29
  rpc TestSendTelegram (TestSendTelegramRequest) returns (TestSendTelegramResponse);
30
30
  }
31
31
 
32
+ // Брендинг email-шаблонів — singleton редагується адміном.
33
+ service BrandingService {
34
+ rpc GetBranding (BrandingEmpty) returns (BrandingProfile);
35
+ rpc UpdateBranding (UpdateBrandingRequest) returns (BrandingProfile);
36
+ }
37
+
38
+ message BrandingEmpty {}
39
+
40
+ // Поля що поверталися з resolved-merge (DB ∪ env). Порожні рядки означають
41
+ // "взяти fallback з env" при наступному GET.
42
+ message BrandingProfile {
43
+ string logo_url = 1;
44
+ string brand_name = 2;
45
+ string brand_url = 3;
46
+ string support_email = 4;
47
+ string footer_html = 5;
48
+ int64 updated_at = 6;
49
+ string updated_by = 7;
50
+ // resolved: остаточні значення, що використовуються wrapper'ом
51
+ // (DB override → env fallback). Для UI щоб показати "поточне значення".
52
+ string resolved_logo_url = 8;
53
+ string resolved_brand_name = 9;
54
+ string resolved_brand_url = 10;
55
+ string resolved_support_email = 11;
56
+ }
57
+
58
+ message UpdateBrandingRequest {
59
+ // optional: відсутність → не оновлювати; порожній рядок → скинути до NULL у БД.
60
+ optional string logo_url = 1;
61
+ optional string brand_name = 2;
62
+ optional string brand_url = 3;
63
+ optional string support_email = 4;
64
+ optional string footer_html = 5;
65
+ string actor_id = 6;
66
+ }
67
+
32
68
 
33
69
  enum NotificationChannel {
34
70
  NOTIFICATION_CHANNEL_UNSPECIFIED = 0;