@@ -62,6 +62,8 @@ app.http("startHello", {
6262 extraInputs: [df .input .durableClient ()],
6363 handler : async (request : HttpRequest , context : InvocationContext ): Promise <HttpResponseInit > => {
6464 const client = df .getClient (context );
65+ // scheduleNewOrchestration is the canonical (core) API. The classic v3 alias also works:
66+ // const instanceId = await client.startNew("helloOrchestrator", { input: "Durable" });
6567 const instanceId = await client .scheduleNewOrchestration (" helloOrchestrator" , " Durable" );
6668 return client .createCheckStatusResponse (request , instanceId );
6769 },
@@ -79,12 +81,30 @@ injects a `DurableFunctionsClient` as the handler's second argument, so you don'
7981df .app .client .http (" startHello" , {
8082 route: " orchestrators/helloOrchestrator" ,
8183 handler : async (request , client , context ) => {
84+ // Or the classic v3 alias: await client.startNew("helloOrchestrator", { input: "Durable" })
8285 const instanceId = await client .scheduleNewOrchestration (" helloOrchestrator" , " Durable" );
8386 return client .createCheckStatusResponse (request , instanceId );
8487 },
8588});
8689```
8790
91+ ### v3-compatible client methods
92+
93+ ` DurableFunctionsClient ` keeps the classic Durable Functions v3 method names as thin aliases over the
94+ core API, so existing v3 starters compile unchanged. Prefer the core names in new code (most v3 aliases
95+ are ` @deprecated ` ):
96+
97+ | Classic v3 alias | Canonical core method |
98+ | ------------------------------------------------------- | ----------------------------------------------------------------------- |
99+ | ` client.startNew(name, { input, instanceId, version }) ` | ` client.scheduleNewOrchestration(name, input, { instanceId, version }) ` |
100+ | ` client.getStatus(id, options) ` | ` client.getOrchestrationState(id) ` |
101+ | ` client.raiseEvent(id, name, data) ` | ` client.raiseOrchestrationEvent(id, name, data) ` |
102+ | ` client.terminate(id, reason) ` | ` client.terminateOrchestration(id, reason) ` |
103+ | ` client.suspend(id) ` | ` client.suspendOrchestration(id) ` |
104+ | ` client.resume(id) ` | ` client.resumeOrchestration(id) ` |
105+ | ` client.rewind(id, reason) ` | ` client.rewindInstance(id, reason) ` |
106+ | ` client.restart(id, restartWithNewInstanceId?) ` | ` client.restartOrchestration(id, restartWithNewInstanceId?) ` |
107+
88108## Status
89109
90110This package is an early preview (` 0.4.0 ` ); APIs may change before the stable release.
0 commit comments