export interface TicketDefinition { /** Ticket definition ID. */ _id?: string; /** Ticket price. */ price?: Money; /** Whether the ticket is free (read only). */ free?: boolean; /** Ticket name. */ name?: string; /** Ticket description. */ description?: string; /** * Limit of tickets that can be purchased per checkout. * Set to 20 for unlimited ticket definition. */ limitPerCheckout?: number; /** Custom sort index. */ orderIndex?: number; /** Policy information plain text block, as printed on the ticket. */ policy?: string; /** Sensitive dashboard data. */ dashboard?: Dashboard; /** Event ID associated with the ticket. */ eventId?: string; /** * Configuration of the fixed-rate Wix ticket service fee that is applied at checkout to each ticket sold. * @readonly */ wixFeeConfig?: WixFeeConfig; /** Ticket sale period. */ salePeriod?: TicketSalePeriod; /** * Ticket sale status. * @readonly */ saleStatus?: TicketSaleStatus; /** Ticket state. */ state?: TicketDefinitionStateEnumState[]; /** Ticket pricing. */ pricing?: TicketPricing; } export interface Money { /** * @internal * @internal * @deprecated */ amount?: string; /** * Three-letter currency code in * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. */ currency?: string; /** Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). Optionally, starts with a single (-), to indicate that the amount is negative. */ value?: string | null; } export interface Dashboard { /** Whether ticket is hidden and cannot be sold. */ hidden?: boolean; /** * Number of tickets sold and reserved. * @deprecated */ sold?: number; /** Whether the ticket has limited quantity. */ limited?: boolean; /** Ticket limit. `NULL` for unlimited ticket definitions. */ quantity?: number | null; /** Number of unsold tickets. `NULL` for unlimited ticket definitions. */ unsold?: number | null; /** Number of tickets sold. */ ticketsSold?: number; /** Number of tickets reserved. */ ticketsReserved?: number; } export interface WixFeeConfig { /** * Fee calculation method. * * Supported values: `"FEE_ADDED"`, `"FEE_INCLUDED"`, `"FEE_ADDED_AT_CHECKOUT"` * * Default: `"FEE_ADDED_AT_CHECKOUT"` */ type?: FeeType; } export declare enum FeeType { /** Fee is added to the ticket price at checkout. */ FEE_ADDED = "FEE_ADDED", /** Seller absorbs the fee. It is deducted from the ticket price. */ FEE_INCLUDED = "FEE_INCLUDED", /** Fee is added to the ticket price at checkout. */ FEE_ADDED_AT_CHECKOUT = "FEE_ADDED_AT_CHECKOUT" } export interface TicketSalePeriod { /** Ticket sale start timestamp. */ startDate?: Date | null; /** Ticket sale end timestamp. */ endDate?: Date | null; /** Whether to hide this ticket if it's not on sale */ hideNotOnSale?: boolean; } export declare enum TicketSaleStatus { /** Ticket sale is scheduled to start. */ SALE_SCHEDULED = "SALE_SCHEDULED", /** Ticket sale has started. */ SALE_STARTED = "SALE_STARTED", /** Ticket sale has ended. */ SALE_ENDED = "SALE_ENDED" } export declare enum TicketDefinitionStateEnumState { INCLUDE_HIDDEN_NOT_ON_SALE = "INCLUDE_HIDDEN_NOT_ON_SALE" } export interface TicketPricing extends TicketPricingPriceOneOf { /** Ticket price which is read only. */ fixedPrice?: Money; /** Min price per ticket, customizable. */ minPrice?: Money; /** Ticket pricing options. */ pricingOptions?: PricingOptions; /** * Ticket pricing type. * @readonly */ pricingType?: Type; } /** @oneof */ export interface TicketPricingPriceOneOf { /** Ticket price which is read only. */ fixedPrice?: Money; /** Min price per ticket, customizable. */ minPrice?: Money; /** Ticket pricing options. */ pricingOptions?: PricingOptions; } export interface PricingOptions { /** Multiple ticket pricing options. */ options?: PricingOption[]; } export interface PricingOption { /** Ticket pricing option ID. */ _id?: string | null; /** Ticket pricing option name. */ name?: string | null; /** Ticket pricing option price. */ price?: Money; } export declare enum Type { STANDARD = "STANDARD", DONATION = "DONATION" } export interface QueryTicketDefinitionsRequest { /** Offset. See [Pagination](https://dev.wix.com/api/rest/getting-started/pagination). */ offset?: number; /** Limit. See [Pagination](https://dev.wix.com/api/rest/getting-started/pagination). */ limit?: number; /** Set of fields to return in the response. See [fieldsets](https://dev.wix.com/api/rest/wix-events/wix-events/fieldset#wix-events_wix-events_fieldset_ticket-definition-fieldset). */ fieldset?: TicketDefinitionFieldset[]; /** Filter. See [supported fields and operators](https://dev.wix.com/api/rest/wix-events/wix-events/filter-and-sort#wix-events_wix-events_filter-and-sort_query-ticket-definitions). */ filter?: Record | null; /** * Sort order. Defaults to: "created:asc". * See [supported fields](https://dev.wix.com/api/rest/wix-events/wix-events/filter-and-sort#wix-events_wix-events_filter-and-sort_query-ticket-definitions). */ sort?: string; /** * Filter facets to include in the response. * See [supported facets](https://dev.wix.com/api/rest/wix-events/wix-events/filter-and-sort#wix-events_wix-events_filter-and-sort_query-ticket-definitions). */ facet?: string[]; } export declare enum TicketDefinitionFieldset { /** Include `policy` in the response. */ POLICY = "POLICY", /** Include `dashboard` in the response. */ DASHBOARD = "DASHBOARD" } export interface QueryTicketDefinitionsResponse { /** Total ticket definitions matching the given filters. */ total?: number; /** Offset. */ offset?: number; /** Limit. */ limit?: number; /** Ticket definitions. */ definitions?: TicketDefinition[]; /** Filter facets. */ facets?: Record; } export interface FacetCounts { /** Facet counts aggregated per value. */ counts?: Record; } export interface QueryTicketDefinitionsV2Request { /** Query request object. */ query?: QueryV2; } export interface QueryV2 extends QueryV2PagingMethodOneOf { /** Paging options to limit and skip the number of items. */ paging?: Paging; /** 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. * * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section). */ filter?: Record | null; /** * Sort object. * * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section). */ sort?: Sorting[]; /** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */ fields?: string[]; /** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */ fieldsets?: string[]; } /** @oneof */ export interface QueryV2PagingMethodOneOf { /** Paging options to limit and skip the number of items. */ paging?: Paging; /** 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; } export interface Sorting { /** Name of the field to sort by. */ fieldName?: string; /** Sort order. */ order?: SortOrder; } export declare enum SortOrder { ASC = "ASC", DESC = "DESC" } export interface Paging { /** Number of items to load. */ limit?: number | null; /** Number of items to skip in the current sort order. */ offset?: number | null; } export interface CursorPaging { /** Maximum number of items to return in the results. */ 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. */ cursor?: string | null; } export interface QueryTicketDefinitionsV2Response { /** Ticket definitions. */ definitions?: TicketDefinition[]; /** Paging metadata definitions. */ metadata?: PagingMetadataV2; } export interface PagingMetadataV2 { /** Number of items returned in the response. */ count?: number | null; /** Offset that was requested. */ offset?: number | null; /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */ total?: number | null; /** Flag that indicates the server failed to calculate the `total` field. */ tooManyToCount?: boolean | null; /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */ cursors?: Cursors; } export interface Cursors { /** Cursor string pointing to the next page in the list of results. */ next?: string | null; /** Cursor pointing to the previous page in the list of results. */ prev?: string | null; } export interface ListTicketDefinitionsRequest { /** Event ID. */ eventId?: string[]; /** Offset. */ offset?: number; /** Paging limit. */ limit?: number; /** * Predefined sets of fields to return. * - `DASHBOARD`: Returns `dashboard`. * - `POLICY`: Returns `policy`. * * Default: If `fieldset` is omitted from the request, `id`, `price`, `free`, `name`, `limitPerCheckout`, `orderIndex`, `eventId`. * */ fieldset?: TicketDefinitionFieldset[]; /** Event creator ID. */ eventCreatorId?: string[]; /** * Filter by ticket definition state. * * Supported values: `"VISIBLE"`, `"HIDDEN"`, `"FREE"`, `"PAID"` */ state?: State[]; /** * Sort order. * * Default: `"created"`:`"asc"` */ sort?: string; /** * Ticket sale status. * * Supported values: `"SALE_SCHEDULED"`, `"SALE_STARTED"`, `"SALE_ENDED"` */ saleStatus?: TicketSaleStatus[]; /** Filter facets. */ facet?: string[]; } export declare enum State { /** The ticket is available for purchase. */ VISIBLE = "VISIBLE", /** The ticket is unavailable for purchase. */ HIDDEN = "HIDDEN", /** The ticket price is 0. */ FREE = "FREE", /** The ticket price is greater than 0. */ PAID = "PAID" } export declare enum GroupBy { /** No grouping. */ NONE = "NONE", /** Groups by event created date with descending sorting. */ EVENT_CREATED_DESC = "EVENT_CREATED_DESC", /** Groups by event created date with ascending sorting. */ EVENT_CREATED_ASC = "EVENT_CREATED_ASC" } export interface ListTicketDefinitionsResponse { /** Meta data. */ metaData?: ResponseMetaData; /** Retrieved ticket definitions. */ definitions?: TicketDefinition[]; /** Filter facets. */ facets?: Record; } export interface ResponseMetaData { /** Number of items in the response. */ count?: number; /** Offset of items. */ offset?: number; /** Total number of matching items. */ total?: number; } export interface GetTicketDefinitionRequest { /** Ticket definition ID. */ definitionId: string; /** * Predefined sets of fields to return. * - `DASHBOARD`: Returns `dashboard`. * - `POLICY`: Returns `policy`. * * Default: If `fieldset` is omitted from the request, `id`, `price`, `free`, `name`, `limitPerCheckout`, `orderIndex`, `eventId`. */ fieldset?: TicketDefinitionFieldset[]; } export interface GetTicketDefinitionResponse { /** Retrieved ticket definition. */ definition?: TicketDefinition; } export interface CreateTicketDefinitionRequest { /** Event ID. */ eventId: string; /** Ticket definition data. */ definition: TicketDefinitionData; } export interface TicketDefinitionData { /** Ticket name. */ name?: string | null; /** Ticket price. */ price?: Money; /** Ticket description. */ description?: string | null; /** Whether this ticket type is limited in quantity. */ limited?: boolean; /** * Limit for this ticket type. * * `NULL` for unlimited. */ quantity?: number | null; /** Custom sort index for manual tickets ordering implementation. */ orderIndex?: number; /** Policy information in plain text (as listed on the ticket). */ policy?: string | null; /** Whether this ticket type is hidden to customers and cannot be purchased. */ hidden?: boolean; /** Configuration of the fixed-rate Wix ticket service fee that is applied to each ticket sold. */ wixFeeConfig?: WixFeeConfig; /** Ticket sale period. */ salePeriod?: TicketSalePeriod; /** Ticket pricing. */ pricing?: TicketPricing; } export interface CreateTicketDefinitionResponse { /** Created ticket definition. */ definition?: TicketDefinition; } export interface TicketDefinitionCreated { /** Ticket Definition created timestamp in ISO UTC format. */ timestamp?: Date | null; /** Ticket Definition ID. */ ticketDefinitionId?: string; /** Event ID. */ eventId?: string; /** Originated from. */ originatedFrom?: OriginatedFrom; } export interface OriginatedFrom { /** Instance ID. Indicates the original app instance which current entity originated from. */ instanceId?: string; /** Event ID. Indicates the original event which current entity originated from. */ eventId?: string; /** Event ID. Indicates the original entity which current entity originated from. */ entityId?: string; } export interface UpdateTicketDefinitionRequest { /** Event ID. */ eventId: string; /** Ticket definition ID. */ definitionId: string; /** Ticket definition data. */ definition?: TicketDefinitionData; /** Set of field paths, specifying which parts of ticket definition to update. */ fields?: string[]; } export interface UpdateTicketDefinitionResponse { /** Updated ticket definition. */ definition?: TicketDefinition; } export interface TicketDefinitionUpdated { /** Ticket definition updated timestamp in ISO UTC format. */ timestamp?: Date | null; /** Ticket definition ID. */ ticketDefinitionId?: string; /** Event ID. */ eventId?: string; } export interface DeleteTicketDefinitionRequest extends DeleteTicketDefinitionRequestDeleteOneOf { /** Ticket definitions to delete. */ byId?: ById; /** Whether to delete all event tickets. */ all?: boolean; /** Event ID. */ eventId: string; } /** @oneof */ export interface DeleteTicketDefinitionRequestDeleteOneOf { /** Ticket definitions to delete. */ byId?: ById; /** Whether to delete all event tickets. */ all?: boolean; } export interface ById { /** Ticket definition IDs. */ definitionId?: string[]; } export interface DeleteTicketDefinitionResponse { } export interface TicketDefinitionDeleted { /** Ticket definition deleted timestamp in ISO UTC format. */ timestamp?: Date | null; /** Ticket definition ID. */ ticketDefinitionId?: string; /** Event ID. */ eventId?: string; } export interface ChangeCurrencyRequest { /** Event ID. */ eventId?: string; /** Event currency, in 3-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. */ currency: string; } export interface ChangeCurrencyResponse { } export interface BulkCopyTicketDefinitionsByEventIdRequest { /** Origin instance ID. */ originInstanceId?: string | null; /** Origin Event ID. */ originEventId?: string; /** Target Event ID. */ targetEventId?: string; } export interface BulkCopyTicketDefinitionsByEventIdResponse { /** Copied ticket definitions. */ definitions?: CopiedTicketDefinition[]; } export interface CopiedTicketDefinition { /** Origin Ticket definition ID. */ originTicketDefinitionId?: string; /** Ticket definition ID. */ ticketDefinitionId?: string; } export interface PaidTicketDefinitionExistsRequest { } export interface PaidTicketDefinitionExistsResponse { /** Paid exists. */ paidExists?: boolean; } export interface MessageEnvelope { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; } export interface IdentificationData extends IdentificationDataIdOneOf { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType; } /** @oneof */ export interface IdentificationDataIdOneOf { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } export declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } interface MoneyNonNullableFields { amount: string; currency: string; } interface DashboardNonNullableFields { hidden: boolean; sold: number; limited: boolean; ticketsSold: number; ticketsReserved: number; } interface WixFeeConfigNonNullableFields { type: FeeType; } interface TicketSalePeriodNonNullableFields { hideNotOnSale: boolean; } interface PricingOptionNonNullableFields { price?: MoneyNonNullableFields; } interface PricingOptionsNonNullableFields { options: PricingOptionNonNullableFields[]; } interface TicketPricingNonNullableFields { fixedPrice?: MoneyNonNullableFields; minPrice?: MoneyNonNullableFields; pricingOptions?: PricingOptionsNonNullableFields; pricingType: Type; } export interface TicketDefinitionNonNullableFields { _id: string; price?: MoneyNonNullableFields; free: boolean; name: string; description: string; limitPerCheckout: number; orderIndex: number; policy: string; dashboard?: DashboardNonNullableFields; eventId: string; wixFeeConfig?: WixFeeConfigNonNullableFields; salePeriod?: TicketSalePeriodNonNullableFields; saleStatus: TicketSaleStatus; state: TicketDefinitionStateEnumState[]; pricing?: TicketPricingNonNullableFields; } export interface QueryTicketDefinitionsResponseNonNullableFields { total: number; offset: number; limit: number; definitions: TicketDefinitionNonNullableFields[]; } export interface QueryTicketDefinitionsV2ResponseNonNullableFields { definitions: TicketDefinitionNonNullableFields[]; } interface ResponseMetaDataNonNullableFields { count: number; offset: number; total: number; } export interface ListTicketDefinitionsResponseNonNullableFields { metaData?: ResponseMetaDataNonNullableFields; definitions: TicketDefinitionNonNullableFields[]; } export interface GetTicketDefinitionResponseNonNullableFields { definition?: TicketDefinitionNonNullableFields; } export interface CreateTicketDefinitionResponseNonNullableFields { definition?: TicketDefinitionNonNullableFields; } export interface UpdateTicketDefinitionResponseNonNullableFields { definition?: TicketDefinitionNonNullableFields; } export interface BaseEventMetadata { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; } export interface TicketDefinitionCreatedEnvelope { data: TicketDefinitionCreated; metadata: BaseEventMetadata; } /** @permissionScope Manage Events - all permissions * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS * @permissionScope Manage Orders * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-ORDERS * @permissionScope Manage Ticket Definitions * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-TICKET-DEF * @permissionId WIX_EVENTS.READ_TICKET_DEFINITIONS * @webhook * @eventType wix.events.ticketing.events.TicketDefinitionCreated */ export declare function onTicketDefinitionCreated(handler: (event: TicketDefinitionCreatedEnvelope) => void | Promise): void; export interface TicketDefinitionDeletedEnvelope { data: TicketDefinitionDeleted; metadata: BaseEventMetadata; } /** @permissionScope Manage Events - all permissions * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS * @permissionScope Manage Orders * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-ORDERS * @permissionScope Manage Ticket Definitions * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-TICKET-DEF * @permissionId WIX_EVENTS.READ_TICKET_DEFINITIONS * @webhook * @eventType wix.events.ticketing.events.TicketDefinitionDeleted */ export declare function onTicketDefinitionDeleted(handler: (event: TicketDefinitionDeletedEnvelope) => void | Promise): void; export interface TicketDefinitionUpdatedEnvelope { data: TicketDefinitionUpdated; metadata: BaseEventMetadata; } /** @permissionScope Manage Events - all permissions * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS * @permissionScope Manage Orders * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-ORDERS * @permissionScope Manage Ticket Definitions * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-TICKET-DEF * @permissionId WIX_EVENTS.READ_TICKET_DEFINITIONS * @webhook * @eventType wix.events.ticketing.events.TicketDefinitionUpdated */ export declare function onTicketDefinitionUpdated(handler: (event: TicketDefinitionUpdatedEnvelope) => void | Promise): void; /** * **Deprecated.** This function will continue to work until November 8, 2024, but a newer version is available. Use [`queryTicketDefinitions()`](/ticket-definitions-v2/query-ticket-definitions) function instead. * >**Migration Instructions**. * > If this function is already in your code, it will continue to work. To stay compatible with future changes, migrate to [`queryTicketDefinition()`](/ticket-definitions-v2/query-ticket-definitions). * > To migrate to the new function: * > 1. Add the new import statement: * > ```js * > import { ticketDefinitionsV2 } from 'wix-events.v2'; * > ``` * > 2. Look for any code that uses `ticketDefinitions.queryTicketDefinition()`, and replace it with `ticketDefinitionsV2.queryTicketDefinition()`. Update your code to work with the new `createTicketDefinition()` response properties. * > 3. Test your changes to make sure your code behaves as expected. * * Retrieves a list of up to 100 ticket definitions. * @public * @permissionId WIX_EVENTS.READ_TICKET_DEFINITIONS * @permissionScope Manage Events - all permissions * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS * @permissionScope Manage Orders * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-ORDERS * @permissionScope Manage Ticket Definitions * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-TICKET-DEF * @applicableIdentity APP * @fqn wix.events.ticketing.TicketDefinitionManagement.QueryTicketDefinitions */ export declare function queryTicketDefinitions(options?: QueryTicketDefinitionsOptions): Promise; export interface QueryTicketDefinitionsOptions { /** Offset. See [Pagination](https://dev.wix.com/api/rest/getting-started/pagination). */ offset?: number; /** Limit. See [Pagination](https://dev.wix.com/api/rest/getting-started/pagination). */ limit?: number; /** Set of fields to return in the response. See [fieldsets](https://dev.wix.com/api/rest/wix-events/wix-events/fieldset#wix-events_wix-events_fieldset_ticket-definition-fieldset). */ fieldset?: TicketDefinitionFieldset[]; /** Filter. See [supported fields and operators](https://dev.wix.com/api/rest/wix-events/wix-events/filter-and-sort#wix-events_wix-events_filter-and-sort_query-ticket-definitions). */ filter?: Record | null; /** * Sort order. Defaults to: "created:asc". * See [supported fields](https://dev.wix.com/api/rest/wix-events/wix-events/filter-and-sort#wix-events_wix-events_filter-and-sort_query-ticket-definitions). */ sort?: string; /** * Filter facets to include in the response. * See [supported facets](https://dev.wix.com/api/rest/wix-events/wix-events/filter-and-sort#wix-events_wix-events_filter-and-sort_query-ticket-definitions). */ facet?: string[]; } /** * **Deprecated.** This function will continue to work until October 29, 2024, but a newer version is available at [`queryTicketDefinitions()`](/ticket-definitions-v2/query-ticket-definitions). * >**Migration Instructions**. * > If this function is already in your code, it will continue to work. To stay compatible with future changes, migrate to [`queryTicketDefinitions()`](/ticket-definitions-v2/query-ticket-definitions). * > To migrate to the new function: * > 1. Add the new import statement: * > ```js * > import { ticketDefinitionsV2 } from 'wix-events.v2'; * > ``` * > 2. Look for any code that uses `ticketDefinitions.queryTicketDefinitions()`, and replace it with `ticketDefinitionsV2.queryTicketDefinitions()`. Update your code to work with the new `queryTicketDefinition()` response properties. * > 3. Test your changes to make sure your code behaves as expected. * * Retrieves a list of up to 1,000 ticket definitions, given the provided paging and filtering. * @public * @documentationMaturity preview * @permissionScope Manage Events - all permissions * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS * @permissionScope Manage Orders * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-ORDERS * @permissionScope Manage Ticket Definitions * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-TICKET-DEF * @permissionId WIX_EVENTS.READ_TICKET_DEFINITIONS * @applicableIdentity APP * @fqn wix.events.ticketing.TicketDefinitionManagement.QueryTicketDefinitionsV2 */ export declare function queryTicketDefinitionsV2(options?: QueryTicketDefinitionsV2Options): DefinitionsQueryBuilder; export interface QueryTicketDefinitionsV2Options { } interface QueryCursorResult { cursors: Cursors; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } export interface DefinitionsQueryResult extends QueryCursorResult { items: TicketDefinition[]; query: DefinitionsQueryBuilder; next: () => Promise; prev: () => Promise; } export interface DefinitionsQueryBuilder { /** @param limit - Number of items to return, which is also the `pageSize` of the results object. * @documentationMaturity preview */ limit: (limit: number) => DefinitionsQueryBuilder; /** @param cursor - A pointer to specific record * @documentationMaturity preview */ skipTo: (cursor: string) => DefinitionsQueryBuilder; /** @documentationMaturity preview */ find: () => Promise; } /** * **Deprecated.** This function will continue to work until November 8, 2024, but a substitute is available. Use the [`queryTicketDefinitions()`](/ticket-definitions-v2/query-ticket-definitions) function instead. * >**Migration Instructions**. * > If this function is already in your code, it will continue to work. To stay compatible with future changes, migrate to [`queryTicketDefinitions()`](/ticket-definitions-v2/query-ticket-definitions). * > To migrate to the new function: * > 1. Add the new import statement: * > ```js * > import { ticketDefinitionsV2 } from 'wix-events.v2'; * > ``` * > 2. Look for any code that uses `ticketDefinitions.queryTicketDefinitions()`, and replace it with `ticketDefinitionsV2.queryTicketDefinitions()`. Update your code to work with the new `queryTicketDefinition()` response properties. * > 3. Test your changes to make sure your code behaves as expected. * * Retrieves a list of up to 100 ticket definitions, with basic filter support. * @public * @param options - Details for the tickets to retrieve. * @permissionId WIX_EVENTS.READ_TICKET_DEFINITIONS * @permissionScope Manage Events - all permissions * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS * @permissionScope Manage Orders * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-ORDERS * @permissionScope Manage Ticket Definitions * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-TICKET-DEF * @applicableIdentity APP * @fqn wix.events.ticketing.TicketDefinitionManagement.ListTicketDefinitions */ export declare function listTicketDefinitions(options?: ListTicketDefinitionsOptions): Promise; export interface ListTicketDefinitionsOptions { /** Event ID. */ eventId?: string[]; /** Offset. */ offset?: number; /** Paging limit. */ limit?: number; /** * Predefined sets of fields to return. * - `DASHBOARD`: Returns `dashboard`. * - `POLICY`: Returns `policy`. * * Default: If `fieldset` is omitted from the request, `id`, `price`, `free`, `name`, `limitPerCheckout`, `orderIndex`, `eventId`. */ fieldset?: TicketDefinitionFieldset[]; /** Event creator ID. */ eventCreatorId?: string[]; /** * Filter by ticket definition state. * * Supported values: `"VISIBLE"`, `"HIDDEN"`, `"FREE"`, `"PAID"` */ state?: State[]; /** * Sort order. * * Default: `"created"`:`"asc"`. * * See [Ticket Definitions Sort](/wix-events-v2/ticketdefinitions/ticket-definitions-sort) for more information. * * * * */ sort?: string; /** * Ticket sale status. * * Supported values: `"SALE_SCHEDULED"`, `"SALE_STARTED"`, `"SALE_ENDED"` */ saleStatus?: TicketSaleStatus[]; /** Filter facets. */ facet?: string[]; } /** * **Deprecated.** This function will continue to work until November 8, 2024, but a newer version is available. Use the [`getTicketDefinition()`](/ticket-definitions-v2/get-ticket-definition) function instead. * >**Migration Instructions**. * > If this function is already in your code, it will continue to work. To stay compatible with future changes, migrate to [`getTicketDefinition()`](/ticket-definitions-v2/get-ticket-definition). * > To migrate to the new function: * > 1. Add the new import statement: * > ```js * > import { ticketDefinitionsV2 } from 'wix-events.v2'; * > ``` * > 2. Look for any code that uses `ticketDefinitions.getTicketDefinition()`, and replace it with `ticketDefinitionsV2.getTicketDefinition()`. Update your code to work with the new `getTicketDefinition()` response properties. * > 3. Test your changes to make sure your code behaves as expected. * * Retrieves a ticket definition. * @param definitionId - Ticket definition ID. * @public * @requiredField definitionId * @param options - Details for the ticket to retrieve. * @permissionId WIX_EVENTS.READ_TICKET_DEFINITIONS * @permissionScope Manage Events - all permissions * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS * @permissionScope Manage Orders * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-ORDERS * @permissionScope Manage Ticket Definitions * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-TICKET-DEF * @applicableIdentity APP * @returns Retrieved ticket definition. * @fqn wix.events.ticketing.TicketDefinitionManagement.GetTicketDefinition */ export declare function getTicketDefinition(definitionId: string, options?: GetTicketDefinitionOptions): Promise; export interface GetTicketDefinitionOptions { /** * Predefined sets of fields to return. * - `DASHBOARD`: Returns `dashboard`. * - `POLICY`: Returns `policy`. * * Default: If `fieldset` is omitted from the request, `id`, `price`, `free`, `name`, `limitPerCheckout`, `orderIndex`, `eventId`. */ fieldset?: TicketDefinitionFieldset[]; } /** * **Deprecated.** This function will continue to work until November 8, 2024, but a newer version is available. Use the [`createTicketDefinition()`](/ticket-definitions-v2/create-ticket-definition) function instead. * >**Migration Instructions**. * > If this function is already in your code, it will continue to work. To stay compatible with future changes, migrate to [`createTicketDefinition()`](/ticket-definitions-v2/create-ticket-definition). * > To migrate to the new function: * > 1. Add the new import statement: * > ```js * > import { ticketDefinitionsV2 } from 'wix-events.v2'; * > ``` * > 2. Look for any code that uses `ticketDefinitions.createTicketDefinition()`, and replace it with `ticketDefinitionsV2.createTicketDefinition()`. Update your code to work with the new `createTicketDefinition()` response properties. * > 3. Test your changes to make sure your code behaves as expected. * * Creates a ticket definition (and enables ticket sales). * @param eventId - Event ID. * @public * @requiredField eventId * @requiredField options * @requiredField options.definition * @requiredField options.definition.name * @permissionId WIX_EVENTS.MANAGE_TICKET_DEFINITIONS * @permissionScope Manage Events - all permissions * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS * @permissionScope Manage Ticket Definitions * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-TICKET-DEF * @applicableIdentity APP * @fqn wix.events.ticketing.TicketDefinitionManagement.CreateTicketDefinition */ export declare function createTicketDefinition(eventId: string, options: CreateTicketDefinitionOptions): Promise; export interface CreateTicketDefinitionOptions { /** Ticket definition data. */ definition: TicketDefinitionData; } /** * **Deprecated.** This function will continue to work until November 8, 2024, but a newer version is available. Use the [`updateTicketDefinition()`](/ticket-definitions-v2/update-ticket-definition) function instead. * >**Migration Instructions**. * > If this function is already in your code, it will continue to work. To stay compatible with future changes, migrate to [`updateTicketDefinition()`](/ticket-definitions-v2/update-ticket-definition). * > To migrate to the new function: * > 1. Add the new import statement: * > ```js * > import { ticketDefinitionsV2 } from 'wix-events.v2'; * > ``` * > 2. Look for any code that uses `ticketDefinitions.updateTicketDefinition()`, and replace it with `ticketDefinitionsV2.updateTicketDefinition()`. Update your code to work with the new `updateTicketDefinition()` response properties. * > 3. Test your changes to make sure your code behaves as expected. * * * Updates a ticket definition. * * See [Partial Updates](/wix-events-v2/partial-updates) for more information. * @param definitionId - Ticket definition ID. * @param eventId - Event ID. * @public * @requiredField definitionId * @requiredField eventId * @requiredField options.definition.pricing * @param identifiers - Details of the ticket definition to update. * @param options - Ticket definition details to update. * @permissionId WIX_EVENTS.MANAGE_TICKET_DEFINITIONS * @permissionScope Manage Events - all permissions * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS * @permissionScope Manage Ticket Definitions * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-TICKET-DEF * @applicableIdentity APP * @fqn wix.events.ticketing.TicketDefinitionManagement.UpdateTicketDefinition */ export declare function updateTicketDefinition(definitionId: string, eventId: string, options?: UpdateTicketDefinitionOptions): Promise; export interface UpdateTicketDefinitionOptions { /** Ticket definition data. */ definition?: TicketDefinitionData; /** Set of field paths, specifying which parts of ticket definition to update. */ fields?: string[]; } /** * **Deprecated.** This function will continue to work until November 8, 2024, but a newer version is available. Use the [`deleteTicketDefinition()`](/ticket-definitions-v2/delete-ticket-definition) function instead. * >**Migration Instructions**. * > If this function is already in your code, it will continue to work. To stay compatible with future changes, migrate to [`deleteTicketDefinition()`](/ticket-definitions-v2/delete-ticket-definition). * > To migrate to the new function: * > 1. Add the new import statement: * > ```js * > import { ticketDefinitionsV2 } from 'wix-events.v2'; * > ``` * > 2. Look for any code that uses `ticketDefinitions.deleteTicketDefinition()`, and replace it with `ticketDefinitionsV2.deleteTicketDefinition()`. Update your code to work with the new `deleteTicketDefinition()` response properties. * > 3. Test your changes to make sure your code behaves as expected. * * Deletes a ticket definition. * @param eventId - Event ID. * @public * @requiredField eventId * @param options - Details of tickets to delete. * @permissionId WIX_EVENTS.MANAGE_TICKET_DEFINITIONS * @permissionScope Manage Events - all permissions * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS * @permissionScope Manage Ticket Definitions * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-TICKET-DEF * @applicableIdentity APP * @fqn wix.events.ticketing.TicketDefinitionManagement.DeleteTicketDefinition */ export declare function deleteTicketDefinition(eventId: string, options?: DeleteTicketDefinitionOptions): Promise; export interface DeleteTicketDefinitionOptions extends DeleteTicketDefinitionRequestDeleteOneOf { /** Ticket definitions to delete. */ byId?: ById; /** Whether to delete all event tickets. */ all?: boolean; } /** * **Deprecated.** This function will continue to work until November 8, 2024, but a newer version is available at [`changeCurrency()`](/ticket-definitions-v2/change-currency). * >**Migration Instructions**. * > If this function is already in your code, it will continue to work. To stay compatible with future changes, migrate to [`changeCurrency()`](/ticket-definitions-v2/change-currency). * > To migrate to the new function: * > 1. Add the new import statement: * > ```js * > import { ticketDefinitionsV2 } from 'wix-events.v2'; * > ``` * > 2. Look for any code that uses `ticketDefinitions.changeCurrency()`, and replace it with `ticketDefinitionsV2.changeCurrency()`. Update your code to work with the new `changeCurrency()` response properties. * > 3. Test your changes to make sure your code behaves as expected. * * Changes the currency for all tickets per event. * * @public * @requiredField options.currency * @permissionId WIX_EVENTS.MANAGE_TICKET_DEFINITIONS * @permissionScope Manage Events - all permissions * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS * @permissionScope Manage Ticket Definitions * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-TICKET-DEF * @applicableIdentity APP * @fqn wix.events.ticketing.TicketDefinitionManagement.ChangeCurrency */ export declare function changeCurrency(options?: ChangeCurrencyOptions): Promise; export interface ChangeCurrencyOptions { /** Event ID. */ eventId?: string; /** Event currency, in 3-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. */ currency: string; } export {};