@conduitplatform/grpc-sdk 0.16.25 → 0.17.0-alpha.1
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/LICENSE +21 -0
- package/dist/index.cjs +18092 -14811
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3388 -0
- package/dist/index.d.ts +3308 -21
- package/dist/index.esm.js +17840 -14619
- package/dist/index.esm.js.map +1 -1
- package/dist/module.proto +25 -0
- package/package.json +32 -36
- package/dist/classes/ConduitAuthorizedResource.d.ts +0 -12
- package/dist/classes/ConduitModule.d.ts +0 -28
- package/dist/classes/ConduitSchema.d.ts +0 -10
- package/dist/classes/Error.d.ts +0 -11
- package/dist/classes/HealthCheck.d.ts +0 -1
- package/dist/classes/index.d.ts +0 -5
- package/dist/constants/enums/PlatformTypesEnum.d.ts +0 -10
- package/dist/constants/enums/index.d.ts +0 -1
- package/dist/constants/index.d.ts +0 -1
- package/dist/interceptors/grpcSignedToken.d.ts +0 -2
- package/dist/interceptors/index.d.ts +0 -2
- package/dist/interceptors/moduleName.d.ts +0 -2
- package/dist/interfaces/ConduitMiddleware.d.ts +0 -7
- package/dist/interfaces/ConduitRoute.d.ts +0 -7
- package/dist/interfaces/ConduitRouteReturn.d.ts +0 -48
- package/dist/interfaces/ConduitSchemaExtension.d.ts +0 -5
- package/dist/interfaces/GrpcCallback.d.ts +0 -4
- package/dist/interfaces/IConduitLogger.d.ts +0 -13
- package/dist/interfaces/IConduitMetrics.d.ts +0 -16
- package/dist/interfaces/Indexable.d.ts +0 -9
- package/dist/interfaces/Model.d.ts +0 -170
- package/dist/interfaces/Params.d.ts +0 -8
- package/dist/interfaces/ProxyRoute.d.ts +0 -42
- package/dist/interfaces/RawQuery.d.ts +0 -22
- package/dist/interfaces/Route.d.ts +0 -71
- package/dist/interfaces/Socket.d.ts +0 -22
- package/dist/interfaces/UntypedArray.d.ts +0 -1
- package/dist/interfaces/index.d.ts +0 -16
- package/dist/interfaces/types.d.ts +0 -38
- package/dist/modules/admin/index.d.ts +0 -9
- package/dist/modules/authentication/index.d.ts +0 -23
- package/dist/modules/authorization/index.d.ts +0 -20
- package/dist/modules/chat/index.d.ts +0 -9
- package/dist/modules/config/index.d.ts +0 -33
- package/dist/modules/core/index.d.ts +0 -6
- package/dist/modules/database/index.d.ts +0 -63
- package/dist/modules/database/types.d.ts +0 -17
- package/dist/modules/email/index.d.ts +0 -36
- package/dist/modules/index.d.ts +0 -12
- package/dist/modules/pushNotifications/index.d.ts +0 -24
- package/dist/modules/pushNotifications/types.d.ts +0 -7
- package/dist/modules/router/index.d.ts +0 -10
- package/dist/modules/sms/index.d.ts +0 -9
- package/dist/modules/storage/index.d.ts +0 -24
- package/dist/modules/storage/types.d.ts +0 -24
- package/dist/protoUtils/authentication.d.ts +0 -665
- package/dist/protoUtils/authorization.d.ts +0 -524
- package/dist/protoUtils/chat.d.ts +0 -142
- package/dist/protoUtils/core.d.ts +0 -569
- package/dist/protoUtils/database.d.ts +0 -864
- package/dist/protoUtils/email.d.ts +0 -266
- package/dist/protoUtils/google/protobuf/empty.d.ts +0 -25
- package/dist/protoUtils/grpc_health_check.d.ts +0 -88
- package/dist/protoUtils/index.d.ts +0 -12
- package/dist/protoUtils/module.d.ts +0 -251
- package/dist/protoUtils/push-notifications.d.ts +0 -225
- package/dist/protoUtils/router.d.ts +0 -205
- package/dist/protoUtils/sms.d.ts +0 -147
- package/dist/protoUtils/storage.d.ts +0 -354
- package/dist/types/db.d.ts +0 -26
- package/dist/types/index.d.ts +0 -28
- package/dist/types/options.d.ts +0 -7
- package/dist/utilities/EventBus.d.ts +0 -12
- package/dist/utilities/RedisManager.d.ts +0 -24
- package/dist/utilities/StateManager.d.ts +0 -19
- package/dist/utilities/env.d.ts +0 -1
- package/dist/utilities/index.d.ts +0 -5
- package/dist/utilities/normalizeOptions.d.ts +0 -3
- package/dist/utilities/sleep.d.ts +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,3299 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
1
|
+
import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
|
|
2
|
+
import { CompatServiceDefinition, Channel, Client } from 'nice-grpc';
|
|
3
|
+
import { EventEmitter } from 'events';
|
|
4
|
+
import { Metadata, status } from '@grpc/grpc-js';
|
|
5
|
+
export * from '@grpc/grpc-js';
|
|
6
|
+
import { RedisOptions, ClusterOptions, Redis, Cluster } from 'ioredis';
|
|
7
|
+
import { Lock } from '@sesamecare-oss/redlock';
|
|
8
|
+
import winston, { Logger } from 'winston';
|
|
9
|
+
import { MetricConfiguration, CounterConfiguration, Counter, SummaryConfiguration, Summary, HistogramConfiguration, Histogram, GaugeConfiguration, Gauge, Metric, LabelValues } from 'prom-client';
|
|
10
|
+
|
|
11
|
+
declare class ConduitError extends Error {
|
|
12
|
+
message: string;
|
|
13
|
+
name: string;
|
|
14
|
+
status: number;
|
|
15
|
+
constructor(name: string, status: number, message: string);
|
|
16
|
+
static unauthorized(message?: string): ConduitError;
|
|
17
|
+
static notFound(message?: string): ConduitError;
|
|
18
|
+
static forbidden(message?: string): ConduitError;
|
|
19
|
+
static userInput(message?: string): ConduitError;
|
|
20
|
+
static internalServerError(message?: string): void;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
declare enum HealthCheckResponse_ServingStatus {
|
|
24
|
+
UNKNOWN = 0,
|
|
25
|
+
SERVING = 1,
|
|
26
|
+
NOT_SERVING = 2,
|
|
27
|
+
SERVICE_UNKNOWN = 3,
|
|
28
|
+
UNRECOGNIZED = -1
|
|
29
|
+
}
|
|
30
|
+
declare function healthCheckResponse_ServingStatusFromJSON(object: any): HealthCheckResponse_ServingStatus;
|
|
31
|
+
declare function healthCheckResponse_ServingStatusToJSON(object: HealthCheckResponse_ServingStatus): string;
|
|
32
|
+
interface HealthCheckRequest {
|
|
33
|
+
service: string;
|
|
34
|
+
}
|
|
35
|
+
declare const HealthCheckRequest: MessageFns$a<HealthCheckRequest>;
|
|
36
|
+
interface HealthCheckResponse {
|
|
37
|
+
status: HealthCheckResponse_ServingStatus;
|
|
38
|
+
}
|
|
39
|
+
declare const HealthCheckResponse: MessageFns$a<HealthCheckResponse>;
|
|
40
|
+
type HealthDefinition = typeof HealthDefinition;
|
|
41
|
+
declare const HealthDefinition: {
|
|
42
|
+
readonly name: "Health";
|
|
43
|
+
readonly fullName: "grpc.health.v1.Health";
|
|
44
|
+
readonly methods: {
|
|
45
|
+
readonly check: {
|
|
46
|
+
readonly name: "Check";
|
|
47
|
+
readonly requestType: typeof HealthCheckRequest;
|
|
48
|
+
readonly requestStream: false;
|
|
49
|
+
readonly responseType: typeof HealthCheckResponse;
|
|
50
|
+
readonly responseStream: false;
|
|
51
|
+
readonly options: {};
|
|
52
|
+
};
|
|
53
|
+
readonly watch: {
|
|
54
|
+
readonly name: "Watch";
|
|
55
|
+
readonly requestType: typeof HealthCheckRequest;
|
|
56
|
+
readonly requestStream: false;
|
|
57
|
+
readonly responseType: typeof HealthCheckResponse;
|
|
58
|
+
readonly responseStream: true;
|
|
59
|
+
readonly options: {};
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
type Builtin$a = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
64
|
+
type DeepPartial$a<T> = T extends Builtin$a ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial$a<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial$a<U>> : T extends {} ? {
|
|
65
|
+
[K in keyof T]?: DeepPartial$a<T[K]>;
|
|
66
|
+
} : Partial<T>;
|
|
67
|
+
interface MessageFns$a<T> {
|
|
68
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
69
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
70
|
+
fromJSON(object: any): T;
|
|
71
|
+
toJSON(message: T): unknown;
|
|
72
|
+
create(base?: DeepPartial$a<T>): T;
|
|
73
|
+
fromPartial(object: DeepPartial$a<T>): T;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* A generic empty message that you can re-use to avoid defining duplicated
|
|
78
|
+
* empty messages in your APIs. A typical example is to use it as the request
|
|
79
|
+
* or the response type of an API method. For instance:
|
|
80
|
+
*
|
|
81
|
+
* service Foo {
|
|
82
|
+
* rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
|
83
|
+
* }
|
|
84
|
+
*/
|
|
85
|
+
interface Empty {
|
|
86
|
+
}
|
|
87
|
+
declare const Empty: MessageFns$9<Empty>;
|
|
88
|
+
type Builtin$9 = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
89
|
+
type DeepPartial$9<T> = T extends Builtin$9 ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial$9<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial$9<U>> : T extends {} ? {
|
|
90
|
+
[K in keyof T]?: DeepPartial$9<T[K]>;
|
|
91
|
+
} : Partial<T>;
|
|
92
|
+
interface MessageFns$9<T> {
|
|
93
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
94
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
95
|
+
fromJSON(object: any): T;
|
|
96
|
+
toJSON(message: T): unknown;
|
|
97
|
+
create(base?: DeepPartial$9<T>): T;
|
|
98
|
+
fromPartial(object: DeepPartial$9<T>): T;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
declare enum ValidateAccessTokenResponse_Status {
|
|
102
|
+
AUTHENTICATED = 0,
|
|
103
|
+
UNAUTHENTICATED = 1,
|
|
104
|
+
REQUIRES_2FA = 2,
|
|
105
|
+
USER_BLOCKED = 3,
|
|
106
|
+
UNRECOGNIZED = -1
|
|
107
|
+
}
|
|
108
|
+
declare function validateAccessTokenResponse_StatusFromJSON(object: any): ValidateAccessTokenResponse_Status;
|
|
109
|
+
declare function validateAccessTokenResponse_StatusToJSON(object: ValidateAccessTokenResponse_Status): string;
|
|
110
|
+
interface UserLoginRequest {
|
|
111
|
+
userId: string;
|
|
112
|
+
clientId: string;
|
|
113
|
+
}
|
|
114
|
+
declare const UserLoginRequest: MessageFns$8<UserLoginRequest>;
|
|
115
|
+
interface UserCreateRequest {
|
|
116
|
+
email: string;
|
|
117
|
+
password?: string | undefined;
|
|
118
|
+
verify: boolean;
|
|
119
|
+
anonymousId?: string | undefined;
|
|
120
|
+
userData?: string | undefined;
|
|
121
|
+
}
|
|
122
|
+
declare const UserCreateRequest: MessageFns$8<UserCreateRequest>;
|
|
123
|
+
interface UserCreateByUsernameRequest {
|
|
124
|
+
username: string;
|
|
125
|
+
password?: string | undefined;
|
|
126
|
+
anonymousId?: string | undefined;
|
|
127
|
+
}
|
|
128
|
+
declare const UserCreateByUsernameRequest: MessageFns$8<UserCreateByUsernameRequest>;
|
|
129
|
+
interface UserChangePass {
|
|
130
|
+
email: string;
|
|
131
|
+
password?: string | undefined;
|
|
132
|
+
}
|
|
133
|
+
declare const UserChangePass: MessageFns$8<UserChangePass>;
|
|
134
|
+
interface UserDeleteRequest {
|
|
135
|
+
userId: string;
|
|
136
|
+
}
|
|
137
|
+
declare const UserDeleteRequest: MessageFns$8<UserDeleteRequest>;
|
|
138
|
+
interface GetTeamRequest {
|
|
139
|
+
teamId?: string | undefined;
|
|
140
|
+
}
|
|
141
|
+
declare const GetTeamRequest: MessageFns$8<GetTeamRequest>;
|
|
142
|
+
interface CreateTeamRequest {
|
|
143
|
+
name: string;
|
|
144
|
+
parentTeam?: string | undefined;
|
|
145
|
+
isDefault?: boolean | undefined;
|
|
146
|
+
}
|
|
147
|
+
declare const CreateTeamRequest: MessageFns$8<CreateTeamRequest>;
|
|
148
|
+
interface TeamDeleteRequest {
|
|
149
|
+
teamId: string;
|
|
150
|
+
}
|
|
151
|
+
declare const TeamDeleteRequest: MessageFns$8<TeamDeleteRequest>;
|
|
152
|
+
interface UserLoginResponse {
|
|
153
|
+
accessToken: string;
|
|
154
|
+
refreshToken?: string | undefined;
|
|
155
|
+
}
|
|
156
|
+
declare const UserLoginResponse: MessageFns$8<UserLoginResponse>;
|
|
157
|
+
interface UserDeleteResponse {
|
|
158
|
+
message: string;
|
|
159
|
+
}
|
|
160
|
+
declare const UserDeleteResponse: MessageFns$8<UserDeleteResponse>;
|
|
161
|
+
interface UserCreateResponse {
|
|
162
|
+
password?: string | undefined;
|
|
163
|
+
}
|
|
164
|
+
declare const UserCreateResponse: MessageFns$8<UserCreateResponse>;
|
|
165
|
+
interface Team {
|
|
166
|
+
id: string;
|
|
167
|
+
name: string;
|
|
168
|
+
parentTeam: string;
|
|
169
|
+
isDefault: boolean;
|
|
170
|
+
}
|
|
171
|
+
declare const Team: MessageFns$8<Team>;
|
|
172
|
+
interface TeamDeleteResponse {
|
|
173
|
+
message: string;
|
|
174
|
+
}
|
|
175
|
+
declare const TeamDeleteResponse: MessageFns$8<TeamDeleteResponse>;
|
|
176
|
+
interface ModifyTeamMembersRequest {
|
|
177
|
+
teamId: string;
|
|
178
|
+
memberIds: string[];
|
|
179
|
+
}
|
|
180
|
+
declare const ModifyTeamMembersRequest: MessageFns$8<ModifyTeamMembersRequest>;
|
|
181
|
+
interface ValidateAccessTokenRequest {
|
|
182
|
+
accessToken: string;
|
|
183
|
+
path?: string | undefined;
|
|
184
|
+
}
|
|
185
|
+
declare const ValidateAccessTokenRequest: MessageFns$8<ValidateAccessTokenRequest>;
|
|
186
|
+
interface ValidateAccessTokenResponse {
|
|
187
|
+
status: ValidateAccessTokenResponse_Status;
|
|
188
|
+
userId?: string | undefined;
|
|
189
|
+
}
|
|
190
|
+
declare const ValidateAccessTokenResponse: MessageFns$8<ValidateAccessTokenResponse>;
|
|
191
|
+
interface AnonymousUserCreateRequest {
|
|
192
|
+
clientId: string;
|
|
193
|
+
}
|
|
194
|
+
declare const AnonymousUserCreateRequest: MessageFns$8<AnonymousUserCreateRequest>;
|
|
195
|
+
interface UserModifyStatusRequest {
|
|
196
|
+
id: string;
|
|
197
|
+
active: boolean;
|
|
198
|
+
}
|
|
199
|
+
declare const UserModifyStatusRequest: MessageFns$8<UserModifyStatusRequest>;
|
|
200
|
+
interface UserModifyStatusResponse {
|
|
201
|
+
message: string;
|
|
202
|
+
}
|
|
203
|
+
declare const UserModifyStatusResponse: MessageFns$8<UserModifyStatusResponse>;
|
|
204
|
+
interface InvitationDeleteRequest {
|
|
205
|
+
teamId: string;
|
|
206
|
+
email: string;
|
|
207
|
+
}
|
|
208
|
+
declare const InvitationDeleteRequest: MessageFns$8<InvitationDeleteRequest>;
|
|
209
|
+
interface InvitationDeleteResponse {
|
|
210
|
+
message: string;
|
|
211
|
+
}
|
|
212
|
+
declare const InvitationDeleteResponse: MessageFns$8<InvitationDeleteResponse>;
|
|
213
|
+
interface InviteUserToTeamRequest {
|
|
214
|
+
teamId: string;
|
|
215
|
+
email: string;
|
|
216
|
+
role: string;
|
|
217
|
+
inviterUserId: string;
|
|
218
|
+
redirectUri?: string | undefined;
|
|
219
|
+
userData?: string | undefined;
|
|
220
|
+
}
|
|
221
|
+
declare const InviteUserToTeamRequest: MessageFns$8<InviteUserToTeamRequest>;
|
|
222
|
+
interface InviteUserToTeamResponse {
|
|
223
|
+
invitationToken: string;
|
|
224
|
+
}
|
|
225
|
+
declare const InviteUserToTeamResponse: MessageFns$8<InviteUserToTeamResponse>;
|
|
226
|
+
interface UpdateTeamRequest {
|
|
227
|
+
teamId: string;
|
|
228
|
+
name?: string | undefined;
|
|
229
|
+
newParentTeamId?: string | undefined;
|
|
230
|
+
}
|
|
231
|
+
declare const UpdateTeamRequest: MessageFns$8<UpdateTeamRequest>;
|
|
232
|
+
type AuthenticationDefinition = typeof AuthenticationDefinition;
|
|
233
|
+
declare const AuthenticationDefinition: {
|
|
234
|
+
readonly name: "Authentication";
|
|
235
|
+
readonly fullName: "authentication.Authentication";
|
|
236
|
+
readonly methods: {
|
|
237
|
+
readonly userLogin: {
|
|
238
|
+
readonly name: "UserLogin";
|
|
239
|
+
readonly requestType: typeof UserLoginRequest;
|
|
240
|
+
readonly requestStream: false;
|
|
241
|
+
readonly responseType: typeof UserLoginResponse;
|
|
242
|
+
readonly responseStream: false;
|
|
243
|
+
readonly options: {};
|
|
244
|
+
};
|
|
245
|
+
readonly userCreate: {
|
|
246
|
+
readonly name: "UserCreate";
|
|
247
|
+
readonly requestType: typeof UserCreateRequest;
|
|
248
|
+
readonly requestStream: false;
|
|
249
|
+
readonly responseType: typeof UserCreateResponse;
|
|
250
|
+
readonly responseStream: false;
|
|
251
|
+
readonly options: {};
|
|
252
|
+
};
|
|
253
|
+
readonly userCreateByUsername: {
|
|
254
|
+
readonly name: "UserCreateByUsername";
|
|
255
|
+
readonly requestType: typeof UserCreateByUsernameRequest;
|
|
256
|
+
readonly requestStream: false;
|
|
257
|
+
readonly responseType: typeof UserCreateResponse;
|
|
258
|
+
readonly responseStream: false;
|
|
259
|
+
readonly options: {};
|
|
260
|
+
};
|
|
261
|
+
readonly userModifyStatus: {
|
|
262
|
+
readonly name: "UserModifyStatus";
|
|
263
|
+
readonly requestType: typeof UserModifyStatusRequest;
|
|
264
|
+
readonly requestStream: false;
|
|
265
|
+
readonly responseType: typeof UserModifyStatusResponse;
|
|
266
|
+
readonly responseStream: false;
|
|
267
|
+
readonly options: {};
|
|
268
|
+
};
|
|
269
|
+
readonly anonymousUserCreate: {
|
|
270
|
+
readonly name: "AnonymousUserCreate";
|
|
271
|
+
readonly requestType: typeof AnonymousUserCreateRequest;
|
|
272
|
+
readonly requestStream: false;
|
|
273
|
+
readonly responseType: typeof UserLoginResponse;
|
|
274
|
+
readonly responseStream: false;
|
|
275
|
+
readonly options: {};
|
|
276
|
+
};
|
|
277
|
+
readonly changePass: {
|
|
278
|
+
readonly name: "ChangePass";
|
|
279
|
+
readonly requestType: typeof UserChangePass;
|
|
280
|
+
readonly requestStream: false;
|
|
281
|
+
readonly responseType: typeof UserCreateResponse;
|
|
282
|
+
readonly responseStream: false;
|
|
283
|
+
readonly options: {};
|
|
284
|
+
};
|
|
285
|
+
readonly userDelete: {
|
|
286
|
+
readonly name: "UserDelete";
|
|
287
|
+
readonly requestType: typeof UserDeleteRequest;
|
|
288
|
+
readonly requestStream: false;
|
|
289
|
+
readonly responseType: typeof UserDeleteResponse;
|
|
290
|
+
readonly responseStream: false;
|
|
291
|
+
readonly options: {};
|
|
292
|
+
};
|
|
293
|
+
readonly getTeam: {
|
|
294
|
+
readonly name: "GetTeam";
|
|
295
|
+
readonly requestType: typeof GetTeamRequest;
|
|
296
|
+
readonly requestStream: false;
|
|
297
|
+
readonly responseType: typeof Team;
|
|
298
|
+
readonly responseStream: false;
|
|
299
|
+
readonly options: {};
|
|
300
|
+
};
|
|
301
|
+
readonly createTeam: {
|
|
302
|
+
readonly name: "CreateTeam";
|
|
303
|
+
readonly requestType: typeof CreateTeamRequest;
|
|
304
|
+
readonly requestStream: false;
|
|
305
|
+
readonly responseType: typeof Team;
|
|
306
|
+
readonly responseStream: false;
|
|
307
|
+
readonly options: {};
|
|
308
|
+
};
|
|
309
|
+
readonly teamDelete: {
|
|
310
|
+
readonly name: "TeamDelete";
|
|
311
|
+
readonly requestType: typeof TeamDeleteRequest;
|
|
312
|
+
readonly requestStream: false;
|
|
313
|
+
readonly responseType: typeof TeamDeleteResponse;
|
|
314
|
+
readonly responseStream: false;
|
|
315
|
+
readonly options: {};
|
|
316
|
+
};
|
|
317
|
+
readonly addTeamMembers: {
|
|
318
|
+
readonly name: "AddTeamMembers";
|
|
319
|
+
readonly requestType: typeof ModifyTeamMembersRequest;
|
|
320
|
+
readonly requestStream: false;
|
|
321
|
+
readonly responseType: typeof Empty;
|
|
322
|
+
readonly responseStream: false;
|
|
323
|
+
readonly options: {};
|
|
324
|
+
};
|
|
325
|
+
readonly removeTeamMembers: {
|
|
326
|
+
readonly name: "RemoveTeamMembers";
|
|
327
|
+
readonly requestType: typeof ModifyTeamMembersRequest;
|
|
328
|
+
readonly requestStream: false;
|
|
329
|
+
readonly responseType: typeof Empty;
|
|
330
|
+
readonly responseStream: false;
|
|
331
|
+
readonly options: {};
|
|
332
|
+
};
|
|
333
|
+
readonly validateAccessToken: {
|
|
334
|
+
readonly name: "ValidateAccessToken";
|
|
335
|
+
readonly requestType: typeof ValidateAccessTokenRequest;
|
|
336
|
+
readonly requestStream: false;
|
|
337
|
+
readonly responseType: typeof ValidateAccessTokenResponse;
|
|
338
|
+
readonly responseStream: false;
|
|
339
|
+
readonly options: {};
|
|
340
|
+
};
|
|
341
|
+
readonly invitationDelete: {
|
|
342
|
+
readonly name: "InvitationDelete";
|
|
343
|
+
readonly requestType: typeof InvitationDeleteRequest;
|
|
344
|
+
readonly requestStream: false;
|
|
345
|
+
readonly responseType: typeof InvitationDeleteResponse;
|
|
346
|
+
readonly responseStream: false;
|
|
347
|
+
readonly options: {};
|
|
348
|
+
};
|
|
349
|
+
readonly inviteUserToTeam: {
|
|
350
|
+
readonly name: "InviteUserToTeam";
|
|
351
|
+
readonly requestType: typeof InviteUserToTeamRequest;
|
|
352
|
+
readonly requestStream: false;
|
|
353
|
+
readonly responseType: typeof InviteUserToTeamResponse;
|
|
354
|
+
readonly responseStream: false;
|
|
355
|
+
readonly options: {};
|
|
356
|
+
};
|
|
357
|
+
readonly updateTeam: {
|
|
358
|
+
readonly name: "UpdateTeam";
|
|
359
|
+
readonly requestType: typeof UpdateTeamRequest;
|
|
360
|
+
readonly requestStream: false;
|
|
361
|
+
readonly responseType: typeof Team;
|
|
362
|
+
readonly responseStream: false;
|
|
363
|
+
readonly options: {};
|
|
364
|
+
};
|
|
365
|
+
};
|
|
366
|
+
};
|
|
367
|
+
type Builtin$8 = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
368
|
+
type DeepPartial$8<T> = T extends Builtin$8 ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial$8<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial$8<U>> : T extends {} ? {
|
|
369
|
+
[K in keyof T]?: DeepPartial$8<T[K]>;
|
|
370
|
+
} : Partial<T>;
|
|
371
|
+
interface MessageFns$8<T> {
|
|
372
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
373
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
374
|
+
fromJSON(object: any): T;
|
|
375
|
+
toJSON(message: T): unknown;
|
|
376
|
+
create(base?: DeepPartial$8<T>): T;
|
|
377
|
+
fromPartial(object: DeepPartial$8<T>): T;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
declare enum ResourceModificationAcknowledgement_Status {
|
|
381
|
+
PROCESSED = 0,
|
|
382
|
+
ACKNOWLEDGED = 1,
|
|
383
|
+
IGNORED = 2,
|
|
384
|
+
UNRECOGNIZED = -1
|
|
385
|
+
}
|
|
386
|
+
declare function resourceModificationAcknowledgement_StatusFromJSON(object: any): ResourceModificationAcknowledgement_Status;
|
|
387
|
+
declare function resourceModificationAcknowledgement_StatusToJSON(object: ResourceModificationAcknowledgement_Status): string;
|
|
388
|
+
interface Resource {
|
|
389
|
+
name: string;
|
|
390
|
+
relations: Resource_Relation[];
|
|
391
|
+
permissions: Resource_Permission[];
|
|
392
|
+
version?: number | undefined;
|
|
393
|
+
}
|
|
394
|
+
declare const Resource: MessageFns$7<Resource>;
|
|
395
|
+
interface Resource_Relation {
|
|
396
|
+
name: string;
|
|
397
|
+
resourceType: string[];
|
|
398
|
+
}
|
|
399
|
+
declare const Resource_Relation: MessageFns$7<Resource_Relation>;
|
|
400
|
+
interface Resource_Permission {
|
|
401
|
+
name: string;
|
|
402
|
+
roles: string[];
|
|
403
|
+
}
|
|
404
|
+
declare const Resource_Permission: MessageFns$7<Resource_Permission>;
|
|
405
|
+
interface ResourceModificationAcknowledgement {
|
|
406
|
+
status: ResourceModificationAcknowledgement_Status;
|
|
407
|
+
}
|
|
408
|
+
declare const ResourceModificationAcknowledgement: MessageFns$7<ResourceModificationAcknowledgement>;
|
|
409
|
+
interface Relation {
|
|
410
|
+
subject: string;
|
|
411
|
+
relation: string;
|
|
412
|
+
resource: string;
|
|
413
|
+
}
|
|
414
|
+
declare const Relation: MessageFns$7<Relation>;
|
|
415
|
+
interface CreateRelationsRequest {
|
|
416
|
+
subject: string;
|
|
417
|
+
relation: string;
|
|
418
|
+
resources: string[];
|
|
419
|
+
}
|
|
420
|
+
declare const CreateRelationsRequest: MessageFns$7<CreateRelationsRequest>;
|
|
421
|
+
interface DeleteAllRelationsRequest {
|
|
422
|
+
subject?: string | undefined;
|
|
423
|
+
resource?: string | undefined;
|
|
424
|
+
}
|
|
425
|
+
declare const DeleteAllRelationsRequest: MessageFns$7<DeleteAllRelationsRequest>;
|
|
426
|
+
interface DeleteResourceRequest {
|
|
427
|
+
name: string;
|
|
428
|
+
}
|
|
429
|
+
declare const DeleteResourceRequest: MessageFns$7<DeleteResourceRequest>;
|
|
430
|
+
interface FindRelationRequest {
|
|
431
|
+
subject?: string | undefined;
|
|
432
|
+
relation?: string | undefined;
|
|
433
|
+
resource?: string | undefined;
|
|
434
|
+
subjectType?: string | undefined;
|
|
435
|
+
resourceType?: string | undefined;
|
|
436
|
+
skip?: number | undefined;
|
|
437
|
+
limit?: number | undefined;
|
|
438
|
+
}
|
|
439
|
+
declare const FindRelationRequest: MessageFns$7<FindRelationRequest>;
|
|
440
|
+
interface FindRelationResponse {
|
|
441
|
+
relations: Relation[];
|
|
442
|
+
count: number;
|
|
443
|
+
}
|
|
444
|
+
declare const FindRelationResponse: MessageFns$7<FindRelationResponse>;
|
|
445
|
+
interface AllowedResourcesRequest {
|
|
446
|
+
subject: string;
|
|
447
|
+
action: string;
|
|
448
|
+
resourceType: string;
|
|
449
|
+
skip: number;
|
|
450
|
+
limit: number;
|
|
451
|
+
}
|
|
452
|
+
declare const AllowedResourcesRequest: MessageFns$7<AllowedResourcesRequest>;
|
|
453
|
+
interface AllowedResourcesResponse {
|
|
454
|
+
resources: string[];
|
|
455
|
+
count: number;
|
|
456
|
+
}
|
|
457
|
+
declare const AllowedResourcesResponse: MessageFns$7<AllowedResourcesResponse>;
|
|
458
|
+
interface ResourceAccessListRequest {
|
|
459
|
+
subject: string;
|
|
460
|
+
action: string;
|
|
461
|
+
viewName?: string | undefined;
|
|
462
|
+
resourceType: string;
|
|
463
|
+
}
|
|
464
|
+
declare const ResourceAccessListRequest: MessageFns$7<ResourceAccessListRequest>;
|
|
465
|
+
interface ResourceAccessListResponse {
|
|
466
|
+
viewName: string;
|
|
467
|
+
}
|
|
468
|
+
declare const ResourceAccessListResponse: MessageFns$7<ResourceAccessListResponse>;
|
|
469
|
+
interface PermissionCheck {
|
|
470
|
+
subject: string;
|
|
471
|
+
actions: string[];
|
|
472
|
+
resource: string;
|
|
473
|
+
}
|
|
474
|
+
declare const PermissionCheck: MessageFns$7<PermissionCheck>;
|
|
475
|
+
interface PermissionRequest {
|
|
476
|
+
subject: string;
|
|
477
|
+
action: string;
|
|
478
|
+
resource: string;
|
|
479
|
+
}
|
|
480
|
+
declare const PermissionRequest: MessageFns$7<PermissionRequest>;
|
|
481
|
+
interface Decision {
|
|
482
|
+
allow: boolean;
|
|
483
|
+
}
|
|
484
|
+
declare const Decision: MessageFns$7<Decision>;
|
|
485
|
+
type AuthorizationDefinition = typeof AuthorizationDefinition;
|
|
486
|
+
declare const AuthorizationDefinition: {
|
|
487
|
+
readonly name: "Authorization";
|
|
488
|
+
readonly fullName: "authorization.Authorization";
|
|
489
|
+
readonly methods: {
|
|
490
|
+
readonly defineResource: {
|
|
491
|
+
readonly name: "DefineResource";
|
|
492
|
+
readonly requestType: typeof Resource;
|
|
493
|
+
readonly requestStream: false;
|
|
494
|
+
readonly responseType: typeof ResourceModificationAcknowledgement;
|
|
495
|
+
readonly responseStream: false;
|
|
496
|
+
readonly options: {};
|
|
497
|
+
};
|
|
498
|
+
readonly deleteResource: {
|
|
499
|
+
readonly name: "DeleteResource";
|
|
500
|
+
readonly requestType: typeof DeleteResourceRequest;
|
|
501
|
+
readonly requestStream: false;
|
|
502
|
+
readonly responseType: typeof Empty;
|
|
503
|
+
readonly responseStream: false;
|
|
504
|
+
readonly options: {};
|
|
505
|
+
};
|
|
506
|
+
readonly updateResource: {
|
|
507
|
+
readonly name: "UpdateResource";
|
|
508
|
+
readonly requestType: typeof Resource;
|
|
509
|
+
readonly requestStream: false;
|
|
510
|
+
readonly responseType: typeof ResourceModificationAcknowledgement;
|
|
511
|
+
readonly responseStream: false;
|
|
512
|
+
readonly options: {};
|
|
513
|
+
};
|
|
514
|
+
readonly createRelation: {
|
|
515
|
+
readonly name: "CreateRelation";
|
|
516
|
+
readonly requestType: typeof Relation;
|
|
517
|
+
readonly requestStream: false;
|
|
518
|
+
readonly responseType: typeof Empty;
|
|
519
|
+
readonly responseStream: false;
|
|
520
|
+
readonly options: {};
|
|
521
|
+
};
|
|
522
|
+
readonly createRelations: {
|
|
523
|
+
readonly name: "CreateRelations";
|
|
524
|
+
readonly requestType: typeof CreateRelationsRequest;
|
|
525
|
+
readonly requestStream: false;
|
|
526
|
+
readonly responseType: typeof Empty;
|
|
527
|
+
readonly responseStream: false;
|
|
528
|
+
readonly options: {};
|
|
529
|
+
};
|
|
530
|
+
readonly deleteRelation: {
|
|
531
|
+
readonly name: "DeleteRelation";
|
|
532
|
+
readonly requestType: typeof Relation;
|
|
533
|
+
readonly requestStream: false;
|
|
534
|
+
readonly responseType: typeof Empty;
|
|
535
|
+
readonly responseStream: false;
|
|
536
|
+
readonly options: {};
|
|
537
|
+
};
|
|
538
|
+
readonly grantPermission: {
|
|
539
|
+
readonly name: "GrantPermission";
|
|
540
|
+
readonly requestType: typeof PermissionRequest;
|
|
541
|
+
readonly requestStream: false;
|
|
542
|
+
readonly responseType: typeof Empty;
|
|
543
|
+
readonly responseStream: false;
|
|
544
|
+
readonly options: {};
|
|
545
|
+
};
|
|
546
|
+
readonly removePermission: {
|
|
547
|
+
readonly name: "RemovePermission";
|
|
548
|
+
readonly requestType: typeof PermissionRequest;
|
|
549
|
+
readonly requestStream: false;
|
|
550
|
+
readonly responseType: typeof Empty;
|
|
551
|
+
readonly responseStream: false;
|
|
552
|
+
readonly options: {};
|
|
553
|
+
};
|
|
554
|
+
readonly deleteAllRelations: {
|
|
555
|
+
readonly name: "DeleteAllRelations";
|
|
556
|
+
readonly requestType: typeof DeleteAllRelationsRequest;
|
|
557
|
+
readonly requestStream: false;
|
|
558
|
+
readonly responseType: typeof Empty;
|
|
559
|
+
readonly responseStream: false;
|
|
560
|
+
readonly options: {};
|
|
561
|
+
};
|
|
562
|
+
readonly findRelation: {
|
|
563
|
+
readonly name: "FindRelation";
|
|
564
|
+
readonly requestType: typeof FindRelationRequest;
|
|
565
|
+
readonly requestStream: false;
|
|
566
|
+
readonly responseType: typeof FindRelationResponse;
|
|
567
|
+
readonly responseStream: false;
|
|
568
|
+
readonly options: {};
|
|
569
|
+
};
|
|
570
|
+
readonly can: {
|
|
571
|
+
readonly name: "Can";
|
|
572
|
+
readonly requestType: typeof PermissionCheck;
|
|
573
|
+
readonly requestStream: false;
|
|
574
|
+
readonly responseType: typeof Decision;
|
|
575
|
+
readonly responseStream: false;
|
|
576
|
+
readonly options: {};
|
|
577
|
+
};
|
|
578
|
+
readonly getAllowedResources: {
|
|
579
|
+
readonly name: "GetAllowedResources";
|
|
580
|
+
readonly requestType: typeof AllowedResourcesRequest;
|
|
581
|
+
readonly requestStream: false;
|
|
582
|
+
readonly responseType: typeof AllowedResourcesResponse;
|
|
583
|
+
readonly responseStream: false;
|
|
584
|
+
readonly options: {};
|
|
585
|
+
};
|
|
586
|
+
readonly createResourceAccessList: {
|
|
587
|
+
readonly name: "CreateResourceAccessList";
|
|
588
|
+
readonly requestType: typeof ResourceAccessListRequest;
|
|
589
|
+
readonly requestStream: false;
|
|
590
|
+
readonly responseType: typeof ResourceAccessListResponse;
|
|
591
|
+
readonly responseStream: false;
|
|
592
|
+
readonly options: {};
|
|
593
|
+
};
|
|
594
|
+
};
|
|
595
|
+
};
|
|
596
|
+
type Builtin$7 = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
597
|
+
type DeepPartial$7<T> = T extends Builtin$7 ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial$7<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial$7<U>> : T extends {} ? {
|
|
598
|
+
[K in keyof T]?: DeepPartial$7<T[K]>;
|
|
599
|
+
} : Partial<T>;
|
|
600
|
+
interface MessageFns$7<T> {
|
|
601
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
602
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
603
|
+
fromJSON(object: any): T;
|
|
604
|
+
toJSON(message: T): unknown;
|
|
605
|
+
create(base?: DeepPartial$7<T>): T;
|
|
606
|
+
fromPartial(object: DeepPartial$7<T>): T;
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
interface CreateRoomRequest {
|
|
610
|
+
name: string;
|
|
611
|
+
participants: string[];
|
|
612
|
+
}
|
|
613
|
+
declare const CreateRoomRequest: MessageFns$6<CreateRoomRequest>;
|
|
614
|
+
interface SendMessageRequest {
|
|
615
|
+
message: string;
|
|
616
|
+
userId: string;
|
|
617
|
+
roomId: string;
|
|
618
|
+
messageType?: string | undefined;
|
|
619
|
+
persist?: boolean | undefined;
|
|
620
|
+
}
|
|
621
|
+
declare const SendMessageRequest: MessageFns$6<SendMessageRequest>;
|
|
622
|
+
interface DeleteRoomRequest {
|
|
623
|
+
_id: string;
|
|
624
|
+
}
|
|
625
|
+
declare const DeleteRoomRequest: MessageFns$6<DeleteRoomRequest>;
|
|
626
|
+
interface Room {
|
|
627
|
+
_id: string;
|
|
628
|
+
name: string;
|
|
629
|
+
participants: string[];
|
|
630
|
+
}
|
|
631
|
+
declare const Room: MessageFns$6<Room>;
|
|
632
|
+
interface GetRoomResponse {
|
|
633
|
+
rooms: Room[];
|
|
634
|
+
}
|
|
635
|
+
declare const GetRoomResponse: MessageFns$6<GetRoomResponse>;
|
|
636
|
+
type ChatDefinition = typeof ChatDefinition;
|
|
637
|
+
declare const ChatDefinition: {
|
|
638
|
+
readonly name: "Chat";
|
|
639
|
+
readonly fullName: "chat.Chat";
|
|
640
|
+
readonly methods: {
|
|
641
|
+
readonly createRoom: {
|
|
642
|
+
readonly name: "CreateRoom";
|
|
643
|
+
readonly requestType: typeof CreateRoomRequest;
|
|
644
|
+
readonly requestStream: false;
|
|
645
|
+
readonly responseType: typeof Room;
|
|
646
|
+
readonly responseStream: false;
|
|
647
|
+
readonly options: {};
|
|
648
|
+
};
|
|
649
|
+
readonly deleteRoom: {
|
|
650
|
+
readonly name: "DeleteRoom";
|
|
651
|
+
readonly requestType: typeof DeleteRoomRequest;
|
|
652
|
+
readonly requestStream: false;
|
|
653
|
+
readonly responseType: typeof Room;
|
|
654
|
+
readonly responseStream: false;
|
|
655
|
+
readonly options: {};
|
|
656
|
+
};
|
|
657
|
+
readonly sendMessage: {
|
|
658
|
+
readonly name: "SendMessage";
|
|
659
|
+
readonly requestType: typeof SendMessageRequest;
|
|
660
|
+
readonly requestStream: false;
|
|
661
|
+
readonly responseType: typeof Empty;
|
|
662
|
+
readonly responseStream: false;
|
|
663
|
+
readonly options: {};
|
|
664
|
+
};
|
|
665
|
+
};
|
|
666
|
+
};
|
|
667
|
+
type Builtin$6 = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
668
|
+
type DeepPartial$6<T> = T extends Builtin$6 ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial$6<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial$6<U>> : T extends {} ? {
|
|
669
|
+
[K in keyof T]?: DeepPartial$6<T[K]>;
|
|
670
|
+
} : Partial<T>;
|
|
671
|
+
interface MessageFns$6<T> {
|
|
672
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
673
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
674
|
+
fromJSON(object: any): T;
|
|
675
|
+
toJSON(message: T): unknown;
|
|
676
|
+
create(base?: DeepPartial$6<T>): T;
|
|
677
|
+
fromPartial(object: DeepPartial$6<T>): T;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
/** Legacy Email Service Messages */
|
|
681
|
+
interface RegisterTemplateRequest {
|
|
682
|
+
name: string;
|
|
683
|
+
subject: string;
|
|
684
|
+
body: string;
|
|
685
|
+
variables: string[];
|
|
686
|
+
sender?: string | undefined;
|
|
687
|
+
jsonTemplate?: string | undefined;
|
|
688
|
+
}
|
|
689
|
+
declare const RegisterTemplateRequest: MessageFns$5<RegisterTemplateRequest>;
|
|
690
|
+
interface UpdateTemplateRequest {
|
|
691
|
+
id: string;
|
|
692
|
+
name?: string | undefined;
|
|
693
|
+
subject?: string | undefined;
|
|
694
|
+
body?: string | undefined;
|
|
695
|
+
variables: string[];
|
|
696
|
+
sender?: string | undefined;
|
|
697
|
+
}
|
|
698
|
+
declare const UpdateTemplateRequest: MessageFns$5<UpdateTemplateRequest>;
|
|
699
|
+
interface RegisterTemplateResponse {
|
|
700
|
+
template: string;
|
|
701
|
+
}
|
|
702
|
+
declare const RegisterTemplateResponse: MessageFns$5<RegisterTemplateResponse>;
|
|
703
|
+
interface Attachment {
|
|
704
|
+
filename: string;
|
|
705
|
+
contentType?: string | undefined;
|
|
706
|
+
content?: Uint8Array | undefined;
|
|
707
|
+
href?: string | undefined;
|
|
708
|
+
httpHeaders?: string | undefined;
|
|
709
|
+
}
|
|
710
|
+
declare const Attachment: MessageFns$5<Attachment>;
|
|
711
|
+
interface SendEmailRequest {
|
|
712
|
+
templateName: string;
|
|
713
|
+
params: SendEmailRequest_SendEmailParams | undefined;
|
|
714
|
+
}
|
|
715
|
+
declare const SendEmailRequest: MessageFns$5<SendEmailRequest>;
|
|
716
|
+
interface SendEmailRequest_SendEmailParams {
|
|
717
|
+
email: string;
|
|
718
|
+
subject: string;
|
|
719
|
+
variables: string;
|
|
720
|
+
body: string;
|
|
721
|
+
sender?: string | undefined;
|
|
722
|
+
cc: string[];
|
|
723
|
+
replyTo?: string | undefined;
|
|
724
|
+
attachments: Attachment[];
|
|
725
|
+
}
|
|
726
|
+
declare const SendEmailRequest_SendEmailParams: MessageFns$5<SendEmailRequest_SendEmailParams>;
|
|
727
|
+
interface SendEmailResponse {
|
|
728
|
+
sentMessageInfo: string;
|
|
729
|
+
}
|
|
730
|
+
declare const SendEmailResponse: MessageFns$5<SendEmailResponse>;
|
|
731
|
+
interface ResendEmailRequest {
|
|
732
|
+
emailRecordId: string;
|
|
733
|
+
}
|
|
734
|
+
declare const ResendEmailRequest: MessageFns$5<ResendEmailRequest>;
|
|
735
|
+
interface ResendEmailResponse {
|
|
736
|
+
sentMessageInfo: string;
|
|
737
|
+
}
|
|
738
|
+
declare const ResendEmailResponse: MessageFns$5<ResendEmailResponse>;
|
|
739
|
+
interface GetEmailStatusRequest {
|
|
740
|
+
messageId: string;
|
|
741
|
+
}
|
|
742
|
+
declare const GetEmailStatusRequest: MessageFns$5<GetEmailStatusRequest>;
|
|
743
|
+
interface GetEmailStatusResponse {
|
|
744
|
+
statusInfo: string;
|
|
745
|
+
}
|
|
746
|
+
declare const GetEmailStatusResponse: MessageFns$5<GetEmailStatusResponse>;
|
|
747
|
+
/** Legacy Push Notifications Service Messages */
|
|
748
|
+
interface SetNotificationTokenRequest {
|
|
749
|
+
token: string;
|
|
750
|
+
platform: string;
|
|
751
|
+
userId: string;
|
|
752
|
+
}
|
|
753
|
+
declare const SetNotificationTokenRequest: MessageFns$5<SetNotificationTokenRequest>;
|
|
754
|
+
interface SetNotificationTokenResponse {
|
|
755
|
+
newTokenDocument: string;
|
|
756
|
+
}
|
|
757
|
+
declare const SetNotificationTokenResponse: MessageFns$5<SetNotificationTokenResponse>;
|
|
758
|
+
interface GetNotificationTokensRequest {
|
|
759
|
+
userId: string;
|
|
760
|
+
}
|
|
761
|
+
declare const GetNotificationTokensRequest: MessageFns$5<GetNotificationTokensRequest>;
|
|
762
|
+
interface GetNotificationTokensResponse {
|
|
763
|
+
tokenDocuments: string[];
|
|
764
|
+
}
|
|
765
|
+
declare const GetNotificationTokensResponse: MessageFns$5<GetNotificationTokensResponse>;
|
|
766
|
+
interface SendNotificationRequest {
|
|
767
|
+
sendTo: string;
|
|
768
|
+
title?: string | undefined;
|
|
769
|
+
platform?: string | undefined;
|
|
770
|
+
body?: string | undefined;
|
|
771
|
+
data?: string | undefined;
|
|
772
|
+
doNotStore?: boolean | undefined;
|
|
773
|
+
isSilent?: boolean | undefined;
|
|
774
|
+
}
|
|
775
|
+
declare const SendNotificationRequest: MessageFns$5<SendNotificationRequest>;
|
|
776
|
+
interface SendNotificationToManyDevicesRequest {
|
|
777
|
+
sendTo: string[];
|
|
778
|
+
title?: string | undefined;
|
|
779
|
+
body?: string | undefined;
|
|
780
|
+
data?: string | undefined;
|
|
781
|
+
platform?: string | undefined;
|
|
782
|
+
doNotStore?: boolean | undefined;
|
|
783
|
+
isSilent?: boolean | undefined;
|
|
784
|
+
}
|
|
785
|
+
declare const SendNotificationToManyDevicesRequest: MessageFns$5<SendNotificationToManyDevicesRequest>;
|
|
786
|
+
interface SendManyNotificationsRequest {
|
|
787
|
+
notifications: SendNotificationRequest[];
|
|
788
|
+
}
|
|
789
|
+
declare const SendManyNotificationsRequest: MessageFns$5<SendManyNotificationsRequest>;
|
|
790
|
+
interface SendNotificationResponse {
|
|
791
|
+
message: string;
|
|
792
|
+
}
|
|
793
|
+
declare const SendNotificationResponse: MessageFns$5<SendNotificationResponse>;
|
|
794
|
+
/** Legacy SMS Service Messages */
|
|
795
|
+
interface SendSmsRequest {
|
|
796
|
+
to: string;
|
|
797
|
+
message: string;
|
|
798
|
+
}
|
|
799
|
+
declare const SendSmsRequest: MessageFns$5<SendSmsRequest>;
|
|
800
|
+
interface SendSmsResponse {
|
|
801
|
+
message: string;
|
|
802
|
+
}
|
|
803
|
+
declare const SendSmsResponse: MessageFns$5<SendSmsResponse>;
|
|
804
|
+
interface SendVerificationCodeRequest {
|
|
805
|
+
to: string;
|
|
806
|
+
}
|
|
807
|
+
declare const SendVerificationCodeRequest: MessageFns$5<SendVerificationCodeRequest>;
|
|
808
|
+
interface SendVerificationCodeResponse {
|
|
809
|
+
verificationSid: string;
|
|
810
|
+
}
|
|
811
|
+
declare const SendVerificationCodeResponse: MessageFns$5<SendVerificationCodeResponse>;
|
|
812
|
+
interface VerifyRequest {
|
|
813
|
+
verificationSid: string;
|
|
814
|
+
code: string;
|
|
815
|
+
}
|
|
816
|
+
declare const VerifyRequest: MessageFns$5<VerifyRequest>;
|
|
817
|
+
interface VerifyResponse {
|
|
818
|
+
verified: boolean;
|
|
819
|
+
}
|
|
820
|
+
declare const VerifyResponse: MessageFns$5<VerifyResponse>;
|
|
821
|
+
/** New Unified Communications Messages */
|
|
822
|
+
interface SendCommunicationRequest {
|
|
823
|
+
/** 'email', 'push', 'sms' */
|
|
824
|
+
channel: string;
|
|
825
|
+
templateName: string;
|
|
826
|
+
params: SendCommunicationRequest_SendCommunicationParams | undefined;
|
|
827
|
+
}
|
|
828
|
+
declare const SendCommunicationRequest: MessageFns$5<SendCommunicationRequest>;
|
|
829
|
+
interface SendCommunicationRequest_SendCommunicationParams {
|
|
830
|
+
/** email address, user ID, or phone number */
|
|
831
|
+
recipient: string;
|
|
832
|
+
subject: string;
|
|
833
|
+
body: string;
|
|
834
|
+
/** JSON string */
|
|
835
|
+
variables: string;
|
|
836
|
+
sender?: string | undefined;
|
|
837
|
+
cc: string[];
|
|
838
|
+
replyTo?: string | undefined;
|
|
839
|
+
attachments: string[];
|
|
840
|
+
/** JSON string for push notifications */
|
|
841
|
+
data?: string | undefined;
|
|
842
|
+
/** for push notifications */
|
|
843
|
+
platform?: string | undefined;
|
|
844
|
+
doNotStore?: boolean | undefined;
|
|
845
|
+
isSilent?: boolean | undefined;
|
|
846
|
+
}
|
|
847
|
+
declare const SendCommunicationRequest_SendCommunicationParams: MessageFns$5<SendCommunicationRequest_SendCommunicationParams>;
|
|
848
|
+
interface SendCommunicationResponse {
|
|
849
|
+
messageId: string;
|
|
850
|
+
sentMessageInfo: string;
|
|
851
|
+
}
|
|
852
|
+
declare const SendCommunicationResponse: MessageFns$5<SendCommunicationResponse>;
|
|
853
|
+
interface SendToMultipleChannelsRequest {
|
|
854
|
+
channels: string[];
|
|
855
|
+
/** 'BEST_EFFORT', 'ALL_OR_NOTHING' */
|
|
856
|
+
strategy: string;
|
|
857
|
+
templateName: string;
|
|
858
|
+
params: SendToMultipleChannelsRequest_SendCommunicationParams | undefined;
|
|
859
|
+
}
|
|
860
|
+
declare const SendToMultipleChannelsRequest: MessageFns$5<SendToMultipleChannelsRequest>;
|
|
861
|
+
interface SendToMultipleChannelsRequest_SendCommunicationParams {
|
|
862
|
+
recipient: string;
|
|
863
|
+
subject: string;
|
|
864
|
+
body: string;
|
|
865
|
+
variables: string;
|
|
866
|
+
sender?: string | undefined;
|
|
867
|
+
cc: string[];
|
|
868
|
+
replyTo?: string | undefined;
|
|
869
|
+
attachments: string[];
|
|
870
|
+
data?: string | undefined;
|
|
871
|
+
platform?: string | undefined;
|
|
872
|
+
doNotStore?: boolean | undefined;
|
|
873
|
+
isSilent?: boolean | undefined;
|
|
874
|
+
}
|
|
875
|
+
declare const SendToMultipleChannelsRequest_SendCommunicationParams: MessageFns$5<SendToMultipleChannelsRequest_SendCommunicationParams>;
|
|
876
|
+
interface SendToMultipleChannelsResponse {
|
|
877
|
+
results: SendToMultipleChannelsResponse_ChannelResult[];
|
|
878
|
+
}
|
|
879
|
+
declare const SendToMultipleChannelsResponse: MessageFns$5<SendToMultipleChannelsResponse>;
|
|
880
|
+
interface SendToMultipleChannelsResponse_ChannelResult {
|
|
881
|
+
channel: string;
|
|
882
|
+
success: boolean;
|
|
883
|
+
messageId: string;
|
|
884
|
+
error?: string | undefined;
|
|
885
|
+
}
|
|
886
|
+
declare const SendToMultipleChannelsResponse_ChannelResult: MessageFns$5<SendToMultipleChannelsResponse_ChannelResult>;
|
|
887
|
+
interface SendWithFallbackRequest {
|
|
888
|
+
fallbackChain: SendWithFallbackRequest_FallbackStep[];
|
|
889
|
+
templateName: string;
|
|
890
|
+
params: SendWithFallbackRequest_SendCommunicationParams | undefined;
|
|
891
|
+
}
|
|
892
|
+
declare const SendWithFallbackRequest: MessageFns$5<SendWithFallbackRequest>;
|
|
893
|
+
interface SendWithFallbackRequest_FallbackStep {
|
|
894
|
+
channel: string;
|
|
895
|
+
/** milliseconds */
|
|
896
|
+
timeout: number;
|
|
897
|
+
}
|
|
898
|
+
declare const SendWithFallbackRequest_FallbackStep: MessageFns$5<SendWithFallbackRequest_FallbackStep>;
|
|
899
|
+
interface SendWithFallbackRequest_SendCommunicationParams {
|
|
900
|
+
recipient: string;
|
|
901
|
+
subject: string;
|
|
902
|
+
body: string;
|
|
903
|
+
variables: string;
|
|
904
|
+
sender?: string | undefined;
|
|
905
|
+
cc: string[];
|
|
906
|
+
replyTo?: string | undefined;
|
|
907
|
+
attachments: string[];
|
|
908
|
+
data?: string | undefined;
|
|
909
|
+
platform?: string | undefined;
|
|
910
|
+
doNotStore?: boolean | undefined;
|
|
911
|
+
isSilent?: boolean | undefined;
|
|
912
|
+
}
|
|
913
|
+
declare const SendWithFallbackRequest_SendCommunicationParams: MessageFns$5<SendWithFallbackRequest_SendCommunicationParams>;
|
|
914
|
+
interface SendWithFallbackResponse {
|
|
915
|
+
successfulChannel: string;
|
|
916
|
+
messageId: string;
|
|
917
|
+
attempts: SendWithFallbackResponse_ChannelResult[];
|
|
918
|
+
}
|
|
919
|
+
declare const SendWithFallbackResponse: MessageFns$5<SendWithFallbackResponse>;
|
|
920
|
+
interface SendWithFallbackResponse_ChannelResult {
|
|
921
|
+
channel: string;
|
|
922
|
+
success: boolean;
|
|
923
|
+
messageId: string;
|
|
924
|
+
error?: string | undefined;
|
|
925
|
+
}
|
|
926
|
+
declare const SendWithFallbackResponse_ChannelResult: MessageFns$5<SendWithFallbackResponse_ChannelResult>;
|
|
927
|
+
interface RegisterCommunicationTemplateRequest {
|
|
928
|
+
name: string;
|
|
929
|
+
template: RegisterCommunicationTemplateRequest_CommunicationTemplate | undefined;
|
|
930
|
+
}
|
|
931
|
+
declare const RegisterCommunicationTemplateRequest: MessageFns$5<RegisterCommunicationTemplateRequest>;
|
|
932
|
+
interface RegisterCommunicationTemplateRequest_CommunicationTemplate {
|
|
933
|
+
email?: RegisterCommunicationTemplateRequest_CommunicationTemplate_EmailTemplate | undefined;
|
|
934
|
+
push?: RegisterCommunicationTemplateRequest_CommunicationTemplate_PushTemplate | undefined;
|
|
935
|
+
sms?: RegisterCommunicationTemplateRequest_CommunicationTemplate_SmsTemplate | undefined;
|
|
936
|
+
}
|
|
937
|
+
declare const RegisterCommunicationTemplateRequest_CommunicationTemplate: MessageFns$5<RegisterCommunicationTemplateRequest_CommunicationTemplate>;
|
|
938
|
+
interface RegisterCommunicationTemplateRequest_CommunicationTemplate_EmailTemplate {
|
|
939
|
+
subject: string;
|
|
940
|
+
body: string;
|
|
941
|
+
variables: string[];
|
|
942
|
+
sender?: string | undefined;
|
|
943
|
+
}
|
|
944
|
+
declare const RegisterCommunicationTemplateRequest_CommunicationTemplate_EmailTemplate: MessageFns$5<RegisterCommunicationTemplateRequest_CommunicationTemplate_EmailTemplate>;
|
|
945
|
+
interface RegisterCommunicationTemplateRequest_CommunicationTemplate_PushTemplate {
|
|
946
|
+
title: string;
|
|
947
|
+
body: string;
|
|
948
|
+
variables: string[];
|
|
949
|
+
}
|
|
950
|
+
declare const RegisterCommunicationTemplateRequest_CommunicationTemplate_PushTemplate: MessageFns$5<RegisterCommunicationTemplateRequest_CommunicationTemplate_PushTemplate>;
|
|
951
|
+
interface RegisterCommunicationTemplateRequest_CommunicationTemplate_SmsTemplate {
|
|
952
|
+
message: string;
|
|
953
|
+
variables: string[];
|
|
954
|
+
}
|
|
955
|
+
declare const RegisterCommunicationTemplateRequest_CommunicationTemplate_SmsTemplate: MessageFns$5<RegisterCommunicationTemplateRequest_CommunicationTemplate_SmsTemplate>;
|
|
956
|
+
interface RegisterCommunicationTemplateResponse {
|
|
957
|
+
template: string;
|
|
958
|
+
}
|
|
959
|
+
declare const RegisterCommunicationTemplateResponse: MessageFns$5<RegisterCommunicationTemplateResponse>;
|
|
960
|
+
interface GetMessageStatusRequest {
|
|
961
|
+
messageId: string;
|
|
962
|
+
channel: string;
|
|
963
|
+
}
|
|
964
|
+
declare const GetMessageStatusRequest: MessageFns$5<GetMessageStatusRequest>;
|
|
965
|
+
interface GetMessageStatusResponse {
|
|
966
|
+
statusInfo: string;
|
|
967
|
+
}
|
|
968
|
+
declare const GetMessageStatusResponse: MessageFns$5<GetMessageStatusResponse>;
|
|
969
|
+
/** Unified Communications Service */
|
|
970
|
+
type CommunicationsDefinition = typeof CommunicationsDefinition;
|
|
971
|
+
declare const CommunicationsDefinition: {
|
|
972
|
+
readonly name: "Communications";
|
|
973
|
+
readonly fullName: "communications.Communications";
|
|
974
|
+
readonly methods: {
|
|
975
|
+
/** Legacy Email endpoints */
|
|
976
|
+
readonly registerTemplate: {
|
|
977
|
+
readonly name: "RegisterTemplate";
|
|
978
|
+
readonly requestType: typeof RegisterTemplateRequest;
|
|
979
|
+
readonly requestStream: false;
|
|
980
|
+
readonly responseType: typeof RegisterTemplateResponse;
|
|
981
|
+
readonly responseStream: false;
|
|
982
|
+
readonly options: {};
|
|
983
|
+
};
|
|
984
|
+
readonly updateTemplate: {
|
|
985
|
+
readonly name: "UpdateTemplate";
|
|
986
|
+
readonly requestType: typeof UpdateTemplateRequest;
|
|
987
|
+
readonly requestStream: false;
|
|
988
|
+
readonly responseType: typeof RegisterTemplateResponse;
|
|
989
|
+
readonly responseStream: false;
|
|
990
|
+
readonly options: {};
|
|
991
|
+
};
|
|
992
|
+
readonly sendEmail: {
|
|
993
|
+
readonly name: "SendEmail";
|
|
994
|
+
readonly requestType: typeof SendEmailRequest;
|
|
995
|
+
readonly requestStream: false;
|
|
996
|
+
readonly responseType: typeof SendEmailResponse;
|
|
997
|
+
readonly responseStream: false;
|
|
998
|
+
readonly options: {};
|
|
999
|
+
};
|
|
1000
|
+
readonly resendEmail: {
|
|
1001
|
+
readonly name: "ResendEmail";
|
|
1002
|
+
readonly requestType: typeof ResendEmailRequest;
|
|
1003
|
+
readonly requestStream: false;
|
|
1004
|
+
readonly responseType: typeof ResendEmailResponse;
|
|
1005
|
+
readonly responseStream: false;
|
|
1006
|
+
readonly options: {};
|
|
1007
|
+
};
|
|
1008
|
+
readonly getEmailStatus: {
|
|
1009
|
+
readonly name: "GetEmailStatus";
|
|
1010
|
+
readonly requestType: typeof GetEmailStatusRequest;
|
|
1011
|
+
readonly requestStream: false;
|
|
1012
|
+
readonly responseType: typeof GetEmailStatusResponse;
|
|
1013
|
+
readonly responseStream: false;
|
|
1014
|
+
readonly options: {};
|
|
1015
|
+
};
|
|
1016
|
+
/** Legacy Push Notifications endpoints */
|
|
1017
|
+
readonly setNotificationToken: {
|
|
1018
|
+
readonly name: "SetNotificationToken";
|
|
1019
|
+
readonly requestType: typeof SetNotificationTokenRequest;
|
|
1020
|
+
readonly requestStream: false;
|
|
1021
|
+
readonly responseType: typeof SetNotificationTokenResponse;
|
|
1022
|
+
readonly responseStream: false;
|
|
1023
|
+
readonly options: {};
|
|
1024
|
+
};
|
|
1025
|
+
readonly getNotificationTokens: {
|
|
1026
|
+
readonly name: "GetNotificationTokens";
|
|
1027
|
+
readonly requestType: typeof GetNotificationTokensRequest;
|
|
1028
|
+
readonly requestStream: false;
|
|
1029
|
+
readonly responseType: typeof GetNotificationTokensResponse;
|
|
1030
|
+
readonly responseStream: false;
|
|
1031
|
+
readonly options: {};
|
|
1032
|
+
};
|
|
1033
|
+
readonly sendNotification: {
|
|
1034
|
+
readonly name: "SendNotification";
|
|
1035
|
+
readonly requestType: typeof SendNotificationRequest;
|
|
1036
|
+
readonly requestStream: false;
|
|
1037
|
+
readonly responseType: typeof SendNotificationResponse;
|
|
1038
|
+
readonly responseStream: false;
|
|
1039
|
+
readonly options: {};
|
|
1040
|
+
};
|
|
1041
|
+
readonly sendNotificationToManyDevices: {
|
|
1042
|
+
readonly name: "SendNotificationToManyDevices";
|
|
1043
|
+
readonly requestType: typeof SendNotificationToManyDevicesRequest;
|
|
1044
|
+
readonly requestStream: false;
|
|
1045
|
+
readonly responseType: typeof SendNotificationResponse;
|
|
1046
|
+
readonly responseStream: false;
|
|
1047
|
+
readonly options: {};
|
|
1048
|
+
};
|
|
1049
|
+
readonly sendManyNotifications: {
|
|
1050
|
+
readonly name: "SendManyNotifications";
|
|
1051
|
+
readonly requestType: typeof SendManyNotificationsRequest;
|
|
1052
|
+
readonly requestStream: false;
|
|
1053
|
+
readonly responseType: typeof SendNotificationResponse;
|
|
1054
|
+
readonly responseStream: false;
|
|
1055
|
+
readonly options: {};
|
|
1056
|
+
};
|
|
1057
|
+
/** Legacy SMS endpoints */
|
|
1058
|
+
readonly sendSms: {
|
|
1059
|
+
readonly name: "SendSms";
|
|
1060
|
+
readonly requestType: typeof SendSmsRequest;
|
|
1061
|
+
readonly requestStream: false;
|
|
1062
|
+
readonly responseType: typeof SendSmsResponse;
|
|
1063
|
+
readonly responseStream: false;
|
|
1064
|
+
readonly options: {};
|
|
1065
|
+
};
|
|
1066
|
+
readonly sendVerificationCode: {
|
|
1067
|
+
readonly name: "SendVerificationCode";
|
|
1068
|
+
readonly requestType: typeof SendVerificationCodeRequest;
|
|
1069
|
+
readonly requestStream: false;
|
|
1070
|
+
readonly responseType: typeof SendVerificationCodeResponse;
|
|
1071
|
+
readonly responseStream: false;
|
|
1072
|
+
readonly options: {};
|
|
1073
|
+
};
|
|
1074
|
+
readonly verify: {
|
|
1075
|
+
readonly name: "Verify";
|
|
1076
|
+
readonly requestType: typeof VerifyRequest;
|
|
1077
|
+
readonly requestStream: false;
|
|
1078
|
+
readonly responseType: typeof VerifyResponse;
|
|
1079
|
+
readonly responseStream: false;
|
|
1080
|
+
readonly options: {};
|
|
1081
|
+
};
|
|
1082
|
+
/** New unified endpoints */
|
|
1083
|
+
readonly sendCommunication: {
|
|
1084
|
+
readonly name: "SendCommunication";
|
|
1085
|
+
readonly requestType: typeof SendCommunicationRequest;
|
|
1086
|
+
readonly requestStream: false;
|
|
1087
|
+
readonly responseType: typeof SendCommunicationResponse;
|
|
1088
|
+
readonly responseStream: false;
|
|
1089
|
+
readonly options: {};
|
|
1090
|
+
};
|
|
1091
|
+
readonly sendToMultipleChannels: {
|
|
1092
|
+
readonly name: "SendToMultipleChannels";
|
|
1093
|
+
readonly requestType: typeof SendToMultipleChannelsRequest;
|
|
1094
|
+
readonly requestStream: false;
|
|
1095
|
+
readonly responseType: typeof SendToMultipleChannelsResponse;
|
|
1096
|
+
readonly responseStream: false;
|
|
1097
|
+
readonly options: {};
|
|
1098
|
+
};
|
|
1099
|
+
readonly sendWithFallback: {
|
|
1100
|
+
readonly name: "SendWithFallback";
|
|
1101
|
+
readonly requestType: typeof SendWithFallbackRequest;
|
|
1102
|
+
readonly requestStream: false;
|
|
1103
|
+
readonly responseType: typeof SendWithFallbackResponse;
|
|
1104
|
+
readonly responseStream: false;
|
|
1105
|
+
readonly options: {};
|
|
1106
|
+
};
|
|
1107
|
+
readonly registerCommunicationTemplate: {
|
|
1108
|
+
readonly name: "RegisterCommunicationTemplate";
|
|
1109
|
+
readonly requestType: typeof RegisterCommunicationTemplateRequest;
|
|
1110
|
+
readonly requestStream: false;
|
|
1111
|
+
readonly responseType: typeof RegisterCommunicationTemplateResponse;
|
|
1112
|
+
readonly responseStream: false;
|
|
1113
|
+
readonly options: {};
|
|
1114
|
+
};
|
|
1115
|
+
readonly getMessageStatus: {
|
|
1116
|
+
readonly name: "GetMessageStatus";
|
|
1117
|
+
readonly requestType: typeof GetMessageStatusRequest;
|
|
1118
|
+
readonly requestStream: false;
|
|
1119
|
+
readonly responseType: typeof GetMessageStatusResponse;
|
|
1120
|
+
readonly responseStream: false;
|
|
1121
|
+
readonly options: {};
|
|
1122
|
+
};
|
|
1123
|
+
};
|
|
1124
|
+
};
|
|
1125
|
+
type Builtin$5 = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
1126
|
+
type DeepPartial$5<T> = T extends Builtin$5 ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial$5<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial$5<U>> : T extends {} ? {
|
|
1127
|
+
[K in keyof T]?: DeepPartial$5<T[K]>;
|
|
1128
|
+
} : Partial<T>;
|
|
1129
|
+
interface MessageFns$5<T> {
|
|
1130
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
1131
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
1132
|
+
fromJSON(object: any): T;
|
|
1133
|
+
toJSON(message: T): unknown;
|
|
1134
|
+
create(base?: DeepPartial$5<T>): T;
|
|
1135
|
+
fromPartial(object: DeepPartial$5<T>): T;
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
interface RegisterAdminRouteRequest {
|
|
1139
|
+
routes: RegisterAdminRouteRequest_PathDefinition[];
|
|
1140
|
+
routerUrl?: string | undefined;
|
|
1141
|
+
}
|
|
1142
|
+
declare const RegisterAdminRouteRequest: MessageFns$4<RegisterAdminRouteRequest>;
|
|
1143
|
+
interface RegisterAdminRouteRequest_ErrorDefinition {
|
|
1144
|
+
conduitCode: string;
|
|
1145
|
+
grpcCode: number;
|
|
1146
|
+
message: string;
|
|
1147
|
+
description: string;
|
|
1148
|
+
}
|
|
1149
|
+
declare const RegisterAdminRouteRequest_ErrorDefinition: MessageFns$4<RegisterAdminRouteRequest_ErrorDefinition>;
|
|
1150
|
+
interface RegisterAdminRouteRequest_PathDefinition {
|
|
1151
|
+
options: RegisterAdminRouteRequest_ConduitRouteOptions | undefined;
|
|
1152
|
+
returns?: RegisterAdminRouteRequest_ConduitRouteReturnDefinition | undefined;
|
|
1153
|
+
grpcFunction?: string | undefined;
|
|
1154
|
+
isMiddleware?: boolean | undefined;
|
|
1155
|
+
events?: string | undefined;
|
|
1156
|
+
proxy?: RegisterAdminRouteRequest_ProxyRouteOptions | undefined;
|
|
1157
|
+
}
|
|
1158
|
+
declare const RegisterAdminRouteRequest_PathDefinition: MessageFns$4<RegisterAdminRouteRequest_PathDefinition>;
|
|
1159
|
+
interface RegisterAdminRouteRequest_ConduitRouteOptions {
|
|
1160
|
+
queryParams?: string | undefined;
|
|
1161
|
+
bodyParams?: string | undefined;
|
|
1162
|
+
urlParams?: string | undefined;
|
|
1163
|
+
action?: string | undefined;
|
|
1164
|
+
path: string;
|
|
1165
|
+
name?: string | undefined;
|
|
1166
|
+
description?: string | undefined;
|
|
1167
|
+
middlewares: string[];
|
|
1168
|
+
cacheControl?: string | undefined;
|
|
1169
|
+
errors: RegisterAdminRouteRequest_ErrorDefinition[];
|
|
1170
|
+
mcp?: boolean | undefined;
|
|
1171
|
+
strictParams?: boolean | undefined;
|
|
1172
|
+
rateLimit?: string | undefined;
|
|
1173
|
+
}
|
|
1174
|
+
declare const RegisterAdminRouteRequest_ConduitRouteOptions: MessageFns$4<RegisterAdminRouteRequest_ConduitRouteOptions>;
|
|
1175
|
+
interface RegisterAdminRouteRequest_ProxyRouteOptions {
|
|
1176
|
+
target?: string | undefined;
|
|
1177
|
+
changeOrigin?: boolean | undefined;
|
|
1178
|
+
secure?: boolean | undefined;
|
|
1179
|
+
context?: string | undefined;
|
|
1180
|
+
pathRewrite?: string | undefined;
|
|
1181
|
+
headers?: string | undefined;
|
|
1182
|
+
proxyTimeout?: number | undefined;
|
|
1183
|
+
cookieDomainRewrite?: string | undefined;
|
|
1184
|
+
autoRewrite?: boolean | undefined;
|
|
1185
|
+
followRedirects?: boolean | undefined;
|
|
1186
|
+
xfwd?: boolean | undefined;
|
|
1187
|
+
ws?: boolean | undefined;
|
|
1188
|
+
router?: string | undefined;
|
|
1189
|
+
preserveHeaderKeyCase?: boolean | undefined;
|
|
1190
|
+
}
|
|
1191
|
+
declare const RegisterAdminRouteRequest_ProxyRouteOptions: MessageFns$4<RegisterAdminRouteRequest_ProxyRouteOptions>;
|
|
1192
|
+
interface RegisterAdminRouteRequest_ConduitRouteReturnDefinition {
|
|
1193
|
+
name: string;
|
|
1194
|
+
fields: string;
|
|
1195
|
+
}
|
|
1196
|
+
declare const RegisterAdminRouteRequest_ConduitRouteReturnDefinition: MessageFns$4<RegisterAdminRouteRequest_ConduitRouteReturnDefinition>;
|
|
1197
|
+
interface PatchRouteMiddlewaresRequest {
|
|
1198
|
+
path: string;
|
|
1199
|
+
action: string;
|
|
1200
|
+
middlewares: string[];
|
|
1201
|
+
}
|
|
1202
|
+
declare const PatchRouteMiddlewaresRequest: MessageFns$4<PatchRouteMiddlewaresRequest>;
|
|
1203
|
+
interface ModuleHealthRequest {
|
|
1204
|
+
moduleName: string;
|
|
1205
|
+
url: string;
|
|
1206
|
+
/** [0, 1, 2] */
|
|
1207
|
+
status: number;
|
|
1208
|
+
}
|
|
1209
|
+
declare const ModuleHealthRequest: MessageFns$4<ModuleHealthRequest>;
|
|
1210
|
+
interface ModuleByNameRequest {
|
|
1211
|
+
name: string;
|
|
1212
|
+
}
|
|
1213
|
+
declare const ModuleByNameRequest: MessageFns$4<ModuleByNameRequest>;
|
|
1214
|
+
interface ModuleByNameResponse {
|
|
1215
|
+
moduleUrl: string;
|
|
1216
|
+
}
|
|
1217
|
+
declare const ModuleByNameResponse: MessageFns$4<ModuleByNameResponse>;
|
|
1218
|
+
interface RegisterModuleRequest {
|
|
1219
|
+
moduleName: string;
|
|
1220
|
+
url: string;
|
|
1221
|
+
/** [0, 1, 2] */
|
|
1222
|
+
healthStatus: number;
|
|
1223
|
+
}
|
|
1224
|
+
declare const RegisterModuleRequest: MessageFns$4<RegisterModuleRequest>;
|
|
1225
|
+
interface RegisterModuleResponse {
|
|
1226
|
+
result: boolean;
|
|
1227
|
+
}
|
|
1228
|
+
declare const RegisterModuleResponse: MessageFns$4<RegisterModuleResponse>;
|
|
1229
|
+
interface ModuleListResponse {
|
|
1230
|
+
modules: ModuleListResponse_ModuleResponse[];
|
|
1231
|
+
}
|
|
1232
|
+
declare const ModuleListResponse: MessageFns$4<ModuleListResponse>;
|
|
1233
|
+
interface ModuleListResponse_ModuleResponse {
|
|
1234
|
+
moduleName: string;
|
|
1235
|
+
url: string;
|
|
1236
|
+
serving: boolean;
|
|
1237
|
+
}
|
|
1238
|
+
declare const ModuleListResponse_ModuleResponse: MessageFns$4<ModuleListResponse_ModuleResponse>;
|
|
1239
|
+
interface ModuleExistsRequest {
|
|
1240
|
+
moduleName: string;
|
|
1241
|
+
}
|
|
1242
|
+
declare const ModuleExistsRequest: MessageFns$4<ModuleExistsRequest>;
|
|
1243
|
+
interface ModuleExistsResponse {
|
|
1244
|
+
url: string;
|
|
1245
|
+
}
|
|
1246
|
+
declare const ModuleExistsResponse: MessageFns$4<ModuleExistsResponse>;
|
|
1247
|
+
interface GetConfigRequest {
|
|
1248
|
+
key: string;
|
|
1249
|
+
}
|
|
1250
|
+
declare const GetConfigRequest: MessageFns$4<GetConfigRequest>;
|
|
1251
|
+
interface GetRedisDetailsResponse {
|
|
1252
|
+
redisHost?: string | undefined;
|
|
1253
|
+
redisPort?: number | undefined;
|
|
1254
|
+
redisUsername?: string | undefined;
|
|
1255
|
+
redisPassword?: string | undefined;
|
|
1256
|
+
/** temporarily keeping these^ around to avoid a breaking change */
|
|
1257
|
+
redisConfig?: string | undefined;
|
|
1258
|
+
standalone?: string | undefined;
|
|
1259
|
+
cluster?: string | undefined;
|
|
1260
|
+
}
|
|
1261
|
+
declare const GetRedisDetailsResponse: MessageFns$4<GetRedisDetailsResponse>;
|
|
1262
|
+
interface GetConfigResponse {
|
|
1263
|
+
data: string;
|
|
1264
|
+
}
|
|
1265
|
+
declare const GetConfigResponse: MessageFns$4<GetConfigResponse>;
|
|
1266
|
+
interface UpdateConfigRequest {
|
|
1267
|
+
config: string;
|
|
1268
|
+
schema: string;
|
|
1269
|
+
override: boolean;
|
|
1270
|
+
}
|
|
1271
|
+
declare const UpdateConfigRequest: MessageFns$4<UpdateConfigRequest>;
|
|
1272
|
+
interface UpdateConfigResponse {
|
|
1273
|
+
result: string;
|
|
1274
|
+
}
|
|
1275
|
+
declare const UpdateConfigResponse: MessageFns$4<UpdateConfigResponse>;
|
|
1276
|
+
interface RegisterModulesConfigRequest {
|
|
1277
|
+
newModulesConfigSchema: string;
|
|
1278
|
+
}
|
|
1279
|
+
declare const RegisterModulesConfigRequest: MessageFns$4<RegisterModulesConfigRequest>;
|
|
1280
|
+
type CoreDefinition = typeof CoreDefinition;
|
|
1281
|
+
declare const CoreDefinition: {
|
|
1282
|
+
readonly name: "Core";
|
|
1283
|
+
readonly fullName: "conduit.core.Core";
|
|
1284
|
+
readonly methods: {};
|
|
1285
|
+
};
|
|
1286
|
+
type ConfigDefinition = typeof ConfigDefinition;
|
|
1287
|
+
declare const ConfigDefinition: {
|
|
1288
|
+
readonly name: "Config";
|
|
1289
|
+
readonly fullName: "conduit.core.Config";
|
|
1290
|
+
readonly methods: {
|
|
1291
|
+
readonly get: {
|
|
1292
|
+
readonly name: "Get";
|
|
1293
|
+
readonly requestType: typeof GetConfigRequest;
|
|
1294
|
+
readonly requestStream: false;
|
|
1295
|
+
readonly responseType: typeof GetConfigResponse;
|
|
1296
|
+
readonly responseStream: false;
|
|
1297
|
+
readonly options: {};
|
|
1298
|
+
};
|
|
1299
|
+
readonly configure: {
|
|
1300
|
+
readonly name: "Configure";
|
|
1301
|
+
readonly requestType: typeof UpdateConfigRequest;
|
|
1302
|
+
readonly requestStream: false;
|
|
1303
|
+
readonly responseType: typeof UpdateConfigResponse;
|
|
1304
|
+
readonly responseStream: false;
|
|
1305
|
+
readonly options: {};
|
|
1306
|
+
};
|
|
1307
|
+
readonly moduleExists: {
|
|
1308
|
+
readonly name: "ModuleExists";
|
|
1309
|
+
readonly requestType: typeof ModuleExistsRequest;
|
|
1310
|
+
readonly requestStream: false;
|
|
1311
|
+
readonly responseType: typeof ModuleExistsResponse;
|
|
1312
|
+
readonly responseStream: false;
|
|
1313
|
+
readonly options: {};
|
|
1314
|
+
};
|
|
1315
|
+
readonly moduleList: {
|
|
1316
|
+
readonly name: "ModuleList";
|
|
1317
|
+
readonly requestType: typeof Empty;
|
|
1318
|
+
readonly requestStream: false;
|
|
1319
|
+
readonly responseType: typeof ModuleListResponse;
|
|
1320
|
+
readonly responseStream: false;
|
|
1321
|
+
readonly options: {};
|
|
1322
|
+
};
|
|
1323
|
+
readonly watchModules: {
|
|
1324
|
+
readonly name: "WatchModules";
|
|
1325
|
+
readonly requestType: typeof Empty;
|
|
1326
|
+
readonly requestStream: false;
|
|
1327
|
+
readonly responseType: typeof ModuleListResponse;
|
|
1328
|
+
readonly responseStream: true;
|
|
1329
|
+
readonly options: {};
|
|
1330
|
+
};
|
|
1331
|
+
readonly registerModule: {
|
|
1332
|
+
readonly name: "RegisterModule";
|
|
1333
|
+
readonly requestType: typeof RegisterModuleRequest;
|
|
1334
|
+
readonly requestStream: false;
|
|
1335
|
+
readonly responseType: typeof RegisterModuleResponse;
|
|
1336
|
+
readonly responseStream: false;
|
|
1337
|
+
readonly options: {};
|
|
1338
|
+
};
|
|
1339
|
+
readonly moduleHealthProbe: {
|
|
1340
|
+
readonly name: "ModuleHealthProbe";
|
|
1341
|
+
readonly requestType: typeof ModuleHealthRequest;
|
|
1342
|
+
readonly requestStream: false;
|
|
1343
|
+
readonly responseType: typeof Empty;
|
|
1344
|
+
readonly responseStream: false;
|
|
1345
|
+
readonly options: {};
|
|
1346
|
+
};
|
|
1347
|
+
readonly getServerConfig: {
|
|
1348
|
+
readonly name: "GetServerConfig";
|
|
1349
|
+
readonly requestType: typeof Empty;
|
|
1350
|
+
readonly requestStream: false;
|
|
1351
|
+
readonly responseType: typeof GetConfigResponse;
|
|
1352
|
+
readonly responseStream: false;
|
|
1353
|
+
readonly options: {};
|
|
1354
|
+
};
|
|
1355
|
+
readonly getRedisDetails: {
|
|
1356
|
+
readonly name: "GetRedisDetails";
|
|
1357
|
+
readonly requestType: typeof Empty;
|
|
1358
|
+
readonly requestStream: false;
|
|
1359
|
+
readonly responseType: typeof GetRedisDetailsResponse;
|
|
1360
|
+
readonly responseStream: false;
|
|
1361
|
+
readonly options: {};
|
|
1362
|
+
};
|
|
1363
|
+
readonly getModuleUrlByName: {
|
|
1364
|
+
readonly name: "GetModuleUrlByName";
|
|
1365
|
+
readonly requestType: typeof ModuleByNameRequest;
|
|
1366
|
+
readonly requestStream: false;
|
|
1367
|
+
readonly responseType: typeof ModuleByNameResponse;
|
|
1368
|
+
readonly responseStream: false;
|
|
1369
|
+
readonly options: {};
|
|
1370
|
+
};
|
|
1371
|
+
};
|
|
1372
|
+
};
|
|
1373
|
+
type AdminDefinition = typeof AdminDefinition;
|
|
1374
|
+
declare const AdminDefinition: {
|
|
1375
|
+
readonly name: "Admin";
|
|
1376
|
+
readonly fullName: "conduit.core.Admin";
|
|
1377
|
+
readonly methods: {
|
|
1378
|
+
readonly registerAdminRoute: {
|
|
1379
|
+
readonly name: "RegisterAdminRoute";
|
|
1380
|
+
readonly requestType: typeof RegisterAdminRouteRequest;
|
|
1381
|
+
readonly requestStream: false;
|
|
1382
|
+
readonly responseType: typeof Empty;
|
|
1383
|
+
readonly responseStream: false;
|
|
1384
|
+
readonly options: {};
|
|
1385
|
+
};
|
|
1386
|
+
readonly patchRouteMiddlewares: {
|
|
1387
|
+
readonly name: "PatchRouteMiddlewares";
|
|
1388
|
+
readonly requestType: typeof PatchRouteMiddlewaresRequest;
|
|
1389
|
+
readonly requestStream: false;
|
|
1390
|
+
readonly responseType: typeof Empty;
|
|
1391
|
+
readonly responseStream: false;
|
|
1392
|
+
readonly options: {};
|
|
1393
|
+
};
|
|
1394
|
+
};
|
|
1395
|
+
};
|
|
1396
|
+
type Builtin$4 = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
1397
|
+
type DeepPartial$4<T> = T extends Builtin$4 ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial$4<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial$4<U>> : T extends {} ? {
|
|
1398
|
+
[K in keyof T]?: DeepPartial$4<T[K]>;
|
|
1399
|
+
} : Partial<T>;
|
|
1400
|
+
interface MessageFns$4<T> {
|
|
1401
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
1402
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
1403
|
+
fromJSON(object: any): T;
|
|
1404
|
+
toJSON(message: T): unknown;
|
|
1405
|
+
create(base?: DeepPartial$4<T>): T;
|
|
1406
|
+
fromPartial(object: DeepPartial$4<T>): T;
|
|
1407
|
+
}
|
|
1408
|
+
|
|
1409
|
+
interface CreateSchemaRequest {
|
|
1410
|
+
name: string;
|
|
1411
|
+
fields: string;
|
|
1412
|
+
modelOptions: string;
|
|
1413
|
+
collectionName: string;
|
|
1414
|
+
}
|
|
1415
|
+
declare const CreateSchemaRequest: MessageFns$3<CreateSchemaRequest>;
|
|
1416
|
+
interface GetSchemaRequest {
|
|
1417
|
+
schemaName: string;
|
|
1418
|
+
}
|
|
1419
|
+
declare const GetSchemaRequest: MessageFns$3<GetSchemaRequest>;
|
|
1420
|
+
interface GetSchemasRequest {
|
|
1421
|
+
}
|
|
1422
|
+
declare const GetSchemasRequest: MessageFns$3<GetSchemasRequest>;
|
|
1423
|
+
interface GetSchemasResponse {
|
|
1424
|
+
schemas: Schema[];
|
|
1425
|
+
}
|
|
1426
|
+
declare const GetSchemasResponse: MessageFns$3<GetSchemasResponse>;
|
|
1427
|
+
interface DropCollectionResponse {
|
|
1428
|
+
result: string;
|
|
1429
|
+
}
|
|
1430
|
+
declare const DropCollectionResponse: MessageFns$3<DropCollectionResponse>;
|
|
1431
|
+
interface Schema {
|
|
1432
|
+
name: string;
|
|
1433
|
+
fields: string;
|
|
1434
|
+
modelOptions: string;
|
|
1435
|
+
collectionName: string;
|
|
1436
|
+
fieldHash: string;
|
|
1437
|
+
}
|
|
1438
|
+
declare const Schema: MessageFns$3<Schema>;
|
|
1439
|
+
interface SchemaExtension {
|
|
1440
|
+
schemaName: string;
|
|
1441
|
+
fields: string;
|
|
1442
|
+
}
|
|
1443
|
+
declare const SchemaExtension: MessageFns$3<SchemaExtension>;
|
|
1444
|
+
interface FindOneRequest {
|
|
1445
|
+
schemaName: string;
|
|
1446
|
+
query: string;
|
|
1447
|
+
select?: string | undefined;
|
|
1448
|
+
populate: string[];
|
|
1449
|
+
userId?: string | undefined;
|
|
1450
|
+
scope?: string | undefined;
|
|
1451
|
+
readPreference?: string | undefined;
|
|
1452
|
+
}
|
|
1453
|
+
declare const FindOneRequest: MessageFns$3<FindOneRequest>;
|
|
1454
|
+
interface FindRequest {
|
|
1455
|
+
schemaName: string;
|
|
1456
|
+
query: string;
|
|
1457
|
+
select?: string | undefined;
|
|
1458
|
+
skip?: number | undefined;
|
|
1459
|
+
limit?: number | undefined;
|
|
1460
|
+
/** -1 | 1 */
|
|
1461
|
+
sort: {
|
|
1462
|
+
[key: string]: number;
|
|
1463
|
+
};
|
|
1464
|
+
populate: string[];
|
|
1465
|
+
userId?: string | undefined;
|
|
1466
|
+
scope?: string | undefined;
|
|
1467
|
+
readPreference?: string | undefined;
|
|
1468
|
+
}
|
|
1469
|
+
declare const FindRequest: MessageFns$3<FindRequest>;
|
|
1470
|
+
interface FindRequest_SortEntry {
|
|
1471
|
+
key: string;
|
|
1472
|
+
value: number;
|
|
1473
|
+
}
|
|
1474
|
+
declare const FindRequest_SortEntry: MessageFns$3<FindRequest_SortEntry>;
|
|
1475
|
+
interface QueryResponse {
|
|
1476
|
+
result: string;
|
|
1477
|
+
}
|
|
1478
|
+
declare const QueryResponse: MessageFns$3<QueryResponse>;
|
|
1479
|
+
interface QueryRequest {
|
|
1480
|
+
schemaName: string;
|
|
1481
|
+
query: string;
|
|
1482
|
+
userId?: string | undefined;
|
|
1483
|
+
scope?: string | undefined;
|
|
1484
|
+
readPreference?: string | undefined;
|
|
1485
|
+
}
|
|
1486
|
+
declare const QueryRequest: MessageFns$3<QueryRequest>;
|
|
1487
|
+
interface RawQueryRequest {
|
|
1488
|
+
schemaName: string;
|
|
1489
|
+
query: RawQueryRequest_RawQuery | undefined;
|
|
1490
|
+
}
|
|
1491
|
+
declare const RawQueryRequest: MessageFns$3<RawQueryRequest>;
|
|
1492
|
+
interface RawQueryRequest_RawQuery {
|
|
1493
|
+
mongoQuery?: RawQueryRequest_RawQuery_MongoQuery | undefined;
|
|
1494
|
+
sqlQuery?: RawQueryRequest_RawQuery_SQLQuery | undefined;
|
|
1495
|
+
}
|
|
1496
|
+
declare const RawQueryRequest_RawQuery: MessageFns$3<RawQueryRequest_RawQuery>;
|
|
1497
|
+
interface RawQueryRequest_RawQuery_MongoQuery {
|
|
1498
|
+
aggregate?: string | undefined;
|
|
1499
|
+
count?: string | undefined;
|
|
1500
|
+
deleteOne?: string | undefined;
|
|
1501
|
+
deleteMany?: string | undefined;
|
|
1502
|
+
drop?: string | undefined;
|
|
1503
|
+
explain?: string | undefined;
|
|
1504
|
+
find?: string | undefined;
|
|
1505
|
+
insertOne?: string | undefined;
|
|
1506
|
+
insertMany?: string | undefined;
|
|
1507
|
+
updateOne?: string | undefined;
|
|
1508
|
+
updateMany?: string | undefined;
|
|
1509
|
+
options?: string | undefined;
|
|
1510
|
+
}
|
|
1511
|
+
declare const RawQueryRequest_RawQuery_MongoQuery: MessageFns$3<RawQueryRequest_RawQuery_MongoQuery>;
|
|
1512
|
+
interface RawQueryRequest_RawQuery_SQLQuery {
|
|
1513
|
+
query: string;
|
|
1514
|
+
options?: string | undefined;
|
|
1515
|
+
}
|
|
1516
|
+
declare const RawQueryRequest_RawQuery_SQLQuery: MessageFns$3<RawQueryRequest_RawQuery_SQLQuery>;
|
|
1517
|
+
interface CreateViewRequest {
|
|
1518
|
+
schemaName: string;
|
|
1519
|
+
viewName: string;
|
|
1520
|
+
joinedSchemas: string[];
|
|
1521
|
+
query: CreateViewRequest_RawQuery | undefined;
|
|
1522
|
+
}
|
|
1523
|
+
declare const CreateViewRequest: MessageFns$3<CreateViewRequest>;
|
|
1524
|
+
interface CreateViewRequest_RawQuery {
|
|
1525
|
+
mongoQuery: string;
|
|
1526
|
+
sqlQuery: string;
|
|
1527
|
+
}
|
|
1528
|
+
declare const CreateViewRequest_RawQuery: MessageFns$3<CreateViewRequest_RawQuery>;
|
|
1529
|
+
interface DeleteViewRequest {
|
|
1530
|
+
viewName: string;
|
|
1531
|
+
}
|
|
1532
|
+
declare const DeleteViewRequest: MessageFns$3<DeleteViewRequest>;
|
|
1533
|
+
interface UpdateRequest {
|
|
1534
|
+
schemaName: string;
|
|
1535
|
+
id: string;
|
|
1536
|
+
query: string;
|
|
1537
|
+
populate: string[];
|
|
1538
|
+
userId?: string | undefined;
|
|
1539
|
+
scope?: string | undefined;
|
|
1540
|
+
}
|
|
1541
|
+
declare const UpdateRequest: MessageFns$3<UpdateRequest>;
|
|
1542
|
+
interface UpdateManyRequest {
|
|
1543
|
+
schemaName: string;
|
|
1544
|
+
filterQuery: string;
|
|
1545
|
+
query: string;
|
|
1546
|
+
populate: string[];
|
|
1547
|
+
userId?: string | undefined;
|
|
1548
|
+
scope?: string | undefined;
|
|
1549
|
+
}
|
|
1550
|
+
declare const UpdateManyRequest: MessageFns$3<UpdateManyRequest>;
|
|
1551
|
+
interface DropCollectionRequest {
|
|
1552
|
+
schemaName: string;
|
|
1553
|
+
deleteData: boolean;
|
|
1554
|
+
}
|
|
1555
|
+
declare const DropCollectionRequest: MessageFns$3<DropCollectionRequest>;
|
|
1556
|
+
interface MigrateRequest {
|
|
1557
|
+
schemaName: string;
|
|
1558
|
+
}
|
|
1559
|
+
declare const MigrateRequest: MessageFns$3<MigrateRequest>;
|
|
1560
|
+
interface ColumnExistenceRequest {
|
|
1561
|
+
schemaName: string;
|
|
1562
|
+
columns: string[];
|
|
1563
|
+
}
|
|
1564
|
+
declare const ColumnExistenceRequest: MessageFns$3<ColumnExistenceRequest>;
|
|
1565
|
+
interface ColumnExistenceResponse {
|
|
1566
|
+
result: boolean;
|
|
1567
|
+
}
|
|
1568
|
+
declare const ColumnExistenceResponse: MessageFns$3<ColumnExistenceResponse>;
|
|
1569
|
+
interface GetDatabaseTypeResponse {
|
|
1570
|
+
result: string;
|
|
1571
|
+
}
|
|
1572
|
+
declare const GetDatabaseTypeResponse: MessageFns$3<GetDatabaseTypeResponse>;
|
|
1573
|
+
type DatabaseProviderDefinition = typeof DatabaseProviderDefinition;
|
|
1574
|
+
declare const DatabaseProviderDefinition: {
|
|
1575
|
+
readonly name: "DatabaseProvider";
|
|
1576
|
+
readonly fullName: "database.DatabaseProvider";
|
|
1577
|
+
readonly methods: {
|
|
1578
|
+
readonly createSchemaFromAdapter: {
|
|
1579
|
+
readonly name: "CreateSchemaFromAdapter";
|
|
1580
|
+
readonly requestType: typeof CreateSchemaRequest;
|
|
1581
|
+
readonly requestStream: false;
|
|
1582
|
+
readonly responseType: typeof Schema;
|
|
1583
|
+
readonly responseStream: false;
|
|
1584
|
+
readonly options: {};
|
|
1585
|
+
};
|
|
1586
|
+
readonly getSchema: {
|
|
1587
|
+
readonly name: "GetSchema";
|
|
1588
|
+
readonly requestType: typeof GetSchemaRequest;
|
|
1589
|
+
readonly requestStream: false;
|
|
1590
|
+
readonly responseType: typeof Schema;
|
|
1591
|
+
readonly responseStream: false;
|
|
1592
|
+
readonly options: {};
|
|
1593
|
+
};
|
|
1594
|
+
readonly getSchemas: {
|
|
1595
|
+
readonly name: "GetSchemas";
|
|
1596
|
+
readonly requestType: typeof GetSchemasRequest;
|
|
1597
|
+
readonly requestStream: false;
|
|
1598
|
+
readonly responseType: typeof GetSchemasResponse;
|
|
1599
|
+
readonly responseStream: false;
|
|
1600
|
+
readonly options: {};
|
|
1601
|
+
};
|
|
1602
|
+
readonly deleteSchema: {
|
|
1603
|
+
readonly name: "DeleteSchema";
|
|
1604
|
+
readonly requestType: typeof DropCollectionRequest;
|
|
1605
|
+
readonly requestStream: false;
|
|
1606
|
+
readonly responseType: typeof DropCollectionResponse;
|
|
1607
|
+
readonly responseStream: false;
|
|
1608
|
+
readonly options: {};
|
|
1609
|
+
};
|
|
1610
|
+
readonly setSchemaExtension: {
|
|
1611
|
+
readonly name: "SetSchemaExtension";
|
|
1612
|
+
readonly requestType: typeof SchemaExtension;
|
|
1613
|
+
readonly requestStream: false;
|
|
1614
|
+
readonly responseType: typeof Schema;
|
|
1615
|
+
readonly responseStream: false;
|
|
1616
|
+
readonly options: {};
|
|
1617
|
+
};
|
|
1618
|
+
readonly migrate: {
|
|
1619
|
+
readonly name: "Migrate";
|
|
1620
|
+
readonly requestType: typeof MigrateRequest;
|
|
1621
|
+
readonly requestStream: false;
|
|
1622
|
+
readonly responseType: typeof Empty;
|
|
1623
|
+
readonly responseStream: false;
|
|
1624
|
+
readonly options: {};
|
|
1625
|
+
};
|
|
1626
|
+
readonly getDatabaseType: {
|
|
1627
|
+
readonly name: "GetDatabaseType";
|
|
1628
|
+
readonly requestType: typeof Empty;
|
|
1629
|
+
readonly requestStream: false;
|
|
1630
|
+
readonly responseType: typeof GetDatabaseTypeResponse;
|
|
1631
|
+
readonly responseStream: false;
|
|
1632
|
+
readonly options: {};
|
|
1633
|
+
};
|
|
1634
|
+
readonly generateId: {
|
|
1635
|
+
readonly name: "GenerateId";
|
|
1636
|
+
readonly requestType: typeof Empty;
|
|
1637
|
+
readonly requestStream: false;
|
|
1638
|
+
readonly responseType: typeof GetDatabaseTypeResponse;
|
|
1639
|
+
readonly responseStream: false;
|
|
1640
|
+
readonly options: {};
|
|
1641
|
+
};
|
|
1642
|
+
/** Database queries */
|
|
1643
|
+
readonly findOne: {
|
|
1644
|
+
readonly name: "findOne";
|
|
1645
|
+
readonly requestType: typeof FindOneRequest;
|
|
1646
|
+
readonly requestStream: false;
|
|
1647
|
+
readonly responseType: typeof QueryResponse;
|
|
1648
|
+
readonly responseStream: false;
|
|
1649
|
+
readonly options: {};
|
|
1650
|
+
};
|
|
1651
|
+
readonly findMany: {
|
|
1652
|
+
readonly name: "findMany";
|
|
1653
|
+
readonly requestType: typeof FindRequest;
|
|
1654
|
+
readonly requestStream: false;
|
|
1655
|
+
readonly responseType: typeof QueryResponse;
|
|
1656
|
+
readonly responseStream: false;
|
|
1657
|
+
readonly options: {};
|
|
1658
|
+
};
|
|
1659
|
+
readonly create: {
|
|
1660
|
+
readonly name: "create";
|
|
1661
|
+
readonly requestType: typeof QueryRequest;
|
|
1662
|
+
readonly requestStream: false;
|
|
1663
|
+
readonly responseType: typeof QueryResponse;
|
|
1664
|
+
readonly responseStream: false;
|
|
1665
|
+
readonly options: {};
|
|
1666
|
+
};
|
|
1667
|
+
readonly createMany: {
|
|
1668
|
+
readonly name: "createMany";
|
|
1669
|
+
readonly requestType: typeof QueryRequest;
|
|
1670
|
+
readonly requestStream: false;
|
|
1671
|
+
readonly responseType: typeof QueryResponse;
|
|
1672
|
+
readonly responseStream: false;
|
|
1673
|
+
readonly options: {};
|
|
1674
|
+
};
|
|
1675
|
+
readonly deleteOne: {
|
|
1676
|
+
readonly name: "deleteOne";
|
|
1677
|
+
readonly requestType: typeof QueryRequest;
|
|
1678
|
+
readonly requestStream: false;
|
|
1679
|
+
readonly responseType: typeof QueryResponse;
|
|
1680
|
+
readonly responseStream: false;
|
|
1681
|
+
readonly options: {};
|
|
1682
|
+
};
|
|
1683
|
+
readonly deleteMany: {
|
|
1684
|
+
readonly name: "deleteMany";
|
|
1685
|
+
readonly requestType: typeof QueryRequest;
|
|
1686
|
+
readonly requestStream: false;
|
|
1687
|
+
readonly responseType: typeof QueryResponse;
|
|
1688
|
+
readonly responseStream: false;
|
|
1689
|
+
readonly options: {};
|
|
1690
|
+
};
|
|
1691
|
+
readonly findByIdAndUpdate: {
|
|
1692
|
+
readonly name: "findByIdAndUpdate";
|
|
1693
|
+
readonly requestType: typeof UpdateRequest;
|
|
1694
|
+
readonly requestStream: false;
|
|
1695
|
+
readonly responseType: typeof QueryResponse;
|
|
1696
|
+
readonly responseStream: false;
|
|
1697
|
+
readonly options: {};
|
|
1698
|
+
};
|
|
1699
|
+
readonly findByIdAndReplace: {
|
|
1700
|
+
readonly name: "findByIdAndReplace";
|
|
1701
|
+
readonly requestType: typeof UpdateRequest;
|
|
1702
|
+
readonly requestStream: false;
|
|
1703
|
+
readonly responseType: typeof QueryResponse;
|
|
1704
|
+
readonly responseStream: false;
|
|
1705
|
+
readonly options: {};
|
|
1706
|
+
};
|
|
1707
|
+
readonly updateMany: {
|
|
1708
|
+
readonly name: "updateMany";
|
|
1709
|
+
readonly requestType: typeof UpdateManyRequest;
|
|
1710
|
+
readonly requestStream: false;
|
|
1711
|
+
readonly responseType: typeof QueryResponse;
|
|
1712
|
+
readonly responseStream: false;
|
|
1713
|
+
readonly options: {};
|
|
1714
|
+
};
|
|
1715
|
+
readonly updateOne: {
|
|
1716
|
+
readonly name: "updateOne";
|
|
1717
|
+
readonly requestType: typeof UpdateManyRequest;
|
|
1718
|
+
readonly requestStream: false;
|
|
1719
|
+
readonly responseType: typeof QueryResponse;
|
|
1720
|
+
readonly responseStream: false;
|
|
1721
|
+
readonly options: {};
|
|
1722
|
+
};
|
|
1723
|
+
readonly replaceOne: {
|
|
1724
|
+
readonly name: "replaceOne";
|
|
1725
|
+
readonly requestType: typeof UpdateManyRequest;
|
|
1726
|
+
readonly requestStream: false;
|
|
1727
|
+
readonly responseType: typeof QueryResponse;
|
|
1728
|
+
readonly responseStream: false;
|
|
1729
|
+
readonly options: {};
|
|
1730
|
+
};
|
|
1731
|
+
readonly countDocuments: {
|
|
1732
|
+
readonly name: "countDocuments";
|
|
1733
|
+
readonly requestType: typeof QueryRequest;
|
|
1734
|
+
readonly requestStream: false;
|
|
1735
|
+
readonly responseType: typeof QueryResponse;
|
|
1736
|
+
readonly responseStream: false;
|
|
1737
|
+
readonly options: {};
|
|
1738
|
+
};
|
|
1739
|
+
readonly rawQuery: {
|
|
1740
|
+
readonly name: "rawQuery";
|
|
1741
|
+
readonly requestType: typeof RawQueryRequest;
|
|
1742
|
+
readonly requestStream: false;
|
|
1743
|
+
readonly responseType: typeof QueryResponse;
|
|
1744
|
+
readonly responseStream: false;
|
|
1745
|
+
readonly options: {};
|
|
1746
|
+
};
|
|
1747
|
+
readonly createView: {
|
|
1748
|
+
readonly name: "createView";
|
|
1749
|
+
readonly requestType: typeof CreateViewRequest;
|
|
1750
|
+
readonly requestStream: false;
|
|
1751
|
+
readonly responseType: typeof Empty;
|
|
1752
|
+
readonly responseStream: false;
|
|
1753
|
+
readonly options: {};
|
|
1754
|
+
};
|
|
1755
|
+
readonly deleteView: {
|
|
1756
|
+
readonly name: "deleteView";
|
|
1757
|
+
readonly requestType: typeof DeleteViewRequest;
|
|
1758
|
+
readonly requestStream: false;
|
|
1759
|
+
readonly responseType: typeof Empty;
|
|
1760
|
+
readonly responseStream: false;
|
|
1761
|
+
readonly options: {};
|
|
1762
|
+
};
|
|
1763
|
+
readonly columnExistence: {
|
|
1764
|
+
readonly name: "columnExistence";
|
|
1765
|
+
readonly requestType: typeof ColumnExistenceRequest;
|
|
1766
|
+
readonly requestStream: false;
|
|
1767
|
+
readonly responseType: typeof ColumnExistenceResponse;
|
|
1768
|
+
readonly responseStream: false;
|
|
1769
|
+
readonly options: {};
|
|
1770
|
+
};
|
|
1771
|
+
};
|
|
1772
|
+
};
|
|
1773
|
+
type Builtin$3 = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
1774
|
+
type DeepPartial$3<T> = T extends Builtin$3 ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial$3<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial$3<U>> : T extends {} ? {
|
|
1775
|
+
[K in keyof T]?: DeepPartial$3<T[K]>;
|
|
1776
|
+
} : Partial<T>;
|
|
1777
|
+
interface MessageFns$3<T> {
|
|
1778
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
1779
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
1780
|
+
fromJSON(object: any): T;
|
|
1781
|
+
toJSON(message: T): unknown;
|
|
1782
|
+
create(base?: DeepPartial$3<T>): T;
|
|
1783
|
+
fromPartial(object: DeepPartial$3<T>): T;
|
|
1784
|
+
}
|
|
1785
|
+
|
|
1786
|
+
interface SetConfigRequest {
|
|
1787
|
+
newConfig: string;
|
|
1788
|
+
}
|
|
1789
|
+
declare const SetConfigRequest: MessageFns$2<SetConfigRequest>;
|
|
1790
|
+
interface SetConfigResponse {
|
|
1791
|
+
updatedConfig: string;
|
|
1792
|
+
}
|
|
1793
|
+
declare const SetConfigResponse: MessageFns$2<SetConfigResponse>;
|
|
1794
|
+
interface GetExportableResourcesRequest {
|
|
1795
|
+
}
|
|
1796
|
+
declare const GetExportableResourcesRequest: MessageFns$2<GetExportableResourcesRequest>;
|
|
1797
|
+
interface GetExportableResourcesResponse {
|
|
1798
|
+
resources: string;
|
|
1799
|
+
}
|
|
1800
|
+
declare const GetExportableResourcesResponse: MessageFns$2<GetExportableResourcesResponse>;
|
|
1801
|
+
interface ExportResourcesRequest {
|
|
1802
|
+
resourceTypes: string[];
|
|
1803
|
+
}
|
|
1804
|
+
declare const ExportResourcesRequest: MessageFns$2<ExportResourcesRequest>;
|
|
1805
|
+
interface ExportResourcesResponse {
|
|
1806
|
+
data: string;
|
|
1807
|
+
}
|
|
1808
|
+
declare const ExportResourcesResponse: MessageFns$2<ExportResourcesResponse>;
|
|
1809
|
+
interface ImportResourcesRequest {
|
|
1810
|
+
data: string;
|
|
1811
|
+
}
|
|
1812
|
+
declare const ImportResourcesRequest: MessageFns$2<ImportResourcesRequest>;
|
|
1813
|
+
interface ImportResourcesResponse {
|
|
1814
|
+
result: string;
|
|
1815
|
+
}
|
|
1816
|
+
declare const ImportResourcesResponse: MessageFns$2<ImportResourcesResponse>;
|
|
1817
|
+
interface Request {
|
|
1818
|
+
params: string;
|
|
1819
|
+
path: string;
|
|
1820
|
+
headers: string;
|
|
1821
|
+
context: string;
|
|
1822
|
+
cookies: string;
|
|
1823
|
+
bodyParams: string;
|
|
1824
|
+
urlParams: string;
|
|
1825
|
+
queryParams: string;
|
|
1826
|
+
functionName: string;
|
|
1827
|
+
}
|
|
1828
|
+
declare const Request: MessageFns$2<Request>;
|
|
1829
|
+
interface Response {
|
|
1830
|
+
result: string;
|
|
1831
|
+
redirect: string;
|
|
1832
|
+
setCookies: Cookie[];
|
|
1833
|
+
removeCookies: Cookie[];
|
|
1834
|
+
}
|
|
1835
|
+
declare const Response: MessageFns$2<Response>;
|
|
1836
|
+
interface Cookie {
|
|
1837
|
+
name: string;
|
|
1838
|
+
value?: string | undefined;
|
|
1839
|
+
options: CookieOptions | undefined;
|
|
1840
|
+
}
|
|
1841
|
+
declare const Cookie: MessageFns$2<Cookie>;
|
|
1842
|
+
interface CookieOptions {
|
|
1843
|
+
httpOnly: boolean;
|
|
1844
|
+
secure: boolean;
|
|
1845
|
+
signed: boolean;
|
|
1846
|
+
maxAge: number;
|
|
1847
|
+
path: string;
|
|
1848
|
+
domain: string;
|
|
1849
|
+
sameSite: string;
|
|
1850
|
+
}
|
|
1851
|
+
declare const CookieOptions: MessageFns$2<CookieOptions>;
|
|
1852
|
+
interface SocketRequest {
|
|
1853
|
+
event: string;
|
|
1854
|
+
socketId: string;
|
|
1855
|
+
params: string;
|
|
1856
|
+
context: string;
|
|
1857
|
+
functionName: string;
|
|
1858
|
+
}
|
|
1859
|
+
declare const SocketRequest: MessageFns$2<SocketRequest>;
|
|
1860
|
+
interface SocketResponse {
|
|
1861
|
+
event: string;
|
|
1862
|
+
data: string;
|
|
1863
|
+
receivers: string[];
|
|
1864
|
+
rooms: string[];
|
|
1865
|
+
}
|
|
1866
|
+
declare const SocketResponse: MessageFns$2<SocketResponse>;
|
|
1867
|
+
type ConduitModuleDefinition = typeof ConduitModuleDefinition;
|
|
1868
|
+
declare const ConduitModuleDefinition: {
|
|
1869
|
+
readonly name: "ConduitModule";
|
|
1870
|
+
readonly fullName: "conduit.module.v1.ConduitModule";
|
|
1871
|
+
readonly methods: {
|
|
1872
|
+
readonly setConfig: {
|
|
1873
|
+
readonly name: "SetConfig";
|
|
1874
|
+
readonly requestType: typeof SetConfigRequest;
|
|
1875
|
+
readonly requestStream: false;
|
|
1876
|
+
readonly responseType: typeof SetConfigResponse;
|
|
1877
|
+
readonly responseStream: false;
|
|
1878
|
+
readonly options: {};
|
|
1879
|
+
};
|
|
1880
|
+
readonly getExportableResources: {
|
|
1881
|
+
readonly name: "GetExportableResources";
|
|
1882
|
+
readonly requestType: typeof GetExportableResourcesRequest;
|
|
1883
|
+
readonly requestStream: false;
|
|
1884
|
+
readonly responseType: typeof GetExportableResourcesResponse;
|
|
1885
|
+
readonly responseStream: false;
|
|
1886
|
+
readonly options: {};
|
|
1887
|
+
};
|
|
1888
|
+
readonly exportResources: {
|
|
1889
|
+
readonly name: "ExportResources";
|
|
1890
|
+
readonly requestType: typeof ExportResourcesRequest;
|
|
1891
|
+
readonly requestStream: false;
|
|
1892
|
+
readonly responseType: typeof ExportResourcesResponse;
|
|
1893
|
+
readonly responseStream: false;
|
|
1894
|
+
readonly options: {};
|
|
1895
|
+
};
|
|
1896
|
+
readonly importResources: {
|
|
1897
|
+
readonly name: "ImportResources";
|
|
1898
|
+
readonly requestType: typeof ImportResourcesRequest;
|
|
1899
|
+
readonly requestStream: false;
|
|
1900
|
+
readonly responseType: typeof ImportResourcesResponse;
|
|
1901
|
+
readonly responseStream: false;
|
|
1902
|
+
readonly options: {};
|
|
1903
|
+
};
|
|
1904
|
+
};
|
|
1905
|
+
};
|
|
1906
|
+
type ClientRouterDefinition = typeof ClientRouterDefinition;
|
|
1907
|
+
declare const ClientRouterDefinition: {
|
|
1908
|
+
readonly name: "ClientRouter";
|
|
1909
|
+
readonly fullName: "conduit.module.v1.ClientRouter";
|
|
1910
|
+
readonly methods: {
|
|
1911
|
+
readonly route: {
|
|
1912
|
+
readonly name: "Route";
|
|
1913
|
+
readonly requestType: typeof Request;
|
|
1914
|
+
readonly requestStream: false;
|
|
1915
|
+
readonly responseType: typeof Response;
|
|
1916
|
+
readonly responseStream: false;
|
|
1917
|
+
readonly options: {};
|
|
1918
|
+
};
|
|
1919
|
+
readonly socketRoute: {
|
|
1920
|
+
readonly name: "SocketRoute";
|
|
1921
|
+
readonly requestType: typeof SocketRequest;
|
|
1922
|
+
readonly requestStream: false;
|
|
1923
|
+
readonly responseType: typeof SocketResponse;
|
|
1924
|
+
readonly responseStream: false;
|
|
1925
|
+
readonly options: {};
|
|
1926
|
+
};
|
|
1927
|
+
};
|
|
1928
|
+
};
|
|
1929
|
+
type AdminRouterDefinition = typeof AdminRouterDefinition;
|
|
1930
|
+
declare const AdminRouterDefinition: {
|
|
1931
|
+
readonly name: "AdminRouter";
|
|
1932
|
+
readonly fullName: "conduit.module.v1.AdminRouter";
|
|
1933
|
+
readonly methods: {
|
|
1934
|
+
readonly route: {
|
|
1935
|
+
readonly name: "Route";
|
|
1936
|
+
readonly requestType: typeof Request;
|
|
1937
|
+
readonly requestStream: false;
|
|
1938
|
+
readonly responseType: typeof Response;
|
|
1939
|
+
readonly responseStream: false;
|
|
1940
|
+
readonly options: {};
|
|
1941
|
+
};
|
|
1942
|
+
readonly socketRoute: {
|
|
1943
|
+
readonly name: "SocketRoute";
|
|
1944
|
+
readonly requestType: typeof SocketRequest;
|
|
1945
|
+
readonly requestStream: false;
|
|
1946
|
+
readonly responseType: typeof SocketResponse;
|
|
1947
|
+
readonly responseStream: false;
|
|
1948
|
+
readonly options: {};
|
|
1949
|
+
};
|
|
1950
|
+
};
|
|
1951
|
+
};
|
|
1952
|
+
type Builtin$2 = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
1953
|
+
type DeepPartial$2<T> = T extends Builtin$2 ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial$2<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial$2<U>> : T extends {} ? {
|
|
1954
|
+
[K in keyof T]?: DeepPartial$2<T[K]>;
|
|
1955
|
+
} : Partial<T>;
|
|
1956
|
+
interface MessageFns$2<T> {
|
|
1957
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
1958
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
1959
|
+
fromJSON(object: any): T;
|
|
1960
|
+
toJSON(message: T): unknown;
|
|
1961
|
+
create(base?: DeepPartial$2<T>): T;
|
|
1962
|
+
fromPartial(object: DeepPartial$2<T>): T;
|
|
1963
|
+
}
|
|
1964
|
+
|
|
1965
|
+
interface SocketData {
|
|
1966
|
+
event: string;
|
|
1967
|
+
data?: string | undefined;
|
|
1968
|
+
receivers: string[];
|
|
1969
|
+
rooms: string[];
|
|
1970
|
+
}
|
|
1971
|
+
declare const SocketData: MessageFns$1<SocketData>;
|
|
1972
|
+
interface PatchAppRouteMiddlewaresRequest {
|
|
1973
|
+
path: string;
|
|
1974
|
+
action: string;
|
|
1975
|
+
middlewares: string[];
|
|
1976
|
+
}
|
|
1977
|
+
declare const PatchAppRouteMiddlewaresRequest: MessageFns$1<PatchAppRouteMiddlewaresRequest>;
|
|
1978
|
+
interface RegisterConduitRouteRequest {
|
|
1979
|
+
routes: RegisterConduitRouteRequest_PathDefinition[];
|
|
1980
|
+
routerUrl?: string | undefined;
|
|
1981
|
+
}
|
|
1982
|
+
declare const RegisterConduitRouteRequest: MessageFns$1<RegisterConduitRouteRequest>;
|
|
1983
|
+
interface RegisterConduitRouteRequest_PathDefinition {
|
|
1984
|
+
options: RegisterConduitRouteRequest_ConduitRouteOptions | undefined;
|
|
1985
|
+
returns?: RegisterConduitRouteRequest_ConduitRouteReturnDefinition | undefined;
|
|
1986
|
+
grpcFunction?: string | undefined;
|
|
1987
|
+
isMiddleware?: boolean | undefined;
|
|
1988
|
+
events?: string | undefined;
|
|
1989
|
+
}
|
|
1990
|
+
declare const RegisterConduitRouteRequest_PathDefinition: MessageFns$1<RegisterConduitRouteRequest_PathDefinition>;
|
|
1991
|
+
interface RegisterConduitRouteRequest_ErrorDefinition {
|
|
1992
|
+
conduitCode: string;
|
|
1993
|
+
grpcCode: number;
|
|
1994
|
+
message: string;
|
|
1995
|
+
description: string;
|
|
1996
|
+
}
|
|
1997
|
+
declare const RegisterConduitRouteRequest_ErrorDefinition: MessageFns$1<RegisterConduitRouteRequest_ErrorDefinition>;
|
|
1998
|
+
interface RegisterConduitRouteRequest_ConduitRouteOptions {
|
|
1999
|
+
queryParams?: string | undefined;
|
|
2000
|
+
bodyParams?: string | undefined;
|
|
2001
|
+
urlParams?: string | undefined;
|
|
2002
|
+
action?: string | undefined;
|
|
2003
|
+
path: string;
|
|
2004
|
+
name?: string | undefined;
|
|
2005
|
+
description?: string | undefined;
|
|
2006
|
+
middlewares: string[];
|
|
2007
|
+
cacheControl?: string | undefined;
|
|
2008
|
+
errors: RegisterConduitRouteRequest_ErrorDefinition[];
|
|
2009
|
+
mcp?: boolean | undefined;
|
|
2010
|
+
strictParams?: boolean | undefined;
|
|
2011
|
+
rateLimit?: string | undefined;
|
|
2012
|
+
}
|
|
2013
|
+
declare const RegisterConduitRouteRequest_ConduitRouteOptions: MessageFns$1<RegisterConduitRouteRequest_ConduitRouteOptions>;
|
|
2014
|
+
interface RegisterConduitRouteRequest_ConduitRouteReturnDefinition {
|
|
2015
|
+
name: string;
|
|
2016
|
+
fields: string;
|
|
2017
|
+
}
|
|
2018
|
+
declare const RegisterConduitRouteRequest_ConduitRouteReturnDefinition: MessageFns$1<RegisterConduitRouteRequest_ConduitRouteReturnDefinition>;
|
|
2019
|
+
type RouterDefinition = typeof RouterDefinition;
|
|
2020
|
+
declare const RouterDefinition: {
|
|
2021
|
+
readonly name: "Router";
|
|
2022
|
+
readonly fullName: "router.Router";
|
|
2023
|
+
readonly methods: {
|
|
2024
|
+
readonly registerConduitRoute: {
|
|
2025
|
+
readonly name: "RegisterConduitRoute";
|
|
2026
|
+
readonly requestType: typeof RegisterConduitRouteRequest;
|
|
2027
|
+
readonly requestStream: false;
|
|
2028
|
+
readonly responseType: typeof Empty;
|
|
2029
|
+
readonly responseStream: false;
|
|
2030
|
+
readonly options: {};
|
|
2031
|
+
};
|
|
2032
|
+
readonly socketPush: {
|
|
2033
|
+
readonly name: "SocketPush";
|
|
2034
|
+
readonly requestType: typeof SocketData;
|
|
2035
|
+
readonly requestStream: false;
|
|
2036
|
+
readonly responseType: typeof Empty;
|
|
2037
|
+
readonly responseStream: false;
|
|
2038
|
+
readonly options: {};
|
|
2039
|
+
};
|
|
2040
|
+
readonly patchRouteMiddlewares: {
|
|
2041
|
+
readonly name: "PatchRouteMiddlewares";
|
|
2042
|
+
readonly requestType: typeof PatchAppRouteMiddlewaresRequest;
|
|
2043
|
+
readonly requestStream: false;
|
|
2044
|
+
readonly responseType: typeof Empty;
|
|
2045
|
+
readonly responseStream: false;
|
|
2046
|
+
readonly options: {};
|
|
2047
|
+
};
|
|
2048
|
+
};
|
|
2049
|
+
};
|
|
2050
|
+
type Builtin$1 = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
2051
|
+
type DeepPartial$1<T> = T extends Builtin$1 ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial$1<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial$1<U>> : T extends {} ? {
|
|
2052
|
+
[K in keyof T]?: DeepPartial$1<T[K]>;
|
|
2053
|
+
} : Partial<T>;
|
|
2054
|
+
interface MessageFns$1<T> {
|
|
2055
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
2056
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
2057
|
+
fromJSON(object: any): T;
|
|
2058
|
+
toJSON(message: T): unknown;
|
|
2059
|
+
create(base?: DeepPartial$1<T>): T;
|
|
2060
|
+
fromPartial(object: DeepPartial$1<T>): T;
|
|
2061
|
+
}
|
|
2062
|
+
|
|
2063
|
+
interface GetFileRequest {
|
|
2064
|
+
id: string;
|
|
2065
|
+
userId?: string | undefined;
|
|
2066
|
+
scope?: string | undefined;
|
|
2067
|
+
}
|
|
2068
|
+
declare const GetFileRequest: MessageFns<GetFileRequest>;
|
|
2069
|
+
interface GetFileUrlRequest {
|
|
2070
|
+
id: string;
|
|
2071
|
+
userId?: string | undefined;
|
|
2072
|
+
scope?: string | undefined;
|
|
2073
|
+
download?: boolean | undefined;
|
|
2074
|
+
}
|
|
2075
|
+
declare const GetFileUrlRequest: MessageFns<GetFileUrlRequest>;
|
|
2076
|
+
interface GetFileUrlResponse {
|
|
2077
|
+
url: string;
|
|
2078
|
+
}
|
|
2079
|
+
declare const GetFileUrlResponse: MessageFns<GetFileUrlResponse>;
|
|
2080
|
+
interface CreateFileRequest {
|
|
2081
|
+
name?: string | undefined;
|
|
2082
|
+
data: string;
|
|
2083
|
+
isPublic: boolean;
|
|
2084
|
+
folder?: string | undefined;
|
|
2085
|
+
container?: string | undefined;
|
|
2086
|
+
mimeType?: string | undefined;
|
|
2087
|
+
userId?: string | undefined;
|
|
2088
|
+
scope?: string | undefined;
|
|
2089
|
+
alias?: string | undefined;
|
|
2090
|
+
}
|
|
2091
|
+
declare const CreateFileRequest: MessageFns<CreateFileRequest>;
|
|
2092
|
+
interface UpdateFileRequest {
|
|
2093
|
+
id: string;
|
|
2094
|
+
data: string;
|
|
2095
|
+
name?: string | undefined;
|
|
2096
|
+
folder?: string | undefined;
|
|
2097
|
+
container?: string | undefined;
|
|
2098
|
+
mimeType?: string | undefined;
|
|
2099
|
+
userId?: string | undefined;
|
|
2100
|
+
scope?: string | undefined;
|
|
2101
|
+
alias?: string | undefined;
|
|
2102
|
+
}
|
|
2103
|
+
declare const UpdateFileRequest: MessageFns<UpdateFileRequest>;
|
|
2104
|
+
interface FileResponse {
|
|
2105
|
+
id: string;
|
|
2106
|
+
url: string;
|
|
2107
|
+
name: string;
|
|
2108
|
+
}
|
|
2109
|
+
declare const FileResponse: MessageFns<FileResponse>;
|
|
2110
|
+
interface GetFileDataResponse {
|
|
2111
|
+
data: string;
|
|
2112
|
+
}
|
|
2113
|
+
declare const GetFileDataResponse: MessageFns<GetFileDataResponse>;
|
|
2114
|
+
interface DeleteFileResponse {
|
|
2115
|
+
success: boolean;
|
|
2116
|
+
}
|
|
2117
|
+
declare const DeleteFileResponse: MessageFns<DeleteFileResponse>;
|
|
2118
|
+
interface CreateFileByUrlRequest {
|
|
2119
|
+
name?: string | undefined;
|
|
2120
|
+
isPublic: boolean;
|
|
2121
|
+
folder?: string | undefined;
|
|
2122
|
+
container?: string | undefined;
|
|
2123
|
+
mimeType?: string | undefined;
|
|
2124
|
+
/** todo: support int64 */
|
|
2125
|
+
size?: number | undefined;
|
|
2126
|
+
userId?: string | undefined;
|
|
2127
|
+
scope?: string | undefined;
|
|
2128
|
+
alias?: string | undefined;
|
|
2129
|
+
}
|
|
2130
|
+
declare const CreateFileByUrlRequest: MessageFns<CreateFileByUrlRequest>;
|
|
2131
|
+
interface FileByUrlResponse {
|
|
2132
|
+
id: string;
|
|
2133
|
+
fileUrl: string;
|
|
2134
|
+
name: string;
|
|
2135
|
+
uploadUrl: string;
|
|
2136
|
+
}
|
|
2137
|
+
declare const FileByUrlResponse: MessageFns<FileByUrlResponse>;
|
|
2138
|
+
interface UpdateFileByUrlRequest {
|
|
2139
|
+
id: string;
|
|
2140
|
+
name?: string | undefined;
|
|
2141
|
+
folder?: string | undefined;
|
|
2142
|
+
container?: string | undefined;
|
|
2143
|
+
mimeType?: string | undefined;
|
|
2144
|
+
/** todo: support int64 */
|
|
2145
|
+
size?: number | undefined;
|
|
2146
|
+
userId?: string | undefined;
|
|
2147
|
+
scope?: string | undefined;
|
|
2148
|
+
alias?: string | undefined;
|
|
2149
|
+
}
|
|
2150
|
+
declare const UpdateFileByUrlRequest: MessageFns<UpdateFileByUrlRequest>;
|
|
2151
|
+
type StorageDefinition = typeof StorageDefinition;
|
|
2152
|
+
declare const StorageDefinition: {
|
|
2153
|
+
readonly name: "Storage";
|
|
2154
|
+
readonly fullName: "storage.Storage";
|
|
2155
|
+
readonly methods: {
|
|
2156
|
+
readonly getFile: {
|
|
2157
|
+
readonly name: "GetFile";
|
|
2158
|
+
readonly requestType: typeof GetFileRequest;
|
|
2159
|
+
readonly requestStream: false;
|
|
2160
|
+
readonly responseType: typeof FileResponse;
|
|
2161
|
+
readonly responseStream: false;
|
|
2162
|
+
readonly options: {};
|
|
2163
|
+
};
|
|
2164
|
+
readonly getFileData: {
|
|
2165
|
+
readonly name: "GetFileData";
|
|
2166
|
+
readonly requestType: typeof GetFileRequest;
|
|
2167
|
+
readonly requestStream: false;
|
|
2168
|
+
readonly responseType: typeof GetFileDataResponse;
|
|
2169
|
+
readonly responseStream: false;
|
|
2170
|
+
readonly options: {};
|
|
2171
|
+
};
|
|
2172
|
+
readonly getFileUrl: {
|
|
2173
|
+
readonly name: "GetFileUrl";
|
|
2174
|
+
readonly requestType: typeof GetFileUrlRequest;
|
|
2175
|
+
readonly requestStream: false;
|
|
2176
|
+
readonly responseType: typeof GetFileUrlResponse;
|
|
2177
|
+
readonly responseStream: false;
|
|
2178
|
+
readonly options: {};
|
|
2179
|
+
};
|
|
2180
|
+
readonly updateFile: {
|
|
2181
|
+
readonly name: "UpdateFile";
|
|
2182
|
+
readonly requestType: typeof UpdateFileRequest;
|
|
2183
|
+
readonly requestStream: false;
|
|
2184
|
+
readonly responseType: typeof FileResponse;
|
|
2185
|
+
readonly responseStream: false;
|
|
2186
|
+
readonly options: {};
|
|
2187
|
+
};
|
|
2188
|
+
readonly createFile: {
|
|
2189
|
+
readonly name: "CreateFile";
|
|
2190
|
+
readonly requestType: typeof CreateFileRequest;
|
|
2191
|
+
readonly requestStream: false;
|
|
2192
|
+
readonly responseType: typeof FileResponse;
|
|
2193
|
+
readonly responseStream: false;
|
|
2194
|
+
readonly options: {};
|
|
2195
|
+
};
|
|
2196
|
+
readonly deleteFile: {
|
|
2197
|
+
readonly name: "DeleteFile";
|
|
2198
|
+
readonly requestType: typeof GetFileRequest;
|
|
2199
|
+
readonly requestStream: false;
|
|
2200
|
+
readonly responseType: typeof DeleteFileResponse;
|
|
2201
|
+
readonly responseStream: false;
|
|
2202
|
+
readonly options: {};
|
|
2203
|
+
};
|
|
2204
|
+
readonly createFileByUrl: {
|
|
2205
|
+
readonly name: "CreateFileByUrl";
|
|
2206
|
+
readonly requestType: typeof CreateFileByUrlRequest;
|
|
2207
|
+
readonly requestStream: false;
|
|
2208
|
+
readonly responseType: typeof FileByUrlResponse;
|
|
2209
|
+
readonly responseStream: false;
|
|
2210
|
+
readonly options: {};
|
|
2211
|
+
};
|
|
2212
|
+
readonly updateFileByUrl: {
|
|
2213
|
+
readonly name: "UpdateFileByUrl";
|
|
2214
|
+
readonly requestType: typeof UpdateFileByUrlRequest;
|
|
2215
|
+
readonly requestStream: false;
|
|
2216
|
+
readonly responseType: typeof FileByUrlResponse;
|
|
2217
|
+
readonly responseStream: false;
|
|
2218
|
+
readonly options: {};
|
|
2219
|
+
};
|
|
2220
|
+
};
|
|
2221
|
+
};
|
|
2222
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
2223
|
+
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 {} ? {
|
|
2224
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
2225
|
+
} : Partial<T>;
|
|
2226
|
+
interface MessageFns<T> {
|
|
2227
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
2228
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
2229
|
+
fromJSON(object: any): T;
|
|
2230
|
+
toJSON(message: T): unknown;
|
|
2231
|
+
create(base?: DeepPartial<T>): T;
|
|
2232
|
+
fromPartial(object: DeepPartial<T>): T;
|
|
2233
|
+
}
|
|
2234
|
+
|
|
2235
|
+
declare class ConduitModule<T extends CompatServiceDefinition> {
|
|
2236
|
+
readonly _clientName: string;
|
|
2237
|
+
private readonly _serviceName;
|
|
2238
|
+
private readonly _serviceUrl;
|
|
2239
|
+
private readonly _grpcToken?;
|
|
2240
|
+
protected channel?: Channel;
|
|
2241
|
+
protected protoPath?: string;
|
|
2242
|
+
protected type?: T;
|
|
2243
|
+
protected readonly healthCheckEmitter: EventEmitter<[never]>;
|
|
2244
|
+
constructor(_clientName: string, _serviceName: string, _serviceUrl: string, _grpcToken?: string | undefined);
|
|
2245
|
+
private _client?;
|
|
2246
|
+
get client(): Client<T> | undefined;
|
|
2247
|
+
private _healthClient?;
|
|
2248
|
+
get healthClient(): Client<typeof HealthDefinition> | undefined;
|
|
2249
|
+
private _moduleClient?;
|
|
2250
|
+
get moduleClient(): Client<typeof ConduitModuleDefinition> | undefined;
|
|
2251
|
+
get active(): boolean;
|
|
2252
|
+
get healthCheckWatcher(): EventEmitter<[never]>;
|
|
2253
|
+
initializeClient(type: T): Client<T>;
|
|
2254
|
+
openConnection(): void;
|
|
2255
|
+
closeConnection(): void;
|
|
2256
|
+
check(service?: string): Promise<HealthCheckResponse_ServingStatus>;
|
|
2257
|
+
watch(service?: string): Promise<void>;
|
|
2258
|
+
}
|
|
2259
|
+
|
|
2260
|
+
declare function checkModuleHealth(clientName: string, serviceUrl: string, service?: string, grpcToken?: string): Promise<any>;
|
|
2261
|
+
|
|
2262
|
+
declare enum TYPE {
|
|
2263
|
+
String = "String",
|
|
2264
|
+
Number = "Number",
|
|
2265
|
+
Boolean = "Boolean",
|
|
2266
|
+
Date = "Date",
|
|
2267
|
+
ObjectId = "ObjectId",
|
|
2268
|
+
JSON = "JSON",
|
|
2269
|
+
Relation = "Relation"
|
|
2270
|
+
}
|
|
2271
|
+
declare enum SQLDataType {
|
|
2272
|
+
VARCHAR = "VARCHAR",
|
|
2273
|
+
TEXT = "TEXT",
|
|
2274
|
+
CHAR = "CHAR",
|
|
2275
|
+
INT = "INT",
|
|
2276
|
+
BIGINT = "BIGINT",
|
|
2277
|
+
FLOAT = "FLOAT",
|
|
2278
|
+
DOUBLE = "DOUBLE",
|
|
2279
|
+
DECIMAL = "DECIMAL",
|
|
2280
|
+
TIME = "TIME",
|
|
2281
|
+
DATETIME = "DATETIME",
|
|
2282
|
+
TIMESTAMP = "TIMESTAMP"
|
|
2283
|
+
}
|
|
2284
|
+
declare enum MongoIndexType {
|
|
2285
|
+
Ascending = 1,
|
|
2286
|
+
Descending = -1,
|
|
2287
|
+
GeoSpatial2d = "2d",
|
|
2288
|
+
GeoSpatial2dSphere = "2dsphere",
|
|
2289
|
+
GeoHaystack = "geoHaystack",
|
|
2290
|
+
Hashed = "hashed",
|
|
2291
|
+
Text = "text"
|
|
2292
|
+
}
|
|
2293
|
+
declare enum PostgresIndexType {
|
|
2294
|
+
BTREE = "BTREE",
|
|
2295
|
+
HASH = "HASH",
|
|
2296
|
+
GIST = "GIST",
|
|
2297
|
+
SPGIST = "SPGIST",
|
|
2298
|
+
GIN = "GIN",
|
|
2299
|
+
BRIN = "BRIN"
|
|
2300
|
+
}
|
|
2301
|
+
type Array$1 = any[];
|
|
2302
|
+
interface ConduitStringValidation {
|
|
2303
|
+
format?: 'email' | 'url' | 'uuid' | 'objectId';
|
|
2304
|
+
minLength?: number;
|
|
2305
|
+
maxLength?: number;
|
|
2306
|
+
length?: number;
|
|
2307
|
+
pattern?: string;
|
|
2308
|
+
/** Custom error text when any string validation rule fails (REST/GraphQL/MCP). */
|
|
2309
|
+
message?: string;
|
|
2310
|
+
}
|
|
2311
|
+
interface ConduitNumberValidation {
|
|
2312
|
+
min?: number;
|
|
2313
|
+
max?: number;
|
|
2314
|
+
exclusiveMin?: number;
|
|
2315
|
+
exclusiveMax?: number;
|
|
2316
|
+
integer?: boolean;
|
|
2317
|
+
/** Custom error text when any number validation rule fails (REST/GraphQL/MCP). */
|
|
2318
|
+
message?: string;
|
|
2319
|
+
}
|
|
2320
|
+
interface ConduitArrayValidation {
|
|
2321
|
+
minItems?: number;
|
|
2322
|
+
maxItems?: number;
|
|
2323
|
+
/** Custom error text when minItems/maxItems validation fails (REST/GraphQL/MCP). */
|
|
2324
|
+
message?: string;
|
|
2325
|
+
}
|
|
2326
|
+
type ConduitValidationRules = ConduitStringValidation | ConduitNumberValidation | ConduitArrayValidation;
|
|
2327
|
+
type BaseConduitModelField = {
|
|
2328
|
+
type?: TYPE | TYPE[] | ConduitModel | ArrayConduitModel[];
|
|
2329
|
+
sqlType?: SQLDataType;
|
|
2330
|
+
default?: any;
|
|
2331
|
+
description?: string;
|
|
2332
|
+
required?: boolean;
|
|
2333
|
+
select?: boolean;
|
|
2334
|
+
validate?: ConduitValidationRules;
|
|
2335
|
+
};
|
|
2336
|
+
type UniqueAndRequiredField = {
|
|
2337
|
+
unique: true;
|
|
2338
|
+
required: true;
|
|
2339
|
+
index?: SchemaFieldIndex;
|
|
2340
|
+
};
|
|
2341
|
+
type NotUniqueField = {
|
|
2342
|
+
unique?: false;
|
|
2343
|
+
required?: boolean;
|
|
2344
|
+
index?: SchemaFieldIndex;
|
|
2345
|
+
};
|
|
2346
|
+
type BasicConduitModelField = BaseConduitModelField & (UniqueAndRequiredField | NotUniqueField);
|
|
2347
|
+
type ConduitModelFieldRelation = BasicConduitModelField & {
|
|
2348
|
+
type: TYPE.Relation | TYPE.Relation[];
|
|
2349
|
+
model: string;
|
|
2350
|
+
};
|
|
2351
|
+
type ConduitModelFieldJSON = BasicConduitModelField & {
|
|
2352
|
+
type: TYPE.JSON | TYPE.JSON[];
|
|
2353
|
+
};
|
|
2354
|
+
type ConduitModelFieldEnum = BasicConduitModelField & {
|
|
2355
|
+
type: ExcludeJSONRelation<TYPE> | ExcludeJSONRelation<TYPE>[];
|
|
2356
|
+
enum: any;
|
|
2357
|
+
};
|
|
2358
|
+
type ConduitModelField = BasicConduitModelField & {
|
|
2359
|
+
type?: ExcludeJSONRelation<TYPE> | ExcludeJSONRelation<TYPE>[] | ConduitModel | ArrayConduitModel[];
|
|
2360
|
+
};
|
|
2361
|
+
type allowedTypes = ExcludeRelation<TYPE> | ConduitModelField | ConduitModelFieldEnum | ConduitModelFieldJSON | ConduitModelFieldRelation;
|
|
2362
|
+
type embeddableArray = ExcludeRelation<TYPE> | ConduitModelField | ConduitModelFieldEnum | ConduitModelFieldJSON;
|
|
2363
|
+
type ExcludeRelation<T> = T extends TYPE.Relation ? never : T;
|
|
2364
|
+
type ExcludeJSON<T> = T extends TYPE.JSON ? never : T;
|
|
2365
|
+
type ExcludeJSONRelation<T> = ExcludeJSON<ExcludeRelation<T>>;
|
|
2366
|
+
type ArrayConduitModel = {
|
|
2367
|
+
type?: never;
|
|
2368
|
+
sqlType?: never;
|
|
2369
|
+
default?: never;
|
|
2370
|
+
description?: never;
|
|
2371
|
+
required?: never;
|
|
2372
|
+
select?: never;
|
|
2373
|
+
unique?: never;
|
|
2374
|
+
index?: never;
|
|
2375
|
+
enum?: never;
|
|
2376
|
+
model?: never;
|
|
2377
|
+
} & {
|
|
2378
|
+
[field in string]: embeddableArray | embeddableArray[];
|
|
2379
|
+
};
|
|
2380
|
+
type ConduitModel = {
|
|
2381
|
+
type?: never;
|
|
2382
|
+
sqlType?: never;
|
|
2383
|
+
default?: never;
|
|
2384
|
+
description?: never;
|
|
2385
|
+
required?: never;
|
|
2386
|
+
select?: never;
|
|
2387
|
+
unique?: never;
|
|
2388
|
+
index?: never;
|
|
2389
|
+
enum?: never;
|
|
2390
|
+
model?: never;
|
|
2391
|
+
} & {
|
|
2392
|
+
[field in string]: allowedTypes | allowedTypes[] | ConduitModel;
|
|
2393
|
+
};
|
|
2394
|
+
declare const ConduitModelOptionsPermModifyType: string[];
|
|
2395
|
+
interface ConduitSchemaOptions {
|
|
2396
|
+
timestamps?: boolean;
|
|
2397
|
+
_id?: boolean;
|
|
2398
|
+
conduit?: {
|
|
2399
|
+
[field: string]: any;
|
|
2400
|
+
permissions?: {
|
|
2401
|
+
extendable: boolean;
|
|
2402
|
+
canCreate: boolean;
|
|
2403
|
+
canModify: 'Everything' | 'Nothing' | 'ExtensionOnly';
|
|
2404
|
+
canDelete: boolean;
|
|
2405
|
+
};
|
|
2406
|
+
authorization?: {
|
|
2407
|
+
enabled: boolean;
|
|
2408
|
+
};
|
|
2409
|
+
/** Mongoose read preference for this schema (ignored by SQL); per-query wins. */
|
|
2410
|
+
readPreference?: string;
|
|
2411
|
+
};
|
|
2412
|
+
/** Includes readonly/const-asserted index arrays (e.g. `as const` in schema definitions). */
|
|
2413
|
+
indexes?: ReadonlyArray<ModelOptionsIndexes>;
|
|
2414
|
+
}
|
|
2415
|
+
interface SchemaFieldIndex {
|
|
2416
|
+
type?: MongoIndexType | PostgresIndexType;
|
|
2417
|
+
options?: MongoIndexOptions | PostgresIndexOptions;
|
|
2418
|
+
[field: string]: any;
|
|
2419
|
+
}
|
|
2420
|
+
interface ModelOptionsIndexes {
|
|
2421
|
+
fields: string[] | readonly string[];
|
|
2422
|
+
types?: MongoIndexType[] | PostgresIndexType;
|
|
2423
|
+
options?: MongoIndexOptions | PostgresIndexOptions;
|
|
2424
|
+
[field: string]: any;
|
|
2425
|
+
}
|
|
2426
|
+
interface MongoIndexOptions {
|
|
2427
|
+
background?: boolean;
|
|
2428
|
+
unique?: boolean;
|
|
2429
|
+
name?: string;
|
|
2430
|
+
partialFilterExpression?: Document;
|
|
2431
|
+
sparse?: boolean;
|
|
2432
|
+
expireAfterSeconds?: number;
|
|
2433
|
+
storageEngine?: Document;
|
|
2434
|
+
commitQuorum?: number | string;
|
|
2435
|
+
version?: number;
|
|
2436
|
+
weights?: Document;
|
|
2437
|
+
default_language?: string;
|
|
2438
|
+
language_override?: string;
|
|
2439
|
+
textIndexVersion?: number;
|
|
2440
|
+
'2dsphereIndexVersion'?: number;
|
|
2441
|
+
bits?: number;
|
|
2442
|
+
min?: number;
|
|
2443
|
+
max?: number;
|
|
2444
|
+
bucketSize?: number;
|
|
2445
|
+
wildcardProjection?: Document;
|
|
2446
|
+
hidden?: boolean;
|
|
2447
|
+
}
|
|
2448
|
+
interface PostgresIndexOptions {
|
|
2449
|
+
concurrently?: boolean;
|
|
2450
|
+
name?: string;
|
|
2451
|
+
operator?: string;
|
|
2452
|
+
parser?: null | string;
|
|
2453
|
+
prefix?: string;
|
|
2454
|
+
unique?: boolean;
|
|
2455
|
+
using?: PostgresIndexType;
|
|
2456
|
+
where?: {
|
|
2457
|
+
[opt: string]: any;
|
|
2458
|
+
};
|
|
2459
|
+
}
|
|
2460
|
+
|
|
2461
|
+
type Indexable = {
|
|
2462
|
+
[key: string]: any;
|
|
2463
|
+
};
|
|
2464
|
+
type Params = Indexable;
|
|
2465
|
+
type Document$1 = Indexable;
|
|
2466
|
+
type Route = Indexable;
|
|
2467
|
+
type Headers$1 = Indexable;
|
|
2468
|
+
type Context = Indexable;
|
|
2469
|
+
type Cookies = Indexable;
|
|
2470
|
+
|
|
2471
|
+
interface ModuleErrorDefinition {
|
|
2472
|
+
grpcCode: number;
|
|
2473
|
+
conduitCode: string;
|
|
2474
|
+
message: string;
|
|
2475
|
+
description: string;
|
|
2476
|
+
}
|
|
2477
|
+
interface ConduitRouteParameters {
|
|
2478
|
+
params?: Indexable;
|
|
2479
|
+
path?: string;
|
|
2480
|
+
headers: Indexable;
|
|
2481
|
+
context?: Indexable;
|
|
2482
|
+
cookies?: Indexable;
|
|
2483
|
+
bodyParams?: Indexable;
|
|
2484
|
+
urlParams?: Indexable;
|
|
2485
|
+
queryParams?: Indexable;
|
|
2486
|
+
}
|
|
2487
|
+
type AllowedTypes = TYPE.String | TYPE.Number | TYPE.Boolean | TYPE.Date | TYPE.ObjectId;
|
|
2488
|
+
type ConduitUrlParam = AllowedTypes | {
|
|
2489
|
+
type: AllowedTypes;
|
|
2490
|
+
required?: boolean;
|
|
2491
|
+
validate?: ConduitValidationRules;
|
|
2492
|
+
};
|
|
2493
|
+
type ConduitQueryParam = ConduitUrlParam | AllowedTypes[] | {
|
|
2494
|
+
type: AllowedTypes[];
|
|
2495
|
+
required: boolean;
|
|
2496
|
+
validate?: ConduitValidationRules;
|
|
2497
|
+
} | {
|
|
2498
|
+
type: AllowedTypes;
|
|
2499
|
+
required?: boolean;
|
|
2500
|
+
validate?: ConduitValidationRules;
|
|
2501
|
+
}[];
|
|
2502
|
+
type ConduitUrlParams = {
|
|
2503
|
+
[field in string]: ConduitUrlParam;
|
|
2504
|
+
};
|
|
2505
|
+
type ConduitQueryParams = {
|
|
2506
|
+
[field in string]: ConduitQueryParam;
|
|
2507
|
+
};
|
|
2508
|
+
type ConduitReturnField = keyof typeof TYPE | TYPE | ConduitModel | {
|
|
2509
|
+
[key: string]: TYPE | TYPE[] | ConduitModel | ConduitModel[];
|
|
2510
|
+
};
|
|
2511
|
+
type ConduitReturnModel = {
|
|
2512
|
+
[field: string]: ConduitReturnField | allowedTypes | allowedTypes[] | string | string[];
|
|
2513
|
+
};
|
|
2514
|
+
type ConduitReturn = ConduitReturnField | ConduitReturnModel | string;
|
|
2515
|
+
declare enum ConduitRouteActions {
|
|
2516
|
+
GET = "GET",
|
|
2517
|
+
POST = "POST",
|
|
2518
|
+
UPDATE = "PUT",
|
|
2519
|
+
PATCH = "PATCH",
|
|
2520
|
+
DELETE = "DELETE"
|
|
2521
|
+
}
|
|
2522
|
+
interface RateLimitOptions {
|
|
2523
|
+
maxRequests: number;
|
|
2524
|
+
/** Window length in seconds */
|
|
2525
|
+
resetInterval: number;
|
|
2526
|
+
}
|
|
2527
|
+
interface ConduitRouteOptions {
|
|
2528
|
+
queryParams?: ConduitQueryParams;
|
|
2529
|
+
bodyParams?: ConduitModel;
|
|
2530
|
+
urlParams?: ConduitUrlParams;
|
|
2531
|
+
action: ConduitRouteActions;
|
|
2532
|
+
path: string;
|
|
2533
|
+
name?: string;
|
|
2534
|
+
description?: string;
|
|
2535
|
+
middlewares?: string[];
|
|
2536
|
+
cacheControl?: string;
|
|
2537
|
+
mcp?: boolean;
|
|
2538
|
+
errors?: ModuleErrorDefinition[];
|
|
2539
|
+
/**
|
|
2540
|
+
* How unknown body/query/url keys are handled during Zod validation:
|
|
2541
|
+
* - `true`: reject with USER_INPUT_ERROR (strict mode)
|
|
2542
|
+
* - `false`: allow through to the handler (passthrough)
|
|
2543
|
+
* - unset: strip unknown keys from validated params (default; prevents pollution without errors)
|
|
2544
|
+
*/
|
|
2545
|
+
strictParams?: boolean;
|
|
2546
|
+
/** Per-route rate limit (per client IP). Fails closed if Redis is unavailable. */
|
|
2547
|
+
rateLimit?: RateLimitOptions;
|
|
2548
|
+
}
|
|
2549
|
+
interface ConduitRouteObject {
|
|
2550
|
+
options: ConduitRouteOptions;
|
|
2551
|
+
returns: {
|
|
2552
|
+
name: string;
|
|
2553
|
+
fields: ConduitReturn;
|
|
2554
|
+
};
|
|
2555
|
+
grpcFunction: string;
|
|
2556
|
+
}
|
|
2557
|
+
|
|
2558
|
+
interface ConduitMiddlewareOptions {
|
|
2559
|
+
action?: ConduitRouteActions;
|
|
2560
|
+
path?: string;
|
|
2561
|
+
name: string;
|
|
2562
|
+
description?: string;
|
|
2563
|
+
}
|
|
2564
|
+
|
|
2565
|
+
/**
|
|
2566
|
+
* Supports:
|
|
2567
|
+
* {
|
|
2568
|
+
* name: 'String',
|
|
2569
|
+
* age: 'Number
|
|
2570
|
+
* ....
|
|
2571
|
+
* }
|
|
2572
|
+
*
|
|
2573
|
+
* or
|
|
2574
|
+
*
|
|
2575
|
+
* {
|
|
2576
|
+
* name: {
|
|
2577
|
+
* type: 'String',
|
|
2578
|
+
* required: true
|
|
2579
|
+
* },
|
|
2580
|
+
* age: 'Number'
|
|
2581
|
+
* }
|
|
2582
|
+
*
|
|
2583
|
+
* or
|
|
2584
|
+
*
|
|
2585
|
+
* {
|
|
2586
|
+
* user: {
|
|
2587
|
+
* username: 'String',
|
|
2588
|
+
* age: {
|
|
2589
|
+
* type: 'Number',
|
|
2590
|
+
* required: true
|
|
2591
|
+
* }
|
|
2592
|
+
* }
|
|
2593
|
+
* }
|
|
2594
|
+
*
|
|
2595
|
+
* or
|
|
2596
|
+
*
|
|
2597
|
+
* {
|
|
2598
|
+
* user:{
|
|
2599
|
+
* friends: ['String'],
|
|
2600
|
+
* post: [{type: 'String', required:trues}]
|
|
2601
|
+
* }
|
|
2602
|
+
* }
|
|
2603
|
+
*
|
|
2604
|
+
*/
|
|
2605
|
+
declare class ConduitRouteReturnDefinition {
|
|
2606
|
+
private readonly _name;
|
|
2607
|
+
private readonly _fields;
|
|
2608
|
+
constructor(name: string, fields?: ConduitReturn);
|
|
2609
|
+
get name(): string;
|
|
2610
|
+
get fields(): ConduitReturn;
|
|
2611
|
+
}
|
|
2612
|
+
|
|
2613
|
+
interface ConduitRoute {
|
|
2614
|
+
returnType: ConduitRouteReturnDefinition;
|
|
2615
|
+
input: ConduitRouteOptions;
|
|
2616
|
+
handler: any;
|
|
2617
|
+
}
|
|
2618
|
+
|
|
2619
|
+
type ConduitSocketParamTypes = (TYPE | ConduitSocketParamTypes)[];
|
|
2620
|
+
interface ConduitSocketOptions {
|
|
2621
|
+
path: string;
|
|
2622
|
+
name?: string;
|
|
2623
|
+
description?: string;
|
|
2624
|
+
middlewares?: string[];
|
|
2625
|
+
}
|
|
2626
|
+
interface EventsProtoDescription {
|
|
2627
|
+
[name: string]: {
|
|
2628
|
+
grpcFunction: string;
|
|
2629
|
+
params: string;
|
|
2630
|
+
returns: {
|
|
2631
|
+
name: string;
|
|
2632
|
+
fields: string;
|
|
2633
|
+
};
|
|
2634
|
+
};
|
|
2635
|
+
}
|
|
2636
|
+
interface SocketProtoDescription {
|
|
2637
|
+
options: ConduitSocketOptions;
|
|
2638
|
+
events: string;
|
|
2639
|
+
}
|
|
2640
|
+
|
|
2641
|
+
type documentKeys<T> = keyof T;
|
|
2642
|
+
type documentValues<T> = T[keyof T];
|
|
2643
|
+
type operators = '$eq' | '$ne' | '$gt' | '$gte' | '$lt' | '$lte' | '$regex' | '$options' | '$like' | '$ilike' | '$exists';
|
|
2644
|
+
type arrayOperators = '$in' | '$nin';
|
|
2645
|
+
type conditionOperators = '$or' | '$and';
|
|
2646
|
+
type simpleQuery<T> = {
|
|
2647
|
+
[key in documentKeys<T>]?: documentValues<T> | mixedQuery<T>;
|
|
2648
|
+
};
|
|
2649
|
+
type mixedQuery<T> = {
|
|
2650
|
+
$exists: boolean;
|
|
2651
|
+
} | {
|
|
2652
|
+
[key in operators]?: documentValues<T>;
|
|
2653
|
+
} | {
|
|
2654
|
+
[key in arrayOperators]?: documentValues<T>[];
|
|
2655
|
+
};
|
|
2656
|
+
type conditionalQuery<T> = {
|
|
2657
|
+
[key in conditionOperators]?: Query<T>[];
|
|
2658
|
+
};
|
|
2659
|
+
type pushQuery<T> = {
|
|
2660
|
+
$push: simpleQuery<T>;
|
|
2661
|
+
};
|
|
2662
|
+
type setQuery<T> = {
|
|
2663
|
+
$set: simpleQuery<T>;
|
|
2664
|
+
};
|
|
2665
|
+
type Query<T> = simpleQuery<T> | pushQuery<T> | setQuery<T> | conditionalQuery<T>;
|
|
2666
|
+
|
|
2667
|
+
type AuthzOptions = {
|
|
2668
|
+
userId?: string;
|
|
2669
|
+
scope?: string;
|
|
2670
|
+
};
|
|
2671
|
+
type PopulateAuthzOptions = {
|
|
2672
|
+
populate?: string | string[];
|
|
2673
|
+
} & AuthzOptions;
|
|
2674
|
+
|
|
2675
|
+
type PeerWatchEdge = 'rising' | 'falling' | 'both';
|
|
2676
|
+
interface PeerWatchOptions {
|
|
2677
|
+
edge?: PeerWatchEdge;
|
|
2678
|
+
dedupe?: boolean;
|
|
2679
|
+
syncInitialState?: boolean;
|
|
2680
|
+
}
|
|
2681
|
+
interface AwaitPeerOptions {
|
|
2682
|
+
onlyIfServing?: boolean;
|
|
2683
|
+
timeoutMs?: number;
|
|
2684
|
+
}
|
|
2685
|
+
interface PeerWatchSpec {
|
|
2686
|
+
module: string;
|
|
2687
|
+
edge?: PeerWatchEdge;
|
|
2688
|
+
}
|
|
2689
|
+
interface PeerWatchBatchOptions {
|
|
2690
|
+
debounceMs?: number;
|
|
2691
|
+
syncInitialState?: boolean;
|
|
2692
|
+
}
|
|
2693
|
+
|
|
2694
|
+
type GrpcRequest<T> = {
|
|
2695
|
+
request: T;
|
|
2696
|
+
metadata?: Metadata;
|
|
2697
|
+
};
|
|
2698
|
+
type GrpcResponse<T> = (err: {
|
|
2699
|
+
code: number;
|
|
2700
|
+
message: string;
|
|
2701
|
+
} | null, res?: T) => void;
|
|
2702
|
+
declare class GrpcError extends Error {
|
|
2703
|
+
code: status;
|
|
2704
|
+
message: string;
|
|
2705
|
+
constructor(code: status, message: string);
|
|
2706
|
+
}
|
|
2707
|
+
declare enum HealthCheckStatus {
|
|
2708
|
+
UNKNOWN = 0,
|
|
2709
|
+
SERVING = 1,
|
|
2710
|
+
NOT_SERVING = 2,
|
|
2711
|
+
SERVICE_UNKNOWN = 3
|
|
2712
|
+
}
|
|
2713
|
+
declare enum MetricType {
|
|
2714
|
+
Counter = 0,
|
|
2715
|
+
Gauge = 1,
|
|
2716
|
+
Histogram = 2,
|
|
2717
|
+
Summary = 3
|
|
2718
|
+
}
|
|
2719
|
+
|
|
2720
|
+
type ParsedRouterRequest = GrpcRequest<{
|
|
2721
|
+
params: Params;
|
|
2722
|
+
urlParams: Params;
|
|
2723
|
+
queryParams: Params;
|
|
2724
|
+
bodyParams: Params;
|
|
2725
|
+
path: string;
|
|
2726
|
+
headers: Headers & {
|
|
2727
|
+
authorization?: string;
|
|
2728
|
+
};
|
|
2729
|
+
context: Context;
|
|
2730
|
+
cookies: Cookies;
|
|
2731
|
+
}>;
|
|
2732
|
+
type UnparsedRouterResponse = {
|
|
2733
|
+
result?: Indexable;
|
|
2734
|
+
redirect?: string;
|
|
2735
|
+
setCookies: Cookies[];
|
|
2736
|
+
removeCookies: Cookies[];
|
|
2737
|
+
} | Indexable | string;
|
|
2738
|
+
type ParsedSocketRequest = GrpcRequest<{
|
|
2739
|
+
event: string;
|
|
2740
|
+
socketId: string;
|
|
2741
|
+
params: (string | Indexable)[];
|
|
2742
|
+
context: Context;
|
|
2743
|
+
cookies: Cookies;
|
|
2744
|
+
}>;
|
|
2745
|
+
type EventResponse = {
|
|
2746
|
+
event: string;
|
|
2747
|
+
data: Indexable;
|
|
2748
|
+
receivers?: string[];
|
|
2749
|
+
rooms?: string[];
|
|
2750
|
+
};
|
|
2751
|
+
type UnparsedSocketResponse = EventResponse | JoinRoomResponse;
|
|
2752
|
+
type JoinRoomResponse = {
|
|
2753
|
+
rooms: string[];
|
|
2754
|
+
};
|
|
2755
|
+
|
|
2756
|
+
type GrpcCallback<ResponseType> = (error: {
|
|
2757
|
+
code: number;
|
|
2758
|
+
message: string;
|
|
2759
|
+
} | null, response?: ResponseType) => void;
|
|
2760
|
+
|
|
2761
|
+
interface RawQuery {
|
|
2762
|
+
mongoQuery?: RawMongoQuery;
|
|
2763
|
+
sqlQuery?: RawSQLQuery;
|
|
2764
|
+
}
|
|
2765
|
+
type RawMongoQuery = {
|
|
2766
|
+
aggregate?: object[];
|
|
2767
|
+
count?: object;
|
|
2768
|
+
deleteOne?: object;
|
|
2769
|
+
deleteMany?: object | object[];
|
|
2770
|
+
drop?: object;
|
|
2771
|
+
explain?: object;
|
|
2772
|
+
find?: object;
|
|
2773
|
+
insertOne?: object;
|
|
2774
|
+
insertMany?: object | object[];
|
|
2775
|
+
updateOne?: object | object[];
|
|
2776
|
+
updateMany?: object | object[];
|
|
2777
|
+
options?: object;
|
|
2778
|
+
};
|
|
2779
|
+
type RawSQLQuery = {
|
|
2780
|
+
query: string;
|
|
2781
|
+
options?: object;
|
|
2782
|
+
};
|
|
2783
|
+
|
|
2784
|
+
type UntypedArray = any[];
|
|
2785
|
+
|
|
2786
|
+
type UrlParams = {
|
|
2787
|
+
[key: string]: string;
|
|
2788
|
+
};
|
|
2789
|
+
type QueryParams = {
|
|
2790
|
+
[key: string]: string | string[];
|
|
2791
|
+
};
|
|
2792
|
+
type BodyParams = Indexable;
|
|
2793
|
+
|
|
2794
|
+
interface ConduitSchemaExtension {
|
|
2795
|
+
readonly schemaName: string;
|
|
2796
|
+
readonly fields: ConduitModel;
|
|
2797
|
+
}
|
|
2798
|
+
|
|
2799
|
+
interface IConduitLogger {
|
|
2800
|
+
get winston(): winston.Logger;
|
|
2801
|
+
log(message: string, level?: string): Logger;
|
|
2802
|
+
logObject(object: Indexable, message?: string, level?: string): Logger;
|
|
2803
|
+
info(message: string): Logger;
|
|
2804
|
+
warn(message: string): Logger;
|
|
2805
|
+
error(message: string | Error, error?: Error | unknown): Logger;
|
|
2806
|
+
http(message: string): Logger;
|
|
2807
|
+
verbose(message: string): Logger;
|
|
2808
|
+
addTransport(transport: winston.transport): void;
|
|
2809
|
+
}
|
|
2810
|
+
|
|
2811
|
+
interface IConduitMetrics {
|
|
2812
|
+
initializeDefaultMetrics(): void;
|
|
2813
|
+
registerMetric(type: MetricType, config: MetricConfiguration<string>): void;
|
|
2814
|
+
collectDefaultMetrics(): void;
|
|
2815
|
+
createCounter(config: CounterConfiguration<any>): Counter<any>;
|
|
2816
|
+
createSummary(config: SummaryConfiguration<any>): Summary<any>;
|
|
2817
|
+
createHistogram(config: HistogramConfiguration<any>): Histogram<any>;
|
|
2818
|
+
createGauge(config: GaugeConfiguration<any>): Gauge<any>;
|
|
2819
|
+
getMetric(name: string): Metric<string> | undefined;
|
|
2820
|
+
increment(metric: string, increment?: number, labels?: LabelValues<any>): void;
|
|
2821
|
+
decrement(metric: string, decrement?: number, labels?: LabelValues<any>): void;
|
|
2822
|
+
set(metric: string, value: number, labels?: LabelValues<any>): void;
|
|
2823
|
+
observe(metric: string, value: number, labels?: LabelValues<any>): void;
|
|
2824
|
+
}
|
|
2825
|
+
|
|
2826
|
+
declare class ConduitSchema {
|
|
2827
|
+
readonly name: string;
|
|
2828
|
+
readonly fields: ConduitModel;
|
|
2829
|
+
readonly collectionName: string | '';
|
|
2830
|
+
readonly modelOptions: ConduitSchemaOptions;
|
|
2831
|
+
ownerModule: string;
|
|
2832
|
+
parentSchema?: string;
|
|
2833
|
+
constructor(name: string, fields: ConduitModel, modelOptions?: ConduitSchemaOptions, collectionName?: string);
|
|
2834
|
+
}
|
|
2835
|
+
|
|
2836
|
+
declare class ConduitAuthorizedResource {
|
|
2837
|
+
readonly name: string;
|
|
2838
|
+
readonly relations: Resource_Relation[];
|
|
2839
|
+
readonly permissions: Resource_Permission[];
|
|
2840
|
+
readonly version?: number;
|
|
2841
|
+
constructor(name: string, relations: {
|
|
2842
|
+
[field: string]: string | string[];
|
|
2843
|
+
}, permissions: {
|
|
2844
|
+
[action: string]: string | string[];
|
|
2845
|
+
}, version?: number);
|
|
2846
|
+
}
|
|
2847
|
+
|
|
2848
|
+
type CreateFileOptions = {
|
|
2849
|
+
folder?: string;
|
|
2850
|
+
container?: string;
|
|
2851
|
+
mimeType?: string;
|
|
2852
|
+
isPublic?: boolean;
|
|
2853
|
+
userId?: string;
|
|
2854
|
+
scope?: string;
|
|
2855
|
+
alias?: string;
|
|
2856
|
+
};
|
|
2857
|
+
type UpdateFileOptions = {
|
|
2858
|
+
name?: string;
|
|
2859
|
+
folder?: string;
|
|
2860
|
+
container?: string;
|
|
2861
|
+
mimeType?: string;
|
|
2862
|
+
userId?: string;
|
|
2863
|
+
scope?: string;
|
|
2864
|
+
alias?: string;
|
|
2865
|
+
};
|
|
2866
|
+
type CreateFileByURLOptions = {
|
|
2867
|
+
size?: number;
|
|
2868
|
+
} & CreateFileOptions;
|
|
2869
|
+
type UpdateFileByURLOptions = {
|
|
2870
|
+
size?: number;
|
|
2871
|
+
} & UpdateFileOptions;
|
|
2872
|
+
|
|
2873
|
+
declare class Storage extends ConduitModule<typeof StorageDefinition> {
|
|
2874
|
+
private readonly moduleName;
|
|
2875
|
+
constructor(moduleName: string, url: string, grpcToken?: string);
|
|
2876
|
+
getFile(id: string, userId?: string, scope?: string): Promise<FileResponse>;
|
|
2877
|
+
getFile(id: string, options?: AuthzOptions): Promise<FileResponse>;
|
|
2878
|
+
getFileUrl(id: string, userId?: string, scope?: string): Promise<GetFileUrlResponse>;
|
|
2879
|
+
getFileUrl(id: string, options?: AuthzOptions): Promise<GetFileUrlResponse>;
|
|
2880
|
+
getFileData(id: string, userId?: string, scope?: string): Promise<GetFileDataResponse>;
|
|
2881
|
+
getFileData(id: string, options?: AuthzOptions): Promise<GetFileDataResponse>;
|
|
2882
|
+
createFile(name: string | undefined, data: string, folder?: string, container?: string, mimeType?: string, isPublic?: boolean, userId?: string, scope?: string, alias?: string): Promise<FileResponse>;
|
|
2883
|
+
createFile(name: string | undefined, data: string, options?: CreateFileOptions): Promise<FileResponse>;
|
|
2884
|
+
updateFile(id: string, data: string, name?: string, folder?: string, container?: string, mimeType?: string, userId?: string, scope?: string, alias?: string): Promise<FileResponse>;
|
|
2885
|
+
updateFile(id: string, data: string, options?: UpdateFileOptions): Promise<FileResponse>;
|
|
2886
|
+
deleteFile(id: string, userId?: string, scope?: string): Promise<DeleteFileResponse>;
|
|
2887
|
+
deleteFile(id: string, options?: AuthzOptions): Promise<DeleteFileResponse>;
|
|
2888
|
+
createFileByUrl(name: string | undefined, folder?: string, container?: string, mimeType?: string, size?: number, isPublic?: boolean, userId?: string, scope?: string, alias?: string): Promise<FileByUrlResponse>;
|
|
2889
|
+
createFileByUrl(name: string | undefined, options?: CreateFileByURLOptions): Promise<FileByUrlResponse>;
|
|
2890
|
+
updateFileByUrl(id: string, name?: string, folder?: string, container?: string, mimeType?: string, size?: number, userId?: string, scope?: string, alias?: string): Promise<FileByUrlResponse>;
|
|
2891
|
+
updateFileByUrl(id: string, options?: UpdateFileByURLOptions): Promise<FileByUrlResponse>;
|
|
2892
|
+
}
|
|
2893
|
+
|
|
2894
|
+
declare class Router extends ConduitModule<typeof RouterDefinition> {
|
|
2895
|
+
readonly moduleName: string;
|
|
2896
|
+
constructor(moduleName: string, url: string, grpcToken?: string);
|
|
2897
|
+
register(paths: RegisterConduitRouteRequest_PathDefinition[], url?: string): Promise<any>;
|
|
2898
|
+
socketPush(data: SocketData): Promise<Empty>;
|
|
2899
|
+
patchRouteMiddlewares(path: string, action: ConduitRouteActions, middlewares: string[]): Promise<Empty>;
|
|
2900
|
+
}
|
|
2901
|
+
|
|
2902
|
+
declare class Email extends ConduitModule<typeof CommunicationsDefinition> {
|
|
2903
|
+
private readonly moduleName;
|
|
2904
|
+
constructor(moduleName: string, url: string, grpcToken?: string);
|
|
2905
|
+
registerTemplate(template: {
|
|
2906
|
+
name: string;
|
|
2907
|
+
subject: string;
|
|
2908
|
+
body: string;
|
|
2909
|
+
variables: string[];
|
|
2910
|
+
sender?: string;
|
|
2911
|
+
}): Promise<any>;
|
|
2912
|
+
updateTemplate(templateId: string, params: {
|
|
2913
|
+
name?: string;
|
|
2914
|
+
subject?: string;
|
|
2915
|
+
body?: string;
|
|
2916
|
+
variables?: string[];
|
|
2917
|
+
sender?: string;
|
|
2918
|
+
}): Promise<any>;
|
|
2919
|
+
sendEmail(templateName: string, params: {
|
|
2920
|
+
email: string;
|
|
2921
|
+
variables: any;
|
|
2922
|
+
sender?: string;
|
|
2923
|
+
replyTo?: string;
|
|
2924
|
+
cc?: string[];
|
|
2925
|
+
attachments?: {
|
|
2926
|
+
filename: string;
|
|
2927
|
+
contentType?: string;
|
|
2928
|
+
content?: Buffer;
|
|
2929
|
+
href?: string;
|
|
2930
|
+
httpHeaders?: Record<string, string>;
|
|
2931
|
+
}[];
|
|
2932
|
+
}): Promise<string>;
|
|
2933
|
+
resendEmail(emailRecordId: string): Promise<string>;
|
|
2934
|
+
getEmailStatus(messageId: string): Promise<any>;
|
|
2935
|
+
}
|
|
2936
|
+
|
|
2937
|
+
type FindOneOptions = {
|
|
2938
|
+
select?: string;
|
|
2939
|
+
populate?: string | string[];
|
|
2940
|
+
userId?: string;
|
|
2941
|
+
scope?: string;
|
|
2942
|
+
readPreference?: string;
|
|
2943
|
+
};
|
|
2944
|
+
type FindManyOptions = {
|
|
2945
|
+
select?: string;
|
|
2946
|
+
skip?: number;
|
|
2947
|
+
limit?: number;
|
|
2948
|
+
sort?: {
|
|
2949
|
+
[field: string]: -1 | 1;
|
|
2950
|
+
} | string[] | string;
|
|
2951
|
+
populate?: string | string[];
|
|
2952
|
+
userId?: string;
|
|
2953
|
+
scope?: string;
|
|
2954
|
+
readPreference?: string;
|
|
2955
|
+
};
|
|
2956
|
+
|
|
2957
|
+
type CountDocumentsOptions = AuthzOptions & {
|
|
2958
|
+
readPreference?: string;
|
|
2959
|
+
};
|
|
2960
|
+
declare class DatabaseProvider extends ConduitModule<typeof DatabaseProviderDefinition> {
|
|
2961
|
+
private readonly moduleName;
|
|
2962
|
+
constructor(moduleName: string, url: string, grpcToken?: string);
|
|
2963
|
+
getSchema(schemaName: string): Promise<{
|
|
2964
|
+
name: string;
|
|
2965
|
+
fields: any;
|
|
2966
|
+
modelOptions: any;
|
|
2967
|
+
collectionName: string;
|
|
2968
|
+
fieldHash: string;
|
|
2969
|
+
}>;
|
|
2970
|
+
getSchemas(): Promise<{
|
|
2971
|
+
name: string;
|
|
2972
|
+
fields: any;
|
|
2973
|
+
modelOptions: any;
|
|
2974
|
+
fieldHash: string;
|
|
2975
|
+
}[]>;
|
|
2976
|
+
deleteSchema(schemaName: string, deleteData: boolean): Promise<DropCollectionResponse>;
|
|
2977
|
+
createSchemaFromAdapter(schema: ConduitSchema): Promise<Schema>;
|
|
2978
|
+
setSchemaExtension(extension: ConduitSchemaExtension): Promise<Schema>;
|
|
2979
|
+
processQuery<T>(query: Query<T> | Query<T>[]): string;
|
|
2980
|
+
findOne<T>(schemaName: string, query: Query<T>, options?: FindOneOptions): Promise<T>;
|
|
2981
|
+
findMany<T>(schemaName: string, query: Query<T>, options?: FindManyOptions): Promise<T[]>;
|
|
2982
|
+
create<T>(schemaName: string, query: Query<T>, options?: AuthzOptions): Promise<T>;
|
|
2983
|
+
createMany<T>(schemaName: string, query: Query<T>[], options?: AuthzOptions): Promise<T[] | UntypedArray>;
|
|
2984
|
+
findByIdAndUpdate<T>(schemaName: string, id: string, document: Query<T>, options?: PopulateAuthzOptions): Promise<T | any>;
|
|
2985
|
+
findByIdAndReplace<T>(schemaName: string, id: string, document: Query<T>, options?: PopulateAuthzOptions): Promise<T | any>;
|
|
2986
|
+
updateMany<T>(schemaName: string, filterQuery: Query<T>, query: Query<T>, options?: PopulateAuthzOptions): Promise<any>;
|
|
2987
|
+
updateOne<T>(schemaName: string, filterQuery: Query<T>, query: Query<T>, options?: PopulateAuthzOptions): Promise<any>;
|
|
2988
|
+
replaceOne<T>(schemaName: string, filterQuery: Query<T>, query: Query<T>, options?: PopulateAuthzOptions): Promise<any>;
|
|
2989
|
+
deleteOne<T>(schemaName: string, query: Query<T>, options?: AuthzOptions): Promise<any>;
|
|
2990
|
+
deleteMany<T>(schemaName: string, query: Query<T>, options?: AuthzOptions): Promise<any>;
|
|
2991
|
+
countDocuments<T>(schemaName: string, query: Query<T>, options?: CountDocumentsOptions): Promise<number>;
|
|
2992
|
+
rawQuery(schemaName: string, query: RawQuery): Promise<any>;
|
|
2993
|
+
createView(schemaName: string, viewName: string, joinedSchemas: string[], query: {
|
|
2994
|
+
mongoQuery?: Indexable;
|
|
2995
|
+
sqlQuery?: string;
|
|
2996
|
+
}): Promise<Empty>;
|
|
2997
|
+
deleteView(viewName: string): Promise<Empty>;
|
|
2998
|
+
columnExistence(schemaName: string, columns: string[]): Promise<boolean>;
|
|
2999
|
+
migrate(schemaName: string): Promise<Empty>;
|
|
3000
|
+
getDatabaseType(): Promise<GetDatabaseTypeResponse>;
|
|
3001
|
+
generateId(): Promise<string>;
|
|
3002
|
+
private constructSortObj;
|
|
3003
|
+
}
|
|
3004
|
+
|
|
3005
|
+
declare class Config extends ConduitModule<typeof ConfigDefinition> {
|
|
3006
|
+
readonly url: string;
|
|
3007
|
+
private readonly emitter;
|
|
3008
|
+
private coreLive;
|
|
3009
|
+
private readonly _serviceHealthStatusGetter?;
|
|
3010
|
+
constructor(moduleName: string, url: string, serviceHealthStatusGetter?: () => HealthCheckStatus, grpcToken?: string);
|
|
3011
|
+
getServerConfig(): Promise<any>;
|
|
3012
|
+
getModuleUrlByName(name: string): Promise<{
|
|
3013
|
+
url: string;
|
|
3014
|
+
}>;
|
|
3015
|
+
get(name: string): Promise<any>;
|
|
3016
|
+
configure(config: any, schema: any, override: boolean): Promise<any>;
|
|
3017
|
+
moduleExists(name: string): Promise<ModuleExistsResponse>;
|
|
3018
|
+
moduleList(): Promise<any[]>;
|
|
3019
|
+
getRedisDetails(): Promise<{
|
|
3020
|
+
standalone?: RedisOptions;
|
|
3021
|
+
cluster?: ClusterOptions;
|
|
3022
|
+
redisHost?: string;
|
|
3023
|
+
redisPort?: number;
|
|
3024
|
+
redisUsername?: string;
|
|
3025
|
+
redisPassword?: string;
|
|
3026
|
+
redisConfig?: string;
|
|
3027
|
+
}>;
|
|
3028
|
+
registerModule(name: string, url: string, healthStatus: Omit<HealthCheckStatus, HealthCheckStatus.SERVICE_UNKNOWN>): Promise<boolean>;
|
|
3029
|
+
moduleHealthProbe(name: string, url: string): void;
|
|
3030
|
+
getModuleWatcher(): EventEmitter<[never]>;
|
|
3031
|
+
watchModules(): Promise<void>;
|
|
3032
|
+
}
|
|
3033
|
+
|
|
3034
|
+
declare class Core extends ConduitModule<typeof CoreDefinition> {
|
|
3035
|
+
private readonly moduleName;
|
|
3036
|
+
constructor(moduleName: string, url: string, grpcToken?: string);
|
|
3037
|
+
}
|
|
3038
|
+
|
|
3039
|
+
declare class Admin extends ConduitModule<typeof AdminDefinition> {
|
|
3040
|
+
readonly moduleName: string;
|
|
3041
|
+
constructor(moduleName: string, url: string, grpcToken?: string);
|
|
3042
|
+
register(paths: RegisterAdminRouteRequest_PathDefinition[], serverUrl?: string): Promise<any>;
|
|
3043
|
+
patchRouteMiddlewares(path: string, action: ConduitRouteActions, middlewares: string[]): Promise<Empty>;
|
|
3044
|
+
}
|
|
3045
|
+
|
|
3046
|
+
type SendNotificationOptions = {
|
|
3047
|
+
body?: string;
|
|
3048
|
+
data?: string;
|
|
3049
|
+
platform?: string;
|
|
3050
|
+
doNotStore?: boolean;
|
|
3051
|
+
isSilent?: boolean;
|
|
3052
|
+
};
|
|
3053
|
+
|
|
3054
|
+
declare class PushNotifications extends ConduitModule<typeof CommunicationsDefinition> {
|
|
3055
|
+
private readonly moduleName;
|
|
3056
|
+
constructor(moduleName: string, url: string, grpcToken?: string);
|
|
3057
|
+
sendNotificationToken(token: string, platform: string, userId: string): Promise<any>;
|
|
3058
|
+
getNotificationTokens(userId: string): Promise<any[]>;
|
|
3059
|
+
sendNotification(sendTo: string, title: string, body?: string, data?: string, platform?: string, doNotStore?: boolean, isSilent?: boolean): Promise<SendNotificationResponse>;
|
|
3060
|
+
sendNotification(sendTo: string, title: string, options?: SendNotificationOptions): Promise<SendNotificationResponse>;
|
|
3061
|
+
sendManyNotifications(notifications: [
|
|
3062
|
+
{
|
|
3063
|
+
sendTo: string;
|
|
3064
|
+
title: string;
|
|
3065
|
+
body?: string;
|
|
3066
|
+
data?: string;
|
|
3067
|
+
platform?: string;
|
|
3068
|
+
doNotStore?: boolean;
|
|
3069
|
+
isSilent?: boolean;
|
|
3070
|
+
}
|
|
3071
|
+
]): Promise<SendNotificationResponse>;
|
|
3072
|
+
sendNotificationToManyDevices(sendTo: string[], title: string, body?: string, data?: string, platform?: string, doNotStore?: boolean, isSilent?: boolean): Promise<SendNotificationResponse>;
|
|
3073
|
+
sendNotificationToManyDevices(sendTo: string[], title: string, options?: SendNotificationOptions): Promise<SendNotificationResponse>;
|
|
3074
|
+
}
|
|
3075
|
+
|
|
3076
|
+
declare class SMS extends ConduitModule<typeof CommunicationsDefinition> {
|
|
3077
|
+
private readonly moduleName;
|
|
3078
|
+
constructor(moduleName: string, url: string, grpcToken?: string);
|
|
3079
|
+
sendSms(to: string, message: string): Promise<SendSmsResponse>;
|
|
3080
|
+
sendVerificationCode(to: string): Promise<SendVerificationCodeResponse>;
|
|
3081
|
+
verify(verificationSid: string, code: string): Promise<VerifyResponse>;
|
|
3082
|
+
}
|
|
3083
|
+
|
|
3084
|
+
declare class Chat extends ConduitModule<typeof ChatDefinition> {
|
|
3085
|
+
private readonly moduleName;
|
|
3086
|
+
constructor(moduleName: string, url: string, grpcToken?: string);
|
|
3087
|
+
sendMessage(messageData: SendMessageRequest): Promise<any>;
|
|
3088
|
+
createRoom(name: string, participants: string[]): Promise<Room>;
|
|
3089
|
+
deleteRoom(id: string): Promise<Room>;
|
|
3090
|
+
}
|
|
3091
|
+
|
|
3092
|
+
declare class Authorization extends ConduitModule<typeof AuthorizationDefinition> {
|
|
3093
|
+
private readonly moduleName;
|
|
3094
|
+
constructor(moduleName: string, url: string, grpcToken?: string);
|
|
3095
|
+
defineResource(data: Resource): Promise<Empty>;
|
|
3096
|
+
updateResource(data: Resource): Promise<Empty>;
|
|
3097
|
+
deleteResource(data: Resource): Promise<unknown>;
|
|
3098
|
+
deleteRelation(data: Relation): Promise<unknown>;
|
|
3099
|
+
deleteAllRelations(data: DeleteAllRelationsRequest): Promise<unknown>;
|
|
3100
|
+
createRelation(data: Relation): Promise<unknown>;
|
|
3101
|
+
createRelations(subject: string, relation: string, resources: string[]): Promise<unknown>;
|
|
3102
|
+
findRelation(data: FindRelationRequest): Promise<FindRelationResponse>;
|
|
3103
|
+
can(data: PermissionCheck): Promise<Decision>;
|
|
3104
|
+
grantPermission(data: PermissionRequest): Promise<unknown>;
|
|
3105
|
+
removePermission(data: PermissionRequest): Promise<unknown>;
|
|
3106
|
+
getAllowedResources(data: AllowedResourcesRequest): Promise<AllowedResourcesResponse>;
|
|
3107
|
+
createResourceAccessList(data: ResourceAccessListRequest): Promise<ResourceAccessListResponse>;
|
|
3108
|
+
}
|
|
3109
|
+
|
|
3110
|
+
declare class Authentication extends ConduitModule<typeof AuthenticationDefinition> {
|
|
3111
|
+
private readonly moduleName;
|
|
3112
|
+
constructor(moduleName: string, url: string, grpcToken?: string);
|
|
3113
|
+
userLogin(userId: string, clientId: string): Promise<UserLoginResponse>;
|
|
3114
|
+
userDelete(userId: string): Promise<UserDeleteResponse>;
|
|
3115
|
+
userCreate(email: string, verify?: boolean, password?: string, anonymousId?: string, userData?: Indexable): Promise<UserCreateResponse>;
|
|
3116
|
+
userCreateByUsername(username: string, password?: string, anonymousId?: string): Promise<UserCreateResponse>;
|
|
3117
|
+
anonymousUserCreate(clientId: string): Promise<UserLoginResponse>;
|
|
3118
|
+
changePass(email: string, password?: string): Promise<UserCreateResponse>;
|
|
3119
|
+
getTeam(teamId: string): Promise<Team>;
|
|
3120
|
+
createTeam(name: string, parentTeam?: string, isDefault?: boolean): Promise<Team>;
|
|
3121
|
+
teamDelete(teamId: string): Promise<TeamDeleteResponse>;
|
|
3122
|
+
addTeamMembers(teamId: string, memberIds: string[]): Promise<Empty>;
|
|
3123
|
+
removeTeamMembers(teamId: string, memberIds: string[]): Promise<Empty>;
|
|
3124
|
+
validateAccessToken(accessToken: string, path?: string): Promise<ValidateAccessTokenResponse>;
|
|
3125
|
+
userModifyStatus(userId: string, active: boolean): Promise<UserModifyStatusResponse>;
|
|
3126
|
+
invitationDelete(teamId: string, email: string): Promise<InvitationDeleteResponse>;
|
|
3127
|
+
inviteUserToTeam(teamId: string, email: string, role: string, inviterUserId: string, redirectUri?: string, userData?: Indexable): Promise<InviteUserToTeamResponse>;
|
|
3128
|
+
updateTeam(teamId: string, name?: string, newParentTeamId?: string): Promise<Team>;
|
|
3129
|
+
}
|
|
3130
|
+
|
|
3131
|
+
declare class Communications extends ConduitModule<typeof CommunicationsDefinition> {
|
|
3132
|
+
private readonly moduleName;
|
|
3133
|
+
constructor(moduleName: string, url: string, grpcToken?: string);
|
|
3134
|
+
registerTemplate(template: {
|
|
3135
|
+
name: string;
|
|
3136
|
+
subject: string;
|
|
3137
|
+
body: string;
|
|
3138
|
+
variables: string[];
|
|
3139
|
+
sender?: string;
|
|
3140
|
+
}): Promise<any>;
|
|
3141
|
+
updateTemplate(templateId: string, params: {
|
|
3142
|
+
name?: string;
|
|
3143
|
+
subject?: string;
|
|
3144
|
+
body?: string;
|
|
3145
|
+
variables?: string[];
|
|
3146
|
+
sender?: string;
|
|
3147
|
+
}): Promise<any>;
|
|
3148
|
+
sendEmail(templateName: string, params: {
|
|
3149
|
+
email: string;
|
|
3150
|
+
variables: any;
|
|
3151
|
+
sender?: string;
|
|
3152
|
+
replyTo?: string;
|
|
3153
|
+
cc?: string[];
|
|
3154
|
+
attachments?: {
|
|
3155
|
+
filename: string;
|
|
3156
|
+
contentType?: string;
|
|
3157
|
+
content?: Buffer;
|
|
3158
|
+
href?: string;
|
|
3159
|
+
httpHeaders?: Record<string, string>;
|
|
3160
|
+
}[];
|
|
3161
|
+
}): Promise<string>;
|
|
3162
|
+
resendEmail(emailRecordId: string): Promise<string>;
|
|
3163
|
+
getEmailStatus(messageId: string): Promise<any>;
|
|
3164
|
+
setNotificationToken(token: string, platform: string, userId: string): Promise<any>;
|
|
3165
|
+
getNotificationTokens(userId: string): Promise<any[]>;
|
|
3166
|
+
sendNotification(sendTo: string, title: string, body?: string, data?: string, platform?: string): Promise<SendNotificationResponse>;
|
|
3167
|
+
sendNotificationToManyDevices(sendTo: string[], title: string, body?: string, data?: string, platform?: string): Promise<SendNotificationResponse>;
|
|
3168
|
+
sendManyNotifications(notifications: Array<{
|
|
3169
|
+
sendTo: string;
|
|
3170
|
+
title: string;
|
|
3171
|
+
body?: string;
|
|
3172
|
+
data?: string;
|
|
3173
|
+
platform?: string;
|
|
3174
|
+
}>): Promise<SendNotificationResponse>;
|
|
3175
|
+
sendSms(to: string, message: string): Promise<SendSmsResponse>;
|
|
3176
|
+
sendVerificationCode(to: string): Promise<SendVerificationCodeResponse>;
|
|
3177
|
+
verify(verificationSid: string, code: string): Promise<VerifyResponse>;
|
|
3178
|
+
sendMessage(channel: 'email' | 'push' | 'sms', params: {
|
|
3179
|
+
recipient: string;
|
|
3180
|
+
subject?: string;
|
|
3181
|
+
body?: string;
|
|
3182
|
+
variables?: any;
|
|
3183
|
+
sender?: string;
|
|
3184
|
+
cc?: string[];
|
|
3185
|
+
replyTo?: string;
|
|
3186
|
+
attachments?: string[];
|
|
3187
|
+
data?: any;
|
|
3188
|
+
platform?: string;
|
|
3189
|
+
doNotStore?: boolean;
|
|
3190
|
+
isSilent?: boolean;
|
|
3191
|
+
}): Promise<{
|
|
3192
|
+
messageId: string;
|
|
3193
|
+
sentMessageInfo: any;
|
|
3194
|
+
}>;
|
|
3195
|
+
sendToMultipleChannels(channels: ('email' | 'push' | 'sms')[], strategy: 'BEST_EFFORT' | 'ALL_OR_NOTHING', params: {
|
|
3196
|
+
recipient: string;
|
|
3197
|
+
subject?: string;
|
|
3198
|
+
body?: string;
|
|
3199
|
+
variables?: any;
|
|
3200
|
+
sender?: string;
|
|
3201
|
+
cc?: string[];
|
|
3202
|
+
replyTo?: string;
|
|
3203
|
+
attachments?: string[];
|
|
3204
|
+
data?: any;
|
|
3205
|
+
platform?: string;
|
|
3206
|
+
doNotStore?: boolean;
|
|
3207
|
+
isSilent?: boolean;
|
|
3208
|
+
}): Promise<SendToMultipleChannelsResponse_ChannelResult[]>;
|
|
3209
|
+
sendWithFallback(fallbackChain: Array<{
|
|
3210
|
+
channel: 'email' | 'push' | 'sms';
|
|
3211
|
+
timeout: number;
|
|
3212
|
+
}>, params: {
|
|
3213
|
+
recipient: string;
|
|
3214
|
+
subject?: string;
|
|
3215
|
+
body?: string;
|
|
3216
|
+
variables?: any;
|
|
3217
|
+
sender?: string;
|
|
3218
|
+
cc?: string[];
|
|
3219
|
+
replyTo?: string;
|
|
3220
|
+
attachments?: string[];
|
|
3221
|
+
data?: any;
|
|
3222
|
+
platform?: string;
|
|
3223
|
+
doNotStore?: boolean;
|
|
3224
|
+
isSilent?: boolean;
|
|
3225
|
+
}): Promise<{
|
|
3226
|
+
successfulChannel: string;
|
|
3227
|
+
messageId: string;
|
|
3228
|
+
attempts: SendWithFallbackResponse_ChannelResult[];
|
|
3229
|
+
}>;
|
|
3230
|
+
getMessageStatus(channel: 'email' | 'push' | 'sms', messageId: string): Promise<any>;
|
|
3231
|
+
}
|
|
3232
|
+
|
|
3233
|
+
declare function sleep(ms: number): Promise<unknown>;
|
|
3234
|
+
|
|
3235
|
+
declare class RedisManager {
|
|
3236
|
+
redisConnection: RedisOptions | {
|
|
3237
|
+
nodes: {
|
|
3238
|
+
host: string;
|
|
3239
|
+
port: number;
|
|
3240
|
+
}[];
|
|
3241
|
+
options: ClusterOptions;
|
|
3242
|
+
};
|
|
3243
|
+
constructor(redisDetails?: RedisOptions | {
|
|
3244
|
+
nodes: {
|
|
3245
|
+
host: string;
|
|
3246
|
+
port: number;
|
|
3247
|
+
}[];
|
|
3248
|
+
options: ClusterOptions;
|
|
3249
|
+
});
|
|
3250
|
+
getClient(options?: RedisOptions | {
|
|
3251
|
+
nodes: {
|
|
3252
|
+
host: string;
|
|
3253
|
+
port: number;
|
|
3254
|
+
}[];
|
|
3255
|
+
options: ClusterOptions;
|
|
3256
|
+
}): Redis | Cluster;
|
|
3257
|
+
}
|
|
3258
|
+
|
|
3259
|
+
declare class EventBus {
|
|
3260
|
+
private _clientSubscriber;
|
|
3261
|
+
private _clientPublisher;
|
|
3262
|
+
private _subscribedChannels;
|
|
3263
|
+
private _subscribers;
|
|
3264
|
+
private _signature;
|
|
3265
|
+
constructor(redisManager: RedisManager);
|
|
3266
|
+
unsubscribe(subscriberId: string): void;
|
|
3267
|
+
subscribe(channelName: string, callback: (message: string) => void, subscriberId?: string): void;
|
|
3268
|
+
publish(channelName: string, message: string): void;
|
|
3269
|
+
}
|
|
3270
|
+
|
|
3271
|
+
declare class StateManager {
|
|
3272
|
+
private readonly redisClient;
|
|
3273
|
+
private readonly redLock;
|
|
3274
|
+
constructor(redisManager: RedisManager, name: string);
|
|
3275
|
+
acquireLock(resource: string, ttl?: number): Promise<Lock>;
|
|
3276
|
+
releaseLock(lock: Lock): Promise<void>;
|
|
3277
|
+
modifyState(modifier: (state: Indexable) => Promise<Indexable>): Promise<void>;
|
|
3278
|
+
setState(stateObj: any): Promise<"OK">;
|
|
3279
|
+
getState(): Promise<string | null>;
|
|
3280
|
+
setKey(keyName: string, value: any, expiry?: number): Promise<"OK">;
|
|
3281
|
+
clearKey(keyName: string): Promise<number>;
|
|
3282
|
+
getKey(keyName: string): Promise<string | null>;
|
|
3283
|
+
}
|
|
3284
|
+
|
|
3285
|
+
declare enum PlatformTypesEnum {
|
|
3286
|
+
WEB = "WEB",
|
|
3287
|
+
ANDROID = "ANDROID",
|
|
3288
|
+
IOS = "IOS",
|
|
3289
|
+
IPADOS = "IPADOS",
|
|
3290
|
+
WINDOWS = "WINDOWS",
|
|
3291
|
+
MACOS = "MACOS",
|
|
3292
|
+
LINUX = "LINUX",
|
|
3293
|
+
CLI = "CLI"
|
|
3294
|
+
}
|
|
3295
|
+
|
|
10
3296
|
declare class ConduitGrpcSdk {
|
|
11
|
-
private static middleware;
|
|
12
3297
|
readonly name: string;
|
|
13
3298
|
readonly instance: string;
|
|
14
3299
|
private readonly serverUrl;
|
|
@@ -26,10 +3311,11 @@ declare class ConduitGrpcSdk {
|
|
|
26
3311
|
private readonly _serviceHealthStatusGetter;
|
|
27
3312
|
private readonly _grpcToken?;
|
|
28
3313
|
private _initialized;
|
|
3314
|
+
private readonly _moduleMonitorListeners;
|
|
3315
|
+
private readonly _communicationsLegacyConnectionStates;
|
|
29
3316
|
constructor(serverUrl: string, name?: string, watchModules?: boolean, logger?: IConduitLogger, serviceHealthStatusGetter?: () => HealthCheckStatus);
|
|
30
|
-
private static _Logger;
|
|
31
3317
|
static get Logger(): IConduitLogger | Console;
|
|
32
|
-
|
|
3318
|
+
static get Sleep(): typeof sleep;
|
|
33
3319
|
static get Metrics(): IConduitMetrics | undefined;
|
|
34
3320
|
static set Metrics(metrics: IConduitMetrics | undefined);
|
|
35
3321
|
static get interceptors(): any[];
|
|
@@ -65,6 +3351,11 @@ declare class ConduitGrpcSdk {
|
|
|
65
3351
|
watchModules(): void;
|
|
66
3352
|
monitorModule(moduleName: string, callback: (serving: boolean) => void, wait?: boolean): void;
|
|
67
3353
|
unmonitorModule(moduleName: string): void;
|
|
3354
|
+
awaitPeer(moduleName: string, options?: AwaitPeerOptions): Promise<void>;
|
|
3355
|
+
watchPeer(moduleName: string, handler: (serving: boolean) => void, options?: PeerWatchOptions): () => void;
|
|
3356
|
+
oncePeerUp(moduleName: string, callback: () => void | Promise<void>): () => void;
|
|
3357
|
+
getKnownModuleNames(): string[];
|
|
3358
|
+
watchPeers(specs: PeerWatchSpec[], handler: (statuses: Record<string, boolean>) => void, options?: PeerWatchBatchOptions): () => void;
|
|
68
3359
|
initializeEventBus(): Promise<EventBus>;
|
|
69
3360
|
/**
|
|
70
3361
|
* Gets all the registered modules from the config and creates clients for them.
|
|
@@ -73,6 +3364,9 @@ declare class ConduitGrpcSdk {
|
|
|
73
3364
|
initializeModules(): Promise<string | void>;
|
|
74
3365
|
updateModuleHealth(moduleName: string, serving: boolean): void;
|
|
75
3366
|
createModuleClient(moduleName: string, moduleUrl: string): void;
|
|
3367
|
+
private resolveModuleUrl;
|
|
3368
|
+
private createCommunicationsLegacyClients;
|
|
3369
|
+
private syncCommunicationsLegacyClients;
|
|
76
3370
|
isModuleUp(moduleName: string, moduleUrl: string, service?: string): Promise<any>;
|
|
77
3371
|
moduleClient(name: string, type: CompatServiceDefinition): void;
|
|
78
3372
|
getModule<T extends CompatServiceDefinition>(name: string): ConduitModule<T> | undefined;
|
|
@@ -90,12 +3384,5 @@ declare class ConduitGrpcSdk {
|
|
|
90
3384
|
refreshModules(force?: boolean): Promise<string | void>;
|
|
91
3385
|
private _initialize;
|
|
92
3386
|
}
|
|
93
|
-
|
|
94
|
-
export
|
|
95
|
-
export * from './classes/index.js';
|
|
96
|
-
export * from './modules/index.js';
|
|
97
|
-
export * from './constants/index.js';
|
|
98
|
-
export * from './types/index.js';
|
|
99
|
-
export * from './utilities/index.js';
|
|
100
|
-
export * from './protoUtils/index.js';
|
|
101
|
-
export * from '@grpc/grpc-js';
|
|
3387
|
+
|
|
3388
|
+
export { Admin, AdminDefinition, AdminRouterDefinition, AllowedResourcesRequest, AllowedResourcesResponse, AnonymousUserCreateRequest, type Array$1 as Array, type ArrayConduitModel, Attachment, Authentication, AuthenticationDefinition, Authorization, AuthorizationDefinition, type AuthzOptions, type AwaitPeerOptions, type BasicConduitModelField, type BodyParams, Chat, ChatDefinition, ClientRouterDefinition, ColumnExistenceRequest, ColumnExistenceResponse, Communications, CommunicationsDefinition, type ConduitArrayValidation, ConduitAuthorizedResource, ConduitError, ConduitGrpcSdk, type ConduitMiddlewareOptions, type ConduitModel, type ConduitModelField, type ConduitModelFieldEnum, type ConduitModelFieldJSON, type ConduitModelFieldRelation, ConduitModelOptionsPermModifyType, ConduitModule, ConduitModuleDefinition, type ConduitNumberValidation, type ConduitQueryParam, type ConduitQueryParams, type ConduitReturn, type ConduitReturnField, type ConduitReturnModel, type ConduitRoute, ConduitRouteActions, type ConduitRouteObject, type ConduitRouteOptions, type ConduitRouteParameters, ConduitRouteReturnDefinition, ConduitSchema, type ConduitSchemaExtension, type ConduitSchemaOptions, type ConduitSocketOptions, type ConduitSocketParamTypes, type ConduitStringValidation, type ConduitUrlParam, type ConduitUrlParams, type ConduitValidationRules, Config, ConfigDefinition, type Context, Cookie, CookieOptions, type Cookies, Core, CoreDefinition, type CountDocumentsOptions, CreateFileByUrlRequest, CreateFileRequest, CreateRelationsRequest, CreateRoomRequest, CreateSchemaRequest, CreateTeamRequest, CreateViewRequest, CreateViewRequest_RawQuery, DatabaseProvider, DatabaseProviderDefinition, Decision, DeleteAllRelationsRequest, DeleteFileResponse, DeleteResourceRequest, DeleteRoomRequest, DeleteViewRequest, type Document$1 as Document, DropCollectionRequest, DropCollectionResponse, Email, type EventsProtoDescription, ExportResourcesRequest, ExportResourcesResponse, FileByUrlResponse, FileResponse, type FindManyOptions, type FindOneOptions, FindOneRequest, FindRelationRequest, FindRelationResponse, FindRequest, FindRequest_SortEntry, GetConfigRequest, GetConfigResponse, GetDatabaseTypeResponse, GetEmailStatusRequest, GetEmailStatusResponse, GetExportableResourcesRequest, GetExportableResourcesResponse, GetFileDataResponse, GetFileRequest, GetFileUrlRequest, GetFileUrlResponse, GetMessageStatusRequest, GetMessageStatusResponse, GetNotificationTokensRequest, GetNotificationTokensResponse, GetRedisDetailsResponse, GetRoomResponse, GetSchemaRequest, GetSchemasRequest, GetSchemasResponse, GetTeamRequest, type GrpcCallback, GrpcError, type GrpcRequest, type GrpcResponse, type Headers$1 as Headers, HealthCheckRequest, HealthCheckResponse, HealthCheckResponse_ServingStatus, HealthCheckStatus, HealthDefinition, type IConduitLogger, type IConduitMetrics, ImportResourcesRequest, ImportResourcesResponse, type Indexable, InvitationDeleteRequest, InvitationDeleteResponse, InviteUserToTeamRequest, InviteUserToTeamResponse, MetricType, MigrateRequest, type ModelOptionsIndexes, ModifyTeamMembersRequest, ModuleByNameRequest, ModuleByNameResponse, type ModuleErrorDefinition, ModuleExistsRequest, ModuleExistsResponse, ModuleHealthRequest, ModuleListResponse, ModuleListResponse_ModuleResponse, type MongoIndexOptions, MongoIndexType, type Params, type ParsedRouterRequest, type ParsedSocketRequest, PatchAppRouteMiddlewaresRequest, PatchRouteMiddlewaresRequest, type PeerWatchBatchOptions, type PeerWatchEdge, type PeerWatchOptions, type PeerWatchSpec, PermissionCheck, PermissionRequest, PlatformTypesEnum, type PopulateAuthzOptions, type PostgresIndexOptions, PostgresIndexType, PushNotifications, type Query, type QueryParams, QueryRequest, QueryResponse, type RateLimitOptions, type RawMongoQuery, type RawQuery, RawQueryRequest, RawQueryRequest_RawQuery, RawQueryRequest_RawQuery_MongoQuery, RawQueryRequest_RawQuery_SQLQuery, type RawSQLQuery, RegisterAdminRouteRequest, RegisterAdminRouteRequest_ConduitRouteOptions, RegisterAdminRouteRequest_ConduitRouteReturnDefinition, RegisterAdminRouteRequest_ErrorDefinition, RegisterAdminRouteRequest_PathDefinition, RegisterAdminRouteRequest_ProxyRouteOptions, RegisterCommunicationTemplateRequest, RegisterCommunicationTemplateRequest_CommunicationTemplate, RegisterCommunicationTemplateRequest_CommunicationTemplate_EmailTemplate, RegisterCommunicationTemplateRequest_CommunicationTemplate_PushTemplate, RegisterCommunicationTemplateRequest_CommunicationTemplate_SmsTemplate, RegisterCommunicationTemplateResponse, RegisterConduitRouteRequest, RegisterConduitRouteRequest_ConduitRouteOptions, RegisterConduitRouteRequest_ConduitRouteReturnDefinition, RegisterConduitRouteRequest_ErrorDefinition, RegisterConduitRouteRequest_PathDefinition, RegisterModuleRequest, RegisterModuleResponse, RegisterModulesConfigRequest, RegisterTemplateRequest, RegisterTemplateResponse, Relation, Request, ResendEmailRequest, ResendEmailResponse, Resource, ResourceAccessListRequest, ResourceAccessListResponse, ResourceModificationAcknowledgement, ResourceModificationAcknowledgement_Status, Resource_Permission, Resource_Relation, Response, Room, type Route, Router, RouterDefinition, SMS, SQLDataType, Schema, SchemaExtension, type SchemaFieldIndex, SendCommunicationRequest, SendCommunicationRequest_SendCommunicationParams, SendCommunicationResponse, SendEmailRequest, SendEmailRequest_SendEmailParams, SendEmailResponse, SendManyNotificationsRequest, SendMessageRequest, SendNotificationRequest, SendNotificationResponse, SendNotificationToManyDevicesRequest, SendSmsRequest, SendSmsResponse, SendToMultipleChannelsRequest, SendToMultipleChannelsRequest_SendCommunicationParams, SendToMultipleChannelsResponse, SendToMultipleChannelsResponse_ChannelResult, SendVerificationCodeRequest, SendVerificationCodeResponse, SendWithFallbackRequest, SendWithFallbackRequest_FallbackStep, SendWithFallbackRequest_SendCommunicationParams, SendWithFallbackResponse, SendWithFallbackResponse_ChannelResult, SetConfigRequest, SetConfigResponse, SetNotificationTokenRequest, SetNotificationTokenResponse, SocketData, type SocketProtoDescription, SocketRequest, SocketResponse, Storage, StorageDefinition, TYPE, Team, TeamDeleteRequest, TeamDeleteResponse, type UnparsedRouterResponse, type UnparsedSocketResponse, type UntypedArray, UpdateConfigRequest, UpdateConfigResponse, UpdateFileByUrlRequest, UpdateFileRequest, UpdateManyRequest, UpdateRequest, UpdateTeamRequest, UpdateTemplateRequest, type UrlParams, UserChangePass, UserCreateByUsernameRequest, UserCreateRequest, UserCreateResponse, UserDeleteRequest, UserDeleteResponse, UserLoginRequest, UserLoginResponse, UserModifyStatusRequest, UserModifyStatusResponse, ValidateAccessTokenRequest, ValidateAccessTokenResponse, ValidateAccessTokenResponse_Status, VerifyRequest, VerifyResponse, type allowedTypes, checkModuleHealth, healthCheckResponse_ServingStatusFromJSON, healthCheckResponse_ServingStatusToJSON, resourceModificationAcknowledgement_StatusFromJSON, resourceModificationAcknowledgement_StatusToJSON, validateAccessTokenResponse_StatusFromJSON, validateAccessTokenResponse_StatusToJSON };
|