@mamindom/contracts 1.0.28 → 1.0.29

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.
@@ -0,0 +1,70 @@
1
+ import { Observable } from "rxjs";
2
+ export declare const protobufPackage = "account.v1";
3
+ export declare enum Role {
4
+ USER = 0,
5
+ ADMIN = 1,
6
+ MANAGER = 2,
7
+ COPYWRITER = 3,
8
+ SEO = 4,
9
+ UNRECOGNIZED = -1
10
+ }
11
+ export interface GetAccountRequest {
12
+ id: string;
13
+ }
14
+ export interface GetAccountResponse {
15
+ id: string;
16
+ phone: string;
17
+ email: string;
18
+ firstName: string;
19
+ lastName: string;
20
+ isEmailVerified: boolean;
21
+ isPhoneVerified: boolean;
22
+ role: Role;
23
+ }
24
+ export interface InitEmailChangeRequest {
25
+ email: string;
26
+ userId: string;
27
+ }
28
+ export interface InitEmailChangeResponse {
29
+ ok: boolean;
30
+ }
31
+ export interface ConfirmEmailChangeRequest {
32
+ email: string;
33
+ code: string;
34
+ userId: string;
35
+ }
36
+ export interface ConfirmEmailChangeResponse {
37
+ ok: boolean;
38
+ }
39
+ export interface InitPhoneChangeRequest {
40
+ phone: string;
41
+ userId: string;
42
+ }
43
+ export interface InitPhoneChangeResponse {
44
+ ok: boolean;
45
+ }
46
+ export interface ConfirmPhoneChangeRequest {
47
+ phone: string;
48
+ code: string;
49
+ userId: string;
50
+ }
51
+ export interface ConfirmPhoneChangeResponse {
52
+ ok: boolean;
53
+ }
54
+ export declare const ACCOUNT_V1_PACKAGE_NAME = "account.v1";
55
+ export interface AccountServiceClient {
56
+ getAccount(request: GetAccountRequest): Observable<GetAccountResponse>;
57
+ initEmailChange(request: InitEmailChangeRequest): Observable<InitEmailChangeResponse>;
58
+ confirmEmailChange(request: ConfirmEmailChangeRequest): Observable<ConfirmEmailChangeResponse>;
59
+ initPhoneChange(request: InitPhoneChangeRequest): Observable<InitPhoneChangeResponse>;
60
+ confirmPhoneChange(request: ConfirmPhoneChangeRequest): Observable<ConfirmPhoneChangeResponse>;
61
+ }
62
+ export interface AccountServiceController {
63
+ getAccount(request: GetAccountRequest): Promise<GetAccountResponse> | Observable<GetAccountResponse> | GetAccountResponse;
64
+ initEmailChange(request: InitEmailChangeRequest): Promise<InitEmailChangeResponse> | Observable<InitEmailChangeResponse> | InitEmailChangeResponse;
65
+ confirmEmailChange(request: ConfirmEmailChangeRequest): Promise<ConfirmEmailChangeResponse> | Observable<ConfirmEmailChangeResponse> | ConfirmEmailChangeResponse;
66
+ initPhoneChange(request: InitPhoneChangeRequest): Promise<InitPhoneChangeResponse> | Observable<InitPhoneChangeResponse> | InitPhoneChangeResponse;
67
+ confirmPhoneChange(request: ConfirmPhoneChangeRequest): Promise<ConfirmPhoneChangeResponse> | Observable<ConfirmPhoneChangeResponse> | ConfirmPhoneChangeResponse;
68
+ }
69
+ export declare function AccountServiceControllerMethods(): (constructor: Function) => void;
70
+ export declare const ACCOUNT_SERVICE_NAME = "AccountService";
@@ -0,0 +1,43 @@
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: account.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.ACCOUNT_SERVICE_NAME = exports.ACCOUNT_V1_PACKAGE_NAME = exports.Role = exports.protobufPackage = void 0;
9
+ exports.AccountServiceControllerMethods = AccountServiceControllerMethods;
10
+ /* eslint-disable */
11
+ const microservices_1 = require("@nestjs/microservices");
12
+ exports.protobufPackage = "account.v1";
13
+ var Role;
14
+ (function (Role) {
15
+ Role[Role["USER"] = 0] = "USER";
16
+ Role[Role["ADMIN"] = 1] = "ADMIN";
17
+ Role[Role["MANAGER"] = 2] = "MANAGER";
18
+ Role[Role["COPYWRITER"] = 3] = "COPYWRITER";
19
+ Role[Role["SEO"] = 4] = "SEO";
20
+ Role[Role["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
21
+ })(Role || (exports.Role = Role = {}));
22
+ exports.ACCOUNT_V1_PACKAGE_NAME = "account.v1";
23
+ function AccountServiceControllerMethods() {
24
+ return function (constructor) {
25
+ const grpcMethods = [
26
+ "getAccount",
27
+ "initEmailChange",
28
+ "confirmEmailChange",
29
+ "initPhoneChange",
30
+ "confirmPhoneChange",
31
+ ];
32
+ for (const method of grpcMethods) {
33
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
34
+ (0, microservices_1.GrpcMethod)("AccountService", method)(constructor.prototype[method], method, descriptor);
35
+ }
36
+ const grpcStreamMethods = [];
37
+ for (const method of grpcStreamMethods) {
38
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
39
+ (0, microservices_1.GrpcStreamMethod)("AccountService", method)(constructor.prototype[method], method, descriptor);
40
+ }
41
+ };
42
+ }
43
+ exports.ACCOUNT_SERVICE_NAME = "AccountService";
@@ -0,0 +1,194 @@
1
+ import { Observable } from "rxjs";
2
+ import { DeleteResponse, PaginationMeta, PaginationRequest, SuccessResponse } from "./common";
3
+ export declare const protobufPackage = "catalog.v1";
4
+ export interface AttributeGroupResponse {
5
+ id: string;
6
+ name: {
7
+ [key: string]: string;
8
+ };
9
+ sortOrder: number;
10
+ }
11
+ export interface AttributeGroupResponse_NameEntry {
12
+ key: string;
13
+ value: string;
14
+ }
15
+ export interface GetAttributeGroupsRequest {
16
+ pagination: PaginationRequest | undefined;
17
+ }
18
+ export interface GetAttributeGroupsResponse {
19
+ items: AttributeGroupResponse[];
20
+ meta: PaginationMeta | undefined;
21
+ }
22
+ export interface GetAttributeGroupRequest {
23
+ id: string;
24
+ }
25
+ export interface CreateAttributeGroupRequest {
26
+ name: {
27
+ [key: string]: string;
28
+ };
29
+ sortOrder: number;
30
+ }
31
+ export interface CreateAttributeGroupRequest_NameEntry {
32
+ key: string;
33
+ value: string;
34
+ }
35
+ export interface UpdateAttributeGroupRequest {
36
+ id: string;
37
+ name: {
38
+ [key: string]: string;
39
+ };
40
+ sortOrder?: number | undefined;
41
+ }
42
+ export interface UpdateAttributeGroupRequest_NameEntry {
43
+ key: string;
44
+ value: string;
45
+ }
46
+ export interface DeleteAttributeGroupRequest {
47
+ id: string;
48
+ }
49
+ export interface AttributeResponse {
50
+ id: string;
51
+ groupId?: string | undefined;
52
+ slug: string;
53
+ name: {
54
+ [key: string]: string;
55
+ };
56
+ displayType: string;
57
+ sortOrder: number;
58
+ guid1c?: string | undefined;
59
+ }
60
+ export interface AttributeResponse_NameEntry {
61
+ key: string;
62
+ value: string;
63
+ }
64
+ export interface GetAttributesRequest {
65
+ pagination: PaginationRequest | undefined;
66
+ groupId?: string | undefined;
67
+ }
68
+ export interface GetAttributesResponse {
69
+ items: AttributeResponse[];
70
+ meta: PaginationMeta | undefined;
71
+ }
72
+ export interface GetAttributeRequest {
73
+ id: string;
74
+ slug?: string | undefined;
75
+ }
76
+ export interface CreateAttributeRequest {
77
+ groupId?: string | undefined;
78
+ slug: string;
79
+ name: {
80
+ [key: string]: string;
81
+ };
82
+ displayType: string;
83
+ sortOrder: number;
84
+ guid1c?: string | undefined;
85
+ }
86
+ export interface CreateAttributeRequest_NameEntry {
87
+ key: string;
88
+ value: string;
89
+ }
90
+ export interface UpdateAttributeRequest {
91
+ id: string;
92
+ groupId?: string | undefined;
93
+ slug?: string | undefined;
94
+ name: {
95
+ [key: string]: string;
96
+ };
97
+ displayType?: string | undefined;
98
+ sortOrder?: number | undefined;
99
+ }
100
+ export interface UpdateAttributeRequest_NameEntry {
101
+ key: string;
102
+ value: string;
103
+ }
104
+ export interface DeleteAttributeRequest {
105
+ id: string;
106
+ }
107
+ export interface AttributeValueResponse {
108
+ id: string;
109
+ attributeId: string;
110
+ value: {
111
+ [key: string]: string;
112
+ };
113
+ meta?: string | undefined;
114
+ guid1c?: string | undefined;
115
+ }
116
+ export interface AttributeValueResponse_ValueEntry {
117
+ key: string;
118
+ value: string;
119
+ }
120
+ export interface GetAttributeValuesRequest {
121
+ attributeId: string;
122
+ }
123
+ export interface GetAttributeValuesResponse {
124
+ items: AttributeValueResponse[];
125
+ }
126
+ export interface CreateAttributeValueRequest {
127
+ attributeId: string;
128
+ value: {
129
+ [key: string]: string;
130
+ };
131
+ meta?: string | undefined;
132
+ guid1c?: string | undefined;
133
+ }
134
+ export interface CreateAttributeValueRequest_ValueEntry {
135
+ key: string;
136
+ value: string;
137
+ }
138
+ export interface UpdateAttributeValueRequest {
139
+ id: string;
140
+ value: {
141
+ [key: string]: string;
142
+ };
143
+ meta?: string | undefined;
144
+ }
145
+ export interface UpdateAttributeValueRequest_ValueEntry {
146
+ key: string;
147
+ value: string;
148
+ }
149
+ export interface DeleteAttributeValueRequest {
150
+ id: string;
151
+ }
152
+ export interface BindAttributeRequest {
153
+ categoryId: string;
154
+ attributeId: string;
155
+ }
156
+ export declare const CATALOG_V1_PACKAGE_NAME = "catalog.v1";
157
+ export interface AttributeServiceClient {
158
+ getAttributeGroups(request: GetAttributeGroupsRequest): Observable<GetAttributeGroupsResponse>;
159
+ getAttributeGroup(request: GetAttributeGroupRequest): Observable<AttributeGroupResponse>;
160
+ createAttributeGroup(request: CreateAttributeGroupRequest): Observable<AttributeGroupResponse>;
161
+ updateAttributeGroup(request: UpdateAttributeGroupRequest): Observable<AttributeGroupResponse>;
162
+ deleteAttributeGroup(request: DeleteAttributeGroupRequest): Observable<DeleteResponse>;
163
+ getAttributes(request: GetAttributesRequest): Observable<GetAttributesResponse>;
164
+ getAttribute(request: GetAttributeRequest): Observable<AttributeResponse>;
165
+ createAttribute(request: CreateAttributeRequest): Observable<AttributeResponse>;
166
+ updateAttribute(request: UpdateAttributeRequest): Observable<AttributeResponse>;
167
+ deleteAttribute(request: DeleteAttributeRequest): Observable<DeleteResponse>;
168
+ getAttributeValues(request: GetAttributeValuesRequest): Observable<GetAttributeValuesResponse>;
169
+ createAttributeValue(request: CreateAttributeValueRequest): Observable<AttributeValueResponse>;
170
+ updateAttributeValue(request: UpdateAttributeValueRequest): Observable<AttributeValueResponse>;
171
+ deleteAttributeValue(request: DeleteAttributeValueRequest): Observable<DeleteResponse>;
172
+ bindAttributeToCategory(request: BindAttributeRequest): Observable<SuccessResponse>;
173
+ unbindAttributeFromCategory(request: BindAttributeRequest): Observable<SuccessResponse>;
174
+ }
175
+ export interface AttributeServiceController {
176
+ getAttributeGroups(request: GetAttributeGroupsRequest): Promise<GetAttributeGroupsResponse> | Observable<GetAttributeGroupsResponse> | GetAttributeGroupsResponse;
177
+ getAttributeGroup(request: GetAttributeGroupRequest): Promise<AttributeGroupResponse> | Observable<AttributeGroupResponse> | AttributeGroupResponse;
178
+ createAttributeGroup(request: CreateAttributeGroupRequest): Promise<AttributeGroupResponse> | Observable<AttributeGroupResponse> | AttributeGroupResponse;
179
+ updateAttributeGroup(request: UpdateAttributeGroupRequest): Promise<AttributeGroupResponse> | Observable<AttributeGroupResponse> | AttributeGroupResponse;
180
+ deleteAttributeGroup(request: DeleteAttributeGroupRequest): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
181
+ getAttributes(request: GetAttributesRequest): Promise<GetAttributesResponse> | Observable<GetAttributesResponse> | GetAttributesResponse;
182
+ getAttribute(request: GetAttributeRequest): Promise<AttributeResponse> | Observable<AttributeResponse> | AttributeResponse;
183
+ createAttribute(request: CreateAttributeRequest): Promise<AttributeResponse> | Observable<AttributeResponse> | AttributeResponse;
184
+ updateAttribute(request: UpdateAttributeRequest): Promise<AttributeResponse> | Observable<AttributeResponse> | AttributeResponse;
185
+ deleteAttribute(request: DeleteAttributeRequest): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
186
+ getAttributeValues(request: GetAttributeValuesRequest): Promise<GetAttributeValuesResponse> | Observable<GetAttributeValuesResponse> | GetAttributeValuesResponse;
187
+ createAttributeValue(request: CreateAttributeValueRequest): Promise<AttributeValueResponse> | Observable<AttributeValueResponse> | AttributeValueResponse;
188
+ updateAttributeValue(request: UpdateAttributeValueRequest): Promise<AttributeValueResponse> | Observable<AttributeValueResponse> | AttributeValueResponse;
189
+ deleteAttributeValue(request: DeleteAttributeValueRequest): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
190
+ bindAttributeToCategory(request: BindAttributeRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
191
+ unbindAttributeFromCategory(request: BindAttributeRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
192
+ }
193
+ export declare function AttributeServiceControllerMethods(): (constructor: Function) => void;
194
+ export declare const ATTRIBUTE_SERVICE_NAME = "AttributeService";
@@ -0,0 +1,45 @@
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: attribute.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.ATTRIBUTE_SERVICE_NAME = exports.CATALOG_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
9
+ exports.AttributeServiceControllerMethods = AttributeServiceControllerMethods;
10
+ /* eslint-disable */
11
+ const microservices_1 = require("@nestjs/microservices");
12
+ exports.protobufPackage = "catalog.v1";
13
+ exports.CATALOG_V1_PACKAGE_NAME = "catalog.v1";
14
+ function AttributeServiceControllerMethods() {
15
+ return function (constructor) {
16
+ const grpcMethods = [
17
+ "getAttributeGroups",
18
+ "getAttributeGroup",
19
+ "createAttributeGroup",
20
+ "updateAttributeGroup",
21
+ "deleteAttributeGroup",
22
+ "getAttributes",
23
+ "getAttribute",
24
+ "createAttribute",
25
+ "updateAttribute",
26
+ "deleteAttribute",
27
+ "getAttributeValues",
28
+ "createAttributeValue",
29
+ "updateAttributeValue",
30
+ "deleteAttributeValue",
31
+ "bindAttributeToCategory",
32
+ "unbindAttributeFromCategory",
33
+ ];
34
+ for (const method of grpcMethods) {
35
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
36
+ (0, microservices_1.GrpcMethod)("AttributeService", method)(constructor.prototype[method], method, descriptor);
37
+ }
38
+ const grpcStreamMethods = [];
39
+ for (const method of grpcStreamMethods) {
40
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
41
+ (0, microservices_1.GrpcStreamMethod)("AttributeService", method)(constructor.prototype[method], method, descriptor);
42
+ }
43
+ };
44
+ }
45
+ exports.ATTRIBUTE_SERVICE_NAME = "AttributeService";
@@ -0,0 +1,53 @@
1
+ import { Observable } from "rxjs";
2
+ export declare const protobufPackage = "auth.v1";
3
+ export interface SendOtpRequest {
4
+ identifier: string;
5
+ type: string;
6
+ }
7
+ export interface SendOtpResponse {
8
+ ok: boolean;
9
+ }
10
+ export interface VerifyOtpRequest {
11
+ identifier: string;
12
+ type: string;
13
+ code: string;
14
+ }
15
+ export interface LoginRequest {
16
+ identifier: string;
17
+ type: string;
18
+ password: string;
19
+ }
20
+ export interface RegisterRequest {
21
+ firstName: string;
22
+ lastName: string;
23
+ email: string;
24
+ password: string;
25
+ }
26
+ export interface AuthResponse {
27
+ accessToken: string;
28
+ refreshToken: string;
29
+ }
30
+ export interface RefreshRequest {
31
+ refreshToken: string;
32
+ }
33
+ export interface RefreshResponse {
34
+ accessToken: string;
35
+ refreshToken: string;
36
+ }
37
+ export declare const AUTH_V1_PACKAGE_NAME = "auth.v1";
38
+ export interface AuthServiceClient {
39
+ sendOtp(request: SendOtpRequest): Observable<SendOtpResponse>;
40
+ verifyOtp(request: VerifyOtpRequest): Observable<AuthResponse>;
41
+ refresh(request: RefreshRequest): Observable<RefreshResponse>;
42
+ login(request: LoginRequest): Observable<AuthResponse>;
43
+ register(request: RegisterRequest): Observable<AuthResponse>;
44
+ }
45
+ export interface AuthServiceController {
46
+ sendOtp(request: SendOtpRequest): Promise<SendOtpResponse> | Observable<SendOtpResponse> | SendOtpResponse;
47
+ verifyOtp(request: VerifyOtpRequest): Promise<AuthResponse> | Observable<AuthResponse> | AuthResponse;
48
+ refresh(request: RefreshRequest): Promise<RefreshResponse> | Observable<RefreshResponse> | RefreshResponse;
49
+ login(request: LoginRequest): Promise<AuthResponse> | Observable<AuthResponse> | AuthResponse;
50
+ register(request: RegisterRequest): Promise<AuthResponse> | Observable<AuthResponse> | AuthResponse;
51
+ }
52
+ export declare function AuthServiceControllerMethods(): (constructor: Function) => void;
53
+ export declare const AUTH_SERVICE_NAME = "AuthService";
@@ -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: auth.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.AUTH_SERVICE_NAME = exports.AUTH_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
9
+ exports.AuthServiceControllerMethods = AuthServiceControllerMethods;
10
+ /* eslint-disable */
11
+ const microservices_1 = require("@nestjs/microservices");
12
+ exports.protobufPackage = "auth.v1";
13
+ exports.AUTH_V1_PACKAGE_NAME = "auth.v1";
14
+ function AuthServiceControllerMethods() {
15
+ return function (constructor) {
16
+ const grpcMethods = ["sendOtp", "verifyOtp", "refresh", "login", "register"];
17
+ for (const method of grpcMethods) {
18
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
19
+ (0, microservices_1.GrpcMethod)("AuthService", 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)("AuthService", method)(constructor.prototype[method], method, descriptor);
25
+ }
26
+ };
27
+ }
28
+ exports.AUTH_SERVICE_NAME = "AuthService";
@@ -0,0 +1,116 @@
1
+ import { Observable } from "rxjs";
2
+ import { DeleteResponse, PaginationMeta, PaginationRequest } from "./common";
3
+ export declare const protobufPackage = "catalog.v1";
4
+ export interface BrandResponse {
5
+ id: string;
6
+ slug: string;
7
+ name: string;
8
+ image?: string | undefined;
9
+ description: {
10
+ [key: string]: string;
11
+ };
12
+ metaTitle: {
13
+ [key: string]: string;
14
+ };
15
+ metaDescription: {
16
+ [key: string]: string;
17
+ };
18
+ guid1c?: string | undefined;
19
+ }
20
+ export interface BrandResponse_DescriptionEntry {
21
+ key: string;
22
+ value: string;
23
+ }
24
+ export interface BrandResponse_MetaTitleEntry {
25
+ key: string;
26
+ value: string;
27
+ }
28
+ export interface BrandResponse_MetaDescriptionEntry {
29
+ key: string;
30
+ value: string;
31
+ }
32
+ export interface GetBrandsRequest {
33
+ pagination: PaginationRequest | undefined;
34
+ }
35
+ export interface GetBrandsResponse {
36
+ items: BrandResponse[];
37
+ meta: PaginationMeta | undefined;
38
+ }
39
+ export interface GetBrandRequest {
40
+ id: string;
41
+ slug?: string | undefined;
42
+ }
43
+ export interface CreateBrandRequest {
44
+ slug: string;
45
+ name: string;
46
+ image?: string | undefined;
47
+ description: {
48
+ [key: string]: string;
49
+ };
50
+ metaTitle: {
51
+ [key: string]: string;
52
+ };
53
+ metaDescription: {
54
+ [key: string]: string;
55
+ };
56
+ guid1c?: string | undefined;
57
+ }
58
+ export interface CreateBrandRequest_DescriptionEntry {
59
+ key: string;
60
+ value: string;
61
+ }
62
+ export interface CreateBrandRequest_MetaTitleEntry {
63
+ key: string;
64
+ value: string;
65
+ }
66
+ export interface CreateBrandRequest_MetaDescriptionEntry {
67
+ key: string;
68
+ value: string;
69
+ }
70
+ export interface UpdateBrandRequest {
71
+ id: string;
72
+ slug?: string | undefined;
73
+ name?: string | undefined;
74
+ image?: string | undefined;
75
+ description: {
76
+ [key: string]: string;
77
+ };
78
+ metaTitle: {
79
+ [key: string]: string;
80
+ };
81
+ metaDescription: {
82
+ [key: string]: string;
83
+ };
84
+ }
85
+ export interface UpdateBrandRequest_DescriptionEntry {
86
+ key: string;
87
+ value: string;
88
+ }
89
+ export interface UpdateBrandRequest_MetaTitleEntry {
90
+ key: string;
91
+ value: string;
92
+ }
93
+ export interface UpdateBrandRequest_MetaDescriptionEntry {
94
+ key: string;
95
+ value: string;
96
+ }
97
+ export interface DeleteBrandRequest {
98
+ id: string;
99
+ }
100
+ export declare const CATALOG_V1_PACKAGE_NAME = "catalog.v1";
101
+ export interface BrandServiceClient {
102
+ getBrands(request: GetBrandsRequest): Observable<GetBrandsResponse>;
103
+ getBrand(request: GetBrandRequest): Observable<BrandResponse>;
104
+ createBrand(request: CreateBrandRequest): Observable<BrandResponse>;
105
+ updateBrand(request: UpdateBrandRequest): Observable<BrandResponse>;
106
+ deleteBrand(request: DeleteBrandRequest): Observable<DeleteResponse>;
107
+ }
108
+ export interface BrandServiceController {
109
+ getBrands(request: GetBrandsRequest): Promise<GetBrandsResponse> | Observable<GetBrandsResponse> | GetBrandsResponse;
110
+ getBrand(request: GetBrandRequest): Promise<BrandResponse> | Observable<BrandResponse> | BrandResponse;
111
+ createBrand(request: CreateBrandRequest): Promise<BrandResponse> | Observable<BrandResponse> | BrandResponse;
112
+ updateBrand(request: UpdateBrandRequest): Promise<BrandResponse> | Observable<BrandResponse> | BrandResponse;
113
+ deleteBrand(request: DeleteBrandRequest): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
114
+ }
115
+ export declare function BrandServiceControllerMethods(): (constructor: Function) => void;
116
+ export declare const BRAND_SERVICE_NAME = "BrandService";
@@ -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: brand.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.BRAND_SERVICE_NAME = exports.CATALOG_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
9
+ exports.BrandServiceControllerMethods = BrandServiceControllerMethods;
10
+ /* eslint-disable */
11
+ const microservices_1 = require("@nestjs/microservices");
12
+ exports.protobufPackage = "catalog.v1";
13
+ exports.CATALOG_V1_PACKAGE_NAME = "catalog.v1";
14
+ function BrandServiceControllerMethods() {
15
+ return function (constructor) {
16
+ const grpcMethods = ["getBrands", "getBrand", "createBrand", "updateBrand", "deleteBrand"];
17
+ for (const method of grpcMethods) {
18
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
19
+ (0, microservices_1.GrpcMethod)("BrandService", 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)("BrandService", method)(constructor.prototype[method], method, descriptor);
25
+ }
26
+ };
27
+ }
28
+ exports.BRAND_SERVICE_NAME = "BrandService";
@@ -0,0 +1,202 @@
1
+ import { Observable } from "rxjs";
2
+ import { DeleteResponse, SuccessResponse } from "./common";
3
+ export declare const protobufPackage = "catalog.v1";
4
+ export interface GetCategoryTreeRequest {
5
+ lang: string;
6
+ }
7
+ export interface CategoryTreeNode {
8
+ id: string;
9
+ parentId: string;
10
+ slug: string;
11
+ name: string;
12
+ image: string;
13
+ children: CategoryTreeNode[];
14
+ }
15
+ export interface GetCategoryTreeResponse {
16
+ items: CategoryTreeNode[];
17
+ }
18
+ export interface CategoryResponse {
19
+ id: string;
20
+ parentId?: string | undefined;
21
+ slug: string;
22
+ image?: string | undefined;
23
+ status: boolean;
24
+ sortOrder: number;
25
+ name: {
26
+ [key: string]: string;
27
+ };
28
+ description: {
29
+ [key: string]: string;
30
+ };
31
+ metaTitle: {
32
+ [key: string]: string;
33
+ };
34
+ metaDescription: {
35
+ [key: string]: string;
36
+ };
37
+ metaKeywords: {
38
+ [key: string]: string;
39
+ };
40
+ metaH1: {
41
+ [key: string]: string;
42
+ };
43
+ guid1c?: string | undefined;
44
+ }
45
+ export interface CategoryResponse_NameEntry {
46
+ key: string;
47
+ value: string;
48
+ }
49
+ export interface CategoryResponse_DescriptionEntry {
50
+ key: string;
51
+ value: string;
52
+ }
53
+ export interface CategoryResponse_MetaTitleEntry {
54
+ key: string;
55
+ value: string;
56
+ }
57
+ export interface CategoryResponse_MetaDescriptionEntry {
58
+ key: string;
59
+ value: string;
60
+ }
61
+ export interface CategoryResponse_MetaKeywordsEntry {
62
+ key: string;
63
+ value: string;
64
+ }
65
+ export interface CategoryResponse_MetaH1Entry {
66
+ key: string;
67
+ value: string;
68
+ }
69
+ export interface GetCategoryRequest {
70
+ id: string;
71
+ slug?: string | undefined;
72
+ }
73
+ export interface CreateCategoryRequest {
74
+ parentId?: string | undefined;
75
+ slug: string;
76
+ image?: string | undefined;
77
+ status: boolean;
78
+ sortOrder: number;
79
+ name: {
80
+ [key: string]: string;
81
+ };
82
+ description: {
83
+ [key: string]: string;
84
+ };
85
+ metaTitle: {
86
+ [key: string]: string;
87
+ };
88
+ metaDescription: {
89
+ [key: string]: string;
90
+ };
91
+ metaKeywords: {
92
+ [key: string]: string;
93
+ };
94
+ metaH1: {
95
+ [key: string]: string;
96
+ };
97
+ guid1c?: string | undefined;
98
+ }
99
+ export interface CreateCategoryRequest_NameEntry {
100
+ key: string;
101
+ value: string;
102
+ }
103
+ export interface CreateCategoryRequest_DescriptionEntry {
104
+ key: string;
105
+ value: string;
106
+ }
107
+ export interface CreateCategoryRequest_MetaTitleEntry {
108
+ key: string;
109
+ value: string;
110
+ }
111
+ export interface CreateCategoryRequest_MetaDescriptionEntry {
112
+ key: string;
113
+ value: string;
114
+ }
115
+ export interface CreateCategoryRequest_MetaKeywordsEntry {
116
+ key: string;
117
+ value: string;
118
+ }
119
+ export interface CreateCategoryRequest_MetaH1Entry {
120
+ key: string;
121
+ value: string;
122
+ }
123
+ export interface UpdateCategoryRequest {
124
+ id: string;
125
+ parentId?: string | undefined;
126
+ slug?: string | undefined;
127
+ image?: string | undefined;
128
+ status?: boolean | undefined;
129
+ sortOrder?: number | undefined;
130
+ name: {
131
+ [key: string]: string;
132
+ };
133
+ description: {
134
+ [key: string]: string;
135
+ };
136
+ metaTitle: {
137
+ [key: string]: string;
138
+ };
139
+ metaDescription: {
140
+ [key: string]: string;
141
+ };
142
+ metaKeywords: {
143
+ [key: string]: string;
144
+ };
145
+ metaH1: {
146
+ [key: string]: string;
147
+ };
148
+ }
149
+ export interface UpdateCategoryRequest_NameEntry {
150
+ key: string;
151
+ value: string;
152
+ }
153
+ export interface UpdateCategoryRequest_DescriptionEntry {
154
+ key: string;
155
+ value: string;
156
+ }
157
+ export interface UpdateCategoryRequest_MetaTitleEntry {
158
+ key: string;
159
+ value: string;
160
+ }
161
+ export interface UpdateCategoryRequest_MetaDescriptionEntry {
162
+ key: string;
163
+ value: string;
164
+ }
165
+ export interface UpdateCategoryRequest_MetaKeywordsEntry {
166
+ key: string;
167
+ value: string;
168
+ }
169
+ export interface UpdateCategoryRequest_MetaH1Entry {
170
+ key: string;
171
+ value: string;
172
+ }
173
+ export interface DeleteCategoryRequest {
174
+ id: string;
175
+ }
176
+ export interface CategoryOrderItem {
177
+ id: string;
178
+ sortOrder: number;
179
+ parentId?: string | undefined;
180
+ }
181
+ export interface UpdateCategoryOrderRequest {
182
+ items: CategoryOrderItem[];
183
+ }
184
+ export declare const CATALOG_V1_PACKAGE_NAME = "catalog.v1";
185
+ export interface CategoryServiceClient {
186
+ getCategoryTree(request: GetCategoryTreeRequest): Observable<GetCategoryTreeResponse>;
187
+ getCategory(request: GetCategoryRequest): Observable<CategoryResponse>;
188
+ createCategory(request: CreateCategoryRequest): Observable<CategoryResponse>;
189
+ updateCategory(request: UpdateCategoryRequest): Observable<CategoryResponse>;
190
+ deleteCategory(request: DeleteCategoryRequest): Observable<DeleteResponse>;
191
+ updateCategoryOrder(request: UpdateCategoryOrderRequest): Observable<SuccessResponse>;
192
+ }
193
+ export interface CategoryServiceController {
194
+ getCategoryTree(request: GetCategoryTreeRequest): Promise<GetCategoryTreeResponse> | Observable<GetCategoryTreeResponse> | GetCategoryTreeResponse;
195
+ getCategory(request: GetCategoryRequest): Promise<CategoryResponse> | Observable<CategoryResponse> | CategoryResponse;
196
+ createCategory(request: CreateCategoryRequest): Promise<CategoryResponse> | Observable<CategoryResponse> | CategoryResponse;
197
+ updateCategory(request: UpdateCategoryRequest): Promise<CategoryResponse> | Observable<CategoryResponse> | CategoryResponse;
198
+ deleteCategory(request: DeleteCategoryRequest): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
199
+ updateCategoryOrder(request: UpdateCategoryOrderRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
200
+ }
201
+ export declare function CategoryServiceControllerMethods(): (constructor: Function) => void;
202
+ export declare const CATEGORY_SERVICE_NAME = "CategoryService";
@@ -0,0 +1,35 @@
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: category.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.CATEGORY_SERVICE_NAME = exports.CATALOG_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
9
+ exports.CategoryServiceControllerMethods = CategoryServiceControllerMethods;
10
+ /* eslint-disable */
11
+ const microservices_1 = require("@nestjs/microservices");
12
+ exports.protobufPackage = "catalog.v1";
13
+ exports.CATALOG_V1_PACKAGE_NAME = "catalog.v1";
14
+ function CategoryServiceControllerMethods() {
15
+ return function (constructor) {
16
+ const grpcMethods = [
17
+ "getCategoryTree",
18
+ "getCategory",
19
+ "createCategory",
20
+ "updateCategory",
21
+ "deleteCategory",
22
+ "updateCategoryOrder",
23
+ ];
24
+ for (const method of grpcMethods) {
25
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
26
+ (0, microservices_1.GrpcMethod)("CategoryService", method)(constructor.prototype[method], method, descriptor);
27
+ }
28
+ const grpcStreamMethods = [];
29
+ for (const method of grpcStreamMethods) {
30
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
31
+ (0, microservices_1.GrpcStreamMethod)("CategoryService", method)(constructor.prototype[method], method, descriptor);
32
+ }
33
+ };
34
+ }
35
+ exports.CATEGORY_SERVICE_NAME = "CategoryService";
@@ -0,0 +1,18 @@
1
+ export declare const protobufPackage = "catalog.v1";
2
+ export interface SuccessResponse {
3
+ success: boolean;
4
+ }
5
+ export interface DeleteResponse {
6
+ success: boolean;
7
+ }
8
+ export interface PaginationRequest {
9
+ page: number;
10
+ limit: number;
11
+ }
12
+ export interface PaginationMeta {
13
+ totalItems: number;
14
+ totalPages: number;
15
+ currentPage: number;
16
+ perPage: number;
17
+ }
18
+ export declare const CATALOG_V1_PACKAGE_NAME = "catalog.v1";
@@ -0,0 +1,11 @@
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: common.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.CATALOG_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
9
+ /* eslint-disable */
10
+ exports.protobufPackage = "catalog.v1";
11
+ exports.CATALOG_V1_PACKAGE_NAME = "catalog.v1";
@@ -0,0 +1,301 @@
1
+ import { Observable } from "rxjs";
2
+ import { DeleteResponse, PaginationMeta, PaginationRequest, SuccessResponse } from "./common";
3
+ export declare const protobufPackage = "catalog.v1";
4
+ export declare enum ProductStatus {
5
+ PRODUCT_STATUS_UNSPECIFIED = 0,
6
+ PRODUCT_STATUS_DRAFT = 1,
7
+ PRODUCT_STATUS_ACTIVE = 2,
8
+ PRODUCT_STATUS_INACTIVE = 3,
9
+ PRODUCT_STATUS_ARCHIVED = 4,
10
+ UNRECOGNIZED = -1
11
+ }
12
+ export interface ProductListItemResponse {
13
+ id: string;
14
+ sku: string;
15
+ slug: string;
16
+ status: ProductStatus;
17
+ name: {
18
+ [key: string]: string;
19
+ };
20
+ mainImage: string;
21
+ price: number;
22
+ oldPrice?: number | undefined;
23
+ totalStock: number;
24
+ brandId?: string | undefined;
25
+ categoryIds: string[];
26
+ }
27
+ export interface ProductListItemResponse_NameEntry {
28
+ key: string;
29
+ value: string;
30
+ }
31
+ export interface ProductDetailResponse {
32
+ id: string;
33
+ sku: string;
34
+ slug: string;
35
+ status: ProductStatus;
36
+ sortOrder: number;
37
+ brandId?: string | undefined;
38
+ price: number;
39
+ oldPrice?: number | undefined;
40
+ name: {
41
+ [key: string]: string;
42
+ };
43
+ shortDescription: {
44
+ [key: string]: string;
45
+ };
46
+ description: {
47
+ [key: string]: string;
48
+ };
49
+ composition: {
50
+ [key: string]: string;
51
+ };
52
+ instructions: {
53
+ [key: string]: string;
54
+ };
55
+ metaTitle: {
56
+ [key: string]: string;
57
+ };
58
+ metaDescription: {
59
+ [key: string]: string;
60
+ };
61
+ metaKeywords: {
62
+ [key: string]: string;
63
+ };
64
+ mainImage: string;
65
+ videoUrl?: string | undefined;
66
+ guid1c?: string | undefined;
67
+ categoryIds: string[];
68
+ images: ProductImageResponse[];
69
+ warehouses: ProductWarehouseResponse[];
70
+ variants: ProductVariantResponse[];
71
+ attributes: ProductAttributeResponse[];
72
+ files: ProductFileResponse[];
73
+ }
74
+ export interface ProductDetailResponse_NameEntry {
75
+ key: string;
76
+ value: string;
77
+ }
78
+ export interface ProductDetailResponse_ShortDescriptionEntry {
79
+ key: string;
80
+ value: string;
81
+ }
82
+ export interface ProductDetailResponse_DescriptionEntry {
83
+ key: string;
84
+ value: string;
85
+ }
86
+ export interface ProductDetailResponse_CompositionEntry {
87
+ key: string;
88
+ value: string;
89
+ }
90
+ export interface ProductDetailResponse_InstructionsEntry {
91
+ key: string;
92
+ value: string;
93
+ }
94
+ export interface ProductDetailResponse_MetaTitleEntry {
95
+ key: string;
96
+ value: string;
97
+ }
98
+ export interface ProductDetailResponse_MetaDescriptionEntry {
99
+ key: string;
100
+ value: string;
101
+ }
102
+ export interface ProductDetailResponse_MetaKeywordsEntry {
103
+ key: string;
104
+ value: string;
105
+ }
106
+ export interface ProductImageResponse {
107
+ id: string;
108
+ url: string;
109
+ alt: {
110
+ [key: string]: string;
111
+ };
112
+ sortOrder: number;
113
+ }
114
+ export interface ProductImageResponse_AltEntry {
115
+ key: string;
116
+ value: string;
117
+ }
118
+ export interface ProductWarehouseResponse {
119
+ warehouseId: string;
120
+ quantity: number;
121
+ }
122
+ export interface ProductVariantResponse {
123
+ id: string;
124
+ sku: string;
125
+ price?: number | undefined;
126
+ stock: number;
127
+ options: {
128
+ [key: string]: string;
129
+ };
130
+ }
131
+ export interface ProductVariantResponse_OptionsEntry {
132
+ key: string;
133
+ value: string;
134
+ }
135
+ export interface ProductAttributeResponse {
136
+ attributeId: string;
137
+ attributeValueId: string;
138
+ }
139
+ export interface ProductFileResponse {
140
+ id: string;
141
+ url: string;
142
+ name: {
143
+ [key: string]: string;
144
+ };
145
+ }
146
+ export interface ProductFileResponse_NameEntry {
147
+ key: string;
148
+ value: string;
149
+ }
150
+ export interface GetProductsRequest {
151
+ pagination: PaginationRequest | undefined;
152
+ search?: string | undefined;
153
+ categoryId?: string | undefined;
154
+ brandId?: string | undefined;
155
+ status?: ProductStatus | undefined;
156
+ inStock?: boolean | undefined;
157
+ priceMin?: number | undefined;
158
+ priceMax?: number | undefined;
159
+ sortBy?: string | undefined;
160
+ }
161
+ export interface GetProductsResponse {
162
+ items: ProductListItemResponse[];
163
+ meta: PaginationMeta | undefined;
164
+ }
165
+ export interface GetProductRequest {
166
+ id: string;
167
+ slug?: string | undefined;
168
+ sku?: string | undefined;
169
+ }
170
+ export interface CreateProductRequest {
171
+ sku: string;
172
+ slug: string;
173
+ status: ProductStatus;
174
+ brandId?: string | undefined;
175
+ price: number;
176
+ oldPrice?: number | undefined;
177
+ name: {
178
+ [key: string]: string;
179
+ };
180
+ shortDescription: {
181
+ [key: string]: string;
182
+ };
183
+ description: {
184
+ [key: string]: string;
185
+ };
186
+ metaTitle: {
187
+ [key: string]: string;
188
+ };
189
+ metaDescription: {
190
+ [key: string]: string;
191
+ };
192
+ mainImage?: string | undefined;
193
+ guid1c?: string | undefined;
194
+ categoryIds: string[];
195
+ createdById: string;
196
+ }
197
+ export interface CreateProductRequest_NameEntry {
198
+ key: string;
199
+ value: string;
200
+ }
201
+ export interface CreateProductRequest_ShortDescriptionEntry {
202
+ key: string;
203
+ value: string;
204
+ }
205
+ export interface CreateProductRequest_DescriptionEntry {
206
+ key: string;
207
+ value: string;
208
+ }
209
+ export interface CreateProductRequest_MetaTitleEntry {
210
+ key: string;
211
+ value: string;
212
+ }
213
+ export interface CreateProductRequest_MetaDescriptionEntry {
214
+ key: string;
215
+ value: string;
216
+ }
217
+ export interface UpdateProductRequest {
218
+ id: string;
219
+ sku?: string | undefined;
220
+ slug?: string | undefined;
221
+ status?: ProductStatus | undefined;
222
+ brandId?: string | undefined;
223
+ price?: number | undefined;
224
+ oldPrice?: number | undefined;
225
+ name: {
226
+ [key: string]: string;
227
+ };
228
+ description: {
229
+ [key: string]: string;
230
+ };
231
+ shortDescription: {
232
+ [key: string]: string;
233
+ };
234
+ metaTitle: {
235
+ [key: string]: string;
236
+ };
237
+ metaDescription: {
238
+ [key: string]: string;
239
+ };
240
+ mainImage?: string | undefined;
241
+ categoryIds: string[];
242
+ }
243
+ export interface UpdateProductRequest_NameEntry {
244
+ key: string;
245
+ value: string;
246
+ }
247
+ export interface UpdateProductRequest_DescriptionEntry {
248
+ key: string;
249
+ value: string;
250
+ }
251
+ export interface UpdateProductRequest_ShortDescriptionEntry {
252
+ key: string;
253
+ value: string;
254
+ }
255
+ export interface UpdateProductRequest_MetaTitleEntry {
256
+ key: string;
257
+ value: string;
258
+ }
259
+ export interface UpdateProductRequest_MetaDescriptionEntry {
260
+ key: string;
261
+ value: string;
262
+ }
263
+ export interface DeleteProductRequest {
264
+ id: string;
265
+ }
266
+ export interface BulkUpdateStatusRequest {
267
+ productIds: string[];
268
+ status: ProductStatus;
269
+ }
270
+ export interface BulkUpdateCategoryRequest {
271
+ productIds: string[];
272
+ categoryId: string;
273
+ append: boolean;
274
+ }
275
+ export interface BulkUpdateDiscountRequest {
276
+ productIds: string[];
277
+ discountPercentage: number;
278
+ }
279
+ export declare const CATALOG_V1_PACKAGE_NAME = "catalog.v1";
280
+ export interface ProductServiceClient {
281
+ getProducts(request: GetProductsRequest): Observable<GetProductsResponse>;
282
+ getProduct(request: GetProductRequest): Observable<ProductDetailResponse>;
283
+ createProduct(request: CreateProductRequest): Observable<ProductDetailResponse>;
284
+ updateProduct(request: UpdateProductRequest): Observable<ProductDetailResponse>;
285
+ deleteProduct(request: DeleteProductRequest): Observable<DeleteResponse>;
286
+ bulkUpdateStatus(request: BulkUpdateStatusRequest): Observable<SuccessResponse>;
287
+ bulkUpdateCategory(request: BulkUpdateCategoryRequest): Observable<SuccessResponse>;
288
+ bulkUpdateDiscount(request: BulkUpdateDiscountRequest): Observable<SuccessResponse>;
289
+ }
290
+ export interface ProductServiceController {
291
+ getProducts(request: GetProductsRequest): Promise<GetProductsResponse> | Observable<GetProductsResponse> | GetProductsResponse;
292
+ getProduct(request: GetProductRequest): Promise<ProductDetailResponse> | Observable<ProductDetailResponse> | ProductDetailResponse;
293
+ createProduct(request: CreateProductRequest): Promise<ProductDetailResponse> | Observable<ProductDetailResponse> | ProductDetailResponse;
294
+ updateProduct(request: UpdateProductRequest): Promise<ProductDetailResponse> | Observable<ProductDetailResponse> | ProductDetailResponse;
295
+ deleteProduct(request: DeleteProductRequest): Promise<DeleteResponse> | Observable<DeleteResponse> | DeleteResponse;
296
+ bulkUpdateStatus(request: BulkUpdateStatusRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
297
+ bulkUpdateCategory(request: BulkUpdateCategoryRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
298
+ bulkUpdateDiscount(request: BulkUpdateDiscountRequest): Promise<SuccessResponse> | Observable<SuccessResponse> | SuccessResponse;
299
+ }
300
+ export declare function ProductServiceControllerMethods(): (constructor: Function) => void;
301
+ export declare const PRODUCT_SERVICE_NAME = "ProductService";
@@ -0,0 +1,46 @@
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: product.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.PRODUCT_SERVICE_NAME = exports.CATALOG_V1_PACKAGE_NAME = exports.ProductStatus = exports.protobufPackage = void 0;
9
+ exports.ProductServiceControllerMethods = ProductServiceControllerMethods;
10
+ /* eslint-disable */
11
+ const microservices_1 = require("@nestjs/microservices");
12
+ exports.protobufPackage = "catalog.v1";
13
+ var ProductStatus;
14
+ (function (ProductStatus) {
15
+ ProductStatus[ProductStatus["PRODUCT_STATUS_UNSPECIFIED"] = 0] = "PRODUCT_STATUS_UNSPECIFIED";
16
+ ProductStatus[ProductStatus["PRODUCT_STATUS_DRAFT"] = 1] = "PRODUCT_STATUS_DRAFT";
17
+ ProductStatus[ProductStatus["PRODUCT_STATUS_ACTIVE"] = 2] = "PRODUCT_STATUS_ACTIVE";
18
+ ProductStatus[ProductStatus["PRODUCT_STATUS_INACTIVE"] = 3] = "PRODUCT_STATUS_INACTIVE";
19
+ ProductStatus[ProductStatus["PRODUCT_STATUS_ARCHIVED"] = 4] = "PRODUCT_STATUS_ARCHIVED";
20
+ ProductStatus[ProductStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
21
+ })(ProductStatus || (exports.ProductStatus = ProductStatus = {}));
22
+ exports.CATALOG_V1_PACKAGE_NAME = "catalog.v1";
23
+ function ProductServiceControllerMethods() {
24
+ return function (constructor) {
25
+ const grpcMethods = [
26
+ "getProducts",
27
+ "getProduct",
28
+ "createProduct",
29
+ "updateProduct",
30
+ "deleteProduct",
31
+ "bulkUpdateStatus",
32
+ "bulkUpdateCategory",
33
+ "bulkUpdateDiscount",
34
+ ];
35
+ for (const method of grpcMethods) {
36
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
37
+ (0, microservices_1.GrpcMethod)("ProductService", method)(constructor.prototype[method], method, descriptor);
38
+ }
39
+ const grpcStreamMethods = [];
40
+ for (const method of grpcStreamMethods) {
41
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
42
+ (0, microservices_1.GrpcStreamMethod)("ProductService", method)(constructor.prototype[method], method, descriptor);
43
+ }
44
+ };
45
+ }
46
+ exports.PRODUCT_SERVICE_NAME = "ProductService";
@@ -0,0 +1,47 @@
1
+ import { Observable } from "rxjs";
2
+ export declare const protobufPackage = "users.v1";
3
+ export interface GetMeRequest {
4
+ id: string;
5
+ }
6
+ export interface GetMeResponse {
7
+ user: User | undefined;
8
+ }
9
+ export interface CreateUserRequest {
10
+ id: string;
11
+ firstName?: string | undefined;
12
+ lastName?: string | undefined;
13
+ email?: string | undefined;
14
+ phone?: string | undefined;
15
+ }
16
+ export interface CreateUserResponse {
17
+ ok: boolean;
18
+ }
19
+ export interface UpdateUserRequest {
20
+ id: string;
21
+ firstName?: string | undefined;
22
+ lastName?: string | undefined;
23
+ }
24
+ export interface UpdateUserResponse {
25
+ user: User | undefined;
26
+ }
27
+ export interface User {
28
+ id: string;
29
+ firstName: string;
30
+ lastName: string;
31
+ bonuses: number;
32
+ email?: string | undefined;
33
+ phone?: string | undefined;
34
+ }
35
+ export declare const USERS_V1_PACKAGE_NAME = "users.v1";
36
+ export interface UsersServiceClient {
37
+ getMe(request: GetMeRequest): Observable<GetMeResponse>;
38
+ createUser(request: CreateUserRequest): Observable<CreateUserResponse>;
39
+ updateUser(request: UpdateUserRequest): Observable<UpdateUserResponse>;
40
+ }
41
+ export interface UsersServiceController {
42
+ getMe(request: GetMeRequest): Promise<GetMeResponse> | Observable<GetMeResponse> | GetMeResponse;
43
+ createUser(request: CreateUserRequest): Promise<CreateUserResponse> | Observable<CreateUserResponse> | CreateUserResponse;
44
+ updateUser(request: UpdateUserRequest): Promise<UpdateUserResponse> | Observable<UpdateUserResponse> | UpdateUserResponse;
45
+ }
46
+ export declare function UsersServiceControllerMethods(): (constructor: Function) => void;
47
+ export declare const USERS_SERVICE_NAME = "UsersService";
@@ -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: users.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.USERS_SERVICE_NAME = exports.USERS_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
9
+ exports.UsersServiceControllerMethods = UsersServiceControllerMethods;
10
+ /* eslint-disable */
11
+ const microservices_1 = require("@nestjs/microservices");
12
+ exports.protobufPackage = "users.v1";
13
+ exports.USERS_V1_PACKAGE_NAME = "users.v1";
14
+ function UsersServiceControllerMethods() {
15
+ return function (constructor) {
16
+ const grpcMethods = ["getMe", "createUser", "updateUser"];
17
+ for (const method of grpcMethods) {
18
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
19
+ (0, microservices_1.GrpcMethod)("UsersService", 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)("UsersService", method)(constructor.prototype[method], method, descriptor);
25
+ }
26
+ };
27
+ }
28
+ exports.USERS_SERVICE_NAME = "UsersService";
package/package.json CHANGED
@@ -1,9 +1,13 @@
1
1
  {
2
2
  "name": "@mamindom/contracts",
3
- "version": "1.0.28",
4
3
  "description": "proto",
4
+ "version": "1.0.29",
5
5
  "main": "./dist/index.js",
6
- "type": "./dist/index.d.ts",
6
+ "types": "./dist/index.d.ts",
7
+ "exports": {
8
+ ".": "./dist/index.js",
9
+ "./gen/*": "./dist/gen/*.js"
10
+ },
7
11
  "scripts": {
8
12
  "build": "tsc -p tsconfig.build.json",
9
13
  "generate": "mkdir -p gen && protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
@@ -3,6 +3,7 @@ syntax = "proto3";
3
3
  package catalog.v1;
4
4
 
5
5
 
6
+
6
7
  import "common.proto";
7
8
 
8
9
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes