import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types'; import { ListCardsOptions, ListCardsResponse, Card, CardInfo, CreateCardIdentifiers, CreateCardOptions, CreateCardResponse, MoveCardOptions, RestoreCardOptions } from './index.typings.js'; export { AccountInfo, ActionEvent, ArchiveCardRequest, ArchiveCardResponse, Attachment, AttachmentType, AttachmentTypeWithLiterals, CreateCardRequest, DeleteCardRequest, DeleteCardResponse, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, GetCardRequest, GetCardResponse, IdentificationData, IdentificationDataIdOneOf, ListCardsRequest, MessageEnvelope, MoveCardRequest, MoveCardResponse, PaginationResponse, Paging, Query, QueryCardsRequest, QueryCardsResponse, RestoreCardRequest, RestoreCardResponse, RestoreInfo, SortOrder, SortOrderWithLiterals, Sorting, UpdateCardRequest, UpdateCardResponse, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js'; declare function listCards$1(httpClient: HttpClient): ListCardsSignature; interface ListCardsSignature { /** * Retrieves a list of a workflow's cards. * * * The `listCards()` function returns a Promise that resolves to a list of the specified workflow's cards. * * * Use the `options` parameter to specify which cards to retrieve and in which order to retrieve them. Must use either `phaseId` or `fetchOnlyArchived`. * * * Cards can be sorted based on their `"id"`, `"name"`, `"phaseId"`, `"createdDate"`, `"updatedDate"`, `"source"`, and `"position"`. * * * If no `limit` parameter is passed, the first 50 cards are returned. * * * Sort order defaults to by `"phaseId"` and then by `"position"` ascending. * * * This function requires you to specify the ID of a workflow. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids). * @param - ID of the workflow whose cards will be listed. * @param - Options to use when retrieving the list of cards. */ (workflowId: string, options?: ListCardsOptions): Promise>; } declare function getCard$1(httpClient: HttpClient): GetCardSignature; interface GetCardSignature { /** * Retrieves a workflow card by ID. * * * The `getCard()` function returns a Promise that resolves to the card with the specified ID. * * * This function requires you to specify the ID of a card. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids). * @param - ID of the card to retrieve. * @returns Requested card. */ (_id: string): Promise>; } declare function updateCard$1(httpClient: HttpClient): UpdateCardSignature; interface UpdateCardSignature { /** * Updates an existing workflow card. * * * The `updateCard()` function returns a Promise that resolves when the card has been updated with the specified values. * * * `contactId` is not a required field, but if the parameter is not passed, the field will default to empty and the card will not be associated with any contact. * * * This function requires you to specify the ID of a card. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids). * @param - ID of the card to update. * @param - Card details. * @param - Options to use when updating a card. */ (_id: string, cardInfo: CardInfo): Promise; } declare function createCard$1(httpClient: HttpClient): CreateCardSignature; interface CreateCardSignature { /** * Creates a new workflow card. * * * The `createCard()` function returns a Promise that resolves to the created card's ID when the card is created in the specified workflow phase. * * Pass a value for the `position` parameter to specify the newly created card's position within the specified phase. Positions are zero-based, meaning the first position is `0`. * * When omitted, the newly created card is added to the specified phase as the top card within the phase. * * * This function requires you to specify the ID of a workflow and phase. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids). * * > **Note:** * > Each workflow is limited to 5,000 cards. * > If this limit is reached, `createCard()` throws an error. * > [Archive cards](#archivecard) when they're no longer needed * > to reduce card count and avoid hitting the limit. * @param - Card details. * @param - Options to use when creating a card. */ (identifiers: NonNullablePaths, card: CardInfo, options?: CreateCardOptions): Promise; } declare function deleteCard$1(httpClient: HttpClient): DeleteCardSignature; interface DeleteCardSignature { /** * Deletes a workflow card by ID. * * * The `deleteCard()` function returns a Promise when the specified card has been deleted. * * This function requires you to specify the ID of a card. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids). * @param - ID of the card to delete. */ (_id: string): Promise; } declare function moveCard$1(httpClient: HttpClient): MoveCardSignature; interface MoveCardSignature { /** * Moves a card to a new position within a workflow. * * * The `moveCard()` function returns a Promise when the specified card has been moved to the new position. * * Use the `options` parameter to specify the phase and position within that phase to move the card to. Positions are zero-based, meaning the first position is `0`. * * This function requires you to specify the ID of a card. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids). * @param - ID of the card to move. * @param - Information about where to move the card. */ (_id: string, options?: MoveCardOptions): Promise; } declare function restoreCard$1(httpClient: HttpClient): RestoreCardSignature; interface RestoreCardSignature { /** * Restores an archived workflow card. * * * The `restoreCard()` function returns a Promise that resolves when the archived card has been restored. * * * This function requires you to specify the ID of a card. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids). * * * > **Note:** * > Each workflow is limited to 5,000 cards. * > If this limit is reached, `createCard()` throws an error. * > [Archive cards](#archivecard) when they're no longer needed * > to reduce card count and avoid hitting the limit. * @param - ID of the card to restore. * @param - ID of the phase to restore the card to. * @param - Options to use when restoring a card. */ (_id: string, newPhaseId: string, options?: RestoreCardOptions): Promise; } declare function archiveCard$1(httpClient: HttpClient): ArchiveCardSignature; interface ArchiveCardSignature { /** * Archives a workflow card. * * * The `archiveCard()` function returns a Promise that resolves when the card has been archived. * * * This function requires you to specify the ID of a card. To learn about retrieving IDs in the Workflows APIs, see [Retrieving IDs](wix-workflows-v2/introduction#retrieving-ids). * @param - ID of the card to archive. */ (_id: string): Promise; } declare const listCards: MaybeContext & typeof listCards$1>; declare const getCard: MaybeContext & typeof getCard$1>; declare const updateCard: MaybeContext & typeof updateCard$1>; declare const createCard: MaybeContext & typeof createCard$1>; declare const deleteCard: MaybeContext & typeof deleteCard$1>; declare const moveCard: MaybeContext & typeof moveCard$1>; declare const restoreCard: MaybeContext & typeof restoreCard$1>; declare const archiveCard: MaybeContext & typeof archiveCard$1>; export { Card, CardInfo, CreateCardIdentifiers, CreateCardOptions, CreateCardResponse, ListCardsOptions, ListCardsResponse, MoveCardOptions, RestoreCardOptions, archiveCard, createCard, deleteCard, getCard, listCards, moveCard, restoreCard, updateCard };