import * as _wix_sdk_types from '@wix/sdk-types'; import { QuerySpec, Query, NonNullablePaths } from '@wix/sdk-types'; /** * A branch is a version of draft site content that can be edited independently. Also known as a test site. * * Branches let site owners and developers create isolated versions of a site for testing changes without affecting the live site. Each branch maintains its own content, design, and settings while sharing the same site infrastructure. * * Learn more about [branches](https://support.wix.com/en/article/about-test-sites). */ interface Branch extends BranchSourceOneOf { /** Source branch properties. Use when `sourceType` = `SOURCE_BRANCH`. */ sourceBranchProperties?: SourceBranch; /** Source template properties. Use when `sourceType` = `SOURCE_TEMPLATE`. */ sourceTemplateProperties?: SourceTemplate; /** * Branch ID. * @format GUID * @readonly */ _id?: string | null; /** * Revision number, which increments by 1 each time the branch is updated. * To prevent conflicting changes, * the current revision must be passed when updating the branch. * @readonly */ revision?: string | null; /** Branch type. */ type?: TypeWithLiterals; /** * Branch name. * @maxLength 50 */ name?: string | null; /** Source type for this branch's content. Must be aligned with the corresponding source properties below. */ sourceType?: SourceTypeWithLiterals; /** * Date and time the branch was last published. * @readonly */ lastPublishDate?: string | null; /** * Wix editor type. * @readonly */ editorType?: EditorType; /** * Whether this branch is the default branch. The default branch is used for API operations when no branch ID is specified. * @readonly */ default?: boolean | null; /** * Date and time the branch was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the branch was last updated. * @readonly */ _updatedDate?: Date | null; /** * Custom field data for the branch. * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls. */ extendedFields?: ExtendedFields; /** Public tags assigned to the branch. */ tags?: PublicTags; } /** @oneof */ interface BranchSourceOneOf { /** Source branch properties. Use when `sourceType` = `SOURCE_BRANCH`. */ sourceBranchProperties?: SourceBranch; /** Source template properties. Use when `sourceType` = `SOURCE_TEMPLATE`. */ sourceTemplateProperties?: SourceTemplate; } declare enum Type { /** A branch created by a site owner that can be accessed for editing and publishing in the editor. */ USER = "USER", /** A branch created for technical purposes, unrelated to site owners. For internal use, can't be accessed in the editor. */ TECHNICAL = "TECHNICAL", /** The original branch of the site, created when the site is created. Can be accessed for editing and publishing in the editor. */ ORIGINAL_BRANCH = "ORIGINAL_BRANCH" } /** @enumType */ type TypeWithLiterals = Type | 'USER' | 'TECHNICAL' | 'ORIGINAL_BRANCH'; declare enum SourceType { /** This branch's source was another branch. Must be used with `sourceBranchProperties`. */ SOURCE_BRANCH = "SOURCE_BRANCH" } /** @enumType */ type SourceTypeWithLiterals = SourceType | 'SOURCE_BRANCH'; interface EditorType { /** Wix editor types. */ editorTypeOptions?: EditorTypeOptionsWithLiterals; } declare enum EditorTypeOptions { /** Wix Studio Editor. */ STUDIO = "STUDIO", /** Wix's Classic Editor. */ CLASSIC = "CLASSIC" } /** @enumType */ type EditorTypeOptionsWithLiterals = EditorTypeOptions | 'STUDIO' | 'CLASSIC'; interface SourceBranch { /** * Source branch ID. * @format GUID */ branchId?: string; /** Revision number of the source branch when this branch was created. To prevent conflicting changes, the current revision must be passed when updating the branch. */ branchRevision?: string | null; } interface SourceTemplate { /** * Source template ID. * @format GUID */ templateId?: string; } 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 PublicTags { /** Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors. */ tags?: TagList; } interface TagList { /** * List of tag IDs. * @maxSize 100 * @maxLength 5 */ tagIds?: string[]; } interface TagsModified { /** Updated branch. */ branch?: Branch; /** Tags that were assigned to the branch. */ assignedTags?: PublicTags; /** Tags that were unassigned from the branch. */ unassignedTags?: PublicTags; } interface CreateBranchRequest { /** Branch to create. */ branch: Branch; } interface CreateBranchResponse { /** Created branch. */ branch?: Branch; } interface GetBranchRequest { /** * ID of the branch to retrieve. * @format GUID */ branchId: string; } interface GetBranchResponse { /** Requested branch. */ branch?: Branch; } interface UpdateBranchRequest { /** Branch to update. */ branch: Branch; } interface UpdateBranchResponse { /** Updated branch. */ branch?: Branch; } interface DeleteBranchRequest { /** * ID of the branch to delete. * @format GUID */ branchId: string; } interface DeleteBranchResponse { } interface QueryBranchesRequest { /** Query options. See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language) for more information. */ query?: CursorQuery; } interface CursorQuery extends CursorQueryPagingMethodOneOf { /** * Cursor paging options. * * Learn more about [cursor paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language#cursor-paging). */ cursorPaging?: CursorPaging; /** * Filter object. * * Learn more about [filtering](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language#filters). */ filter?: Record | null; /** * Sort object. * * Learn more about [sorting](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language#sorting). * @maxSize 5 */ sort?: Sorting[]; } /** @oneof */ interface CursorQueryPagingMethodOneOf { /** * Cursor paging options. * * Learn more about [cursor paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language#cursor-paging). */ 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 QueryBranchesResponse { /** List of branches. */ branches?: Branch[]; /** Metadata for the paginated results. */ 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 branch. */ branch?: Branch; } interface HtmlSitePublished { /** * Application instance ID * @maxLength 50 */ appInstanceId?: string; /** * Application type * @maxLength 100 */ appType?: string; /** Revision */ revision?: string; /** * MSID * @maxLength 100 */ metaSiteId?: string | null; /** * optional branch id if publish is done from branch * @format GUID */ branchId?: string | null; /** The site's last transactionId */ lastTransactionId?: string | null; /** A list of the site's pages */ pages?: Page[]; /** Site's publish date */ publishDate?: string; /** Determine if this message was produced by editor-deployments service */ originatedFromDeploymentsService?: boolean; } interface Page { /** * Page's Id * @maxLength 100 */ _id?: string; } interface Empty { } interface MetaSiteSpecialEvent extends MetaSiteSpecialEventPayloadOneOf { /** Emitted on a meta site creation. */ siteCreated?: SiteCreated; /** Emitted on a meta site transfer completion. */ siteTransferred?: SiteTransferred; /** Emitted on a meta site deletion. */ siteDeleted?: SiteDeleted; /** Emitted on a meta site restoration. */ siteUndeleted?: SiteUndeleted; /** Emitted on the first* publish of the meta site (* switching from unpublished to published state). */ sitePublished?: SitePublished; /** Emitted on a meta site unpublish. */ siteUnpublished?: SiteUnpublished; /** Emitted when meta site is marked as template. */ siteMarkedAsTemplate?: SiteMarkedAsTemplate; /** Emitted when meta site is marked as a WixSite. */ siteMarkedAsWixSite?: SiteMarkedAsWixSite; /** Emitted when an application is provisioned (installed). */ serviceProvisioned?: ServiceProvisioned; /** Emitted when an application is removed (uninstalled). */ serviceRemoved?: ServiceRemoved; /** Emitted when meta site name (URL slug) is changed. */ siteRenamedPayload?: SiteRenamed; /** Emitted when meta site was permanently deleted. */ hardDeleted?: SiteHardDeleted; /** Emitted on a namespace change. */ namespaceChanged?: NamespaceChanged; /** Emitted when Studio is attached. */ studioAssigned?: StudioAssigned; /** Emitted when Studio is detached. */ studioUnassigned?: StudioUnassigned; /** * Emitted when one of the URLs is changed. After this event you may call `urls-server` to fetch * the actual URL. * * See: https://wix.slack.com/archives/C0UHEBPFT/p1732520791210559?thread_ts=1732027914.294059&cid=C0UHEBPFT * See: https://wix.slack.com/archives/C0UHEBPFT/p1744115197619459 */ urlChanged?: SiteUrlChanged; /** Site is marked as PurgedExternally */ sitePurgedExternally?: SitePurgedExternally; /** Emitted when Odeditor is attached. */ odeditorAssigned?: OdeditorAssigned; /** Emitted when Odeditor is detached. */ odeditorUnassigned?: OdeditorUnassigned; /** Emitted when Picasso is attached. */ picassoAssigned?: PicassoAssigned; /** Emitted when Picasso is detached. */ picassoUnassigned?: PicassoUnassigned; /** Emitted when Wixel is attached. */ wixelAssigned?: WixelAssigned; /** Emitted when Wixel is detached. */ wixelUnassigned?: WixelUnassigned; /** Emitted when StudioTwo is attached. */ studioTwoAssigned?: StudioTwoAssigned; /** Emitted when StudioTwo is detached. */ studioTwoUnassigned?: StudioTwoUnassigned; /** Emitted when media from user domain is enabled. */ userDomainMediaEnabled?: UserDomainMediaEnabled; /** Emitted when media from user domain is disabled. */ userDomainMediaDisabled?: UserDomainMediaDisabled; /** Emitted when Editorless is attached. */ editorlessAssigned?: EditorlessAssigned; /** Emitted when Editorless is detached. */ editorlessUnassigned?: EditorlessUnassigned; /** * A meta site id. * @format GUID */ metaSiteId?: string; /** A meta site version. Monotonically increasing. */ version?: string; /** A timestamp of the event. */ timestamp?: string; /** * TODO(meta-site): Change validation once validations are disabled for consumers * More context: https://wix.slack.com/archives/C0UHEBPFT/p1720957844413149 and https://wix.slack.com/archives/CFWKX325T/p1728892152855659 * @maxSize 4000 */ assets?: Asset[]; } /** @oneof */ interface MetaSiteSpecialEventPayloadOneOf { /** Emitted on a meta site creation. */ siteCreated?: SiteCreated; /** Emitted on a meta site transfer completion. */ siteTransferred?: SiteTransferred; /** Emitted on a meta site deletion. */ siteDeleted?: SiteDeleted; /** Emitted on a meta site restoration. */ siteUndeleted?: SiteUndeleted; /** Emitted on the first* publish of the meta site (* switching from unpublished to published state). */ sitePublished?: SitePublished; /** Emitted on a meta site unpublish. */ siteUnpublished?: SiteUnpublished; /** Emitted when meta site is marked as template. */ siteMarkedAsTemplate?: SiteMarkedAsTemplate; /** Emitted when meta site is marked as a WixSite. */ siteMarkedAsWixSite?: SiteMarkedAsWixSite; /** Emitted when an application is provisioned (installed). */ serviceProvisioned?: ServiceProvisioned; /** Emitted when an application is removed (uninstalled). */ serviceRemoved?: ServiceRemoved; /** Emitted when meta site name (URL slug) is changed. */ siteRenamedPayload?: SiteRenamed; /** Emitted when meta site was permanently deleted. */ hardDeleted?: SiteHardDeleted; /** Emitted on a namespace change. */ namespaceChanged?: NamespaceChanged; /** Emitted when Studio is attached. */ studioAssigned?: StudioAssigned; /** Emitted when Studio is detached. */ studioUnassigned?: StudioUnassigned; /** * Emitted when one of the URLs is changed. After this event you may call `urls-server` to fetch * the actual URL. * * See: https://wix.slack.com/archives/C0UHEBPFT/p1732520791210559?thread_ts=1732027914.294059&cid=C0UHEBPFT * See: https://wix.slack.com/archives/C0UHEBPFT/p1744115197619459 */ urlChanged?: SiteUrlChanged; /** Site is marked as PurgedExternally */ sitePurgedExternally?: SitePurgedExternally; /** Emitted when Odeditor is attached. */ odeditorAssigned?: OdeditorAssigned; /** Emitted when Odeditor is detached. */ odeditorUnassigned?: OdeditorUnassigned; /** Emitted when Picasso is attached. */ picassoAssigned?: PicassoAssigned; /** Emitted when Picasso is detached. */ picassoUnassigned?: PicassoUnassigned; /** Emitted when Wixel is attached. */ wixelAssigned?: WixelAssigned; /** Emitted when Wixel is detached. */ wixelUnassigned?: WixelUnassigned; /** Emitted when StudioTwo is attached. */ studioTwoAssigned?: StudioTwoAssigned; /** Emitted when StudioTwo is detached. */ studioTwoUnassigned?: StudioTwoUnassigned; /** Emitted when media from user domain is enabled. */ userDomainMediaEnabled?: UserDomainMediaEnabled; /** Emitted when media from user domain is disabled. */ userDomainMediaDisabled?: UserDomainMediaDisabled; /** Emitted when Editorless is attached. */ editorlessAssigned?: EditorlessAssigned; /** Emitted when Editorless is detached. */ editorlessUnassigned?: EditorlessUnassigned; } interface Asset { /** * An application definition id (app_id in dev-center). For legacy reasons may be UUID or a string (from Java Enum). * @maxLength 36 */ appDefId?: string; /** * An instance id. For legacy reasons may be UUID or a string. * @maxLength 200 */ instanceId?: string; /** An application state. */ state?: StateWithLiterals; } declare enum State { UNKNOWN = "UNKNOWN", ENABLED = "ENABLED", DISABLED = "DISABLED", PENDING = "PENDING", DEMO = "DEMO" } /** @enumType */ type StateWithLiterals = State | 'UNKNOWN' | 'ENABLED' | 'DISABLED' | 'PENDING' | 'DEMO'; interface SiteCreated { /** * A template identifier (empty if not created from a template). * @maxLength 36 */ originTemplateId?: string; /** * An account id of the owner. * @format GUID */ ownerId?: string; /** A context in which meta site was created. */ context?: SiteCreatedContextWithLiterals; /** * A meta site id from which this site was created. * * In case of a creation from a template it's a template id. * In case of a site duplication ("Save As" in dashboard or duplicate in UM) it's an id of a source site. * @format GUID */ originMetaSiteId?: string | null; /** * A meta site name (URL slug). * @maxLength 20 */ siteName?: string; /** A namespace. */ namespace?: NamespaceWithLiterals; } declare enum SiteCreatedContext { /** A valid option, we don't expose all reasons why site might be created. */ OTHER = "OTHER", /** A meta site was created from template. */ FROM_TEMPLATE = "FROM_TEMPLATE", /** A meta site was created by copying of the transfferred meta site. */ DUPLICATE_BY_SITE_TRANSFER = "DUPLICATE_BY_SITE_TRANSFER", /** A copy of existing meta site. */ DUPLICATE = "DUPLICATE", /** A meta site was created as a transfferred site (copy of the original), old flow, should die soon. */ OLD_SITE_TRANSFER = "OLD_SITE_TRANSFER", /** deprecated A meta site was created for Flash editor. */ FLASH = "FLASH" } /** @enumType */ type SiteCreatedContextWithLiterals = SiteCreatedContext | 'OTHER' | 'FROM_TEMPLATE' | 'DUPLICATE_BY_SITE_TRANSFER' | 'DUPLICATE' | 'OLD_SITE_TRANSFER' | 'FLASH'; declare enum Namespace { UNKNOWN_NAMESPACE = "UNKNOWN_NAMESPACE", /** Default namespace for UGC sites. MetaSites with this namespace will be shown in a user's site list by default. */ WIX = "WIX", /** ShoutOut stand alone product. These are siteless (no actual Wix site, no HtmlWeb). MetaSites with this namespace will *not* be shown in a user's site list by default. */ SHOUT_OUT = "SHOUT_OUT", /** MetaSites created by the Albums product, they appear as part of the Albums app. MetaSites with this namespace will *not* be shown in a user's site list by default. */ ALBUMS = "ALBUMS", /** Part of the WixStores migration flow, a user tries to migrate and gets this site to view and if the user likes it then stores removes this namespace and deletes the old site with the old stores. MetaSites with this namespace will *not* be shown in a user's site list by default. */ WIX_STORES_TEST_DRIVE = "WIX_STORES_TEST_DRIVE", /** Hotels standalone (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */ HOTELS = "HOTELS", /** Clubs siteless MetaSites, a club without a wix website. MetaSites with this namespace will *not* be shown in a user's site list by default. */ CLUBS = "CLUBS", /** A partially created ADI website. MetaSites with this namespace will *not* be shown in a user's site list by default. */ ONBOARDING_DRAFT = "ONBOARDING_DRAFT", /** AppBuilder for AppStudio / shmite (c). MetaSites with this namespace will *not* be shown in a user's site list by default. */ DEV_SITE = "DEV_SITE", /** LogoMaker websites offered to the user after logo purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */ LOGOS = "LOGOS", /** VideoMaker websites offered to the user after video purchase. MetaSites with this namespace will *not* be shown in a user's site list by default. */ VIDEO_MAKER = "VIDEO_MAKER", /** MetaSites with this namespace will *not* be shown in a user's site list by default. */ PARTNER_DASHBOARD = "PARTNER_DASHBOARD", /** MetaSites with this namespace will *not* be shown in a user's site list by default. */ DEV_CENTER_COMPANY = "DEV_CENTER_COMPANY", /** * A draft created by HTML editor on open. Upon "first save" it will be moved to be of WIX domain. * * Meta site with this namespace will *not* be shown in a user's site list by default. */ HTML_DRAFT = "HTML_DRAFT", /** * the user-journey for Fitness users who want to start from managing their business instead of designing their website. * Will be accessible from Site List and will not have a website app. * Once the user attaches a site, the site will become a regular wixsite. */ SITELESS_BUSINESS = "SITELESS_BUSINESS", /** Belongs to "strategic products" company. Supports new product in the creator's economy space. */ CREATOR_ECONOMY = "CREATOR_ECONOMY", /** It is to be used in the Business First efforts. */ DASHBOARD_FIRST = "DASHBOARD_FIRST", /** Bookings business flow with no site. */ ANYWHERE = "ANYWHERE", /** Namespace for Headless Backoffice with no editor */ HEADLESS = "HEADLESS", /** * Namespace for master site that will exist in parent account that will be referenced by subaccounts * The site will be used for account level CSM feature for enterprise */ ACCOUNT_MASTER_CMS = "ACCOUNT_MASTER_CMS", /** Rise.ai Siteless account management for Gift Cards and Store Credit. */ RISE = "RISE", /** * As part of the branded app new funnel, users now can create a meta site that will be branded app first. * There's a blank site behind the scene but it's blank). * The Mobile company will be the owner of this namespace. */ BRANDED_FIRST = "BRANDED_FIRST", /** Nownia.com Siteless account management for Ai Scheduling Assistant. */ NOWNIA = "NOWNIA", /** * UGC Templates are templates that are created by users for personal use and to sale to other users. * The Partners company owns this namespace. */ UGC_TEMPLATE = "UGC_TEMPLATE", /** Codux Headless Sites */ CODUX = "CODUX", /** Bobb - AI Design Creator. */ MEDIA_DESIGN_CREATOR = "MEDIA_DESIGN_CREATOR", /** * Shared Blog Site is a unique single site across Enterprise account, * This site will hold all Blog posts related to the Marketing product. */ SHARED_BLOG_ENTERPRISE = "SHARED_BLOG_ENTERPRISE", /** Standalone forms (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */ STANDALONE_FORMS = "STANDALONE_FORMS", /** Standalone events (siteless). MetaSites with this namespace will *not* be shown in a user's site list by default. */ STANDALONE_EVENTS = "STANDALONE_EVENTS", /** MIMIR - Siteless account for MIMIR Ai Job runner. */ MIMIR = "MIMIR", /** Wix Twins platform. */ TWINS = "TWINS", /** Wix Nano. */ NANO = "NANO", /** Base44 headless sites. */ BASE44 = "BASE44", /** Wix Channels Sites */ CHANNELS = "CHANNELS", /** Nautilus platform. */ NAUTILUS = "NAUTILUS" } /** @enumType */ type NamespaceWithLiterals = Namespace | 'UNKNOWN_NAMESPACE' | 'WIX' | 'SHOUT_OUT' | 'ALBUMS' | 'WIX_STORES_TEST_DRIVE' | 'HOTELS' | 'CLUBS' | 'ONBOARDING_DRAFT' | 'DEV_SITE' | 'LOGOS' | 'VIDEO_MAKER' | 'PARTNER_DASHBOARD' | 'DEV_CENTER_COMPANY' | 'HTML_DRAFT' | 'SITELESS_BUSINESS' | 'CREATOR_ECONOMY' | 'DASHBOARD_FIRST' | 'ANYWHERE' | 'HEADLESS' | 'ACCOUNT_MASTER_CMS' | 'RISE' | 'BRANDED_FIRST' | 'NOWNIA' | 'UGC_TEMPLATE' | 'CODUX' | 'MEDIA_DESIGN_CREATOR' | 'SHARED_BLOG_ENTERPRISE' | 'STANDALONE_FORMS' | 'STANDALONE_EVENTS' | 'MIMIR' | 'TWINS' | 'NANO' | 'BASE44' | 'CHANNELS' | 'NAUTILUS'; /** Site transferred to another user. */ interface SiteTransferred { /** * A previous owner id (user that transfers meta site). * @format GUID */ oldOwnerId?: string; /** * A new owner id (user that accepts meta site). * @format GUID */ newOwnerId?: string; } /** Soft deletion of the meta site. Could be restored. */ interface SiteDeleted { /** A deletion context. */ deleteContext?: DeleteContext; } interface DeleteContext { /** When the meta site was deleted. */ dateDeleted?: Date | null; /** A status. */ deleteStatus?: DeleteStatusWithLiterals; /** * A reason (flow). * @maxLength 255 */ deleteOrigin?: string; /** * A service that deleted it. * @maxLength 255 */ initiatorId?: string | null; } declare enum DeleteStatus { UNKNOWN = "UNKNOWN", TRASH = "TRASH", DELETED = "DELETED", PENDING_PURGE = "PENDING_PURGE", PURGED_EXTERNALLY = "PURGED_EXTERNALLY" } /** @enumType */ type DeleteStatusWithLiterals = DeleteStatus | 'UNKNOWN' | 'TRASH' | 'DELETED' | 'PENDING_PURGE' | 'PURGED_EXTERNALLY'; /** Restoration of the meta site. */ interface SiteUndeleted { } /** First publish of a meta site. Or subsequent publish after unpublish. */ interface SitePublished { } interface SiteUnpublished { /** * A list of URLs previously associated with the meta site. * @maxLength 4000 * @maxSize 10000 */ urls?: string[]; } interface SiteMarkedAsTemplate { } interface SiteMarkedAsWixSite { } /** * Represents a service provisioned a site. * * Note on `origin_instance_id`: * There is no guarantee that you will be able to find a meta site using `origin_instance_id`. * This is because of the following scenario: * * Imagine you have a template where a third-party application (TPA) includes some stub data, * such as a product catalog. When you create a site from this template, you inherit this * default product catalog. However, if the template's product catalog is modified, * your site will retain the catalog as it was at the time of site creation. This ensures that * your site remains consistent with what you initially received and does not include any * changes made to the original template afterward. * To ensure this, the TPA on the template gets a new instance_id. */ interface ServiceProvisioned { /** * Either UUID or EmbeddedServiceType. * @maxLength 36 */ appDefId?: string; /** * Not only UUID. Something here could be something weird. * @maxLength 36 */ instanceId?: string; /** * An instance id from which this instance is originated. * @maxLength 36 */ originInstanceId?: string; /** * A version. * @maxLength 500 */ version?: string | null; /** * The origin meta site id * @format GUID */ originMetaSiteId?: string | null; } interface ServiceRemoved { /** * Either UUID or EmbeddedServiceType. * @maxLength 36 */ appDefId?: string; /** * Not only UUID. Something here could be something weird. * @maxLength 36 */ instanceId?: string; /** * A version. * @maxLength 500 */ version?: string | null; } /** Rename of the site. Meaning, free public url has been changed as well. */ interface SiteRenamed { /** * A new meta site name (URL slug). * @maxLength 20 */ newSiteName?: string; /** * A previous meta site name (URL slug). * @maxLength 255 */ oldSiteName?: string; } /** * Hard deletion of the meta site. * * Could not be restored. Therefore it's desirable to cleanup data. */ interface SiteHardDeleted { /** A deletion context. */ deleteContext?: DeleteContext; } interface NamespaceChanged { /** A previous namespace. */ oldNamespace?: NamespaceWithLiterals; /** A new namespace. */ newNamespace?: NamespaceWithLiterals; } /** Assigned Studio editor */ interface StudioAssigned { } /** Unassigned Studio editor */ interface StudioUnassigned { } /** * Fired in case site URLs were changed in any way: new secondary domain, published, account slug rename, site rename etc. * * This is an internal event, it's not propagated in special events, because it's non-actionable. If you need to keep up * with sites and its urls, you need to listen to another topic/event. Read about it: * * https://bo.wix.com/wix-docs/rest/meta-site/meta-site---urls-service */ interface SiteUrlChanged { } /** * Used at the end of the deletion flow for both draft sites and when a user deletes a site. * Consumed by other teams to remove relevant data. */ interface SitePurgedExternally { /** * @maxLength 2048 * @maxSize 100 * @deprecated * @targetRemovalDate 2025-04-15 */ appDefId?: string[]; } /** Assigned Odeditor */ interface OdeditorAssigned { } /** Unassigned Odeditor */ interface OdeditorUnassigned { } /** Assigned Picasso editor */ interface PicassoAssigned { } /** Unassigned Picasso */ interface PicassoUnassigned { } /** Assigned Wixel */ interface WixelAssigned { } /** Unassigned Wixel */ interface WixelUnassigned { } /** Assigned StudioTwo */ interface StudioTwoAssigned { } /** Unassigned StudioTwo */ interface StudioTwoUnassigned { } /** Media from user domain is enabled. */ interface UserDomainMediaEnabled { } /** Media from user domain is disabled. */ interface UserDomainMediaDisabled { } /** Assigned Editorless */ interface EditorlessAssigned { } /** Unassigned Editorless */ interface EditorlessUnassigned { } 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 SetDefaultBranchRequest { /** * Branch ID. * @format GUID */ branchId: string; } interface SetDefaultBranchResponse { /** Updated branch. */ branch?: Branch; } interface GetDefaultBranchRequest { } interface GetDefaultBranchResponse { /** Default branch. */ branch?: Branch; } interface BulkUpdateBranchTagsRequest { /** * IDs of the branches to update. * @minSize 1 * @maxSize 100 * @format GUID */ branchIds: string[]; /** Tags to assign to the branches. */ assignTags?: PublicTags; /** Tags to unassign from the branches. */ unassignTags?: PublicTags; } interface BulkUpdateBranchTagsResponse { /** * Results of the bulk update operation. * @minSize 1 * @maxSize 100 */ results?: BulkUpdateBranchTagsResult[]; /** Metadata for the bulk operation, including counts of successes and failures. */ bulkActionMetadata?: BulkActionMetadata; } interface ItemMetadata { /** * Item ID. Should always be available, unless it's impossible to provide. 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 succeeded for this item. When `false`, the `error` field provides failure details. */ success?: boolean; /** Details about the error if the operation failed for this item. */ error?: ApplicationError; } interface ApplicationError { /** Error code. */ code?: string; /** Description of the error. */ description?: string; /** Data related to the error. */ data?: Record | null; } interface BulkUpdateBranchTagsResult { /** Metadata about the result for a specific branch, including whether the operation succeeded. */ itemMetadata?: ItemMetadata; } 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 detailed error information because the detailed failure threshold was exceeded. */ undetailedFailures?: number; } interface BulkUpdateBranchTagsByFilterRequest { /** Filter to select which branches to update. See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language) for more information. */ filter: Record | null; /** Tags to assign to the branches. */ assignTags?: PublicTags; /** Tags to unassign from the branches. */ unassignTags?: PublicTags; } interface BulkUpdateBranchTagsByFilterResponse { /** * Job ID. Pass this ID to [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job) to retrieve the status of the asynchronous operation. * @format GUID */ jobId?: 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; } /** @docsIgnore */ type CreateBranchApplicationErrors = { code?: 'SOURCE_BRANCH_NOT_FOUND'; description?: string; data?: Record; } | { code?: 'TEMPLATE_ID_NOT_SUPPORTED'; description?: string; data?: Record; } | { code?: 'ORIGINAL_BRANCH_ALREADY_EXISTS'; description?: string; data?: Record; } | { code?: 'TARGET_BRANCH_SITE_HEADER_ALREADY_EXISTS'; description?: string; data?: Record; } | { code?: 'ILLEGAL_SOURCE_TYPE'; description?: string; data?: Record; } | { code?: 'SOURCE_USER_BRANCH_DOES_NOT_EXIST'; description?: string; data?: Record; }; /** @docsIgnore */ type UpdateBranchApplicationErrors = { code?: 'FORBIDDEN_UPDATE_ORIGINAL_BRANCH_TYPE'; description?: string; data?: Record; }; /** @docsIgnore */ type DeleteBranchApplicationErrors = { code?: 'BRANCH_NOT_FOUND'; description?: string; data?: Record; } | { code?: 'FORBIDDEN_DELETE_ORIGINAL_BRANCH'; description?: string; data?: Record; }; /** @docsIgnore */ type BulkUpdateBranchTagsApplicationErrors = { code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS'; description?: string; data?: Record; }; /** @docsIgnore */ type BulkUpdateBranchTagsByFilterApplicationErrors = { code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS'; description?: string; data?: Record; }; interface BaseEventMetadata { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Details related to the account */ accountInfo?: AccountInfo; } interface EventMetadata extends BaseEventMetadata { /** 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; accountInfo?: AccountInfoMetadata; } interface AccountInfoMetadata { /** ID of the Wix account associated with the event */ accountId: string; /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */ siteId?: string; /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */ parentAccountId?: string; } interface BranchCreatedEnvelope { entity: Branch; metadata: EventMetadata; } /** * Triggered when a branch is created. * @permissionScope Manage SEO Settings * @permissionScopeId SCOPE.PROMOTE.MANAGE-SEO * @permissionScope Manage Site Branches * @permissionScopeId SCOPE.DC-DOCUMENT-MANAGEMENT.MANAGE-BRANCHES * @permissionId EDITOR.BRANCH_READ * @webhook * @eventType wix.editor.branches.v1.branch_created * @slug created */ declare function onBranchCreated(handler: (event: BranchCreatedEnvelope) => void | Promise): void; interface BranchDeletedEnvelope { entity: Branch; metadata: EventMetadata; } /** * Triggered when a branch is deleted. * @permissionScope Manage SEO Settings * @permissionScopeId SCOPE.PROMOTE.MANAGE-SEO * @permissionScope Manage Site Branches * @permissionScopeId SCOPE.DC-DOCUMENT-MANAGEMENT.MANAGE-BRANCHES * @permissionId EDITOR.BRANCH_READ * @webhook * @eventType wix.editor.branches.v1.branch_deleted * @slug deleted */ declare function onBranchDeleted(handler: (event: BranchDeletedEnvelope) => void | Promise): void; interface BranchUpdatedEnvelope { entity: Branch; metadata: EventMetadata; /** @hidden */ modifiedFields: Record; } /** * Triggered when a branch is updated. * @permissionScope Manage SEO Settings * @permissionScopeId SCOPE.PROMOTE.MANAGE-SEO * @permissionScope Manage Site Branches * @permissionScopeId SCOPE.DC-DOCUMENT-MANAGEMENT.MANAGE-BRANCHES * @permissionId EDITOR.BRANCH_READ * @webhook * @eventType wix.editor.branches.v1.branch_updated * @slug updated */ declare function onBranchUpdated(handler: (event: BranchUpdatedEnvelope) => void | Promise): void; /** * Creates a branch. * * If a source branch isn't provided, the branch will include a blank website. * * > **Important:** Align the `sourceType` field with its corresponding source properties: * > - When `sourceType` is `SOURCE_BRANCH`, provide `sourceBranchProperties`. * > - When `sourceType` is `SOURCE_TEMPLATE`, provide `sourceTemplateProperties`. * > * > Using `UNKNOWN_SOURCE_TYPE` or mismatched properties results in an `ILLEGAL_SOURCE_TYPE` error. * @param branch - Branch to create. * @public * @requiredField branch * @permissionId EDITOR.BRANCH_CREATE * @applicableIdentity APP * @returns Created branch. * @fqn wix.editor.branches.v1.BranchesService.CreateBranch */ declare function createBranch(branch: Branch): Promise & { __applicationErrorsType?: CreateBranchApplicationErrors; }>; /** * Retrieves a branch. * @param branchId - ID of the branch to retrieve. * @public * @requiredField branchId * @permissionId EDITOR.BRANCH_READ * @applicableIdentity APP * @returns Requested branch. * @fqn wix.editor.branches.v1.BranchesService.GetBranch */ declare function getBranch(branchId: string): Promise>; /** * Updates a branch. * * Each time the branch is updated, `revision` increments by 1. The current `revision` must be passed when updating the branch. This ensures you're working with the latest branch and prevents unintended overwrites. * * Note that `ORIGINAL_BRANCH` types can't be updated. * @param _id - Branch ID. * @public * @requiredField _id * @requiredField branch * @requiredField branch.revision * @permissionId EDITOR.BRANCH_UPDATE * @applicableIdentity APP * @returns Updated branch. * @fqn wix.editor.branches.v1.BranchesService.UpdateBranch */ declare function updateBranch(_id: string, branch: NonNullablePaths): Promise & { __applicationErrorsType?: UpdateBranchApplicationErrors; }>; interface UpdateBranch { /** Source branch properties. Use when `sourceType` = `SOURCE_BRANCH`. */ sourceBranchProperties?: SourceBranch; /** Source template properties. Use when `sourceType` = `SOURCE_TEMPLATE`. */ sourceTemplateProperties?: SourceTemplate; /** * Branch ID. * @format GUID * @readonly */ _id?: string | null; /** * Revision number, which increments by 1 each time the branch is updated. * To prevent conflicting changes, * the current revision must be passed when updating the branch. * @readonly */ revision?: string | null; /** Branch type. */ type?: TypeWithLiterals; /** * Branch name. * @maxLength 50 */ name?: string | null; /** Source type for this branch's content. Must be aligned with the corresponding source properties below. */ sourceType?: SourceTypeWithLiterals; /** * Date and time the branch was last published. * @readonly */ lastPublishDate?: string | null; /** * Wix editor type. * @readonly */ editorType?: EditorType; /** * Whether this branch is the default branch. The default branch is used for API operations when no branch ID is specified. * @readonly */ default?: boolean | null; /** * Date and time the branch was created. * @readonly */ _createdDate?: Date | null; /** * Date and time the branch was last updated. * @readonly */ _updatedDate?: Date | null; /** * Custom field data for the branch. * [Extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields) must be configured in the app dashboard before they can be accessed with API calls. */ extendedFields?: ExtendedFields; /** Public tags assigned to the branch. */ tags?: PublicTags; } /** * Permanently deletes a branch. * @param branchId - ID of the branch to delete. * @public * @requiredField branchId * @permissionId EDITOR.BRANCH_DELETE * @applicableIdentity APP * @fqn wix.editor.branches.v1.BranchesService.DeleteBranch */ declare function deleteBranch(branchId: string): Promise; /** * Retrieves a list of branches, given the provided paging, filtering, and sorting. * * * Query Branches runs with these defaults, which you can override: * * - `updatedDate` is sorted in `DESC` order * - `paging.limit` is `50` * - `paging.offset` is `0` * * To learn how to query branches, see [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language). * @public * @permissionId EDITOR.BRANCH_READ * @applicableIdentity APP * @fqn wix.editor.branches.v1.BranchesService.QueryBranches */ declare function queryBranches(): BranchesQueryBuilder; interface QueryCursorResult { cursors: Cursors; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } interface BranchesQueryResult extends QueryCursorResult { items: Branch[]; query: BranchesQueryBuilder; next: () => Promise; prev: () => Promise; } interface BranchesQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ eq: (propertyName: 'sourceBranchProperties.branchId' | 'sourceBranchProperties.branchRevision' | 'type' | 'name' | 'lastPublishDate' | 'editorType' | 'editorType.editorTypeOptions' | '_createdDate' | '_updatedDate', value: any) => BranchesQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ ne: (propertyName: 'type' | 'name' | 'lastPublishDate' | 'editorType' | 'editorType.editorTypeOptions' | '_createdDate' | '_updatedDate', value: any) => BranchesQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ ge: (propertyName: 'name' | 'lastPublishDate' | '_createdDate' | '_updatedDate', value: any) => BranchesQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ gt: (propertyName: 'name' | 'lastPublishDate' | '_createdDate' | '_updatedDate', value: any) => BranchesQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ le: (propertyName: 'name' | 'lastPublishDate' | '_createdDate' | '_updatedDate', value: any) => BranchesQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. */ lt: (propertyName: 'name' | 'lastPublishDate' | '_createdDate' | '_updatedDate', value: any) => BranchesQueryBuilder; /** @param propertyName - Property whose value is compared with `string`. * @param string - String to compare against. Case-insensitive. */ startsWith: (propertyName: 'name', value: string) => BranchesQueryBuilder; /** @param propertyName - Property whose value is compared with `values`. * @param values - List of values to compare against. */ hasSome: (propertyName: 'type' | 'name' | 'lastPublishDate' | 'editorType' | 'editorType.editorTypeOptions' | '_createdDate' | '_updatedDate', value: any[]) => BranchesQueryBuilder; in: (propertyName: 'type' | 'name' | 'lastPublishDate' | 'editorType' | 'editorType.editorTypeOptions' | '_createdDate' | '_updatedDate', value: any) => BranchesQueryBuilder; exists: (propertyName: 'type' | 'name' | 'lastPublishDate' | 'editorType' | 'editorType.editorTypeOptions' | '_createdDate' | '_updatedDate', value: boolean) => BranchesQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */ ascending: (...propertyNames: Array<'type' | 'name' | 'lastPublishDate' | 'editorType' | 'editorType.editorTypeOptions' | '_createdDate' | '_updatedDate'>) => BranchesQueryBuilder; /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments. */ descending: (...propertyNames: Array<'type' | 'name' | 'lastPublishDate' | 'editorType' | 'editorType.editorTypeOptions' | '_createdDate' | '_updatedDate'>) => BranchesQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */ limit: (limit: number) => BranchesQueryBuilder; /** @param cursor - A pointer to specific record */ skipTo: (cursor: string) => BranchesQueryBuilder; find: () => Promise; } /** * @hidden * @fqn wix.editor.branches.v1.BranchesService.QueryBranches * @requiredField query */ declare function typedQueryBranches(query: BranchQuery): Promise>; interface BranchQuerySpec extends QuerySpec { paging: 'cursor'; wql: [ { fields: [ '_createdDate', '_updatedDate', 'editorType', 'editorType.editorTypeOptions', 'lastPublishDate', 'name', 'type' ]; operators: '*'; sort: 'BOTH'; }, { fields: [ 'sourceBranchProperties.branchId', 'sourceBranchProperties.branchRevision' ]; operators: ['$eq']; sort: 'NONE'; } ]; } type CommonQueryWithEntityContext = Query; type BranchQuery = { /** Cursor paging options. Learn more about [cursor paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language#cursor-paging). */ 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. Learn more about [filtering](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language#filters). */ filter?: CommonQueryWithEntityContext['filter'] | null; /** Sort object. Learn more about [sorting](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-the-wix-api-query-language#sorting). @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: { QueryBuilder: () => _wix_sdk_types.QueryBuilder; Filter: _wix_sdk_types.FilterFactory; Sort: _wix_sdk_types.SortFactory; }; }; /** * Sets the specified branch as the default. * * The default branch is used for API operations when no branch ID is specified. * @param branchId - Branch ID. * @public * @requiredField branchId * @permissionId EDITOR.SET_DEFAULT_BRANCH * @applicableIdentity APP * @fqn wix.editor.branches.v1.BranchesService.SetDefaultBranch */ declare function setDefaultBranch(branchId: string): Promise>; /** * Retrieves the default branch. * @public * @permissionId EDITOR.BRANCH_READ * @applicableIdentity APP * @fqn wix.editor.branches.v1.BranchesService.GetDefaultBranch */ declare function getDefaultBranch(): Promise>; /** * Updates tags on multiple branches. * * Specify which tags to assign and which tags to unassign. A tag that appears in both the list to assign and the list to unassign will be assigned. * * To update a single branch's tags, call [Update Branch](https://dev.wix.com/docs/api-reference/business-management/branches/update-branch). * @param branchIds - IDs of the branches to update. * @public * @requiredField branchIds * @permissionId EDITOR.BULK_UPDATE_BRANCH_TAGS * @applicableIdentity APP * @fqn wix.editor.branches.v1.BranchesService.BulkUpdateBranchTags */ declare function bulkUpdateBranchTags(branchIds: string[], options?: BulkUpdateBranchTagsOptions): Promise & { __applicationErrorsType?: BulkUpdateBranchTagsApplicationErrors; }>; interface BulkUpdateBranchTagsOptions { /** Tags to assign to the branches. */ assignTags?: PublicTags; /** Tags to unassign from the branches. */ unassignTags?: PublicTags; } /** * Asynchronously updates tags on multiple branches that match the provided filter criteria. * * Specify which tags to assign and which tags to unassign. A tag that appears both the list to assign and the list to unassign tags, will be assigned. * * To check the status of the bulk update, pass the returned `jobId` to [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job). * * To update a single branch's tags, call [Update Branch](https://dev.wix.com/docs/api-reference/business-management/branches/update-branch). * @param filter - Filter to select which branches to update. See [API Query Language](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language) for more information. * @public * @requiredField filter * @permissionId EDITOR.BULK_UPDATE_BRANCH_TAGS_BY_FILTER * @applicableIdentity APP * @fqn wix.editor.branches.v1.BranchesService.BulkUpdateBranchTagsByFilter */ declare function bulkUpdateBranchTagsByFilter(filter: Record, options?: BulkUpdateBranchTagsByFilterOptions): Promise & { __applicationErrorsType?: BulkUpdateBranchTagsByFilterApplicationErrors; }>; interface BulkUpdateBranchTagsByFilterOptions { /** Tags to assign to the branches. */ assignTags?: PublicTags; /** Tags to unassign from the branches. */ unassignTags?: PublicTags; } export { type AccountInfo, type AccountInfoMetadata, type ActionEvent, type ApplicationError, type Asset, type BaseEventMetadata, type Branch, type BranchCreatedEnvelope, type BranchDeletedEnvelope, type BranchQuery, type BranchQuerySpec, type BranchSourceOneOf, type BranchUpdatedEnvelope, type BranchesQueryBuilder, type BranchesQueryResult, type BulkActionMetadata, type BulkUpdateBranchTagsApplicationErrors, type BulkUpdateBranchTagsByFilterApplicationErrors, type BulkUpdateBranchTagsByFilterOptions, type BulkUpdateBranchTagsByFilterRequest, type BulkUpdateBranchTagsByFilterResponse, type BulkUpdateBranchTagsOptions, type BulkUpdateBranchTagsRequest, type BulkUpdateBranchTagsResponse, type BulkUpdateBranchTagsResult, type CommonQueryWithEntityContext, type CreateBranchApplicationErrors, type CreateBranchRequest, type CreateBranchResponse, type CursorPaging, type CursorPagingMetadata, type CursorQuery, type CursorQueryPagingMethodOneOf, type Cursors, type DeleteBranchApplicationErrors, type DeleteBranchRequest, type DeleteBranchResponse, type DeleteContext, DeleteStatus, type DeleteStatusWithLiterals, type DomainEvent, type DomainEventBodyOneOf, type EditorType, EditorTypeOptions, type EditorTypeOptionsWithLiterals, type EditorlessAssigned, type EditorlessUnassigned, type Empty, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, type EventMetadata, type ExtendedFields, type GetBranchRequest, type GetBranchResponse, type GetDefaultBranchRequest, type GetDefaultBranchResponse, type HtmlSitePublished, type IdentificationData, type IdentificationDataIdOneOf, type ItemMetadata, type MessageEnvelope, type MetaSiteSpecialEvent, type MetaSiteSpecialEventPayloadOneOf, Namespace, type NamespaceChanged, type NamespaceWithLiterals, type OdeditorAssigned, type OdeditorUnassigned, type Page, type PicassoAssigned, type PicassoUnassigned, type PublicTags, type QueryBranchesRequest, type QueryBranchesResponse, type RestoreInfo, type ServiceProvisioned, type ServiceRemoved, type SetDefaultBranchRequest, type SetDefaultBranchResponse, type SiteCreated, SiteCreatedContext, type SiteCreatedContextWithLiterals, type SiteDeleted, type SiteHardDeleted, type SiteMarkedAsTemplate, type SiteMarkedAsWixSite, type SitePublished, type SitePurgedExternally, type SiteRenamed, type SiteTransferred, type SiteUndeleted, type SiteUnpublished, type SiteUrlChanged, SortOrder, type SortOrderWithLiterals, type Sorting, type SourceBranch, type SourceTemplate, SourceType, type SourceTypeWithLiterals, State, type StateWithLiterals, type StudioAssigned, type StudioTwoAssigned, type StudioTwoUnassigned, type StudioUnassigned, type TagList, type TagsModified, Type, type TypeWithLiterals, type UpdateBranch, type UpdateBranchApplicationErrors, type UpdateBranchRequest, type UpdateBranchResponse, type UpdateExtendedFieldsRequest, type UpdateExtendedFieldsResponse, type UserDomainMediaDisabled, type UserDomainMediaEnabled, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, type WixelAssigned, type WixelUnassigned, bulkUpdateBranchTags, bulkUpdateBranchTagsByFilter, createBranch, deleteBranch, getBranch, getDefaultBranch, onBranchCreated, onBranchDeleted, onBranchUpdated, queryBranches, setDefaultBranch, typedQueryBranches, updateBranch, utils };