@slack-clone-org/contracts 1.1.2 → 1.1.3
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/generated/account.ts +10 -83
- package/package.json +1 -1
- package/proto/account.proto +6 -52
package/generated/account.ts
CHANGED
|
@@ -22,51 +22,11 @@ export interface GetAccountRequest {
|
|
|
22
22
|
|
|
23
23
|
export interface GetAccountResponse {
|
|
24
24
|
accountId: string;
|
|
25
|
-
phoneNumber
|
|
26
|
-
email
|
|
25
|
+
phoneNumber: string;
|
|
26
|
+
email: string;
|
|
27
27
|
isPhoneVerified: boolean;
|
|
28
28
|
isEmailVerified: boolean;
|
|
29
29
|
role: GlobalRole;
|
|
30
|
-
isBanned: boolean;
|
|
31
|
-
bannedAt?: string | undefined;
|
|
32
|
-
banReason?: string | undefined;
|
|
33
|
-
createdAt: string;
|
|
34
|
-
updatedAt: string;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export interface GetAccountsRequest {
|
|
38
|
-
limit?: number | undefined;
|
|
39
|
-
offset?: number | undefined;
|
|
40
|
-
role?: GlobalRole | undefined;
|
|
41
|
-
isBanned?: boolean | undefined;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export interface GetAccountsResponse {
|
|
45
|
-
accounts: GetAccountResponse[];
|
|
46
|
-
total: number;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export interface DeleteAccountRequest {
|
|
50
|
-
accountId: string;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export interface DeleteAccountResponse {
|
|
54
|
-
success: boolean;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export interface UpdateAccountRequest {
|
|
58
|
-
accountId: string;
|
|
59
|
-
phoneNumber?: string | undefined;
|
|
60
|
-
email?: string | undefined;
|
|
61
|
-
isPhoneVerified?: boolean | undefined;
|
|
62
|
-
isEmailVerified?: boolean | undefined;
|
|
63
|
-
role?: GlobalRole | undefined;
|
|
64
|
-
isBanned?: boolean | undefined;
|
|
65
|
-
banReason?: string | undefined;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export interface UpdateAccountResponse {
|
|
69
|
-
success: boolean;
|
|
70
30
|
}
|
|
71
31
|
|
|
72
32
|
export interface InitEmailChangeRequest {
|
|
@@ -116,31 +76,19 @@ export interface AccountServiceClient {
|
|
|
116
76
|
|
|
117
77
|
getAccount(request: GetAccountRequest): Observable<GetAccountResponse>;
|
|
118
78
|
|
|
119
|
-
/**
|
|
120
|
-
|
|
121
|
-
getAccounts(request: GetAccountsRequest): Observable<GetAccountsResponse>;
|
|
122
|
-
|
|
123
|
-
/** UpdateAccount updates account fields such as role, ban status, and contact info. */
|
|
124
|
-
|
|
125
|
-
updateAccount(request: UpdateAccountRequest): Observable<UpdateAccountResponse>;
|
|
126
|
-
|
|
127
|
-
/** DeleteAccount permanently removes an account by account ID. */
|
|
128
|
-
|
|
129
|
-
deleteAccount(request: DeleteAccountRequest): Observable<DeleteAccountResponse>;
|
|
130
|
-
|
|
131
|
-
/** InitEmailChange initiates an email change request by sending a verification code. */
|
|
79
|
+
/** Methods for initiating email changes. */
|
|
132
80
|
|
|
133
81
|
initEmailChange(request: InitEmailChangeRequest): Observable<InitEmailChangeResponse>;
|
|
134
82
|
|
|
135
|
-
/**
|
|
83
|
+
/** Methods for confirming email changes. */
|
|
136
84
|
|
|
137
85
|
confirmEmailChange(request: ConfirmEmailChangeRequest): Observable<ConfirmEmailChangeResponse>;
|
|
138
86
|
|
|
139
|
-
/**
|
|
87
|
+
/** Methods for initiating phone changes. */
|
|
140
88
|
|
|
141
89
|
initPhoneChange(request: InitPhoneChangeRequest): Observable<InitPhoneChangeResponse>;
|
|
142
90
|
|
|
143
|
-
/**
|
|
91
|
+
/** Methods for confirming phone changes. */
|
|
144
92
|
|
|
145
93
|
confirmPhoneChange(request: ConfirmPhoneChangeRequest): Observable<ConfirmPhoneChangeResponse>;
|
|
146
94
|
}
|
|
@@ -154,43 +102,25 @@ export interface AccountServiceController {
|
|
|
154
102
|
request: GetAccountRequest,
|
|
155
103
|
): Promise<GetAccountResponse> | Observable<GetAccountResponse> | GetAccountResponse;
|
|
156
104
|
|
|
157
|
-
/**
|
|
158
|
-
|
|
159
|
-
getAccounts(
|
|
160
|
-
request: GetAccountsRequest,
|
|
161
|
-
): Promise<GetAccountsResponse> | Observable<GetAccountsResponse> | GetAccountsResponse;
|
|
162
|
-
|
|
163
|
-
/** UpdateAccount updates account fields such as role, ban status, and contact info. */
|
|
164
|
-
|
|
165
|
-
updateAccount(
|
|
166
|
-
request: UpdateAccountRequest,
|
|
167
|
-
): Promise<UpdateAccountResponse> | Observable<UpdateAccountResponse> | UpdateAccountResponse;
|
|
168
|
-
|
|
169
|
-
/** DeleteAccount permanently removes an account by account ID. */
|
|
170
|
-
|
|
171
|
-
deleteAccount(
|
|
172
|
-
request: DeleteAccountRequest,
|
|
173
|
-
): Promise<DeleteAccountResponse> | Observable<DeleteAccountResponse> | DeleteAccountResponse;
|
|
174
|
-
|
|
175
|
-
/** InitEmailChange initiates an email change request by sending a verification code. */
|
|
105
|
+
/** Methods for initiating email changes. */
|
|
176
106
|
|
|
177
107
|
initEmailChange(
|
|
178
108
|
request: InitEmailChangeRequest,
|
|
179
109
|
): Promise<InitEmailChangeResponse> | Observable<InitEmailChangeResponse> | InitEmailChangeResponse;
|
|
180
110
|
|
|
181
|
-
/**
|
|
111
|
+
/** Methods for confirming email changes. */
|
|
182
112
|
|
|
183
113
|
confirmEmailChange(
|
|
184
114
|
request: ConfirmEmailChangeRequest,
|
|
185
115
|
): Promise<ConfirmEmailChangeResponse> | Observable<ConfirmEmailChangeResponse> | ConfirmEmailChangeResponse;
|
|
186
116
|
|
|
187
|
-
/**
|
|
117
|
+
/** Methods for initiating phone changes. */
|
|
188
118
|
|
|
189
119
|
initPhoneChange(
|
|
190
120
|
request: InitPhoneChangeRequest,
|
|
191
121
|
): Promise<InitPhoneChangeResponse> | Observable<InitPhoneChangeResponse> | InitPhoneChangeResponse;
|
|
192
122
|
|
|
193
|
-
/**
|
|
123
|
+
/** Methods for confirming phone changes. */
|
|
194
124
|
|
|
195
125
|
confirmPhoneChange(
|
|
196
126
|
request: ConfirmPhoneChangeRequest,
|
|
@@ -201,9 +131,6 @@ export function AccountServiceControllerMethods() {
|
|
|
201
131
|
return function (constructor: Function) {
|
|
202
132
|
const grpcMethods: string[] = [
|
|
203
133
|
"getAccount",
|
|
204
|
-
"getAccounts",
|
|
205
|
-
"updateAccount",
|
|
206
|
-
"deleteAccount",
|
|
207
134
|
"initEmailChange",
|
|
208
135
|
"confirmEmailChange",
|
|
209
136
|
"initPhoneChange",
|
package/package.json
CHANGED
package/proto/account.proto
CHANGED
|
@@ -6,20 +6,14 @@ package account.v1;
|
|
|
6
6
|
service AccountService {
|
|
7
7
|
// GetAccount retrieves account details by account ID.
|
|
8
8
|
rpc GetAccount (GetAccountRequest) returns (GetAccountResponse);
|
|
9
|
-
// GetAccounts retrieves a paginated list of accounts with optional filters.
|
|
10
|
-
rpc GetAccounts (GetAccountsRequest) returns (GetAccountsResponse);
|
|
11
|
-
// UpdateAccount updates account fields such as role, ban status, and contact info.
|
|
12
|
-
rpc UpdateAccount (UpdateAccountRequest) returns (UpdateAccountResponse);
|
|
13
|
-
// DeleteAccount permanently removes an account by account ID.
|
|
14
|
-
rpc DeleteAccount (DeleteAccountRequest) returns (DeleteAccountResponse);
|
|
15
9
|
|
|
16
|
-
//
|
|
10
|
+
// Methods for initiating email changes.
|
|
17
11
|
rpc InitEmailChange (InitEmailChangeRequest) returns (InitEmailChangeResponse);
|
|
18
|
-
//
|
|
12
|
+
// Methods for confirming email changes.
|
|
19
13
|
rpc ConfirmEmailChange (ConfirmEmailChangeRequest) returns (ConfirmEmailChangeResponse);
|
|
20
|
-
//
|
|
14
|
+
// Methods for initiating phone changes.
|
|
21
15
|
rpc InitPhoneChange (InitPhoneChangeRequest) returns (InitPhoneChangeResponse);
|
|
22
|
-
//
|
|
16
|
+
// Methods for confirming phone changes.
|
|
23
17
|
rpc ConfirmPhoneChange (ConfirmPhoneChangeRequest) returns (ConfirmPhoneChangeResponse);
|
|
24
18
|
}
|
|
25
19
|
|
|
@@ -29,51 +23,11 @@ message GetAccountRequest {
|
|
|
29
23
|
|
|
30
24
|
message GetAccountResponse {
|
|
31
25
|
string account_id = 1;
|
|
32
|
-
|
|
33
|
-
|
|
26
|
+
string phone_number = 2;
|
|
27
|
+
string email = 3;
|
|
34
28
|
bool is_phone_verified = 4;
|
|
35
29
|
bool is_email_verified = 5;
|
|
36
30
|
GlobalRole role = 6;
|
|
37
|
-
bool is_banned = 7;
|
|
38
|
-
optional string banned_at = 8;
|
|
39
|
-
optional string ban_reason = 9;
|
|
40
|
-
string created_at = 10;
|
|
41
|
-
string updated_at = 11;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
message GetAccountsRequest {
|
|
45
|
-
optional int32 limit = 1;
|
|
46
|
-
optional int32 offset = 2;
|
|
47
|
-
optional GlobalRole role = 3;
|
|
48
|
-
optional bool is_banned = 4;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
message GetAccountsResponse {
|
|
52
|
-
repeated GetAccountResponse accounts = 1;
|
|
53
|
-
int32 total = 2;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
message DeleteAccountRequest {
|
|
57
|
-
string account_id = 1;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
message DeleteAccountResponse {
|
|
61
|
-
bool success = 1;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
message UpdateAccountRequest {
|
|
65
|
-
string account_id = 1;
|
|
66
|
-
optional string phone_number = 2;
|
|
67
|
-
optional string email = 3;
|
|
68
|
-
optional bool is_phone_verified = 4;
|
|
69
|
-
optional bool is_email_verified = 5;
|
|
70
|
-
optional GlobalRole role = 6;
|
|
71
|
-
optional bool is_banned = 7;
|
|
72
|
-
optional string ban_reason = 8;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
message UpdateAccountResponse {
|
|
76
|
-
bool success = 1;
|
|
77
31
|
}
|
|
78
32
|
|
|
79
33
|
message InitEmailChangeRequest {
|