import { ListWorkflowsRequest as ListWorkflowsRequest$1, ListWorkflowsResponse as ListWorkflowsResponse$1, GetWorkflowRequest as GetWorkflowRequest$1, GetWorkflowResponse as GetWorkflowResponse$1, UpdateWorkflowRequest as UpdateWorkflowRequest$1, UpdateWorkflowResponse as UpdateWorkflowResponse$1, CreateWorkflowRequest as CreateWorkflowRequest$1, CreateWorkflowResponse as CreateWorkflowResponse$1, DeleteWorkflowRequest as DeleteWorkflowRequest$1, DeleteWorkflowResponse as DeleteWorkflowResponse$1 } from './index.typings.js'; import '@wix/sdk-types'; interface Workflow { /** Workflow information and metadata. */ info?: WorkflowInfo; /** * Final phase of the workflow. * Cards in `winPhase` are treated as if they are not part of the workflow. * * Normally, a contact can be attached to only 1 card in the workflow. * Moving a contact's card to `winPhase` * frees up the contact to be attached to another card in the workflow. */ winPhase?: Phase; /** Phases that make up the workflow. */ phasesList?: PhasesList; } interface WorkflowInfo { /** * Workflow ID. * @format GUID * @readonly */ id?: string | null; /** Display name for the workflow. */ name?: string | null; /** * Workflow description, * shown below the workflow's display name in the dashboard. */ description?: string | null; /** * Deprecated. Use `createdDate` instead. * @readonly * @deprecated */ createdAt?: Date | null; /** * Indicates whether the workflow can be deleted. * @readonly * @deprecated */ isDeletable?: boolean | null; /** * Date and time the workflow was created. * @readonly */ createdDate?: Date | null; } interface Phase { /** Phase information. */ info?: PhaseInfo; /** Cards contained in the phase. */ cardsList?: CardsList; } interface PhaseInfo { /** * Phase ID. * @format GUID * @readonly */ id?: string | null; /** Display name shown at the top of the phase. */ name?: string | null; } /** a list of cards (a page) along with the total number */ interface CardsList { /** Total number of cards in the phase. */ total?: number; /** * List of cards in the phase. * Sorted according to the card display order, from top to bottom. */ cards?: Card[]; } interface Card { /** Card details. */ info?: CardInfo; } /** entity representing a card-info */ interface CardInfo { /** * Card ID. * @format GUID * @readonly */ id?: string | null; /** Display name shown at the top of the card. */ name?: string | null; /** Card description. */ description?: string | null; /** Details about the contact attached to the card. */ primaryAttachment?: Attachment; /** Due date. */ dueDate?: Date | null; /** Name of the app or service that created the contact. */ source?: string | null; /** * Deprecated. Use `createdDate` instead. * @readonly * @deprecated */ createdAt?: Date | null; /** * Deprecated. Use `updatedDate` instead. * @readonly * @deprecated */ updatedAt?: Date | null; /** * ID of the phase that currently holds the card. * @format GUID * @readonly */ phaseId?: string | null; /** * Date and time the card was created. * @readonly */ createdDate?: Date | null; /** * Date and time the card was updated. * @readonly */ updatedDate?: Date | null; } interface Attachment { /** * Attachment ID. For internal use. * @format GUID * @readonly */ attachmentId?: string; /** * Deprecated. Use `contactId` instead. * @deprecated */ value?: string; /** * Deprecated. For internal use. * @deprecated */ attachmentType?: AttachmentTypeWithLiterals; /** * ID of the contact attached to the card. * @format GUID */ contactId?: string; } /** describes the supported types of attachments (currently only supports Contact which is the default type) */ declare enum AttachmentType { ContactType = "ContactType" } /** @enumType */ type AttachmentTypeWithLiterals = AttachmentType | 'ContactType'; /** a list of phases (a page) along with the total number */ interface PhasesList { /** Total number of phases in the workflow, excluding `winPhase`. */ total?: number; /** * List of phases in the workflow. * Sorted according to the phase display order, from left to right. */ phases?: Phase[]; } interface ListWorkflowsRequest { /** * Number of workflows to return. * If omitted, all results are returned. */ limit?: number | null; /** * Number of items to skip in the current sort order. * * Defaults to `0`. */ offset?: number | null; /** * Supported fields: * `id`, `name`, `description`, `createdDate` * * List of fields to sort by. * Formatted as `field:direction`, * where field is the field name * and direction is `asc` (ascending) or `desc` (descending). * * Sorting is applied lexicographically, so `"abc"` comes after `"XYZ"`. */ sort?: string[]; } interface ListWorkflowsResponse { /** Retrieved list of workflows. */ workflows?: WorkflowInfo[]; /** Metadata for the page of results. */ pagination?: PaginationResponse; } interface PaginationResponse { /** Number of items that were skipped in the current sort order. */ offset?: number; /** Total number of items that matched the filter. */ total?: number; /** Number of returned items. */ count?: number; } interface QueryWorkflowsRequest { /** Query options. */ query?: Query; } interface Query { /** * Filter object in the following format: * `"filter" : { * "fieldName1": "value1", * "fieldName2":{"$operator":"value2"} * }` * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains` */ filter?: any; /** * Sort object in the following format: * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` */ sort?: Sorting[]; /** Paging options to limit and skip the number of items. */ paging?: Paging; /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */ fields?: string[]; /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */ fieldsets?: string[]; } interface Sorting { /** * Name of the field to sort by. * @maxLength 512 */ fieldName?: string; /** Sort order. */ order?: SortOrderWithLiterals; } declare enum SortOrder { ASC = "ASC", DESC = "DESC" } /** @enumType */ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC'; interface Paging { /** Number of items to load. */ limit?: number | null; /** Number of items to skip in the current sort order. */ offset?: number | null; } interface QueryWorkflowsResponse { /** List of workflows that matched the query. */ workflows?: Workflow[]; /** Metadata for the paginated results. */ pagination?: PaginationResponse; } interface GetWorkflowRequest { /** * ID of the workflow to retrieve. * @format GUID */ id: string; /** * Maximum number of cards to return per phase. * To retrieve additional pages of cards, use * [List Cards](https://dev.wix.com/api/rest/workflows/workflows/cards/list-cards) * (in the Cards API). * * Defaults to `10`. * @max 100 */ cardsPerPhase?: number | null; } interface GetWorkflowResponse { /** Requested workflow. */ workflow?: Workflow; } interface UpdateWorkflowRequest { /** * ID of the workflow to update. * @format GUID */ id: string; /** Workflow info. */ workflow?: WorkflowInfo; } interface UpdateWorkflowResponse { } interface CreateWorkflowRequest { /** Workflow details. */ workflow?: WorkflowInfo; } interface CreateWorkflowResponse { /** * ID of the new workflow. * @format GUID */ id?: string | null; } interface DeleteWorkflowRequest { /** * ID of the workflow to delete. * @format GUID */ id: string; } interface DeleteWorkflowResponse { } interface SetupWorkflowRequest { } interface SetupWorkflowResponse { } type __PublicMethodMetaInfo = { getUrl: (context: any) => string; httpMethod: K; path: string; pathParams: M; __requestType: T; __originalRequestType: S; __responseType: Q; __originalResponseType: R; }; declare function listWorkflows(): __PublicMethodMetaInfo<'GET', {}, ListWorkflowsRequest$1, ListWorkflowsRequest, ListWorkflowsResponse$1, ListWorkflowsResponse>; declare function getWorkflow(): __PublicMethodMetaInfo<'GET', { id: string; }, GetWorkflowRequest$1, GetWorkflowRequest, GetWorkflowResponse$1, GetWorkflowResponse>; declare function updateWorkflow(): __PublicMethodMetaInfo<'PATCH', { id: string; }, UpdateWorkflowRequest$1, UpdateWorkflowRequest, UpdateWorkflowResponse$1, UpdateWorkflowResponse>; declare function createWorkflow(): __PublicMethodMetaInfo<'POST', {}, CreateWorkflowRequest$1, CreateWorkflowRequest, CreateWorkflowResponse$1, CreateWorkflowResponse>; declare function deleteWorkflow(): __PublicMethodMetaInfo<'DELETE', { id: string; }, DeleteWorkflowRequest$1, DeleteWorkflowRequest, DeleteWorkflowResponse$1, DeleteWorkflowResponse>; export { type Attachment as AttachmentOriginal, AttachmentType as AttachmentTypeOriginal, type AttachmentTypeWithLiterals as AttachmentTypeWithLiteralsOriginal, type CardInfo as CardInfoOriginal, type Card as CardOriginal, type CardsList as CardsListOriginal, type CreateWorkflowRequest as CreateWorkflowRequestOriginal, type CreateWorkflowResponse as CreateWorkflowResponseOriginal, type DeleteWorkflowRequest as DeleteWorkflowRequestOriginal, type DeleteWorkflowResponse as DeleteWorkflowResponseOriginal, type GetWorkflowRequest as GetWorkflowRequestOriginal, type GetWorkflowResponse as GetWorkflowResponseOriginal, type ListWorkflowsRequest as ListWorkflowsRequestOriginal, type ListWorkflowsResponse as ListWorkflowsResponseOriginal, type PaginationResponse as PaginationResponseOriginal, type Paging as PagingOriginal, type PhaseInfo as PhaseInfoOriginal, type Phase as PhaseOriginal, type PhasesList as PhasesListOriginal, type Query as QueryOriginal, type QueryWorkflowsRequest as QueryWorkflowsRequestOriginal, type QueryWorkflowsResponse as QueryWorkflowsResponseOriginal, type SetupWorkflowRequest as SetupWorkflowRequestOriginal, type SetupWorkflowResponse as SetupWorkflowResponseOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type Sorting as SortingOriginal, type UpdateWorkflowRequest as UpdateWorkflowRequestOriginal, type UpdateWorkflowResponse as UpdateWorkflowResponseOriginal, type WorkflowInfo as WorkflowInfoOriginal, type Workflow as WorkflowOriginal, type __PublicMethodMetaInfo, createWorkflow, deleteWorkflow, getWorkflow, listWorkflows, updateWorkflow };