jr-common-micro 1.1.48 → 1.1.49
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/micro/v1/user/index.d.ts +1 -0
- package/dist/proto/micro/v1/user/index.js +2 -1
- package/dist/proto/micro/v1/user/profile_messages_nest.d.ts +64 -0
- package/dist/proto/micro/v1/user/profile_messages_nest.js +5 -0
- package/dist/proto/micro/v1/user/profile_messages_pb.d.ts +152 -0
- package/dist/proto/micro/v1/user/profile_messages_pb.js +336 -0
- package/dist/proto/micro/v1/user/services_connect.d.ts +72 -0
- package/dist/proto/micro/v1/user/services_connect.js +73 -1
- package/dist/proto/micro/v1/user/services_nest.d.ts +29 -0
- package/dist/proto/micro/v1/user/services_nest.js +29 -1
- package/package.json +1 -1
- package/proto/micro/v1/user/profile_messages.proto +80 -0
- package/proto/micro/v1/user/services.proto +15 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * as auth_messages_nest from './auth_messages_nest';
|
|
2
2
|
export * as authorization_messages_nest from './authorization_messages_nest';
|
|
3
|
+
export * as profile_messages_nest from './profile_messages_nest';
|
|
3
4
|
export * as services_connect from './services_connect';
|
|
4
5
|
export * as services_nest from './services_nest';
|
|
5
6
|
export * as site_settings_messages_nest from './site_settings_messages_nest';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.user_messages_nest = exports.site_settings_messages_nest = exports.services_nest = exports.services_connect = exports.authorization_messages_nest = exports.auth_messages_nest = void 0;
|
|
3
|
+
exports.user_messages_nest = exports.site_settings_messages_nest = exports.services_nest = exports.services_connect = exports.profile_messages_nest = exports.authorization_messages_nest = exports.auth_messages_nest = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
exports.auth_messages_nest = tslib_1.__importStar(require("./auth_messages_nest"));
|
|
6
6
|
exports.authorization_messages_nest = tslib_1.__importStar(require("./authorization_messages_nest"));
|
|
7
|
+
exports.profile_messages_nest = tslib_1.__importStar(require("./profile_messages_nest"));
|
|
7
8
|
exports.services_connect = tslib_1.__importStar(require("./services_connect"));
|
|
8
9
|
exports.services_nest = tslib_1.__importStar(require("./services_nest"));
|
|
9
10
|
exports.site_settings_messages_nest = tslib_1.__importStar(require("./site_settings_messages_nest"));
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { PaginationMetaResult, ResponseStatus } from "../general_nest";
|
|
2
|
+
export declare const protobufPackage = "micro.v1.user";
|
|
3
|
+
export interface ProfileDto {
|
|
4
|
+
user_id: string;
|
|
5
|
+
username: string;
|
|
6
|
+
bio: string;
|
|
7
|
+
avatar_id: string;
|
|
8
|
+
link_x: string;
|
|
9
|
+
link_instagram: string;
|
|
10
|
+
link_youtube: string;
|
|
11
|
+
link_telegram: string;
|
|
12
|
+
role: string;
|
|
13
|
+
follower_count: number;
|
|
14
|
+
following_count: number;
|
|
15
|
+
like_count: number;
|
|
16
|
+
is_following: boolean;
|
|
17
|
+
is_liked: boolean;
|
|
18
|
+
is_me: boolean;
|
|
19
|
+
member_since: string;
|
|
20
|
+
}
|
|
21
|
+
export interface UsernameAvailableRequest {
|
|
22
|
+
username: string;
|
|
23
|
+
}
|
|
24
|
+
export interface UsernameAvailableResponse {
|
|
25
|
+
status: ResponseStatus | undefined;
|
|
26
|
+
available: boolean;
|
|
27
|
+
reason: string;
|
|
28
|
+
}
|
|
29
|
+
export interface ClaimUsernameRequest {
|
|
30
|
+
username: string;
|
|
31
|
+
}
|
|
32
|
+
export interface ProfileUpdateRequest {
|
|
33
|
+
bio?: string | undefined;
|
|
34
|
+
avatar_id?: string | undefined;
|
|
35
|
+
link_x?: string | undefined;
|
|
36
|
+
link_instagram?: string | undefined;
|
|
37
|
+
link_youtube?: string | undefined;
|
|
38
|
+
link_telegram?: string | undefined;
|
|
39
|
+
}
|
|
40
|
+
export interface ProfileByUsernameRequest {
|
|
41
|
+
username: string;
|
|
42
|
+
}
|
|
43
|
+
export interface ProfileSingleResponse {
|
|
44
|
+
status: ResponseStatus | undefined;
|
|
45
|
+
data: ProfileDto | undefined;
|
|
46
|
+
}
|
|
47
|
+
export interface FollowRequest {
|
|
48
|
+
username: string;
|
|
49
|
+
}
|
|
50
|
+
export interface LikeRequest {
|
|
51
|
+
username: string;
|
|
52
|
+
}
|
|
53
|
+
export interface ProfileListItemDto {
|
|
54
|
+
user_id: string;
|
|
55
|
+
username: string;
|
|
56
|
+
avatar_id: string;
|
|
57
|
+
role: string;
|
|
58
|
+
}
|
|
59
|
+
export interface ProfileListResponse {
|
|
60
|
+
status: ResponseStatus | undefined;
|
|
61
|
+
pagination: PaginationMetaResult | undefined;
|
|
62
|
+
data: ProfileListItemDto[];
|
|
63
|
+
}
|
|
64
|
+
export declare const MICRO_V1_USER_PACKAGE_NAME = "micro.v1.user";
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
|
|
2
|
+
import { Message, proto3 } from "@bufbuild/protobuf";
|
|
3
|
+
import { PaginationMetaResult, ResponseStatus } from "../general_pb.js";
|
|
4
|
+
export declare class ProfileDto extends Message<ProfileDto> {
|
|
5
|
+
userId: string;
|
|
6
|
+
username: string;
|
|
7
|
+
bio: string;
|
|
8
|
+
avatarId: string;
|
|
9
|
+
linkX: string;
|
|
10
|
+
linkInstagram: string;
|
|
11
|
+
linkYoutube: string;
|
|
12
|
+
linkTelegram: string;
|
|
13
|
+
role: string;
|
|
14
|
+
followerCount: number;
|
|
15
|
+
followingCount: number;
|
|
16
|
+
likeCount: number;
|
|
17
|
+
isFollowing: boolean;
|
|
18
|
+
isLiked: boolean;
|
|
19
|
+
isMe: boolean;
|
|
20
|
+
memberSince: string;
|
|
21
|
+
constructor(data?: PartialMessage<ProfileDto>);
|
|
22
|
+
static readonly runtime: typeof proto3;
|
|
23
|
+
static readonly typeName = "micro.v1.user.ProfileDto";
|
|
24
|
+
static readonly fields: FieldList;
|
|
25
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ProfileDto;
|
|
26
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ProfileDto;
|
|
27
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ProfileDto;
|
|
28
|
+
static equals(a: ProfileDto | PlainMessage<ProfileDto> | undefined, b: ProfileDto | PlainMessage<ProfileDto> | undefined): boolean;
|
|
29
|
+
}
|
|
30
|
+
export declare class UsernameAvailableRequest extends Message<UsernameAvailableRequest> {
|
|
31
|
+
username: string;
|
|
32
|
+
constructor(data?: PartialMessage<UsernameAvailableRequest>);
|
|
33
|
+
static readonly runtime: typeof proto3;
|
|
34
|
+
static readonly typeName = "micro.v1.user.UsernameAvailableRequest";
|
|
35
|
+
static readonly fields: FieldList;
|
|
36
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UsernameAvailableRequest;
|
|
37
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UsernameAvailableRequest;
|
|
38
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UsernameAvailableRequest;
|
|
39
|
+
static equals(a: UsernameAvailableRequest | PlainMessage<UsernameAvailableRequest> | undefined, b: UsernameAvailableRequest | PlainMessage<UsernameAvailableRequest> | undefined): boolean;
|
|
40
|
+
}
|
|
41
|
+
export declare class UsernameAvailableResponse extends Message<UsernameAvailableResponse> {
|
|
42
|
+
status?: ResponseStatus;
|
|
43
|
+
available: boolean;
|
|
44
|
+
reason: string;
|
|
45
|
+
constructor(data?: PartialMessage<UsernameAvailableResponse>);
|
|
46
|
+
static readonly runtime: typeof proto3;
|
|
47
|
+
static readonly typeName = "micro.v1.user.UsernameAvailableResponse";
|
|
48
|
+
static readonly fields: FieldList;
|
|
49
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UsernameAvailableResponse;
|
|
50
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UsernameAvailableResponse;
|
|
51
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UsernameAvailableResponse;
|
|
52
|
+
static equals(a: UsernameAvailableResponse | PlainMessage<UsernameAvailableResponse> | undefined, b: UsernameAvailableResponse | PlainMessage<UsernameAvailableResponse> | undefined): boolean;
|
|
53
|
+
}
|
|
54
|
+
export declare class ClaimUsernameRequest extends Message<ClaimUsernameRequest> {
|
|
55
|
+
username: string;
|
|
56
|
+
constructor(data?: PartialMessage<ClaimUsernameRequest>);
|
|
57
|
+
static readonly runtime: typeof proto3;
|
|
58
|
+
static readonly typeName = "micro.v1.user.ClaimUsernameRequest";
|
|
59
|
+
static readonly fields: FieldList;
|
|
60
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ClaimUsernameRequest;
|
|
61
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ClaimUsernameRequest;
|
|
62
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ClaimUsernameRequest;
|
|
63
|
+
static equals(a: ClaimUsernameRequest | PlainMessage<ClaimUsernameRequest> | undefined, b: ClaimUsernameRequest | PlainMessage<ClaimUsernameRequest> | undefined): boolean;
|
|
64
|
+
}
|
|
65
|
+
export declare class ProfileUpdateRequest extends Message<ProfileUpdateRequest> {
|
|
66
|
+
bio?: string;
|
|
67
|
+
avatarId?: string;
|
|
68
|
+
linkX?: string;
|
|
69
|
+
linkInstagram?: string;
|
|
70
|
+
linkYoutube?: string;
|
|
71
|
+
linkTelegram?: string;
|
|
72
|
+
constructor(data?: PartialMessage<ProfileUpdateRequest>);
|
|
73
|
+
static readonly runtime: typeof proto3;
|
|
74
|
+
static readonly typeName = "micro.v1.user.ProfileUpdateRequest";
|
|
75
|
+
static readonly fields: FieldList;
|
|
76
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ProfileUpdateRequest;
|
|
77
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ProfileUpdateRequest;
|
|
78
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ProfileUpdateRequest;
|
|
79
|
+
static equals(a: ProfileUpdateRequest | PlainMessage<ProfileUpdateRequest> | undefined, b: ProfileUpdateRequest | PlainMessage<ProfileUpdateRequest> | undefined): boolean;
|
|
80
|
+
}
|
|
81
|
+
export declare class ProfileByUsernameRequest extends Message<ProfileByUsernameRequest> {
|
|
82
|
+
username: string;
|
|
83
|
+
constructor(data?: PartialMessage<ProfileByUsernameRequest>);
|
|
84
|
+
static readonly runtime: typeof proto3;
|
|
85
|
+
static readonly typeName = "micro.v1.user.ProfileByUsernameRequest";
|
|
86
|
+
static readonly fields: FieldList;
|
|
87
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ProfileByUsernameRequest;
|
|
88
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ProfileByUsernameRequest;
|
|
89
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ProfileByUsernameRequest;
|
|
90
|
+
static equals(a: ProfileByUsernameRequest | PlainMessage<ProfileByUsernameRequest> | undefined, b: ProfileByUsernameRequest | PlainMessage<ProfileByUsernameRequest> | undefined): boolean;
|
|
91
|
+
}
|
|
92
|
+
export declare class ProfileSingleResponse extends Message<ProfileSingleResponse> {
|
|
93
|
+
status?: ResponseStatus;
|
|
94
|
+
data?: ProfileDto;
|
|
95
|
+
constructor(data?: PartialMessage<ProfileSingleResponse>);
|
|
96
|
+
static readonly runtime: typeof proto3;
|
|
97
|
+
static readonly typeName = "micro.v1.user.ProfileSingleResponse";
|
|
98
|
+
static readonly fields: FieldList;
|
|
99
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ProfileSingleResponse;
|
|
100
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ProfileSingleResponse;
|
|
101
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ProfileSingleResponse;
|
|
102
|
+
static equals(a: ProfileSingleResponse | PlainMessage<ProfileSingleResponse> | undefined, b: ProfileSingleResponse | PlainMessage<ProfileSingleResponse> | undefined): boolean;
|
|
103
|
+
}
|
|
104
|
+
export declare class FollowRequest extends Message<FollowRequest> {
|
|
105
|
+
username: string;
|
|
106
|
+
constructor(data?: PartialMessage<FollowRequest>);
|
|
107
|
+
static readonly runtime: typeof proto3;
|
|
108
|
+
static readonly typeName = "micro.v1.user.FollowRequest";
|
|
109
|
+
static readonly fields: FieldList;
|
|
110
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): FollowRequest;
|
|
111
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): FollowRequest;
|
|
112
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): FollowRequest;
|
|
113
|
+
static equals(a: FollowRequest | PlainMessage<FollowRequest> | undefined, b: FollowRequest | PlainMessage<FollowRequest> | undefined): boolean;
|
|
114
|
+
}
|
|
115
|
+
export declare class LikeRequest extends Message<LikeRequest> {
|
|
116
|
+
username: string;
|
|
117
|
+
constructor(data?: PartialMessage<LikeRequest>);
|
|
118
|
+
static readonly runtime: typeof proto3;
|
|
119
|
+
static readonly typeName = "micro.v1.user.LikeRequest";
|
|
120
|
+
static readonly fields: FieldList;
|
|
121
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): LikeRequest;
|
|
122
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): LikeRequest;
|
|
123
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): LikeRequest;
|
|
124
|
+
static equals(a: LikeRequest | PlainMessage<LikeRequest> | undefined, b: LikeRequest | PlainMessage<LikeRequest> | undefined): boolean;
|
|
125
|
+
}
|
|
126
|
+
export declare class ProfileListItemDto extends Message<ProfileListItemDto> {
|
|
127
|
+
userId: string;
|
|
128
|
+
username: string;
|
|
129
|
+
avatarId: string;
|
|
130
|
+
role: string;
|
|
131
|
+
constructor(data?: PartialMessage<ProfileListItemDto>);
|
|
132
|
+
static readonly runtime: typeof proto3;
|
|
133
|
+
static readonly typeName = "micro.v1.user.ProfileListItemDto";
|
|
134
|
+
static readonly fields: FieldList;
|
|
135
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ProfileListItemDto;
|
|
136
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ProfileListItemDto;
|
|
137
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ProfileListItemDto;
|
|
138
|
+
static equals(a: ProfileListItemDto | PlainMessage<ProfileListItemDto> | undefined, b: ProfileListItemDto | PlainMessage<ProfileListItemDto> | undefined): boolean;
|
|
139
|
+
}
|
|
140
|
+
export declare class ProfileListResponse extends Message<ProfileListResponse> {
|
|
141
|
+
status?: ResponseStatus;
|
|
142
|
+
pagination?: PaginationMetaResult;
|
|
143
|
+
data: ProfileListItemDto[];
|
|
144
|
+
constructor(data?: PartialMessage<ProfileListResponse>);
|
|
145
|
+
static readonly runtime: typeof proto3;
|
|
146
|
+
static readonly typeName = "micro.v1.user.ProfileListResponse";
|
|
147
|
+
static readonly fields: FieldList;
|
|
148
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ProfileListResponse;
|
|
149
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ProfileListResponse;
|
|
150
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ProfileListResponse;
|
|
151
|
+
static equals(a: ProfileListResponse | PlainMessage<ProfileListResponse> | undefined, b: ProfileListResponse | PlainMessage<ProfileListResponse> | undefined): boolean;
|
|
152
|
+
}
|
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProfileListResponse = exports.ProfileListItemDto = exports.LikeRequest = exports.FollowRequest = exports.ProfileSingleResponse = exports.ProfileByUsernameRequest = exports.ProfileUpdateRequest = exports.ClaimUsernameRequest = exports.UsernameAvailableResponse = exports.UsernameAvailableRequest = exports.ProfileDto = void 0;
|
|
4
|
+
const protobuf_1 = require("@bufbuild/protobuf");
|
|
5
|
+
const general_pb_js_1 = require("../general_pb.js");
|
|
6
|
+
class ProfileDto extends protobuf_1.Message {
|
|
7
|
+
userId = "";
|
|
8
|
+
username = "";
|
|
9
|
+
bio = "";
|
|
10
|
+
avatarId = "";
|
|
11
|
+
linkX = "";
|
|
12
|
+
linkInstagram = "";
|
|
13
|
+
linkYoutube = "";
|
|
14
|
+
linkTelegram = "";
|
|
15
|
+
role = "";
|
|
16
|
+
followerCount = 0;
|
|
17
|
+
followingCount = 0;
|
|
18
|
+
likeCount = 0;
|
|
19
|
+
isFollowing = false;
|
|
20
|
+
isLiked = false;
|
|
21
|
+
isMe = false;
|
|
22
|
+
memberSince = "";
|
|
23
|
+
constructor(data) {
|
|
24
|
+
super();
|
|
25
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
26
|
+
}
|
|
27
|
+
static runtime = protobuf_1.proto3;
|
|
28
|
+
static typeName = "micro.v1.user.ProfileDto";
|
|
29
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
30
|
+
{ no: 1, name: "user_id", kind: "scalar", T: 9 },
|
|
31
|
+
{ no: 2, name: "username", kind: "scalar", T: 9 },
|
|
32
|
+
{ no: 3, name: "bio", kind: "scalar", T: 9 },
|
|
33
|
+
{ no: 4, name: "avatar_id", kind: "scalar", T: 9 },
|
|
34
|
+
{ no: 5, name: "link_x", kind: "scalar", T: 9 },
|
|
35
|
+
{ no: 6, name: "link_instagram", kind: "scalar", T: 9 },
|
|
36
|
+
{ no: 7, name: "link_youtube", kind: "scalar", T: 9 },
|
|
37
|
+
{ no: 8, name: "link_telegram", kind: "scalar", T: 9 },
|
|
38
|
+
{ no: 9, name: "role", kind: "scalar", T: 9 },
|
|
39
|
+
{ no: 10, name: "follower_count", kind: "scalar", T: 13 },
|
|
40
|
+
{ no: 11, name: "following_count", kind: "scalar", T: 13 },
|
|
41
|
+
{ no: 12, name: "like_count", kind: "scalar", T: 13 },
|
|
42
|
+
{ no: 13, name: "is_following", kind: "scalar", T: 8 },
|
|
43
|
+
{ no: 14, name: "is_liked", kind: "scalar", T: 8 },
|
|
44
|
+
{ no: 15, name: "is_me", kind: "scalar", T: 8 },
|
|
45
|
+
{ no: 16, name: "member_since", kind: "scalar", T: 9 },
|
|
46
|
+
]);
|
|
47
|
+
static fromBinary(bytes, options) {
|
|
48
|
+
return new ProfileDto().fromBinary(bytes, options);
|
|
49
|
+
}
|
|
50
|
+
static fromJson(jsonValue, options) {
|
|
51
|
+
return new ProfileDto().fromJson(jsonValue, options);
|
|
52
|
+
}
|
|
53
|
+
static fromJsonString(jsonString, options) {
|
|
54
|
+
return new ProfileDto().fromJsonString(jsonString, options);
|
|
55
|
+
}
|
|
56
|
+
static equals(a, b) {
|
|
57
|
+
return protobuf_1.proto3.util.equals(ProfileDto, a, b);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.ProfileDto = ProfileDto;
|
|
61
|
+
class UsernameAvailableRequest extends protobuf_1.Message {
|
|
62
|
+
username = "";
|
|
63
|
+
constructor(data) {
|
|
64
|
+
super();
|
|
65
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
66
|
+
}
|
|
67
|
+
static runtime = protobuf_1.proto3;
|
|
68
|
+
static typeName = "micro.v1.user.UsernameAvailableRequest";
|
|
69
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
70
|
+
{ no: 1, name: "username", kind: "scalar", T: 9 },
|
|
71
|
+
]);
|
|
72
|
+
static fromBinary(bytes, options) {
|
|
73
|
+
return new UsernameAvailableRequest().fromBinary(bytes, options);
|
|
74
|
+
}
|
|
75
|
+
static fromJson(jsonValue, options) {
|
|
76
|
+
return new UsernameAvailableRequest().fromJson(jsonValue, options);
|
|
77
|
+
}
|
|
78
|
+
static fromJsonString(jsonString, options) {
|
|
79
|
+
return new UsernameAvailableRequest().fromJsonString(jsonString, options);
|
|
80
|
+
}
|
|
81
|
+
static equals(a, b) {
|
|
82
|
+
return protobuf_1.proto3.util.equals(UsernameAvailableRequest, a, b);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
exports.UsernameAvailableRequest = UsernameAvailableRequest;
|
|
86
|
+
class UsernameAvailableResponse extends protobuf_1.Message {
|
|
87
|
+
status;
|
|
88
|
+
available = false;
|
|
89
|
+
reason = "";
|
|
90
|
+
constructor(data) {
|
|
91
|
+
super();
|
|
92
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
93
|
+
}
|
|
94
|
+
static runtime = protobuf_1.proto3;
|
|
95
|
+
static typeName = "micro.v1.user.UsernameAvailableResponse";
|
|
96
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
97
|
+
{ no: 1, name: "status", kind: "message", T: general_pb_js_1.ResponseStatus },
|
|
98
|
+
{ no: 2, name: "available", kind: "scalar", T: 8 },
|
|
99
|
+
{ no: 3, name: "reason", kind: "scalar", T: 9 },
|
|
100
|
+
]);
|
|
101
|
+
static fromBinary(bytes, options) {
|
|
102
|
+
return new UsernameAvailableResponse().fromBinary(bytes, options);
|
|
103
|
+
}
|
|
104
|
+
static fromJson(jsonValue, options) {
|
|
105
|
+
return new UsernameAvailableResponse().fromJson(jsonValue, options);
|
|
106
|
+
}
|
|
107
|
+
static fromJsonString(jsonString, options) {
|
|
108
|
+
return new UsernameAvailableResponse().fromJsonString(jsonString, options);
|
|
109
|
+
}
|
|
110
|
+
static equals(a, b) {
|
|
111
|
+
return protobuf_1.proto3.util.equals(UsernameAvailableResponse, a, b);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
exports.UsernameAvailableResponse = UsernameAvailableResponse;
|
|
115
|
+
class ClaimUsernameRequest extends protobuf_1.Message {
|
|
116
|
+
username = "";
|
|
117
|
+
constructor(data) {
|
|
118
|
+
super();
|
|
119
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
120
|
+
}
|
|
121
|
+
static runtime = protobuf_1.proto3;
|
|
122
|
+
static typeName = "micro.v1.user.ClaimUsernameRequest";
|
|
123
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
124
|
+
{ no: 1, name: "username", kind: "scalar", T: 9 },
|
|
125
|
+
]);
|
|
126
|
+
static fromBinary(bytes, options) {
|
|
127
|
+
return new ClaimUsernameRequest().fromBinary(bytes, options);
|
|
128
|
+
}
|
|
129
|
+
static fromJson(jsonValue, options) {
|
|
130
|
+
return new ClaimUsernameRequest().fromJson(jsonValue, options);
|
|
131
|
+
}
|
|
132
|
+
static fromJsonString(jsonString, options) {
|
|
133
|
+
return new ClaimUsernameRequest().fromJsonString(jsonString, options);
|
|
134
|
+
}
|
|
135
|
+
static equals(a, b) {
|
|
136
|
+
return protobuf_1.proto3.util.equals(ClaimUsernameRequest, a, b);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
exports.ClaimUsernameRequest = ClaimUsernameRequest;
|
|
140
|
+
class ProfileUpdateRequest extends protobuf_1.Message {
|
|
141
|
+
bio;
|
|
142
|
+
avatarId;
|
|
143
|
+
linkX;
|
|
144
|
+
linkInstagram;
|
|
145
|
+
linkYoutube;
|
|
146
|
+
linkTelegram;
|
|
147
|
+
constructor(data) {
|
|
148
|
+
super();
|
|
149
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
150
|
+
}
|
|
151
|
+
static runtime = protobuf_1.proto3;
|
|
152
|
+
static typeName = "micro.v1.user.ProfileUpdateRequest";
|
|
153
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
154
|
+
{ no: 1, name: "bio", kind: "scalar", T: 9, opt: true },
|
|
155
|
+
{ no: 2, name: "avatar_id", kind: "scalar", T: 9, opt: true },
|
|
156
|
+
{ no: 3, name: "link_x", kind: "scalar", T: 9, opt: true },
|
|
157
|
+
{ no: 4, name: "link_instagram", kind: "scalar", T: 9, opt: true },
|
|
158
|
+
{ no: 5, name: "link_youtube", kind: "scalar", T: 9, opt: true },
|
|
159
|
+
{ no: 6, name: "link_telegram", kind: "scalar", T: 9, opt: true },
|
|
160
|
+
]);
|
|
161
|
+
static fromBinary(bytes, options) {
|
|
162
|
+
return new ProfileUpdateRequest().fromBinary(bytes, options);
|
|
163
|
+
}
|
|
164
|
+
static fromJson(jsonValue, options) {
|
|
165
|
+
return new ProfileUpdateRequest().fromJson(jsonValue, options);
|
|
166
|
+
}
|
|
167
|
+
static fromJsonString(jsonString, options) {
|
|
168
|
+
return new ProfileUpdateRequest().fromJsonString(jsonString, options);
|
|
169
|
+
}
|
|
170
|
+
static equals(a, b) {
|
|
171
|
+
return protobuf_1.proto3.util.equals(ProfileUpdateRequest, a, b);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
exports.ProfileUpdateRequest = ProfileUpdateRequest;
|
|
175
|
+
class ProfileByUsernameRequest extends protobuf_1.Message {
|
|
176
|
+
username = "";
|
|
177
|
+
constructor(data) {
|
|
178
|
+
super();
|
|
179
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
180
|
+
}
|
|
181
|
+
static runtime = protobuf_1.proto3;
|
|
182
|
+
static typeName = "micro.v1.user.ProfileByUsernameRequest";
|
|
183
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
184
|
+
{ no: 1, name: "username", kind: "scalar", T: 9 },
|
|
185
|
+
]);
|
|
186
|
+
static fromBinary(bytes, options) {
|
|
187
|
+
return new ProfileByUsernameRequest().fromBinary(bytes, options);
|
|
188
|
+
}
|
|
189
|
+
static fromJson(jsonValue, options) {
|
|
190
|
+
return new ProfileByUsernameRequest().fromJson(jsonValue, options);
|
|
191
|
+
}
|
|
192
|
+
static fromJsonString(jsonString, options) {
|
|
193
|
+
return new ProfileByUsernameRequest().fromJsonString(jsonString, options);
|
|
194
|
+
}
|
|
195
|
+
static equals(a, b) {
|
|
196
|
+
return protobuf_1.proto3.util.equals(ProfileByUsernameRequest, a, b);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
exports.ProfileByUsernameRequest = ProfileByUsernameRequest;
|
|
200
|
+
class ProfileSingleResponse extends protobuf_1.Message {
|
|
201
|
+
status;
|
|
202
|
+
data;
|
|
203
|
+
constructor(data) {
|
|
204
|
+
super();
|
|
205
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
206
|
+
}
|
|
207
|
+
static runtime = protobuf_1.proto3;
|
|
208
|
+
static typeName = "micro.v1.user.ProfileSingleResponse";
|
|
209
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
210
|
+
{ no: 1, name: "status", kind: "message", T: general_pb_js_1.ResponseStatus },
|
|
211
|
+
{ no: 2, name: "data", kind: "message", T: ProfileDto },
|
|
212
|
+
]);
|
|
213
|
+
static fromBinary(bytes, options) {
|
|
214
|
+
return new ProfileSingleResponse().fromBinary(bytes, options);
|
|
215
|
+
}
|
|
216
|
+
static fromJson(jsonValue, options) {
|
|
217
|
+
return new ProfileSingleResponse().fromJson(jsonValue, options);
|
|
218
|
+
}
|
|
219
|
+
static fromJsonString(jsonString, options) {
|
|
220
|
+
return new ProfileSingleResponse().fromJsonString(jsonString, options);
|
|
221
|
+
}
|
|
222
|
+
static equals(a, b) {
|
|
223
|
+
return protobuf_1.proto3.util.equals(ProfileSingleResponse, a, b);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
exports.ProfileSingleResponse = ProfileSingleResponse;
|
|
227
|
+
class FollowRequest extends protobuf_1.Message {
|
|
228
|
+
username = "";
|
|
229
|
+
constructor(data) {
|
|
230
|
+
super();
|
|
231
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
232
|
+
}
|
|
233
|
+
static runtime = protobuf_1.proto3;
|
|
234
|
+
static typeName = "micro.v1.user.FollowRequest";
|
|
235
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
236
|
+
{ no: 1, name: "username", kind: "scalar", T: 9 },
|
|
237
|
+
]);
|
|
238
|
+
static fromBinary(bytes, options) {
|
|
239
|
+
return new FollowRequest().fromBinary(bytes, options);
|
|
240
|
+
}
|
|
241
|
+
static fromJson(jsonValue, options) {
|
|
242
|
+
return new FollowRequest().fromJson(jsonValue, options);
|
|
243
|
+
}
|
|
244
|
+
static fromJsonString(jsonString, options) {
|
|
245
|
+
return new FollowRequest().fromJsonString(jsonString, options);
|
|
246
|
+
}
|
|
247
|
+
static equals(a, b) {
|
|
248
|
+
return protobuf_1.proto3.util.equals(FollowRequest, a, b);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
exports.FollowRequest = FollowRequest;
|
|
252
|
+
class LikeRequest extends protobuf_1.Message {
|
|
253
|
+
username = "";
|
|
254
|
+
constructor(data) {
|
|
255
|
+
super();
|
|
256
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
257
|
+
}
|
|
258
|
+
static runtime = protobuf_1.proto3;
|
|
259
|
+
static typeName = "micro.v1.user.LikeRequest";
|
|
260
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
261
|
+
{ no: 1, name: "username", kind: "scalar", T: 9 },
|
|
262
|
+
]);
|
|
263
|
+
static fromBinary(bytes, options) {
|
|
264
|
+
return new LikeRequest().fromBinary(bytes, options);
|
|
265
|
+
}
|
|
266
|
+
static fromJson(jsonValue, options) {
|
|
267
|
+
return new LikeRequest().fromJson(jsonValue, options);
|
|
268
|
+
}
|
|
269
|
+
static fromJsonString(jsonString, options) {
|
|
270
|
+
return new LikeRequest().fromJsonString(jsonString, options);
|
|
271
|
+
}
|
|
272
|
+
static equals(a, b) {
|
|
273
|
+
return protobuf_1.proto3.util.equals(LikeRequest, a, b);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
exports.LikeRequest = LikeRequest;
|
|
277
|
+
class ProfileListItemDto extends protobuf_1.Message {
|
|
278
|
+
userId = "";
|
|
279
|
+
username = "";
|
|
280
|
+
avatarId = "";
|
|
281
|
+
role = "";
|
|
282
|
+
constructor(data) {
|
|
283
|
+
super();
|
|
284
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
285
|
+
}
|
|
286
|
+
static runtime = protobuf_1.proto3;
|
|
287
|
+
static typeName = "micro.v1.user.ProfileListItemDto";
|
|
288
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
289
|
+
{ no: 1, name: "user_id", kind: "scalar", T: 9 },
|
|
290
|
+
{ no: 2, name: "username", kind: "scalar", T: 9 },
|
|
291
|
+
{ no: 3, name: "avatar_id", kind: "scalar", T: 9 },
|
|
292
|
+
{ no: 4, name: "role", kind: "scalar", T: 9 },
|
|
293
|
+
]);
|
|
294
|
+
static fromBinary(bytes, options) {
|
|
295
|
+
return new ProfileListItemDto().fromBinary(bytes, options);
|
|
296
|
+
}
|
|
297
|
+
static fromJson(jsonValue, options) {
|
|
298
|
+
return new ProfileListItemDto().fromJson(jsonValue, options);
|
|
299
|
+
}
|
|
300
|
+
static fromJsonString(jsonString, options) {
|
|
301
|
+
return new ProfileListItemDto().fromJsonString(jsonString, options);
|
|
302
|
+
}
|
|
303
|
+
static equals(a, b) {
|
|
304
|
+
return protobuf_1.proto3.util.equals(ProfileListItemDto, a, b);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
exports.ProfileListItemDto = ProfileListItemDto;
|
|
308
|
+
class ProfileListResponse extends protobuf_1.Message {
|
|
309
|
+
status;
|
|
310
|
+
pagination;
|
|
311
|
+
data = [];
|
|
312
|
+
constructor(data) {
|
|
313
|
+
super();
|
|
314
|
+
protobuf_1.proto3.util.initPartial(data, this);
|
|
315
|
+
}
|
|
316
|
+
static runtime = protobuf_1.proto3;
|
|
317
|
+
static typeName = "micro.v1.user.ProfileListResponse";
|
|
318
|
+
static fields = protobuf_1.proto3.util.newFieldList(() => [
|
|
319
|
+
{ no: 1, name: "status", kind: "message", T: general_pb_js_1.ResponseStatus },
|
|
320
|
+
{ no: 2, name: "pagination", kind: "message", T: general_pb_js_1.PaginationMetaResult },
|
|
321
|
+
{ no: 3, name: "data", kind: "message", T: ProfileListItemDto, repeated: true },
|
|
322
|
+
]);
|
|
323
|
+
static fromBinary(bytes, options) {
|
|
324
|
+
return new ProfileListResponse().fromBinary(bytes, options);
|
|
325
|
+
}
|
|
326
|
+
static fromJson(jsonValue, options) {
|
|
327
|
+
return new ProfileListResponse().fromJson(jsonValue, options);
|
|
328
|
+
}
|
|
329
|
+
static fromJsonString(jsonString, options) {
|
|
330
|
+
return new ProfileListResponse().fromJsonString(jsonString, options);
|
|
331
|
+
}
|
|
332
|
+
static equals(a, b) {
|
|
333
|
+
return protobuf_1.proto3.util.equals(ProfileListResponse, a, b);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
exports.ProfileListResponse = ProfileListResponse;
|
|
@@ -3,6 +3,7 @@ import { MethodKind } from "@bufbuild/protobuf";
|
|
|
3
3
|
import { ByIdRequest, EmptyRequest, EmptyResponse, PaginateFromRequest, PaginateRequest } from "../general_pb.js";
|
|
4
4
|
import { BetaCodePaginateResponse, BetaCodeSingleResponse, BetaCodeStoreRequest, BetaCodeUpdateRequest, ContactPaginationResponse, ContactRequest, ContactResponse, PreviewResponse, PublicUserPreviewResponse, UpdatePasswordRequest, UserAdminStoreRequest, UserPaginationResponse, UserSingleResponse, UserUpdateRequest } from "./user_messages_pb.js";
|
|
5
5
|
import { SiteSettingsRequest, SiteSettingsResponse } from "./site_settings_messages_pb.js";
|
|
6
|
+
import { ClaimUsernameRequest, FollowRequest, LikeRequest, ProfileByUsernameRequest, ProfileListResponse, ProfileSingleResponse, ProfileUpdateRequest, UsernameAvailableRequest, UsernameAvailableResponse } from "./profile_messages_pb.js";
|
|
6
7
|
import { RoleAdminStoreRequest, RoleAdminUpdateRequest, RolePaginationResponse, RoleSingleResponse } from "./authorization_messages_pb.js";
|
|
7
8
|
export declare const PAuthService: {
|
|
8
9
|
readonly typeName: "micro.v1.user.PAuthService";
|
|
@@ -189,6 +190,77 @@ export declare const PUserExistService: {
|
|
|
189
190
|
};
|
|
190
191
|
};
|
|
191
192
|
};
|
|
193
|
+
export declare const PProfileService: {
|
|
194
|
+
readonly typeName: "micro.v1.user.PProfileService";
|
|
195
|
+
readonly methods: {
|
|
196
|
+
readonly usernameAvailable: {
|
|
197
|
+
readonly name: "UsernameAvailable";
|
|
198
|
+
readonly I: typeof UsernameAvailableRequest;
|
|
199
|
+
readonly O: typeof UsernameAvailableResponse;
|
|
200
|
+
readonly kind: MethodKind.ServerStreaming;
|
|
201
|
+
};
|
|
202
|
+
readonly claimUsername: {
|
|
203
|
+
readonly name: "ClaimUsername";
|
|
204
|
+
readonly I: typeof ClaimUsernameRequest;
|
|
205
|
+
readonly O: typeof ProfileSingleResponse;
|
|
206
|
+
readonly kind: MethodKind.ServerStreaming;
|
|
207
|
+
};
|
|
208
|
+
readonly myProfile: {
|
|
209
|
+
readonly name: "MyProfile";
|
|
210
|
+
readonly I: typeof EmptyRequest;
|
|
211
|
+
readonly O: typeof ProfileSingleResponse;
|
|
212
|
+
readonly kind: MethodKind.ServerStreaming;
|
|
213
|
+
};
|
|
214
|
+
readonly updateProfile: {
|
|
215
|
+
readonly name: "UpdateProfile";
|
|
216
|
+
readonly I: typeof ProfileUpdateRequest;
|
|
217
|
+
readonly O: typeof ProfileSingleResponse;
|
|
218
|
+
readonly kind: MethodKind.ServerStreaming;
|
|
219
|
+
};
|
|
220
|
+
readonly publicProfile: {
|
|
221
|
+
readonly name: "PublicProfile";
|
|
222
|
+
readonly I: typeof ProfileByUsernameRequest;
|
|
223
|
+
readonly O: typeof ProfileSingleResponse;
|
|
224
|
+
readonly kind: MethodKind.ServerStreaming;
|
|
225
|
+
};
|
|
226
|
+
readonly follow: {
|
|
227
|
+
readonly name: "Follow";
|
|
228
|
+
readonly I: typeof FollowRequest;
|
|
229
|
+
readonly O: typeof ProfileSingleResponse;
|
|
230
|
+
readonly kind: MethodKind.ServerStreaming;
|
|
231
|
+
};
|
|
232
|
+
readonly unfollow: {
|
|
233
|
+
readonly name: "Unfollow";
|
|
234
|
+
readonly I: typeof FollowRequest;
|
|
235
|
+
readonly O: typeof ProfileSingleResponse;
|
|
236
|
+
readonly kind: MethodKind.ServerStreaming;
|
|
237
|
+
};
|
|
238
|
+
readonly like: {
|
|
239
|
+
readonly name: "Like";
|
|
240
|
+
readonly I: typeof LikeRequest;
|
|
241
|
+
readonly O: typeof ProfileSingleResponse;
|
|
242
|
+
readonly kind: MethodKind.ServerStreaming;
|
|
243
|
+
};
|
|
244
|
+
readonly unlike: {
|
|
245
|
+
readonly name: "Unlike";
|
|
246
|
+
readonly I: typeof LikeRequest;
|
|
247
|
+
readonly O: typeof ProfileSingleResponse;
|
|
248
|
+
readonly kind: MethodKind.ServerStreaming;
|
|
249
|
+
};
|
|
250
|
+
readonly followers: {
|
|
251
|
+
readonly name: "Followers";
|
|
252
|
+
readonly I: typeof PaginateRequest;
|
|
253
|
+
readonly O: typeof ProfileListResponse;
|
|
254
|
+
readonly kind: MethodKind.ServerStreaming;
|
|
255
|
+
};
|
|
256
|
+
readonly following: {
|
|
257
|
+
readonly name: "Following";
|
|
258
|
+
readonly I: typeof PaginateRequest;
|
|
259
|
+
readonly O: typeof ProfileListResponse;
|
|
260
|
+
readonly kind: MethodKind.ServerStreaming;
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
};
|
|
192
264
|
export declare const PUserAdminService: {
|
|
193
265
|
readonly typeName: "micro.v1.user.PUserAdminService";
|
|
194
266
|
readonly methods: {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PBetaCodeAdminService = exports.PRoleAdminService = exports.PUserAdminService = exports.PUserExistService = exports.PUserAppleService = exports.PUserGoogleService = exports.PSiteSettingsService = exports.PRoleService = exports.PUserService = exports.PAuthService = void 0;
|
|
3
|
+
exports.PBetaCodeAdminService = exports.PRoleAdminService = exports.PUserAdminService = exports.PProfileService = exports.PUserExistService = exports.PUserAppleService = exports.PUserGoogleService = exports.PSiteSettingsService = exports.PRoleService = exports.PUserService = exports.PAuthService = void 0;
|
|
4
4
|
const auth_messages_pb_js_1 = require("./auth_messages_pb.js");
|
|
5
5
|
const protobuf_1 = require("@bufbuild/protobuf");
|
|
6
6
|
const general_pb_js_1 = require("../general_pb.js");
|
|
7
7
|
const user_messages_pb_js_1 = require("./user_messages_pb.js");
|
|
8
8
|
const site_settings_messages_pb_js_1 = require("./site_settings_messages_pb.js");
|
|
9
|
+
const profile_messages_pb_js_1 = require("./profile_messages_pb.js");
|
|
9
10
|
const authorization_messages_pb_js_1 = require("./authorization_messages_pb.js");
|
|
10
11
|
exports.PAuthService = {
|
|
11
12
|
typeName: "micro.v1.user.PAuthService",
|
|
@@ -192,6 +193,77 @@ exports.PUserExistService = {
|
|
|
192
193
|
},
|
|
193
194
|
}
|
|
194
195
|
};
|
|
196
|
+
exports.PProfileService = {
|
|
197
|
+
typeName: "micro.v1.user.PProfileService",
|
|
198
|
+
methods: {
|
|
199
|
+
usernameAvailable: {
|
|
200
|
+
name: "UsernameAvailable",
|
|
201
|
+
I: profile_messages_pb_js_1.UsernameAvailableRequest,
|
|
202
|
+
O: profile_messages_pb_js_1.UsernameAvailableResponse,
|
|
203
|
+
kind: protobuf_1.MethodKind.ServerStreaming,
|
|
204
|
+
},
|
|
205
|
+
claimUsername: {
|
|
206
|
+
name: "ClaimUsername",
|
|
207
|
+
I: profile_messages_pb_js_1.ClaimUsernameRequest,
|
|
208
|
+
O: profile_messages_pb_js_1.ProfileSingleResponse,
|
|
209
|
+
kind: protobuf_1.MethodKind.ServerStreaming,
|
|
210
|
+
},
|
|
211
|
+
myProfile: {
|
|
212
|
+
name: "MyProfile",
|
|
213
|
+
I: general_pb_js_1.EmptyRequest,
|
|
214
|
+
O: profile_messages_pb_js_1.ProfileSingleResponse,
|
|
215
|
+
kind: protobuf_1.MethodKind.ServerStreaming,
|
|
216
|
+
},
|
|
217
|
+
updateProfile: {
|
|
218
|
+
name: "UpdateProfile",
|
|
219
|
+
I: profile_messages_pb_js_1.ProfileUpdateRequest,
|
|
220
|
+
O: profile_messages_pb_js_1.ProfileSingleResponse,
|
|
221
|
+
kind: protobuf_1.MethodKind.ServerStreaming,
|
|
222
|
+
},
|
|
223
|
+
publicProfile: {
|
|
224
|
+
name: "PublicProfile",
|
|
225
|
+
I: profile_messages_pb_js_1.ProfileByUsernameRequest,
|
|
226
|
+
O: profile_messages_pb_js_1.ProfileSingleResponse,
|
|
227
|
+
kind: protobuf_1.MethodKind.ServerStreaming,
|
|
228
|
+
},
|
|
229
|
+
follow: {
|
|
230
|
+
name: "Follow",
|
|
231
|
+
I: profile_messages_pb_js_1.FollowRequest,
|
|
232
|
+
O: profile_messages_pb_js_1.ProfileSingleResponse,
|
|
233
|
+
kind: protobuf_1.MethodKind.ServerStreaming,
|
|
234
|
+
},
|
|
235
|
+
unfollow: {
|
|
236
|
+
name: "Unfollow",
|
|
237
|
+
I: profile_messages_pb_js_1.FollowRequest,
|
|
238
|
+
O: profile_messages_pb_js_1.ProfileSingleResponse,
|
|
239
|
+
kind: protobuf_1.MethodKind.ServerStreaming,
|
|
240
|
+
},
|
|
241
|
+
like: {
|
|
242
|
+
name: "Like",
|
|
243
|
+
I: profile_messages_pb_js_1.LikeRequest,
|
|
244
|
+
O: profile_messages_pb_js_1.ProfileSingleResponse,
|
|
245
|
+
kind: protobuf_1.MethodKind.ServerStreaming,
|
|
246
|
+
},
|
|
247
|
+
unlike: {
|
|
248
|
+
name: "Unlike",
|
|
249
|
+
I: profile_messages_pb_js_1.LikeRequest,
|
|
250
|
+
O: profile_messages_pb_js_1.ProfileSingleResponse,
|
|
251
|
+
kind: protobuf_1.MethodKind.ServerStreaming,
|
|
252
|
+
},
|
|
253
|
+
followers: {
|
|
254
|
+
name: "Followers",
|
|
255
|
+
I: general_pb_js_1.PaginateRequest,
|
|
256
|
+
O: profile_messages_pb_js_1.ProfileListResponse,
|
|
257
|
+
kind: protobuf_1.MethodKind.ServerStreaming,
|
|
258
|
+
},
|
|
259
|
+
following: {
|
|
260
|
+
name: "Following",
|
|
261
|
+
I: general_pb_js_1.PaginateRequest,
|
|
262
|
+
O: profile_messages_pb_js_1.ProfileListResponse,
|
|
263
|
+
kind: protobuf_1.MethodKind.ServerStreaming,
|
|
264
|
+
},
|
|
265
|
+
}
|
|
266
|
+
};
|
|
195
267
|
exports.PUserAdminService = {
|
|
196
268
|
typeName: "micro.v1.user.PUserAdminService",
|
|
197
269
|
methods: {
|
|
@@ -3,6 +3,7 @@ import { Observable } from "rxjs";
|
|
|
3
3
|
import { ByIdRequest, EmptyRequest, EmptyResponse, PaginateFromRequest, PaginateRequest } from "../general_nest";
|
|
4
4
|
import { AppleRequest, GoogleRequest, LoginRequest, LoginResponse, LostPasswordChangePasswordRequest, LostPasswordChangePasswordResponse, LostPasswordHashCheckRequest, LostPasswordHashCheckResponse, LostPasswordStartRequest, LostPasswordStartResponse, RegisterRequest, RegisterResponse, RemoveUserDataRequest, ResendVerificationEmailRequest, ResendVerificationEmailResponse, TfaRequest, TfaResponse, UserVerificationRequest, UserVerificationResponse, VerifyTokenRequest, VerifyTokenResponse } from "./auth_messages_nest";
|
|
5
5
|
import { RoleAdminStoreRequest, RoleAdminUpdateRequest, RolePaginationResponse, RoleSingleResponse } from "./authorization_messages_nest";
|
|
6
|
+
import { ClaimUsernameRequest, FollowRequest, LikeRequest, ProfileByUsernameRequest, ProfileListResponse, ProfileSingleResponse, ProfileUpdateRequest, UsernameAvailableRequest, UsernameAvailableResponse } from "./profile_messages_nest";
|
|
6
7
|
import { SiteSettingsRequest, SiteSettingsResponse } from "./site_settings_messages_nest";
|
|
7
8
|
import { BetaCodePaginateResponse, BetaCodeSingleResponse, BetaCodeStoreRequest, BetaCodeUpdateRequest, ContactPaginationResponse, ContactRequest, ContactResponse, PreviewResponse, PublicUserPreviewResponse, UpdatePasswordRequest, UserAdminStoreRequest, UserPaginationResponse, UserSingleResponse, UserUpdateRequest } from "./user_messages_nest";
|
|
8
9
|
export declare const protobufPackage = "micro.v1.user";
|
|
@@ -99,6 +100,34 @@ export interface PUserExistServiceController {
|
|
|
99
100
|
}
|
|
100
101
|
export declare function PUserExistServiceControllerMethods(): (constructor: Function) => void;
|
|
101
102
|
export declare const P_USER_EXIST_SERVICE_NAME = "PUserExistService";
|
|
103
|
+
export interface PProfileServiceClient {
|
|
104
|
+
usernameAvailable(request: UsernameAvailableRequest, metadata?: Metadata): Observable<UsernameAvailableResponse>;
|
|
105
|
+
claimUsername(request: ClaimUsernameRequest, metadata?: Metadata): Observable<ProfileSingleResponse>;
|
|
106
|
+
myProfile(request: EmptyRequest, metadata?: Metadata): Observable<ProfileSingleResponse>;
|
|
107
|
+
updateProfile(request: ProfileUpdateRequest, metadata?: Metadata): Observable<ProfileSingleResponse>;
|
|
108
|
+
publicProfile(request: ProfileByUsernameRequest, metadata?: Metadata): Observable<ProfileSingleResponse>;
|
|
109
|
+
follow(request: FollowRequest, metadata?: Metadata): Observable<ProfileSingleResponse>;
|
|
110
|
+
unfollow(request: FollowRequest, metadata?: Metadata): Observable<ProfileSingleResponse>;
|
|
111
|
+
like(request: LikeRequest, metadata?: Metadata): Observable<ProfileSingleResponse>;
|
|
112
|
+
unlike(request: LikeRequest, metadata?: Metadata): Observable<ProfileSingleResponse>;
|
|
113
|
+
followers(request: PaginateRequest, metadata?: Metadata): Observable<ProfileListResponse>;
|
|
114
|
+
following(request: PaginateRequest, metadata?: Metadata): Observable<ProfileListResponse>;
|
|
115
|
+
}
|
|
116
|
+
export interface PProfileServiceController {
|
|
117
|
+
usernameAvailable(request: UsernameAvailableRequest, metadata?: Metadata): Observable<UsernameAvailableResponse>;
|
|
118
|
+
claimUsername(request: ClaimUsernameRequest, metadata?: Metadata): Observable<ProfileSingleResponse>;
|
|
119
|
+
myProfile(request: EmptyRequest, metadata?: Metadata): Observable<ProfileSingleResponse>;
|
|
120
|
+
updateProfile(request: ProfileUpdateRequest, metadata?: Metadata): Observable<ProfileSingleResponse>;
|
|
121
|
+
publicProfile(request: ProfileByUsernameRequest, metadata?: Metadata): Observable<ProfileSingleResponse>;
|
|
122
|
+
follow(request: FollowRequest, metadata?: Metadata): Observable<ProfileSingleResponse>;
|
|
123
|
+
unfollow(request: FollowRequest, metadata?: Metadata): Observable<ProfileSingleResponse>;
|
|
124
|
+
like(request: LikeRequest, metadata?: Metadata): Observable<ProfileSingleResponse>;
|
|
125
|
+
unlike(request: LikeRequest, metadata?: Metadata): Observable<ProfileSingleResponse>;
|
|
126
|
+
followers(request: PaginateRequest, metadata?: Metadata): Observable<ProfileListResponse>;
|
|
127
|
+
following(request: PaginateRequest, metadata?: Metadata): Observable<ProfileListResponse>;
|
|
128
|
+
}
|
|
129
|
+
export declare function PProfileServiceControllerMethods(): (constructor: Function) => void;
|
|
130
|
+
export declare const P_PROFILE_SERVICE_NAME = "PProfileService";
|
|
102
131
|
export interface PUserAdminServiceClient {
|
|
103
132
|
read(request: ByIdRequest, metadata?: Metadata): Observable<UserSingleResponse>;
|
|
104
133
|
store(request: UserAdminStoreRequest, metadata?: Metadata): Observable<UserSingleResponse>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.P_BETA_CODE_ADMIN_SERVICE_NAME = exports.P_ROLE_ADMIN_SERVICE_NAME = exports.P_USER_ADMIN_SERVICE_NAME = exports.P_USER_EXIST_SERVICE_NAME = exports.P_USER_APPLE_SERVICE_NAME = exports.P_USER_GOOGLE_SERVICE_NAME = exports.P_SITE_SETTINGS_SERVICE_NAME = exports.P_ROLE_SERVICE_NAME = exports.P_USER_SERVICE_NAME = exports.P_AUTH_SERVICE_NAME = exports.MICRO_V1_USER_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
3
|
+
exports.P_BETA_CODE_ADMIN_SERVICE_NAME = exports.P_ROLE_ADMIN_SERVICE_NAME = exports.P_USER_ADMIN_SERVICE_NAME = exports.P_PROFILE_SERVICE_NAME = exports.P_USER_EXIST_SERVICE_NAME = exports.P_USER_APPLE_SERVICE_NAME = exports.P_USER_GOOGLE_SERVICE_NAME = exports.P_SITE_SETTINGS_SERVICE_NAME = exports.P_ROLE_SERVICE_NAME = exports.P_USER_SERVICE_NAME = exports.P_AUTH_SERVICE_NAME = exports.MICRO_V1_USER_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
4
4
|
exports.PAuthServiceControllerMethods = PAuthServiceControllerMethods;
|
|
5
5
|
exports.PUserServiceControllerMethods = PUserServiceControllerMethods;
|
|
6
6
|
exports.PRoleServiceControllerMethods = PRoleServiceControllerMethods;
|
|
@@ -8,6 +8,7 @@ exports.PSiteSettingsServiceControllerMethods = PSiteSettingsServiceControllerMe
|
|
|
8
8
|
exports.PUserGoogleServiceControllerMethods = PUserGoogleServiceControllerMethods;
|
|
9
9
|
exports.PUserAppleServiceControllerMethods = PUserAppleServiceControllerMethods;
|
|
10
10
|
exports.PUserExistServiceControllerMethods = PUserExistServiceControllerMethods;
|
|
11
|
+
exports.PProfileServiceControllerMethods = PProfileServiceControllerMethods;
|
|
11
12
|
exports.PUserAdminServiceControllerMethods = PUserAdminServiceControllerMethods;
|
|
12
13
|
exports.PRoleAdminServiceControllerMethods = PRoleAdminServiceControllerMethods;
|
|
13
14
|
exports.PBetaCodeAdminServiceControllerMethods = PBetaCodeAdminServiceControllerMethods;
|
|
@@ -131,6 +132,33 @@ function PUserExistServiceControllerMethods() {
|
|
|
131
132
|
};
|
|
132
133
|
}
|
|
133
134
|
exports.P_USER_EXIST_SERVICE_NAME = "PUserExistService";
|
|
135
|
+
function PProfileServiceControllerMethods() {
|
|
136
|
+
return function (constructor) {
|
|
137
|
+
const grpcMethods = [
|
|
138
|
+
"usernameAvailable",
|
|
139
|
+
"claimUsername",
|
|
140
|
+
"myProfile",
|
|
141
|
+
"updateProfile",
|
|
142
|
+
"publicProfile",
|
|
143
|
+
"follow",
|
|
144
|
+
"unfollow",
|
|
145
|
+
"like",
|
|
146
|
+
"unlike",
|
|
147
|
+
"followers",
|
|
148
|
+
"following",
|
|
149
|
+
];
|
|
150
|
+
for (const method of grpcMethods) {
|
|
151
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
152
|
+
(0, microservices_1.GrpcMethod)("PProfileService", method)(constructor.prototype[method], method, descriptor);
|
|
153
|
+
}
|
|
154
|
+
const grpcStreamMethods = [];
|
|
155
|
+
for (const method of grpcStreamMethods) {
|
|
156
|
+
const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
157
|
+
(0, microservices_1.GrpcStreamMethod)("PProfileService", method)(constructor.prototype[method], method, descriptor);
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
exports.P_PROFILE_SERVICE_NAME = "PProfileService";
|
|
134
162
|
function PUserAdminServiceControllerMethods() {
|
|
135
163
|
return function (constructor) {
|
|
136
164
|
const grpcMethods = [
|
package/package.json
CHANGED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package micro.v1.user;
|
|
4
|
+
|
|
5
|
+
import "micro/v1/general.proto";
|
|
6
|
+
|
|
7
|
+
// ===== Public profile (chat + profile pages) =====
|
|
8
|
+
|
|
9
|
+
message ProfileDto {
|
|
10
|
+
string user_id = 1;
|
|
11
|
+
|
|
12
|
+
// Canonical lowercase username; empty string when not claimed yet.
|
|
13
|
+
string username = 2;
|
|
14
|
+
|
|
15
|
+
string bio = 3;
|
|
16
|
+
string avatar_id = 4;
|
|
17
|
+
|
|
18
|
+
// Social links; empty string = not set.
|
|
19
|
+
string link_x = 5;
|
|
20
|
+
string link_instagram = 6;
|
|
21
|
+
string link_youtube = 7;
|
|
22
|
+
string link_telegram = 8;
|
|
23
|
+
|
|
24
|
+
// Global role of the user (user | vip | moderator | admin).
|
|
25
|
+
string role = 9;
|
|
26
|
+
|
|
27
|
+
uint32 follower_count = 10;
|
|
28
|
+
uint32 following_count = 11;
|
|
29
|
+
uint32 like_count = 12;
|
|
30
|
+
|
|
31
|
+
// Relation of the requesting user to this profile (false for anonymous).
|
|
32
|
+
bool is_following = 13;
|
|
33
|
+
bool is_liked = 14;
|
|
34
|
+
bool is_me = 15;
|
|
35
|
+
|
|
36
|
+
string member_since = 16;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
message UsernameAvailableRequest { string username = 1; }
|
|
40
|
+
|
|
41
|
+
message UsernameAvailableResponse {
|
|
42
|
+
ResponseStatus status = 1;
|
|
43
|
+
bool available = 2;
|
|
44
|
+
// invalid_format | reserved | taken | ok
|
|
45
|
+
string reason = 3;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
message ClaimUsernameRequest { string username = 1; }
|
|
49
|
+
|
|
50
|
+
message ProfileUpdateRequest {
|
|
51
|
+
optional string bio = 1;
|
|
52
|
+
optional string avatar_id = 2;
|
|
53
|
+
optional string link_x = 3;
|
|
54
|
+
optional string link_instagram = 4;
|
|
55
|
+
optional string link_youtube = 5;
|
|
56
|
+
optional string link_telegram = 6;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
message ProfileByUsernameRequest { string username = 1; }
|
|
60
|
+
|
|
61
|
+
message ProfileSingleResponse {
|
|
62
|
+
ResponseStatus status = 1;
|
|
63
|
+
ProfileDto data = 2;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
message FollowRequest { string username = 1; }
|
|
67
|
+
message LikeRequest { string username = 1; }
|
|
68
|
+
|
|
69
|
+
message ProfileListItemDto {
|
|
70
|
+
string user_id = 1;
|
|
71
|
+
string username = 2;
|
|
72
|
+
string avatar_id = 3;
|
|
73
|
+
string role = 4;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
message ProfileListResponse {
|
|
77
|
+
ResponseStatus status = 1;
|
|
78
|
+
PaginationMetaResult pagination = 2;
|
|
79
|
+
repeated ProfileListItemDto data = 3;
|
|
80
|
+
}
|
|
@@ -7,6 +7,7 @@ import "micro/v1/user/authorization_messages.proto";
|
|
|
7
7
|
import "micro/v1/user/user_messages.proto";
|
|
8
8
|
import "micro/v1/user/auth_messages.proto";
|
|
9
9
|
import "micro/v1/user/site_settings_messages.proto";
|
|
10
|
+
import "micro/v1/user/profile_messages.proto";
|
|
10
11
|
|
|
11
12
|
service PAuthService {
|
|
12
13
|
rpc Login(LoginRequest) returns(stream LoginResponse) {}
|
|
@@ -58,6 +59,20 @@ service PUserExistService {
|
|
|
58
59
|
rpc CheckUserExist(ByIdRequest) returns(stream EmptyResponse) {}
|
|
59
60
|
}
|
|
60
61
|
|
|
62
|
+
service PProfileService {
|
|
63
|
+
rpc UsernameAvailable(UsernameAvailableRequest) returns(stream UsernameAvailableResponse) {}
|
|
64
|
+
rpc ClaimUsername(ClaimUsernameRequest) returns(stream ProfileSingleResponse) {}
|
|
65
|
+
rpc MyProfile(EmptyRequest) returns(stream ProfileSingleResponse) {}
|
|
66
|
+
rpc UpdateProfile(ProfileUpdateRequest) returns(stream ProfileSingleResponse) {}
|
|
67
|
+
rpc PublicProfile(ProfileByUsernameRequest) returns(stream ProfileSingleResponse) {}
|
|
68
|
+
rpc Follow(FollowRequest) returns(stream ProfileSingleResponse) {}
|
|
69
|
+
rpc Unfollow(FollowRequest) returns(stream ProfileSingleResponse) {}
|
|
70
|
+
rpc Like(LikeRequest) returns(stream ProfileSingleResponse) {}
|
|
71
|
+
rpc Unlike(LikeRequest) returns(stream ProfileSingleResponse) {}
|
|
72
|
+
rpc Followers(PaginateRequest) returns(stream ProfileListResponse) {}
|
|
73
|
+
rpc Following(PaginateRequest) returns(stream ProfileListResponse) {}
|
|
74
|
+
}
|
|
75
|
+
|
|
61
76
|
// Admin
|
|
62
77
|
|
|
63
78
|
service PUserAdminService {
|