docs: remove type arguments passed to createWorkflow (#8161)

This commit is contained in:
Shahed Nasser
2024-07-17 13:19:51 +01:00
committed by GitHub
parent e5c66fa670
commit b1964a0384
11 changed files with 62 additions and 132 deletions
@@ -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,
})