@restatedev/restate-sdk-cloudflare-workers 1.15.0-rc.6 → 1.15.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.
Files changed (87) hide show
  1. package/dist/common_api.d.cts +1 -1
  2. package/dist/common_api.d.cts.map +1 -1
  3. package/dist/common_api.d.ts +1 -1
  4. package/dist/common_api.d.ts.map +1 -1
  5. package/dist/common_api.js.map +1 -1
  6. package/dist/context.d.cts +95 -1
  7. package/dist/context.d.cts.map +1 -1
  8. package/dist/context.d.ts +95 -1
  9. package/dist/context.d.ts.map +1 -1
  10. package/dist/context.js.map +1 -1
  11. package/dist/context_impl.cjs +10 -2
  12. package/dist/context_impl.d.ts.map +1 -0
  13. package/dist/context_impl.js +10 -2
  14. package/dist/context_impl.js.map +1 -1
  15. package/dist/endpoint/components.d.ts.map +1 -0
  16. package/dist/endpoint/discovery.d.ts +184 -0
  17. package/dist/endpoint/discovery.d.ts.map +1 -0
  18. package/dist/endpoint/discovery.js +7 -0
  19. package/dist/endpoint/discovery.js.map +1 -0
  20. package/dist/endpoint/endpoint.d.ts.map +1 -0
  21. package/dist/endpoint/handlers/core_logging.d.ts +10 -0
  22. package/dist/endpoint/handlers/core_logging.d.ts.map +1 -0
  23. package/dist/endpoint/handlers/discovery.d.ts +5 -0
  24. package/dist/endpoint/handlers/discovery.d.ts.map +1 -0
  25. package/dist/endpoint/handlers/fetch.d.ts +5 -0
  26. package/dist/endpoint/handlers/fetch.d.ts.map +1 -0
  27. package/dist/endpoint/handlers/generic.cjs +3 -0
  28. package/dist/endpoint/handlers/generic.d.ts +5 -0
  29. package/dist/endpoint/handlers/generic.d.ts.map +1 -0
  30. package/dist/endpoint/handlers/generic.js +3 -0
  31. package/dist/endpoint/handlers/generic.js.map +1 -1
  32. package/dist/endpoint/handlers/lambda.d.ts +10 -0
  33. package/dist/endpoint/handlers/lambda.d.ts.map +1 -0
  34. package/dist/endpoint/handlers/preview.d.ts +5 -0
  35. package/dist/endpoint/handlers/preview.d.ts.map +1 -0
  36. package/dist/endpoint/handlers/types.d.ts.map +1 -0
  37. package/dist/endpoint/handlers/types.js +2 -0
  38. package/dist/endpoint/handlers/types.js.map +1 -0
  39. package/dist/endpoint/handlers/utils.d.ts +23 -0
  40. package/dist/endpoint/handlers/utils.d.ts.map +1 -0
  41. package/dist/endpoint/handlers/vm/sdk_shared_core_wasm_bindings.d.ts +5 -2
  42. package/dist/endpoint/handlers/vm/sdk_shared_core_wasm_bindings_bg.js +54 -6
  43. package/dist/endpoint/handlers/vm/sdk_shared_core_wasm_bindings_bg.wasm +0 -0
  44. package/dist/endpoint/handlers/vm/sdk_shared_core_wasm_bindings_bg.wasm.d.ts +5 -2
  45. package/dist/endpoint/node_endpoint.d.ts +28 -0
  46. package/dist/endpoint/node_endpoint.d.ts.map +1 -0
  47. package/dist/endpoint/types.js +2 -0
  48. package/dist/endpoint/types.js.map +1 -0
  49. package/dist/endpoint/withOptions.d.ts +4 -0
  50. package/dist/endpoint/withOptions.d.ts.map +1 -0
  51. package/dist/endpoint.js +12 -0
  52. package/dist/endpoint.js.map +1 -0
  53. package/dist/error_sanitization.d.ts +13 -0
  54. package/dist/error_sanitization.d.ts.map +1 -0
  55. package/dist/fetch.d.cts +2 -2
  56. package/dist/fetch.d.ts +2 -2
  57. package/dist/hooks.js +2 -0
  58. package/dist/hooks.js.map +1 -0
  59. package/dist/index.d.cts +2 -2
  60. package/dist/index.d.ts +2 -2
  61. package/dist/index.d.ts.map +1 -0
  62. package/dist/index.js.map +1 -0
  63. package/dist/io.d.ts.map +1 -0
  64. package/dist/lambda.d.cts +2 -2
  65. package/dist/lambda.d.ts +2 -2
  66. package/dist/logging/console_logger_transport.d.ts +5 -0
  67. package/dist/logging/console_logger_transport.d.ts.map +1 -0
  68. package/dist/logging/logger.d.ts.map +1 -0
  69. package/dist/node.d.cts +2 -2
  70. package/dist/node.d.ts +2 -2
  71. package/dist/package.cjs +1 -1
  72. package/dist/package.js +1 -1
  73. package/dist/package.js.map +1 -1
  74. package/dist/types/rpc.cjs +7 -3
  75. package/dist/types/rpc.d.cts +68 -5
  76. package/dist/types/rpc.d.cts.map +1 -1
  77. package/dist/types/rpc.d.ts +68 -5
  78. package/dist/types/rpc.d.ts.map +1 -1
  79. package/dist/types/rpc.js +7 -3
  80. package/dist/types/rpc.js.map +1 -1
  81. package/dist/user_agent.d.ts +2 -0
  82. package/dist/user_agent.d.ts.map +1 -0
  83. package/dist/utils/external_progress_channel.d.ts +19 -0
  84. package/dist/utils/external_progress_channel.d.ts.map +1 -0
  85. package/dist/utils/rand.d.ts +13 -0
  86. package/dist/utils/rand.d.ts.map +1 -0
  87. package/package.json +3 -3
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { CancelledError, PauseError, RestateError, RetryableError, RetryableErrorOptions, TerminalError, TimeoutError } from "./types/errors.cjs";
2
2
  import { Hooks, HooksProvider, Interceptor } from "./hooks.cjs";
3
3
  import { Client, ClientCallOptions, ClientSendOptions, InferArg, ObjectHandlerOpts, ObjectOptions, ObjectOpts, Opts, RemoveVoidArgument, RetryPolicy, SendClient, SendOpts, ServiceHandlerOpts, ServiceOptions, ServiceOpts, WorkflowHandlerOpts, WorkflowOptions, WorkflowOpts, handlers, object, rpc, service, workflow } from "./types/rpc.cjs";
4
- import { Context, ContextDate, DurablePromise, GenericCall, GenericSend, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, KeyValueStore, ObjectContext, ObjectSharedContext, Rand, Request, RestatePromise, RunAction, RunOptions, SignalReference, Target, TypedState, UntypedState, WorkflowContext, WorkflowSharedContext } from "./context.cjs";
4
+ import { Context, ContextDate, DurablePromise, GenericCall, GenericSend, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, KeyValueStore, ObjectContext, ObjectSharedContext, Rand, Request, RestatePromise, RunAction, RunOptions, ScopedContext, SignalReference, Target, TypedState, UntypedState, WorkflowContext, WorkflowSharedContext } from "./context.cjs";
5
5
  import { LogMetadata, LogSource, LoggerContext, LoggerTransport, RestateLogLevel } from "./logging/logger_transport.cjs";
6
6
  import { DefaultServiceOptions, RestateEndpoint, RestateEndpointBase } from "./endpoint.cjs";
7
7
  import { internal_d_exports } from "./internal.cjs";
@@ -9,4 +9,4 @@ import { isRestatePromise } from "./promises.cjs";
9
9
  import { EndpointOptions } from "./endpoint/types.cjs";
10
10
  import { CombineablePromise, Duration, JournalValueCodec, ObjectHandler, RestateContext, RestateObjectContext, RestateObjectSharedContext, RestateWorkflowContext, RestateWorkflowSharedContext, Serde, Service, ServiceDefinition, ServiceDefinitionFrom, ServiceHandler, VirtualObject, VirtualObjectDefinition, VirtualObjectDefinitionFrom, Workflow, WorkflowDefinition, WorkflowDefinitionFrom, WorkflowHandler, WorkflowSharedHandler, createObjectHandler, createObjectSharedHandler, createServiceHandler, createWorkflowHandler, createWorkflowSharedHandler, serde } from "./common_api.cjs";
11
11
  import { NodeEndpointOptions, ServeOptions, createEndpointHandler, endpoint, serve } from "./node.cjs";
12
- export { CancelledError, Client, ClientCallOptions, ClientSendOptions, CombineablePromise, Context, ContextDate, DefaultServiceOptions, DurablePromise, Duration, EndpointOptions, GenericCall, GenericSend, Hooks, HooksProvider, InferArg, Interceptor, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, JournalValueCodec, KeyValueStore, LogMetadata, LogSource, LoggerContext, LoggerTransport, NodeEndpointOptions, ObjectContext, ObjectHandler, ObjectHandlerOpts, ObjectOptions, ObjectOpts, ObjectSharedContext, Opts, PauseError, Rand, RemoveVoidArgument, Request, RestateContext, RestateEndpoint, RestateEndpointBase, RestateError, RestateLogLevel, RestateObjectContext, RestateObjectSharedContext, RestatePromise, RestateWorkflowContext, RestateWorkflowSharedContext, RetryPolicy, RetryableError, RetryableErrorOptions, RunAction, RunOptions, SendClient, SendOpts, Serde, ServeOptions, Service, ServiceDefinition, ServiceDefinitionFrom, ServiceHandler, ServiceHandlerOpts, ServiceOptions, ServiceOpts, SignalReference, Target, TerminalError, TimeoutError, TypedState, UntypedState, VirtualObject, VirtualObjectDefinition, VirtualObjectDefinitionFrom, Workflow, WorkflowContext, WorkflowDefinition, WorkflowDefinitionFrom, WorkflowHandler, WorkflowHandlerOpts, WorkflowOptions, WorkflowOpts, WorkflowSharedContext, WorkflowSharedHandler, createEndpointHandler, createObjectHandler, createObjectSharedHandler, createServiceHandler, createWorkflowHandler, createWorkflowSharedHandler, endpoint, handlers, internal_d_exports as internal, isRestatePromise, object, rpc, serde, serve, service, workflow };
12
+ export { CancelledError, Client, ClientCallOptions, ClientSendOptions, CombineablePromise, Context, ContextDate, DefaultServiceOptions, DurablePromise, Duration, EndpointOptions, GenericCall, GenericSend, Hooks, HooksProvider, InferArg, Interceptor, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, JournalValueCodec, KeyValueStore, LogMetadata, LogSource, LoggerContext, LoggerTransport, NodeEndpointOptions, ObjectContext, ObjectHandler, ObjectHandlerOpts, ObjectOptions, ObjectOpts, ObjectSharedContext, Opts, PauseError, Rand, RemoveVoidArgument, Request, RestateContext, RestateEndpoint, RestateEndpointBase, RestateError, RestateLogLevel, RestateObjectContext, RestateObjectSharedContext, RestatePromise, RestateWorkflowContext, RestateWorkflowSharedContext, RetryPolicy, RetryableError, RetryableErrorOptions, RunAction, RunOptions, ScopedContext, SendClient, SendOpts, Serde, ServeOptions, Service, ServiceDefinition, ServiceDefinitionFrom, ServiceHandler, ServiceHandlerOpts, ServiceOptions, ServiceOpts, SignalReference, Target, TerminalError, TimeoutError, TypedState, UntypedState, VirtualObject, VirtualObjectDefinition, VirtualObjectDefinitionFrom, Workflow, WorkflowContext, WorkflowDefinition, WorkflowDefinitionFrom, WorkflowHandler, WorkflowHandlerOpts, WorkflowOptions, WorkflowOpts, WorkflowSharedContext, WorkflowSharedHandler, createEndpointHandler, createObjectHandler, createObjectSharedHandler, createServiceHandler, createWorkflowHandler, createWorkflowSharedHandler, endpoint, handlers, internal_d_exports as internal, isRestatePromise, object, rpc, serde, serve, service, workflow };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { CancelledError, PauseError, RestateError, RetryableError, RetryableErrorOptions, TerminalError, TimeoutError } from "./types/errors.js";
2
2
  import { Hooks, HooksProvider, Interceptor } from "./hooks.js";
3
3
  import { Client, ClientCallOptions, ClientSendOptions, InferArg, ObjectHandlerOpts, ObjectOptions, ObjectOpts, Opts, RemoveVoidArgument, RetryPolicy, SendClient, SendOpts, ServiceHandlerOpts, ServiceOptions, ServiceOpts, WorkflowHandlerOpts, WorkflowOptions, WorkflowOpts, handlers, object, rpc, service, workflow } from "./types/rpc.js";
4
- import { Context, ContextDate, DurablePromise, GenericCall, GenericSend, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, KeyValueStore, ObjectContext, ObjectSharedContext, Rand, Request, RestatePromise, RunAction, RunOptions, SignalReference, Target, TypedState, UntypedState, WorkflowContext, WorkflowSharedContext } from "./context.js";
4
+ import { Context, ContextDate, DurablePromise, GenericCall, GenericSend, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, KeyValueStore, ObjectContext, ObjectSharedContext, Rand, Request, RestatePromise, RunAction, RunOptions, ScopedContext, SignalReference, Target, TypedState, UntypedState, WorkflowContext, WorkflowSharedContext } from "./context.js";
5
5
  import { LogMetadata, LogSource, LoggerContext, LoggerTransport, RestateLogLevel } from "./logging/logger_transport.js";
6
6
  import { DefaultServiceOptions, RestateEndpoint, RestateEndpointBase } from "./endpoint.js";
7
7
  import { internal_d_exports } from "./internal.js";
@@ -9,4 +9,4 @@ import { isRestatePromise } from "./promises.js";
9
9
  import { EndpointOptions } from "./endpoint/types.js";
10
10
  import { CombineablePromise, Duration, JournalValueCodec, ObjectHandler, RestateContext, RestateObjectContext, RestateObjectSharedContext, RestateWorkflowContext, RestateWorkflowSharedContext, Serde, Service, ServiceDefinition, ServiceDefinitionFrom, ServiceHandler, VirtualObject, VirtualObjectDefinition, VirtualObjectDefinitionFrom, Workflow, WorkflowDefinition, WorkflowDefinitionFrom, WorkflowHandler, WorkflowSharedHandler, createObjectHandler, createObjectSharedHandler, createServiceHandler, createWorkflowHandler, createWorkflowSharedHandler, serde } from "./common_api.js";
11
11
  import { NodeEndpointOptions, ServeOptions, createEndpointHandler, endpoint, serve } from "./node.js";
12
- export { CancelledError, Client, ClientCallOptions, ClientSendOptions, CombineablePromise, Context, ContextDate, DefaultServiceOptions, DurablePromise, Duration, EndpointOptions, GenericCall, GenericSend, Hooks, HooksProvider, InferArg, Interceptor, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, JournalValueCodec, KeyValueStore, LogMetadata, LogSource, LoggerContext, LoggerTransport, NodeEndpointOptions, ObjectContext, ObjectHandler, ObjectHandlerOpts, ObjectOptions, ObjectOpts, ObjectSharedContext, Opts, PauseError, Rand, RemoveVoidArgument, Request, RestateContext, RestateEndpoint, RestateEndpointBase, RestateError, RestateLogLevel, RestateObjectContext, RestateObjectSharedContext, RestatePromise, RestateWorkflowContext, RestateWorkflowSharedContext, RetryPolicy, RetryableError, RetryableErrorOptions, RunAction, RunOptions, SendClient, SendOpts, Serde, ServeOptions, Service, ServiceDefinition, ServiceDefinitionFrom, ServiceHandler, ServiceHandlerOpts, ServiceOptions, ServiceOpts, SignalReference, Target, TerminalError, TimeoutError, TypedState, UntypedState, VirtualObject, VirtualObjectDefinition, VirtualObjectDefinitionFrom, Workflow, WorkflowContext, WorkflowDefinition, WorkflowDefinitionFrom, WorkflowHandler, WorkflowHandlerOpts, WorkflowOptions, WorkflowOpts, WorkflowSharedContext, WorkflowSharedHandler, createEndpointHandler, createObjectHandler, createObjectSharedHandler, createServiceHandler, createWorkflowHandler, createWorkflowSharedHandler, endpoint, handlers, internal_d_exports as internal, isRestatePromise, object, rpc, serde, serve, service, workflow };
12
+ export { CancelledError, Client, ClientCallOptions, ClientSendOptions, CombineablePromise, Context, ContextDate, DefaultServiceOptions, DurablePromise, Duration, EndpointOptions, GenericCall, GenericSend, Hooks, HooksProvider, InferArg, Interceptor, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, JournalValueCodec, KeyValueStore, LogMetadata, LogSource, LoggerContext, LoggerTransport, NodeEndpointOptions, ObjectContext, ObjectHandler, ObjectHandlerOpts, ObjectOptions, ObjectOpts, ObjectSharedContext, Opts, PauseError, Rand, RemoveVoidArgument, Request, RestateContext, RestateEndpoint, RestateEndpointBase, RestateError, RestateLogLevel, RestateObjectContext, RestateObjectSharedContext, RestatePromise, RestateWorkflowContext, RestateWorkflowSharedContext, RetryPolicy, RetryableError, RetryableErrorOptions, RunAction, RunOptions, ScopedContext, SendClient, SendOpts, Serde, ServeOptions, Service, ServiceDefinition, ServiceDefinitionFrom, ServiceHandler, ServiceHandlerOpts, ServiceOptions, ServiceOpts, SignalReference, Target, TerminalError, TimeoutError, TypedState, UntypedState, VirtualObject, VirtualObjectDefinition, VirtualObjectDefinitionFrom, Workflow, WorkflowContext, WorkflowDefinition, WorkflowDefinitionFrom, WorkflowHandler, WorkflowHandlerOpts, WorkflowOptions, WorkflowOpts, WorkflowSharedContext, WorkflowSharedHandler, createEndpointHandler, createObjectHandler, createObjectSharedHandler, createServiceHandler, createWorkflowHandler, createWorkflowSharedHandler, endpoint, handlers, internal_d_exports as internal, isRestatePromise, object, rpc, serde, serve, service, workflow };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAWA,cAAc,WAAW,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,cAAc,WAAW,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"io.d.ts","sourceRoot":"","sources":["../src/io.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,KAAK,EAAE,MAAM,yDAAyD,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAE/E;;;;;GAKG;AACH,qBAAa,SAAS;IAKlB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAPhC,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAuB;gBAG5B,MAAM,EAAE,EAAE,CAAC,MAAM,EACjB,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,uBAAuB,EAChC,aAAa,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI;IAOlD;;;OAGG;IACH,IAAI,IAAI,OAAO,CAAC,WAAW,CAAC;YAKd,GAAG;CAsBlB;AAED;;GAEG;AACH,qBAAa,UAAU;IAEnB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,YAAY;gBADZ,MAAM,EAAE,EAAE,CAAC,MAAM,EACjB,YAAY,EAAE,YAAY;IAGvC,iBAAiB;CAMxB"}
package/dist/lambda.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { CancelledError, PauseError, RestateError, RetryableError, RetryableErrorOptions, TerminalError, TimeoutError } from "./types/errors.cjs";
2
2
  import { Hooks, HooksProvider, Interceptor } from "./hooks.cjs";
3
3
  import { Client, ClientCallOptions, ClientSendOptions, InferArg, ObjectHandlerOpts, ObjectOptions, ObjectOpts, Opts, RemoveVoidArgument, RetryPolicy, SendClient, SendOpts, ServiceHandlerOpts, ServiceOptions, ServiceOpts, WorkflowHandlerOpts, WorkflowOptions, WorkflowOpts, handlers, object, rpc, service, workflow } from "./types/rpc.cjs";
4
- import { Context, ContextDate, DurablePromise, GenericCall, GenericSend, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, KeyValueStore, ObjectContext, ObjectSharedContext, Rand, Request, RestatePromise, RunAction, RunOptions, SignalReference, Target, TypedState, UntypedState, WorkflowContext, WorkflowSharedContext } from "./context.cjs";
4
+ import { Context, ContextDate, DurablePromise, GenericCall, GenericSend, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, KeyValueStore, ObjectContext, ObjectSharedContext, Rand, Request, RestatePromise, RunAction, RunOptions, ScopedContext, SignalReference, Target, TypedState, UntypedState, WorkflowContext, WorkflowSharedContext } from "./context.cjs";
5
5
  import { LogMetadata, LogSource, LoggerContext, LoggerTransport, RestateLogLevel } from "./logging/logger_transport.cjs";
6
6
  import { DefaultServiceOptions, RestateEndpoint, RestateEndpointBase } from "./endpoint.cjs";
7
7
  import { internal_d_exports } from "./internal.cjs";
@@ -31,5 +31,5 @@ declare function endpoint(): LambdaEndpoint;
31
31
  */
32
32
  declare function createEndpointHandler(options: EndpointOptions): (event: any, ctx: any) => Promise<any>;
33
33
  //#endregion
34
- export { CancelledError, Client, ClientCallOptions, ClientSendOptions, CombineablePromise, Context, ContextDate, DefaultServiceOptions, DurablePromise, Duration, EndpointOptions, GenericCall, GenericSend, Hooks, HooksProvider, InferArg, Interceptor, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, JournalValueCodec, KeyValueStore, type LambdaEndpoint, LogMetadata, LogSource, LoggerContext, LoggerTransport, ObjectContext, ObjectHandler, ObjectHandlerOpts, ObjectOptions, ObjectOpts, ObjectSharedContext, Opts, PauseError, Rand, RemoveVoidArgument, Request, RestateContext, RestateEndpoint, RestateEndpointBase, RestateError, RestateLogLevel, RestateObjectContext, RestateObjectSharedContext, RestatePromise, RestateWorkflowContext, RestateWorkflowSharedContext, RetryPolicy, RetryableError, RetryableErrorOptions, RunAction, RunOptions, SendClient, SendOpts, Serde, Service, ServiceDefinition, ServiceDefinitionFrom, ServiceHandler, ServiceHandlerOpts, ServiceOptions, ServiceOpts, SignalReference, Target, TerminalError, TimeoutError, TypedState, UntypedState, VirtualObject, VirtualObjectDefinition, VirtualObjectDefinitionFrom, Workflow, WorkflowContext, WorkflowDefinition, WorkflowDefinitionFrom, WorkflowHandler, WorkflowHandlerOpts, WorkflowOptions, WorkflowOpts, WorkflowSharedContext, WorkflowSharedHandler, createEndpointHandler, createObjectHandler, createObjectSharedHandler, createServiceHandler, createWorkflowHandler, createWorkflowSharedHandler, endpoint, handlers, internal_d_exports as internal, isRestatePromise, object, rpc, serde, service, workflow };
34
+ export { CancelledError, Client, ClientCallOptions, ClientSendOptions, CombineablePromise, Context, ContextDate, DefaultServiceOptions, DurablePromise, Duration, EndpointOptions, GenericCall, GenericSend, Hooks, HooksProvider, InferArg, Interceptor, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, JournalValueCodec, KeyValueStore, type LambdaEndpoint, LogMetadata, LogSource, LoggerContext, LoggerTransport, ObjectContext, ObjectHandler, ObjectHandlerOpts, ObjectOptions, ObjectOpts, ObjectSharedContext, Opts, PauseError, Rand, RemoveVoidArgument, Request, RestateContext, RestateEndpoint, RestateEndpointBase, RestateError, RestateLogLevel, RestateObjectContext, RestateObjectSharedContext, RestatePromise, RestateWorkflowContext, RestateWorkflowSharedContext, RetryPolicy, RetryableError, RetryableErrorOptions, RunAction, RunOptions, ScopedContext, SendClient, SendOpts, Serde, Service, ServiceDefinition, ServiceDefinitionFrom, ServiceHandler, ServiceHandlerOpts, ServiceOptions, ServiceOpts, SignalReference, Target, TerminalError, TimeoutError, TypedState, UntypedState, VirtualObject, VirtualObjectDefinition, VirtualObjectDefinitionFrom, Workflow, WorkflowContext, WorkflowDefinition, WorkflowDefinitionFrom, WorkflowHandler, WorkflowHandlerOpts, WorkflowOptions, WorkflowOpts, WorkflowSharedContext, WorkflowSharedHandler, createEndpointHandler, createObjectHandler, createObjectSharedHandler, createServiceHandler, createWorkflowHandler, createWorkflowSharedHandler, endpoint, handlers, internal_d_exports as internal, isRestatePromise, object, rpc, serde, service, workflow };
35
35
  //# sourceMappingURL=lambda.d.cts.map
package/dist/lambda.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { CancelledError, PauseError, RestateError, RetryableError, RetryableErrorOptions, TerminalError, TimeoutError } from "./types/errors.js";
2
2
  import { Hooks, HooksProvider, Interceptor } from "./hooks.js";
3
3
  import { Client, ClientCallOptions, ClientSendOptions, InferArg, ObjectHandlerOpts, ObjectOptions, ObjectOpts, Opts, RemoveVoidArgument, RetryPolicy, SendClient, SendOpts, ServiceHandlerOpts, ServiceOptions, ServiceOpts, WorkflowHandlerOpts, WorkflowOptions, WorkflowOpts, handlers, object, rpc, service, workflow } from "./types/rpc.js";
4
- import { Context, ContextDate, DurablePromise, GenericCall, GenericSend, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, KeyValueStore, ObjectContext, ObjectSharedContext, Rand, Request, RestatePromise, RunAction, RunOptions, SignalReference, Target, TypedState, UntypedState, WorkflowContext, WorkflowSharedContext } from "./context.js";
4
+ import { Context, ContextDate, DurablePromise, GenericCall, GenericSend, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, KeyValueStore, ObjectContext, ObjectSharedContext, Rand, Request, RestatePromise, RunAction, RunOptions, ScopedContext, SignalReference, Target, TypedState, UntypedState, WorkflowContext, WorkflowSharedContext } from "./context.js";
5
5
  import { LogMetadata, LogSource, LoggerContext, LoggerTransport, RestateLogLevel } from "./logging/logger_transport.js";
6
6
  import { DefaultServiceOptions, RestateEndpoint, RestateEndpointBase } from "./endpoint.js";
7
7
  import { internal_d_exports } from "./internal.js";
@@ -31,5 +31,5 @@ declare function endpoint(): LambdaEndpoint;
31
31
  */
32
32
  declare function createEndpointHandler(options: EndpointOptions): (event: any, ctx: any) => Promise<any>;
33
33
  //#endregion
34
- export { CancelledError, Client, ClientCallOptions, ClientSendOptions, CombineablePromise, Context, ContextDate, DefaultServiceOptions, DurablePromise, Duration, EndpointOptions, GenericCall, GenericSend, Hooks, HooksProvider, InferArg, Interceptor, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, JournalValueCodec, KeyValueStore, type LambdaEndpoint, LogMetadata, LogSource, LoggerContext, LoggerTransport, ObjectContext, ObjectHandler, ObjectHandlerOpts, ObjectOptions, ObjectOpts, ObjectSharedContext, Opts, PauseError, Rand, RemoveVoidArgument, Request, RestateContext, RestateEndpoint, RestateEndpointBase, RestateError, RestateLogLevel, RestateObjectContext, RestateObjectSharedContext, RestatePromise, RestateWorkflowContext, RestateWorkflowSharedContext, RetryPolicy, RetryableError, RetryableErrorOptions, RunAction, RunOptions, SendClient, SendOpts, Serde, Service, ServiceDefinition, ServiceDefinitionFrom, ServiceHandler, ServiceHandlerOpts, ServiceOptions, ServiceOpts, SignalReference, Target, TerminalError, TimeoutError, TypedState, UntypedState, VirtualObject, VirtualObjectDefinition, VirtualObjectDefinitionFrom, Workflow, WorkflowContext, WorkflowDefinition, WorkflowDefinitionFrom, WorkflowHandler, WorkflowHandlerOpts, WorkflowOptions, WorkflowOpts, WorkflowSharedContext, WorkflowSharedHandler, createEndpointHandler, createObjectHandler, createObjectSharedHandler, createServiceHandler, createWorkflowHandler, createWorkflowSharedHandler, endpoint, handlers, internal_d_exports as internal, isRestatePromise, object, rpc, serde, service, workflow };
34
+ export { CancelledError, Client, ClientCallOptions, ClientSendOptions, CombineablePromise, Context, ContextDate, DefaultServiceOptions, DurablePromise, Duration, EndpointOptions, GenericCall, GenericSend, Hooks, HooksProvider, InferArg, Interceptor, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, JournalValueCodec, KeyValueStore, type LambdaEndpoint, LogMetadata, LogSource, LoggerContext, LoggerTransport, ObjectContext, ObjectHandler, ObjectHandlerOpts, ObjectOptions, ObjectOpts, ObjectSharedContext, Opts, PauseError, Rand, RemoveVoidArgument, Request, RestateContext, RestateEndpoint, RestateEndpointBase, RestateError, RestateLogLevel, RestateObjectContext, RestateObjectSharedContext, RestatePromise, RestateWorkflowContext, RestateWorkflowSharedContext, RetryPolicy, RetryableError, RetryableErrorOptions, RunAction, RunOptions, ScopedContext, SendClient, SendOpts, Serde, Service, ServiceDefinition, ServiceDefinitionFrom, ServiceHandler, ServiceHandlerOpts, ServiceOptions, ServiceOpts, SignalReference, Target, TerminalError, TimeoutError, TypedState, UntypedState, VirtualObject, VirtualObjectDefinition, VirtualObjectDefinitionFrom, Workflow, WorkflowContext, WorkflowDefinition, WorkflowDefinitionFrom, WorkflowHandler, WorkflowHandlerOpts, WorkflowOptions, WorkflowOpts, WorkflowSharedContext, WorkflowSharedHandler, createEndpointHandler, createObjectHandler, createObjectSharedHandler, createServiceHandler, createWorkflowHandler, createWorkflowSharedHandler, endpoint, handlers, internal_d_exports as internal, isRestatePromise, object, rpc, serde, service, workflow };
35
35
  //# sourceMappingURL=lambda.d.ts.map
@@ -0,0 +1,5 @@
1
+ import type { LoggerTransport } from "./logger_transport.js";
2
+ import { RestateLogLevel } from "./logger_transport.js";
3
+ export declare const defaultLoggerTransport: LoggerTransport;
4
+ export declare const DEFAULT_CONSOLE_LOGGER_LOG_LEVEL: RestateLogLevel;
5
+ //# sourceMappingURL=console_logger_transport.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"console_logger_transport.d.ts","sourceRoot":"","sources":["../../src/logging/console_logger_transport.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAEV,eAAe,EAEhB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,eAAO,MAAM,sBAAsB,EAAE,eA0BpC,CAAC;AAKF,eAAO,MAAM,gCAAgC,iBAAwB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/logging/logger.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EACV,aAAa,EACb,eAAe,EACf,SAAS,EACV,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD;;GAEG;AACH,MAAM,WAAW,MAAO,SAAQ,OAAO;IACrC,WAAW,CACT,KAAK,EAAE,eAAe,EACtB,OAAO,CAAC,EAAE,GAAG,EACb,GAAG,cAAc,EAAE,GAAG,EAAE,GACvB,IAAI,CAAC;CACT;AAED,wBAAgB,YAAY,CAC1B,eAAe,EAAE,eAAe,EAChC,MAAM,EAAE,SAAS,EACjB,OAAO,CAAC,EAAE,aAAa,EACvB,WAAW,GAAE,MAAM,OAAqB,GACvC,MAAM,CA2FR"}
package/dist/node.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { CancelledError, PauseError, RestateError, RetryableError, RetryableErrorOptions, TerminalError, TimeoutError } from "./types/errors.cjs";
2
2
  import { Hooks, HooksProvider, Interceptor } from "./hooks.cjs";
3
3
  import { Client, ClientCallOptions, ClientSendOptions, InferArg, ObjectHandlerOpts, ObjectOptions, ObjectOpts, Opts, RemoveVoidArgument, RetryPolicy, SendClient, SendOpts, ServiceHandlerOpts, ServiceOptions, ServiceOpts, WorkflowHandlerOpts, WorkflowOptions, WorkflowOpts, handlers, object, rpc, service, workflow } from "./types/rpc.cjs";
4
- import { Context, ContextDate, DurablePromise, GenericCall, GenericSend, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, KeyValueStore, ObjectContext, ObjectSharedContext, Rand, Request, RestatePromise, RunAction, RunOptions, SignalReference, Target, TypedState, UntypedState, WorkflowContext, WorkflowSharedContext } from "./context.cjs";
4
+ import { Context, ContextDate, DurablePromise, GenericCall, GenericSend, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, KeyValueStore, ObjectContext, ObjectSharedContext, Rand, Request, RestatePromise, RunAction, RunOptions, ScopedContext, SignalReference, Target, TypedState, UntypedState, WorkflowContext, WorkflowSharedContext } from "./context.cjs";
5
5
  import { LogMetadata, LogSource, LoggerContext, LoggerTransport, RestateLogLevel } from "./logging/logger_transport.cjs";
6
6
  import { DefaultServiceOptions, RestateEndpoint, RestateEndpointBase } from "./endpoint.cjs";
7
7
  import { internal_d_exports } from "./internal.cjs";
@@ -86,5 +86,5 @@ declare function serve({
86
86
  ...options
87
87
  }: ServeOptions): Promise<number>;
88
88
  //#endregion
89
- export { CancelledError, Client, ClientCallOptions, ClientSendOptions, CombineablePromise, Context, ContextDate, DefaultServiceOptions, DurablePromise, Duration, EndpointOptions, GenericCall, GenericSend, Hooks, HooksProvider, InferArg, Interceptor, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, JournalValueCodec, KeyValueStore, LogMetadata, LogSource, LoggerContext, LoggerTransport, NodeEndpointOptions, ObjectContext, ObjectHandler, ObjectHandlerOpts, ObjectOptions, ObjectOpts, ObjectSharedContext, Opts, PauseError, Rand, RemoveVoidArgument, Request, RestateContext, RestateEndpoint, RestateEndpointBase, RestateError, RestateLogLevel, RestateObjectContext, RestateObjectSharedContext, RestatePromise, RestateWorkflowContext, RestateWorkflowSharedContext, RetryPolicy, RetryableError, RetryableErrorOptions, RunAction, RunOptions, SendClient, SendOpts, Serde, ServeOptions, Service, ServiceDefinition, ServiceDefinitionFrom, ServiceHandler, ServiceHandlerOpts, ServiceOptions, ServiceOpts, SignalReference, Target, TerminalError, TimeoutError, TypedState, UntypedState, VirtualObject, VirtualObjectDefinition, VirtualObjectDefinitionFrom, Workflow, WorkflowContext, WorkflowDefinition, WorkflowDefinitionFrom, WorkflowHandler, WorkflowHandlerOpts, WorkflowOptions, WorkflowOpts, WorkflowSharedContext, WorkflowSharedHandler, createEndpointHandler, createObjectHandler, createObjectSharedHandler, createServiceHandler, createWorkflowHandler, createWorkflowSharedHandler, endpoint, handlers, internal_d_exports as internal, isRestatePromise, object, rpc, serde, serve, service, workflow };
89
+ export { CancelledError, Client, ClientCallOptions, ClientSendOptions, CombineablePromise, Context, ContextDate, DefaultServiceOptions, DurablePromise, Duration, EndpointOptions, GenericCall, GenericSend, Hooks, HooksProvider, InferArg, Interceptor, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, JournalValueCodec, KeyValueStore, LogMetadata, LogSource, LoggerContext, LoggerTransport, NodeEndpointOptions, ObjectContext, ObjectHandler, ObjectHandlerOpts, ObjectOptions, ObjectOpts, ObjectSharedContext, Opts, PauseError, Rand, RemoveVoidArgument, Request, RestateContext, RestateEndpoint, RestateEndpointBase, RestateError, RestateLogLevel, RestateObjectContext, RestateObjectSharedContext, RestatePromise, RestateWorkflowContext, RestateWorkflowSharedContext, RetryPolicy, RetryableError, RetryableErrorOptions, RunAction, RunOptions, ScopedContext, SendClient, SendOpts, Serde, ServeOptions, Service, ServiceDefinition, ServiceDefinitionFrom, ServiceHandler, ServiceHandlerOpts, ServiceOptions, ServiceOpts, SignalReference, Target, TerminalError, TimeoutError, TypedState, UntypedState, VirtualObject, VirtualObjectDefinition, VirtualObjectDefinitionFrom, Workflow, WorkflowContext, WorkflowDefinition, WorkflowDefinitionFrom, WorkflowHandler, WorkflowHandlerOpts, WorkflowOptions, WorkflowOpts, WorkflowSharedContext, WorkflowSharedHandler, createEndpointHandler, createObjectHandler, createObjectSharedHandler, createServiceHandler, createWorkflowHandler, createWorkflowSharedHandler, endpoint, handlers, internal_d_exports as internal, isRestatePromise, object, rpc, serde, serve, service, workflow };
90
90
  //# sourceMappingURL=node.d.cts.map
package/dist/node.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { CancelledError, PauseError, RestateError, RetryableError, RetryableErrorOptions, TerminalError, TimeoutError } from "./types/errors.js";
2
2
  import { Hooks, HooksProvider, Interceptor } from "./hooks.js";
3
3
  import { Client, ClientCallOptions, ClientSendOptions, InferArg, ObjectHandlerOpts, ObjectOptions, ObjectOpts, Opts, RemoveVoidArgument, RetryPolicy, SendClient, SendOpts, ServiceHandlerOpts, ServiceOptions, ServiceOpts, WorkflowHandlerOpts, WorkflowOptions, WorkflowOpts, handlers, object, rpc, service, workflow } from "./types/rpc.js";
4
- import { Context, ContextDate, DurablePromise, GenericCall, GenericSend, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, KeyValueStore, ObjectContext, ObjectSharedContext, Rand, Request, RestatePromise, RunAction, RunOptions, SignalReference, Target, TypedState, UntypedState, WorkflowContext, WorkflowSharedContext } from "./context.js";
4
+ import { Context, ContextDate, DurablePromise, GenericCall, GenericSend, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, KeyValueStore, ObjectContext, ObjectSharedContext, Rand, Request, RestatePromise, RunAction, RunOptions, ScopedContext, SignalReference, Target, TypedState, UntypedState, WorkflowContext, WorkflowSharedContext } from "./context.js";
5
5
  import { LogMetadata, LogSource, LoggerContext, LoggerTransport, RestateLogLevel } from "./logging/logger_transport.js";
6
6
  import { DefaultServiceOptions, RestateEndpoint, RestateEndpointBase } from "./endpoint.js";
7
7
  import { internal_d_exports } from "./internal.js";
@@ -86,5 +86,5 @@ declare function serve({
86
86
  ...options
87
87
  }: ServeOptions): Promise<number>;
88
88
  //#endregion
89
- export { CancelledError, Client, ClientCallOptions, ClientSendOptions, CombineablePromise, Context, ContextDate, DefaultServiceOptions, DurablePromise, Duration, EndpointOptions, GenericCall, GenericSend, Hooks, HooksProvider, InferArg, Interceptor, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, JournalValueCodec, KeyValueStore, LogMetadata, LogSource, LoggerContext, LoggerTransport, NodeEndpointOptions, ObjectContext, ObjectHandler, ObjectHandlerOpts, ObjectOptions, ObjectOpts, ObjectSharedContext, Opts, PauseError, Rand, RemoveVoidArgument, Request, RestateContext, RestateEndpoint, RestateEndpointBase, RestateError, RestateLogLevel, RestateObjectContext, RestateObjectSharedContext, RestatePromise, RestateWorkflowContext, RestateWorkflowSharedContext, RetryPolicy, RetryableError, RetryableErrorOptions, RunAction, RunOptions, SendClient, SendOpts, Serde, ServeOptions, Service, ServiceDefinition, ServiceDefinitionFrom, ServiceHandler, ServiceHandlerOpts, ServiceOptions, ServiceOpts, SignalReference, Target, TerminalError, TimeoutError, TypedState, UntypedState, VirtualObject, VirtualObjectDefinition, VirtualObjectDefinitionFrom, Workflow, WorkflowContext, WorkflowDefinition, WorkflowDefinitionFrom, WorkflowHandler, WorkflowHandlerOpts, WorkflowOptions, WorkflowOpts, WorkflowSharedContext, WorkflowSharedHandler, createEndpointHandler, createObjectHandler, createObjectSharedHandler, createServiceHandler, createWorkflowHandler, createWorkflowSharedHandler, endpoint, handlers, internal_d_exports as internal, isRestatePromise, object, rpc, serde, serve, service, workflow };
89
+ export { CancelledError, Client, ClientCallOptions, ClientSendOptions, CombineablePromise, Context, ContextDate, DefaultServiceOptions, DurablePromise, Duration, EndpointOptions, GenericCall, GenericSend, Hooks, HooksProvider, InferArg, Interceptor, InvocationHandle, InvocationId, InvocationIdParser, InvocationPromise, InvocationReference, JournalValueCodec, KeyValueStore, LogMetadata, LogSource, LoggerContext, LoggerTransport, NodeEndpointOptions, ObjectContext, ObjectHandler, ObjectHandlerOpts, ObjectOptions, ObjectOpts, ObjectSharedContext, Opts, PauseError, Rand, RemoveVoidArgument, Request, RestateContext, RestateEndpoint, RestateEndpointBase, RestateError, RestateLogLevel, RestateObjectContext, RestateObjectSharedContext, RestatePromise, RestateWorkflowContext, RestateWorkflowSharedContext, RetryPolicy, RetryableError, RetryableErrorOptions, RunAction, RunOptions, ScopedContext, SendClient, SendOpts, Serde, ServeOptions, Service, ServiceDefinition, ServiceDefinitionFrom, ServiceHandler, ServiceHandlerOpts, ServiceOptions, ServiceOpts, SignalReference, Target, TerminalError, TimeoutError, TypedState, UntypedState, VirtualObject, VirtualObjectDefinition, VirtualObjectDefinitionFrom, Workflow, WorkflowContext, WorkflowDefinition, WorkflowDefinitionFrom, WorkflowHandler, WorkflowHandlerOpts, WorkflowOptions, WorkflowOpts, WorkflowSharedContext, WorkflowSharedHandler, createEndpointHandler, createObjectHandler, createObjectSharedHandler, createServiceHandler, createWorkflowHandler, createWorkflowSharedHandler, endpoint, handlers, internal_d_exports as internal, isRestatePromise, object, rpc, serde, serve, service, workflow };
90
90
  //# sourceMappingURL=node.d.ts.map
package/dist/package.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  //#region package.json
3
- var version = "1.15.0-rc.6";
3
+ var version = "1.15.0";
4
4
 
5
5
  //#endregion
6
6
  Object.defineProperty(exports, 'version', {
package/dist/package.js CHANGED
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
- var version = "1.15.0-rc.6";
2
+ var version = "1.15.0";
3
3
 
4
4
  //#endregion
5
5
  export { version };
@@ -1 +1 @@
1
- {"version":3,"file":"package.js","names":[],"sources":["../package.json"],"sourcesContent":["{\n \"name\": \"@restatedev/restate-sdk\",\n \"version\": \"1.15.0-rc.6\",\n \"description\": \"Typescript SDK for Restate\",\n \"author\": \"Restate Developers\",\n \"email\": \"code@restate.dev\",\n \"license\": \"MIT\",\n \"homepage\": \"https://github.com/restatedev/sdk-typescript#readme\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/restatedev/sdk-typescript.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/restatedev/sdk-typescript/issues\"\n },\n \"type\": \"module\",\n \"main\": \"./dist/index.cjs\",\n \"module\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.cts\",\n \"exports\": {\n \".\": {\n \"import\": \"./dist/index.js\",\n \"require\": \"./dist/index.cjs\"\n },\n \"./fetch\": {\n \"import\": \"./dist/fetch.js\",\n \"require\": \"./dist/fetch.cjs\"\n },\n \"./lambda\": {\n \"import\": \"./dist/lambda.js\",\n \"require\": \"./dist/lambda.cjs\"\n },\n \"./node\": {\n \"import\": \"./dist/node.js\",\n \"require\": \"./dist/node.cjs\"\n },\n \"./package.json\": \"./package.json\"\n },\n \"files\": [\n \"dist\",\n \"README.md\"\n ],\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"scripts\": {\n \"test\": \"turbo run _test --filter={.}...\",\n \"_test\": \"vitest run\",\n \"build\": \"turbo run _build --filter={.}...\",\n \"_build\": \"tsc --noEmit && tsdown\",\n \"dev\": \"tsc --noEmit --watch\",\n \"clean\": \"rm -rf dist *.tsbuildinfo .turbo\",\n \"check:types\": \"turbo run _check:types --filter={.}...\",\n \"_check:types\": \"tsc --noEmit --project tsconfig.build.json\",\n \"lint\": \"eslint .\",\n \"check:exports\": \"turbo run _check:exports --filter={.}...\",\n \"_check:exports\": \"attw --pack .\",\n \"check:api\": \"turbo run _check:api --filter={.}...\",\n \"_check:api\": \"api-extractor run --local && api-extractor run --local --config api-extractor.fetch.json && api-extractor run --local --config api-extractor.lambda.json && api-extractor run --local --config api-extractor.node.json\",\n \"prepublishOnly\": \"pnpm -w verify\"\n },\n \"dependencies\": {\n \"@restatedev/restate-sdk-core\": \"workspace:*\"\n },\n \"devDependencies\": {\n \"@types/aws-lambda\": \"^8.10.115\"\n },\n \"typesVersions\": {\n \"*\": {\n \"fetch\": [\n \"./dist/fetch.d.ts\"\n ],\n \"lambda\": [\n \"./dist/lambda.d.ts\"\n ],\n \"node\": [\n \"./dist/node.d.ts\"\n ]\n }\n }\n}\n"],"mappings":";cAEa"}
1
+ {"version":3,"file":"package.js","names":[],"sources":["../package.json"],"sourcesContent":["{\n \"name\": \"@restatedev/restate-sdk\",\n \"version\": \"1.15.0\",\n \"description\": \"Typescript SDK for Restate\",\n \"author\": \"Restate Developers\",\n \"email\": \"code@restate.dev\",\n \"license\": \"MIT\",\n \"homepage\": \"https://github.com/restatedev/sdk-typescript#readme\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/restatedev/sdk-typescript.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/restatedev/sdk-typescript/issues\"\n },\n \"type\": \"module\",\n \"main\": \"./dist/index.cjs\",\n \"module\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.cts\",\n \"exports\": {\n \".\": {\n \"import\": \"./dist/index.js\",\n \"require\": \"./dist/index.cjs\"\n },\n \"./fetch\": {\n \"import\": \"./dist/fetch.js\",\n \"require\": \"./dist/fetch.cjs\"\n },\n \"./lambda\": {\n \"import\": \"./dist/lambda.js\",\n \"require\": \"./dist/lambda.cjs\"\n },\n \"./node\": {\n \"import\": \"./dist/node.js\",\n \"require\": \"./dist/node.cjs\"\n },\n \"./package.json\": \"./package.json\"\n },\n \"files\": [\n \"dist\",\n \"README.md\"\n ],\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"scripts\": {\n \"test\": \"turbo run _test --filter={.}...\",\n \"_test\": \"vitest run\",\n \"build\": \"turbo run _build --filter={.}...\",\n \"_build\": \"tsc --noEmit && tsdown\",\n \"dev\": \"tsc --noEmit --watch\",\n \"clean\": \"rm -rf dist *.tsbuildinfo .turbo\",\n \"check:types\": \"turbo run _check:types --filter={.}...\",\n \"_check:types\": \"tsc --noEmit --project tsconfig.build.json\",\n \"lint\": \"eslint .\",\n \"check:exports\": \"turbo run _check:exports --filter={.}...\",\n \"_check:exports\": \"attw --pack .\",\n \"check:api\": \"turbo run _check:api --filter={.}...\",\n \"_check:api\": \"api-extractor run --local && api-extractor run --local --config api-extractor.fetch.json && api-extractor run --local --config api-extractor.lambda.json && api-extractor run --local --config api-extractor.node.json\",\n \"prepublishOnly\": \"pnpm -w verify\"\n },\n \"dependencies\": {\n \"@restatedev/restate-sdk-core\": \"workspace:*\"\n },\n \"devDependencies\": {\n \"@types/aws-lambda\": \"^8.10.115\"\n },\n \"typesVersions\": {\n \"*\": {\n \"fetch\": [\n \"./dist/fetch.d.ts\"\n ],\n \"lambda\": [\n \"./dist/lambda.d.ts\"\n ],\n \"node\": [\n \"./dist/node.d.ts\"\n ]\n }\n }\n}\n"],"mappings":";cAEa"}
@@ -56,7 +56,7 @@ function optsFromArgs(args) {
56
56
  opts
57
57
  };
58
58
  }
59
- const makeRpcCallProxy = (genericCall, defaultSerde, service$1, key) => {
59
+ const makeRpcCallProxy = (genericCall, defaultSerde, service$1, key, scope) => {
60
60
  return new Proxy({}, { get: (_target, prop) => {
61
61
  const method = prop;
62
62
  return (...args) => {
@@ -72,12 +72,14 @@ const makeRpcCallProxy = (genericCall, defaultSerde, service$1, key) => {
72
72
  inputSerde: requestSerde,
73
73
  outputSerde: responseSerde,
74
74
  idempotencyKey: opts?.idempotencyKey,
75
+ scope,
76
+ limitKey: opts?.limitKey,
75
77
  name: opts?.name
76
78
  });
77
79
  };
78
80
  } });
79
81
  };
80
- const makeRpcSendProxy = (genericSend, defaultSerde, service$1, key) => {
82
+ const makeRpcSendProxy = (genericSend, defaultSerde, service$1, key, scope) => {
81
83
  return new Proxy({}, { get: (_target, prop) => {
82
84
  const method = prop;
83
85
  return (...args) => {
@@ -93,6 +95,8 @@ const makeRpcSendProxy = (genericSend, defaultSerde, service$1, key) => {
93
95
  delay,
94
96
  inputSerde: requestSerde,
95
97
  idempotencyKey: opts?.idempotencyKey,
98
+ scope,
99
+ limitKey: opts?.limitKey,
96
100
  name: opts?.name
97
101
  });
98
102
  };
@@ -273,7 +277,7 @@ const service = (service$1) => {
273
277
  * endpoint.bind(counter)
274
278
  * ```
275
279
  *
276
- * @see to interact with the object, you can use the object client:
280
+ * @example to interact with the object, you can use the object client:
277
281
  * ```ts
278
282
  * ...
279
283
  * const client = ctx.objectClient<typeof counter>({ name: "counter"});
@@ -5,10 +5,43 @@ import { Duration, ObjectHandler, Serde, ServiceDefinition, ServiceHandler, Virt
5
5
 
6
6
  //#region src/types/rpc.d.ts
7
7
  type ClientCallOptions<I, O$1> = {
8
+ /**
9
+ * Override input serde.
10
+ */
8
11
  input?: Serde<I>;
12
+ /**
13
+ * Override output serde.
14
+ */
9
15
  output?: Serde<O$1>;
10
- headers?: Record<string, string>;
16
+ /**
17
+ * Idempotency key to use for this request.
18
+ */
11
19
  idempotencyKey?: string;
20
+ /**
21
+ * An optional concurrency limit key within the scope.
22
+ * A limit key can only be used in conjunction with a scope (see {@link Context.scope}).
23
+ *
24
+ * **NOTE:** This API is in preview and is not enabled by default.
25
+ * To use it in restate-server 1.7, enable the flow control and protocol v7 experimental features,
26
+ * via `RESTATE_EXPERIMENTAL_ENABLE_PROTOCOL_V7=true` and `RESTATE_EXPERIMENTAL_ENABLE_VQUEUES=true`.
27
+ * These can be enabled only on **new clusters**, for more info check out https://docs.restate.dev/services/flow-control#enabling-flow-control.
28
+ * When the experimental features are disabled, this method fails the invocation with a retryable error, causing the invocation to be retried until fixed.
29
+ *
30
+ * The limit key enforces hierarchical concurrency limits on invocations sharing the same scope.
31
+ * It can have one or two levels separated by `/` (e.g. `"tenant1"` or `"tenant1/user42"`).
32
+ * Each level must consist only of `[a-zA-Z0-9_.-]` characters, and 1 <= length <= 36.
33
+ *
34
+ * The limit key is **not** part of the request identity: two calls to the same target with the
35
+ * same scope and object key but different limit keys refer to the **same** resource instance.
36
+ * The limit key only affects concurrency limits, not resource identity.
37
+ *
38
+ * @experimental
39
+ */
40
+ limitKey?: string;
41
+ /**
42
+ * Add headers to the request, which the callee will be able to access using {@link Request.headers}.
43
+ */
44
+ headers?: Record<string, string>;
12
45
  /**
13
46
  * Observability name, recorded in the Restate journal.
14
47
  */
@@ -26,7 +59,6 @@ declare class Opts<I, O$1> {
26
59
  getOpts(): ClientCallOptions<I, O$1>;
27
60
  }
28
61
  type ClientSendOptions<I> = {
29
- input?: Serde<I>;
30
62
  /**
31
63
  * Makes a type-safe one-way RPC to the specified target service, after a delay specified by the
32
64
  * milliseconds' argument.
@@ -49,12 +81,43 @@ type ClientSendOptions<I> = {
49
81
  *
50
82
  * @example
51
83
  * ```ts
52
- * ctx.serviceSendClient(Service).anotherAction(1337, { delay: { seconds: 60 } });
84
+ * ctx.serviceSendClient(Service).anotherAction(1337, rpc.opts.sendOpts({ delay: { seconds: 60 } }));
53
85
  * ```
54
86
  */
55
87
  delay?: Duration | number;
56
- headers?: Record<string, string>;
88
+ /**
89
+ * Override input serde.
90
+ */
91
+ input?: Serde<I>;
92
+ /**
93
+ * Idempotency key to use for this request.
94
+ */
57
95
  idempotencyKey?: string;
96
+ /**
97
+ * An optional concurrency limit key within the scope.
98
+ * A limit key can only be used in conjunction with a scope (see {@link Context.scope}).
99
+ *
100
+ * **NOTE:** This API is in preview and is not enabled by default.
101
+ * To use it in restate-server 1.7, enable the flow control and protocol v7 experimental features,
102
+ * via `RESTATE_EXPERIMENTAL_ENABLE_PROTOCOL_V7=true` and `RESTATE_EXPERIMENTAL_ENABLE_VQUEUES=true`.
103
+ * These can be enabled only on **new clusters**, for more info check out https://docs.restate.dev/services/flow-control#enabling-flow-control.
104
+ * When the experimental features are disabled, this method fails the invocation with a retryable error, causing the invocation to be retried until fixed.
105
+ *
106
+ * The limit key enforces hierarchical concurrency limits on invocations sharing the same scope.
107
+ * It can have one or two levels separated by `/` (e.g. `"tenant1"` or `"tenant1/user42"`).
108
+ * Each level must consist only of `[a-zA-Z0-9_.-]` characters, and 1 <= length <= 36.
109
+ *
110
+ * The limit key is **not** part of the request identity: two calls to the same target with the
111
+ * same scope and object key but different limit keys refer to the **same** resource instance.
112
+ * The limit key only affects concurrency limits, not resource identity.
113
+ *
114
+ * @experimental
115
+ */
116
+ limitKey?: string;
117
+ /**
118
+ * Add headers to the request, which the callee will be able to access using {@link Request.headers}.
119
+ */
120
+ headers?: Record<string, string>;
58
121
  /**
59
122
  * Observability name, recorded in the Restate journal.
60
123
  */
@@ -682,7 +745,7 @@ type ObjectOptions = ServiceOptions & {
682
745
  * endpoint.bind(counter)
683
746
  * ```
684
747
  *
685
- * @see to interact with the object, you can use the object client:
748
+ * @example to interact with the object, you can use the object client:
686
749
  * ```ts
687
750
  * ...
688
751
  * const client = ctx.objectClient<typeof counter>({ name: "counter"});
@@ -1 +1 @@
1
- {"version":3,"file":"rpc.d.cts","names":[],"sources":["../../src/types/rpc.ts"],"sourcesContent":[],"mappings":";;;;;;KA8CY;UACF,MAAM;EADJ,MAAA,CAAA,EAED,KAFC,CAEK,GAFL,CAAA;EACI,OAAA,CAAA,EAEJ,MAFI,CAAA,MAAA,EAAA,MAAA,CAAA;EAAN,cAAA,CAAA,EAAA,M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ServiceHandler, Virt
5
5
 
6
6
  //#region src/types/rpc.d.ts
7
7
  type ClientCallOptions<I, O$1> = {
8
+ /**
9
+ * Override input serde.
10
+ */
8
11
  input?: Serde<I>;
12
+ /**
13
+ * Override output serde.
14
+ */
9
15
  output?: Serde<O$1>;
10
- headers?: Record<string, string>;
16
+ /**
17
+ * Idempotency key to use for this request.
18
+ */
11
19
  idempotencyKey?: string;
20
+ /**
21
+ * An optional concurrency limit key within the scope.
22
+ * A limit key can only be used in conjunction with a scope (see {@link Context.scope}).
23
+ *
24
+ * **NOTE:** This API is in preview and is not enabled by default.
25
+ * To use it in restate-server 1.7, enable the flow control and protocol v7 experimental features,
26
+ * via `RESTATE_EXPERIMENTAL_ENABLE_PROTOCOL_V7=true` and `RESTATE_EXPERIMENTAL_ENABLE_VQUEUES=true`.
27
+ * These can be enabled only on **new clusters**, for more info check out https://docs.restate.dev/services/flow-control#enabling-flow-control.
28
+ * When the experimental features are disabled, this method fails the invocation with a retryable error, causing the invocation to be retried until fixed.
29
+ *
30
+ * The limit key enforces hierarchical concurrency limits on invocations sharing the same scope.
31
+ * It can have one or two levels separated by `/` (e.g. `"tenant1"` or `"tenant1/user42"`).
32
+ * Each level must consist only of `[a-zA-Z0-9_.-]` characters, and 1 <= length <= 36.
33
+ *
34
+ * The limit key is **not** part of the request identity: two calls to the same target with the
35
+ * same scope and object key but different limit keys refer to the **same** resource instance.
36
+ * The limit key only affects concurrency limits, not resource identity.
37
+ *
38
+ * @experimental
39
+ */
40
+ limitKey?: string;
41
+ /**
42
+ * Add headers to the request, which the callee will be able to access using {@link Request.headers}.
43
+ */
44
+ headers?: Record<string, string>;
12
45
  /**
13
46
  * Observability name, recorded in the Restate journal.
14
47
  */
@@ -26,7 +59,6 @@ declare class Opts<I, O$1> {
26
59
  getOpts(): ClientCallOptions<I, O$1>;
27
60
  }
28
61
  type ClientSendOptions<I> = {
29
- input?: Serde<I>;
30
62
  /**
31
63
  * Makes a type-safe one-way RPC to the specified target service, after a delay specified by the
32
64
  * milliseconds' argument.
@@ -49,12 +81,43 @@ type ClientSendOptions<I> = {
49
81
  *
50
82
  * @example
51
83
  * ```ts
52
- * ctx.serviceSendClient(Service).anotherAction(1337, { delay: { seconds: 60 } });
84
+ * ctx.serviceSendClient(Service).anotherAction(1337, rpc.opts.sendOpts({ delay: { seconds: 60 } }));
53
85
  * ```
54
86
  */
55
87
  delay?: Duration | number;
56
- headers?: Record<string, string>;
88
+ /**
89
+ * Override input serde.
90
+ */
91
+ input?: Serde<I>;
92
+ /**
93
+ * Idempotency key to use for this request.
94
+ */
57
95
  idempotencyKey?: string;
96
+ /**
97
+ * An optional concurrency limit key within the scope.
98
+ * A limit key can only be used in conjunction with a scope (see {@link Context.scope}).
99
+ *
100
+ * **NOTE:** This API is in preview and is not enabled by default.
101
+ * To use it in restate-server 1.7, enable the flow control and protocol v7 experimental features,
102
+ * via `RESTATE_EXPERIMENTAL_ENABLE_PROTOCOL_V7=true` and `RESTATE_EXPERIMENTAL_ENABLE_VQUEUES=true`.
103
+ * These can be enabled only on **new clusters**, for more info check out https://docs.restate.dev/services/flow-control#enabling-flow-control.
104
+ * When the experimental features are disabled, this method fails the invocation with a retryable error, causing the invocation to be retried until fixed.
105
+ *
106
+ * The limit key enforces hierarchical concurrency limits on invocations sharing the same scope.
107
+ * It can have one or two levels separated by `/` (e.g. `"tenant1"` or `"tenant1/user42"`).
108
+ * Each level must consist only of `[a-zA-Z0-9_.-]` characters, and 1 <= length <= 36.
109
+ *
110
+ * The limit key is **not** part of the request identity: two calls to the same target with the
111
+ * same scope and object key but different limit keys refer to the **same** resource instance.
112
+ * The limit key only affects concurrency limits, not resource identity.
113
+ *
114
+ * @experimental
115
+ */
116
+ limitKey?: string;
117
+ /**
118
+ * Add headers to the request, which the callee will be able to access using {@link Request.headers}.
119
+ */
120
+ headers?: Record<string, string>;
58
121
  /**
59
122
  * Observability name, recorded in the Restate journal.
60
123
  */
@@ -682,7 +745,7 @@ type ObjectOptions = ServiceOptions & {
682
745
  * endpoint.bind(counter)
683
746
  * ```
684
747
  *
685
- * @see to interact with the object, you can use the object client:
748
+ * @example to interact with the object, you can use the object client:
686
749
  * ```ts
687
750
  * ...
688
751
  * const client = ctx.objectClient<typeof counter>({ name: "counter"});
@@ -1 +1 @@
1
- {"version":3,"file":"rpc.d.ts","names":[],"sources":["../../src/types/rpc.ts"],"sourcesContent":[],"mappings":";;;;;;KA8CY;UACF,MAAM;EADJ,MAAA,CAAA,EAED,KAFC,CAEK,GAFL,CAAA;EACI,OAAA,CAAA,EAEJ,MAFI,CAAA,MAAA,EAAA,MAAA,CAAA;EAAN,cAAA,CAAA,EAAA,MAAA;EACO;;;EACC,IAAA,CAAA,EAAA,MAAA;AASlB,CAAA;AAMmD,cANtC,IAMsC,CAAA,CAAA,EAAA,GAAA,CAAA,CAAA;EAAG,iBAAA,IAAA;EAArB;;;;;EAMQ,OAAA,IAAA,CAAA,CAAA,EAAA,GAAA,CAAA,CAAA,IAAA,EANR,iBAMQ,CANU,CAMV,EANa,GAMb,CAAA,CAAA,EANkB,IAMlB,CANuB,CAMvB,EAN0B,GAM1B,CAAA;EAArB,QAAA,WAAA,CAAA;EAAiB,OAAA,CAAA,CAAA,EAAjB,iBAAiB,CAAC,CAAD,EAAI,GAAJ,CAAA;AAKrC;AACgB,KADJ,iBACI,CAAA,CAAA,CAAA,GAAA;EAAN,KAAA,CAAA,EAAA,KAAA,CAAM,CAAN,CAAA;EA0BA;;;AAUV;;;;;;;;AAYA;;;;;;;;;;;;AA8HA;AAEA;EACc,KAAA,CAAA,EAvJJ,QAuJI,GAAA,MAAA;EAAK,OAAA,CAAA,EAtJP,MAsJO,CAAA,MAAA,EAAA,MAAA,CAAA;EAAE,cAAA,CAAA,EAAA,MAAA;EAA2B;;;EAGzC,IAAA,CAAA,EAAA,MAAA;CAEc;AAA4B,cAlJpC,QAkJoC,CAAA,CAAA,CAAA,CAAA;EAAT,iBAAA,IAAA;EAAa,OAAA,IAAA,CAAA,CAAA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AExB;YACD;MACR,wBAAwB,KAAG;;;;;;;;KAqCnB;aACC,wCAAwC;kBAEvC,IAAI,sEAIT,4BACH,kBACE,EAAE,WAAW,gBAAgB,EAAE,IAAI,wBACjC,EAAE,2GAEJ,EAAE,WAAW,sBAAsB,EAAE,IAAI,8BACvC,EAAE;KAIA,eAAA,GAAkB;;;;;;;sBAOR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkDT;QACL;YACI,aAAa,KAAK,SAAS;;aAE1B;YACD;MACR,mBAAmB,KAAG"}
package/dist/types/rpc.js CHANGED
@@ -56,7 +56,7 @@ function optsFromArgs(args) {
56
56
  opts
57
57
  };
58
58
  }
59
- const makeRpcCallProxy = (genericCall, defaultSerde, service$1, key) => {
59
+ const makeRpcCallProxy = (genericCall, defaultSerde, service$1, key, scope) => {
60
60
  return new Proxy({}, { get: (_target, prop) => {
61
61
  const method = prop;
62
62
  return (...args) => {
@@ -72,12 +72,14 @@ const makeRpcCallProxy = (genericCall, defaultSerde, service$1, key) => {
72
72
  inputSerde: requestSerde,
73
73
  outputSerde: responseSerde,
74
74
  idempotencyKey: opts?.idempotencyKey,
75
+ scope,
76
+ limitKey: opts?.limitKey,
75
77
  name: opts?.name
76
78
  });
77
79
  };
78
80
  } });
79
81
  };
80
- const makeRpcSendProxy = (genericSend, defaultSerde, service$1, key) => {
82
+ const makeRpcSendProxy = (genericSend, defaultSerde, service$1, key, scope) => {
81
83
  return new Proxy({}, { get: (_target, prop) => {
82
84
  const method = prop;
83
85
  return (...args) => {
@@ -93,6 +95,8 @@ const makeRpcSendProxy = (genericSend, defaultSerde, service$1, key) => {
93
95
  delay,
94
96
  inputSerde: requestSerde,
95
97
  idempotencyKey: opts?.idempotencyKey,
98
+ scope,
99
+ limitKey: opts?.limitKey,
96
100
  name: opts?.name
97
101
  });
98
102
  };
@@ -273,7 +277,7 @@ const service = (service$1) => {
273
277
  * endpoint.bind(counter)
274
278
  * ```
275
279
  *
276
- * @see to interact with the object, you can use the object client:
280
+ * @example to interact with the object, you can use the object client:
277
281
  * ```ts
278
282
  * ...
279
283
  * const client = ctx.objectClient<typeof counter>({ name: "counter"});