@restatedev/restate-sdk-testcontainers 1.17.4 → 1.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -4,11 +4,11 @@ import { Duration } from "./restate-sdk-core/src/duration.cjs";
4
4
  import { JournalValueCodec } from "./restate-sdk-core/src/entry_codec.cjs";
5
5
  import { RestateError, TerminalError } from "./restate-sdk/src/types/errors.cjs";
6
6
  import { Hooks, HooksProvider, Interceptor } from "./restate-sdk/src/hooks.cjs";
7
- import { ObjectOptions, RetryPolicy, ServiceOptions, WorkflowOptions } from "./restate-sdk/src/types/rpc.cjs";
7
+ import { ObjectOptions, RetryPolicy, ServiceOptions, StatePreload, WorkflowOptions } from "./restate-sdk/src/types/rpc.cjs";
8
8
  import { InvocationId, Request, Target, TypedState, UntypedState } from "./restate-sdk/src/context.cjs";
9
9
  import { LogMetadata, LogSource, LoggerContext, LoggerTransport, RestateLogLevel } from "./restate-sdk/src/logging/logger_transport.cjs";
10
10
  import { DefaultServiceOptions, RestateEndpoint, RestateEndpointBase } from "./restate-sdk/src/endpoint.cjs";
11
11
  import { EndpointOptions } from "./restate-sdk/src/endpoint/types.cjs";
12
12
  import "./restate-sdk/src/index.cjs";
13
13
  import { RestateContainer, RestateTestEnvironment, ServiceEndpointAccess, StateProxy, TestEnvironmentOptions, TestEnvironmentStorage } from "./restate_test_environment.cjs";
14
- export { type DefaultServiceOptions, type Duration, type EndpointOptions, type Hooks, type HooksProvider, type Interceptor, type InvocationId, type JournalValueCodec, type LogMetadata, type LogSource, type LoggerContext, type LoggerTransport, type ObjectOptions, type Request, RestateContainer, type RestateEndpoint, type RestateEndpointBase, type RestateError, type RestateLogLevel, RestateTestEnvironment, type RetryPolicy, type Serde, type ServiceDefinition, type ServiceEndpointAccess, type ServiceOptions, StateProxy, type Target, type TerminalError, type TestEnvironmentOptions, type TestEnvironmentStorage, type TypedState, type UntypedState, type VirtualObjectDefinition, type WorkflowDefinition, type WorkflowOptions };
14
+ export { type DefaultServiceOptions, type Duration, type EndpointOptions, type Hooks, type HooksProvider, type Interceptor, type InvocationId, type JournalValueCodec, type LogMetadata, type LogSource, type LoggerContext, type LoggerTransport, type ObjectOptions, type Request, RestateContainer, type RestateEndpoint, type RestateEndpointBase, type RestateError, type RestateLogLevel, RestateTestEnvironment, type RetryPolicy, type Serde, type ServiceDefinition, type ServiceEndpointAccess, type ServiceOptions, type StatePreload, StateProxy, type Target, type TerminalError, type TestEnvironmentOptions, type TestEnvironmentStorage, type TypedState, type UntypedState, type VirtualObjectDefinition, type WorkflowDefinition, type WorkflowOptions };
package/dist/index.d.ts CHANGED
@@ -4,11 +4,11 @@ import { Duration } from "./restate-sdk-core/src/duration.js";
4
4
  import { JournalValueCodec } from "./restate-sdk-core/src/entry_codec.js";
5
5
  import { RestateError, TerminalError } from "./restate-sdk/src/types/errors.js";
6
6
  import { Hooks, HooksProvider, Interceptor } from "./restate-sdk/src/hooks.js";
7
- import { ObjectOptions, RetryPolicy, ServiceOptions, WorkflowOptions } from "./restate-sdk/src/types/rpc.js";
7
+ import { ObjectOptions, RetryPolicy, ServiceOptions, StatePreload, WorkflowOptions } from "./restate-sdk/src/types/rpc.js";
8
8
  import { InvocationId, Request, Target, TypedState, UntypedState } from "./restate-sdk/src/context.js";
9
9
  import { LogMetadata, LogSource, LoggerContext, LoggerTransport, RestateLogLevel } from "./restate-sdk/src/logging/logger_transport.js";
10
10
  import { DefaultServiceOptions, RestateEndpoint, RestateEndpointBase } from "./restate-sdk/src/endpoint.js";
11
11
  import { EndpointOptions } from "./restate-sdk/src/endpoint/types.js";
12
12
  import "./restate-sdk/src/index.js";
13
13
  import { RestateContainer, RestateTestEnvironment, ServiceEndpointAccess, StateProxy, TestEnvironmentOptions, TestEnvironmentStorage } from "./restate_test_environment.js";
14
- export { type DefaultServiceOptions, type Duration, type EndpointOptions, type Hooks, type HooksProvider, type Interceptor, type InvocationId, type JournalValueCodec, type LogMetadata, type LogSource, type LoggerContext, type LoggerTransport, type ObjectOptions, type Request, RestateContainer, type RestateEndpoint, type RestateEndpointBase, type RestateError, type RestateLogLevel, RestateTestEnvironment, type RetryPolicy, type Serde, type ServiceDefinition, type ServiceEndpointAccess, type ServiceOptions, StateProxy, type Target, type TerminalError, type TestEnvironmentOptions, type TestEnvironmentStorage, type TypedState, type UntypedState, type VirtualObjectDefinition, type WorkflowDefinition, type WorkflowOptions };
14
+ export { type DefaultServiceOptions, type Duration, type EndpointOptions, type Hooks, type HooksProvider, type Interceptor, type InvocationId, type JournalValueCodec, type LogMetadata, type LogSource, type LoggerContext, type LoggerTransport, type ObjectOptions, type Request, RestateContainer, type RestateEndpoint, type RestateEndpointBase, type RestateError, type RestateLogLevel, RestateTestEnvironment, type RetryPolicy, type Serde, type ServiceDefinition, type ServiceEndpointAccess, type ServiceOptions, type StatePreload, StateProxy, type Target, type TerminalError, type TestEnvironmentOptions, type TestEnvironmentStorage, type TypedState, type UntypedState, type VirtualObjectDefinition, type WorkflowDefinition, type WorkflowOptions };
@@ -4,7 +4,7 @@ import { Duration } from "../../restate-sdk-core/src/duration.js";
4
4
  import { JournalValueCodec } from "../../restate-sdk-core/src/entry_codec.js";
5
5
  import { RestateError, TerminalError } from "./types/errors.js";
6
6
  import { Hooks, HooksProvider, Interceptor } from "./hooks.js";
7
- import { ObjectOptions, RetryPolicy, ServiceOptions, WorkflowOptions } from "./types/rpc.js";
7
+ import { ObjectOptions, RetryPolicy, ServiceOptions, StatePreload, WorkflowOptions } from "./types/rpc.js";
8
8
  import { InvocationId, Request, Target, TypedState, UntypedState } from "./context.js";
9
9
  import { LogMetadata, LogSource, LoggerContext, LoggerTransport, RestateLogLevel } from "./logging/logger_transport.js";
10
10
  import { DefaultServiceOptions, RestateEndpoint, RestateEndpointBase } from "./endpoint.js";
@@ -4,7 +4,7 @@ import { Duration } from "../../restate-sdk-core/src/duration.cjs";
4
4
  import { JournalValueCodec } from "../../restate-sdk-core/src/entry_codec.cjs";
5
5
  import { RestateError, TerminalError } from "./types/errors.cjs";
6
6
  import { Hooks, HooksProvider, Interceptor } from "./hooks.cjs";
7
- import { ObjectOptions, RetryPolicy, ServiceOptions, WorkflowOptions } from "./types/rpc.cjs";
7
+ import { ObjectOptions, RetryPolicy, ServiceOptions, StatePreload, WorkflowOptions } from "./types/rpc.cjs";
8
8
  import { InvocationId, Request, Target, TypedState, UntypedState } from "./context.cjs";
9
9
  import { LogMetadata, LogSource, LoggerContext, LoggerTransport, RestateLogLevel } from "./logging/logger_transport.cjs";
10
10
  import { DefaultServiceOptions, RestateEndpoint, RestateEndpointBase } from "./endpoint.cjs";
@@ -4,7 +4,7 @@ import { Duration } from "../../restate-sdk-core/src/duration.js";
4
4
  import { JournalValueCodec } from "../../restate-sdk-core/src/entry_codec.js";
5
5
  import { RestateError, TerminalError } from "./types/errors.js";
6
6
  import { Hooks, HooksProvider, Interceptor } from "./hooks.js";
7
- import { ObjectOptions, RetryPolicy, ServiceOptions, WorkflowOptions } from "./types/rpc.js";
7
+ import { ObjectOptions, RetryPolicy, ServiceOptions, StatePreload, WorkflowOptions } from "./types/rpc.js";
8
8
  import { InvocationId, Request, Target, TypedState, UntypedState } from "./context.js";
9
9
  import { LogMetadata, LogSource, LoggerContext, LoggerTransport, RestateLogLevel } from "./logging/logger_transport.js";
10
10
  import { DefaultServiceOptions, RestateEndpoint, RestateEndpointBase } from "./endpoint.js";
@@ -4,7 +4,7 @@ import { Duration } from "../../restate-sdk-core/src/duration.cjs";
4
4
  import { JournalValueCodec } from "../../restate-sdk-core/src/entry_codec.cjs";
5
5
  import { RestateError, TerminalError } from "./types/errors.cjs";
6
6
  import { Hooks, HooksProvider, Interceptor } from "./hooks.cjs";
7
- import { ObjectOptions, RetryPolicy, ServiceOptions, WorkflowOptions } from "./types/rpc.cjs";
7
+ import { ObjectOptions, RetryPolicy, ServiceOptions, StatePreload, WorkflowOptions } from "./types/rpc.cjs";
8
8
  import { InvocationId, Request, Target, TypedState, UntypedState } from "./context.cjs";
9
9
  import { LogMetadata, LogSource, LoggerContext, LoggerTransport, RestateLogLevel } from "./logging/logger_transport.cjs";
10
10
  import { DefaultServiceOptions, RestateEndpoint, RestateEndpointBase } from "./endpoint.cjs";
@@ -4,7 +4,7 @@ import { Duration } from "../../restate-sdk-core/src/duration.js";
4
4
  import { JournalValueCodec } from "../../restate-sdk-core/src/entry_codec.js";
5
5
  import { RestateError, TerminalError } from "./types/errors.js";
6
6
  import { Hooks, HooksProvider, Interceptor } from "./hooks.js";
7
- import { ObjectOptions, RetryPolicy, ServiceOptions, WorkflowOptions } from "./types/rpc.js";
7
+ import { ObjectOptions, RetryPolicy, ServiceOptions, StatePreload, WorkflowOptions } from "./types/rpc.js";
8
8
  import { InvocationId, Request, Target, TypedState, UntypedState } from "./context.js";
9
9
  import { LogMetadata, LogSource, LoggerContext, LoggerTransport, RestateLogLevel } from "./logging/logger_transport.js";
10
10
  import { DefaultServiceOptions, RestateEndpoint, RestateEndpointBase } from "./endpoint.js";
@@ -5,6 +5,17 @@ import { HooksProvider } from "../hooks.cjs";
5
5
 
6
6
  //#region ../restate-sdk/src/types/rpc.d.ts
7
7
 
8
+ /**
9
+ * Configures which virtual object / workflow state keys are *preloaded* (a.k.a.
10
+ * "eager state") at the start of each invocation.
11
+ *
12
+ * - `{ preload: true }`: preload **all** state (this is the default behavior).
13
+ * - `{ preload: false }`: preload **nothing**.
14
+ * - `{ preload: ["key1", "key2"] }`: preload **only** the listed keys eagerly. This is supported only by Restate >= 1.8
15
+ */
16
+ type StatePreload = {
17
+ preload: boolean | string[];
18
+ };
8
19
  type RetryPolicy = {
9
20
  /**
10
21
  * Max number of retry attempts (including the initial).
@@ -209,10 +220,14 @@ type ServiceOptions = {
209
220
  };
210
221
  type ObjectOptions = ServiceOptions & {
211
222
  /**
212
- * When set to `true`, lazy state will be enabled for all invocations to this service.
213
- *
214
- * *NOTE:* You can set this field only if you register this endpoint against restate-server >= 1.4,
215
- * otherwise the service discovery will fail.
223
+ * Configures which state keys are preloaded ("eager state") for all
224
+ * invocations to this virtual object. Can be overridden per handler. See
225
+ * {@link StatePreload}.
226
+ */
227
+ state?: StatePreload;
228
+ /**
229
+ * @deprecated Use {@link StatePreload | `state`} instead: `enableLazyState: true`
230
+ * is equivalent to `state: { preload: false }`.
216
231
  */
217
232
  enableLazyState?: boolean;
218
233
  };
@@ -225,13 +240,17 @@ type WorkflowOptions = ServiceOptions & {
225
240
  */
226
241
  workflowRetention?: Duration | number;
227
242
  /**
228
- * When set to `true`, lazy state will be enabled for all invocations to this service.
229
- *
230
- * *NOTE:* You can set this field only if you register this endpoint against restate-server >= 1.4,
231
- * otherwise the service discovery will fail.
243
+ * Configures which state keys are preloaded ("eager state") for all
244
+ * invocations to this workflow. Can be overridden per handler. See
245
+ * {@link StatePreload}.
246
+ */
247
+ state?: StatePreload;
248
+ /**
249
+ * @deprecated Use {@link StatePreload | `state`} instead: `enableLazyState: true`
250
+ * is equivalent to `state: { preload: false }`.
232
251
  */
233
252
  enableLazyState?: boolean;
234
253
  };
235
254
  //#endregion
236
- export { ObjectOptions, RetryPolicy, ServiceOptions, WorkflowOptions };
255
+ export { ObjectOptions, RetryPolicy, ServiceOptions, StatePreload, WorkflowOptions };
237
256
  //# sourceMappingURL=rpc.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rpc.d.cts","names":[],"sources":["../../../../../restate-sdk/src/types/rpc.ts"],"sourcesContent":[],"mappings":";;;;;;;KAy9BY,WAAA;;;;;;;;;;;;;;;;;;;;oBAsBQ;;;;;;;gBAQJ;;;;;;KAQJ,cAAA;;;;;;yBAMa;;;;;;;;qBASJ;;;;;;;;;;;sBAYC;;;;;;;;;;;;iBAaL;;;;;;;;;;;gBAaD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAsCoB;;;;;;UAO1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAuDA;;;;;;;;;;;;;;;;;;;;;;;;KAsJE,aAAA,GAAgB;;;;;;;;;KAmIhB,eAAA,GAAkB;;;;;;;sBAOR"}
1
+ {"version":3,"file":"rpc.d.cts","names":[],"sources":["../../../../../restate-sdk/src/types/rpc.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;KA+nBY,YAAA;;;KA8WA,WAAA;;;;;;;;;;;;;;;;;;;;oBAsBQ;;;;;;;gBAQJ;;;;;;KAQJ,cAAA;;;;;;yBAMa;;;;;;;;qBASJ;;;;;;;;;;;sBAYC;;;;;;;;;;;;iBAaL;;;;;;;;;;;gBAaD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAsCoB;;;;;;UAO1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAuDA;;;;;;;;;;;;;;;;;;;;;;;;KAsJE,aAAA,GAAgB;;;;;;UAMlB;;;;;;;KAkIE,eAAA,GAAkB;;;;;;;sBAOR;;;;;;UAMZ"}
@@ -5,6 +5,17 @@ import { HooksProvider } from "../hooks.js";
5
5
 
6
6
  //#region ../restate-sdk/src/types/rpc.d.ts
7
7
 
8
+ /**
9
+ * Configures which virtual object / workflow state keys are *preloaded* (a.k.a.
10
+ * "eager state") at the start of each invocation.
11
+ *
12
+ * - `{ preload: true }`: preload **all** state (this is the default behavior).
13
+ * - `{ preload: false }`: preload **nothing**.
14
+ * - `{ preload: ["key1", "key2"] }`: preload **only** the listed keys eagerly. This is supported only by Restate >= 1.8
15
+ */
16
+ type StatePreload = {
17
+ preload: boolean | string[];
18
+ };
8
19
  type RetryPolicy = {
9
20
  /**
10
21
  * Max number of retry attempts (including the initial).
@@ -209,10 +220,14 @@ type ServiceOptions = {
209
220
  };
210
221
  type ObjectOptions = ServiceOptions & {
211
222
  /**
212
- * When set to `true`, lazy state will be enabled for all invocations to this service.
213
- *
214
- * *NOTE:* You can set this field only if you register this endpoint against restate-server >= 1.4,
215
- * otherwise the service discovery will fail.
223
+ * Configures which state keys are preloaded ("eager state") for all
224
+ * invocations to this virtual object. Can be overridden per handler. See
225
+ * {@link StatePreload}.
226
+ */
227
+ state?: StatePreload;
228
+ /**
229
+ * @deprecated Use {@link StatePreload | `state`} instead: `enableLazyState: true`
230
+ * is equivalent to `state: { preload: false }`.
216
231
  */
217
232
  enableLazyState?: boolean;
218
233
  };
@@ -225,13 +240,17 @@ type WorkflowOptions = ServiceOptions & {
225
240
  */
226
241
  workflowRetention?: Duration | number;
227
242
  /**
228
- * When set to `true`, lazy state will be enabled for all invocations to this service.
229
- *
230
- * *NOTE:* You can set this field only if you register this endpoint against restate-server >= 1.4,
231
- * otherwise the service discovery will fail.
243
+ * Configures which state keys are preloaded ("eager state") for all
244
+ * invocations to this workflow. Can be overridden per handler. See
245
+ * {@link StatePreload}.
246
+ */
247
+ state?: StatePreload;
248
+ /**
249
+ * @deprecated Use {@link StatePreload | `state`} instead: `enableLazyState: true`
250
+ * is equivalent to `state: { preload: false }`.
232
251
  */
233
252
  enableLazyState?: boolean;
234
253
  };
235
254
  //#endregion
236
- export { ObjectOptions, RetryPolicy, ServiceOptions, WorkflowOptions };
255
+ export { ObjectOptions, RetryPolicy, ServiceOptions, StatePreload, WorkflowOptions };
237
256
  //# sourceMappingURL=rpc.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rpc.d.ts","names":[],"sources":["../../../../../restate-sdk/src/types/rpc.ts"],"sourcesContent":[],"mappings":";;;;;;;KAy9BY,WAAA;;;;;;;;;;;;;;;;;;;;oBAsBQ;;;;;;;gBAQJ;;;;;;KAQJ,cAAA;;;;;;yBAMa;;;;;;;;qBASJ;;;;;;;;;;;sBAYC;;;;;;;;;;;;iBAaL;;;;;;;;;;;gBAaD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAsCoB;;;;;;UAO1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAuDA;;;;;;;;;;;;;;;;;;;;;;;;KAsJE,aAAA,GAAgB;;;;;;;;;KAmIhB,eAAA,GAAkB;;;;;;;sBAOR"}
1
+ {"version":3,"file":"rpc.d.ts","names":[],"sources":["../../../../../restate-sdk/src/types/rpc.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;KA+nBY,YAAA;;;KA8WA,WAAA;;;;;;;;;;;;;;;;;;;;oBAsBQ;;;;;;;gBAQJ;;;;;;KAQJ,cAAA;;;;;;yBAMa;;;;;;;;qBASJ;;;;;;;;;;;sBAYC;;;;;;;;;;;;iBAaL;;;;;;;;;;;gBAaD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAsCoB;;;;;;UAO1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAuDA;;;;;;;;;;;;;;;;;;;;;;;;KAsJE,aAAA,GAAgB;;;;;;UAMlB;;;;;;;KAkIE,eAAA,GAAkB;;;;;;;sBAOR;;;;;;UAMZ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@restatedev/restate-sdk-testcontainers",
3
- "version": "1.17.4",
3
+ "version": "1.18.0",
4
4
  "description": "Typescript SDK for Restate",
5
5
  "author": "Restate Developers",
6
6
  "email": "code@restate.dev",
@@ -34,8 +34,8 @@
34
34
  "dependencies": {
35
35
  "apache-arrow": "^18.0.0",
36
36
  "testcontainers": "^11.12.0",
37
- "@restatedev/restate-sdk": "1.17.4",
38
- "@restatedev/restate-sdk-clients": "1.17.4"
37
+ "@restatedev/restate-sdk": "1.18.0",
38
+ "@restatedev/restate-sdk-clients": "1.18.0"
39
39
  },
40
40
  "devDependencies": {},
41
41
  "scripts": {