@sentio/runtime 2.40.0-rc.1 → 2.40.0-rc.3

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/lib/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _sentio_protos from '@sentio/protos';
2
- import { DeepPartial as DeepPartial$1, ProcessStreamResponse, DBResponse, DBRequest_DBUpsert, DBRequest, HandlerType, ProcessConfigResponse, StartRequest, DataBinding, PreparedData, ProcessResult, PreprocessResult, ProcessorServiceImplementation, ProcessConfigRequest, Empty, ProcessBindingsRequest, ProcessBindingResponse, ProcessStreamRequest } from '@sentio/protos';
2
+ import { DeepPartial as DeepPartial$1, ProcessStreamResponse, DBResponse, DBRequest_DBUpsert, DBRequest, HandlerType, ProcessConfigResponse, StartRequest, DataBinding, PreparedData, ProcessResult, PreprocessResult, ProcessorServiceImplementation, ProcessConfigRequest, Empty, ProcessBindingsRequest, ProcessBindingResponse, ProcessStreamRequest, PreprocessStreamRequest, PreprocessStreamResponse } from '@sentio/protos';
3
3
  import { Subject } from 'rxjs';
4
4
  import { AsyncLocalStorage } from 'node:async_hooks';
5
5
  import { Required } from 'utility-types';
@@ -111,10 +111,10 @@ declare class ProcessorServiceImpl implements ProcessorServiceImplementation {
111
111
  start(request: StartRequest, context: CallContext): Promise<Empty>;
112
112
  stop(request: Empty, context: CallContext): Promise<Empty>;
113
113
  processBindings(request: ProcessBindingsRequest, options?: CallContext): Promise<ProcessBindingResponse>;
114
- preprocessBindings(request: ProcessBindingsRequest, options?: CallContext): Promise<{
114
+ preprocessBindings(bindings: DataBinding[], dbContext?: StoreContext, options?: CallContext): Promise<{
115
115
  [calldata: string]: any[];
116
116
  }>;
117
- preprocessBinding(request: DataBinding, options?: CallContext): Promise<PreprocessResult>;
117
+ preprocessBinding(request: DataBinding, dbContext?: StoreContext, options?: CallContext): Promise<PreprocessResult>;
118
118
  processBinding(request: DataBinding, preparedData: PreparedData | undefined, options?: CallContext): Promise<ProcessResult>;
119
119
  processBindingsStream(requests: AsyncIterable<ProcessStreamRequest>, context: CallContext): AsyncGenerator<{
120
120
  processId?: number | undefined;
@@ -279,6 +279,67 @@ declare class ProcessorServiceImpl implements ProcessorServiceImplementation {
279
279
  } | undefined;
280
280
  } | undefined;
281
281
  }, void, undefined>;
282
+ handlePreprocessRequests(requests: AsyncIterable<PreprocessStreamRequest>, subject: Subject<DeepPartial$1<PreprocessStreamResponse>>): Promise<void>;
283
+ preprocessBindingsStream(requests: AsyncIterable<PreprocessStreamRequest>, context: CallContext): AsyncGenerator<{
284
+ processId?: number | undefined;
285
+ dbRequest?: {
286
+ opId?: bigint | undefined;
287
+ get?: {
288
+ entity?: string | undefined;
289
+ id?: string | undefined;
290
+ } | undefined;
291
+ upsert?: {
292
+ entity?: string[] | undefined;
293
+ id?: string[] | undefined;
294
+ data?: {
295
+ [x: string]: any;
296
+ }[] | undefined;
297
+ entityData?: {
298
+ fields?: {
299
+ [x: string]: {
300
+ nullValue?: _sentio_protos.RichValue_NullValue | undefined;
301
+ intValue?: number | undefined;
302
+ floatValue?: number | undefined;
303
+ bytesValue?: Uint8Array | undefined;
304
+ boolValue?: boolean | undefined;
305
+ stringValue?: string | undefined;
306
+ timestampValue?: Date | undefined;
307
+ bigintValue?: {
308
+ negative?: boolean | undefined;
309
+ data?: Uint8Array | undefined;
310
+ } | undefined;
311
+ bigdecimalValue?: {
312
+ value?: {
313
+ negative?: boolean | undefined;
314
+ data?: Uint8Array | undefined;
315
+ } | undefined;
316
+ exp?: number | undefined;
317
+ } | undefined;
318
+ listValue?: {
319
+ values?: any[] | undefined;
320
+ } | undefined;
321
+ } | undefined;
322
+ } | undefined;
323
+ }[] | undefined;
324
+ } | undefined;
325
+ delete?: {
326
+ entity?: string[] | undefined;
327
+ id?: string[] | undefined;
328
+ } | undefined;
329
+ list?: {
330
+ entity?: string | undefined;
331
+ filters?: {
332
+ field?: string | undefined;
333
+ op?: _sentio_protos.DBRequest_DBOperator | undefined;
334
+ value?: {
335
+ values?: any[] | undefined;
336
+ } | undefined;
337
+ }[] | undefined;
338
+ cursor?: string | undefined;
339
+ pageSize?: number | undefined;
340
+ } | undefined;
341
+ } | undefined;
342
+ }, void, undefined>;
282
343
  private handleRequests;
283
344
  }
284
345
 
package/lib/index.js CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  errorString,
12
12
  mergeProcessResults,
13
13
  timeoutError
14
- } from "./chunk-LMUCLUM5.js";
14
+ } from "./chunk-Y3KJTCAS.js";
15
15
 
16
16
  // src/state.ts
17
17
  var _State = class {
@@ -40,7 +40,7 @@ import {
40
40
  require_minimal,
41
41
  require_src,
42
42
  trace
43
- } from "./chunk-LMUCLUM5.js";
43
+ } from "./chunk-Y3KJTCAS.js";
44
44
 
45
45
  // ../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js
46
46
  var require_universalify = __commonJS({
@@ -51259,6 +51259,9 @@ var FullProcessorServiceImpl = class {
51259
51259
  async *processBindingsStream(requests, context2) {
51260
51260
  yield* this.instance.processBindingsStream(requests, context2);
51261
51261
  }
51262
+ async *preprocessBindingsStream(requests, context2) {
51263
+ yield* this.instance.preprocessBindingsStream(requests, context2);
51264
+ }
51262
51265
  adjustResult(res) {
51263
51266
  }
51264
51267
  adjustDataBinding(dataBinding) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentio/runtime",
3
- "version": "2.40.0-rc.1",
3
+ "version": "2.40.0-rc.3",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {
@@ -6,6 +6,7 @@ const require = createRequire(import.meta.url)
6
6
  import {
7
7
  DataBinding,
8
8
  HandlerType,
9
+ PreprocessStreamRequest,
9
10
  ProcessBindingsRequest,
10
11
  ProcessStreamRequest,
11
12
  ProcessConfigRequest,
@@ -111,6 +112,10 @@ export class FullProcessorServiceImpl implements ProcessorServiceImplementation
111
112
  yield* this.instance.processBindingsStream(requests, context)
112
113
  }
113
114
 
115
+ async *preprocessBindingsStream(requests: AsyncIterable<PreprocessStreamRequest>, context: CallContext) {
116
+ yield* this.instance.preprocessBindingsStream(requests, context)
117
+ }
118
+
114
119
  private adjustResult(res: ProcessResult): void {}
115
120
 
116
121
  private adjustDataBinding(dataBinding: DataBinding): void {