import * as _wix_sdk_types from '@wix/sdk-types'; import { QuerySpec, Query, NonNullablePaths } from '@wix/sdk-types'; /** * A DraftFastGalleryItem is a ... * You can ... * Read more about DraftFastGalleryItems * in this [article](). */ interface DraftItem { /** * Item ID * @format GUID * @readonly */ _id?: string | null; /** * Represents the current state of the Item. Each time the item is modified, its `revision` changes by the server. for an update operation to succeed, you MUST pass the latest revision * @readonly */ revision?: string | null; /** * Gallery ID that the item is part of * @format GUID * @immutable */ draftGalleryId?: string | null; /** @maxLength 50 */ title?: string | null; /** @maxLength 1500 */ description?: string | null; /** Link to an internal or external page */ link?: Link; /** media of the item */ media?: MediaItem; /** * Sort order of Item in its Gallery, needed for Internal use * @internal * @readonly */ sortOrder?: number | null; /** * Represents the time this Item was created * @readonly */ _createdDate?: Date | null; /** * Represents the time this Item was last updated * @readonly */ _updatedDate?: Date | null; /** Data Extensions */ extendedFields?: ExtendedFields; } interface Link { /** * The type of the link * @internal */ type?: LinkTypeWithLiterals; /** * Display text of the link. * `referenced_entity_field` carries this field's translations from a source entity onto an entity * that references it - concretely, DraftItem -> the published Item, whose translations are synced * from DraftItem rather than owned locally. Without it the translated label is served on the draft * read (so the editor looks right) and silently falls back to the origin language on the published * read, which is what site visitors get. It must be declared on this leaf: the collector only * honours the annotation on STRING / StringValue / RichContent and ignores it on message fields. * The path is the field's location in the source entity; every embedder of this type - pro-gallery * and fast-gallery, draft and published - places it at `link`, so one path is correct for all. * @maxLength 1000 */ text?: string | null; /** * Target URL of the link. * @format WEB_URL */ url?: string | null; /** * Whether the link opens in a new tab or window. One of: * * `'_blank'`: The link opens in a new tab or window. * * `'_self'`: The link opens in the same tab or window. * if more options are needed, be sure to change maxLength accordingly * @internal * @maxLength 6 */ target?: string | null; /** * Information about the link. Reserved for internal use. * @internal */ wixLinkData?: WixLink; } declare enum LinkType { UNDEFINED = "UNDEFINED", /** external link */ EXTERNAL = "EXTERNAL", /** for internal usage using wixLinkData */ INTERNAL = "INTERNAL" } /** @enumType */ type LinkTypeWithLiterals = LinkType | 'UNDEFINED' | 'EXTERNAL' | 'INTERNAL'; /** The link object generated by panels in the editor and used by applications in Wix */ interface WixLink extends WixLinkLinkOneOf { /** External link type */ external?: ExternalLink; /** Page link type */ page?: PageLink; /** Anchor link type */ anchor?: AnchorLink; /** Dynamic page link type */ dynamicPage?: DynamicPageLink; /** Document link type */ document?: DocumentLink; /** Email link type */ email?: EmailLink; /** Phone link type */ phone?: PhoneLink; /** Address link type */ address?: AddressLink; /** WhatsApp link type */ whatsApp?: WhatsAppLink; /** TPA link type */ tpaPage?: TpaPageLink; } /** @oneof */ interface WixLinkLinkOneOf { /** External link type */ external?: ExternalLink; /** Page link type */ page?: PageLink; /** Anchor link type */ anchor?: AnchorLink; /** Dynamic page link type */ dynamicPage?: DynamicPageLink; /** Document link type */ document?: DocumentLink; /** Email link type */ email?: EmailLink; /** Phone link type */ phone?: PhoneLink; /** Address link type */ address?: AddressLink; /** WhatsApp link type */ whatsApp?: WhatsAppLink; /** TPA link type */ tpaPage?: TpaPageLink; } interface ExternalLink { /** * The url of the page * @format WEB_URL */ url?: string; /** * Where this link should open, supports _self and _blank or any name the user chooses. _self means same page, _blank means new page. * @maxLength 1000 */ target?: string | null; /** @maxSize 20 */ rel?: LinkRelWithLiterals[]; } /** * The 'rel' attribute of the link. The rel attribute defines the relationship between a linked resource and the current document. * Further reading (also about different possible rel types): https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel * Following are the accepted 'rel' types by Wix applications. */ declare enum LinkRel { /** Indicates that the current document's original author or publisher does not endorse the referenced document. */ nofollow = "nofollow", /** Instructs the browser to navigate to the target resource without granting the new browsing context access to the document that opened it. */ noopener = "noopener", /** No Referer header will be included. Additionally, has the same effect as noopener. */ noreferrer = "noreferrer", /** Indicates a link that resulted from advertisements or paid placements. */ sponsored = "sponsored" } /** @enumType */ type LinkRelWithLiterals = LinkRel | 'nofollow' | 'noopener' | 'noreferrer' | 'sponsored'; interface PageLink { /** * The page id we want from the site * @maxLength 1000 */ pageId?: string; /** * Where this link should open, supports _self and _blank or any name the user chooses. _self means same page, _blank means new page. * @maxLength 1000 */ target?: string | null; /** * rel of link * @maxSize 20 */ rel?: LinkRelWithLiterals[]; } interface AnchorLink { /** * The name of the anchor * @maxLength 1000 */ anchorName?: string; /** * The data id (from the JSON page) of the anchor that should be used * @maxLength 1000 */ anchorDataId?: string; /** * The page id we want from the site * @maxLength 1000 */ pageId?: string; /** * rel of link * @maxSize 20 */ rel?: LinkRelWithLiterals[]; } interface DynamicPageLink { /** * The router that handles this link * @maxLength 1000 */ routerId?: string; /** * The path data we'd like * @maxLength 1000 */ innerRoute?: string; /** * The data id (from the JSON page) of the anchor that should be used * @maxLength 1000 */ anchorDataId?: string | null; /** * rel of link * @maxSize 20 */ rel?: LinkRelWithLiterals[]; } interface DocumentLink { /** * The id of the document * @maxLength 1000 */ docId?: string; /** * The name of the document for download purposes * @maxLength 1000 */ name?: string | null; /** If this document can be indexed by scrapers, default is false */ indexable?: boolean; } interface EmailLink { /** * The email we will be sending a message to * @format EMAIL */ recipient?: string; /** * The subject of the email * @maxLength 1000 */ subject?: string | null; /** * The body of the email * @maxLength 100000 */ body?: string | null; } interface PhoneLink { /** * The phone number we want to link to * @format PHONE * @maxLength 100 */ phoneNumber?: string; } interface AddressLink { /** * An address that we can link to * @maxLength 1000 */ address?: string; } interface WhatsAppLink { /** * The whatsApp phone number we want to connect with * @format PHONE */ phoneNumber?: string; } /** Link to a TPA page */ interface TpaPageLink { /** * Type of item (e.g. 'wix.stores.sub_pages.product') * @maxLength 1000 */ itemTypeIdentifier?: string; /** * Id of linked item * @maxLength 1000 */ itemId?: string; /** * Id of linked page * @maxLength 1000 */ pageId?: string; /** * Id of app being linked to (AppDefId) * @maxLength 1000 */ appDefinitionId?: string; /** * The relativepath of linked page * @maxLength 10000 */ path?: string; /** * rel of link * @maxSize 20 */ rel?: LinkRelWithLiterals[]; } interface MediaItem extends MediaItemMediaOneOf { /** image item */ imageOptions?: Image; /** item's media type */ type?: TypeWithLiterals; } /** @oneof */ interface MediaItemMediaOneOf { /** image item */ imageOptions?: Image; } declare enum Type { /** undefined type */ UNDEFINED = "UNDEFINED", /** image */ IMAGE = "IMAGE" } /** @enumType */ type TypeWithLiterals = Type | 'UNDEFINED' | 'IMAGE'; interface Image { /** Information about the Wix Media image. */ imageInfo?: string; /** Focal point of the image. */ focalPoint?: Point; /** Set of key-value pairs describing the media in [Exchangeable Image File format](https://en.wikipedia.org/wiki/Exif). */ exif?: Record | null; /** * Image compression level.
* * Min: `30`
* Max: `100` * @min 30 * @max 100 */ quality?: number | null; /** [Unsharp masking](https://en.wikipedia.org/wiki/Unsharp_masking) values of the image. */ unsharpMasking?: UnsharpMasking; /** * Whether the image is saved in secure media. * @internal */ secure?: boolean | null; /** * Image alt text, translatable. * @maxLength 5000 */ altText?: string | null; } interface FocalPoint { /** X-coordinate of the focal point. */ x?: number; /** Y-coordinate of the focal point. */ y?: number; } interface Point { /** X-coordinate of the focal point. */ x?: number; /** Y-coordinate of the focal point. */ y?: number; } interface UnsharpMasking { /** * Unsharp masking amount. Controls the sharpening strength.
* * Min: `0`
* Max: `5` * @max 5 */ amount?: number | null; /** Unsharp masking radius in pixels. Controls the sharpening width. */ radius?: number | null; /** * Unsharp masking threshold. Controls how different neighboring pixels must be for shapening to apply.
* * Min: `0`
* Max: `1` * @max 1 */ threshold?: number | null; } interface ExtendedFields { /** * Extended field data. Each key corresponds to the namespace of the app that created the extended fields. * The value of each key is structured according to the schema defined when the extended fields were configured. * * You can only access fields for which you have the appropriate permissions. * * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */ namespaces?: Record>; } interface ReorderedDraftItem { /** * The id of the gallery in which the reordering was done * @format GUID */ galleryId?: string; /** * The id of the last DraftItem that was re-positioned * @format GUID */ draftItemId?: string | null; /** New sortOrder of the last DraftItem that was re-positioned */ sortOrder?: number | null; } interface CreateDraftItemRequest { /** DraftFastGalleryItem to be created. */ draftItem: DraftItem; /** If true, the item will be positioned first in the gallery. If not present or false, the items will be positioned last. */ positionFirst?: boolean | null; } interface CreateDraftItemResponse { /** The created DraftFastGalleryItem. */ draftItem?: DraftItem; } interface GetDraftItemRequest { /** * ID of the DraftFastGalleryItem to retrieve. * @format GUID */ draftItemId: string; } interface GetDraftItemResponse { /** The requested DraftFastGalleryItem. */ draftItem?: DraftItem; } interface UpdateDraftItemRequest { /** DraftFastGalleryItem to be updated, may be partial. */ draftItem: DraftItem; /** * Explicit list of fields to update. * @internal */ fieldMask?: string[]; } interface UpdateDraftItemResponse { /** Updated DraftFastGalleryItem. */ draftItem?: DraftItem; } interface DeleteDraftItemRequest { /** * Id of the DraftFastGalleryItem to delete. * @format GUID */ draftItemId: string; } interface DeleteDraftItemResponse { } interface QueryDraftItemsRequest { /** WQL expression. */ query?: CursorQuery; } interface CursorQuery extends CursorQueryPagingMethodOneOf { /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging; /** * 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?: Record | null; /** * Sort object in the following format: * `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` * @maxSize 5 */ sort?: Sorting[]; } /** @oneof */ interface CursorQueryPagingMethodOneOf { /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: CursorPaging; } 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 CursorPaging { /** * Maximum number of items to return in the results. * @max 100 */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. * @maxLength 16000 */ cursor?: string | null; } interface QueryDraftItemsResponse { /** List of DraftFastGalleryItems. */ draftItems?: DraftItem[]; /** Paging metadata */ pagingMetadata?: CursorPagingMetadata; } interface CursorPagingMetadata { /** Number of items returned in the response. */ count?: number | null; /** Cursor strings that point to the next page, previous page, or both. */ cursors?: Cursors; /** * Whether there are more pages to retrieve following the current page. * * + `true`: Another page of results can be retrieved. * + `false`: This is the last page. */ hasNext?: boolean | null; } interface Cursors { /** * Cursor string pointing to the next page in the list of results. * @maxLength 16000 */ next?: string | null; /** * Cursor pointing to the previous page in the list of results. * @maxLength 16000 */ prev?: string | null; } interface UpdateExtendedFieldsRequest { /** ID of the entity to update. */ _id: string; /** Identifier for the app whose extended fields are being updated. */ namespace: string; /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */ namespaceData: Record | null; } interface UpdateExtendedFieldsResponse { /** Updated Item. */ draftItem?: DraftItem; } interface BulkCreateDraftItemsRequest { /** * List of DraftFastGalleryItems to be created * @minSize 1 * @maxSize 100 */ draftItems: DraftItem[]; /** set to `true` if you wish to receive back the created DraftFastGalleryItems in the response */ returnEntity?: boolean; /** If true, the item will be positioned first in the gallery. If not present or false, the items will be positioned last. */ positionFirst?: boolean | null; } interface BulkCreateDraftItemsResponse { /** * List of the bulk create operation results including the DraftFastGalleryItems and metadata. * @minSize 1 * @maxSize 100 */ results?: BulkDraftItemResult[]; /** Metadata regarding the bulk create operation */ bulkActionMetadata?: BulkActionMetadata; } interface ItemMetadata { /** * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). * @format GUID */ _id?: string | null; /** Index of the item within the request array. Allows for correlation between request and response items. */ originalIndex?: number; /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */ success?: boolean; /** Details about the error in case of failure. */ error?: ApplicationError; } interface ApplicationError { /** Error code. */ code?: string; /** Description of the error. */ description?: string; /** Data related to the error. */ data?: Record | null; } interface BulkDraftItemResult { /** Metadata regarding the specific single create operation */ itemMetadata?: ItemMetadata; /** Only exists if `returnEntity` was set to true in the request */ item?: DraftItem; } interface BulkActionMetadata { /** Number of items that were successfully processed. */ totalSuccesses?: number; /** Number of items that couldn't be processed. */ totalFailures?: number; /** Number of failures without details because detailed failure threshold was exceeded. */ undetailedFailures?: number; } interface BulkUpdateDraftItemsRequest { /** * List of DraftFastGalleryItems to be updated. * @minSize 1 * @maxSize 100 */ draftItems: MaskedDraftItem[]; /** set to `true` if you wish to receive back the updated DraftFastGalleryItems in the response */ returnEntity?: boolean; } interface MaskedDraftItem { /** DraftFastGalleryItem to be updated, may be partial */ draftItem?: DraftItem; /** * Explicit list of fields to update. * @internal */ fieldMask?: string[]; } interface BulkUpdateDraftItemsResponse { /** * Results * @minSize 1 * @maxSize 100 */ results?: BulkUpdateDraftItemsResponseBulkDraftItemResult[]; /** Metadata regarding the bulk update operation */ bulkActionMetadata?: BulkActionMetadata; } interface BulkUpdateDraftItemsResponseBulkDraftItemResult { /** Metadata regarding the specific single update operation */ itemMetadata?: ItemMetadata; /** Only exists if `returnEntity` was set to true in the request */ item?: DraftItem; } interface BulkDeleteDraftItemsRequest { /** * DraftFastGalleryItem ids to be deleted * @minSize 1 * @maxSize 100 * @format GUID */ draftItemIds: string[]; } interface BulkDeleteDraftItemsResponse { /** * Results * @minSize 1 * @maxSize 100 */ results?: BulkDeleteDraftItemsResponseBulkDraftItemResult[]; /** Metadata regarding the bulk delete operation */ bulkActionMetadata?: BulkActionMetadata; } interface BulkDeleteDraftItemsResponseBulkDraftItemResult { /** Metadata regarding the specific single delete operation */ itemMetadata?: ItemMetadata; } interface RemoveDraftItemFromTrashBinRequest { /** * ID of the DraftItem to remove from TrashBin * @format GUID */ draftItemId: string; } interface RemoveDraftItemFromTrashBinResponse { } interface RestoreDraftItemFromTrashBinRequest { /** * ID of the DraftItem to restore from TrashBin * @format GUID */ draftItemId: string; } interface RestoreDraftItemFromTrashBinResponse { /** The restored DraftItem */ draftItem?: DraftItem; } interface GetDeletedDraftItemRequest { /** * ID of the DraftItem to retrieve from TrashBin * @format GUID */ draftItemId: string; } interface GetDeletedDraftItemResponse { /** The requested DraftItem */ draftItem?: DraftItem; } interface ListDeletedDraftItemsRequest { /** WQL expression */ query?: CursorQuery; /** * List of DraftItem IDs to retrieve (supersedes the query) * @format GUID * @maxSize 100 */ draftItemIds?: string[]; } interface ListDeletedDraftItemsResponse { /** The retrieved deleted Galleries */ draftItems?: DraftItem[]; /** Paging metadata */ pagingMetadata?: CursorPagingMetadata; } interface MoveDraftItemsRequest { /** * DraftItem ids to be moved after `after_item_id`, if not provided, draftItems given will be positioned first * @format GUID * @minSize 1 * @maxSize 50 */ itemIds: string[]; /** * Id of the draftItem which the items will be positioned after * @format GUID */ afterItemId?: string | null; } interface MoveDraftItemsResponse { } interface DraftItemNotFoundError { /** * The draft item id that was not found * @format GUID */ draftItemId?: string; } interface DraftItemNotInGalleryError { /** * List of gallery IDs where the draft items are located. * @format GUID * @maxSize 100000 */ galleryIds?: string[]; } interface SortDraftItemsByRequest { /** DraftItem ids to be sorted by field `sorting.field_name`, in direction `sorting.order` */ sorting: SortByFieldSorting; /** * ID of the Gallery whose items are sorted * @format GUID */ draftGalleryId: string; } interface SortByFieldSorting { /** Name of the field to sort by. */ fieldName?: SortableFieldNamesWithLiterals; /** Sort order. */ order?: SortOrderWithLiterals; } declare enum SortableFieldNames { TITLE = "TITLE" } /** @enumType */ type SortableFieldNamesWithLiterals = SortableFieldNames | 'TITLE'; interface SortDraftItemsByResponse { /** * Job ID for the sort operation (async-infra) * @format GUID */ jobId?: string; } interface DraftItemSortUnsupportedError { } 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 { entity?: string; } 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. */ currentEntity?: string; } interface EntityDeletedEvent { /** Entity that was deleted. */ deletedEntity?: string | null; } interface ActionEvent { body?: string; } interface Empty { } 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; } /** @docsIgnore */ type MoveDraftItemsApplicationErrors = { code?: 'ITEM_NOT_FOUND'; description?: string; data?: DraftItemNotFoundError; } | { code?: 'ITEMS_FROM_DIFFERENT_GALLERIES'; description?: string; data?: DraftItemNotInGalleryError; }; /** @docsIgnore */ type SortDraftItemsByApplicationErrors = { code?: 'INVALID_ARGUMENT'; description?: string; data?: DraftItemSortUnsupportedError; }; /** * Creates a DraftFastGalleryItem. * * The request body must include lorem and business address. Ipsum is optional. * @param draftItem - DraftFastGalleryItem to be created. * @public * @documentationMaturity preview * @requiredField draftItem * @permissionId FAST_GALLERY.MANAGE * @applicableIdentity APP * @returns The created DraftFastGalleryItem. * @fqn wix.fastgallery.draftitem.v1.DraftItemService.CreateDraftItem */ declare function createDraftItem(draftItem: DraftItem, options?: CreateDraftItemOptions): Promise>; interface CreateDraftItemOptions { /** If true, the item will be positioned first in the gallery. If not present or false, the items will be positioned last. */ positionFirst?: boolean | null; } /** * Retrieves a DraftFastGalleryItem. * @param draftItemId - ID of the DraftFastGalleryItem to retrieve. * @public * @documentationMaturity preview * @requiredField draftItemId * @permissionId FAST_GALLERY.READ * @applicableIdentity APP * @returns The requested DraftFastGalleryItem. * @fqn wix.fastgallery.draftitem.v1.DraftItemService.GetDraftItem */ declare function getDraftItem(draftItemId: string): Promise>; /** * Updates a DraftFastGalleryItem. * @param _id - Item ID * @public * @documentationMaturity preview * @requiredField _id * @requiredField draftItem * @requiredField draftItem.revision * @permissionId FAST_GALLERY.MANAGE * @applicableIdentity APP * @returns Updated DraftFastGalleryItem. * @fqn wix.fastgallery.draftitem.v1.DraftItemService.UpdateDraftItem */ declare function updateDraftItem(_id: string, draftItem: NonNullablePaths): Promise>; interface UpdateDraftItem { /** * Item ID * @format GUID * @readonly */ _id?: string | null; /** * Represents the current state of the Item. Each time the item is modified, its `revision` changes by the server. for an update operation to succeed, you MUST pass the latest revision * @readonly */ revision?: string | null; /** * Gallery ID that the item is part of * @format GUID * @immutable */ draftGalleryId?: string | null; /** @maxLength 50 */ title?: string | null; /** @maxLength 1500 */ description?: string | null; /** Link to an internal or external page */ link?: Link; /** media of the item */ media?: MediaItem; /** * Sort order of Item in its Gallery, needed for Internal use * @internal * @readonly */ sortOrder?: number | null; /** * Represents the time this Item was created * @readonly */ _createdDate?: Date | null; /** * Represents the time this Item was last updated * @readonly */ _updatedDate?: Date | null; /** Data Extensions */ extendedFields?: ExtendedFields; } /** * Deletes a DraftFastGalleryItem. * @param draftItemId - Id of the DraftFastGalleryItem to delete. * @public * @documentationMaturity preview * @requiredField draftItemId * @permissionId FAST_GALLERY.MANAGE * @applicableIdentity APP * @fqn wix.fastgallery.draftitem.v1.DraftItemService.DeleteDraftItem */ declare function deleteDraftItem(draftItemId: string): Promise; /** * Creates a query to retrieve a list of draft items. * * The `queryDraftItems()` method builds a query to retrieve a list of draft items and returns a `DraftItemsQueryBuilder` object. * * The returned object contains the query definition, which is used to run the query using the `find()` method. * * You can refine the query by chaining `DraftItemsQueryBuilder` methods onto the query. `DraftItemsQueryBuilder` methods enable you to filter, sort, and control the results that `queryDraftItems()` returns. * @public * @documentationMaturity preview * @permissionId FAST_GALLERY.READ * @applicableIdentity APP * @fqn wix.fastgallery.draftitem.v1.DraftItemService.QueryDraftItems */ declare function queryDraftItems(): DraftItemsQueryBuilder; interface QueryCursorResult { cursors: Cursors; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } interface DraftItemsQueryResult extends QueryCursorResult { items: DraftItem[]; query: DraftItemsQueryBuilder; next: () => Promise; prev: () => Promise; } interface DraftItemsQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ eq: (propertyName: '_id' | 'draftGalleryId' | 'title' | '_createdDate' | '_updatedDate', value: any) => DraftItemsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ne: (propertyName: '_id' | 'draftGalleryId' | 'title' | '_createdDate' | '_updatedDate', value: any) => DraftItemsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ge: (propertyName: '_id' | 'draftGalleryId' | 'title' | '_createdDate' | '_updatedDate', value: any) => DraftItemsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ gt: (propertyName: '_id' | 'draftGalleryId' | 'title' | '_createdDate' | '_updatedDate', value: any) => DraftItemsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ le: (propertyName: '_id' | 'draftGalleryId' | 'title' | '_createdDate' | '_updatedDate', value: any) => DraftItemsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ lt: (propertyName: '_id' | 'draftGalleryId' | 'title' | '_createdDate' | '_updatedDate', value: any) => DraftItemsQueryBuilder; /** @param propertyName - Property whose value is compared with `string`. * @param string - String to compare against. Case-insensitive. * @documentationMaturity preview */ startsWith: (propertyName: '_id' | 'draftGalleryId' | 'title', value: string) => DraftItemsQueryBuilder; /** @documentationMaturity preview */ in: (propertyName: '_id' | 'draftGalleryId' | 'title' | '_createdDate' | '_updatedDate', value: any) => DraftItemsQueryBuilder; /** @documentationMaturity preview */ exists: (propertyName: '_id' | 'draftGalleryId' | 'title' | '_createdDate' | '_updatedDate', value: boolean) => DraftItemsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ ascending: (...propertyNames: Array<'_id' | 'draftGalleryId' | 'title' | 'sortOrder' | '_createdDate' | '_updatedDate'>) => DraftItemsQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. * @documentationMaturity preview */ descending: (...propertyNames: Array<'_id' | 'draftGalleryId' | 'title' | 'sortOrder' | '_createdDate' | '_updatedDate'>) => DraftItemsQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. * @documentationMaturity preview */ limit: (limit: number) => DraftItemsQueryBuilder; /** @param cursor - A pointer to specific record * @documentationMaturity preview */ skipTo: (cursor: string) => DraftItemsQueryBuilder; /** @documentationMaturity preview */ find: () => Promise; } /** * @hidden * @fqn wix.fastgallery.draftitem.v1.DraftItemService.QueryDraftItems * @requiredField query */ declare function typedQueryDraftItems(query: DraftItemQuery): Promise>; interface DraftItemQuerySpec extends QuerySpec { paging: 'cursor'; wql: [ { fields: [ '_createdDate', '_id', '_updatedDate', 'draftGalleryId', 'title' ]; operators: '*'; sort: 'BOTH'; } ]; } type CommonQueryWithEntityContext = Query; type DraftItemQuery = { /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: { /** Maximum number of items to return in the results. @max: 100 */ limit?: NonNullable['limit'] | null; /** Pointer to the next or previous page in the list of results. Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request. @maxLength: 16000 */ cursor?: NonNullable['cursor'] | null; }; /** 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?: CommonQueryWithEntityContext['filter'] | null; /** Sort object in the following format: `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]` @maxSize: 5 */ sort?: { /** Name of the field to sort by. @maxLength: 512 */ fieldName?: NonNullable[number]['fieldName']; /** Sort order. */ order?: NonNullable[number]['order']; }[]; }; declare const utils: { query: _wix_sdk_types.QueryHelpers; }; /** * Updates extended fields of a DraftFastGalleryItem without incrementing revision * @param _id - ID of the entity to update. * @param namespace - Identifier for the app whose extended fields are being updated. * @public * @documentationMaturity preview * @requiredField _id * @requiredField namespace * @requiredField options * @requiredField options.namespaceData * @permissionId FAST_GALLERY.MANAGE * @applicableIdentity APP * @fqn wix.fastgallery.draftitem.v1.DraftItemService.UpdateExtendedFields */ declare function updateExtendedFields(_id: string, namespace: string, options: NonNullablePaths): Promise>; interface UpdateExtendedFieldsOptions { /** Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured. */ namespaceData: Record | null; } /** * Create multiple DraftFastGalleryItems in a single request. Works synchronously. * @param draftItems - List of DraftFastGalleryItems to be created * @public * @documentationMaturity preview * @requiredField draftItems * @permissionId FAST_GALLERY.MANAGE * @applicableIdentity APP * @fqn wix.fastgallery.draftitem.v1.DraftItemService.BulkCreateDraftItems */ declare function bulkCreateDraftItems(draftItems: DraftItem[], options?: BulkCreateDraftItemsOptions): Promise>; interface BulkCreateDraftItemsOptions { /** set to `true` if you wish to receive back the created DraftFastGalleryItems in the response */ returnEntity?: boolean; /** If true, the item will be positioned first in the gallery. If not present or false, the items will be positioned last. */ positionFirst?: boolean | null; } /** * Update multiple DraftFastGalleryItems in a single request. Works synchronously. * @param draftItems - List of DraftFastGalleryItems to be updated. * @public * @documentationMaturity preview * @requiredField draftItems * @requiredField draftItems.draftItem.revision * @permissionId FAST_GALLERY.MANAGE * @applicableIdentity APP * @fqn wix.fastgallery.draftitem.v1.DraftItemService.BulkUpdateDraftItems */ declare function bulkUpdateDraftItems(draftItems: NonNullablePaths[], options?: BulkUpdateDraftItemsOptions): Promise>; interface BulkUpdateDraftItemsOptions { /** set to `true` if you wish to receive back the updated DraftFastGalleryItems in the response */ returnEntity?: boolean; } /** * Delete multiple DraftFastGalleryItems in a single request. Works synchronously. * @param draftItemIds - DraftFastGalleryItem ids to be deleted * @public * @documentationMaturity preview * @requiredField draftItemIds * @permissionId FAST_GALLERY.MANAGE * @applicableIdentity APP * @fqn wix.fastgallery.draftitem.v1.DraftItemService.BulkDeleteDraftItems */ declare function bulkDeleteDraftItems(draftItemIds: string[]): Promise>; /** * Removes a DraftItem from TrashBin, permanently deleting it. * @param draftItemId - ID of the DraftItem to remove from TrashBin * @public * @documentationMaturity preview * @requiredField draftItemId * @permissionId FAST_GALLERY.MANAGE * @applicableIdentity APP * @fqn wix.fastgallery.draftitem.v1.DraftItemService.RemoveDraftItemFromTrashBin */ declare function removeDraftItemFromTrashBin(draftItemId: string): Promise; /** * Restores a DraftItem from TrashBin. Increments the revision. * @param draftItemId - ID of the DraftItem to restore from TrashBin * @public * @documentationMaturity preview * @requiredField draftItemId * @permissionId FAST_GALLERY.MANAGE * @applicableIdentity APP * @fqn wix.fastgallery.draftitem.v1.DraftItemService.RestoreDraftItemFromTrashBin */ declare function restoreDraftItemFromTrashBin(draftItemId: string): Promise>; /** * Retrieves a DraftItem from TrashBin. (DraftItem is kept in TrashBin) * @param draftItemId - ID of the DraftItem to retrieve from TrashBin * @public * @documentationMaturity preview * @requiredField draftItemId * @permissionId FAST_GALLERY.MANAGE * @applicableIdentity APP * @fqn wix.fastgallery.draftitem.v1.DraftItemService.GetDeletedDraftItem */ declare function getDeletedDraftItem(draftItemId: string): Promise>; /** * Retrieves a list of DraftItems from TrashBin. * If 'draft_item_ids' is provided returns only the requested DraftItems. * If query is provided, returns DraftItems that match the query. * If both provided, 'draft_item_ids' supersedes the query. * @public * @documentationMaturity preview * @permissionId FAST_GALLERY.MANAGE * @applicableIdentity APP * @fqn wix.fastgallery.draftitem.v1.DraftItemService.ListDeletedDraftItems */ declare function listDeletedDraftItems(options?: ListDeletedDraftItemsOptions): Promise>; interface ListDeletedDraftItemsOptions { /** WQL expression */ query?: CursorQuery; /** * List of DraftItem IDs to retrieve (supersedes the query) * @format GUID * @maxSize 100 */ draftItemIds?: string[]; } /** * Move Draft Items to be after another Draft Item. * If beforeItemId is not provided, the DraftItem will be positioned first. * @param itemIds - DraftItem ids to be moved after `after_item_id`, if not provided, draftItems given will be positioned first * @public * @documentationMaturity preview * @requiredField itemIds * @permissionId FAST_GALLERY.MANAGE * @applicableIdentity APP * @fqn wix.fastgallery.draftitem.v1.DraftItemService.MoveDraftItems */ declare function moveDraftItems(itemIds: string[], options?: MoveDraftItemsOptions): Promise; interface MoveDraftItemsOptions { /** * Id of the draftItem which the items will be positioned after * @format GUID */ afterItemId?: string | null; } /** * Sort Draft Items by field name and order. * @param sorting - DraftItem ids to be sorted by field `sorting.field_name`, in direction `sorting.order` * @public * @documentationMaturity preview * @requiredField options * @requiredField options.draftGalleryId * @requiredField sorting * @requiredField sorting.fieldName * @permissionId FAST_GALLERY.MANAGE * @applicableIdentity APP * @fqn wix.fastgallery.draftitem.v1.DraftItemService.SortDraftItemsBy */ declare function sortDraftItemsBy(sorting: NonNullablePaths, options: NonNullablePaths): Promise & { __applicationErrorsType?: SortDraftItemsByApplicationErrors; }>; interface SortDraftItemsByOptions { /** * ID of the Gallery whose items are sorted * @format GUID */ draftGalleryId: string; } export { type AccountInfo, type ActionEvent, type AddressLink, type AnchorLink, type ApplicationError, type BulkActionMetadata, type BulkCreateDraftItemsOptions, type BulkCreateDraftItemsRequest, type BulkCreateDraftItemsResponse, type BulkDeleteDraftItemsRequest, type BulkDeleteDraftItemsResponse, type BulkDeleteDraftItemsResponseBulkDraftItemResult, type BulkDraftItemResult, type BulkUpdateDraftItemsOptions, type BulkUpdateDraftItemsRequest, type BulkUpdateDraftItemsResponse, type BulkUpdateDraftItemsResponseBulkDraftItemResult, type CommonQueryWithEntityContext, type CreateDraftItemOptions, type CreateDraftItemRequest, type CreateDraftItemResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DeleteDraftItemRequest, type DeleteDraftItemResponse, type DocumentLink, type DomainEvent, type DomainEventBodyOneOf, type DraftItem, type DraftItemNotFoundError, type DraftItemNotInGalleryError, type DraftItemQuery, type DraftItemQuerySpec, type DraftItemSortUnsupportedError, type DraftItemsQueryBuilder, type DraftItemsQueryResult, type DynamicPageLink, type EmailLink, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type ExtendedFields, type ExternalLink, type FocalPoint, type GetDeletedDraftItemRequest, type GetDeletedDraftItemResponse, type GetDraftItemRequest, type GetDraftItemResponse, type IdentificationData, type IdentificationDataIdOneOf, type Image, type ItemMetadata, type Link, LinkRel, type LinkRelWithLiterals, LinkType, type LinkTypeWithLiterals, type ListDeletedDraftItemsOptions, type ListDeletedDraftItemsRequest, type ListDeletedDraftItemsResponse, type MaskedDraftItem, type MediaItem, type MediaItemMediaOneOf, type MessageEnvelope, type MoveDraftItemsApplicationErrors, type MoveDraftItemsOptions, type MoveDraftItemsRequest, type MoveDraftItemsResponse, type PageLink, type PhoneLink, type Point, type QueryDraftItemsRequest, type QueryDraftItemsResponse, type RemoveDraftItemFromTrashBinRequest, type RemoveDraftItemFromTrashBinResponse, type ReorderedDraftItem, type RestoreDraftItemFromTrashBinRequest, type RestoreDraftItemFromTrashBinResponse, type RestoreInfo, type SortByFieldSorting, type SortDraftItemsByApplicationErrors, type SortDraftItemsByOptions, type SortDraftItemsByRequest, type SortDraftItemsByResponse, SortOrder, type SortOrderWithLiterals, SortableFieldNames, type SortableFieldNamesWithLiterals, type Sorting, type TpaPageLink, Type, type TypeWithLiterals, type UnsharpMasking, type UpdateDraftItem, type UpdateDraftItemRequest, type UpdateDraftItemResponse, type UpdateExtendedFieldsOptions, type UpdateExtendedFieldsRequest, type UpdateExtendedFieldsResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, type WhatsAppLink, type WixLink, type WixLinkLinkOneOf, bulkCreateDraftItems, bulkDeleteDraftItems, bulkUpdateDraftItems, createDraftItem, deleteDraftItem, getDeletedDraftItem, getDraftItem, listDeletedDraftItems, moveDraftItems, queryDraftItems, removeDraftItemFromTrashBin, restoreDraftItemFromTrashBin, sortDraftItemsBy, typedQueryDraftItems, updateDraftItem, updateExtendedFields, utils };