docs: remove type arguments passed to createWorkflow (#8161)
This commit is contained in:
@@ -37,10 +37,10 @@ Start by creating a workflow that does two things:
|
||||
For example, create the file `src/workflows/create-manager.ts`. with the following content:
|
||||
|
||||
export const workflowHighlights = [
|
||||
["27", "createManagerStep", "Thi step creates a manager."],
|
||||
["44", "createManagerWorkflow", "The workflow used to create a manager and set its auth identity's actor type."],
|
||||
["53", "setAuthAppMetadataStep", "Set the actor type of the manager's associated auth identity."],
|
||||
["55", '"manager"', "The actor type of the manager."]
|
||||
["20", "createManagerStep", "Thi step creates a manager."],
|
||||
["37", "createManagerWorkflow", "The workflow used to create a manager and set its auth identity's actor type."],
|
||||
["44", "setAuthAppMetadataStep", "Set the actor type of the manager's associated auth identity."],
|
||||
["46", '"manager"', "The actor type of the manager."]
|
||||
]
|
||||
|
||||
```ts title="src/workflows/create-manager.ts" highlights={workflowHighlights}
|
||||
@@ -63,13 +63,6 @@ type CreateManagerWorkflowInput = {
|
||||
authIdentityId: string
|
||||
}
|
||||
|
||||
type CreateManagerWorkflowOutput = {
|
||||
id: string
|
||||
first_name: string
|
||||
last_name: string
|
||||
email: string
|
||||
}
|
||||
|
||||
const createManagerStep = createStep(
|
||||
"create-manager-step",
|
||||
async ({
|
||||
@@ -87,11 +80,9 @@ const createManagerStep = createStep(
|
||||
}
|
||||
)
|
||||
|
||||
const createManagerWorkflow = createWorkflow<
|
||||
CreateManagerWorkflowInput, CreateManagerWorkflowOutput
|
||||
>(
|
||||
const createManagerWorkflow = createWorkflow(
|
||||
"create-manager",
|
||||
function (input) {
|
||||
function (input: CreateManagerWorkflowInput) {
|
||||
const manager = createManagerStep({
|
||||
manager: input.manager,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user