@conduitplatform/grpc-sdk 0.16.0-alpha.2 → 0.16.0-alpha.20
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/README.mdx +1 -7
- package/dist/classes/ConduitModule.d.ts +9 -6
- package/dist/classes/ConduitModule.js +85 -48
- package/dist/classes/ConduitModule.js.map +1 -1
- package/dist/classes/ConduitSchema.js.map +1 -1
- package/dist/classes/HealthCheck.js +36 -9
- package/dist/classes/HealthCheck.js.map +1 -1
- package/dist/classes/index.d.ts +2 -6
- package/dist/classes/index.js +2 -6
- package/dist/classes/index.js.map +1 -1
- package/dist/index.d.ts +34 -31
- package/dist/index.js +181 -176
- package/dist/index.js.map +1 -1
- package/dist/interceptors/grpcSignedToken.d.ts +1 -1
- package/dist/interceptors/grpcSignedToken.js +2 -2
- package/dist/interceptors/moduleName.d.ts +1 -1
- package/dist/interceptors/moduleName.js +2 -2
- package/dist/interfaces/ConduitMiddleware.js.map +1 -0
- package/dist/{routing/interfaces → interfaces}/ConduitRoute.d.ts +2 -3
- package/dist/interfaces/ConduitRoute.js.map +1 -0
- package/dist/{routing → interfaces}/ConduitRouteReturn.d.ts +3 -3
- package/dist/interfaces/ConduitRouteReturn.js.map +1 -0
- package/dist/interfaces/ConduitSchemaExtension.d.ts +1 -1
- package/dist/interfaces/GrpcCallback.d.ts +1 -1
- package/dist/{utilities/Logger.d.ts → interfaces/IConduitLogger.d.ts} +4 -7
- package/dist/interfaces/{ConduitService.js → IConduitLogger.js} +1 -1
- package/dist/interfaces/IConduitLogger.js.map +1 -0
- package/dist/{metrics/index.d.ts → interfaces/IConduitMetrics.d.ts} +5 -11
- package/dist/interfaces/IConduitMetrics.js +3 -0
- package/dist/interfaces/IConduitMetrics.js.map +1 -0
- package/dist/interfaces/Indexable.d.ts +7 -8
- package/dist/interfaces/Model.d.ts +66 -13
- package/dist/interfaces/Model.js.map +1 -1
- package/dist/interfaces/Params.d.ts +3 -3
- package/dist/interfaces/ProxyRoute.js.map +1 -0
- package/dist/interfaces/RawQuery.d.ts +2 -2
- package/dist/interfaces/Route.d.ts +64 -0
- package/dist/interfaces/Route.js +12 -0
- package/dist/interfaces/Route.js.map +1 -0
- package/dist/{routing/interfaces → interfaces}/Socket.d.ts +4 -5
- package/dist/interfaces/Socket.js.map +1 -0
- package/dist/interfaces/UntypedArray.d.ts +1 -1
- package/dist/interfaces/index.d.ts +9 -2
- package/dist/interfaces/index.js +9 -2
- package/dist/interfaces/index.js.map +1 -1
- package/dist/{routing/interfaces → interfaces}/types.d.ts +11 -9
- package/dist/{routing/interfaces → interfaces}/types.js.map +1 -1
- package/dist/module.proto +72 -0
- package/dist/modules/admin/index.d.ts +5 -5
- package/dist/modules/admin/index.js +12 -13
- package/dist/modules/admin/index.js.map +1 -1
- package/dist/modules/authentication/index.d.ts +5 -2
- package/dist/modules/authentication/index.js +14 -4
- package/dist/modules/authentication/index.js.map +1 -1
- package/dist/modules/authorization/index.d.ts +5 -2
- package/dist/modules/authorization/index.js +10 -4
- package/dist/modules/authorization/index.js.map +1 -1
- package/dist/modules/config/index.d.ts +5 -5
- package/dist/modules/config/index.js +38 -28
- package/dist/modules/config/index.js.map +1 -1
- package/dist/modules/database/index.d.ts +24 -14
- package/dist/modules/database/index.js +127 -28
- package/dist/modules/database/index.js.map +1 -1
- package/dist/modules/index.d.ts +0 -2
- package/dist/modules/index.js +0 -2
- package/dist/modules/index.js.map +1 -1
- package/dist/modules/router/index.d.ts +5 -5
- package/dist/modules/router/index.js +10 -11
- package/dist/modules/router/index.js.map +1 -1
- package/dist/modules/storage/index.d.ts +8 -4
- package/dist/modules/storage/index.js +55 -6
- package/dist/modules/storage/index.js.map +1 -1
- package/dist/protoUtils/authentication.d.ts +127 -46
- package/dist/protoUtils/authentication.js +301 -72
- package/dist/protoUtils/authentication.js.map +1 -1
- package/dist/protoUtils/authorization.d.ts +112 -82
- package/dist/protoUtils/authorization.js +285 -159
- package/dist/protoUtils/authorization.js.map +1 -1
- package/dist/protoUtils/chat.d.ts +7 -61
- package/dist/protoUtils/chat.js +3 -149
- package/dist/protoUtils/chat.js.map +1 -1
- package/dist/protoUtils/core.d.ts +85 -107
- package/dist/protoUtils/core.js +101 -203
- package/dist/protoUtils/core.js.map +1 -1
- package/dist/protoUtils/database.d.ts +195 -15
- package/dist/protoUtils/database.js +444 -33
- package/dist/protoUtils/database.js.map +1 -1
- package/dist/protoUtils/email.d.ts +3 -48
- package/dist/protoUtils/email.js +1 -110
- package/dist/protoUtils/email.js.map +1 -1
- package/dist/protoUtils/google/protobuf/empty.d.ts +27 -0
- package/dist/protoUtils/google/protobuf/empty.js +47 -0
- package/dist/protoUtils/google/protobuf/empty.js.map +1 -0
- package/dist/protoUtils/grpc_health_check.d.ts +3 -4
- package/dist/protoUtils/grpc_health_check.js +1 -2
- package/dist/protoUtils/grpc_health_check.js.map +1 -1
- package/dist/protoUtils/index.d.ts +12 -0
- package/dist/{routing/interfaces → protoUtils}/index.js +12 -6
- package/dist/protoUtils/index.js.map +1 -0
- package/dist/protoUtils/module.d.ts +251 -0
- package/dist/protoUtils/module.js +882 -0
- package/dist/protoUtils/module.js.map +1 -0
- package/dist/protoUtils/push-notifications.d.ts +7 -50
- package/dist/protoUtils/push-notifications.js +51 -120
- package/dist/protoUtils/push-notifications.js.map +1 -1
- package/dist/protoUtils/router.d.ts +45 -111
- package/dist/protoUtils/router.js +100 -310
- package/dist/protoUtils/router.js.map +1 -1
- package/dist/protoUtils/sms.d.ts +3 -48
- package/dist/protoUtils/sms.js +1 -110
- package/dist/protoUtils/sms.js.map +1 -1
- package/dist/protoUtils/storage.d.ts +144 -62
- package/dist/protoUtils/storage.js +594 -173
- package/dist/protoUtils/storage.js.map +1 -1
- package/dist/types/db.d.ts +11 -11
- package/dist/types/index.d.ts +3 -10
- package/dist/types/index.js +15 -0
- package/dist/types/index.js.map +1 -1
- package/dist/utilities/EventBus.d.ts +3 -1
- package/dist/utilities/EventBus.js +39 -1
- package/dist/utilities/EventBus.js.map +1 -1
- package/dist/utilities/RedisManager.js.map +1 -1
- package/dist/utilities/index.d.ts +3 -2
- package/dist/utilities/index.js +3 -2
- package/dist/utilities/index.js.map +1 -1
- package/package.json +24 -25
- package/dist/classes/ConduitActiveSchema.d.ts +0 -19
- package/dist/classes/ConduitActiveSchema.js +0 -57
- package/dist/classes/ConduitActiveSchema.js.map +0 -1
- package/dist/classes/ConduitServiceModule.d.ts +0 -26
- package/dist/classes/ConduitServiceModule.js +0 -166
- package/dist/classes/ConduitServiceModule.js.map +0 -1
- package/dist/classes/ConfigController.d.ts +0 -7
- package/dist/classes/ConfigController.js +0 -27
- package/dist/classes/ConfigController.js.map +0 -1
- package/dist/classes/GrpcServer.d.ts +0 -22
- package/dist/classes/GrpcServer.js +0 -207
- package/dist/classes/GrpcServer.js.map +0 -1
- package/dist/classes/ManagedModule.d.ts +0 -74
- package/dist/classes/ManagedModule.js +0 -333
- package/dist/classes/ManagedModule.js.map +0 -1
- package/dist/classes/ModuleManager.d.ts +0 -11
- package/dist/classes/ModuleManager.js +0 -204
- package/dist/classes/ModuleManager.js.map +0 -1
- package/dist/helpers/GrpcHelper.d.ts +0 -8
- package/dist/helpers/GrpcHelper.js +0 -43
- package/dist/helpers/GrpcHelper.js.map +0 -1
- package/dist/helpers/TypeHelpers.d.ts +0 -44
- package/dist/helpers/TypeHelpers.js +0 -144
- package/dist/helpers/TypeHelpers.js.map +0 -1
- package/dist/helpers/index.d.ts +0 -3
- package/dist/helpers/index.js +0 -20
- package/dist/helpers/index.js.map +0 -1
- package/dist/helpers/wrapGrpcFunctions.d.ts +0 -5
- package/dist/helpers/wrapGrpcFunctions.js +0 -56
- package/dist/helpers/wrapGrpcFunctions.js.map +0 -1
- package/dist/interfaces/ConduitService.d.ts +0 -8
- package/dist/interfaces/ConduitService.js.map +0 -1
- package/dist/metrics/MetricsServer.d.ts +0 -9
- package/dist/metrics/MetricsServer.js +0 -94
- package/dist/metrics/MetricsServer.js.map +0 -1
- package/dist/metrics/clientMiddleware.d.ts +0 -2
- package/dist/metrics/clientMiddleware.js +0 -265
- package/dist/metrics/clientMiddleware.js.map +0 -1
- package/dist/metrics/config/defaults.d.ts +0 -91
- package/dist/metrics/config/defaults.js +0 -93
- package/dist/metrics/config/defaults.js.map +0 -1
- package/dist/metrics/index.js +0 -152
- package/dist/metrics/index.js.map +0 -1
- package/dist/modules/forms/index.d.ts +0 -6
- package/dist/modules/forms/index.js +0 -32
- package/dist/modules/forms/index.js.map +0 -1
- package/dist/modules/functions/index.d.ts +0 -6
- package/dist/modules/functions/index.js +0 -32
- package/dist/modules/functions/index.js.map +0 -1
- package/dist/protoUtils/forms.d.ts +0 -58
- package/dist/protoUtils/forms.js +0 -127
- package/dist/protoUtils/forms.js.map +0 -1
- package/dist/protoUtils/functions.d.ts +0 -58
- package/dist/protoUtils/functions.js +0 -127
- package/dist/protoUtils/functions.js.map +0 -1
- package/dist/routing/ConduitRouteReturn.js.map +0 -1
- package/dist/routing/ProxyRouteBuilder.d.ts +0 -21
- package/dist/routing/ProxyRouteBuilder.js +0 -81
- package/dist/routing/ProxyRouteBuilder.js.map +0 -1
- package/dist/routing/RouteBuilder.d.ts +0 -24
- package/dist/routing/RouteBuilder.js +0 -107
- package/dist/routing/RouteBuilder.js.map +0 -1
- package/dist/routing/RoutingManager.d.ts +0 -33
- package/dist/routing/RoutingManager.js +0 -201
- package/dist/routing/RoutingManager.js.map +0 -1
- package/dist/routing/RoutingUtilities.d.ts +0 -7
- package/dist/routing/RoutingUtilities.js +0 -13
- package/dist/routing/RoutingUtilities.js.map +0 -1
- package/dist/routing/index.d.ts +0 -7
- package/dist/routing/index.js +0 -24
- package/dist/routing/index.js.map +0 -1
- package/dist/routing/interfaces/ConduitMiddleware.js.map +0 -1
- package/dist/routing/interfaces/ConduitRoute.js.map +0 -1
- package/dist/routing/interfaces/ProxyRoute.js.map +0 -1
- package/dist/routing/interfaces/Route.d.ts +0 -52
- package/dist/routing/interfaces/Route.js +0 -21
- package/dist/routing/interfaces/Route.js.map +0 -1
- package/dist/routing/interfaces/Socket.js.map +0 -1
- package/dist/routing/interfaces/index.d.ts +0 -6
- package/dist/routing/interfaces/index.js.map +0 -1
- package/dist/routing/wrapRouterFunctions.d.ts +0 -8
- package/dist/routing/wrapRouterFunctions.js +0 -132
- package/dist/routing/wrapRouterFunctions.js.map +0 -1
- package/dist/utilities/Logger.js +0 -255
- package/dist/utilities/Logger.js.map +0 -1
- package/dist/utilities/linearBackoffTimeout.d.ts +0 -10
- package/dist/utilities/linearBackoffTimeout.js +0 -119
- package/dist/utilities/linearBackoffTimeout.js.map +0 -1
- package/dist/utilities/merge.d.ts +0 -1
- package/dist/utilities/merge.js +0 -15
- package/dist/utilities/merge.js.map +0 -1
- /package/dist/{routing/interfaces → interfaces}/ConduitMiddleware.d.ts +0 -0
- /package/dist/{routing/interfaces → interfaces}/ConduitMiddleware.js +0 -0
- /package/dist/{routing/interfaces → interfaces}/ConduitRoute.js +0 -0
- /package/dist/{routing → interfaces}/ConduitRouteReturn.js +0 -0
- /package/dist/{routing/interfaces → interfaces}/ProxyRoute.d.ts +0 -0
- /package/dist/{routing/interfaces → interfaces}/ProxyRoute.js +0 -0
- /package/dist/{routing/interfaces → interfaces}/Socket.js +0 -0
- /package/dist/{routing/interfaces → interfaces}/types.js +0 -0
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { MetricType } from '../../types';
|
|
2
|
-
declare const _default: {
|
|
3
|
-
internalGrpcRequests: {
|
|
4
|
-
type: MetricType;
|
|
5
|
-
config: {
|
|
6
|
-
name: string;
|
|
7
|
-
help: string;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
clientGrpcRequests: {
|
|
11
|
-
type: MetricType;
|
|
12
|
-
config: {
|
|
13
|
-
name: string;
|
|
14
|
-
help: string;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
adminGrpcRequests: {
|
|
18
|
-
type: MetricType;
|
|
19
|
-
config: {
|
|
20
|
-
name: string;
|
|
21
|
-
help: string;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
clientGrpcErrors: {
|
|
25
|
-
type: MetricType;
|
|
26
|
-
config: {
|
|
27
|
-
name: string;
|
|
28
|
-
help: string;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
adminGrpcErrors: {
|
|
32
|
-
type: MetricType;
|
|
33
|
-
config: {
|
|
34
|
-
name: string;
|
|
35
|
-
help: string;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
moduleHealthState: {
|
|
39
|
-
type: MetricType;
|
|
40
|
-
config: {
|
|
41
|
-
name: string;
|
|
42
|
-
help: string;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
grpcRequestLatency: {
|
|
46
|
-
type: MetricType;
|
|
47
|
-
config: {
|
|
48
|
-
name: string;
|
|
49
|
-
help: string;
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
adminGrpcRequestLatency: {
|
|
53
|
-
type: MetricType;
|
|
54
|
-
config: {
|
|
55
|
-
name: string;
|
|
56
|
-
help: string;
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
clientGrpcRequestLatency: {
|
|
60
|
-
type: MetricType;
|
|
61
|
-
config: {
|
|
62
|
-
name: string;
|
|
63
|
-
help: string;
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
grpcResponseStatuses: {
|
|
67
|
-
type: MetricType;
|
|
68
|
-
config: {
|
|
69
|
-
name: string;
|
|
70
|
-
help: string;
|
|
71
|
-
labelNames: string[];
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
adminGrpcResponseStatuses: {
|
|
75
|
-
type: MetricType;
|
|
76
|
-
config: {
|
|
77
|
-
name: string;
|
|
78
|
-
help: string;
|
|
79
|
-
labelNames: string[];
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
clientGrpcResponseStatuses: {
|
|
83
|
-
type: MetricType;
|
|
84
|
-
config: {
|
|
85
|
-
name: string;
|
|
86
|
-
help: string;
|
|
87
|
-
labelNames: string[];
|
|
88
|
-
};
|
|
89
|
-
};
|
|
90
|
-
};
|
|
91
|
-
export default _default;
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var types_1 = require("../../types");
|
|
4
|
-
exports.default = {
|
|
5
|
-
internalGrpcRequests: {
|
|
6
|
-
type: types_1.MetricType.Counter,
|
|
7
|
-
config: {
|
|
8
|
-
name: 'internal_grpc_requests_total',
|
|
9
|
-
help: "Tracks the total number of Conduit's internal gRPC requests",
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
clientGrpcRequests: {
|
|
13
|
-
type: types_1.MetricType.Counter,
|
|
14
|
-
config: {
|
|
15
|
-
name: 'client_grpc_requests_total',
|
|
16
|
-
help: 'Tracks the total number of the client gRPC requests',
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
adminGrpcRequests: {
|
|
20
|
-
type: types_1.MetricType.Counter,
|
|
21
|
-
config: {
|
|
22
|
-
name: 'admin_grpc_requests_total',
|
|
23
|
-
help: 'Tracks the total number of the admin gRPC requests',
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
clientGrpcErrors: {
|
|
27
|
-
type: types_1.MetricType.Counter,
|
|
28
|
-
config: {
|
|
29
|
-
name: 'client_grpc_errors_total',
|
|
30
|
-
help: 'Tracks the total number of client grpc errors',
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
adminGrpcErrors: {
|
|
34
|
-
type: types_1.MetricType.Counter,
|
|
35
|
-
config: {
|
|
36
|
-
name: 'admin_grpc_errors_total',
|
|
37
|
-
help: 'Tracks the total number of admin grpc errors',
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
moduleHealthState: {
|
|
41
|
-
type: types_1.MetricType.Gauge,
|
|
42
|
-
config: {
|
|
43
|
-
name: 'module_health_state',
|
|
44
|
-
help: 'Tracks the health state of the module',
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
grpcRequestLatency: {
|
|
48
|
-
type: types_1.MetricType.Gauge,
|
|
49
|
-
config: {
|
|
50
|
-
name: 'grpc_request_latency_seconds',
|
|
51
|
-
help: 'Tracks the latency of grpc requests in seconds',
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
adminGrpcRequestLatency: {
|
|
55
|
-
type: types_1.MetricType.Gauge,
|
|
56
|
-
config: {
|
|
57
|
-
name: 'admin_grpc_request_latency_seconds',
|
|
58
|
-
help: 'Tracks the latency of admin grpc requests in seconds',
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
clientGrpcRequestLatency: {
|
|
62
|
-
type: types_1.MetricType.Gauge,
|
|
63
|
-
config: {
|
|
64
|
-
name: 'client_grpc_request_latency_seconds',
|
|
65
|
-
help: 'Tracks the latency of client grpc requests in seconds',
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
grpcResponseStatuses: {
|
|
69
|
-
type: types_1.MetricType.Counter,
|
|
70
|
-
config: {
|
|
71
|
-
name: 'grpc_response_statuses_total',
|
|
72
|
-
help: 'Tracks the total number of grpc response codes',
|
|
73
|
-
labelNames: ['success'],
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
adminGrpcResponseStatuses: {
|
|
77
|
-
type: types_1.MetricType.Counter,
|
|
78
|
-
config: {
|
|
79
|
-
name: 'admin_grpc_response_statuses_total',
|
|
80
|
-
help: 'Tracks the total number of admin grpc response codes',
|
|
81
|
-
labelNames: ['success'],
|
|
82
|
-
},
|
|
83
|
-
},
|
|
84
|
-
clientGrpcResponseStatuses: {
|
|
85
|
-
type: types_1.MetricType.Counter,
|
|
86
|
-
config: {
|
|
87
|
-
name: 'client_grpc_response_statuses_total',
|
|
88
|
-
help: 'Tracks the total number of client grpc response codes',
|
|
89
|
-
labelNames: ['success'],
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
};
|
|
93
|
-
//# sourceMappingURL=defaults.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../../src/metrics/config/defaults.ts"],"names":[],"mappings":";;AAAA,qCAAyC;AAEzC,kBAAe;IACb,oBAAoB,EAAE;QACpB,IAAI,EAAE,kBAAU,CAAC,OAAO;QACxB,MAAM,EAAE;YACN,IAAI,EAAE,8BAA8B;YACpC,IAAI,EAAE,6DAA6D;SACpE;KACF;IACD,kBAAkB,EAAE;QAClB,IAAI,EAAE,kBAAU,CAAC,OAAO;QACxB,MAAM,EAAE;YACN,IAAI,EAAE,4BAA4B;YAClC,IAAI,EAAE,qDAAqD;SAC5D;KACF;IACD,iBAAiB,EAAE;QACjB,IAAI,EAAE,kBAAU,CAAC,OAAO;QACxB,MAAM,EAAE;YACN,IAAI,EAAE,2BAA2B;YACjC,IAAI,EAAE,oDAAoD;SAC3D;KACF;IACD,gBAAgB,EAAE;QAChB,IAAI,EAAE,kBAAU,CAAC,OAAO;QACxB,MAAM,EAAE;YACN,IAAI,EAAE,0BAA0B;YAChC,IAAI,EAAE,+CAA+C;SACtD;KACF;IACD,eAAe,EAAE;QACf,IAAI,EAAE,kBAAU,CAAC,OAAO;QACxB,MAAM,EAAE;YACN,IAAI,EAAE,yBAAyB;YAC/B,IAAI,EAAE,8CAA8C;SACrD;KACF;IACD,iBAAiB,EAAE;QACjB,IAAI,EAAE,kBAAU,CAAC,KAAK;QACtB,MAAM,EAAE;YACN,IAAI,EAAE,qBAAqB;YAC3B,IAAI,EAAE,uCAAuC;SAC9C;KACF;IACD,kBAAkB,EAAE;QAClB,IAAI,EAAE,kBAAU,CAAC,KAAK;QACtB,MAAM,EAAE;YACN,IAAI,EAAE,8BAA8B;YACpC,IAAI,EAAE,gDAAgD;SACvD;KACF;IACD,uBAAuB,EAAE;QACvB,IAAI,EAAE,kBAAU,CAAC,KAAK;QACtB,MAAM,EAAE;YACN,IAAI,EAAE,oCAAoC;YAC1C,IAAI,EAAE,sDAAsD;SAC7D;KACF;IACD,wBAAwB,EAAE;QACxB,IAAI,EAAE,kBAAU,CAAC,KAAK;QACtB,MAAM,EAAE;YACN,IAAI,EAAE,qCAAqC;YAC3C,IAAI,EAAE,uDAAuD;SAC9D;KACF;IACD,oBAAoB,EAAE;QACpB,IAAI,EAAE,kBAAU,CAAC,OAAO;QACxB,MAAM,EAAE;YACN,IAAI,EAAE,8BAA8B;YACpC,IAAI,EAAE,gDAAgD;YACtD,UAAU,EAAE,CAAC,SAAS,CAAC;SACxB;KACF;IACD,yBAAyB,EAAE;QACzB,IAAI,EAAE,kBAAU,CAAC,OAAO;QACxB,MAAM,EAAE;YACN,IAAI,EAAE,oCAAoC;YAC1C,IAAI,EAAE,sDAAsD;YAC5D,UAAU,EAAE,CAAC,SAAS,CAAC;SACxB;KACF;IACD,0BAA0B,EAAE;QAC1B,IAAI,EAAE,kBAAU,CAAC,OAAO;QACxB,MAAM,EAAE;YACN,IAAI,EAAE,qCAAqC;YAC3C,IAAI,EAAE,wDAAwD;YAC9D,UAAU,EAAE,CAAC,SAAS,CAAC;SACxB;KACF;CACF,CAAC"}
|
package/dist/metrics/index.js
DELETED
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __values = (this && this.__values) || function(o) {
|
|
14
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
15
|
-
if (m) return m.call(o);
|
|
16
|
-
if (o && typeof o.length === "number") return {
|
|
17
|
-
next: function () {
|
|
18
|
-
if (o && i >= o.length) o = void 0;
|
|
19
|
-
return { value: o && o[i++], done: !o };
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
23
|
-
};
|
|
24
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
-
};
|
|
27
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.ConduitMetrics = void 0;
|
|
29
|
-
var prom_client_1 = require("prom-client");
|
|
30
|
-
var MetricsServer_1 = require("./MetricsServer");
|
|
31
|
-
var defaults_1 = __importDefault(require("./config/defaults"));
|
|
32
|
-
var types_1 = require("../types");
|
|
33
|
-
var ConduitMetrics = /** @class */ (function () {
|
|
34
|
-
function ConduitMetrics(moduleName, instance) {
|
|
35
|
-
this.moduleName = moduleName;
|
|
36
|
-
this.instance = instance;
|
|
37
|
-
this._registry = new prom_client_1.Registry();
|
|
38
|
-
this._registry.setDefaultLabels({
|
|
39
|
-
module_name: this.moduleName,
|
|
40
|
-
module_instance: this.instance,
|
|
41
|
-
});
|
|
42
|
-
this.collectDefaultMetrics();
|
|
43
|
-
this._httpServer = new MetricsServer_1.MetricsServer(moduleName, instance, this._registry);
|
|
44
|
-
this._httpServer.initialize();
|
|
45
|
-
}
|
|
46
|
-
ConduitMetrics.prototype.initializeDefaultMetrics = function () {
|
|
47
|
-
var e_1, _a;
|
|
48
|
-
try {
|
|
49
|
-
for (var _b = __values(Object.values(defaults_1.default)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
50
|
-
var metric = _c.value;
|
|
51
|
-
this.registerMetric(metric.type, metric.config);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
55
|
-
finally {
|
|
56
|
-
try {
|
|
57
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
58
|
-
}
|
|
59
|
-
finally { if (e_1) throw e_1.error; }
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
ConduitMetrics.prototype.registerMetric = function (type, config) {
|
|
63
|
-
if (this.getMetric(config.name))
|
|
64
|
-
return;
|
|
65
|
-
var metricConfig = JSON.parse(JSON.stringify(config));
|
|
66
|
-
metricConfig.name = this.addPrefix(config.name);
|
|
67
|
-
switch (type) {
|
|
68
|
-
case types_1.MetricType.Counter:
|
|
69
|
-
this.createCounter(metricConfig);
|
|
70
|
-
break;
|
|
71
|
-
case types_1.MetricType.Gauge:
|
|
72
|
-
this.createGauge(metricConfig);
|
|
73
|
-
break;
|
|
74
|
-
case types_1.MetricType.Histogram:
|
|
75
|
-
this.createHistogram(metricConfig);
|
|
76
|
-
break;
|
|
77
|
-
case types_1.MetricType.Summary:
|
|
78
|
-
this.createSummary(metricConfig);
|
|
79
|
-
break;
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
ConduitMetrics.prototype.collectDefaultMetrics = function () {
|
|
83
|
-
(0, prom_client_1.collectDefaultMetrics)({
|
|
84
|
-
register: this._registry,
|
|
85
|
-
prefix: 'conduit_',
|
|
86
|
-
// probably not needed
|
|
87
|
-
labels: {
|
|
88
|
-
module_name: this.moduleName,
|
|
89
|
-
instance_instance: this.instance,
|
|
90
|
-
},
|
|
91
|
-
});
|
|
92
|
-
};
|
|
93
|
-
ConduitMetrics.prototype.createCounter = function (config) {
|
|
94
|
-
return new prom_client_1.Counter(__assign(__assign({}, config), { registers: [this._registry] }));
|
|
95
|
-
};
|
|
96
|
-
ConduitMetrics.prototype.createSummary = function (config) {
|
|
97
|
-
return new prom_client_1.Summary(__assign(__assign({}, config), { registers: [this._registry] }));
|
|
98
|
-
};
|
|
99
|
-
ConduitMetrics.prototype.createHistogram = function (config) {
|
|
100
|
-
return new prom_client_1.Histogram(__assign(__assign({}, config), { registers: [this._registry] }));
|
|
101
|
-
};
|
|
102
|
-
ConduitMetrics.prototype.createGauge = function (config) {
|
|
103
|
-
return new prom_client_1.Gauge(__assign(__assign({}, config), { registers: [this._registry] }));
|
|
104
|
-
};
|
|
105
|
-
ConduitMetrics.prototype.getMetric = function (name) {
|
|
106
|
-
return this._registry.getSingleMetric(this.addPrefix(name));
|
|
107
|
-
};
|
|
108
|
-
ConduitMetrics.prototype.increment = function (metric, increment, labels) {
|
|
109
|
-
if (increment === void 0) { increment = 1; }
|
|
110
|
-
var metricInstance = this._registry.getSingleMetric(this.addPrefix(metric));
|
|
111
|
-
if (!(metricInstance instanceof prom_client_1.Counter) && !(metricInstance instanceof prom_client_1.Gauge)) {
|
|
112
|
-
throw new Error("Metric ".concat(metric, " is not an incrementable metric"));
|
|
113
|
-
}
|
|
114
|
-
return labels
|
|
115
|
-
? metricInstance.labels(__assign({}, labels)).inc(increment)
|
|
116
|
-
: metricInstance.inc(increment);
|
|
117
|
-
};
|
|
118
|
-
ConduitMetrics.prototype.decrement = function (metric, decrement, labels) {
|
|
119
|
-
if (decrement === void 0) { decrement = 1; }
|
|
120
|
-
var metricInstance = this._registry.getSingleMetric(this.addPrefix(metric));
|
|
121
|
-
if (!(metricInstance instanceof prom_client_1.Gauge)) {
|
|
122
|
-
throw new Error("Metric ".concat(metric, " is not a decrementable metric"));
|
|
123
|
-
}
|
|
124
|
-
return labels
|
|
125
|
-
? metricInstance.labels(__assign({}, labels)).dec(decrement)
|
|
126
|
-
: metricInstance.dec(decrement);
|
|
127
|
-
};
|
|
128
|
-
ConduitMetrics.prototype.set = function (metric, value, labels) {
|
|
129
|
-
var metricInstance = this._registry.getSingleMetric(this.addPrefix(metric));
|
|
130
|
-
if (!(metricInstance instanceof prom_client_1.Gauge)) {
|
|
131
|
-
throw new Error("Metric ".concat(metric, " is not a Gauge"));
|
|
132
|
-
}
|
|
133
|
-
return labels
|
|
134
|
-
? metricInstance.labels(__assign({}, labels)).set(value)
|
|
135
|
-
: metricInstance.set(value);
|
|
136
|
-
};
|
|
137
|
-
ConduitMetrics.prototype.observe = function (metric, value, labels) {
|
|
138
|
-
var metricInstance = this._registry.getSingleMetric(this.addPrefix(metric));
|
|
139
|
-
if (!(metricInstance instanceof prom_client_1.Histogram) && !(metricInstance instanceof prom_client_1.Summary)) {
|
|
140
|
-
throw new Error("Metric ".concat(metric, " is not a Histogram"));
|
|
141
|
-
}
|
|
142
|
-
return labels
|
|
143
|
-
? metricInstance.labels(__assign({}, labels)).observe(value)
|
|
144
|
-
: metricInstance.observe(value);
|
|
145
|
-
};
|
|
146
|
-
ConduitMetrics.prototype.addPrefix = function (metric) {
|
|
147
|
-
return "conduit_".concat(metric);
|
|
148
|
-
};
|
|
149
|
-
return ConduitMetrics;
|
|
150
|
-
}());
|
|
151
|
-
exports.ConduitMetrics = ConduitMetrics;
|
|
152
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/metrics/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAYqB;AACrB,iDAAgD;AAChD,+DAA+C;AAC/C,kCAA2D;AAE3D;IAME,wBAAY,UAAkB,EAAE,QAAgB;QAC9C,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,SAAS,GAAG,IAAI,sBAAQ,EAAE,CAAC;QAChC,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC;YAC9B,WAAW,EAAE,IAAI,CAAC,UAAU;YAC5B,eAAe,EAAE,IAAI,CAAC,QAAQ;SAC/B,CAAC,CAAC;QACH,IAAI,CAAC,qBAAqB,EAAE,CAAC;QAC7B,IAAI,CAAC,WAAW,GAAG,IAAI,6BAAa,CAAC,UAAU,EAAE,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;QAC3E,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC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AAE;YAClF,MAAM,IAAI,KAAK,CAAC,iBAAU,MAAM,wBAAqB,CAAC,CAAC;SACxD;QACD,OAAO,MAAM;YACX,CAAC,CAAC,cAAc,CAAC,MAAM,cAAM,MAAM,EAAG,CAAC,OAAO,CAAC,KAAK,CAAC;YACrD,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;IAEO,kCAAS,GAAjB,UAAkB,MAAc;QAC9B,OAAO,kBAAW,MAAM,CAAE,CAAC;IAC7B,CAAC;IACH,qBAAC;AAAD,CAAC,AAxHD,IAwHC;AAxHY,wCAAc"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ConduitModule } from '../../classes/ConduitModule';
|
|
2
|
-
import { FormsDefinition } from '../../protoUtils/forms';
|
|
3
|
-
export declare class Forms extends ConduitModule<typeof FormsDefinition> {
|
|
4
|
-
private readonly moduleName;
|
|
5
|
-
constructor(moduleName: string, url: string, grpcToken?: string);
|
|
6
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.Forms = void 0;
|
|
19
|
-
var ConduitModule_1 = require("../../classes/ConduitModule");
|
|
20
|
-
var forms_1 = require("../../protoUtils/forms");
|
|
21
|
-
var Forms = /** @class */ (function (_super) {
|
|
22
|
-
__extends(Forms, _super);
|
|
23
|
-
function Forms(moduleName, url, grpcToken) {
|
|
24
|
-
var _this = _super.call(this, moduleName, 'forms', url, grpcToken) || this;
|
|
25
|
-
_this.moduleName = moduleName;
|
|
26
|
-
_this.initializeClient(forms_1.FormsDefinition);
|
|
27
|
-
return _this;
|
|
28
|
-
}
|
|
29
|
-
return Forms;
|
|
30
|
-
}(ConduitModule_1.ConduitModule));
|
|
31
|
-
exports.Forms = Forms;
|
|
32
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/forms/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,6DAA4D;AAC5D,gDAAyD;AAEzD;IAA2B,yBAAqC;IAC9D,eAA6B,UAAkB,EAAE,GAAW,EAAE,SAAkB;QAAhF,YACE,kBAAM,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,CAAC,SAE3C;QAH4B,gBAAU,GAAV,UAAU,CAAQ;QAE7C,KAAI,CAAC,gBAAgB,CAAC,uBAAe,CAAC,CAAC;;IACzC,CAAC;IACH,YAAC;AAAD,CAAC,AALD,CAA2B,6BAAa,GAKvC;AALY,sBAAK"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { ConduitModule } from '../../classes/ConduitModule';
|
|
2
|
-
import { FunctionsDefinition } from '../../protoUtils/functions';
|
|
3
|
-
export declare class Functions extends ConduitModule<typeof FunctionsDefinition> {
|
|
4
|
-
private readonly moduleName;
|
|
5
|
-
constructor(moduleName: string, url: string, grpcToken?: string);
|
|
6
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.Functions = void 0;
|
|
19
|
-
var ConduitModule_1 = require("../../classes/ConduitModule");
|
|
20
|
-
var functions_1 = require("../../protoUtils/functions");
|
|
21
|
-
var Functions = /** @class */ (function (_super) {
|
|
22
|
-
__extends(Functions, _super);
|
|
23
|
-
function Functions(moduleName, url, grpcToken) {
|
|
24
|
-
var _this = _super.call(this, moduleName, 'functions', url, grpcToken) || this;
|
|
25
|
-
_this.moduleName = moduleName;
|
|
26
|
-
_this.initializeClient(functions_1.FunctionsDefinition);
|
|
27
|
-
return _this;
|
|
28
|
-
}
|
|
29
|
-
return Functions;
|
|
30
|
-
}(ConduitModule_1.ConduitModule));
|
|
31
|
-
exports.Functions = Functions;
|
|
32
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/functions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,6DAA4D;AAC5D,wDAAiE;AAEjE;IAA+B,6BAAyC;IACtE,mBAA6B,UAAkB,EAAE,GAAW,EAAE,SAAkB;QAAhF,YACE,kBAAM,UAAU,EAAE,WAAW,EAAE,GAAG,EAAE,SAAS,CAAC,SAE/C;QAH4B,gBAAU,GAAV,UAAU,CAAQ;QAE7C,KAAI,CAAC,gBAAgB,CAAC,+BAAmB,CAAC,CAAC;;IAC7C,CAAC;IACH,gBAAC;AAAD,CAAC,AALD,CAA+B,6BAAa,GAK3C;AALY,8BAAS"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import _m0 from "protobufjs/minimal";
|
|
2
|
-
export declare const protobufPackage = "forms";
|
|
3
|
-
export interface SetConfigRequest {
|
|
4
|
-
newConfig: string;
|
|
5
|
-
}
|
|
6
|
-
export interface SetConfigResponse {
|
|
7
|
-
updatedConfig: string;
|
|
8
|
-
}
|
|
9
|
-
export declare const SetConfigRequest: {
|
|
10
|
-
encode(message: SetConfigRequest, writer?: _m0.Writer): _m0.Writer;
|
|
11
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): SetConfigRequest;
|
|
12
|
-
fromJSON(object: any): SetConfigRequest;
|
|
13
|
-
toJSON(message: SetConfigRequest): unknown;
|
|
14
|
-
create(base?: DeepPartial<SetConfigRequest>): SetConfigRequest;
|
|
15
|
-
fromPartial(object: DeepPartial<SetConfigRequest>): SetConfigRequest;
|
|
16
|
-
};
|
|
17
|
-
export declare const SetConfigResponse: {
|
|
18
|
-
encode(message: SetConfigResponse, writer?: _m0.Writer): _m0.Writer;
|
|
19
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): SetConfigResponse;
|
|
20
|
-
fromJSON(object: any): SetConfigResponse;
|
|
21
|
-
toJSON(message: SetConfigResponse): unknown;
|
|
22
|
-
create(base?: DeepPartial<SetConfigResponse>): SetConfigResponse;
|
|
23
|
-
fromPartial(object: DeepPartial<SetConfigResponse>): SetConfigResponse;
|
|
24
|
-
};
|
|
25
|
-
export declare type FormsDefinition = typeof FormsDefinition;
|
|
26
|
-
export declare const FormsDefinition: {
|
|
27
|
-
readonly name: "Forms";
|
|
28
|
-
readonly fullName: "forms.Forms";
|
|
29
|
-
readonly methods: {
|
|
30
|
-
readonly setConfig: {
|
|
31
|
-
readonly name: "SetConfig";
|
|
32
|
-
readonly requestType: {
|
|
33
|
-
encode(message: SetConfigRequest, writer?: _m0.Writer): _m0.Writer;
|
|
34
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): SetConfigRequest;
|
|
35
|
-
fromJSON(object: any): SetConfigRequest;
|
|
36
|
-
toJSON(message: SetConfigRequest): unknown;
|
|
37
|
-
create(base?: DeepPartial<SetConfigRequest>): SetConfigRequest;
|
|
38
|
-
fromPartial(object: DeepPartial<SetConfigRequest>): SetConfigRequest;
|
|
39
|
-
};
|
|
40
|
-
readonly requestStream: false;
|
|
41
|
-
readonly responseType: {
|
|
42
|
-
encode(message: SetConfigResponse, writer?: _m0.Writer): _m0.Writer;
|
|
43
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): SetConfigResponse;
|
|
44
|
-
fromJSON(object: any): SetConfigResponse;
|
|
45
|
-
toJSON(message: SetConfigResponse): unknown;
|
|
46
|
-
create(base?: DeepPartial<SetConfigResponse>): SetConfigResponse;
|
|
47
|
-
fromPartial(object: DeepPartial<SetConfigResponse>): SetConfigResponse;
|
|
48
|
-
};
|
|
49
|
-
readonly responseStream: false;
|
|
50
|
-
readonly options: {};
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
55
|
-
export declare type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
56
|
-
[K in keyof T]?: DeepPartial<T[K]>;
|
|
57
|
-
} : Partial<T>;
|
|
58
|
-
export {};
|
package/dist/protoUtils/forms.js
DELETED
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.FormsDefinition = exports.SetConfigResponse = exports.SetConfigRequest = exports.protobufPackage = void 0;
|
|
7
|
-
/* eslint-disable */
|
|
8
|
-
var minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
9
|
-
exports.protobufPackage = "forms";
|
|
10
|
-
function createBaseSetConfigRequest() {
|
|
11
|
-
return { newConfig: "" };
|
|
12
|
-
}
|
|
13
|
-
exports.SetConfigRequest = {
|
|
14
|
-
encode: function (message, writer) {
|
|
15
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
16
|
-
if (message.newConfig !== "") {
|
|
17
|
-
writer.uint32(10).string(message.newConfig);
|
|
18
|
-
}
|
|
19
|
-
return writer;
|
|
20
|
-
},
|
|
21
|
-
decode: function (input, length) {
|
|
22
|
-
var reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
23
|
-
var end = length === undefined ? reader.len : reader.pos + length;
|
|
24
|
-
var message = createBaseSetConfigRequest();
|
|
25
|
-
while (reader.pos < end) {
|
|
26
|
-
var tag = reader.uint32();
|
|
27
|
-
switch (tag >>> 3) {
|
|
28
|
-
case 1:
|
|
29
|
-
if (tag != 10) {
|
|
30
|
-
break;
|
|
31
|
-
}
|
|
32
|
-
message.newConfig = reader.string();
|
|
33
|
-
continue;
|
|
34
|
-
}
|
|
35
|
-
if ((tag & 7) == 4 || tag == 0) {
|
|
36
|
-
break;
|
|
37
|
-
}
|
|
38
|
-
reader.skipType(tag & 7);
|
|
39
|
-
}
|
|
40
|
-
return message;
|
|
41
|
-
},
|
|
42
|
-
fromJSON: function (object) {
|
|
43
|
-
return { newConfig: isSet(object.newConfig) ? String(object.newConfig) : "" };
|
|
44
|
-
},
|
|
45
|
-
toJSON: function (message) {
|
|
46
|
-
var obj = {};
|
|
47
|
-
message.newConfig !== undefined && (obj.newConfig = message.newConfig);
|
|
48
|
-
return obj;
|
|
49
|
-
},
|
|
50
|
-
create: function (base) {
|
|
51
|
-
return exports.SetConfigRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
52
|
-
},
|
|
53
|
-
fromPartial: function (object) {
|
|
54
|
-
var _a;
|
|
55
|
-
var message = createBaseSetConfigRequest();
|
|
56
|
-
message.newConfig = (_a = object.newConfig) !== null && _a !== void 0 ? _a : "";
|
|
57
|
-
return message;
|
|
58
|
-
},
|
|
59
|
-
};
|
|
60
|
-
function createBaseSetConfigResponse() {
|
|
61
|
-
return { updatedConfig: "" };
|
|
62
|
-
}
|
|
63
|
-
exports.SetConfigResponse = {
|
|
64
|
-
encode: function (message, writer) {
|
|
65
|
-
if (writer === void 0) { writer = minimal_1.default.Writer.create(); }
|
|
66
|
-
if (message.updatedConfig !== "") {
|
|
67
|
-
writer.uint32(10).string(message.updatedConfig);
|
|
68
|
-
}
|
|
69
|
-
return writer;
|
|
70
|
-
},
|
|
71
|
-
decode: function (input, length) {
|
|
72
|
-
var reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
73
|
-
var end = length === undefined ? reader.len : reader.pos + length;
|
|
74
|
-
var message = createBaseSetConfigResponse();
|
|
75
|
-
while (reader.pos < end) {
|
|
76
|
-
var tag = reader.uint32();
|
|
77
|
-
switch (tag >>> 3) {
|
|
78
|
-
case 1:
|
|
79
|
-
if (tag != 10) {
|
|
80
|
-
break;
|
|
81
|
-
}
|
|
82
|
-
message.updatedConfig = reader.string();
|
|
83
|
-
continue;
|
|
84
|
-
}
|
|
85
|
-
if ((tag & 7) == 4 || tag == 0) {
|
|
86
|
-
break;
|
|
87
|
-
}
|
|
88
|
-
reader.skipType(tag & 7);
|
|
89
|
-
}
|
|
90
|
-
return message;
|
|
91
|
-
},
|
|
92
|
-
fromJSON: function (object) {
|
|
93
|
-
return { updatedConfig: isSet(object.updatedConfig) ? String(object.updatedConfig) : "" };
|
|
94
|
-
},
|
|
95
|
-
toJSON: function (message) {
|
|
96
|
-
var obj = {};
|
|
97
|
-
message.updatedConfig !== undefined && (obj.updatedConfig = message.updatedConfig);
|
|
98
|
-
return obj;
|
|
99
|
-
},
|
|
100
|
-
create: function (base) {
|
|
101
|
-
return exports.SetConfigResponse.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
102
|
-
},
|
|
103
|
-
fromPartial: function (object) {
|
|
104
|
-
var _a;
|
|
105
|
-
var message = createBaseSetConfigResponse();
|
|
106
|
-
message.updatedConfig = (_a = object.updatedConfig) !== null && _a !== void 0 ? _a : "";
|
|
107
|
-
return message;
|
|
108
|
-
},
|
|
109
|
-
};
|
|
110
|
-
exports.FormsDefinition = {
|
|
111
|
-
name: "Forms",
|
|
112
|
-
fullName: "forms.Forms",
|
|
113
|
-
methods: {
|
|
114
|
-
setConfig: {
|
|
115
|
-
name: "SetConfig",
|
|
116
|
-
requestType: exports.SetConfigRequest,
|
|
117
|
-
requestStream: false,
|
|
118
|
-
responseType: exports.SetConfigResponse,
|
|
119
|
-
responseStream: false,
|
|
120
|
-
options: {},
|
|
121
|
-
},
|
|
122
|
-
},
|
|
123
|
-
};
|
|
124
|
-
function isSet(value) {
|
|
125
|
-
return value !== null && value !== undefined;
|
|
126
|
-
}
|
|
127
|
-
//# sourceMappingURL=forms.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"forms.js","sourceRoot":"","sources":["../../src/protoUtils/forms.ts"],"names":[],"mappings":";;;;;;AAAA,oBAAoB;AACpB,+DAAqC;AAExB,QAAA,eAAe,GAAG,OAAO,CAAC;AAUvC,SAAS,0BAA0B;IACjC,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;AAC3B,CAAC;AAEY,QAAA,gBAAgB,GAAG;IAC9B,MAAM,EAAN,UAAO,OAAyB,EAAE,MAAwC;QAAxC,uBAAA,EAAA,SAAqB,iBAAG,CAAC,MAAM,CAAC,MAAM,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