@conduitplatform/grpc-sdk 0.16.0-rc.2 → 0.16.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/classes/ConduitAuthorizedResource.d.ts +1 -1
- package/dist/classes/ConduitAuthorizedResource.js +1 -5
- package/dist/classes/ConduitAuthorizedResource.js.map +1 -1
- package/dist/classes/ConduitModule.d.ts +3 -3
- package/dist/classes/ConduitModule.js +17 -24
- package/dist/classes/ConduitModule.js.map +1 -1
- package/dist/classes/ConduitSchema.d.ts +1 -1
- package/dist/classes/ConduitSchema.js +1 -5
- package/dist/classes/ConduitSchema.js.map +1 -1
- package/dist/classes/Error.js +1 -5
- package/dist/classes/Error.js.map +1 -1
- package/dist/classes/HealthCheck.js +11 -18
- package/dist/classes/HealthCheck.js.map +1 -1
- package/dist/classes/index.d.ts +5 -5
- package/dist/classes/index.js +5 -21
- package/dist/classes/index.js.map +1 -1
- package/dist/constants/enums/PlatformTypesEnum.js +2 -5
- package/dist/constants/enums/PlatformTypesEnum.js.map +1 -1
- package/dist/constants/enums/index.d.ts +1 -1
- package/dist/constants/enums/index.js +1 -17
- package/dist/constants/enums/index.js.map +1 -1
- package/dist/constants/index.d.ts +1 -1
- package/dist/constants/index.js +1 -17
- package/dist/constants/index.js.map +1 -1
- package/dist/index.d.ts +13 -13
- package/dist/index.js +49 -68
- package/dist/index.js.map +1 -1
- package/dist/interceptors/grpcSignedToken.js +3 -7
- package/dist/interceptors/grpcSignedToken.js.map +1 -1
- package/dist/interceptors/index.d.ts +2 -2
- package/dist/interceptors/index.js +2 -18
- package/dist/interceptors/index.js.map +1 -1
- package/dist/interceptors/moduleName.js +3 -7
- package/dist/interceptors/moduleName.js.map +1 -1
- package/dist/interfaces/ConduitMiddleware.d.ts +1 -1
- package/dist/interfaces/ConduitMiddleware.js +1 -2
- package/dist/interfaces/ConduitRoute.d.ts +2 -2
- package/dist/interfaces/ConduitRoute.js +1 -2
- package/dist/interfaces/ConduitRouteReturn.d.ts +1 -1
- package/dist/interfaces/ConduitRouteReturn.js +1 -5
- package/dist/interfaces/ConduitRouteReturn.js.map +1 -1
- package/dist/interfaces/ConduitSchemaExtension.d.ts +1 -1
- package/dist/interfaces/ConduitSchemaExtension.js +1 -2
- package/dist/interfaces/GrpcCallback.js +1 -2
- package/dist/interfaces/IConduitLogger.d.ts +1 -1
- package/dist/interfaces/IConduitLogger.js +1 -2
- package/dist/interfaces/IConduitMetrics.d.ts +1 -1
- package/dist/interfaces/IConduitMetrics.js +1 -2
- package/dist/interfaces/Indexable.js +1 -2
- package/dist/interfaces/Model.js +9 -12
- package/dist/interfaces/Model.js.map +1 -1
- package/dist/interfaces/Params.d.ts +1 -1
- package/dist/interfaces/Params.js +1 -2
- package/dist/interfaces/ProxyRoute.js +2 -5
- package/dist/interfaces/ProxyRoute.js.map +1 -1
- package/dist/interfaces/RawQuery.js +1 -2
- package/dist/interfaces/Route.d.ts +2 -2
- package/dist/interfaces/Route.js +2 -5
- package/dist/interfaces/Route.js.map +1 -1
- package/dist/interfaces/Socket.d.ts +2 -2
- package/dist/interfaces/Socket.js +1 -2
- package/dist/interfaces/UntypedArray.js +1 -2
- package/dist/interfaces/index.d.ts +16 -15
- package/dist/interfaces/index.js +16 -31
- package/dist/interfaces/index.js.map +1 -1
- package/dist/interfaces/types.d.ts +2 -2
- package/dist/interfaces/types.js +1 -2
- package/dist/modules/admin/index.d.ts +4 -4
- package/dist/modules/admin/index.js +4 -8
- package/dist/modules/admin/index.js.map +1 -1
- package/dist/modules/authentication/index.d.ts +4 -4
- package/dist/modules/authentication/index.js +4 -8
- package/dist/modules/authentication/index.js.map +1 -1
- package/dist/modules/authorization/index.d.ts +11 -11
- package/dist/modules/authorization/index.js +4 -8
- package/dist/modules/authorization/index.js.map +1 -1
- package/dist/modules/chat/index.d.ts +2 -2
- package/dist/modules/chat/index.js +4 -8
- package/dist/modules/chat/index.js.map +1 -1
- package/dist/modules/config/index.d.ts +5 -5
- package/dist/modules/config/index.js +14 -21
- package/dist/modules/config/index.js.map +1 -1
- package/dist/modules/core/index.d.ts +2 -2
- package/dist/modules/core/index.js +4 -8
- package/dist/modules/core/index.js.map +1 -1
- package/dist/modules/database/index.d.ts +8 -10
- package/dist/modules/database/index.js +4 -8
- package/dist/modules/database/index.js.map +1 -1
- package/dist/modules/email/index.d.ts +4 -3
- package/dist/modules/email/index.js +5 -8
- package/dist/modules/email/index.js.map +1 -1
- package/dist/modules/index.d.ts +12 -12
- package/dist/modules/index.js +12 -28
- package/dist/modules/index.js.map +1 -1
- package/dist/modules/pushNotifications/index.d.ts +5 -5
- package/dist/modules/pushNotifications/index.js +4 -8
- package/dist/modules/pushNotifications/index.js.map +1 -1
- package/dist/modules/router/index.d.ts +5 -5
- package/dist/modules/router/index.js +4 -8
- package/dist/modules/router/index.js.map +1 -1
- package/dist/modules/sms/index.d.ts +2 -2
- package/dist/modules/sms/index.js +4 -8
- package/dist/modules/sms/index.js.map +1 -1
- package/dist/modules/storage/index.d.ts +4 -4
- package/dist/modules/storage/index.js +4 -8
- package/dist/modules/storage/index.js.map +1 -1
- package/dist/protoUtils/authentication.d.ts +2 -2
- package/dist/protoUtils/authentication.js +87 -95
- package/dist/protoUtils/authentication.js.map +1 -1
- package/dist/protoUtils/authorization.d.ts +2 -2
- package/dist/protoUtils/authorization.js +112 -120
- package/dist/protoUtils/authorization.js.map +1 -1
- package/dist/protoUtils/chat.d.ts +2 -2
- package/dist/protoUtils/chat.js +34 -40
- package/dist/protoUtils/chat.js.map +1 -1
- package/dist/protoUtils/core.d.ts +2 -2
- package/dist/protoUtils/core.js +138 -144
- package/dist/protoUtils/core.js.map +1 -1
- package/dist/protoUtils/database.d.ts +2 -2
- package/dist/protoUtils/database.js +180 -186
- package/dist/protoUtils/database.js.map +1 -1
- package/dist/protoUtils/email.d.ts +3 -2
- package/dist/protoUtils/email.js +52 -44
- package/dist/protoUtils/email.js.map +1 -1
- package/dist/protoUtils/google/protobuf/empty.d.ts +1 -1
- package/dist/protoUtils/google/protobuf/empty.js +5 -11
- package/dist/protoUtils/google/protobuf/empty.js.map +1 -1
- package/dist/protoUtils/grpc_health_check.d.ts +1 -1
- package/dist/protoUtils/grpc_health_check.js +18 -26
- package/dist/protoUtils/grpc_health_check.js.map +1 -1
- package/dist/protoUtils/index.d.ts +12 -12
- package/dist/protoUtils/index.js +12 -28
- package/dist/protoUtils/index.js.map +1 -1
- package/dist/protoUtils/module.d.ts +1 -1
- package/dist/protoUtils/module.js +61 -67
- package/dist/protoUtils/module.js.map +1 -1
- package/dist/protoUtils/push-notifications.d.ts +1 -1
- package/dist/protoUtils/push-notifications.js +49 -55
- package/dist/protoUtils/push-notifications.js.map +1 -1
- package/dist/protoUtils/router.d.ts +2 -2
- package/dist/protoUtils/router.js +57 -63
- package/dist/protoUtils/router.js.map +1 -1
- package/dist/protoUtils/sms.d.ts +1 -1
- package/dist/protoUtils/sms.js +32 -38
- package/dist/protoUtils/sms.js.map +1 -1
- package/dist/protoUtils/storage.d.ts +1 -1
- package/dist/protoUtils/storage.js +52 -58
- package/dist/protoUtils/storage.js.map +1 -1
- package/dist/types/db.js +1 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.js +6 -24
- package/dist/types/index.js.map +1 -1
- package/dist/utilities/EventBus.d.ts +1 -1
- package/dist/utilities/EventBus.js +5 -12
- package/dist/utilities/EventBus.js.map +1 -1
- package/dist/utilities/RedisManager.js +4 -11
- package/dist/utilities/RedisManager.js.map +1 -1
- package/dist/utilities/StateManager.d.ts +3 -3
- package/dist/utilities/StateManager.js +8 -15
- package/dist/utilities/StateManager.js.map +1 -1
- package/dist/utilities/env.js +3 -10
- package/dist/utilities/env.js.map +1 -1
- package/dist/utilities/index.d.ts +5 -5
- package/dist/utilities/index.js +5 -21
- package/dist/utilities/index.js.map +1 -1
- package/dist/utilities/sleep.js +1 -5
- package/dist/utilities/sleep.js.map +1 -1
- package/package.json +10 -11
package/dist/interfaces/Route.js
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ConduitRouteActions = void 0;
|
|
4
|
-
var ConduitRouteActions;
|
|
1
|
+
export var ConduitRouteActions;
|
|
5
2
|
(function (ConduitRouteActions) {
|
|
6
3
|
ConduitRouteActions["GET"] = "GET";
|
|
7
4
|
ConduitRouteActions["POST"] = "POST";
|
|
8
5
|
ConduitRouteActions["UPDATE"] = "PUT";
|
|
9
6
|
ConduitRouteActions["PATCH"] = "PATCH";
|
|
10
7
|
ConduitRouteActions["DELETE"] = "DELETE";
|
|
11
|
-
})(ConduitRouteActions
|
|
8
|
+
})(ConduitRouteActions || (ConduitRouteActions = {}));
|
|
12
9
|
//# sourceMappingURL=Route.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Route.js","sourceRoot":"","sources":["../../src/interfaces/Route.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Route.js","sourceRoot":"","sources":["../../src/interfaces/Route.ts"],"names":[],"mappings":"AA6CA,MAAM,CAAN,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC7B,kCAAW,CAAA;IACX,oCAAa,CAAA;IACb,qCAAc,CAAA;IACd,sCAAe,CAAA;IACf,wCAAiB,CAAA;AACnB,CAAC,EANW,mBAAmB,KAAnB,mBAAmB,QAM9B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ConduitRouteReturnDefinition } from './ConduitRouteReturn';
|
|
2
|
-
import { TYPE } from './Model';
|
|
1
|
+
import { ConduitRouteReturnDefinition } from './ConduitRouteReturn.js';
|
|
2
|
+
import { TYPE } from './Model.js';
|
|
3
3
|
export type ConduitSocketParamTypes = (TYPE | ConduitSocketParamTypes)[];
|
|
4
4
|
export interface ConduitSocketOptions {
|
|
5
5
|
path: string;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
export * from './ConduitMiddleware';
|
|
2
|
-
export * from './ConduitRoute';
|
|
3
|
-
export * from './ProxyRoute';
|
|
4
|
-
export * from './Route';
|
|
5
|
-
export * from './Socket';
|
|
6
|
-
export * from './types';
|
|
7
|
-
export * from './Model';
|
|
8
|
-
export * from './GrpcCallback';
|
|
9
|
-
export * from './Indexable';
|
|
10
|
-
export * from './RawQuery';
|
|
11
|
-
export * from './UntypedArray';
|
|
12
|
-
export * from './Params';
|
|
13
|
-
export * from './ConduitRouteReturn';
|
|
14
|
-
export * from './
|
|
15
|
-
export * from './
|
|
1
|
+
export * from './ConduitMiddleware.js';
|
|
2
|
+
export * from './ConduitRoute.js';
|
|
3
|
+
export * from './ProxyRoute.js';
|
|
4
|
+
export * from './Route.js';
|
|
5
|
+
export * from './Socket.js';
|
|
6
|
+
export * from './types.js';
|
|
7
|
+
export * from './Model.js';
|
|
8
|
+
export * from './GrpcCallback.js';
|
|
9
|
+
export * from './Indexable.js';
|
|
10
|
+
export * from './RawQuery.js';
|
|
11
|
+
export * from './UntypedArray.js';
|
|
12
|
+
export * from './Params.js';
|
|
13
|
+
export * from './ConduitRouteReturn.js';
|
|
14
|
+
export * from './ConduitSchemaExtension.js';
|
|
15
|
+
export * from './IConduitLogger.js';
|
|
16
|
+
export * from './IConduitMetrics.js';
|
package/dist/interfaces/index.js
CHANGED
|
@@ -1,32 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
__exportStar(require("./ConduitMiddleware"), exports);
|
|
18
|
-
__exportStar(require("./ConduitRoute"), exports);
|
|
19
|
-
__exportStar(require("./ProxyRoute"), exports);
|
|
20
|
-
__exportStar(require("./Route"), exports);
|
|
21
|
-
__exportStar(require("./Socket"), exports);
|
|
22
|
-
__exportStar(require("./types"), exports);
|
|
23
|
-
__exportStar(require("./Model"), exports);
|
|
24
|
-
__exportStar(require("./GrpcCallback"), exports);
|
|
25
|
-
__exportStar(require("./Indexable"), exports);
|
|
26
|
-
__exportStar(require("./RawQuery"), exports);
|
|
27
|
-
__exportStar(require("./UntypedArray"), exports);
|
|
28
|
-
__exportStar(require("./Params"), exports);
|
|
29
|
-
__exportStar(require("./ConduitRouteReturn"), exports);
|
|
30
|
-
__exportStar(require("./IConduitLogger"), exports);
|
|
31
|
-
__exportStar(require("./IConduitMetrics"), exports);
|
|
1
|
+
export * from './ConduitMiddleware.js';
|
|
2
|
+
export * from './ConduitRoute.js';
|
|
3
|
+
export * from './ProxyRoute.js';
|
|
4
|
+
export * from './Route.js';
|
|
5
|
+
export * from './Socket.js';
|
|
6
|
+
export * from './types.js';
|
|
7
|
+
export * from './Model.js';
|
|
8
|
+
export * from './GrpcCallback.js';
|
|
9
|
+
export * from './Indexable.js';
|
|
10
|
+
export * from './RawQuery.js';
|
|
11
|
+
export * from './UntypedArray.js';
|
|
12
|
+
export * from './Params.js';
|
|
13
|
+
export * from './ConduitRouteReturn.js';
|
|
14
|
+
export * from './ConduitSchemaExtension.js';
|
|
15
|
+
export * from './IConduitLogger.js';
|
|
16
|
+
export * from './IConduitMetrics.js';
|
|
32
17
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Context, Cookies, Indexable, Params } from './Indexable';
|
|
2
|
-
import { GrpcRequest } from '../types';
|
|
1
|
+
import { Context, Cookies, Indexable, Params } from './Indexable.js';
|
|
2
|
+
import { GrpcRequest } from '../types/index.js';
|
|
3
3
|
export type ParsedRouterRequest = GrpcRequest<{
|
|
4
4
|
params: Params;
|
|
5
5
|
urlParams: Params;
|
package/dist/interfaces/types.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ConduitModule } from '../../classes';
|
|
2
|
-
import { AdminDefinition, RegisterAdminRouteRequest_PathDefinition } from '../../protoUtils';
|
|
3
|
-
import { ConduitRouteActions } from '../../interfaces';
|
|
1
|
+
import { ConduitModule } from '../../classes/index.js';
|
|
2
|
+
import { AdminDefinition, RegisterAdminRouteRequest_PathDefinition } from '../../protoUtils/index.js';
|
|
3
|
+
import { ConduitRouteActions } from '../../interfaces/index.js';
|
|
4
4
|
export declare class Admin extends ConduitModule<typeof AdminDefinition> {
|
|
5
5
|
readonly moduleName: string;
|
|
6
6
|
constructor(moduleName: string, url: string, grpcToken?: string);
|
|
7
7
|
register(paths: RegisterAdminRouteRequest_PathDefinition[], serverUrl?: string): Promise<any>;
|
|
8
|
-
patchRouteMiddlewares(path: string, action: ConduitRouteActions, middlewares: string[]): Promise<import("../../protoUtils/google/protobuf/empty").Empty>;
|
|
8
|
+
patchRouteMiddlewares(path: string, action: ConduitRouteActions, middlewares: string[]): Promise<import("../../protoUtils/google/protobuf/empty.js").Empty>;
|
|
9
9
|
}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const classes_1 = require("../../classes");
|
|
5
|
-
const protoUtils_1 = require("../../protoUtils");
|
|
6
|
-
class Admin extends classes_1.ConduitModule {
|
|
1
|
+
import { ConduitModule } from '../../classes/index.js';
|
|
2
|
+
import { AdminDefinition, } from '../../protoUtils/index.js';
|
|
3
|
+
export class Admin extends ConduitModule {
|
|
7
4
|
constructor(moduleName, url, grpcToken) {
|
|
8
5
|
super(moduleName, 'admin', url, grpcToken);
|
|
9
6
|
this.moduleName = moduleName;
|
|
10
|
-
this.initializeClient(
|
|
7
|
+
this.initializeClient(AdminDefinition);
|
|
11
8
|
}
|
|
12
9
|
register(paths, serverUrl) {
|
|
13
10
|
const request = {
|
|
@@ -24,5 +21,4 @@ class Admin extends classes_1.ConduitModule {
|
|
|
24
21
|
});
|
|
25
22
|
}
|
|
26
23
|
}
|
|
27
|
-
exports.Admin = Admin;
|
|
28
24
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/admin/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/admin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EACL,eAAe,GAGhB,MAAM,2BAA2B,CAAC;AAGnC,MAAM,OAAO,KAAM,SAAQ,aAAqC;IAC9D,YACW,UAAkB,EAC3B,GAAW,EACX,SAAkB;QAElB,KAAK,CAAC,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;QAJlC,eAAU,GAAV,UAAU,CAAQ;QAK3B,IAAI,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC;IACzC,CAAC;IAED,QAAQ,CACN,KAAiD,EACjD,SAAkB;QAElB,MAAM,OAAO,GAA8B;YACzC,MAAM,EAAE,KAAK;YACb,SAAS,EAAE,SAAS;SACrB,CAAC;QAEF,OAAO,IAAI,CAAC,MAAO,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAClD,CAAC;IAED,qBAAqB,CACnB,IAAY,EACZ,MAA2B,EAC3B,WAAqB;QAErB,OAAO,IAAI,CAAC,MAAO,CAAC,qBAAqB,CAAC;YACxC,IAAI,EAAE,IAAI;YACV,MAAM,EAAE,MAAM;YACd,WAAW,EAAE,WAAW;SACzB,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ConduitModule } from '../../classes';
|
|
2
|
-
import { AuthenticationDefinition, TeamDeleteResponse, UserCreateResponse, UserDeleteResponse, UserLoginResponse, Team, ValidateAccessTokenResponse } from '../../protoUtils';
|
|
1
|
+
import { ConduitModule } from '../../classes/index.js';
|
|
2
|
+
import { AuthenticationDefinition, TeamDeleteResponse, UserCreateResponse, UserDeleteResponse, UserLoginResponse, Team, ValidateAccessTokenResponse } from '../../protoUtils/index.js';
|
|
3
3
|
export declare class Authentication extends ConduitModule<typeof AuthenticationDefinition> {
|
|
4
4
|
private readonly moduleName;
|
|
5
5
|
constructor(moduleName: string, url: string, grpcToken?: string);
|
|
@@ -10,7 +10,7 @@ export declare class Authentication extends ConduitModule<typeof AuthenticationD
|
|
|
10
10
|
getTeam(teamId: string): Promise<Team>;
|
|
11
11
|
createTeam(name: string, parentTeam?: string, isDefault?: boolean): Promise<Team>;
|
|
12
12
|
teamDelete(teamId: string): Promise<TeamDeleteResponse>;
|
|
13
|
-
addTeamMembers(teamId: string, memberIds: string[]): Promise<import("../../protoUtils/google/protobuf/empty").Empty>;
|
|
14
|
-
removeTeamMembers(teamId: string, memberIds: string[]): Promise<import("../../protoUtils/google/protobuf/empty").Empty>;
|
|
13
|
+
addTeamMembers(teamId: string, memberIds: string[]): Promise<import("../../protoUtils/google/protobuf/empty.js").Empty>;
|
|
14
|
+
removeTeamMembers(teamId: string, memberIds: string[]): Promise<import("../../protoUtils/google/protobuf/empty.js").Empty>;
|
|
15
15
|
validateAccessToken(accessToken: string, path?: string): Promise<ValidateAccessTokenResponse>;
|
|
16
16
|
}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const classes_1 = require("../../classes");
|
|
5
|
-
const protoUtils_1 = require("../../protoUtils");
|
|
6
|
-
class Authentication extends classes_1.ConduitModule {
|
|
1
|
+
import { ConduitModule } from '../../classes/index.js';
|
|
2
|
+
import { AuthenticationDefinition, } from '../../protoUtils/index.js';
|
|
3
|
+
export class Authentication extends ConduitModule {
|
|
7
4
|
constructor(moduleName, url, grpcToken) {
|
|
8
5
|
super(moduleName, 'authentication', url, grpcToken);
|
|
9
6
|
this.moduleName = moduleName;
|
|
10
|
-
this.initializeClient(
|
|
7
|
+
this.initializeClient(AuthenticationDefinition);
|
|
11
8
|
}
|
|
12
9
|
userLogin(userId, clientId) {
|
|
13
10
|
return this.client.userLogin({ userId, clientId });
|
|
@@ -40,5 +37,4 @@ class Authentication extends classes_1.ConduitModule {
|
|
|
40
37
|
return this.client.validateAccessToken({ accessToken, path });
|
|
41
38
|
}
|
|
42
39
|
}
|
|
43
|
-
exports.Authentication = Authentication;
|
|
44
40
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/authentication/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/authentication/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EACL,wBAAwB,GAOzB,MAAM,2BAA2B,CAAC;AAEnC,MAAM,OAAO,cAAe,SAAQ,aAA8C;IAChF,YACmB,UAAkB,EACnC,GAAW,EACX,SAAkB;QAElB,KAAK,CAAC,UAAU,EAAE,gBAAgB,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;QAJnC,eAAU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,OAAO,IAAI,CAAC,MAAO,CAAC,iBAAiB,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED,mBAAmB,CACjB,WAAmB,EACnB,IAAa;QAEb,OAAO,IAAI,CAAC,MAAO,CAAC,mBAAmB,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;IACjE,CAAC;CACF"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { ConduitModule } from '../../classes';
|
|
2
|
-
import { AllowedResourcesRequest, AllowedResourcesResponse, AuthorizationDefinition, Decision, DeleteAllRelationsRequest, FindRelationRequest, FindRelationResponse, PermissionCheck, PermissionRequest, Relation, Resource, ResourceAccessListRequest } from '../../protoUtils';
|
|
3
|
-
import { Empty } from '../../protoUtils/google/protobuf/empty';
|
|
1
|
+
import { ConduitModule } from '../../classes/index.js';
|
|
2
|
+
import { AllowedResourcesRequest, AllowedResourcesResponse, AuthorizationDefinition, Decision, DeleteAllRelationsRequest, FindRelationRequest, FindRelationResponse, PermissionCheck, PermissionRequest, Relation, Resource, ResourceAccessListRequest } from '../../protoUtils/index.js';
|
|
3
|
+
import { Empty } from '../../protoUtils/google/protobuf/empty.js';
|
|
4
4
|
export declare class Authorization extends ConduitModule<typeof AuthorizationDefinition> {
|
|
5
5
|
private readonly moduleName;
|
|
6
6
|
constructor(moduleName: string, url: string, grpcToken?: string);
|
|
7
7
|
defineResource(data: Resource): Promise<Empty>;
|
|
8
8
|
updateResource(data: Resource): Promise<Empty>;
|
|
9
|
-
deleteResource(data: Resource): Promise<
|
|
10
|
-
deleteRelation(data: Relation): Promise<
|
|
11
|
-
deleteAllRelations(data: DeleteAllRelationsRequest): Promise<
|
|
12
|
-
createRelation(data: Relation): Promise<
|
|
13
|
-
createRelations(subject: string, relation: string, resources: string[]): Promise<
|
|
9
|
+
deleteResource(data: Resource): Promise<unknown>;
|
|
10
|
+
deleteRelation(data: Relation): Promise<unknown>;
|
|
11
|
+
deleteAllRelations(data: DeleteAllRelationsRequest): Promise<unknown>;
|
|
12
|
+
createRelation(data: Relation): Promise<unknown>;
|
|
13
|
+
createRelations(subject: string, relation: string, resources: string[]): Promise<unknown>;
|
|
14
14
|
findRelation(data: FindRelationRequest): Promise<FindRelationResponse>;
|
|
15
15
|
can(data: PermissionCheck): Promise<Decision>;
|
|
16
|
-
grantPermission(data: PermissionRequest): Promise<
|
|
17
|
-
removePermission(data: PermissionRequest): Promise<
|
|
16
|
+
grantPermission(data: PermissionRequest): Promise<unknown>;
|
|
17
|
+
removePermission(data: PermissionRequest): Promise<unknown>;
|
|
18
18
|
getAllowedResources(data: AllowedResourcesRequest): Promise<AllowedResourcesResponse>;
|
|
19
|
-
createResourceAccessList(data: ResourceAccessListRequest): Promise<
|
|
19
|
+
createResourceAccessList(data: ResourceAccessListRequest): Promise<unknown>;
|
|
20
20
|
}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const classes_1 = require("../../classes");
|
|
5
|
-
const protoUtils_1 = require("../../protoUtils");
|
|
6
|
-
class Authorization extends classes_1.ConduitModule {
|
|
1
|
+
import { ConduitModule } from '../../classes/index.js';
|
|
2
|
+
import { AuthorizationDefinition, } from '../../protoUtils/index.js';
|
|
3
|
+
export class Authorization extends ConduitModule {
|
|
7
4
|
constructor(moduleName, url, grpcToken) {
|
|
8
5
|
super(moduleName, 'authorization', url, grpcToken);
|
|
9
6
|
this.moduleName = moduleName;
|
|
10
|
-
this.initializeClient(
|
|
7
|
+
this.initializeClient(AuthorizationDefinition);
|
|
11
8
|
}
|
|
12
9
|
defineResource(data) {
|
|
13
10
|
return this.client.defineResource(data);
|
|
@@ -49,5 +46,4 @@ class Authorization extends classes_1.ConduitModule {
|
|
|
49
46
|
return this.client.createResourceAccessList(data);
|
|
50
47
|
}
|
|
51
48
|
}
|
|
52
|
-
exports.Authorization = Authorization;
|
|
53
49
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/authorization/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/authorization/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAGL,uBAAuB,GAUxB,MAAM,2BAA2B,CAAC;AAGnC,MAAM,OAAO,aAAc,SAAQ,aAA6C;IAC9E,YACmB,UAAkB,EACnC,GAAW,EACX,SAAkB;QAElB,KAAK,CAAC,UAAU,EAAE,eAAe,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;QAJlC,eAAU,GAAV,UAAU,CAAQ;QAKnC,IAAI,CAAC,gBAAgB,CAAC,uBAAuB,CAAC,CAAC;IACjD,CAAC;IAED,cAAc,CAAC,IAAc;QAC3B,OAAO,IAAI,CAAC,MAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;IAED,cAAc,CAAC,IAAc;QAC3B,OAAO,IAAI,CAAC,MAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;IAED,cAAc,CAAC,IAAc;QAC3B,OAAO,IAAI,CAAC,MAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;IAED,cAAc,CAAC,IAAc;QAC3B,OAAO,IAAI,CAAC,MAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;IAED,kBAAkB,CAAC,IAA+B;QAChD,OAAO,IAAI,CAAC,MAAO,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC;IAED,cAAc,CAAC,IAAc;QAC3B,OAAO,IAAI,CAAC,MAAO,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;IAED,eAAe,CACb,OAAe,EACf,QAAgB,EAChB,SAAmB;QAEnB,OAAO,IAAI,CAAC,MAAO,CAAC,eAAe,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC,CAAC;IACxE,CAAC;IAED,YAAY,CAAC,IAAyB;QACpC,OAAO,IAAI,CAAC,MAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC;IAED,GAAG,CAAC,IAAqB;QACvB,OAAO,IAAI,CAAC,MAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IAED,eAAe,CAAC,IAAuB;QACrC,OAAO,IAAI,CAAC,MAAO,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IAC5C,CAAC;IAED,gBAAgB,CAAC,IAAuB;QACtC,OAAO,IAAI,CAAC,MAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;IAED,mBAAmB,CAAC,IAA6B;QAC/C,OAAO,IAAI,CAAC,MAAO,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;IAED,wBAAwB,CAAC,IAA+B;QACtD,OAAO,IAAI,CAAC,MAAO,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC;IACrD,CAAC;CACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ConduitModule } from '../../classes/
|
|
2
|
-
import { ChatDefinition, Room, SendMessageRequest } from '../../protoUtils/chat';
|
|
1
|
+
import { ConduitModule } from '../../classes/index.js';
|
|
2
|
+
import { ChatDefinition, Room, SendMessageRequest } from '../../protoUtils/chat.js';
|
|
3
3
|
export declare class Chat extends ConduitModule<typeof ChatDefinition> {
|
|
4
4
|
private readonly moduleName;
|
|
5
5
|
constructor(moduleName: string, url: string, grpcToken?: string);
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const ConduitModule_1 = require("../../classes/ConduitModule");
|
|
5
|
-
const chat_1 = require("../../protoUtils/chat");
|
|
6
|
-
class Chat extends ConduitModule_1.ConduitModule {
|
|
1
|
+
import { ConduitModule } from '../../classes/index.js';
|
|
2
|
+
import { ChatDefinition } from '../../protoUtils/chat.js';
|
|
3
|
+
export class Chat extends ConduitModule {
|
|
7
4
|
constructor(moduleName, url, grpcToken) {
|
|
8
5
|
super(moduleName, 'chat', url, grpcToken);
|
|
9
6
|
this.moduleName = moduleName;
|
|
10
|
-
this.initializeClient(
|
|
7
|
+
this.initializeClient(ChatDefinition);
|
|
11
8
|
}
|
|
12
9
|
sendMessage(messageData) {
|
|
13
10
|
return this.client.sendMessage(messageData);
|
|
@@ -19,5 +16,4 @@ class Chat extends ConduitModule_1.ConduitModule {
|
|
|
19
16
|
return this.client.deleteRoom({ _id: id });
|
|
20
17
|
}
|
|
21
18
|
}
|
|
22
|
-
exports.Chat = Chat;
|
|
23
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/chat/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/chat/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,cAAc,EAA4B,MAAM,0BAA0B,CAAC;AAEpF,MAAM,OAAO,IAAK,SAAQ,aAAoC;IAC5D,YACmB,UAAkB,EACnC,GAAW,EACX,SAAkB;QAElB,KAAK,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;QAJzB,eAAU,GAAV,UAAU,CAAQ;QAKnC,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;IACxC,CAAC;IAED,WAAW,CAAC,WAA+B;QACzC,OAAO,IAAI,CAAC,MAAO,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IAC/C,CAAC;IAED,UAAU,CAAC,IAAY,EAAE,YAAsB;QAC7C,OAAO,IAAI,CAAC,MAAO,CAAC,UAAU,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,CAAC;IACzD,CAAC;IAED,UAAU,CAAC,EAAU;QACnB,OAAO,IAAI,CAAC,MAAO,CAAC,UAAU,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC;IAC9C,CAAC;CACF"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
2
|
import { EventEmitter } from 'events';
|
|
3
|
-
import { ConduitModule } from '../../classes';
|
|
4
|
-
import { HealthCheckStatus } from '../../types';
|
|
5
|
-
import { ConfigDefinition } from '../../protoUtils';
|
|
3
|
+
import { ConduitModule } from '../../classes/index.js';
|
|
4
|
+
import { HealthCheckStatus } from '../../types/index.js';
|
|
5
|
+
import { ConfigDefinition } from '../../protoUtils/index.js';
|
|
6
6
|
import { ClusterOptions, RedisOptions } from 'ioredis';
|
|
7
7
|
export declare class Config extends ConduitModule<typeof ConfigDefinition> {
|
|
8
8
|
readonly url: string;
|
|
@@ -16,7 +16,7 @@ export declare class Config extends ConduitModule<typeof ConfigDefinition> {
|
|
|
16
16
|
}>;
|
|
17
17
|
get(name: string): Promise<any>;
|
|
18
18
|
configure(config: any, schema: any, override: boolean): Promise<any>;
|
|
19
|
-
moduleExists(name: string): Promise<import("../../
|
|
19
|
+
moduleExists(name: string): Promise<import("../../index.js").ModuleExistsResponse>;
|
|
20
20
|
moduleList(): Promise<any[]>;
|
|
21
21
|
getRedisDetails(): Promise<{
|
|
22
22
|
standalone?: RedisOptions;
|
|
@@ -1,21 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const events_1 = require("events");
|
|
8
|
-
const classes_1 = require("../../classes");
|
|
9
|
-
const types_1 = require("../../types");
|
|
10
|
-
const protoUtils_1 = require("../../protoUtils");
|
|
11
|
-
const index_1 = __importDefault(require("../../index"));
|
|
12
|
-
class Config extends classes_1.ConduitModule {
|
|
1
|
+
import { EventEmitter } from 'events';
|
|
2
|
+
import { ConduitModule } from '../../classes/index.js';
|
|
3
|
+
import { HealthCheckStatus } from '../../types/index.js';
|
|
4
|
+
import { ConfigDefinition, } from '../../protoUtils/index.js';
|
|
5
|
+
import ConduitGrpcSdk from '../../index.js';
|
|
6
|
+
export class Config extends ConduitModule {
|
|
13
7
|
constructor(moduleName, url, serviceHealthStatusGetter, grpcToken) {
|
|
14
8
|
super(moduleName, 'config', url, grpcToken);
|
|
15
9
|
this.url = url;
|
|
16
|
-
this.emitter = new
|
|
10
|
+
this.emitter = new EventEmitter();
|
|
17
11
|
this.coreLive = false;
|
|
18
|
-
this.initializeClient(
|
|
12
|
+
this.initializeClient(ConfigDefinition);
|
|
19
13
|
this._serviceHealthStatusGetter = serviceHealthStatusGetter;
|
|
20
14
|
this.emitter.setMaxListeners(150);
|
|
21
15
|
}
|
|
@@ -98,24 +92,24 @@ class Config extends classes_1.ConduitModule {
|
|
|
98
92
|
url,
|
|
99
93
|
status: this._serviceHealthStatusGetter
|
|
100
94
|
? this._serviceHealthStatusGetter()
|
|
101
|
-
:
|
|
95
|
+
: HealthCheckStatus.SERVICE_UNKNOWN,
|
|
102
96
|
};
|
|
103
97
|
const self = this;
|
|
104
98
|
this.client.moduleHealthProbe(request)
|
|
105
99
|
.then(res => {
|
|
106
100
|
if (!res && self.coreLive) {
|
|
107
|
-
|
|
101
|
+
ConduitGrpcSdk.Logger.warn('Core unhealthy');
|
|
108
102
|
self.coreLive = false;
|
|
109
103
|
}
|
|
110
104
|
else if (res && !self.coreLive) {
|
|
111
|
-
|
|
105
|
+
ConduitGrpcSdk.Logger.log('Core is live');
|
|
112
106
|
self.coreLive = true;
|
|
113
107
|
self.watchModules();
|
|
114
108
|
}
|
|
115
109
|
})
|
|
116
110
|
.catch(() => {
|
|
117
111
|
if (self.coreLive) {
|
|
118
|
-
|
|
112
|
+
ConduitGrpcSdk.Logger.warn('Core unhealthy');
|
|
119
113
|
self.coreLive = false;
|
|
120
114
|
}
|
|
121
115
|
});
|
|
@@ -136,10 +130,9 @@ class Config extends classes_1.ConduitModule {
|
|
|
136
130
|
}
|
|
137
131
|
catch (error) {
|
|
138
132
|
this.coreLive = false;
|
|
139
|
-
|
|
140
|
-
this.emitter.emit('core-status-update',
|
|
133
|
+
ConduitGrpcSdk.Logger.warn('Core unhealthy');
|
|
134
|
+
this.emitter.emit('core-status-update', HealthCheckStatus.UNKNOWN);
|
|
141
135
|
}
|
|
142
136
|
}
|
|
143
137
|
}
|
|
144
|
-
exports.Config = Config;
|
|
145
138
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/config/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EACL,gBAAgB,GAGjB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,cAAc,MAAM,gBAAgB,CAAC;AAG5C,MAAM,OAAO,MAAO,SAAQ,aAAsC;IAKhE,YACE,UAAkB,EACT,GAAW,EACpB,yBAAmD,EACnD,SAAkB;QAElB,KAAK,CAAC,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;QAJnC,QAAG,GAAH,GAAG,CAAQ;QANL,YAAO,GAAG,IAAI,YAAY,EAAE,CAAC;QACtC,aAAQ,GAAG,KAAK,CAAC;QAUvB,IAAI,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;QACxC,IAAI,CAAC,0BAA0B,GAAG,yBAAyB,CAAC;QAC5D,I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oUtils/core';
|
|
1
|
+
import { ConduitModule } from '../../classes/index.js';
|
|
2
|
+
import { CoreDefinition } from '../../protoUtils/core.js';
|
|
3
3
|
export declare class Core extends ConduitModule<typeof CoreDefinition> {
|
|
4
4
|
private readonly moduleName;
|
|
5
5
|
constructor(moduleName: string, url: string, grpcToken?: string);
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const ConduitModule_1 = require("../../classes/ConduitModule");
|
|
5
|
-
const core_1 = require("../../protoUtils/core");
|
|
6
|
-
class Core extends ConduitModule_1.ConduitModule {
|
|
1
|
+
import { ConduitModule } from '../../classes/index.js';
|
|
2
|
+
import { CoreDefinition } from '../../protoUtils/core.js';
|
|
3
|
+
export class Core extends ConduitModule {
|
|
7
4
|
constructor(moduleName, url, grpcToken) {
|
|
8
5
|
super(moduleName, 'core', url, grpcToken);
|
|
9
6
|
this.moduleName = moduleName;
|
|
10
|
-
this.initializeClient(
|
|
7
|
+
this.initializeClient(CoreDefinition);
|
|
11
8
|
}
|
|
12
9
|
}
|
|
13
|
-
exports.Core = Core;
|
|
14
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/core/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,MAAM,OAAO,IAAK,SAAQ,aAAoC;IAC5D,YACmB,UAAkB,EACnC,GAAW,EACX,SAAkB;QAElB,KAAK,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC;QAJzB,eAAU,GAAV,UAAU,CAAQ;QAKnC,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;IACxC,CAAC;CACF"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { ConduitModule } from '../../classes';
|
|
2
|
-
import { DatabaseProviderDefinition, DropCollectionResponse, Schema } from '../../protoUtils/database';
|
|
3
|
-
import { Indexable, RawQuery, UntypedArray } from '../../interfaces';
|
|
4
|
-
import { Query } from '../../types/db';
|
|
5
|
-
import { ConduitSchema } from '../../classes/ConduitSchema';
|
|
6
|
-
import { ConduitSchemaExtension } from '../../interfaces/ConduitSchemaExtension';
|
|
1
|
+
import { ConduitModule, ConduitSchema } from '../../classes/index.js';
|
|
2
|
+
import { DatabaseProviderDefinition, DropCollectionResponse, Schema } from '../../protoUtils/database.js';
|
|
3
|
+
import { ConduitSchemaExtension, Indexable, RawQuery, UntypedArray } from '../../interfaces/index.js';
|
|
4
|
+
import { Query } from '../../types/db.js';
|
|
7
5
|
export declare class DatabaseProvider extends ConduitModule<typeof DatabaseProviderDefinition> {
|
|
8
6
|
private readonly moduleName;
|
|
9
7
|
constructor(moduleName: string, url: string, grpcToken?: string);
|
|
@@ -42,10 +40,10 @@ export declare class DatabaseProvider extends ConduitModule<typeof DatabaseProvi
|
|
|
42
40
|
createView(schemaName: string, viewName: string, joinedSchemas: string[], query: {
|
|
43
41
|
mongoQuery?: Indexable;
|
|
44
42
|
sqlQuery?: string;
|
|
45
|
-
}): Promise<import("../../protoUtils/google/protobuf/empty").Empty>;
|
|
46
|
-
deleteView(viewName: string): Promise<import("../../protoUtils/google/protobuf/empty").Empty>;
|
|
43
|
+
}): Promise<import("../../protoUtils/google/protobuf/empty.js").Empty>;
|
|
44
|
+
deleteView(viewName: string): Promise<import("../../protoUtils/google/protobuf/empty.js").Empty>;
|
|
47
45
|
columnExistence(schemaName: string, columns: string[]): Promise<boolean>;
|
|
48
|
-
migrate(schemaName: string): Promise<import("../../protoUtils/google/protobuf/empty").Empty>;
|
|
49
|
-
getDatabaseType(): Promise<import("../../protoUtils/database").GetDatabaseTypeResponse>;
|
|
46
|
+
migrate(schemaName: string): Promise<import("../../protoUtils/google/protobuf/empty.js").Empty>;
|
|
47
|
+
getDatabaseType(): Promise<import("../../protoUtils/database.js").GetDatabaseTypeResponse>;
|
|
50
48
|
private constructSortObj;
|
|
51
49
|
}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const classes_1 = require("../../classes");
|
|
5
|
-
const database_1 = require("../../protoUtils/database");
|
|
6
|
-
class DatabaseProvider extends classes_1.ConduitModule {
|
|
1
|
+
import { ConduitModule } from '../../classes/index.js';
|
|
2
|
+
import { DatabaseProviderDefinition, } from '../../protoUtils/database.js';
|
|
3
|
+
export class DatabaseProvider extends ConduitModule {
|
|
7
4
|
constructor(moduleName, url, grpcToken) {
|
|
8
5
|
super(moduleName, 'database', url, grpcToken);
|
|
9
6
|
this.moduleName = moduleName;
|
|
10
|
-
this.initializeClient(
|
|
7
|
+
this.initializeClient(DatabaseProviderDefinition);
|
|
11
8
|
}
|
|
12
9
|
getSchema(schemaName) {
|
|
13
10
|
return this.client.getSchema({ schemaName: schemaName }).then(res => {
|
|
@@ -297,5 +294,4 @@ class DatabaseProvider extends classes_1.ConduitModule {
|
|
|
297
294
|
return sortObj;
|
|
298
295
|
}
|
|
299
296
|
}
|
|
300
|
-
exports.DatabaseProvider = DatabaseProvider;
|
|
301
297
|
//# sourceMappingURL=index.js.map
|