import { CancelledError, RestateError, RetryableError, TerminalError, TimeoutError } from "./types/errors.js";
import { isRestatePromise } from "./promises.js";
import { InvocationIdParser, RestatePromise } from "./context.js";
import { Opts, SendOpts, handlers, object, rpc, service, workflow } from "./types/rpc.js";
import { internal_exports } from "./internal.js";
import { CombineablePromise, createObjectHandler, createObjectSharedHandler, createServiceHandler, createWorkflowHandler, createWorkflowSharedHandler, serde } from "./common_api.js";
import { withOptions } from "./endpoint/withOptions.js";
import { LambdaEndpointImpl } from "./endpoint/lambda_endpoint.js";

//#region src/lambda.ts
/**
* Create a new {@link LambdaEndpoint}.
* @deprecated Please use {@link createEndpointHandler}
*/
function endpoint() {
	return new LambdaEndpointImpl();
}
/**
* Creates a Lambda handler that encapsulates all the Restate services served by this endpoint.
*
* @param {EndpointOptions} options - Configuration options for the endpoint handler.
* @returns A Lambda handler function.
*
* @example
* A typical endpoint served as Lambda would look like this:
* ```
* import { createEndpointHandler } from "@restatedev/restate-sdk/lambda";
*
* export const handler = createEndpointHandler({ services: [myService] })
*/
function createEndpointHandler(options) {
	return withOptions(new LambdaEndpointImpl(), options).handler();
}

//#endregion
export { CancelledError, CombineablePromise, InvocationIdParser, Opts, RestateError, RestatePromise, RetryableError, SendOpts, TerminalError, TimeoutError, createEndpointHandler, createObjectHandler, createObjectSharedHandler, createServiceHandler, createWorkflowHandler, createWorkflowSharedHandler, endpoint, handlers, internal_exports as internal, isRestatePromise, object, rpc, serde, service, workflow };
//# sourceMappingURL=lambda.js.map