import { ListCardsRequest as ListCardsRequest$1, ListCardsResponse as ListCardsResponse$1, GetCardRequest as GetCardRequest$1, GetCardResponse as GetCardResponse$1, UpdateCardRequest as UpdateCardRequest$1, UpdateCardResponse as UpdateCardResponse$1, CreateCardRequest as CreateCardRequest$1, CreateCardResponse as CreateCardResponse$1, DeleteCardRequest as DeleteCardRequest$1, DeleteCardResponse as DeleteCardResponse$1, MoveCardRequest as MoveCardRequest$1, MoveCardResponse as MoveCardResponse$1, RestoreCardRequest as RestoreCardRequest$1, RestoreCardResponse as RestoreCardResponse$1, ArchiveCardRequest as ArchiveCardRequest$1, ArchiveCardResponse as ArchiveCardResponse$1 } from './index.typings.js'; import '@wix/sdk-types'; 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'; interface QueryCardsRequest { /** Query, sort, and paging 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 QueryCardsResponse { /** List of cards that matched the query criteria. */ cards?: Card[]; /** 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 ListCardsRequest { /** * ID of the workflow whose cards will be listed. * @format GUID */ workflowId: string; /** * Filters for cards in the specified phase. * @format GUID */ phaseId?: string | null; /** * Number of items to return. * * Defaults to `50`. */ limit?: number | null; /** * Number of items to skip in the current sort order. * * Defaults to `0`. */ offset?: number | null; /** Filters for cards with the specified contact ID. */ attachmentValue?: string | null; /** * Filters for archived cards. * If set to `true`, * only archived cards are returned. * If set to `false`, * only cards that are not archived are returned. * * Defaults to `false`. */ fetchArchived?: boolean | null; /** * Supported fields: * `id`, `name`, `createdDate`, `updatedDate`, `phaseId` * * 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 ListCardsResponse { /** List of cards. */ cards?: Card[]; /** Metadata for the page of results. */ pagination?: PaginationResponse; } interface GetCardRequest { /** * ID of the card to retrieve. * @format GUID */ id: string; } interface GetCardResponse { /** Requested card. */ card?: Card; } interface UpdateCardRequest { /** * ID of the card to update. * @format GUID */ id: string; /** Card details. */ cardInfo?: CardInfo; } interface UpdateCardResponse { } interface CreateCardRequest { /** * ID of the workflow to create the card in. * @format GUID */ workflowId: string; /** * ID of the phase to create the card in. * @format GUID */ phaseId: string; /** Card details. */ card?: CardInfo; /** * Card position, where the first card is `0`. * * If a card already occupies the specified position, * that card and any subsequent cards are shifted to the right by 1. * * Defaults to the last position. */ position?: number | null; } interface CreateCardResponse { /** * ID of the newly created card. * @format GUID */ id?: string | null; } interface DeleteCardRequest { /** * ID of the card to delete. * @format GUID */ id: string; } interface DeleteCardResponse { } interface MoveCardRequest { /** * ID of the card to move. * @format GUID */ id: string; /** * ID of the phase to move the card to. * @format GUID */ newPhaseId?: string | null; /** Position of the card in the phase, where the first card is `0`. */ newPosition?: number | null; } interface MoveCardResponse { } interface RestoreCardRequest { /** * ID of the card to restore. * @format GUID */ id: string; /** * ID of the phase to restore the card to. * @format GUID */ newPhaseId: string; /** * Position of the restored card in the phase, * where the first card is `0`. */ newPosition?: number | null; } interface RestoreCardResponse { } interface ArchiveCardRequest { /** * ID of the card to archive. * @format GUID */ id: string; } interface ArchiveCardResponse { } interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** Event ID. With this ID you can easily spot duplicated events and ignore them. */ id?: string; /** * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities. * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`. */ entityFqdn?: string; /** * Event action name, placed at the top level to make it easier for users to dispatch messages. * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`. */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number. * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it. */ entityEventSequence?: string | null; } /** @oneof */ interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } interface EntityCreatedEvent { entityAsJson?: string; /** Indicates the event was triggered by a restore-from-trashbin operation for a previously deleted entity */ restoreInfo?: RestoreInfo; } interface RestoreInfo { deletedDate?: Date | null; } interface EntityUpdatedEvent { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntityAsJson?: string; } interface EntityDeletedEvent { /** Entity that was deleted. */ deletedEntityAsJson?: string | null; } interface ActionEvent { bodyAsJson?: string; } interface MessageEnvelope { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; /** Details related to the account */ accountInfo?: AccountInfo; } interface IdentificationData extends IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; /** @readonly */ identityType?: WebhookIdentityTypeWithLiterals; } /** @oneof */ interface IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; } declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** @enumType */ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP'; interface AccountInfo { /** * ID of the Wix account associated with the event. * @format GUID */ accountId?: string | null; /** * ID of the parent Wix account. Only included when accountId belongs to a child account. * @format GUID */ parentAccountId?: string | null; /** * ID of the Wix site associated with the event. Only included when the event is tied to a specific site. * @format GUID */ siteId?: string | null; } type __PublicMethodMetaInfo = { getUrl: (context: any) => string; httpMethod: K; path: string; pathParams: M; __requestType: T; __originalRequestType: S; __responseType: Q; __originalResponseType: R; }; declare function listCards(): __PublicMethodMetaInfo<'GET', { workflowId: string; }, ListCardsRequest$1, ListCardsRequest, ListCardsResponse$1, ListCardsResponse>; declare function getCard(): __PublicMethodMetaInfo<'GET', { id: string; }, GetCardRequest$1, GetCardRequest, GetCardResponse$1, GetCardResponse>; declare function updateCard(): __PublicMethodMetaInfo<'PATCH', { id: string; }, UpdateCardRequest$1, UpdateCardRequest, UpdateCardResponse$1, UpdateCardResponse>; declare function createCard(): __PublicMethodMetaInfo<'POST', { workflowId: string; phaseId: string; }, CreateCardRequest$1, CreateCardRequest, CreateCardResponse$1, CreateCardResponse>; declare function deleteCard(): __PublicMethodMetaInfo<'DELETE', { id: string; }, DeleteCardRequest$1, DeleteCardRequest, DeleteCardResponse$1, DeleteCardResponse>; declare function moveCard(): __PublicMethodMetaInfo<'POST', { id: string; }, MoveCardRequest$1, MoveCardRequest, MoveCardResponse$1, MoveCardResponse>; declare function restoreCard(): __PublicMethodMetaInfo<'POST', { id: string; }, RestoreCardRequest$1, RestoreCardRequest, RestoreCardResponse$1, RestoreCardResponse>; declare function archiveCard(): __PublicMethodMetaInfo<'POST', { id: string; }, ArchiveCardRequest$1, ArchiveCardRequest, ArchiveCardResponse$1, ArchiveCardResponse>; export { type AccountInfo as AccountInfoOriginal, type ActionEvent as ActionEventOriginal, type ArchiveCardRequest as ArchiveCardRequestOriginal, type ArchiveCardResponse as ArchiveCardResponseOriginal, type Attachment as AttachmentOriginal, AttachmentType as AttachmentTypeOriginal, type AttachmentTypeWithLiterals as AttachmentTypeWithLiteralsOriginal, type CardInfo as CardInfoOriginal, type Card as CardOriginal, type CreateCardRequest as CreateCardRequestOriginal, type CreateCardResponse as CreateCardResponseOriginal, type DeleteCardRequest as DeleteCardRequestOriginal, type DeleteCardResponse as DeleteCardResponseOriginal, type DomainEventBodyOneOf as DomainEventBodyOneOfOriginal, type DomainEvent as DomainEventOriginal, type EntityCreatedEvent as EntityCreatedEventOriginal, type EntityDeletedEvent as EntityDeletedEventOriginal, type EntityUpdatedEvent as EntityUpdatedEventOriginal, type GetCardRequest as GetCardRequestOriginal, type GetCardResponse as GetCardResponseOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type ListCardsRequest as ListCardsRequestOriginal, type ListCardsResponse as ListCardsResponseOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type MoveCardRequest as MoveCardRequestOriginal, type MoveCardResponse as MoveCardResponseOriginal, type PaginationResponse as PaginationResponseOriginal, type Paging as PagingOriginal, type QueryCardsRequest as QueryCardsRequestOriginal, type QueryCardsResponse as QueryCardsResponseOriginal, type Query as QueryOriginal, type RestoreCardRequest as RestoreCardRequestOriginal, type RestoreCardResponse as RestoreCardResponseOriginal, type RestoreInfo as RestoreInfoOriginal, SortOrder as SortOrderOriginal, type SortOrderWithLiterals as SortOrderWithLiteralsOriginal, type Sorting as SortingOriginal, type UpdateCardRequest as UpdateCardRequestOriginal, type UpdateCardResponse as UpdateCardResponseOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, archiveCard, createCard, deleteCard, getCard, listCards, moveCard, restoreCard, updateCard };