naijarea-ts 1.0.2
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/account.d.ts +229 -0
- package/dist/account.js +2211 -0
- package/dist/admin.d.ts +49 -0
- package/dist/admin.js +164 -0
- package/dist/auth.d.ts +242 -0
- package/dist/auth.js +1750 -0
- package/dist/chat.d.ts +49 -0
- package/dist/chat.js +163 -0
- package/dist/common.d.ts +60 -0
- package/dist/common.js +543 -0
- package/dist/google/api/annotations.d.ts +1 -0
- package/dist/google/api/annotations.js +10 -0
- package/dist/google/api/field_behavior.d.ts +76 -0
- package/dist/google/api/field_behavior.js +146 -0
- package/dist/google/api/http.d.ts +379 -0
- package/dist/google/api/http.js +360 -0
- package/dist/google/api/httpbody.d.ts +78 -0
- package/dist/google/api/httpbody.js +127 -0
- package/dist/google/protobuf/any.d.ts +144 -0
- package/dist/google/protobuf/any.js +108 -0
- package/dist/google/protobuf/descriptor.d.ts +1338 -0
- package/dist/google/protobuf/descriptor.js +5427 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +190 -0
- package/dist/lookup.d.ts +876 -0
- package/dist/lookup.js +6841 -0
- package/dist/posts.d.ts +374 -0
- package/dist/posts.js +2784 -0
- package/package.json +43 -0
package/dist/admin.d.ts
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
export declare const protobufPackage = "pb";
|
|
3
|
+
export interface AdminGetStatusRequest {
|
|
4
|
+
}
|
|
5
|
+
export interface AdminGetStatusResponse {
|
|
6
|
+
status: string;
|
|
7
|
+
service: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const AdminGetStatusRequest: MessageFns<AdminGetStatusRequest>;
|
|
10
|
+
export declare const AdminGetStatusResponse: MessageFns<AdminGetStatusResponse>;
|
|
11
|
+
/** Admin Service */
|
|
12
|
+
export type AdminServiceDefinition = typeof AdminServiceDefinition;
|
|
13
|
+
export declare const AdminServiceDefinition: {
|
|
14
|
+
readonly name: "AdminService";
|
|
15
|
+
readonly fullName: "pb.AdminService";
|
|
16
|
+
readonly methods: {
|
|
17
|
+
readonly getStatus: {
|
|
18
|
+
readonly name: "GetStatus";
|
|
19
|
+
readonly requestType: MessageFns<AdminGetStatusRequest>;
|
|
20
|
+
readonly requestStream: false;
|
|
21
|
+
readonly responseType: MessageFns<AdminGetStatusResponse>;
|
|
22
|
+
readonly responseStream: false;
|
|
23
|
+
readonly options: {
|
|
24
|
+
readonly _unknownFields: {
|
|
25
|
+
readonly 578365826: readonly [Uint8Array<ArrayBuffer>];
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
32
|
+
export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
33
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
34
|
+
} : Partial<T>;
|
|
35
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
36
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
37
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
38
|
+
} & {
|
|
39
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
40
|
+
};
|
|
41
|
+
export interface MessageFns<T> {
|
|
42
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
43
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
44
|
+
fromJSON(object: any): T;
|
|
45
|
+
toJSON(message: T): unknown;
|
|
46
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
47
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
48
|
+
}
|
|
49
|
+
export {};
|
package/dist/admin.js
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v2.10.0
|
|
5
|
+
// protoc v6.33.2
|
|
6
|
+
// source: admin.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.AdminServiceDefinition = exports.AdminGetStatusResponse = exports.AdminGetStatusRequest = exports.protobufPackage = void 0;
|
|
9
|
+
/* eslint-disable */
|
|
10
|
+
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
11
|
+
exports.protobufPackage = "pb";
|
|
12
|
+
function createBaseAdminGetStatusRequest() {
|
|
13
|
+
return {};
|
|
14
|
+
}
|
|
15
|
+
exports.AdminGetStatusRequest = {
|
|
16
|
+
encode(_, writer = new wire_1.BinaryWriter()) {
|
|
17
|
+
return writer;
|
|
18
|
+
},
|
|
19
|
+
decode(input, length) {
|
|
20
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
21
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
22
|
+
const message = createBaseAdminGetStatusRequest();
|
|
23
|
+
while (reader.pos < end) {
|
|
24
|
+
const tag = reader.uint32();
|
|
25
|
+
switch (tag >>> 3) {
|
|
26
|
+
}
|
|
27
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
28
|
+
break;
|
|
29
|
+
}
|
|
30
|
+
reader.skip(tag & 7);
|
|
31
|
+
}
|
|
32
|
+
return message;
|
|
33
|
+
},
|
|
34
|
+
fromJSON(_) {
|
|
35
|
+
return {};
|
|
36
|
+
},
|
|
37
|
+
toJSON(_) {
|
|
38
|
+
const obj = {};
|
|
39
|
+
return obj;
|
|
40
|
+
},
|
|
41
|
+
create(base) {
|
|
42
|
+
return exports.AdminGetStatusRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
43
|
+
},
|
|
44
|
+
fromPartial(_) {
|
|
45
|
+
const message = createBaseAdminGetStatusRequest();
|
|
46
|
+
return message;
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
function createBaseAdminGetStatusResponse() {
|
|
50
|
+
return { status: "", service: "" };
|
|
51
|
+
}
|
|
52
|
+
exports.AdminGetStatusResponse = {
|
|
53
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
54
|
+
if (message.status !== "") {
|
|
55
|
+
writer.uint32(10).string(message.status);
|
|
56
|
+
}
|
|
57
|
+
if (message.service !== "") {
|
|
58
|
+
writer.uint32(18).string(message.service);
|
|
59
|
+
}
|
|
60
|
+
return writer;
|
|
61
|
+
},
|
|
62
|
+
decode(input, length) {
|
|
63
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
64
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
65
|
+
const message = createBaseAdminGetStatusResponse();
|
|
66
|
+
while (reader.pos < end) {
|
|
67
|
+
const tag = reader.uint32();
|
|
68
|
+
switch (tag >>> 3) {
|
|
69
|
+
case 1: {
|
|
70
|
+
if (tag !== 10) {
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
message.status = reader.string();
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
case 2: {
|
|
77
|
+
if (tag !== 18) {
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
message.service = reader.string();
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
reader.skip(tag & 7);
|
|
88
|
+
}
|
|
89
|
+
return message;
|
|
90
|
+
},
|
|
91
|
+
fromJSON(object) {
|
|
92
|
+
return {
|
|
93
|
+
status: isSet(object.status) ? globalThis.String(object.status) : "",
|
|
94
|
+
service: isSet(object.service) ? globalThis.String(object.service) : "",
|
|
95
|
+
};
|
|
96
|
+
},
|
|
97
|
+
toJSON(message) {
|
|
98
|
+
const obj = {};
|
|
99
|
+
if (message.status !== "") {
|
|
100
|
+
obj.status = message.status;
|
|
101
|
+
}
|
|
102
|
+
if (message.service !== "") {
|
|
103
|
+
obj.service = message.service;
|
|
104
|
+
}
|
|
105
|
+
return obj;
|
|
106
|
+
},
|
|
107
|
+
create(base) {
|
|
108
|
+
return exports.AdminGetStatusResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
109
|
+
},
|
|
110
|
+
fromPartial(object) {
|
|
111
|
+
var _a, _b;
|
|
112
|
+
const message = createBaseAdminGetStatusResponse();
|
|
113
|
+
message.status = (_a = object.status) !== null && _a !== void 0 ? _a : "";
|
|
114
|
+
message.service = (_b = object.service) !== null && _b !== void 0 ? _b : "";
|
|
115
|
+
return message;
|
|
116
|
+
},
|
|
117
|
+
};
|
|
118
|
+
exports.AdminServiceDefinition = {
|
|
119
|
+
name: "AdminService",
|
|
120
|
+
fullName: "pb.AdminService",
|
|
121
|
+
methods: {
|
|
122
|
+
getStatus: {
|
|
123
|
+
name: "GetStatus",
|
|
124
|
+
requestType: exports.AdminGetStatusRequest,
|
|
125
|
+
requestStream: false,
|
|
126
|
+
responseType: exports.AdminGetStatusResponse,
|
|
127
|
+
responseStream: false,
|
|
128
|
+
options: {
|
|
129
|
+
_unknownFields: {
|
|
130
|
+
578365826: [
|
|
131
|
+
new Uint8Array([
|
|
132
|
+
22,
|
|
133
|
+
18,
|
|
134
|
+
20,
|
|
135
|
+
47,
|
|
136
|
+
97,
|
|
137
|
+
112,
|
|
138
|
+
105,
|
|
139
|
+
47,
|
|
140
|
+
118,
|
|
141
|
+
49,
|
|
142
|
+
47,
|
|
143
|
+
97,
|
|
144
|
+
100,
|
|
145
|
+
109,
|
|
146
|
+
105,
|
|
147
|
+
110,
|
|
148
|
+
47,
|
|
149
|
+
115,
|
|
150
|
+
116,
|
|
151
|
+
97,
|
|
152
|
+
116,
|
|
153
|
+
117,
|
|
154
|
+
115,
|
|
155
|
+
]),
|
|
156
|
+
],
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
};
|
|
162
|
+
function isSet(value) {
|
|
163
|
+
return value !== null && value !== undefined;
|
|
164
|
+
}
|
package/dist/auth.d.ts
ADDED
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
import { AccountStatus } from "./account";
|
|
3
|
+
import { DeleteResponse } from "./common";
|
|
4
|
+
export declare const protobufPackage = "pb";
|
|
5
|
+
export interface RegisterRequest {
|
|
6
|
+
email: string;
|
|
7
|
+
password: string;
|
|
8
|
+
}
|
|
9
|
+
export interface RegisterResponse {
|
|
10
|
+
accountId: string;
|
|
11
|
+
accountTypeId: string;
|
|
12
|
+
accountType: string;
|
|
13
|
+
email: string;
|
|
14
|
+
}
|
|
15
|
+
export interface LoginRequest {
|
|
16
|
+
email: string;
|
|
17
|
+
password: string;
|
|
18
|
+
}
|
|
19
|
+
export interface LoginResponse {
|
|
20
|
+
session: Session | undefined;
|
|
21
|
+
}
|
|
22
|
+
export interface RefreshTokenRequest {
|
|
23
|
+
refreshToken: string;
|
|
24
|
+
}
|
|
25
|
+
export interface LogoutRequest {
|
|
26
|
+
token: string;
|
|
27
|
+
}
|
|
28
|
+
export interface ActivateAccountRequest {
|
|
29
|
+
email: string;
|
|
30
|
+
otp: string;
|
|
31
|
+
}
|
|
32
|
+
export interface ResendActivationRequest {
|
|
33
|
+
email: string;
|
|
34
|
+
}
|
|
35
|
+
export interface ForgotPasswordRequest {
|
|
36
|
+
email: string;
|
|
37
|
+
}
|
|
38
|
+
export interface ResetPasswordRequest {
|
|
39
|
+
token: string;
|
|
40
|
+
newPassword: string;
|
|
41
|
+
confirmPassword: string;
|
|
42
|
+
}
|
|
43
|
+
export interface ValidateTokenRequest {
|
|
44
|
+
token: string;
|
|
45
|
+
}
|
|
46
|
+
export interface ValidateTokenResponse {
|
|
47
|
+
valid: boolean;
|
|
48
|
+
user: User | undefined;
|
|
49
|
+
}
|
|
50
|
+
export interface GetUserRequest {
|
|
51
|
+
accountId: string;
|
|
52
|
+
}
|
|
53
|
+
export interface GetUserResponse {
|
|
54
|
+
user: User | undefined;
|
|
55
|
+
}
|
|
56
|
+
export interface Session {
|
|
57
|
+
accessToken: string;
|
|
58
|
+
refreshToken: string;
|
|
59
|
+
expiresAt: number;
|
|
60
|
+
user: User | undefined;
|
|
61
|
+
accountStatus: AccountStatus | undefined;
|
|
62
|
+
}
|
|
63
|
+
export interface User {
|
|
64
|
+
id: string;
|
|
65
|
+
name: string;
|
|
66
|
+
email: string;
|
|
67
|
+
username: string;
|
|
68
|
+
accountType: string;
|
|
69
|
+
accountTypeId: string;
|
|
70
|
+
emailVerified: boolean;
|
|
71
|
+
status: string;
|
|
72
|
+
phoneNumber: string;
|
|
73
|
+
photoUrl: string;
|
|
74
|
+
coverPhotoUrl: string;
|
|
75
|
+
gender: string;
|
|
76
|
+
location: string;
|
|
77
|
+
kyced: boolean;
|
|
78
|
+
createdAt: string;
|
|
79
|
+
}
|
|
80
|
+
export declare const RegisterRequest: MessageFns<RegisterRequest>;
|
|
81
|
+
export declare const RegisterResponse: MessageFns<RegisterResponse>;
|
|
82
|
+
export declare const LoginRequest: MessageFns<LoginRequest>;
|
|
83
|
+
export declare const LoginResponse: MessageFns<LoginResponse>;
|
|
84
|
+
export declare const RefreshTokenRequest: MessageFns<RefreshTokenRequest>;
|
|
85
|
+
export declare const LogoutRequest: MessageFns<LogoutRequest>;
|
|
86
|
+
export declare const ActivateAccountRequest: MessageFns<ActivateAccountRequest>;
|
|
87
|
+
export declare const ResendActivationRequest: MessageFns<ResendActivationRequest>;
|
|
88
|
+
export declare const ForgotPasswordRequest: MessageFns<ForgotPasswordRequest>;
|
|
89
|
+
export declare const ResetPasswordRequest: MessageFns<ResetPasswordRequest>;
|
|
90
|
+
export declare const ValidateTokenRequest: MessageFns<ValidateTokenRequest>;
|
|
91
|
+
export declare const ValidateTokenResponse: MessageFns<ValidateTokenResponse>;
|
|
92
|
+
export declare const GetUserRequest: MessageFns<GetUserRequest>;
|
|
93
|
+
export declare const GetUserResponse: MessageFns<GetUserResponse>;
|
|
94
|
+
export declare const Session: MessageFns<Session>;
|
|
95
|
+
export declare const User: MessageFns<User>;
|
|
96
|
+
/** Auth Service */
|
|
97
|
+
export type AuthServiceDefinition = typeof AuthServiceDefinition;
|
|
98
|
+
export declare const AuthServiceDefinition: {
|
|
99
|
+
readonly name: "AuthService";
|
|
100
|
+
readonly fullName: "pb.AuthService";
|
|
101
|
+
readonly methods: {
|
|
102
|
+
readonly register: {
|
|
103
|
+
readonly name: "Register";
|
|
104
|
+
readonly requestType: MessageFns<RegisterRequest>;
|
|
105
|
+
readonly requestStream: false;
|
|
106
|
+
readonly responseType: MessageFns<RegisterResponse>;
|
|
107
|
+
readonly responseStream: false;
|
|
108
|
+
readonly options: {
|
|
109
|
+
readonly _unknownFields: {
|
|
110
|
+
readonly 578365826: readonly [Uint8Array<ArrayBuffer>];
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
readonly login: {
|
|
115
|
+
readonly name: "Login";
|
|
116
|
+
readonly requestType: MessageFns<LoginRequest>;
|
|
117
|
+
readonly requestStream: false;
|
|
118
|
+
readonly responseType: MessageFns<LoginResponse>;
|
|
119
|
+
readonly responseStream: false;
|
|
120
|
+
readonly options: {
|
|
121
|
+
readonly _unknownFields: {
|
|
122
|
+
readonly 578365826: readonly [Uint8Array<ArrayBuffer>];
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
readonly refreshToken: {
|
|
127
|
+
readonly name: "RefreshToken";
|
|
128
|
+
readonly requestType: MessageFns<RefreshTokenRequest>;
|
|
129
|
+
readonly requestStream: false;
|
|
130
|
+
readonly responseType: MessageFns<LoginResponse>;
|
|
131
|
+
readonly responseStream: false;
|
|
132
|
+
readonly options: {
|
|
133
|
+
readonly _unknownFields: {
|
|
134
|
+
readonly 578365826: readonly [Uint8Array<ArrayBuffer>];
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
readonly logout: {
|
|
139
|
+
readonly name: "Logout";
|
|
140
|
+
readonly requestType: MessageFns<LogoutRequest>;
|
|
141
|
+
readonly requestStream: false;
|
|
142
|
+
readonly responseType: import("./common").MessageFns<DeleteResponse>;
|
|
143
|
+
readonly responseStream: false;
|
|
144
|
+
readonly options: {
|
|
145
|
+
readonly _unknownFields: {
|
|
146
|
+
readonly 578365826: readonly [Uint8Array<ArrayBuffer>];
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
readonly activateAccount: {
|
|
151
|
+
readonly name: "ActivateAccount";
|
|
152
|
+
readonly requestType: MessageFns<ActivateAccountRequest>;
|
|
153
|
+
readonly requestStream: false;
|
|
154
|
+
readonly responseType: MessageFns<LoginResponse>;
|
|
155
|
+
readonly responseStream: false;
|
|
156
|
+
readonly options: {
|
|
157
|
+
readonly _unknownFields: {
|
|
158
|
+
readonly 578365826: readonly [Uint8Array<ArrayBuffer>];
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
};
|
|
162
|
+
readonly resendActivation: {
|
|
163
|
+
readonly name: "ResendActivation";
|
|
164
|
+
readonly requestType: MessageFns<ResendActivationRequest>;
|
|
165
|
+
readonly requestStream: false;
|
|
166
|
+
readonly responseType: import("./common").MessageFns<DeleteResponse>;
|
|
167
|
+
readonly responseStream: false;
|
|
168
|
+
readonly options: {
|
|
169
|
+
readonly _unknownFields: {
|
|
170
|
+
readonly 578365826: readonly [Uint8Array<ArrayBuffer>];
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
readonly forgotPassword: {
|
|
175
|
+
readonly name: "ForgotPassword";
|
|
176
|
+
readonly requestType: MessageFns<ForgotPasswordRequest>;
|
|
177
|
+
readonly requestStream: false;
|
|
178
|
+
readonly responseType: import("./common").MessageFns<DeleteResponse>;
|
|
179
|
+
readonly responseStream: false;
|
|
180
|
+
readonly options: {
|
|
181
|
+
readonly _unknownFields: {
|
|
182
|
+
readonly 578365826: readonly [Uint8Array<ArrayBuffer>];
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
readonly resetPassword: {
|
|
187
|
+
readonly name: "ResetPassword";
|
|
188
|
+
readonly requestType: MessageFns<ResetPasswordRequest>;
|
|
189
|
+
readonly requestStream: false;
|
|
190
|
+
readonly responseType: import("./common").MessageFns<DeleteResponse>;
|
|
191
|
+
readonly responseStream: false;
|
|
192
|
+
readonly options: {
|
|
193
|
+
readonly _unknownFields: {
|
|
194
|
+
readonly 578365826: readonly [Uint8Array<ArrayBuffer>];
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
readonly validateToken: {
|
|
199
|
+
readonly name: "ValidateToken";
|
|
200
|
+
readonly requestType: MessageFns<ValidateTokenRequest>;
|
|
201
|
+
readonly requestStream: false;
|
|
202
|
+
readonly responseType: MessageFns<ValidateTokenResponse>;
|
|
203
|
+
readonly responseStream: false;
|
|
204
|
+
readonly options: {
|
|
205
|
+
readonly _unknownFields: {
|
|
206
|
+
readonly 578365826: readonly [Uint8Array<ArrayBuffer>];
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
readonly getUser: {
|
|
211
|
+
readonly name: "GetUser";
|
|
212
|
+
readonly requestType: MessageFns<GetUserRequest>;
|
|
213
|
+
readonly requestStream: false;
|
|
214
|
+
readonly responseType: MessageFns<GetUserResponse>;
|
|
215
|
+
readonly responseStream: false;
|
|
216
|
+
readonly options: {
|
|
217
|
+
readonly _unknownFields: {
|
|
218
|
+
readonly 578365826: readonly [Uint8Array<ArrayBuffer>];
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
225
|
+
export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
226
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
227
|
+
} : Partial<T>;
|
|
228
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
229
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
230
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
231
|
+
} & {
|
|
232
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
233
|
+
};
|
|
234
|
+
export interface MessageFns<T> {
|
|
235
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
236
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
237
|
+
fromJSON(object: any): T;
|
|
238
|
+
toJSON(message: T): unknown;
|
|
239
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
240
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
241
|
+
}
|
|
242
|
+
export {};
|