Implements most items of #416. Also took the chance to improve the types organization, and move the types from one types file into a types directory. Also converted some classes that were essentially serving as interfaces into interfaces. This looks like a big change, but it's pretty much all organization and renaming. There are no breaking changes in this PR (don't worry, those are coming soon 😉). The specific changes in this PR are:
Exports type OrchestrationHandler<T = any> = (context: OrchestrationContext) => Generator<Task, T, any> (T being the return type of the generator), a more specific and type-safe version of the previous OrchestrationHandler.
Exports an OrchestrationContext and an EntityContext<T> type, to replace the previous IOrchestrationFunctionContext and IEntityFunctionContext<T> types, and also exports them from the root of the package.
Exports a DurableClient interface from the root of the package, which the class DurableOrchestrationClient now implements.
Exports Task and TimerTask types from the root of the package.
Transforms some classes that were essentially serving as interfaces into interfaces:
PurgeHistoryResult
EntityStateResponse
HttpManagementPayload
Exports interfaces that classes implement:
Exports a DurableOrchestrationContext interface, which now the DurableOrchestrationContext class implements.
Exports a DurableEntityContext interface, which now the DurableEntityContext class implements.
Exports an EntityId interface, which now the EntityId class implements
Exports a DurableOrchestrationStatus interface, which the DurableOrchestrationStatus classs now implements.
Exports a RetryOptions interface, which the RetryOptions class implements
Exports a ManagedIdentityTokenSource interface, which the ManagedIdentityTokenSource class implements
Renames GetStatusOptions to GetStatusInternalOptions (since it was actually passed to getStatusInternal(), not getStatus().
Moves types from the src/types.ts into multiple src/types/*.ts files
Implements most items of #416. Also took the chance to improve the types organization, and move the types from one types file into a types directory. Also converted some classes that were essentially serving as interfaces into interfaces. This looks like a big change, but it's pretty much all organization and renaming. There are no breaking changes in this PR (don't worry, those are coming soon 😉). The specific changes in this PR are:
OrchestrationHandler<T = any> = (context: OrchestrationContext) => Generator<Task, T, any>
(T
being the return type of the generator), a more specific and type-safe version of the previousOrchestrationHandler
.OrchestrationContext
and anEntityContext<T>
type, to replace the previousIOrchestrationFunctionContext
andIEntityFunctionContext<T>
types, and also exports them from the root of the package.DurableClient
interface from the root of the package, which the classDurableOrchestrationClient
now implements.Task
andTimerTask
types from the root of the package.PurgeHistoryResult
EntityStateResponse
HttpManagementPayload
DurableOrchestrationContext
interface, which now theDurableOrchestrationContext
class implements.DurableEntityContext
interface, which now theDurableEntityContext
class implements.EntityId
interface, which now theEntityId
class implementsDurableOrchestrationStatus
interface, which theDurableOrchestrationStatus
classs now implements.RetryOptions
interface, which theRetryOptions
class implementsManagedIdentityTokenSource
interface, which theManagedIdentityTokenSource
class implementsGetStatusOptions
toGetStatusInternalOptions
(since it was actually passed togetStatusInternal()
, notgetStatus()
.src/types.ts
into multiplesrc/types/*.ts
files