-
Notifications
You must be signed in to change notification settings - Fork 0
/
swagger-spec.json
1 lines (1 loc) · 27.3 KB
/
swagger-spec.json
1
{"openapi":"3.0.0","paths":{"/":{"get":{"operationId":"AppController_root","parameters":[],"responses":{"200":{"description":""}}}},"/v1/me":{"get":{"operationId":"AppController_me","parameters":[{"name":"resyncOrganization","required":true,"in":"query","schema":{"type":"string"}},{"name":"selectedClerkOrganization","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":""}}}},"/v1/cdnUpload":{"post":{"operationId":"CDNController_uploadFile","parameters":[],"responses":{"201":{"description":""}}}},"/v1/apiKeys":{"get":{"operationId":"ApiKeysController_findAllByCustomer","summary":"Get all apiKeys for the signed in user","parameters":[],"responses":{"200":{"description":"Return all apiKeys."}},"tags":["apiKeys"],"security":[{"bearer":[]}]}},"/v1/public/flows/{slug}":{"get":{"operationId":"FlowsController_getBySlug","summary":"","description":"Get a single Flow by its Flow ID/slug.","parameters":[],"responses":{"200":{"description":"The Flow has been successfully returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalizedFlow"}}}},"404":{"description":"The Flow was not found."}},"tags":["flows"],"security":[{"bearer":[]}]}},"/v1/public/flows":{"get":{"operationId":"FlowsController_find","summary":"","description":"Get all Flows for your organization.","parameters":[],"responses":{"200":{"description":"Return all flows.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResult"}}}}},"tags":["flows"],"security":[{"bearer":[]}]}},"/v1/flows/{id}/versions":{"get":{"operationId":"FlowsController_getFlowVersions","summary":"Get all versions of a flow by id","parameters":[],"responses":{"200":{"description":"The flows have been successfully returned."},"404":{"description":"The flows were not found."}},"tags":["flows"],"security":[{"bearer":[]}]},"post":{"operationId":"FlowsController_createFlowVersion","summary":"Adds a new flow for the signed in user","parameters":[],"responses":{"201":{"description":""}},"tags":["flows"],"security":[{"bearer":[]}]}},"/v1/flows/{id}":{"get":{"operationId":"FlowsController_get","summary":"Get a flow by id","parameters":[{"name":"version","required":true,"in":"query","schema":{"type":"string"}},{"name":"startDate","required":true,"in":"query","schema":{"type":"string"}},{"name":"endDate","required":true,"in":"query","schema":{"type":"string"}},{"name":"includeTimeSeriesStats","required":true,"in":"query","schema":{"type":"string"}},{"name":"timeZoneOffset","required":true,"in":"query","schema":{"type":"string"}},{"name":"forceStatsRefresh","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"The flow has been successfully returned."},"404":{"description":"The flow was not found."}},"tags":["flows"],"security":[{"bearer":[]}]}},"/v1/flows":{"get":{"operationId":"FlowsController_findAllByCustomer","summary":"Get all flows for the signed in user","parameters":[{"name":"startDate","required":true,"in":"query","schema":{"type":"string"}},{"name":"endDate","required":true,"in":"query","schema":{"type":"string"}},{"name":"timeZoneOffset","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Return all flows."}},"tags":["flows"],"security":[{"bearer":[]}]},"post":{"operationId":"FlowsController_post","summary":"Adds a new flow for the signed in user","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFlowDto"}}}},"responses":{"201":{"description":""}},"tags":["flows"],"security":[{"bearer":[]}]}},"/v1/flows/{id}/activate":{"put":{"operationId":"FlowsController_activateDraft","summary":"Set selected flow version as active","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivateFlowDto"}}}},"responses":{"201":{"description":"The flow has been successfully been activated."},"403":{"description":"Forbidden."}},"tags":["flows"],"security":[{"bearer":[]}]}},"/v1/flows/{numericFlowId}":{"put":{"operationId":"FlowsController_update","summary":"","description":"Update a Flow's configuration and metadata","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFlowDto"}}}},"responses":{"200":{"description":"The flow has been successfully updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalizedFlow"}}}}},"tags":["flows"],"security":[{"bearer":[]}]},"delete":{"operationId":"FlowsController_delete","summary":"","description":"Delete a Flow","parameters":[],"responses":{"204":{"description":"The Flow has been successfully deleted."}},"tags":["flows"],"security":[{"bearer":[]}]}},"/v1/public/flowResponses":{"post":{"operationId":"FlowResponsesController_post","summary":"Adds a new flowResponse for the signed in flowResponse","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFlowResponseDTO"}}}},"responses":{"201":{"description":""}},"tags":["flowResponses"],"security":[{"bearer":[]}]}},"/v1/flowResponses/export/{flowSlug}":{"get":{"operationId":"FlowResponsesController_get","summary":"Downloads all flowresponses as a CSV","parameters":[{"name":"flowSlug","required":true,"in":"path","schema":{"type":"string"}},{"name":"version","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["flowResponses"],"security":[{"bearer":[]}]}},"/v1/public/users":{"post":{"operationId":"UsersController_postPublic","summary":"","description":"Create a user, add properties, and tracking events","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddPropertyOrEventsToUserDTO"}}}},"responses":{"201":{"description":"The user has been successfully created or updated"}},"tags":["users"],"security":[{"bearer":[]}]}},"/v1/users":{"get":{"operationId":"UsersController_get","summary":"","description":"Find a user by ID","parameters":[{"name":"foreignId","required":true,"in":"query","schema":{"type":"string"}},{"name":"userId","required":true,"in":"query","description":"The ID of the user","schema":{"type":"string"}}],"responses":{"200":{"description":"The user was successfully found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalizedUser"}}}},"404":{"description":"The user was not found"}},"tags":["users"],"security":[{"bearer":[]}]},"delete":{"operationId":"UsersController_delete","summary":"Delete a user by foreign id","parameters":[{"name":"foreignId","required":false,"in":"query","deprecated":true,"description":"Deprecated. Use userId instead.","schema":{"type":"string"}},{"name":"userId","required":true,"in":"query","description":"The ID of the user","schema":{"type":"string"}}],"responses":{"200":{"description":"The user has been successfully deleted."},"404":{"description":"The user was not found."}},"tags":["users"],"security":[{"bearer":[]}]}},"/v1/public/sessions":{"post":{"operationId":"UsersController_createSession","summary":"Create a new session","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionDTO"}}}},"responses":{"201":{"description":"The session has been successfully created."}},"tags":["users"],"security":[{"bearer":[]}]}},"/v1/public/groups":{"post":{"operationId":"UserGroupsController_post","summary":"Adds a new property or events for a given group group","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddPropertyOrEventsToUserGroupDTO"}}}},"responses":{"201":{"description":"The group has been successfully created or updated"}},"tags":["groups"],"security":[{"bearer":[]}]}},"/v1/groups":{"get":{"operationId":"UserGroupsController_get","summary":"","description":"Find a group by ID","parameters":[{"name":"groupId","required":true,"in":"query","description":"The ID of the group","schema":{"type":"string"}}],"responses":{"200":{"description":"The group was successfully found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalizedUserGroup"}}}},"404":{"description":"The group was not found"}},"tags":["groups"],"security":[{"bearer":[]}]},"delete":{"operationId":"UserGroupsController_delete","summary":"Delete a group by foreign id","parameters":[{"name":"groupId","required":true,"in":"query","description":"The ID of the group","schema":{"type":"string"}}],"responses":{"200":{"description":"The group has been successfully deleted."},"404":{"description":"The group was not found."}},"tags":["groups"],"security":[{"bearer":[]}]}},"/v1/public/userGroups":{"post":{"operationId":"UserGroupsController_postPublic","summary":"Adds a new property or events for a given user group","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddPropertyOrEventsToUserGroupDTO"}}}},"responses":{"201":{"description":"The property has been successfully created or updated."}},"tags":["groups"],"security":[{"bearer":[]}]}},"/v1/webhooks/clerk":{"post":{"operationId":"WebhooksController_clerk","parameters":[],"responses":{"201":{"description":""}}}},"/v1/webhooks/stripe":{"post":{"operationId":"WebhooksController_stripe","parameters":[],"responses":{"201":{"description":""}}}},"/v1/public/userFlowStates/{flowSlug}":{"get":{"operationId":"UserFlowStatesController_getByFlowSlug","summary":"Get the state of a user in a flow","parameters":[{"name":"foreignUserId","required":true,"in":"query","schema":{"type":"string"}},{"name":"foreignUserGroupId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"The flow state was found"},"404":{"description":"The flow or user was not found."}},"tags":["userFlowStates"],"security":[{"bearer":[]}]}},"/v1/public/userFlowStates":{"get":{"operationId":"UserFlowStatesController_getAllForUser","summary":"Get the state of a user in a flow","parameters":[{"name":"foreignUserId","required":true,"in":"query","schema":{"type":"string"}},{"name":"foreignUserGroupId","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"The flow state was found"},"404":{"description":"The flow or user was not found."}},"tags":["userFlowStates"],"security":[{"bearer":[]}]}},"/v1/userFlowStates/{flowSlug}/{userSlug}":{"get":{"operationId":"UserFlowStatesController_getPrivate","summary":"Get the state of a user in a flow","parameters":[],"responses":{"200":{"description":"The flow state was found"},"404":{"description":"The flow or user was not found."}},"tags":["userFlowStates"],"security":[{"bearer":[]}]},"delete":{"operationId":"UserFlowStatesController_deleteUserFlowState","summary":"Delete the state of a user in a flow","parameters":[],"responses":{"201":{"description":"The flow state was deleted"},"404":{"description":"The flow or user was not found."}},"tags":["userFlowStates"],"security":[{"bearer":[]}]}},"/v1/userFlowStates":{"get":{"operationId":"UserFlowStatesController_getAllUserFlowStates","summary":"Get the state of a user in all flows","parameters":[{"name":"userQuery","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"The flow state(s) were found"},"404":{"description":"The user was not found."}},"tags":["userFlowStates"],"security":[{"bearer":[]}]}},"/v1/public/flowStates":{"get":{"operationId":"UserFlowStatesController_getAll","summary":"","description":"Get the state of a User in all Flows","parameters":[{"name":"userId","required":true,"in":"query","description":"The ID of the user","schema":{"type":"string"}},{"name":"groupId","required":false,"in":"query","description":"Optional ID of the group","schema":{"type":"string"}}],"responses":{"200":{"description":"The Flow state for the User was found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUserFlowStateV2"}}}}},"tags":["userFlowStates"],"security":[{"bearer":[]}]},"post":{"operationId":"UserFlowStatesController_post","summary":"","description":"Updates the user's state in a single Flow","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserFlowStateDTO"}}}},"responses":{"201":{"description":"The user's state in the Flow was updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicUserFlowStateV2"}}}}},"tags":["userFlowStates"],"security":[{"bearer":[]}]}},"/v1/thirdParty/digitalocean/resources":{"post":{"operationId":"DigitalOceanController_processRequest","parameters":[],"responses":{"201":{"description":""}},"tags":["apiKeys"],"security":[{"bearer":[]}]}},"/v1/thirdParty/digitalocean/sso":{"post":{"operationId":"DigitalOceanController_processSSO","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DigitalOceanSSODTO"}}}},"responses":{"201":{"description":""}},"tags":["apiKeys"],"security":[{"bearer":[]}]}},"/v1/thirdParty/cdp/segment":{"post":{"operationId":"SegmentController_processRequest","parameters":[],"responses":{"201":{"description":""}},"tags":["segment"],"security":[{"bearer":[]}]}},"/v1/thirdParty/cdp/heap":{"post":{"operationId":"HeapController_processRequest","parameters":[],"responses":{"201":{"description":""}},"tags":["mixpanel"],"security":[{"bearer":[]}]}},"/v1/thirdParty/cdp/mixpanel":{"post":{"operationId":"MixpanelController_processRequest","parameters":[],"responses":{"201":{"description":""}},"tags":["mixpanel"],"security":[{"bearer":[]}]}},"/v1/thirdParty/payment/stripe":{"post":{"operationId":"StripeController_processRequest","parameters":[],"responses":{"201":{"description":""}},"tags":["stripe"],"security":[{"bearer":[]}]}}},"info":{"title":"Frigade API","description":"Official Frigade API documentation","version":"1.0","contact":{}},"tags":[],"servers":[],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http","description":"Authentication header of the form `Bearer: <token>`, where `<token>` is either your public or private API key. [See when to use which](/v2/api-reference/authorization)"}},"schemas":{"ExternalizedFlow":{"type":"object","properties":{"id":{"type":"number","description":"The numeric ID of the Flow. This number will be different depending on the version used"},"name":{"type":"string","description":"The name of the Flow","example":"New User Announcement"},"data":{"type":"string","description":"JSON encoded raw data of the Flow as defined in the Flow's YAML configuration","example":"{\"steps\": [{\"id\": \"step_1\", \"title\": \"Welcome to my app!\", \"subtitle\": \"Let me show you around.\"}]}"},"targetingLogic":{"type":"string","description":"The targeting logic for the Flow","example":"user.property('isAdmin') == true"},"type":{"type":"string","description":"The type of Flow","example":"CHECKLIST","enum":["ANNOUNCEMENT","BANNER","CARD","CHECKLIST","CUSTOM","FORM","SURVEY","TOUR"]},"slug":{"type":"string","description":"A unique identifier for the Flow such as `flow_abc`. Slugs stay the same between environment and versions.","example":"flow_abc"},"createdAt":{"format":"date-time","type":"string","description":"The data the Flow was created in ISO 8601 format","example":"2024-01-01T00:00:00Z"},"modifiedAt":{"format":"date-time","type":"string","description":"The data the Flow was last modified in ISO 8601 format","example":"2024-01-01T00:00:00Z"},"version":{"type":"number","description":"The version of the Flow","example":1},"status":{"type":"string","description":"The status of the Flow","example":"ACTIVE","enum":["ACTIVE","ARCHIVED","DRAFT"]},"codeSnippet":{"type":"string","description":"The original code snippet for the Flow when it was created","example":"<Frigade.Announcement flowId=\"my-flow-id\" />"}}},"PaginatedResult":{"type":"object","properties":{"data":{"description":"The data returned by the query","type":"array","items":{"$ref":"#/components/schemas/ExternalizedFlow"}},"offset":{"type":"number","description":"The current pagination offset (if any)","default":0,"example":0},"limit":{"type":"number","description":"The total number of records returned in this response","default":100,"example":100}}},"CreateFlowDto":{"type":"object","properties":{}},"ActivateFlowDto":{"type":"object","properties":{}},"UpdateFlowDto":{"type":"object","properties":{"name":{"type":"string","description":"The name of the Flow","example":"New User Announcement"},"data":{"type":"string","description":"JSON or YAML encoded raw data of thew Flow. If provided in JSON format it will be converted to YAML automatically","example":"{\"steps\": [{\"id\": \"step_1\", \"title\": \"Welcome to my app!\", \"subtitle\": \"Let me show you around.\"}]}"},"description":{"type":"string","description":"The description of the Flow","example":"This is a Flow that welcomes new users to the app"},"targetingLogic":{"type":"string","description":"The targeting logic for the Flow","example":"user.property('isAdmin') == true"},"type":{"type":"string","description":"The type of Flow","example":"CHECKLIST","enum":["ANNOUNCEMENT","BANNER","CARD","CHECKLIST","CUSTOM","FORM","SURVEY","TOUR"]},"active":{"type":"boolean","description":"Whether the Flow is active or not. If set to `false`, the Flow will not be shown to users","example":true}}},"CreateFlowResponseDTO":{"type":"object","properties":{}},"ExternalizedTrackingEvent":{"type":"object","properties":{"event":{"type":"string","description":"The name of the tracking event","example":"SignedUp"},"properties":{"type":"object","description":"The properties of the tracking event","example":{"source":"landing-page","campaign":"summer-sale"}}},"required":["event"]},"AddPropertyOrEventsToUserDTO":{"type":"object","properties":{"userId":{"type":"string","description":"The ID of the user as defined in your own application","example":"d34daa11-3745-4ac0-880e-d4b4d51fe13f"},"properties":{"type":"object","description":"Optional properties to add to the user","example":{"email":"[email protected]","firstName":"John","lastName":"Doe","imageUrl":"https://example.com/john-doe.jpg"}},"bootstrapFlowStates":{"type":"boolean","description":"If set to true, the user will automatically complete any eligible Flows with `completionCriteria` that have not already been completed. This is useful if a Flow has been recently updated with new steps and you want to ensure that historic users complete the new steps"},"events":{"description":"Optional tracking events to add to the user","example":[{"event":"SignedUp","properties":{"source":"landing-page","campaign":"summer-sale"}}],"type":"array","items":{"$ref":"#/components/schemas/ExternalizedTrackingEvent"}},"linkGuestId":{"type":"string","description":"Merges a guest with a non-guest user. Only works if the provided `linkGuestId` is a guest user and the `userId` does not yet have any state in any Flows."}},"required":["userId"]},"ExternalizedFlowResponse":{"type":"object","properties":{"flowSlug":{"type":"string","description":"The ID of the Flow","example":"flow_abc"},"stepId":{"type":"string","description":"The ID of the Step","example":"step-1"},"data":{"type":"string","description":"The data of the flow response (for instance form responses)","example":"{\"key\": \"value\"}"},"actionType":{"type":"string","description":"The action type of the step. Possible values: `STARTED_STEP`, `COMPLETED_STEP`, `SKIPPED_STEP`, `NOT_STARTED_STEP`, `STARTED_FLOW`, `COMPLETED_FLOW`, `SKIPPED_FLOW`, `NOT_STARTED_FLOW`","example":"STARTED_STEP"},"createdAt":{"format":"date-time","type":"string","description":"The timestamp of the flow response","example":"2024-01-01T00:00:00Z"}},"required":["flowSlug","stepId","data","actionType","createdAt"]},"UserFlowState":{"type":"object","properties":{"flowSlug":{"type":"string","description":"The ID of the Flow","example":"flow_abc"},"flowState":{"type":"string","description":"The user's state in the Flow. Possible values: `COMPLETED_FLOW`, `STARTED_FLOW`, `NOT_STARTED_FLOW`, `SKIPPED_FLOW`","example":"COMPLETED_FLOW"},"flowResponses":{"description":"The flow responses associated with the user","example":[{"flowSlug":"flow_abc","actionType":"STARTED_STEP","stepId":"step-1","data":"{\"key\": \"value\"}","createdAt":"2024-01-01T00:00:00Z"}],"type":"array","items":{"$ref":"#/components/schemas/ExternalizedFlowResponse"}}},"required":["flowSlug","flowState"]},"ExternalizedUser":{"type":"object","properties":{"userId":{"type":"string","description":"The ID of the user as defined in your own application","example":"d34daa11-3745-4ac0-880e-d4b4d51fe13f"},"createdAt":{"format":"date-time","type":"string","description":"The date and time the user was created","example":"2024-01-01T00:00:00Z"},"modifiedAt":{"format":"date-time","type":"string","description":"The date and time the user was last modified","example":"2024-01-01T00:00:00Z"},"properties":{"type":"string","description":"The properties of the user","example":{"email":"[email protected]","firstName":"John","lastName":"Doe","imageUrl":"https://example.com/john-doe.jpg"}},"isGuest":{"type":"boolean","description":"Whether the user is a guest","example":false},"email":{"type":"string","description":"The email address of the user","example":"[email protected]"},"firstName":{"type":"string","description":"The first name of the user","example":"John"},"lastName":{"type":"string","description":"The last name of the user","example":"Doe"},"userFlowStates":{"description":"The user's state in the Flows they have interacted with","type":"array","items":{"$ref":"#/components/schemas/UserFlowState"}},"trackingEvents":{"description":"The tracking events associated with the user","example":[{"event":"SignedUp","properties":{"source":"landing-page","campaign":"summer-sale"},"createdAt":"2024-01-01T00:00:00Z"}],"type":"array","items":{"$ref":"#/components/schemas/ExternalizedTrackingEvent"}}}},"SessionDTO":{"type":"object","properties":{}},"AddPropertyOrEventsToUserGroupDTO":{"type":"object","properties":{"userId":{"type":"string","description":"The ID of the user as defined in your own application","example":"d34daa11-3745-4ac0-880e-d4b4d51fe13f"},"groupId":{"type":"string","description":"The ID of the group as defined in your own application","example":"x34daa11-3745-4ac0-880e-d4b4d51fe13f"},"properties":{"type":"object","description":"Optional properties to add to the group","example":{"name":"Acme Inc.","companyUrl":"https://example.com","logoUrl":"https://example.com/logo.jpg"}},"events":{"description":"Optional tracking events to add to the group","example":[{"event":"SignedUp","properties":{"source":"landing-page","campaign":"summer-sale"}}],"type":"array","items":{"$ref":"#/components/schemas/ExternalizedTrackingEvent"}}},"required":["groupId"]},"ExternalizedUserGroup":{"type":"object","properties":{"name":{"type":"string","description":"The name of the group","example":"Acme Inc."},"groupId":{"type":"string","description":"The ID of the group as defined in your own application","example":"x34daa11-3745-4ac0-880e-d4b4d51fe13f"},"createdAt":{"format":"date-time","type":"string","description":"The date the group was created","example":"2021-01-01T00:00:00.000Z"},"modifiedAt":{"format":"date-time","type":"string","description":"The date the group was last modified","example":"2021-01-01T00:00:00.000Z"},"properties":{"type":"string","description":"The properties of the group","example":{"name":"Acme Inc.","companyUrl":"https://example.com","logoUrl":"https://example.com/logo.jpg"}},"membersCount":{"type":"number","description":"The number of members in the group","example":42},"trackingEvents":{"description":"The tracking events associated with the group","example":[{"event":"SignedUp","properties":{"source":"landing-page","campaign":"summer-sale"},"createdAt":"2024-01-01T00:00:00Z"}],"type":"array","items":{"type":"string"}}}},"StatefulStepState":{"type":"object","properties":{"completed":{"type":"boolean","description":"Whether the Step is completed","example":true},"skipped":{"type":"boolean","description":"Whether the Step has been skipped","example":true},"started":{"type":"boolean","description":"Whether the Step has been started","example":true},"visible":{"type":"boolean","description":"Whether the Step is visible (based on `visibilityCriteria`)","example":true},"blocked":{"type":"boolean","description":"Whether the Step is blocked (based on `startCriteria`)","example":true},"lastActionAt":{"format":"date-time","type":"string","description":"The last time the user took an action on the Step","example":"2024-09-01T00:00:00.000Z"}}},"StatefulStep":{"type":"object","properties":{"id":{"type":"string","description":"The Step ID","example":"step_abc"},"$state":{"description":"The Step State","allOf":[{"$ref":"#/components/schemas/StatefulStepState"}]}}},"StatefulFlowData":{"type":"object","properties":{"steps":{"description":"List of Steps in the Flow","type":"array","items":{"$ref":"#/components/schemas/StatefulStep"}}}},"StatefulFlowState":{"type":"object","properties":{"currentStepId":{"type":"string","description":"The current step (if any) the user is on","example":"step_abc"},"currentStepIndex":{"type":"number","description":"The index of the current step in the Flow. Will be -1 if the user has not started the Flow","example":1},"completed":{"type":"boolean","description":"Whether the Flow is completed","example":true},"started":{"type":"boolean","description":"Whether the Flow has been started","example":true},"skipped":{"type":"boolean","description":"Whether the Flow has been skipped/dismissed","example":true},"visible":{"type":"boolean","description":"Whether the Flow is visible (based on the Flow's Targeting)","example":true},"lastActionAt":{"format":"date-time","type":"string","description":"The last time the user took an action on the Flow","example":"2024-09-01T00:00:00.000Z"}}},"StatefulFlow":{"type":"object","properties":{"flowSlug":{"type":"string","description":"The Flow Slug","example":"flow_abc"},"flowName":{"type":"string","description":"The Flow Name","example":"Onboarding Checklist"},"flowType":{"type":"string","description":"The Flow Type","example":"ANNOUNCEMENT"},"data":{"description":"The Flow's metadata including the user's state in each step","allOf":[{"$ref":"#/components/schemas/StatefulFlowData"}]},"$state":{"description":"The user's state in the Flow","allOf":[{"$ref":"#/components/schemas/StatefulFlowState"}]}}},"PublicUserFlowStateV2":{"type":"object","properties":{"eligibleFlows":{"description":"List of Flows that the user is eligible for as well as the user's state in each Flow","type":"array","items":{"$ref":"#/components/schemas/StatefulFlow"}},"ineligibleFlows":{"description":"List of Flow IDs that the user is ineligible for (for instance if a Flow is turned off)","type":"array","items":{"type":"string"}}}},"UserFlowStateDTO":{"type":"object","properties":{"userId":{"type":"string","description":"The ID of the user","example":"d34daa11-3745-4ac0-880e-d4b4d51fe13f"},"groupId":{"type":"string","description":"Optional ID of the group","example":"x34daa11-3745-4ac0-880e-d4b4d51fe13f"},"flowSlug":{"type":"string","description":"The Flow Slug","example":"flow_abc"},"stepId":{"type":"string","description":"The Step ID if updating a specific Step"},"data":{"type":"string","description":"Any optional data including the user action","example":{"action":"click"}},"actionType":{"type":"string","description":"The type of action the user took","enum":["STARTED_STEP","COMPLETED_STEP","SKIPPED_STEP","NOT_STARTED_STEP","STARTED_FLOW","COMPLETED_FLOW","SKIPPED_FLOW","NOT_STARTED_FLOW"],"example":"COMPLETED_STEP"}},"required":["userId","flowSlug","actionType"]},"DigitalOceanSSODTO":{"type":"object","properties":{}}}}}