@mamindom/contracts 1.0.119 → 1.0.120
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gen/site_settings.d.ts +33 -0
- package/dist/gen/site_settings.js +28 -0
- package/dist/proto/site_settings.proto +38 -0
- package/dist/src/proto/paths.d.ts +1 -0
- package/dist/src/proto/paths.js +2 -1
- package/gen/site_settings.ts +69 -0
- package/package.json +1 -1
- package/proto/site_settings.proto +38 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
export declare const protobufPackage = "content.v1";
|
|
3
|
+
export interface SiteSettingsResponse {
|
|
4
|
+
supportEmail: string;
|
|
5
|
+
phone: string;
|
|
6
|
+
instagramUrl?: string | undefined;
|
|
7
|
+
facebookUrl?: string | undefined;
|
|
8
|
+
telegramUrl?: string | undefined;
|
|
9
|
+
updatedAt: string;
|
|
10
|
+
}
|
|
11
|
+
export interface GetSiteSettingsRequest {
|
|
12
|
+
}
|
|
13
|
+
export interface UpdateSiteSettingsRequest {
|
|
14
|
+
supportEmail?: string | undefined;
|
|
15
|
+
phone?: string | undefined;
|
|
16
|
+
instagramUrl?: string | undefined;
|
|
17
|
+
facebookUrl?: string | undefined;
|
|
18
|
+
telegramUrl?: string | undefined;
|
|
19
|
+
clearInstagramUrl: boolean;
|
|
20
|
+
clearFacebookUrl: boolean;
|
|
21
|
+
clearTelegramUrl: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare const CONTENT_V1_PACKAGE_NAME = "content.v1";
|
|
24
|
+
export interface SettingsServiceClient {
|
|
25
|
+
getSiteSettings(request: GetSiteSettingsRequest): Observable<SiteSettingsResponse>;
|
|
26
|
+
updateSiteSettings(request: UpdateSiteSettingsRequest): Observable<SiteSettingsResponse>;
|
|
27
|
+
}
|
|
28
|
+
export interface SettingsServiceController {
|
|
29
|
+
getSiteSettings(request: GetSiteSettingsRequest): Promise<SiteSettingsResponse> | Observable<SiteSettingsResponse> | SiteSettingsResponse;
|
|
30
|
+
updateSiteSettings(request: UpdateSiteSettingsRequest): Promise<SiteSettingsResponse> | Observable<SiteSettingsResponse> | SiteSettingsResponse;
|
|
31
|
+
}
|
|
32
|
+
export declare function SettingsServiceControllerMethods(): (constructor: Function) => void;
|
|
33
|
+
export declare const SETTINGS_SERVICE_NAME = "SettingsService";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.11.4
|
|
5
|
+
// protoc v3.21.12
|
|
6
|
+
// source: site_settings.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.SETTINGS_SERVICE_NAME = exports.CONTENT_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
9
|
+
exports.SettingsServiceControllerMethods = SettingsServiceControllerMethods;
|
|
10
|
+
/* eslint-disable */
|
|
11
|
+
const microservices_1 = require("@nestjs/microservices");
|
|
12
|
+
exports.protobufPackage = "content.v1";
|
|
13
|
+
exports.CONTENT_V1_PACKAGE_NAME = "content.v1";
|
|
14
|
+
function SettingsServiceControllerMethods() {
|
|
15
|
+
return function (constructor) {
|
|
16
|
+
const grpcMethods = ["getSiteSettings", "updateSiteSettings"];
|
|
17
|
+
for (const method of grpcMethods) {
|
|
18
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
19
|
+
(0, microservices_1.GrpcMethod)("SettingsService", method)(constructor.prototype[method], method, descriptor);
|
|
20
|
+
}
|
|
21
|
+
const grpcStreamMethods = [];
|
|
22
|
+
for (const method of grpcStreamMethods) {
|
|
23
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
24
|
+
(0, microservices_1.GrpcStreamMethod)("SettingsService", method)(constructor.prototype[method], method, descriptor);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
exports.SETTINGS_SERVICE_NAME = "SettingsService";
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package content.v1;
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
service SettingsService {
|
|
7
|
+
rpc GetSiteSettings (GetSiteSettingsRequest) returns (SiteSettingsResponse);
|
|
8
|
+
rpc UpdateSiteSettings (UpdateSiteSettingsRequest) returns (SiteSettingsResponse);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
message SiteSettingsResponse {
|
|
13
|
+
string support_email = 1;
|
|
14
|
+
string phone = 2;
|
|
15
|
+
|
|
16
|
+
optional string instagram_url = 3;
|
|
17
|
+
optional string facebook_url = 4;
|
|
18
|
+
optional string telegram_url = 5;
|
|
19
|
+
|
|
20
|
+
string updated_at = 6;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
message GetSiteSettingsRequest {}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
message UpdateSiteSettingsRequest {
|
|
28
|
+
optional string support_email = 1;
|
|
29
|
+
optional string phone = 2;
|
|
30
|
+
|
|
31
|
+
optional string instagram_url = 3;
|
|
32
|
+
optional string facebook_url = 4;
|
|
33
|
+
optional string telegram_url = 5;
|
|
34
|
+
|
|
35
|
+
bool clear_instagram_url = 6;
|
|
36
|
+
bool clear_facebook_url = 7;
|
|
37
|
+
bool clear_telegram_url = 8;
|
|
38
|
+
}
|
package/dist/src/proto/paths.js
CHANGED
|
@@ -31,5 +31,6 @@ exports.PROTO_PATHS = {
|
|
|
31
31
|
POST_VERSION: (0, node_path_1.join)(__dirname, '../../proto/post_version.proto'),
|
|
32
32
|
BANNER: (0, node_path_1.join)(__dirname, '../../proto/banner.proto'),
|
|
33
33
|
FAQ: (0, node_path_1.join)(__dirname, '../../proto/faq.proto'),
|
|
34
|
-
PAGE: (0, node_path_1.join)(__dirname, '../../proto/page.proto')
|
|
34
|
+
PAGE: (0, node_path_1.join)(__dirname, '../../proto/page.proto'),
|
|
35
|
+
SITE_SETTINGS: (0, node_path_1.join)(__dirname, '../../proto/site_settings.proto')
|
|
35
36
|
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.11.4
|
|
4
|
+
// protoc v3.21.12
|
|
5
|
+
// source: site_settings.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
9
|
+
import { Observable } from "rxjs";
|
|
10
|
+
|
|
11
|
+
export const protobufPackage = "content.v1";
|
|
12
|
+
|
|
13
|
+
export interface SiteSettingsResponse {
|
|
14
|
+
supportEmail: string;
|
|
15
|
+
phone: string;
|
|
16
|
+
instagramUrl?: string | undefined;
|
|
17
|
+
facebookUrl?: string | undefined;
|
|
18
|
+
telegramUrl?: string | undefined;
|
|
19
|
+
updatedAt: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface GetSiteSettingsRequest {
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface UpdateSiteSettingsRequest {
|
|
26
|
+
supportEmail?: string | undefined;
|
|
27
|
+
phone?: string | undefined;
|
|
28
|
+
instagramUrl?: string | undefined;
|
|
29
|
+
facebookUrl?: string | undefined;
|
|
30
|
+
telegramUrl?: string | undefined;
|
|
31
|
+
clearInstagramUrl: boolean;
|
|
32
|
+
clearFacebookUrl: boolean;
|
|
33
|
+
clearTelegramUrl: boolean;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const CONTENT_V1_PACKAGE_NAME = "content.v1";
|
|
37
|
+
|
|
38
|
+
export interface SettingsServiceClient {
|
|
39
|
+
getSiteSettings(request: GetSiteSettingsRequest): Observable<SiteSettingsResponse>;
|
|
40
|
+
|
|
41
|
+
updateSiteSettings(request: UpdateSiteSettingsRequest): Observable<SiteSettingsResponse>;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface SettingsServiceController {
|
|
45
|
+
getSiteSettings(
|
|
46
|
+
request: GetSiteSettingsRequest,
|
|
47
|
+
): Promise<SiteSettingsResponse> | Observable<SiteSettingsResponse> | SiteSettingsResponse;
|
|
48
|
+
|
|
49
|
+
updateSiteSettings(
|
|
50
|
+
request: UpdateSiteSettingsRequest,
|
|
51
|
+
): Promise<SiteSettingsResponse> | Observable<SiteSettingsResponse> | SiteSettingsResponse;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function SettingsServiceControllerMethods() {
|
|
55
|
+
return function (constructor: Function) {
|
|
56
|
+
const grpcMethods: string[] = ["getSiteSettings", "updateSiteSettings"];
|
|
57
|
+
for (const method of grpcMethods) {
|
|
58
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
59
|
+
GrpcMethod("SettingsService", method)(constructor.prototype[method], method, descriptor);
|
|
60
|
+
}
|
|
61
|
+
const grpcStreamMethods: string[] = [];
|
|
62
|
+
for (const method of grpcStreamMethods) {
|
|
63
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
64
|
+
GrpcStreamMethod("SettingsService", method)(constructor.prototype[method], method, descriptor);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export const SETTINGS_SERVICE_NAME = "SettingsService";
|
package/package.json
CHANGED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package content.v1;
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
service SettingsService {
|
|
7
|
+
rpc GetSiteSettings (GetSiteSettingsRequest) returns (SiteSettingsResponse);
|
|
8
|
+
rpc UpdateSiteSettings (UpdateSiteSettingsRequest) returns (SiteSettingsResponse);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
message SiteSettingsResponse {
|
|
13
|
+
string support_email = 1;
|
|
14
|
+
string phone = 2;
|
|
15
|
+
|
|
16
|
+
optional string instagram_url = 3;
|
|
17
|
+
optional string facebook_url = 4;
|
|
18
|
+
optional string telegram_url = 5;
|
|
19
|
+
|
|
20
|
+
string updated_at = 6;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
message GetSiteSettingsRequest {}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
message UpdateSiteSettingsRequest {
|
|
28
|
+
optional string support_email = 1;
|
|
29
|
+
optional string phone = 2;
|
|
30
|
+
|
|
31
|
+
optional string instagram_url = 3;
|
|
32
|
+
optional string facebook_url = 4;
|
|
33
|
+
optional string telegram_url = 5;
|
|
34
|
+
|
|
35
|
+
bool clear_instagram_url = 6;
|
|
36
|
+
bool clear_facebook_url = 7;
|
|
37
|
+
bool clear_telegram_url = 8;
|
|
38
|
+
}
|