@you-are-hired/contracts 1.1.5 → 1.1.7
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 +2 -0
- package/dist/proto/paths.js +3 -1
- package/gen/questionary.ts +141 -0
- package/gen/tag.ts +89 -0
- package/package.json +1 -1
- package/proto/questionary.proto +75 -0
- package/proto/tag.proto +48 -0
package/dist/proto/paths.d.ts
CHANGED
package/dist/proto/paths.js
CHANGED
|
@@ -5,5 +5,7 @@ const path_1 = require("path");
|
|
|
5
5
|
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
|
-
USERS: (0, path_1.join)(__dirname, '../../proto/users.proto')
|
|
8
|
+
USERS: (0, path_1.join)(__dirname, '../../proto/users.proto'),
|
|
9
|
+
TAG: (0, path_1.join)(__dirname, '../../proto/tag.proto'),
|
|
10
|
+
QUESTIONARY: (0, path_1.join)(__dirname, '../../proto/questionary.proto')
|
|
9
11
|
};
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.10.1
|
|
4
|
+
// protoc v3.21.12
|
|
5
|
+
// source: questionary.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
9
|
+
import { Observable } from "rxjs";
|
|
10
|
+
|
|
11
|
+
export const protobufPackage = "questionary.v1";
|
|
12
|
+
|
|
13
|
+
export interface QuestionTag {
|
|
14
|
+
tagId: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface Question {
|
|
18
|
+
id: string;
|
|
19
|
+
content: string;
|
|
20
|
+
tags: QuestionTag[];
|
|
21
|
+
createdAt: string;
|
|
22
|
+
updatedAt: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface CreateQuestionRequest {
|
|
26
|
+
content: string;
|
|
27
|
+
tagIds: string[];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface CreateQuestionResponse {
|
|
31
|
+
question: Question | undefined;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface UpdateQuestionRequest {
|
|
35
|
+
id: string;
|
|
36
|
+
content: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface UpdateQuestionResponse {
|
|
40
|
+
question: Question | undefined;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface GetQuestionRequest {
|
|
44
|
+
id: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface GetQuestionResponse {
|
|
48
|
+
question: Question | undefined;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface ListQuestionsRequest {
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface ListQuestionsResponse {
|
|
55
|
+
questions: Question[];
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface AttachTagToQuestionRequest {
|
|
59
|
+
questionId: string;
|
|
60
|
+
tagId: string;
|
|
61
|
+
tagIds: string[];
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface AttachTagToQuestionResponse {
|
|
65
|
+
question: Question | undefined;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface DetachTagFromQuestionRequest {
|
|
69
|
+
questionId: string;
|
|
70
|
+
tagId: string;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface DetachTagFromQuestionResponse {
|
|
74
|
+
question: Question | undefined;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export const QUESTIONARY_V1_PACKAGE_NAME = "questionary.v1";
|
|
78
|
+
|
|
79
|
+
export interface QuestionaryServiceClient {
|
|
80
|
+
createQuestion(request: CreateQuestionRequest): Observable<CreateQuestionResponse>;
|
|
81
|
+
|
|
82
|
+
updateQuestion(request: UpdateQuestionRequest): Observable<UpdateQuestionResponse>;
|
|
83
|
+
|
|
84
|
+
getQuestion(request: GetQuestionRequest): Observable<GetQuestionResponse>;
|
|
85
|
+
|
|
86
|
+
listQuestions(request: ListQuestionsRequest): Observable<ListQuestionsResponse>;
|
|
87
|
+
|
|
88
|
+
attachTagToQuestion(request: AttachTagToQuestionRequest): Observable<AttachTagToQuestionResponse>;
|
|
89
|
+
|
|
90
|
+
detachTagFromQuestion(request: DetachTagFromQuestionRequest): Observable<DetachTagFromQuestionResponse>;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export interface QuestionaryServiceController {
|
|
94
|
+
createQuestion(
|
|
95
|
+
request: CreateQuestionRequest,
|
|
96
|
+
): Promise<CreateQuestionResponse> | Observable<CreateQuestionResponse> | CreateQuestionResponse;
|
|
97
|
+
|
|
98
|
+
updateQuestion(
|
|
99
|
+
request: UpdateQuestionRequest,
|
|
100
|
+
): Promise<UpdateQuestionResponse> | Observable<UpdateQuestionResponse> | UpdateQuestionResponse;
|
|
101
|
+
|
|
102
|
+
getQuestion(
|
|
103
|
+
request: GetQuestionRequest,
|
|
104
|
+
): Promise<GetQuestionResponse> | Observable<GetQuestionResponse> | GetQuestionResponse;
|
|
105
|
+
|
|
106
|
+
listQuestions(
|
|
107
|
+
request: ListQuestionsRequest,
|
|
108
|
+
): Promise<ListQuestionsResponse> | Observable<ListQuestionsResponse> | ListQuestionsResponse;
|
|
109
|
+
|
|
110
|
+
attachTagToQuestion(
|
|
111
|
+
request: AttachTagToQuestionRequest,
|
|
112
|
+
): Promise<AttachTagToQuestionResponse> | Observable<AttachTagToQuestionResponse> | AttachTagToQuestionResponse;
|
|
113
|
+
|
|
114
|
+
detachTagFromQuestion(
|
|
115
|
+
request: DetachTagFromQuestionRequest,
|
|
116
|
+
): Promise<DetachTagFromQuestionResponse> | Observable<DetachTagFromQuestionResponse> | DetachTagFromQuestionResponse;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export function QuestionaryServiceControllerMethods() {
|
|
120
|
+
return function (constructor: Function) {
|
|
121
|
+
const grpcMethods: string[] = [
|
|
122
|
+
"createQuestion",
|
|
123
|
+
"updateQuestion",
|
|
124
|
+
"getQuestion",
|
|
125
|
+
"listQuestions",
|
|
126
|
+
"attachTagToQuestion",
|
|
127
|
+
"detachTagFromQuestion",
|
|
128
|
+
];
|
|
129
|
+
for (const method of grpcMethods) {
|
|
130
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
131
|
+
GrpcMethod("QuestionaryService", method)(constructor.prototype[method], method, descriptor);
|
|
132
|
+
}
|
|
133
|
+
const grpcStreamMethods: string[] = [];
|
|
134
|
+
for (const method of grpcStreamMethods) {
|
|
135
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
136
|
+
GrpcStreamMethod("QuestionaryService", method)(constructor.prototype[method], method, descriptor);
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export const QUESTIONARY_SERVICE_NAME = "QuestionaryService";
|
package/gen/tag.ts
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.10.1
|
|
4
|
+
// protoc v3.21.12
|
|
5
|
+
// source: tag.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
9
|
+
import { Observable } from "rxjs";
|
|
10
|
+
|
|
11
|
+
export const protobufPackage = "tag.v1";
|
|
12
|
+
|
|
13
|
+
export interface Tag {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
createdAt: string;
|
|
17
|
+
updatedAt: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface CreateTagRequest {
|
|
21
|
+
name: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface CreateTagResponse {
|
|
25
|
+
tag: Tag | undefined;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface UpdateTagRequest {
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface UpdateTagResponse {
|
|
34
|
+
tag: Tag | undefined;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface GetTagRequest {
|
|
38
|
+
id: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface GetTagResponse {
|
|
42
|
+
tag: Tag | undefined;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface ListTagsRequest {
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface ListTagsResponse {
|
|
49
|
+
tags: Tag[];
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export const TAG_V1_PACKAGE_NAME = "tag.v1";
|
|
53
|
+
|
|
54
|
+
export interface TagServiceClient {
|
|
55
|
+
createTag(request: CreateTagRequest): Observable<CreateTagResponse>;
|
|
56
|
+
|
|
57
|
+
updateTag(request: UpdateTagRequest): Observable<UpdateTagResponse>;
|
|
58
|
+
|
|
59
|
+
getTag(request: GetTagRequest): Observable<GetTagResponse>;
|
|
60
|
+
|
|
61
|
+
listTags(request: ListTagsRequest): Observable<ListTagsResponse>;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface TagServiceController {
|
|
65
|
+
createTag(request: CreateTagRequest): Promise<CreateTagResponse> | Observable<CreateTagResponse> | CreateTagResponse;
|
|
66
|
+
|
|
67
|
+
updateTag(request: UpdateTagRequest): Promise<UpdateTagResponse> | Observable<UpdateTagResponse> | UpdateTagResponse;
|
|
68
|
+
|
|
69
|
+
getTag(request: GetTagRequest): Promise<GetTagResponse> | Observable<GetTagResponse> | GetTagResponse;
|
|
70
|
+
|
|
71
|
+
listTags(request: ListTagsRequest): Promise<ListTagsResponse> | Observable<ListTagsResponse> | ListTagsResponse;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function TagServiceControllerMethods() {
|
|
75
|
+
return function (constructor: Function) {
|
|
76
|
+
const grpcMethods: string[] = ["createTag", "updateTag", "getTag", "listTags"];
|
|
77
|
+
for (const method of grpcMethods) {
|
|
78
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
79
|
+
GrpcMethod("TagService", method)(constructor.prototype[method], method, descriptor);
|
|
80
|
+
}
|
|
81
|
+
const grpcStreamMethods: string[] = [];
|
|
82
|
+
for (const method of grpcStreamMethods) {
|
|
83
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
84
|
+
GrpcStreamMethod("TagService", method)(constructor.prototype[method], method, descriptor);
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export const TAG_SERVICE_NAME = "TagService";
|
package/package.json
CHANGED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package questionary.v1;
|
|
4
|
+
|
|
5
|
+
service QuestionaryService {
|
|
6
|
+
rpc CreateQuestion (CreateQuestionRequest) returns (CreateQuestionResponse);
|
|
7
|
+
rpc UpdateQuestion (UpdateQuestionRequest) returns (UpdateQuestionResponse);
|
|
8
|
+
rpc GetQuestion (GetQuestionRequest) returns (GetQuestionResponse);
|
|
9
|
+
rpc ListQuestions (ListQuestionsRequest) returns (ListQuestionsResponse);
|
|
10
|
+
rpc AttachTagToQuestion (AttachTagToQuestionRequest) returns (AttachTagToQuestionResponse);
|
|
11
|
+
rpc DetachTagFromQuestion (DetachTagFromQuestionRequest) returns (DetachTagFromQuestionResponse);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
message QuestionTag {
|
|
15
|
+
string tag_id = 1;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
message Question {
|
|
19
|
+
string id = 1;
|
|
20
|
+
string content = 2;
|
|
21
|
+
repeated QuestionTag tags = 3;
|
|
22
|
+
string created_at = 4;
|
|
23
|
+
string updated_at = 5;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
message CreateQuestionRequest {
|
|
27
|
+
string content = 1;
|
|
28
|
+
repeated string tag_ids = 2;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
message CreateQuestionResponse {
|
|
32
|
+
Question question = 1;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
message UpdateQuestionRequest {
|
|
36
|
+
string id = 1;
|
|
37
|
+
string content = 2;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
message UpdateQuestionResponse {
|
|
41
|
+
Question question = 1;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
message GetQuestionRequest {
|
|
45
|
+
string id = 1;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
message GetQuestionResponse {
|
|
49
|
+
Question question = 1;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
message ListQuestionsRequest {}
|
|
53
|
+
|
|
54
|
+
message ListQuestionsResponse {
|
|
55
|
+
repeated Question questions = 1;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
message AttachTagToQuestionRequest {
|
|
59
|
+
string question_id = 1;
|
|
60
|
+
string tag_id = 2;
|
|
61
|
+
repeated string tag_ids = 3;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
message AttachTagToQuestionResponse {
|
|
65
|
+
Question question = 1;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
message DetachTagFromQuestionRequest {
|
|
69
|
+
string question_id = 1;
|
|
70
|
+
string tag_id = 2;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
message DetachTagFromQuestionResponse {
|
|
74
|
+
Question question = 1;
|
|
75
|
+
}
|
package/proto/tag.proto
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package tag.v1;
|
|
4
|
+
|
|
5
|
+
service TagService {
|
|
6
|
+
rpc CreateTag (CreateTagRequest) returns (CreateTagResponse);
|
|
7
|
+
rpc UpdateTag (UpdateTagRequest) returns (UpdateTagResponse);
|
|
8
|
+
rpc GetTag (GetTagRequest) returns (GetTagResponse);
|
|
9
|
+
rpc ListTags (ListTagsRequest) returns (ListTagsResponse);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
message Tag {
|
|
13
|
+
string id = 1;
|
|
14
|
+
string name = 2;
|
|
15
|
+
string created_at = 3;
|
|
16
|
+
string updated_at = 4;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
message CreateTagRequest {
|
|
20
|
+
string name = 1;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
message CreateTagResponse {
|
|
24
|
+
Tag tag = 1;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
message UpdateTagRequest {
|
|
28
|
+
string id = 1;
|
|
29
|
+
string name = 2;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
message UpdateTagResponse {
|
|
33
|
+
Tag tag = 1;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
message GetTagRequest {
|
|
37
|
+
string id = 1;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
message GetTagResponse {
|
|
41
|
+
Tag tag = 1;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
message ListTagsRequest {}
|
|
45
|
+
|
|
46
|
+
message ListTagsResponse {
|
|
47
|
+
repeated Tag tags = 1;
|
|
48
|
+
}
|