@prodoctors/contracts 1.0.3 → 1.0.4
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/proto/paths.d.ts +5 -0
- package/dist/proto/paths.js +5 -0
- package/gen/account.ts +79 -17
- package/gen/auth.ts +3 -1
- package/gen/branch.ts +43 -57
- package/gen/catalog.ts +302 -0
- package/gen/common.ts +1 -1
- package/gen/google/protobuf/timestamp.ts +11 -10
- package/gen/inventory.ts +312 -137
- package/gen/partner.ts +194 -0
- package/gen/purchase.ts +156 -0
- package/gen/sales.ts +427 -0
- package/package.json +27 -27
- package/proto/account.proto +60 -14
- package/proto/auth.proto +5 -3
- package/proto/branch.proto +44 -44
- package/proto/catalog.proto +124 -0
- package/proto/inventory.proto +226 -94
- package/proto/partner.proto +103 -0
- package/proto/purchase.proto +105 -0
- package/proto/sales.proto +292 -0
package/dist/proto/paths.d.ts
CHANGED
package/dist/proto/paths.js
CHANGED
|
@@ -6,4 +6,9 @@ exports.PROTO_PATHS = {
|
|
|
6
6
|
AUTH: (0, path_1.join)(__dirname, "../../proto/auth.proto"),
|
|
7
7
|
ACCOUNT: (0, path_1.join)(__dirname, "../../proto/account.proto"),
|
|
8
8
|
BRANCH: (0, path_1.join)(__dirname, "../../proto/branch.proto"),
|
|
9
|
+
CATALOG: (0, path_1.join)(__dirname, "../../proto/catalog.proto"),
|
|
10
|
+
INVENTORY: (0, path_1.join)(__dirname, "../../proto/inventory.proto"),
|
|
11
|
+
PARTNER: (0, path_1.join)(__dirname, "../../proto/partner.proto"),
|
|
12
|
+
PURCHASE: (0, path_1.join)(__dirname, "../../proto/purchase.proto"),
|
|
13
|
+
SALES: (0, path_1.join)(__dirname, "../../proto/sales.proto"),
|
|
9
14
|
};
|
package/gen/account.ts
CHANGED
|
@@ -1,50 +1,112 @@
|
|
|
1
1
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
2
|
// versions:
|
|
3
3
|
// protoc-gen-ts_proto v2.11.5
|
|
4
|
-
// protoc
|
|
4
|
+
// protoc v7.34.0
|
|
5
5
|
// source: account.proto
|
|
6
6
|
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
9
9
|
import { Observable } from "rxjs";
|
|
10
|
+
import { BoolResponse, IdRequest, PaginationMeta, PaginationRequest } from "./common";
|
|
11
|
+
import { Timestamp } from "./google/protobuf/timestamp";
|
|
10
12
|
|
|
11
13
|
export const protobufPackage = "account.v1";
|
|
12
14
|
|
|
13
|
-
export interface
|
|
15
|
+
export interface Account {
|
|
14
16
|
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
username: string;
|
|
19
|
+
phone?: string | undefined;
|
|
20
|
+
email?: string | undefined;
|
|
21
|
+
isPhoneVerified: boolean;
|
|
22
|
+
isEmailVerified: boolean;
|
|
23
|
+
isActive: boolean;
|
|
24
|
+
role: string;
|
|
25
|
+
branchId?: string | undefined;
|
|
26
|
+
createdAt: Timestamp | undefined;
|
|
27
|
+
updatedAt: Timestamp | undefined;
|
|
15
28
|
}
|
|
16
29
|
|
|
17
|
-
export interface
|
|
18
|
-
id: string;
|
|
30
|
+
export interface CreateAccountRequest {
|
|
19
31
|
name: string;
|
|
20
32
|
username: string;
|
|
21
|
-
|
|
22
|
-
|
|
33
|
+
password: string;
|
|
34
|
+
phone?: string | undefined;
|
|
35
|
+
email?: string | undefined;
|
|
36
|
+
role?: string | undefined;
|
|
37
|
+
branchId?: string | undefined;
|
|
38
|
+
isActive?: boolean | undefined;
|
|
23
39
|
}
|
|
24
40
|
|
|
25
|
-
export
|
|
41
|
+
export interface UpdateAccountRequest {
|
|
42
|
+
id: string;
|
|
43
|
+
name?: string | undefined;
|
|
44
|
+
username?: string | undefined;
|
|
45
|
+
password?: string | undefined;
|
|
46
|
+
phone?: string | undefined;
|
|
47
|
+
email?: string | undefined;
|
|
48
|
+
role?: string | undefined;
|
|
49
|
+
branchId?: string | undefined;
|
|
50
|
+
isActive?: boolean | undefined;
|
|
51
|
+
isPhoneVerified?: boolean | undefined;
|
|
52
|
+
isEmailVerified?: boolean | undefined;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface ListAccountsRequest {
|
|
56
|
+
pagination: PaginationRequest | undefined;
|
|
57
|
+
branchId?: string | undefined;
|
|
58
|
+
role?: string | undefined;
|
|
59
|
+
isActive?: boolean | undefined;
|
|
60
|
+
search?: string | undefined;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface ListAccountsResponse {
|
|
64
|
+
items: Account[];
|
|
65
|
+
meta: PaginationMeta | undefined;
|
|
66
|
+
}
|
|
26
67
|
|
|
27
|
-
|
|
68
|
+
export const ACCOUNT_V1_PACKAGE_NAME = "account.v1";
|
|
28
69
|
|
|
29
70
|
export interface AccountServiceClient {
|
|
30
|
-
|
|
71
|
+
createAccount(request: CreateAccountRequest): Observable<Account>;
|
|
31
72
|
|
|
32
|
-
|
|
33
|
-
}
|
|
73
|
+
updateAccount(request: UpdateAccountRequest): Observable<Account>;
|
|
34
74
|
|
|
35
|
-
|
|
75
|
+
getAccount(request: IdRequest): Observable<Account>;
|
|
76
|
+
|
|
77
|
+
getProfile(request: IdRequest): Observable<Account>;
|
|
78
|
+
|
|
79
|
+
listAccounts(request: ListAccountsRequest): Observable<ListAccountsResponse>;
|
|
80
|
+
|
|
81
|
+
deleteAccount(request: IdRequest): Observable<BoolResponse>;
|
|
82
|
+
}
|
|
36
83
|
|
|
37
84
|
export interface AccountServiceController {
|
|
38
|
-
|
|
85
|
+
createAccount(request: CreateAccountRequest): Promise<Account> | Observable<Account> | Account;
|
|
86
|
+
|
|
87
|
+
updateAccount(request: UpdateAccountRequest): Promise<Account> | Observable<Account> | Account;
|
|
88
|
+
|
|
89
|
+
getAccount(request: IdRequest): Promise<Account> | Observable<Account> | Account;
|
|
90
|
+
|
|
91
|
+
getProfile(request: IdRequest): Promise<Account> | Observable<Account> | Account;
|
|
92
|
+
|
|
93
|
+
listAccounts(
|
|
94
|
+
request: ListAccountsRequest,
|
|
95
|
+
): Promise<ListAccountsResponse> | Observable<ListAccountsResponse> | ListAccountsResponse;
|
|
39
96
|
|
|
40
|
-
|
|
41
|
-
request: GetAccountRequest,
|
|
42
|
-
): Promise<GetAccountResponse> | Observable<GetAccountResponse> | GetAccountResponse;
|
|
97
|
+
deleteAccount(request: IdRequest): Promise<BoolResponse> | Observable<BoolResponse> | BoolResponse;
|
|
43
98
|
}
|
|
44
99
|
|
|
45
100
|
export function AccountServiceControllerMethods() {
|
|
46
101
|
return function (constructor: Function) {
|
|
47
|
-
const grpcMethods: string[] = [
|
|
102
|
+
const grpcMethods: string[] = [
|
|
103
|
+
"createAccount",
|
|
104
|
+
"updateAccount",
|
|
105
|
+
"getAccount",
|
|
106
|
+
"getProfile",
|
|
107
|
+
"listAccounts",
|
|
108
|
+
"deleteAccount",
|
|
109
|
+
];
|
|
48
110
|
for (const method of grpcMethods) {
|
|
49
111
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
50
112
|
GrpcMethod("AccountService", method)(constructor.prototype[method], method, descriptor);
|
package/gen/auth.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
2
|
// versions:
|
|
3
3
|
// protoc-gen-ts_proto v2.11.5
|
|
4
|
-
// protoc
|
|
4
|
+
// protoc v7.34.0
|
|
5
5
|
// source: auth.proto
|
|
6
6
|
|
|
7
7
|
/* eslint-disable */
|
|
@@ -24,6 +24,8 @@ export interface RegisterRequest {
|
|
|
24
24
|
name: string;
|
|
25
25
|
username: string;
|
|
26
26
|
password: string;
|
|
27
|
+
phone?: string | undefined;
|
|
28
|
+
email?: string | undefined;
|
|
27
29
|
role?: string | undefined;
|
|
28
30
|
branchId?: string | undefined;
|
|
29
31
|
}
|
package/gen/branch.ts
CHANGED
|
@@ -1,112 +1,98 @@
|
|
|
1
1
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
2
|
// versions:
|
|
3
3
|
// protoc-gen-ts_proto v2.11.5
|
|
4
|
-
// protoc
|
|
4
|
+
// protoc v7.34.0
|
|
5
5
|
// source: branch.proto
|
|
6
6
|
|
|
7
7
|
/* eslint-disable */
|
|
8
8
|
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
9
9
|
import { Observable } from "rxjs";
|
|
10
|
+
import { BoolResponse, IdRequest } from "./common";
|
|
11
|
+
import { Timestamp } from "./google/protobuf/timestamp";
|
|
10
12
|
|
|
11
13
|
export const protobufPackage = "branch.v1";
|
|
12
14
|
|
|
13
|
-
export interface
|
|
15
|
+
export interface Branch {
|
|
16
|
+
id: string;
|
|
14
17
|
name: string;
|
|
15
|
-
|
|
18
|
+
code?: string | undefined;
|
|
16
19
|
address?: string | undefined;
|
|
20
|
+
phone?: string | undefined;
|
|
21
|
+
isActive: boolean;
|
|
22
|
+
workTime?: string | undefined;
|
|
17
23
|
lat?: string | undefined;
|
|
18
24
|
lng?: string | undefined;
|
|
25
|
+
parentBranchId?: string | undefined;
|
|
26
|
+
createdAt: Timestamp | undefined;
|
|
27
|
+
updatedAt: Timestamp | undefined;
|
|
19
28
|
}
|
|
20
29
|
|
|
21
|
-
export interface
|
|
22
|
-
id: string;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface GetBranchRequest {
|
|
26
|
-
id: string;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export interface GetBranchResponse {
|
|
30
|
-
id: string;
|
|
30
|
+
export interface CreateBranchRequest {
|
|
31
31
|
name: string;
|
|
32
|
-
|
|
32
|
+
code?: string | undefined;
|
|
33
33
|
address?: string | undefined;
|
|
34
|
+
phone?: string | undefined;
|
|
35
|
+
isActive?: boolean | undefined;
|
|
36
|
+
workTime?: string | undefined;
|
|
34
37
|
lat?: string | undefined;
|
|
35
38
|
lng?: string | undefined;
|
|
39
|
+
parentBranchId?: string | undefined;
|
|
36
40
|
}
|
|
37
41
|
|
|
38
42
|
export interface UpdateBranchRequest {
|
|
39
43
|
id: string;
|
|
40
|
-
name
|
|
41
|
-
|
|
44
|
+
name?: string | undefined;
|
|
45
|
+
code?: string | undefined;
|
|
42
46
|
address?: string | undefined;
|
|
47
|
+
phone?: string | undefined;
|
|
48
|
+
isActive?: boolean | undefined;
|
|
49
|
+
workTime?: string | undefined;
|
|
43
50
|
lat?: string | undefined;
|
|
44
51
|
lng?: string | undefined;
|
|
52
|
+
parentBranchId?: string | undefined;
|
|
45
53
|
}
|
|
46
54
|
|
|
47
|
-
export interface
|
|
48
|
-
|
|
55
|
+
export interface ListBranchesRequest {
|
|
56
|
+
isActive?: boolean | undefined;
|
|
57
|
+
parentBranchId?: string | undefined;
|
|
58
|
+
search?: string | undefined;
|
|
49
59
|
}
|
|
50
60
|
|
|
51
|
-
export interface
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export interface DeleteBranchResponse {
|
|
56
|
-
ok: boolean;
|
|
61
|
+
export interface ListBranchesResponse {
|
|
62
|
+
items: Branch[];
|
|
57
63
|
}
|
|
58
64
|
|
|
59
65
|
export const BRANCH_V1_PACKAGE_NAME = "branch.v1";
|
|
60
66
|
|
|
61
|
-
/** Branch service for managing branches */
|
|
62
|
-
|
|
63
67
|
export interface BranchServiceClient {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
createBranch(request: CreateBranchRequest): Observable<CreateBranchResponse>;
|
|
67
|
-
|
|
68
|
-
/** Get branch details by ID */
|
|
68
|
+
createBranch(request: CreateBranchRequest): Observable<Branch>;
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
updateBranch(request: UpdateBranchRequest): Observable<Branch>;
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
getBranch(request: IdRequest): Observable<Branch>;
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
listBranches(request: ListBranchesRequest): Observable<ListBranchesResponse>;
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
deleteBranch(request: DeleteBranchRequest): Observable<DeleteBranchResponse>;
|
|
76
|
+
deleteBranch(request: IdRequest): Observable<BoolResponse>;
|
|
79
77
|
}
|
|
80
78
|
|
|
81
|
-
/** Branch service for managing branches */
|
|
82
|
-
|
|
83
79
|
export interface BranchServiceController {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
createBranch(
|
|
87
|
-
request: CreateBranchRequest,
|
|
88
|
-
): Promise<CreateBranchResponse> | Observable<CreateBranchResponse> | CreateBranchResponse;
|
|
89
|
-
|
|
90
|
-
/** Get branch details by ID */
|
|
91
|
-
|
|
92
|
-
getBranch(request: GetBranchRequest): Promise<GetBranchResponse> | Observable<GetBranchResponse> | GetBranchResponse;
|
|
80
|
+
createBranch(request: CreateBranchRequest): Promise<Branch> | Observable<Branch> | Branch;
|
|
93
81
|
|
|
94
|
-
|
|
82
|
+
updateBranch(request: UpdateBranchRequest): Promise<Branch> | Observable<Branch> | Branch;
|
|
95
83
|
|
|
96
|
-
|
|
97
|
-
request: UpdateBranchRequest,
|
|
98
|
-
): Promise<UpdateBranchResponse> | Observable<UpdateBranchResponse> | UpdateBranchResponse;
|
|
84
|
+
getBranch(request: IdRequest): Promise<Branch> | Observable<Branch> | Branch;
|
|
99
85
|
|
|
100
|
-
|
|
86
|
+
listBranches(
|
|
87
|
+
request: ListBranchesRequest,
|
|
88
|
+
): Promise<ListBranchesResponse> | Observable<ListBranchesResponse> | ListBranchesResponse;
|
|
101
89
|
|
|
102
|
-
deleteBranch(
|
|
103
|
-
request: DeleteBranchRequest,
|
|
104
|
-
): Promise<DeleteBranchResponse> | Observable<DeleteBranchResponse> | DeleteBranchResponse;
|
|
90
|
+
deleteBranch(request: IdRequest): Promise<BoolResponse> | Observable<BoolResponse> | BoolResponse;
|
|
105
91
|
}
|
|
106
92
|
|
|
107
93
|
export function BranchServiceControllerMethods() {
|
|
108
94
|
return function (constructor: Function) {
|
|
109
|
-
const grpcMethods: string[] = ["createBranch", "getBranch", "
|
|
95
|
+
const grpcMethods: string[] = ["createBranch", "updateBranch", "getBranch", "listBranches", "deleteBranch"];
|
|
110
96
|
for (const method of grpcMethods) {
|
|
111
97
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
112
98
|
GrpcMethod("BranchService", method)(constructor.prototype[method], method, descriptor);
|
package/gen/catalog.ts
ADDED
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.11.5
|
|
4
|
+
// protoc v7.34.0
|
|
5
|
+
// source: catalog.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
9
|
+
import { Observable } from "rxjs";
|
|
10
|
+
import { BoolResponse, Empty, IdRequest } from "./common";
|
|
11
|
+
import { Timestamp } from "./google/protobuf/timestamp";
|
|
12
|
+
|
|
13
|
+
export const protobufPackage = "catalog.v1";
|
|
14
|
+
|
|
15
|
+
export interface Brand {
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
createdAt: Timestamp | undefined;
|
|
19
|
+
updatedAt: Timestamp | undefined;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface Category {
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
createdAt: Timestamp | undefined;
|
|
26
|
+
updatedAt: Timestamp | undefined;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface InternationalName {
|
|
30
|
+
id: string;
|
|
31
|
+
name: string;
|
|
32
|
+
createdAt: Timestamp | undefined;
|
|
33
|
+
updatedAt: Timestamp | undefined;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface Manufacturer {
|
|
37
|
+
id: string;
|
|
38
|
+
name: string;
|
|
39
|
+
country?: string | undefined;
|
|
40
|
+
note?: string | undefined;
|
|
41
|
+
createdAt: Timestamp | undefined;
|
|
42
|
+
updatedAt: Timestamp | undefined;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface CreateBrandRequest {
|
|
46
|
+
name: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface UpdateBrandRequest {
|
|
50
|
+
id: string;
|
|
51
|
+
name: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface ListBrandsResponse {
|
|
55
|
+
items: Brand[];
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface CreateCategoryRequest {
|
|
59
|
+
name: string;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface UpdateCategoryRequest {
|
|
63
|
+
id: string;
|
|
64
|
+
name: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface ListCategoriesResponse {
|
|
68
|
+
items: Category[];
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface CreateInternationalNameRequest {
|
|
72
|
+
name: string;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface UpdateInternationalNameRequest {
|
|
76
|
+
id: string;
|
|
77
|
+
name: string;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface ListInternationalNamesResponse {
|
|
81
|
+
items: InternationalName[];
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface CreateManufacturerRequest {
|
|
85
|
+
name: string;
|
|
86
|
+
country?: string | undefined;
|
|
87
|
+
note?: string | undefined;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface UpdateManufacturerRequest {
|
|
91
|
+
id: string;
|
|
92
|
+
name?: string | undefined;
|
|
93
|
+
country?: string | undefined;
|
|
94
|
+
note?: string | undefined;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export interface ListManufacturersResponse {
|
|
98
|
+
items: Manufacturer[];
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export const CATALOG_V1_PACKAGE_NAME = "catalog.v1";
|
|
102
|
+
|
|
103
|
+
export interface BrandServiceClient {
|
|
104
|
+
createBrand(request: CreateBrandRequest): Observable<Brand>;
|
|
105
|
+
|
|
106
|
+
updateBrand(request: UpdateBrandRequest): Observable<Brand>;
|
|
107
|
+
|
|
108
|
+
getBrandById(request: IdRequest): Observable<Brand>;
|
|
109
|
+
|
|
110
|
+
listBrands(request: Empty): Observable<ListBrandsResponse>;
|
|
111
|
+
|
|
112
|
+
deleteBrand(request: IdRequest): Observable<BoolResponse>;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export interface BrandServiceController {
|
|
116
|
+
createBrand(request: CreateBrandRequest): Promise<Brand> | Observable<Brand> | Brand;
|
|
117
|
+
|
|
118
|
+
updateBrand(request: UpdateBrandRequest): Promise<Brand> | Observable<Brand> | Brand;
|
|
119
|
+
|
|
120
|
+
getBrandById(request: IdRequest): Promise<Brand> | Observable<Brand> | Brand;
|
|
121
|
+
|
|
122
|
+
listBrands(request: Empty): Promise<ListBrandsResponse> | Observable<ListBrandsResponse> | ListBrandsResponse;
|
|
123
|
+
|
|
124
|
+
deleteBrand(request: IdRequest): Promise<BoolResponse> | Observable<BoolResponse> | BoolResponse;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export function BrandServiceControllerMethods() {
|
|
128
|
+
return function (constructor: Function) {
|
|
129
|
+
const grpcMethods: string[] = ["createBrand", "updateBrand", "getBrandById", "listBrands", "deleteBrand"];
|
|
130
|
+
for (const method of grpcMethods) {
|
|
131
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
132
|
+
GrpcMethod("BrandService", method)(constructor.prototype[method], method, descriptor);
|
|
133
|
+
}
|
|
134
|
+
const grpcStreamMethods: string[] = [];
|
|
135
|
+
for (const method of grpcStreamMethods) {
|
|
136
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
137
|
+
GrpcStreamMethod("BrandService", method)(constructor.prototype[method], method, descriptor);
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export const BRAND_SERVICE_NAME = "BrandService";
|
|
143
|
+
|
|
144
|
+
export interface CategoryServiceClient {
|
|
145
|
+
createCategory(request: CreateCategoryRequest): Observable<Category>;
|
|
146
|
+
|
|
147
|
+
updateCategory(request: UpdateCategoryRequest): Observable<Category>;
|
|
148
|
+
|
|
149
|
+
getCategoryById(request: IdRequest): Observable<Category>;
|
|
150
|
+
|
|
151
|
+
listCategories(request: Empty): Observable<ListCategoriesResponse>;
|
|
152
|
+
|
|
153
|
+
deleteCategory(request: IdRequest): Observable<BoolResponse>;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export interface CategoryServiceController {
|
|
157
|
+
createCategory(request: CreateCategoryRequest): Promise<Category> | Observable<Category> | Category;
|
|
158
|
+
|
|
159
|
+
updateCategory(request: UpdateCategoryRequest): Promise<Category> | Observable<Category> | Category;
|
|
160
|
+
|
|
161
|
+
getCategoryById(request: IdRequest): Promise<Category> | Observable<Category> | Category;
|
|
162
|
+
|
|
163
|
+
listCategories(
|
|
164
|
+
request: Empty,
|
|
165
|
+
): Promise<ListCategoriesResponse> | Observable<ListCategoriesResponse> | ListCategoriesResponse;
|
|
166
|
+
|
|
167
|
+
deleteCategory(request: IdRequest): Promise<BoolResponse> | Observable<BoolResponse> | BoolResponse;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export function CategoryServiceControllerMethods() {
|
|
171
|
+
return function (constructor: Function) {
|
|
172
|
+
const grpcMethods: string[] = [
|
|
173
|
+
"createCategory",
|
|
174
|
+
"updateCategory",
|
|
175
|
+
"getCategoryById",
|
|
176
|
+
"listCategories",
|
|
177
|
+
"deleteCategory",
|
|
178
|
+
];
|
|
179
|
+
for (const method of grpcMethods) {
|
|
180
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
181
|
+
GrpcMethod("CategoryService", method)(constructor.prototype[method], method, descriptor);
|
|
182
|
+
}
|
|
183
|
+
const grpcStreamMethods: string[] = [];
|
|
184
|
+
for (const method of grpcStreamMethods) {
|
|
185
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
186
|
+
GrpcStreamMethod("CategoryService", method)(constructor.prototype[method], method, descriptor);
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export const CATEGORY_SERVICE_NAME = "CategoryService";
|
|
192
|
+
|
|
193
|
+
export interface InternationalNameServiceClient {
|
|
194
|
+
createInternationalName(request: CreateInternationalNameRequest): Observable<InternationalName>;
|
|
195
|
+
|
|
196
|
+
updateInternationalName(request: UpdateInternationalNameRequest): Observable<InternationalName>;
|
|
197
|
+
|
|
198
|
+
getInternationalNameById(request: IdRequest): Observable<InternationalName>;
|
|
199
|
+
|
|
200
|
+
listInternationalNames(request: Empty): Observable<ListInternationalNamesResponse>;
|
|
201
|
+
|
|
202
|
+
deleteInternationalName(request: IdRequest): Observable<BoolResponse>;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export interface InternationalNameServiceController {
|
|
206
|
+
createInternationalName(
|
|
207
|
+
request: CreateInternationalNameRequest,
|
|
208
|
+
): Promise<InternationalName> | Observable<InternationalName> | InternationalName;
|
|
209
|
+
|
|
210
|
+
updateInternationalName(
|
|
211
|
+
request: UpdateInternationalNameRequest,
|
|
212
|
+
): Promise<InternationalName> | Observable<InternationalName> | InternationalName;
|
|
213
|
+
|
|
214
|
+
getInternationalNameById(
|
|
215
|
+
request: IdRequest,
|
|
216
|
+
): Promise<InternationalName> | Observable<InternationalName> | InternationalName;
|
|
217
|
+
|
|
218
|
+
listInternationalNames(
|
|
219
|
+
request: Empty,
|
|
220
|
+
):
|
|
221
|
+
| Promise<ListInternationalNamesResponse>
|
|
222
|
+
| Observable<ListInternationalNamesResponse>
|
|
223
|
+
| ListInternationalNamesResponse;
|
|
224
|
+
|
|
225
|
+
deleteInternationalName(request: IdRequest): Promise<BoolResponse> | Observable<BoolResponse> | BoolResponse;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export function InternationalNameServiceControllerMethods() {
|
|
229
|
+
return function (constructor: Function) {
|
|
230
|
+
const grpcMethods: string[] = [
|
|
231
|
+
"createInternationalName",
|
|
232
|
+
"updateInternationalName",
|
|
233
|
+
"getInternationalNameById",
|
|
234
|
+
"listInternationalNames",
|
|
235
|
+
"deleteInternationalName",
|
|
236
|
+
];
|
|
237
|
+
for (const method of grpcMethods) {
|
|
238
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
239
|
+
GrpcMethod("InternationalNameService", method)(constructor.prototype[method], method, descriptor);
|
|
240
|
+
}
|
|
241
|
+
const grpcStreamMethods: string[] = [];
|
|
242
|
+
for (const method of grpcStreamMethods) {
|
|
243
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
244
|
+
GrpcStreamMethod("InternationalNameService", method)(constructor.prototype[method], method, descriptor);
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
export const INTERNATIONAL_NAME_SERVICE_NAME = "InternationalNameService";
|
|
250
|
+
|
|
251
|
+
export interface ManufacturerServiceClient {
|
|
252
|
+
createManufacturer(request: CreateManufacturerRequest): Observable<Manufacturer>;
|
|
253
|
+
|
|
254
|
+
updateManufacturer(request: UpdateManufacturerRequest): Observable<Manufacturer>;
|
|
255
|
+
|
|
256
|
+
getManufacturerById(request: IdRequest): Observable<Manufacturer>;
|
|
257
|
+
|
|
258
|
+
listManufacturers(request: Empty): Observable<ListManufacturersResponse>;
|
|
259
|
+
|
|
260
|
+
deleteManufacturer(request: IdRequest): Observable<BoolResponse>;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
export interface ManufacturerServiceController {
|
|
264
|
+
createManufacturer(
|
|
265
|
+
request: CreateManufacturerRequest,
|
|
266
|
+
): Promise<Manufacturer> | Observable<Manufacturer> | Manufacturer;
|
|
267
|
+
|
|
268
|
+
updateManufacturer(
|
|
269
|
+
request: UpdateManufacturerRequest,
|
|
270
|
+
): Promise<Manufacturer> | Observable<Manufacturer> | Manufacturer;
|
|
271
|
+
|
|
272
|
+
getManufacturerById(request: IdRequest): Promise<Manufacturer> | Observable<Manufacturer> | Manufacturer;
|
|
273
|
+
|
|
274
|
+
listManufacturers(
|
|
275
|
+
request: Empty,
|
|
276
|
+
): Promise<ListManufacturersResponse> | Observable<ListManufacturersResponse> | ListManufacturersResponse;
|
|
277
|
+
|
|
278
|
+
deleteManufacturer(request: IdRequest): Promise<BoolResponse> | Observable<BoolResponse> | BoolResponse;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
export function ManufacturerServiceControllerMethods() {
|
|
282
|
+
return function (constructor: Function) {
|
|
283
|
+
const grpcMethods: string[] = [
|
|
284
|
+
"createManufacturer",
|
|
285
|
+
"updateManufacturer",
|
|
286
|
+
"getManufacturerById",
|
|
287
|
+
"listManufacturers",
|
|
288
|
+
"deleteManufacturer",
|
|
289
|
+
];
|
|
290
|
+
for (const method of grpcMethods) {
|
|
291
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
292
|
+
GrpcMethod("ManufacturerService", method)(constructor.prototype[method], method, descriptor);
|
|
293
|
+
}
|
|
294
|
+
const grpcStreamMethods: string[] = [];
|
|
295
|
+
for (const method of grpcStreamMethods) {
|
|
296
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
297
|
+
GrpcStreamMethod("ManufacturerService", method)(constructor.prototype[method], method, descriptor);
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
export const MANUFACTURER_SERVICE_NAME = "ManufacturerService";
|
package/gen/common.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
2
|
// versions:
|
|
3
3
|
// protoc-gen-ts_proto v2.11.5
|
|
4
|
-
// protoc
|
|
4
|
+
// protoc v7.34.0
|
|
5
5
|
// source: google/protobuf/timestamp.proto
|
|
6
6
|
|
|
7
7
|
/* eslint-disable */
|
|
@@ -81,8 +81,8 @@ export const protobufPackage = "google.protobuf";
|
|
|
81
81
|
* {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
|
|
82
82
|
* seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
|
|
83
83
|
* are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
|
|
84
|
-
* is required. A
|
|
85
|
-
* "Z") when printing the Timestamp type and a
|
|
84
|
+
* is required. A ProtoJSON serializer should always use UTC (as indicated by
|
|
85
|
+
* "Z") when printing the Timestamp type and a ProtoJSON parser should be
|
|
86
86
|
* able to accept both UTC and other timezones (as indicated by an offset).
|
|
87
87
|
*
|
|
88
88
|
* For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
|
|
@@ -96,20 +96,21 @@ export const protobufPackage = "google.protobuf";
|
|
|
96
96
|
* [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
|
|
97
97
|
* the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
|
|
98
98
|
* the Joda Time's [`ISODateTimeFormat.dateTime()`](
|
|
99
|
-
* http://
|
|
99
|
+
* http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
|
|
100
100
|
* ) to obtain a formatter capable of generating timestamps in this format.
|
|
101
101
|
*/
|
|
102
102
|
export interface Timestamp {
|
|
103
103
|
/**
|
|
104
|
-
* Represents seconds of UTC time since Unix epoch
|
|
105
|
-
*
|
|
106
|
-
* 9999-12-31T23:59:59Z
|
|
104
|
+
* Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must
|
|
105
|
+
* be between -62135596800 and 253402300799 inclusive (which corresponds to
|
|
106
|
+
* 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z).
|
|
107
107
|
*/
|
|
108
108
|
seconds: number;
|
|
109
109
|
/**
|
|
110
|
-
* Non-negative fractions of a second at nanosecond resolution.
|
|
111
|
-
*
|
|
112
|
-
*
|
|
110
|
+
* Non-negative fractions of a second at nanosecond resolution. This field is
|
|
111
|
+
* the nanosecond portion of the duration, not an alternative to seconds.
|
|
112
|
+
* Negative second values with fractions must still have non-negative nanos
|
|
113
|
+
* values that count forward in time. Must be between 0 and 999,999,999
|
|
113
114
|
* inclusive.
|
|
114
115
|
*/
|
|
115
116
|
nanos: number;
|