@rsdk/builtin-contract 1.0.3 → 1.0.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/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 1.0.4 (2023-05-10)
7
+
8
+ **Note:** Version bump only for package @rsdk/builtin-contract
9
+
6
10
  ## 1.0.3 (2023-05-10)
7
11
 
8
12
  ### Bug Fixes
@@ -0,0 +1,265 @@
1
+ /// <reference types="node" />
2
+ import { CallOptions, ChannelCredentials, Client, ClientOptions, ClientReadableStream, ClientUnaryCall, handleServerStreamingCall, handleUnaryCall, Metadata, ServiceError, UntypedServiceImplementation } from "@grpc/grpc-js";
3
+ import _m0 from "protobufjs/minimal";
4
+ export declare const protobufPackage = "grpc.health.v1";
5
+ /** HealthCheckRequest */
6
+ export interface HealthCheckRequest {
7
+ /** service */
8
+ readonly service: string;
9
+ }
10
+ /** HealthCheckResponse */
11
+ export interface HealthCheckResponse {
12
+ /** status */
13
+ readonly status: HealthCheckResponseServingStatus;
14
+ }
15
+ /** ServingStatus */
16
+ export declare enum HealthCheckResponseServingStatus {
17
+ /**
18
+ * UNKNOWN - UNKNOWN
19
+ * buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX
20
+ * buf:lint:ignore ENUM_VALUE_PREFIX
21
+ */
22
+ UNKNOWN = "UNKNOWN",
23
+ /**
24
+ * SERVING - SERVING
25
+ * buf:lint:ignore ENUM_VALUE_PREFIX
26
+ */
27
+ SERVING = "SERVING",
28
+ /**
29
+ * NOT_SERVING - NOT_SERVING
30
+ * buf:lint:ignore ENUM_VALUE_PREFIX
31
+ */
32
+ NOT_SERVING = "NOT_SERVING",
33
+ /**
34
+ * SERVICE_UNKNOWN - SERVICE_UNKNOWN — Used only by the Watch method.
35
+ * buf:lint:ignore ENUM_VALUE_PREFIX
36
+ */
37
+ SERVICE_UNKNOWN = "SERVICE_UNKNOWN"
38
+ }
39
+ export declare function healthCheckResponseServingStatusFromJSON(object: any): HealthCheckResponseServingStatus;
40
+ export declare function healthCheckResponseServingStatusToJSON(object: HealthCheckResponseServingStatus): string;
41
+ export declare function healthCheckResponseServingStatusToNumber(object: HealthCheckResponseServingStatus): number;
42
+ export declare const HealthCheckRequest: {
43
+ encode(message: HealthCheckRequest, writer?: _m0.Writer): _m0.Writer;
44
+ decode(input: _m0.Reader | Uint8Array, length?: number): HealthCheckRequest;
45
+ fromJSON(object: any): HealthCheckRequest;
46
+ toJSON(message: HealthCheckRequest): unknown;
47
+ create<I extends {
48
+ readonly service?: string;
49
+ } & {
50
+ readonly service?: string;
51
+ } & { [K in Exclude<keyof I, "service">]: never; }>(base?: I | undefined): HealthCheckRequest;
52
+ fromPartial<I_1 extends {
53
+ readonly service?: string;
54
+ } & {
55
+ readonly service?: string;
56
+ } & { [K_1 in Exclude<keyof I_1, "service">]: never; }>(object: I_1): HealthCheckRequest;
57
+ };
58
+ export declare const HealthCheckResponse: {
59
+ encode(message: HealthCheckResponse, writer?: _m0.Writer): _m0.Writer;
60
+ decode(input: _m0.Reader | Uint8Array, length?: number): HealthCheckResponse;
61
+ fromJSON(object: any): HealthCheckResponse;
62
+ toJSON(message: HealthCheckResponse): unknown;
63
+ create<I extends {
64
+ readonly status?: HealthCheckResponseServingStatus;
65
+ } & {
66
+ readonly status?: HealthCheckResponseServingStatus;
67
+ } & { [K in Exclude<keyof I, "status">]: never; }>(base?: I | undefined): HealthCheckResponse;
68
+ fromPartial<I_1 extends {
69
+ readonly status?: HealthCheckResponseServingStatus;
70
+ } & {
71
+ readonly status?: HealthCheckResponseServingStatus;
72
+ } & { [K_1 in Exclude<keyof I_1, "status">]: never; }>(object: I_1): HealthCheckResponse;
73
+ };
74
+ /**
75
+ * buf:lint:ignore SERVICE_SUFFIX
76
+ * Health
77
+ */
78
+ export type HealthDefinition = typeof HealthDefinition;
79
+ export declare const HealthDefinition: {
80
+ readonly name: "Health";
81
+ readonly fullName: "grpc.health.v1.Health";
82
+ readonly methods: {
83
+ /**
84
+ * Check
85
+ * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
86
+ * buf:lint:ignore RPC_REQUEST_STANDARD_NAME
87
+ * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
88
+ */
89
+ readonly check: {
90
+ readonly name: "Check";
91
+ readonly requestType: {
92
+ encode(message: HealthCheckRequest, writer?: _m0.Writer): _m0.Writer;
93
+ decode(input: _m0.Reader | Uint8Array, length?: number): HealthCheckRequest;
94
+ fromJSON(object: any): HealthCheckRequest;
95
+ toJSON(message: HealthCheckRequest): unknown;
96
+ create<I extends {
97
+ readonly service?: string;
98
+ } & {
99
+ readonly service?: string;
100
+ } & { [K in Exclude<keyof I, "service">]: never; }>(base?: I | undefined): HealthCheckRequest;
101
+ fromPartial<I_1 extends {
102
+ readonly service?: string;
103
+ } & {
104
+ readonly service?: string;
105
+ } & { [K_1 in Exclude<keyof I_1, "service">]: never; }>(object: I_1): HealthCheckRequest;
106
+ };
107
+ readonly requestStream: false;
108
+ readonly responseType: {
109
+ encode(message: HealthCheckResponse, writer?: _m0.Writer): _m0.Writer;
110
+ decode(input: _m0.Reader | Uint8Array, length?: number): HealthCheckResponse;
111
+ fromJSON(object: any): HealthCheckResponse;
112
+ toJSON(message: HealthCheckResponse): unknown;
113
+ create<I_2 extends {
114
+ readonly status?: HealthCheckResponseServingStatus;
115
+ } & {
116
+ readonly status?: HealthCheckResponseServingStatus;
117
+ } & { [K in Exclude<keyof I, "status">]: never; }>(base?: I_2 | undefined): HealthCheckResponse;
118
+ fromPartial<I_3 extends {
119
+ readonly status?: HealthCheckResponseServingStatus;
120
+ } & {
121
+ readonly status?: HealthCheckResponseServingStatus;
122
+ } & { [K_1 in Exclude<keyof I_1, "status">]: never; }>(object: I_3): HealthCheckResponse;
123
+ };
124
+ readonly responseStream: false;
125
+ readonly options: {};
126
+ };
127
+ /**
128
+ * Watch
129
+ * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
130
+ * buf:lint:ignore RPC_REQUEST_STANDARD_NAME
131
+ * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
132
+ */
133
+ readonly watch: {
134
+ readonly name: "Watch";
135
+ readonly requestType: {
136
+ encode(message: HealthCheckRequest, writer?: _m0.Writer): _m0.Writer;
137
+ decode(input: _m0.Reader | Uint8Array, length?: number): HealthCheckRequest;
138
+ fromJSON(object: any): HealthCheckRequest;
139
+ toJSON(message: HealthCheckRequest): unknown;
140
+ create<I extends {
141
+ readonly service?: string;
142
+ } & {
143
+ readonly service?: string;
144
+ } & { [K in Exclude<keyof I, "service">]: never; }>(base?: I | undefined): HealthCheckRequest;
145
+ fromPartial<I_1 extends {
146
+ readonly service?: string;
147
+ } & {
148
+ readonly service?: string;
149
+ } & { [K_1 in Exclude<keyof I_1, "service">]: never; }>(object: I_1): HealthCheckRequest;
150
+ };
151
+ readonly requestStream: false;
152
+ readonly responseType: {
153
+ encode(message: HealthCheckResponse, writer?: _m0.Writer): _m0.Writer;
154
+ decode(input: _m0.Reader | Uint8Array, length?: number): HealthCheckResponse;
155
+ fromJSON(object: any): HealthCheckResponse;
156
+ toJSON(message: HealthCheckResponse): unknown;
157
+ create<I_2 extends {
158
+ readonly status?: HealthCheckResponseServingStatus;
159
+ } & {
160
+ readonly status?: HealthCheckResponseServingStatus;
161
+ } & { [K in Exclude<keyof I, "status">]: never; }>(base?: I_2 | undefined): HealthCheckResponse;
162
+ fromPartial<I_3 extends {
163
+ readonly status?: HealthCheckResponseServingStatus;
164
+ } & {
165
+ readonly status?: HealthCheckResponseServingStatus;
166
+ } & { [K_1 in Exclude<keyof I_1, "status">]: never; }>(object: I_3): HealthCheckResponse;
167
+ };
168
+ readonly responseStream: true;
169
+ readonly options: {};
170
+ };
171
+ };
172
+ };
173
+ /**
174
+ * buf:lint:ignore SERVICE_SUFFIX
175
+ * Health
176
+ */
177
+ export type HealthService = typeof HealthService;
178
+ export declare const HealthService: {
179
+ /**
180
+ * Check
181
+ * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
182
+ * buf:lint:ignore RPC_REQUEST_STANDARD_NAME
183
+ * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
184
+ */
185
+ readonly check: {
186
+ readonly path: "/grpc.health.v1.Health/Check";
187
+ readonly requestStream: false;
188
+ readonly responseStream: false;
189
+ readonly requestSerialize: (value: HealthCheckRequest) => Buffer;
190
+ readonly requestDeserialize: (value: Buffer) => HealthCheckRequest;
191
+ readonly responseSerialize: (value: HealthCheckResponse) => Buffer;
192
+ readonly responseDeserialize: (value: Buffer) => HealthCheckResponse;
193
+ };
194
+ /**
195
+ * Watch
196
+ * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
197
+ * buf:lint:ignore RPC_REQUEST_STANDARD_NAME
198
+ * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
199
+ */
200
+ readonly watch: {
201
+ readonly path: "/grpc.health.v1.Health/Watch";
202
+ readonly requestStream: false;
203
+ readonly responseStream: true;
204
+ readonly requestSerialize: (value: HealthCheckRequest) => Buffer;
205
+ readonly requestDeserialize: (value: Buffer) => HealthCheckRequest;
206
+ readonly responseSerialize: (value: HealthCheckResponse) => Buffer;
207
+ readonly responseDeserialize: (value: Buffer) => HealthCheckResponse;
208
+ };
209
+ };
210
+ export interface HealthServer extends UntypedServiceImplementation {
211
+ /**
212
+ * Check
213
+ * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
214
+ * buf:lint:ignore RPC_REQUEST_STANDARD_NAME
215
+ * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
216
+ */
217
+ check: handleUnaryCall<HealthCheckRequest, HealthCheckResponse>;
218
+ /**
219
+ * Watch
220
+ * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
221
+ * buf:lint:ignore RPC_REQUEST_STANDARD_NAME
222
+ * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
223
+ */
224
+ watch: handleServerStreamingCall<HealthCheckRequest, HealthCheckResponse>;
225
+ }
226
+ export interface HealthClient extends Client {
227
+ /**
228
+ * Check
229
+ * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
230
+ * buf:lint:ignore RPC_REQUEST_STANDARD_NAME
231
+ * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
232
+ */
233
+ check(request: HealthCheckRequest, callback: (error: ServiceError | null, response: HealthCheckResponse) => void): ClientUnaryCall;
234
+ check(request: HealthCheckRequest, metadata: Metadata, callback: (error: ServiceError | null, response: HealthCheckResponse) => void): ClientUnaryCall;
235
+ check(request: HealthCheckRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: HealthCheckResponse) => void): ClientUnaryCall;
236
+ /**
237
+ * Watch
238
+ * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
239
+ * buf:lint:ignore RPC_REQUEST_STANDARD_NAME
240
+ * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
241
+ */
242
+ watch(request: HealthCheckRequest, options?: Partial<CallOptions>): ClientReadableStream<HealthCheckResponse>;
243
+ watch(request: HealthCheckRequest, metadata?: Metadata, options?: Partial<CallOptions>): ClientReadableStream<HealthCheckResponse>;
244
+ }
245
+ export declare const HealthClient: {
246
+ new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): HealthClient;
247
+ service: typeof HealthService;
248
+ };
249
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
250
+ export 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 {
251
+ readonly $case: string;
252
+ } ? {
253
+ [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]>;
254
+ } & {
255
+ readonly $case: T["$case"];
256
+ } : T extends {} ? {
257
+ [K in keyof T]?: DeepPartial<T[K]>;
258
+ } : Partial<T>;
259
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
260
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
261
+ [K in keyof P]: Exact<P[K], I[K]>;
262
+ } & {
263
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
264
+ };
265
+ export {};
@@ -0,0 +1,262 @@
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.HealthClient = exports.HealthService = exports.HealthDefinition = exports.HealthCheckResponse = exports.HealthCheckRequest = exports.healthCheckResponseServingStatusToNumber = exports.healthCheckResponseServingStatusToJSON = exports.healthCheckResponseServingStatusFromJSON = exports.HealthCheckResponseServingStatus = exports.protobufPackage = void 0;
7
+ /* eslint-disable */
8
+ const grpc_js_1 = require("@grpc/grpc-js");
9
+ const minimal_1 = __importDefault(require("protobufjs/minimal"));
10
+ exports.protobufPackage = "grpc.health.v1";
11
+ /** ServingStatus */
12
+ var HealthCheckResponseServingStatus;
13
+ (function (HealthCheckResponseServingStatus) {
14
+ /**
15
+ * UNKNOWN - UNKNOWN
16
+ * buf:lint:ignore ENUM_ZERO_VALUE_SUFFIX
17
+ * buf:lint:ignore ENUM_VALUE_PREFIX
18
+ */
19
+ HealthCheckResponseServingStatus["UNKNOWN"] = "UNKNOWN";
20
+ /**
21
+ * SERVING - SERVING
22
+ * buf:lint:ignore ENUM_VALUE_PREFIX
23
+ */
24
+ HealthCheckResponseServingStatus["SERVING"] = "SERVING";
25
+ /**
26
+ * NOT_SERVING - NOT_SERVING
27
+ * buf:lint:ignore ENUM_VALUE_PREFIX
28
+ */
29
+ HealthCheckResponseServingStatus["NOT_SERVING"] = "NOT_SERVING";
30
+ /**
31
+ * SERVICE_UNKNOWN - SERVICE_UNKNOWN — Used only by the Watch method.
32
+ * buf:lint:ignore ENUM_VALUE_PREFIX
33
+ */
34
+ HealthCheckResponseServingStatus["SERVICE_UNKNOWN"] = "SERVICE_UNKNOWN";
35
+ })(HealthCheckResponseServingStatus = exports.HealthCheckResponseServingStatus || (exports.HealthCheckResponseServingStatus = {}));
36
+ function healthCheckResponseServingStatusFromJSON(object) {
37
+ switch (object) {
38
+ case 0:
39
+ case "UNKNOWN":
40
+ return HealthCheckResponseServingStatus.UNKNOWN;
41
+ case 1:
42
+ case "SERVING":
43
+ return HealthCheckResponseServingStatus.SERVING;
44
+ case 2:
45
+ case "NOT_SERVING":
46
+ return HealthCheckResponseServingStatus.NOT_SERVING;
47
+ case 3:
48
+ case "SERVICE_UNKNOWN":
49
+ return HealthCheckResponseServingStatus.SERVICE_UNKNOWN;
50
+ default:
51
+ throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum HealthCheckResponseServingStatus");
52
+ }
53
+ }
54
+ exports.healthCheckResponseServingStatusFromJSON = healthCheckResponseServingStatusFromJSON;
55
+ function healthCheckResponseServingStatusToJSON(object) {
56
+ switch (object) {
57
+ case HealthCheckResponseServingStatus.UNKNOWN:
58
+ return "UNKNOWN";
59
+ case HealthCheckResponseServingStatus.SERVING:
60
+ return "SERVING";
61
+ case HealthCheckResponseServingStatus.NOT_SERVING:
62
+ return "NOT_SERVING";
63
+ case HealthCheckResponseServingStatus.SERVICE_UNKNOWN:
64
+ return "SERVICE_UNKNOWN";
65
+ default:
66
+ throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum HealthCheckResponseServingStatus");
67
+ }
68
+ }
69
+ exports.healthCheckResponseServingStatusToJSON = healthCheckResponseServingStatusToJSON;
70
+ function healthCheckResponseServingStatusToNumber(object) {
71
+ switch (object) {
72
+ case HealthCheckResponseServingStatus.UNKNOWN:
73
+ return 0;
74
+ case HealthCheckResponseServingStatus.SERVING:
75
+ return 1;
76
+ case HealthCheckResponseServingStatus.NOT_SERVING:
77
+ return 2;
78
+ case HealthCheckResponseServingStatus.SERVICE_UNKNOWN:
79
+ return 3;
80
+ default:
81
+ throw new tsProtoGlobalThis.Error("Unrecognized enum value " + object + " for enum HealthCheckResponseServingStatus");
82
+ }
83
+ }
84
+ exports.healthCheckResponseServingStatusToNumber = healthCheckResponseServingStatusToNumber;
85
+ function createBaseHealthCheckRequest() {
86
+ return { service: "" };
87
+ }
88
+ exports.HealthCheckRequest = {
89
+ encode(message, writer = minimal_1.default.Writer.create()) {
90
+ if (message.service !== "") {
91
+ writer.uint32(10).string(message.service);
92
+ }
93
+ return writer;
94
+ },
95
+ decode(input, length) {
96
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
97
+ let end = length === undefined ? reader.len : reader.pos + length;
98
+ const message = createBaseHealthCheckRequest();
99
+ while (reader.pos < end) {
100
+ const tag = reader.uint32();
101
+ switch (tag >>> 3) {
102
+ case 1:
103
+ message.service = reader.string();
104
+ break;
105
+ default:
106
+ reader.skipType(tag & 7);
107
+ break;
108
+ }
109
+ }
110
+ return message;
111
+ },
112
+ fromJSON(object) {
113
+ return { service: isSet(object.service) ? String(object.service) : "" };
114
+ },
115
+ toJSON(message) {
116
+ const obj = {};
117
+ message.service !== undefined && (obj.service = message.service);
118
+ return obj;
119
+ },
120
+ create(base) {
121
+ return exports.HealthCheckRequest.fromPartial(base ?? {});
122
+ },
123
+ fromPartial(object) {
124
+ const message = createBaseHealthCheckRequest();
125
+ message.service = object.service ?? "";
126
+ return message;
127
+ },
128
+ };
129
+ function createBaseHealthCheckResponse() {
130
+ return { status: HealthCheckResponseServingStatus.UNKNOWN };
131
+ }
132
+ exports.HealthCheckResponse = {
133
+ encode(message, writer = minimal_1.default.Writer.create()) {
134
+ if (message.status !== HealthCheckResponseServingStatus.UNKNOWN) {
135
+ writer.uint32(8).int32(healthCheckResponseServingStatusToNumber(message.status));
136
+ }
137
+ return writer;
138
+ },
139
+ decode(input, length) {
140
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
141
+ let end = length === undefined ? reader.len : reader.pos + length;
142
+ const message = createBaseHealthCheckResponse();
143
+ while (reader.pos < end) {
144
+ const tag = reader.uint32();
145
+ switch (tag >>> 3) {
146
+ case 1:
147
+ message.status = healthCheckResponseServingStatusFromJSON(reader.int32());
148
+ break;
149
+ default:
150
+ reader.skipType(tag & 7);
151
+ break;
152
+ }
153
+ }
154
+ return message;
155
+ },
156
+ fromJSON(object) {
157
+ return {
158
+ status: isSet(object.status)
159
+ ? healthCheckResponseServingStatusFromJSON(object.status)
160
+ : HealthCheckResponseServingStatus.UNKNOWN,
161
+ };
162
+ },
163
+ toJSON(message) {
164
+ const obj = {};
165
+ message.status !== undefined && (obj.status = healthCheckResponseServingStatusToJSON(message.status));
166
+ return obj;
167
+ },
168
+ create(base) {
169
+ return exports.HealthCheckResponse.fromPartial(base ?? {});
170
+ },
171
+ fromPartial(object) {
172
+ const message = createBaseHealthCheckResponse();
173
+ message.status = object.status ?? HealthCheckResponseServingStatus.UNKNOWN;
174
+ return message;
175
+ },
176
+ };
177
+ exports.HealthDefinition = {
178
+ name: "Health",
179
+ fullName: "grpc.health.v1.Health",
180
+ methods: {
181
+ /**
182
+ * Check
183
+ * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
184
+ * buf:lint:ignore RPC_REQUEST_STANDARD_NAME
185
+ * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
186
+ */
187
+ check: {
188
+ name: "Check",
189
+ requestType: exports.HealthCheckRequest,
190
+ requestStream: false,
191
+ responseType: exports.HealthCheckResponse,
192
+ responseStream: false,
193
+ options: {},
194
+ },
195
+ /**
196
+ * Watch
197
+ * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
198
+ * buf:lint:ignore RPC_REQUEST_STANDARD_NAME
199
+ * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
200
+ */
201
+ watch: {
202
+ name: "Watch",
203
+ requestType: exports.HealthCheckRequest,
204
+ requestStream: false,
205
+ responseType: exports.HealthCheckResponse,
206
+ responseStream: true,
207
+ options: {},
208
+ },
209
+ },
210
+ };
211
+ exports.HealthService = {
212
+ /**
213
+ * Check
214
+ * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
215
+ * buf:lint:ignore RPC_REQUEST_STANDARD_NAME
216
+ * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
217
+ */
218
+ check: {
219
+ path: "/grpc.health.v1.Health/Check",
220
+ requestStream: false,
221
+ responseStream: false,
222
+ requestSerialize: (value) => Buffer.from(exports.HealthCheckRequest.encode(value).finish()),
223
+ requestDeserialize: (value) => exports.HealthCheckRequest.decode(value),
224
+ responseSerialize: (value) => Buffer.from(exports.HealthCheckResponse.encode(value).finish()),
225
+ responseDeserialize: (value) => exports.HealthCheckResponse.decode(value),
226
+ },
227
+ /**
228
+ * Watch
229
+ * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
230
+ * buf:lint:ignore RPC_REQUEST_STANDARD_NAME
231
+ * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME
232
+ */
233
+ watch: {
234
+ path: "/grpc.health.v1.Health/Watch",
235
+ requestStream: false,
236
+ responseStream: true,
237
+ requestSerialize: (value) => Buffer.from(exports.HealthCheckRequest.encode(value).finish()),
238
+ requestDeserialize: (value) => exports.HealthCheckRequest.decode(value),
239
+ responseSerialize: (value) => Buffer.from(exports.HealthCheckResponse.encode(value).finish()),
240
+ responseDeserialize: (value) => exports.HealthCheckResponse.decode(value),
241
+ },
242
+ };
243
+ exports.HealthClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.HealthService, "grpc.health.v1.Health");
244
+ var tsProtoGlobalThis = (() => {
245
+ if (typeof globalThis !== "undefined") {
246
+ return globalThis;
247
+ }
248
+ if (typeof self !== "undefined") {
249
+ return self;
250
+ }
251
+ if (typeof window !== "undefined") {
252
+ return window;
253
+ }
254
+ if (typeof global !== "undefined") {
255
+ return global;
256
+ }
257
+ throw "Unable to locate global object";
258
+ })();
259
+ function isSet(value) {
260
+ return value !== null && value !== undefined;
261
+ }
262
+ //# sourceMappingURL=health.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"health.js","sourceRoot":"","sources":["../../../../.generated/grpc/health/v1/health.ts"],"names":[],"mappings":";;;;;;AAAA,oBAAoB;AACpB,2CAauB;AACvB,iEAAqC;AAExB,QAAA,eAAe,GAAG,gBAAgB,CAAC;AAchD,oBAAoB;AACpB,IAAY,gCAsBX;AAtBD,WAAY,gCAAgC;IAC1C;;;;OAIG;IACH,uDAAmB,CAAA;IACnB;;;OAGG;IACH,uDAAmB,CAAA;IACnB;;;OAGG;IACH,+DAA2B,CAAA;IAC3B;;;OAGG;IACH,uEAAmC,CAAA;AACrC,CAAC,EAtBW,gCAAgC,GAAhC,wCAAgC,KAAhC,wCAAgC,QAsB3C;AAED,SAAgB,wCAAwC,CAAC,MAAW;IAClE,QAAQ,MAAM,EAAE;QACd,KAAK,CAAC,CAAC;QACP,KAAK,SAAS;YACZ,OAAO,gCAAgC,CAAC,OAAO,CAAC;QAClD,KAAK,CAAC,CAAC;QACP,KAAK,SAAS;YACZ,OAAO,gCAAgC,CAAC,OAAO,CAAC;QAClD,KAAK,CAAC,CAAC;QACP,KAAK,aAAa;YAChB,OAAO,gCAAgC,CAAC,WAAW,CAAC;QACtD,KAAK,CAAC,CAAC;QACP,KAAK,iBAAiB;YACpB,OAAO,gCAAgC,CAAC,eAAe,CAAC;QAC1D;YACE,MAAM,IAAI,iBAAiB,CAAC,KAAK,CAC/B,0BAA0B,GAAG,MAAM,GAAG,4CAA4C,CACnF,CAAC;KACL;AACH,CAAC;AAnBD,4FAmBC;AAED,SAAgB,sCAAsC,CAAC,MAAwC;IAC7F,QAAQ,MAAM,EAAE;QACd,KAAK,gCAAgC,CAAC,OAAO;YAC3C,OAAO,SAAS,CAAC;QACnB,KAAK,gCAAgC,CAAC,OAAO;YAC3C,OAAO,SAAS,CAAC;QACnB,KAAK,gCAAgC,CAAC,WAAW;YAC/C,OAAO,aAAa,CAAC;QACvB,KAAK,gCAAgC,CAAC,eAAe;YACnD,OAAO,iB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,KAAK,WAAW,EAAE;QACjC,OAAO,MAAM,CAAC;KACf;IACD,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;QACjC,OAAO,MAAM,CAAC;KACf;IACD,MAAM,gCAAgC,CAAC;AACzC,CAAC,CAAC,EAAE,CAAC;AAeL,SAAS,KAAK,CAAC,KAAU;IACvB,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC;AAC/C,CAAC"}
@@ -0,0 +1,127 @@
1
+ /// <reference types="node" />
2
+ import { CallOptions, ChannelCredentials, Client, ClientOptions, ClientUnaryCall, handleUnaryCall, Metadata, ServiceError, UntypedServiceImplementation } from "@grpc/grpc-js";
3
+ import _m0 from "protobufjs/minimal";
4
+ export declare const protobufPackage = "grpc.metrics.v1";
5
+ /** metrics */
6
+ /** Empty request */
7
+ export interface GetRequest {
8
+ }
9
+ /** Metrics response */
10
+ export interface GetResponse {
11
+ /** String in prometheus format */
12
+ readonly metrics: string;
13
+ }
14
+ export declare const GetRequest: {
15
+ encode(_: GetRequest, writer?: _m0.Writer): _m0.Writer;
16
+ decode(input: _m0.Reader | Uint8Array, length?: number): GetRequest;
17
+ fromJSON(_: any): GetRequest;
18
+ toJSON(_: GetRequest): unknown;
19
+ create<I extends {} & {} & { [K in Exclude<keyof I, never>]: never; }>(base?: I | undefined): GetRequest;
20
+ fromPartial<I_1 extends {} & {} & { [K_1 in Exclude<keyof I_1, never>]: never; }>(_: I_1): GetRequest;
21
+ };
22
+ export declare const GetResponse: {
23
+ encode(message: GetResponse, writer?: _m0.Writer): _m0.Writer;
24
+ decode(input: _m0.Reader | Uint8Array, length?: number): GetResponse;
25
+ fromJSON(object: any): GetResponse;
26
+ toJSON(message: GetResponse): unknown;
27
+ create<I extends {
28
+ readonly metrics?: string;
29
+ } & {
30
+ readonly metrics?: string;
31
+ } & { [K in Exclude<keyof I, "metrics">]: never; }>(base?: I | undefined): GetResponse;
32
+ fromPartial<I_1 extends {
33
+ readonly metrics?: string;
34
+ } & {
35
+ readonly metrics?: string;
36
+ } & { [K_1 in Exclude<keyof I_1, "metrics">]: never; }>(object: I_1): GetResponse;
37
+ };
38
+ /**
39
+ * MetricsService
40
+ * buf:lint:ignore SERVICE_SUFFIX
41
+ */
42
+ export type MetricsDefinition = typeof MetricsDefinition;
43
+ export declare const MetricsDefinition: {
44
+ readonly name: "Metrics";
45
+ readonly fullName: "grpc.metrics.v1.Metrics";
46
+ readonly methods: {
47
+ /** Get metrics in stringiried prometheus format */
48
+ readonly get: {
49
+ readonly name: "Get";
50
+ readonly requestType: {
51
+ encode(_: GetRequest, writer?: _m0.Writer): _m0.Writer;
52
+ decode(input: _m0.Reader | Uint8Array, length?: number): GetRequest;
53
+ fromJSON(_: any): GetRequest;
54
+ toJSON(_: GetRequest): unknown;
55
+ create<I extends {} & {} & { [K in Exclude<keyof I, never>]: never; }>(base?: I | undefined): GetRequest;
56
+ fromPartial<I_1 extends {} & {} & { [K_1 in Exclude<keyof I_1, never>]: never; }>(_: I_1): GetRequest;
57
+ };
58
+ readonly requestStream: false;
59
+ readonly responseType: {
60
+ encode(message: GetResponse, writer?: _m0.Writer): _m0.Writer;
61
+ decode(input: _m0.Reader | Uint8Array, length?: number): GetResponse;
62
+ fromJSON(object: any): GetResponse;
63
+ toJSON(message: GetResponse): unknown;
64
+ create<I_2 extends {
65
+ readonly metrics?: string;
66
+ } & {
67
+ readonly metrics?: string;
68
+ } & { [K in Exclude<keyof I, "metrics">]: never; }>(base?: I_2 | undefined): GetResponse;
69
+ fromPartial<I_3 extends {
70
+ readonly metrics?: string;
71
+ } & {
72
+ readonly metrics?: string;
73
+ } & { [K_1 in Exclude<keyof I_1, "metrics">]: never; }>(object: I_3): GetResponse;
74
+ };
75
+ readonly responseStream: false;
76
+ readonly options: {};
77
+ };
78
+ };
79
+ };
80
+ /**
81
+ * MetricsService
82
+ * buf:lint:ignore SERVICE_SUFFIX
83
+ */
84
+ export type MetricsService = typeof MetricsService;
85
+ export declare const MetricsService: {
86
+ /** Get metrics in stringiried prometheus format */
87
+ readonly get: {
88
+ readonly path: "/grpc.metrics.v1.Metrics/Get";
89
+ readonly requestStream: false;
90
+ readonly responseStream: false;
91
+ readonly requestSerialize: (value: GetRequest) => Buffer;
92
+ readonly requestDeserialize: (value: Buffer) => GetRequest;
93
+ readonly responseSerialize: (value: GetResponse) => Buffer;
94
+ readonly responseDeserialize: (value: Buffer) => GetResponse;
95
+ };
96
+ };
97
+ export interface MetricsServer extends UntypedServiceImplementation {
98
+ /** Get metrics in stringiried prometheus format */
99
+ get: handleUnaryCall<GetRequest, GetResponse>;
100
+ }
101
+ export interface MetricsClient extends Client {
102
+ /** Get metrics in stringiried prometheus format */
103
+ get(request: GetRequest, callback: (error: ServiceError | null, response: GetResponse) => void): ClientUnaryCall;
104
+ get(request: GetRequest, metadata: Metadata, callback: (error: ServiceError | null, response: GetResponse) => void): ClientUnaryCall;
105
+ get(request: GetRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: GetResponse) => void): ClientUnaryCall;
106
+ }
107
+ export declare const MetricsClient: {
108
+ new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): MetricsClient;
109
+ service: typeof MetricsService;
110
+ };
111
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
112
+ export 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 {
113
+ readonly $case: string;
114
+ } ? {
115
+ [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]>;
116
+ } & {
117
+ readonly $case: T["$case"];
118
+ } : T extends {} ? {
119
+ [K in keyof T]?: DeepPartial<T[K]>;
120
+ } : Partial<T>;
121
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
122
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
123
+ [K in keyof P]: Exact<P[K], I[K]>;
124
+ } & {
125
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
126
+ };
127
+ export {};
@@ -0,0 +1,122 @@
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.MetricsClient = exports.MetricsService = exports.MetricsDefinition = exports.GetResponse = exports.GetRequest = exports.protobufPackage = void 0;
7
+ /* eslint-disable */
8
+ const grpc_js_1 = require("@grpc/grpc-js");
9
+ const minimal_1 = __importDefault(require("protobufjs/minimal"));
10
+ exports.protobufPackage = "grpc.metrics.v1";
11
+ function createBaseGetRequest() {
12
+ return {};
13
+ }
14
+ exports.GetRequest = {
15
+ encode(_, writer = minimal_1.default.Writer.create()) {
16
+ return writer;
17
+ },
18
+ decode(input, length) {
19
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
20
+ let end = length === undefined ? reader.len : reader.pos + length;
21
+ const message = createBaseGetRequest();
22
+ while (reader.pos < end) {
23
+ const tag = reader.uint32();
24
+ switch (tag >>> 3) {
25
+ default:
26
+ reader.skipType(tag & 7);
27
+ break;
28
+ }
29
+ }
30
+ return message;
31
+ },
32
+ fromJSON(_) {
33
+ return {};
34
+ },
35
+ toJSON(_) {
36
+ const obj = {};
37
+ return obj;
38
+ },
39
+ create(base) {
40
+ return exports.GetRequest.fromPartial(base ?? {});
41
+ },
42
+ fromPartial(_) {
43
+ const message = createBaseGetRequest();
44
+ return message;
45
+ },
46
+ };
47
+ function createBaseGetResponse() {
48
+ return { metrics: "" };
49
+ }
50
+ exports.GetResponse = {
51
+ encode(message, writer = minimal_1.default.Writer.create()) {
52
+ if (message.metrics !== "") {
53
+ writer.uint32(10).string(message.metrics);
54
+ }
55
+ return writer;
56
+ },
57
+ decode(input, length) {
58
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
59
+ let end = length === undefined ? reader.len : reader.pos + length;
60
+ const message = createBaseGetResponse();
61
+ while (reader.pos < end) {
62
+ const tag = reader.uint32();
63
+ switch (tag >>> 3) {
64
+ case 1:
65
+ message.metrics = reader.string();
66
+ break;
67
+ default:
68
+ reader.skipType(tag & 7);
69
+ break;
70
+ }
71
+ }
72
+ return message;
73
+ },
74
+ fromJSON(object) {
75
+ return { metrics: isSet(object.metrics) ? String(object.metrics) : "" };
76
+ },
77
+ toJSON(message) {
78
+ const obj = {};
79
+ message.metrics !== undefined && (obj.metrics = message.metrics);
80
+ return obj;
81
+ },
82
+ create(base) {
83
+ return exports.GetResponse.fromPartial(base ?? {});
84
+ },
85
+ fromPartial(object) {
86
+ const message = createBaseGetResponse();
87
+ message.metrics = object.metrics ?? "";
88
+ return message;
89
+ },
90
+ };
91
+ exports.MetricsDefinition = {
92
+ name: "Metrics",
93
+ fullName: "grpc.metrics.v1.Metrics",
94
+ methods: {
95
+ /** Get metrics in stringiried prometheus format */
96
+ get: {
97
+ name: "Get",
98
+ requestType: exports.GetRequest,
99
+ requestStream: false,
100
+ responseType: exports.GetResponse,
101
+ responseStream: false,
102
+ options: {},
103
+ },
104
+ },
105
+ };
106
+ exports.MetricsService = {
107
+ /** Get metrics in stringiried prometheus format */
108
+ get: {
109
+ path: "/grpc.metrics.v1.Metrics/Get",
110
+ requestStream: false,
111
+ responseStream: false,
112
+ requestSerialize: (value) => Buffer.from(exports.GetRequest.encode(value).finish()),
113
+ requestDeserialize: (value) => exports.GetRequest.decode(value),
114
+ responseSerialize: (value) => Buffer.from(exports.GetResponse.encode(value).finish()),
115
+ responseDeserialize: (value) => exports.GetResponse.decode(value),
116
+ },
117
+ };
118
+ exports.MetricsClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.MetricsService, "grpc.metrics.v1.Metrics");
119
+ function isSet(value) {
120
+ return value !== null && value !== undefined;
121
+ }
122
+ //# sourceMappingURL=metrics.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metrics.js","sourceRoot":"","sources":["../../../../.generated/grpc/metrics/v1/metrics.ts"],"names":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AM,CAAC,KAAK,CAAC;QAC/D,iBAAiB,EAAE,CAAC,KAAkB,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,mBAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC;QAC1F,mBAAmB,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,mBAAW,CAAC,MAAM,CAAC,KAAK,CAAC;KAClE;CACO,CAAC;AAuBE,QAAA,aAAa,GAAG,IAAA,sCAA4B,EAAC,sBAAc,EAAE,yBAAyB,CAGlG,CAAC;AAeF,SAAS,KAAK,CAAC,KAAU;IACvB,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC;AAC/C,CAAC"}
@@ -0,0 +1,157 @@
1
+ /// <reference types="node" />
2
+ import type { Metadata } from '@grpc/grpc-js';
3
+ import type { ChannelImplementation } from '@grpc/grpc-js/build/src/channel';
4
+ import type { CallOptions, DefaultCallOptions } from 'nice-grpc';
5
+ import type { NormalizedServiceDefinition } from 'nice-grpc/lib/service-definitions';
6
+ import type { Observable } from 'rxjs';
7
+ import { HealthDefinition } from './grpc/health/v1/health';
8
+ import { HealthCheckRequest } from './grpc/health/v1/health';
9
+ import { HealthCheckResponse } from './grpc/health/v1/health';
10
+ import { HealthCheckResponseServingStatus } from './grpc/health/v1/health';
11
+ declare const _default: {
12
+ name: string;
13
+ definitions: {
14
+ 'grpc-js': {
15
+ Health: {
16
+ readonly check: {
17
+ readonly path: "/grpc.health.v1.Health/Check";
18
+ readonly requestStream: false;
19
+ readonly responseStream: false;
20
+ readonly requestSerialize: (value: HealthCheckRequest) => Buffer;
21
+ readonly requestDeserialize: (value: Buffer) => HealthCheckRequest;
22
+ readonly responseSerialize: (value: HealthCheckResponse) => Buffer;
23
+ readonly responseDeserialize: (value: Buffer) => HealthCheckResponse;
24
+ };
25
+ readonly watch: {
26
+ readonly path: "/grpc.health.v1.Health/Watch";
27
+ readonly requestStream: false;
28
+ readonly responseStream: true;
29
+ readonly requestSerialize: (value: HealthCheckRequest) => Buffer;
30
+ readonly requestDeserialize: (value: Buffer) => HealthCheckRequest;
31
+ readonly responseSerialize: (value: HealthCheckResponse) => Buffer;
32
+ readonly responseDeserialize: (value: Buffer) => HealthCheckResponse;
33
+ };
34
+ };
35
+ };
36
+ generic: {
37
+ HealthDefinition: {
38
+ readonly name: "Health";
39
+ readonly fullName: "grpc.health.v1.Health";
40
+ readonly methods: {
41
+ readonly check: {
42
+ readonly name: "Check";
43
+ readonly requestType: {
44
+ encode(message: HealthCheckRequest, writer?: import("protobufjs").Writer): import("protobufjs").Writer;
45
+ decode(input: Uint8Array | import("protobufjs").Reader, length?: number | undefined): HealthCheckRequest;
46
+ fromJSON(object: any): HealthCheckRequest;
47
+ toJSON(message: HealthCheckRequest): unknown;
48
+ create<I extends {
49
+ readonly service?: string;
50
+ } & {
51
+ readonly service?: string;
52
+ } & { [K in Exclude<keyof I, "service">]: never; }>(base?: I | undefined): HealthCheckRequest;
53
+ fromPartial<I_1 extends {
54
+ readonly service?: string;
55
+ } & {
56
+ readonly service?: string;
57
+ } & { [K_1 in Exclude<keyof I_1, "service">]: never; }>(object: I_1): HealthCheckRequest;
58
+ };
59
+ readonly requestStream: false;
60
+ readonly responseType: {
61
+ encode(message: HealthCheckResponse, writer?: import("protobufjs").Writer): import("protobufjs").Writer;
62
+ decode(input: Uint8Array | import("protobufjs").Reader, length?: number | undefined): HealthCheckResponse;
63
+ fromJSON(object: any): HealthCheckResponse;
64
+ toJSON(message: HealthCheckResponse): unknown;
65
+ create<I_2 extends {
66
+ readonly status?: HealthCheckResponseServingStatus;
67
+ } & {
68
+ readonly status?: HealthCheckResponseServingStatus;
69
+ } & { [K_2 in Exclude<keyof I_2, "status">]: never; }>(base?: I_2 | undefined): HealthCheckResponse;
70
+ fromPartial<I_3 extends {
71
+ readonly status?: HealthCheckResponseServingStatus;
72
+ } & {
73
+ readonly status?: HealthCheckResponseServingStatus;
74
+ } & { [K_3 in Exclude<keyof I_3, "status">]: never; }>(object: I_3): HealthCheckResponse;
75
+ };
76
+ readonly responseStream: false;
77
+ readonly options: {};
78
+ };
79
+ readonly watch: {
80
+ readonly name: "Watch";
81
+ readonly requestType: {
82
+ encode(message: HealthCheckRequest, writer?: import("protobufjs").Writer): import("protobufjs").Writer;
83
+ decode(input: Uint8Array | import("protobufjs").Reader, length?: number | undefined): HealthCheckRequest;
84
+ fromJSON(object: any): HealthCheckRequest;
85
+ toJSON(message: HealthCheckRequest): unknown;
86
+ create<I extends {
87
+ readonly service?: string;
88
+ } & {
89
+ readonly service?: string;
90
+ } & { [K in Exclude<keyof I, "service">]: never; }>(base?: I | undefined): HealthCheckRequest;
91
+ fromPartial<I_1 extends {
92
+ readonly service?: string;
93
+ } & {
94
+ readonly service?: string;
95
+ } & { [K_1 in Exclude<keyof I_1, "service">]: never; }>(object: I_1): HealthCheckRequest;
96
+ };
97
+ readonly requestStream: false;
98
+ readonly responseType: {
99
+ encode(message: HealthCheckResponse, writer?: import("protobufjs").Writer): import("protobufjs").Writer;
100
+ decode(input: Uint8Array | import("protobufjs").Reader, length?: number | undefined): HealthCheckResponse;
101
+ fromJSON(object: any): HealthCheckResponse;
102
+ toJSON(message: HealthCheckResponse): unknown;
103
+ create<I_2 extends {
104
+ readonly status?: HealthCheckResponseServingStatus;
105
+ } & {
106
+ readonly status?: HealthCheckResponseServingStatus;
107
+ } & { [K_2 in Exclude<keyof I_2, "status">]: never; }>(base?: I_2 | undefined): HealthCheckResponse;
108
+ fromPartial<I_3 extends {
109
+ readonly status?: HealthCheckResponseServingStatus;
110
+ } & {
111
+ readonly status?: HealthCheckResponseServingStatus;
112
+ } & { [K_3 in Exclude<keyof I_3, "status">]: never; }>(object: I_3): HealthCheckResponse;
113
+ };
114
+ readonly responseStream: true;
115
+ readonly options: {};
116
+ };
117
+ };
118
+ };
119
+ };
120
+ };
121
+ };
122
+ export default _default;
123
+ export interface HealthGrpcController {
124
+ check(request: HealthCheckRequest, metadata?: Metadata): HealthCheckResponse | Promise<HealthCheckResponse> | Observable<HealthCheckResponse>;
125
+ watch(request: HealthCheckRequest, metadata?: Metadata): Observable<HealthCheckResponse>;
126
+ }
127
+ /**
128
+ * Decorates HealthGrpcController methods with
129
+ * @GrpcStreamMethod() and @GrpcMethod() decorators (which are @MessagePattern
130
+ * under the hood). Hense, you don't need any individual method decorating
131
+ * any more.
132
+ */
133
+ export declare function HealthGrpcMethods(): any;
134
+ export interface HealthClient<CallOptionsExt = {}> {
135
+ check(request: DeepPartial<HealthCheckRequest>, options?: CallOptions & CallOptionsExt): Promise<HealthCheckResponse>;
136
+ watch(request: DeepPartial<HealthCheckRequest>, options?: CallOptions & CallOptionsExt): AsyncIterable<HealthCheckResponse>;
137
+ }
138
+ /**
139
+ * Creates a "nice-grpc" client.
140
+ * Use this only in limited cases, for example in js-files.
141
+ * In other cases, configure the client yourself.
142
+ * @see https://github.com/deeplay-io/nice-grpc/tree/master/packages/nice-grpc#client
143
+ */
144
+ export declare function createHealthClient<CallOptionsExt = {}>(channel: ChannelImplementation, defaultCallOptions?: DefaultCallOptions<NormalizedServiceDefinition<HealthDefinition>>): HealthClient<CallOptionsExt>;
145
+ export { HealthCheckRequest };
146
+ export { HealthCheckResponse };
147
+ export { HealthCheckResponseServingStatus };
148
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
149
+ export 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 {
150
+ $case: string;
151
+ } ? {
152
+ [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]>;
153
+ } & {
154
+ $case: T["$case"];
155
+ } : T extends {} ? {
156
+ [K in keyof T]?: DeepPartial<T[K]>;
157
+ } : Partial<T>;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HealthCheckResponseServingStatus = exports.HealthCheckResponse = exports.HealthCheckRequest = exports.createHealthClient = exports.HealthGrpcMethods = void 0;
4
+ // *Service is definition from grpc-js (used for Nest.js gRPC transport)
5
+ // *Definition is generic definition (used for NiceGrpc clients)
6
+ const health_1 = require("./grpc/health/v1/health");
7
+ const health_2 = require("./grpc/health/v1/health");
8
+ Object.defineProperty(exports, "HealthCheckRequest", { enumerable: true, get: function () { return health_2.HealthCheckRequest; } });
9
+ const health_3 = require("./grpc/health/v1/health");
10
+ Object.defineProperty(exports, "HealthCheckResponse", { enumerable: true, get: function () { return health_3.HealthCheckResponse; } });
11
+ const health_4 = require("./grpc/health/v1/health");
12
+ Object.defineProperty(exports, "HealthCheckResponseServingStatus", { enumerable: true, get: function () { return health_4.HealthCheckResponseServingStatus; } });
13
+ // Actual 'Package' meta information
14
+ // TODO type it with Package interface from @platform/grpc when it is deployed
15
+ exports.default = {
16
+ name: 'grpc.health.v1',
17
+ definitions: {
18
+ 'grpc-js': { Health: health_1.HealthService },
19
+ 'generic': { HealthDefinition: health_1.HealthDefinition }
20
+ }
21
+ };
22
+ // Just helper function to ease decorators generation
23
+ function apply(decorator, constructor, method, serviceName) {
24
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
25
+ decorator(serviceName, method)(constructor.prototype[method], method, descriptor);
26
+ }
27
+ /**
28
+ * Decorates HealthGrpcController methods with
29
+ * @GrpcStreamMethod() and @GrpcMethod() decorators (which are @MessagePattern
30
+ * under the hood). Hense, you don't need any individual method decorating
31
+ * any more.
32
+ */
33
+ function HealthGrpcMethods() {
34
+ const { Controller, applyDecorators } = require('@nestjs/common');
35
+ const { GrpcMethod, GrpcStreamMethod } = require('@nestjs/microservices');
36
+ return applyDecorators(Controller(), function (constructor) {
37
+ apply(GrpcMethod, constructor, 'check', 'Health');
38
+ apply(GrpcMethod, constructor, 'watch', 'Health');
39
+ });
40
+ }
41
+ exports.HealthGrpcMethods = HealthGrpcMethods;
42
+ /**
43
+ * Creates a "nice-grpc" client.
44
+ * Use this only in limited cases, for example in js-files.
45
+ * In other cases, configure the client yourself.
46
+ * @see https://github.com/deeplay-io/nice-grpc/tree/master/packages/nice-grpc#client
47
+ */
48
+ function createHealthClient(channel, defaultCallOptions) {
49
+ const { createChannel, createClient } = require('nice-grpc');
50
+ return createClient(health_1.HealthDefinition, channel, defaultCallOptions);
51
+ }
52
+ exports.createHealthClient = createHealthClient;
53
+ //# sourceMappingURL=grpc.health.v1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"grpc.health.v1.js","sourceRoot":"","sources":["../.generated/grpc.health.v1.ts"],"names":[],"mappings":";;;AAiBE,wEAAwE;AACxE,gEAAgE;AAC9D,oDAAoF;AACpF,oDAA6D;AA+DpD,mGA/DA,2BAAkB,OA+DA;AA9D3B,oDAA8D;AA+DrD,oGA/DA,4BAAmB,OA+DA;AA9D5B,oDAA2E;AA+DlE,iHA/DA,yCAAgC,OA+DA;AA9D3C,oCAAoC;AACpC,8EAA8E;AAC9E,kBAAe;IACb,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE;QACX,SAAS,EAAE,EAAE,MAAM,EAAN,sBAAM,EAAE;QACrB,SAAS,EAAE,EAAE,gBAAgB,EAAhB,yBAAgB,EAAE;KAChC;CACF,CAAC;AAEF,qDAAqD;AACrD,SAAS,KAAK,CAAC,SAAmB,EAAE,WAAqB,EAAE,MAAc,EAAE,WAAmB;IAC5F,MAAM,UAAU,GAAQ,OAAO,CAAC,wBAAwB,CACtD,WAAW,CAAC,SAAS,EACrB,MAAM,CACP,CAAC;IACF,SAAS,CAAC,WAAW,EAAE,MAAM,CAAC,CAC5B,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,EAC7B,MAAM,EACN,UAAU,CACX,CAAC;AACJ,CAAC;AAMD;;;;;EAKE;AACF,SAAgB,iBAAiB;IAC/B,MAAM,EAAE,UAAU,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAClE,MAAM,EAAE,UAAU,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAC1E,OAAO,eAAe,CACpB,UAAU,EAAE,EACZ,UAAU,WAAqB;QAC3B,KAAK,CAAC,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;QAClD,KAAK,CAAC,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IACtD,CAAC,CACF,CAAC;AACJ,CAAC;AAVD,8CAUC;AAOD;;;;;GAKG;AACH,SAAgB,kBAAkB,CAAsB,OAA8B,EAAE,kBAAsF;IAC5K,MAAM,EAAE,aAAa,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAC7D,OAAO,YAAY,CAAC,yBAAgB,EAAE,OAAO,EAAE,kBAAkB,CAAC,CAAC;AACrE,CAAC;AAHD,gDAGC"}
@@ -0,0 +1,98 @@
1
+ /// <reference types="node" />
2
+ import type { Metadata } from '@grpc/grpc-js';
3
+ import type { ChannelImplementation } from '@grpc/grpc-js/build/src/channel';
4
+ import type { CallOptions, DefaultCallOptions } from 'nice-grpc';
5
+ import type { NormalizedServiceDefinition } from 'nice-grpc/lib/service-definitions';
6
+ import type { Observable } from 'rxjs';
7
+ import { MetricsDefinition } from './grpc/metrics/v1/metrics';
8
+ import { GetRequest } from './grpc/metrics/v1/metrics';
9
+ import { GetResponse } from './grpc/metrics/v1/metrics';
10
+ declare const _default: {
11
+ name: string;
12
+ definitions: {
13
+ 'grpc-js': {
14
+ Metrics: {
15
+ readonly get: {
16
+ readonly path: "/grpc.metrics.v1.Metrics/Get";
17
+ readonly requestStream: false;
18
+ readonly responseStream: false;
19
+ readonly requestSerialize: (value: GetRequest) => Buffer;
20
+ readonly requestDeserialize: (value: Buffer) => GetRequest;
21
+ readonly responseSerialize: (value: GetResponse) => Buffer;
22
+ readonly responseDeserialize: (value: Buffer) => GetResponse;
23
+ };
24
+ };
25
+ };
26
+ generic: {
27
+ MetricsDefinition: {
28
+ readonly name: "Metrics";
29
+ readonly fullName: "grpc.metrics.v1.Metrics";
30
+ readonly methods: {
31
+ readonly get: {
32
+ readonly name: "Get";
33
+ readonly requestType: {
34
+ encode(_: GetRequest, writer?: import("protobufjs").Writer): import("protobufjs").Writer;
35
+ decode(input: Uint8Array | import("protobufjs").Reader, length?: number | undefined): GetRequest;
36
+ fromJSON(_: any): GetRequest;
37
+ toJSON(_: GetRequest): unknown;
38
+ create<I extends {} & {} & { [K in Exclude<keyof I, never>]: never; }>(base?: I | undefined): GetRequest;
39
+ fromPartial<I_1 extends {} & {} & { [K_1 in Exclude<keyof I_1, never>]: never; }>(_: I_1): GetRequest;
40
+ };
41
+ readonly requestStream: false;
42
+ readonly responseType: {
43
+ encode(message: GetResponse, writer?: import("protobufjs").Writer): import("protobufjs").Writer;
44
+ decode(input: Uint8Array | import("protobufjs").Reader, length?: number | undefined): GetResponse;
45
+ fromJSON(object: any): GetResponse;
46
+ toJSON(message: GetResponse): unknown;
47
+ create<I_2 extends {
48
+ readonly metrics?: string;
49
+ } & {
50
+ readonly metrics?: string;
51
+ } & { [K_2 in Exclude<keyof I_2, "metrics">]: never; }>(base?: I_2 | undefined): GetResponse;
52
+ fromPartial<I_3 extends {
53
+ readonly metrics?: string;
54
+ } & {
55
+ readonly metrics?: string;
56
+ } & { [K_3 in Exclude<keyof I_3, "metrics">]: never; }>(object: I_3): GetResponse;
57
+ };
58
+ readonly responseStream: false;
59
+ readonly options: {};
60
+ };
61
+ };
62
+ };
63
+ };
64
+ };
65
+ };
66
+ export default _default;
67
+ export interface MetricsGrpcController {
68
+ get(request: GetRequest, metadata?: Metadata): GetResponse | Promise<GetResponse> | Observable<GetResponse>;
69
+ }
70
+ /**
71
+ * Decorates MetricsGrpcController methods with
72
+ * @GrpcStreamMethod() and @GrpcMethod() decorators (which are @MessagePattern
73
+ * under the hood). Hense, you don't need any individual method decorating
74
+ * any more.
75
+ */
76
+ export declare function MetricsGrpcMethods(): any;
77
+ export interface MetricsClient<CallOptionsExt = {}> {
78
+ get(request: DeepPartial<GetRequest>, options?: CallOptions & CallOptionsExt): Promise<GetResponse>;
79
+ }
80
+ /**
81
+ * Creates a "nice-grpc" client.
82
+ * Use this only in limited cases, for example in js-files.
83
+ * In other cases, configure the client yourself.
84
+ * @see https://github.com/deeplay-io/nice-grpc/tree/master/packages/nice-grpc#client
85
+ */
86
+ export declare function createMetricsClient<CallOptionsExt = {}>(channel: ChannelImplementation, defaultCallOptions?: DefaultCallOptions<NormalizedServiceDefinition<MetricsDefinition>>): MetricsClient<CallOptionsExt>;
87
+ export { GetRequest };
88
+ export { GetResponse };
89
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
90
+ export 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 {
91
+ $case: string;
92
+ } ? {
93
+ [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]>;
94
+ } & {
95
+ $case: T["$case"];
96
+ } : T extends {} ? {
97
+ [K in keyof T]?: DeepPartial<T[K]>;
98
+ } : Partial<T>;
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetResponse = exports.GetRequest = exports.createMetricsClient = exports.MetricsGrpcMethods = void 0;
4
+ // *Service is definition from grpc-js (used for Nest.js gRPC transport)
5
+ // *Definition is generic definition (used for NiceGrpc clients)
6
+ const metrics_1 = require("./grpc/metrics/v1/metrics");
7
+ const metrics_2 = require("./grpc/metrics/v1/metrics");
8
+ Object.defineProperty(exports, "GetRequest", { enumerable: true, get: function () { return metrics_2.GetRequest; } });
9
+ const metrics_3 = require("./grpc/metrics/v1/metrics");
10
+ Object.defineProperty(exports, "GetResponse", { enumerable: true, get: function () { return metrics_3.GetResponse; } });
11
+ // Actual 'Package' meta information
12
+ // TODO type it with Package interface from @platform/grpc when it is deployed
13
+ exports.default = {
14
+ name: 'grpc.metrics.v1',
15
+ definitions: {
16
+ 'grpc-js': { Metrics: metrics_1.MetricsService },
17
+ 'generic': { MetricsDefinition: metrics_1.MetricsDefinition }
18
+ }
19
+ };
20
+ // Just helper function to ease decorators generation
21
+ function apply(decorator, constructor, method, serviceName) {
22
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
23
+ decorator(serviceName, method)(constructor.prototype[method], method, descriptor);
24
+ }
25
+ /**
26
+ * Decorates MetricsGrpcController methods with
27
+ * @GrpcStreamMethod() and @GrpcMethod() decorators (which are @MessagePattern
28
+ * under the hood). Hense, you don't need any individual method decorating
29
+ * any more.
30
+ */
31
+ function MetricsGrpcMethods() {
32
+ const { Controller, applyDecorators } = require('@nestjs/common');
33
+ const { GrpcMethod, GrpcStreamMethod } = require('@nestjs/microservices');
34
+ return applyDecorators(Controller(), function (constructor) {
35
+ apply(GrpcMethod, constructor, 'get', 'Metrics');
36
+ });
37
+ }
38
+ exports.MetricsGrpcMethods = MetricsGrpcMethods;
39
+ /**
40
+ * Creates a "nice-grpc" client.
41
+ * Use this only in limited cases, for example in js-files.
42
+ * In other cases, configure the client yourself.
43
+ * @see https://github.com/deeplay-io/nice-grpc/tree/master/packages/nice-grpc#client
44
+ */
45
+ function createMetricsClient(channel, defaultCallOptions) {
46
+ const { createChannel, createClient } = require('nice-grpc');
47
+ return createClient(metrics_1.MetricsDefinition, channel, defaultCallOptions);
48
+ }
49
+ exports.createMetricsClient = createMetricsClient;
50
+ //# sourceMappingURL=grpc.metrics.v1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"grpc.metrics.v1.js","sourceRoot":"","sources":["../.generated/grpc.metrics.v1.ts"],"names":[],"mappings":";;;AAiBE,wEAAwE;AACxE,gEAAgE;AAC9D,uDAAyF;AACzF,uDAAuD;AA2D9C,2FA3DA,oBAAU,OA2DA;AA1DnB,uDAAwD;AA2D/C,4FA3DA,qBAAW,OA2DA;AA1DtB,oCAAoC;AACpC,8EAA8E;AAC9E,kBAAe;IACb,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE;QACX,SAAS,EAAE,EAAE,OAAO,EAAP,wBAAO,EAAE;QACtB,SAAS,EAAE,EAAE,iBAAiB,EAAjB,2BAAiB,EAAE;KACjC;CACF,CAAC;AAEF,qDAAqD;AACrD,SAAS,KAAK,CAAC,SAAmB,EAAE,WAAqB,EAAE,MAAc,EAAE,WAAmB;IAC5F,MAAM,UAAU,GAAQ,OAAO,CAAC,wBAAwB,CACtD,WAAW,CAAC,SAAS,EACrB,MAAM,CACP,CAAC;IACF,SAAS,CAAC,WAAW,EAAE,MAAM,CAAC,CAC5B,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,EAC7B,MAAM,EACN,UAAU,CACX,CAAC;AACJ,CAAC;AAKD;;;;;EAKE;AACF,SAAgB,kBAAkB;IAChC,MAAM,EAAE,UAAU,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAClE,MAAM,EAAE,UAAU,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAC1E,OAAO,eAAe,CACpB,UAAU,EAAE,EACZ,UAAU,WAAqB;QAC3B,KAAK,CAAC,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;IACrD,CAAC,CACF,CAAC;AACJ,CAAC;AATD,gDASC;AAMD;;;;;GAKG;AACH,SAAgB,mBAAmB,CAAsB,OAA8B,EAAE,kBAAuF;IAC9K,MAAM,EAAE,aAAa,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAC7D,OAAO,YAAY,CAAC,2BAAiB,EAAE,OAAO,EAAE,kBAAkB,CAAC,CAAC;AACtE,CAAC;AAHD,kDAGC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsdk/builtin-contract",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "license": "Apache License 2.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "peerDependencies": {
12
12
  "@grpc/grpc-js": ">=1.7.0",
13
- "@rsdk/tsconfig": "^1.0.3"
13
+ "@rsdk/tsconfig": "^1.0.4"
14
14
  },
15
- "gitHead": "34dc50cdbe895512689dc1feabec833863c5d6f2"
15
+ "gitHead": "43e6e42cda9becf15826a38e79ddd4276ac9e1e0"
16
16
  }