import * as _wix_sdk_types from '@wix/sdk-types'; import { QuerySpec, Query, NonNullablePaths } from '@wix/sdk-types'; interface TicketDefinition { /** * Ticket definition ID. * @format GUID */ _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. * @max 20 */ 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. * @format GUID */ 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?: TicketSaleStatusWithLiterals; /** Ticket state. */ state?: TicketDefinitionStateEnumStateWithLiterals[]; /** Ticket pricing. */ pricing?: TicketPricing; } interface Money { /** * Three-letter currency code in * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. * @format CURRENCY */ 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. * @format DECIMAL_VALUE */ value?: string | null; } 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; } interface WixFeeConfig { /** * Fee calculation method. * * Supported values: `"FEE_ADDED"`, `"FEE_INCLUDED"`, `"FEE_ADDED_AT_CHECKOUT"` * * Default: `"FEE_ADDED_AT_CHECKOUT"` */ type?: FeeTypeWithLiterals; } declare enum FeeType { /** Fee is added to the ticket price at checkout. */ FEE_ADDED = "FEE_ADDED", /** Seller absorbs the fee. It's 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" } /** @enumType */ type FeeTypeWithLiterals = FeeType | 'FEE_ADDED' | 'FEE_INCLUDED' | 'FEE_ADDED_AT_CHECKOUT'; interface TicketSalePeriod { /** Ticket sale start timestamp. */ startDate?: Date | null; /** Ticket sale end timestamp. */ endDate?: Date | null; /** Whether to hide this ticket if it isn't on sale. */ hideNotOnSale?: boolean; } 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" } /** @enumType */ type TicketSaleStatusWithLiterals = TicketSaleStatus | 'SALE_SCHEDULED' | 'SALE_STARTED' | 'SALE_ENDED'; declare enum TicketDefinitionStateEnumState { INCLUDE_HIDDEN_NOT_ON_SALE = "INCLUDE_HIDDEN_NOT_ON_SALE" } /** @enumType */ type TicketDefinitionStateEnumStateWithLiterals = TicketDefinitionStateEnumState | 'INCLUDE_HIDDEN_NOT_ON_SALE'; 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?: TypeWithLiterals; } /** @oneof */ interface TicketPricingPriceOneOf { /** Ticket price which is read only. */ fixedPrice?: Money; /** Min price per ticket, customizable. */ minPrice?: Money; /** Ticket pricing options. */ pricingOptions?: PricingOptions; } interface PricingOptions { /** Multiple ticket pricing options. */ options?: PricingOption[]; } interface PricingOption { /** * Ticket pricing option ID. * @format GUID */ _id?: string | null; /** * Ticket pricing option name. * @minLength 1 * @maxLength 200 */ name?: string | null; /** Ticket pricing option price. */ price?: Money; } declare enum Type { STANDARD = "STANDARD", DONATION = "DONATION" } /** @enumType */ type TypeWithLiterals = Type | 'STANDARD' | 'DONATION'; 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). * @max 100 */ 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). * @maxSize 20 */ fieldset?: TicketDefinitionFieldsetWithLiterals[]; /** Filter. */ filter?: Record | null; /** * Sort order. Defaults to: "created:asc". * @maxLength 100 */ sort?: string; /** * Filter facets to include in the response. * @maxLength 20 * @maxSize 10 */ facet?: string[]; } declare enum TicketDefinitionFieldset { /** Include `policy` in the response. */ POLICY = "POLICY", /** Include `dashboard` in the response. */ DASHBOARD = "DASHBOARD" } /** @enumType */ type TicketDefinitionFieldsetWithLiterals = TicketDefinitionFieldset | 'POLICY' | 'DASHBOARD'; interface QueryTicketDefinitionsResponse { /** Total ticket definitions matching the given filters. */ total?: number; /** Offset. */ offset?: number; /** * Limit. * @max 100 */ limit?: number; /** Ticket definitions. */ definitions?: TicketDefinition[]; /** Filter facets. */ facets?: Record; } interface FacetCounts { /** Facet counts aggregated per value. */ counts?: Record; } interface QueryTicketDefinitionsV2Request { /** Query request object. */ query?: QueryV2; } interface QueryV2 extends QueryV2PagingMethodOneOf { /** Paging options to limit and offset 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 [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters). */ filter?: Record | null; /** * Sort object. * * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting). */ 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 */ interface QueryV2PagingMethodOneOf { /** Paging options to limit and offset 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; } interface Sorting { /** * Name of the field to sort by. * @maxLength 512 */ fieldName?: string; /** Sort order. */ order?: SortOrderWithLiterals; } declare enum SortOrder { ASC = "ASC", DESC = "DESC" } /** @enumType */ type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC'; interface Paging { /** Number of items to load. */ limit?: number | null; /** Number of items to skip in the current sort order. */ offset?: number | null; } interface 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 QueryTicketDefinitionsV2Response { /** Ticket definitions. */ definitions?: TicketDefinition[]; /** Paging metadata definitions. */ metadata?: PagingMetadataV2; } 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; } 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 ListTicketDefinitionsRequest { /** * Event ID. * @format GUID * @maxSize 100 */ eventId?: string[]; /** Offset. */ offset?: number; /** * Paging limit. * @max 100 */ 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`. * * @maxSize 20 */ fieldset?: TicketDefinitionFieldsetWithLiterals[]; /** * Event creator ID. * @format GUID * @maxSize 1 */ eventCreatorId?: string[]; /** * Filter by ticket definition state. * * Supported values: `"VISIBLE"`, `"HIDDEN"`, `"FREE"`, `"PAID"` * @maxSize 20 */ state?: StateWithLiterals[]; /** * Sort order. * * Default: `"created"`:`"asc"` * @maxLength 100 */ sort?: string; /** * Ticket sale status. * * Supported values: `"SALE_SCHEDULED"`, `"SALE_STARTED"`, `"SALE_ENDED"` * @maxSize 5 */ saleStatus?: TicketSaleStatusWithLiterals[]; /** * Filter facets. * @maxLength 20 * @maxSize 10 */ facet?: string[]; } 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" } /** @enumType */ type StateWithLiterals = State | 'VISIBLE' | 'HIDDEN' | 'FREE' | 'PAID'; 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" } /** @enumType */ type GroupByWithLiterals = GroupBy | 'NONE' | 'EVENT_CREATED_DESC' | 'EVENT_CREATED_ASC'; interface ListTicketDefinitionsResponse { /** Meta data. */ metaData?: ResponseMetaData; /** Retrieved ticket definitions. */ definitions?: TicketDefinition[]; /** Filter facets. */ facets?: Record; } interface ResponseMetaData { /** Number of items in the response. */ count?: number; /** Offset of items. */ offset?: number; /** Total number of matching items. */ total?: number; } interface GetTicketDefinitionRequest { /** * Ticket definition ID. * @format GUID */ 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`. * @maxSize 20 */ fieldset?: TicketDefinitionFieldsetWithLiterals[]; } interface GetTicketDefinitionResponse { /** Retrieved ticket definition. */ definition?: TicketDefinition; } interface CreateTicketDefinitionRequest { /** * Event ID. * @format GUID */ eventId: string; /** Ticket definition data. */ definition: TicketDefinitionData; } interface TicketDefinitionData { /** * Ticket name. * @maxLength 30 */ name?: string | null; /** Ticket price. */ price?: Money; /** * Ticket description. * @maxLength 500 */ 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). * @maxLength 1000 */ 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; } interface CreateTicketDefinitionResponse { /** Created ticket definition. */ definition?: TicketDefinition; } interface TicketDefinitionCreated { /** Ticket Definition created timestamp in ISO UTC format. */ timestamp?: Date | null; /** * Ticket Definition ID. * @format GUID */ ticketDefinitionId?: string; /** * Event ID. * @format GUID */ eventId?: string; /** Originated from. */ originatedFrom?: OriginatedFrom; } interface OriginatedFrom { /** * Instance ID. Indicates the original app instance which current entity originated from. * @format GUID */ instanceId?: string; /** * Event ID. Indicates the original event which current entity originated from. * @format GUID */ eventId?: string; /** * Event ID. Indicates the original entity which current entity originated from. * @format GUID */ entityId?: string; } interface UpdateTicketDefinitionRequest { /** * Event ID. * @format GUID */ eventId: string; /** * Ticket definition ID. * @format GUID */ definitionId: string; /** Ticket definition data. */ definition?: TicketDefinitionData; /** Set of field paths, specifying which parts of ticket definition to update. */ fields?: string[]; } interface UpdateTicketDefinitionResponse { /** Updated ticket definition. */ definition?: TicketDefinition; } interface TicketDefinitionUpdated { /** Ticket definition updated timestamp in ISO UTC format. */ timestamp?: Date | null; /** * Ticket definition ID. * @format GUID */ ticketDefinitionId?: string; /** * Event ID. * @format GUID */ eventId?: string; } interface DeleteTicketDefinitionRequest extends DeleteTicketDefinitionRequestDeleteOneOf { /** Ticket definitions to delete. */ byId?: ById; /** Whether to delete all event tickets. */ all?: boolean; /** * Event ID. * @format GUID */ eventId: string; } /** @oneof */ interface DeleteTicketDefinitionRequestDeleteOneOf { /** Ticket definitions to delete. */ byId?: ById; /** Whether to delete all event tickets. */ all?: boolean; } interface ById { /** * Ticket definition IDs. * @format GUID * @minSize 1 * @maxSize 100 */ definitionId?: string[]; } interface DeleteTicketDefinitionResponse { } interface TicketDefinitionDeleted { /** Ticket definition deleted timestamp in ISO UTC format. */ timestamp?: Date | null; /** * Ticket definition ID. * @format GUID */ ticketDefinitionId?: string; /** * Event ID. * @format GUID */ eventId?: string; } interface ChangeCurrencyRequest { /** * Event ID. * @format GUID */ eventId?: string; /** * Event currency, in 3-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. * @minLength 3 * @maxLength 3 */ currency: string; } interface ChangeCurrencyResponse { } interface BulkCopyTicketDefinitionsByEventIdRequest { /** Origin instance ID. */ originInstanceId?: string | null; /** * Origin Event ID. * @format GUID */ originEventId?: string; /** * Target Event ID. * @format GUID */ targetEventId?: string; } interface BulkCopyTicketDefinitionsByEventIdResponse { /** Copied ticket definitions. */ definitions?: CopiedTicketDefinition[]; } interface CopiedTicketDefinition { /** Origin Ticket definition ID. */ originTicketDefinitionId?: string; /** Ticket definition ID. */ ticketDefinitionId?: string; } interface PaidTicketDefinitionExistsRequest { } interface PaidTicketDefinitionExistsResponse { /** Paid exists. */ paidExists?: boolean; } 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; } 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 TicketDefinitionCreatedEnvelope { data: TicketDefinitionCreated; metadata: BaseEventMetadata; } /** @permissionScope Manage Events - all permissions * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS * @permissionScope Manage Events * @permissionScopeId SCOPE.EVENTS.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 * @serviceIdentifier wix.events.ticketing.TicketDefinitionManagement * @slug ticket_definition_created */ declare function onTicketDefinitionCreated(handler: (event: TicketDefinitionCreatedEnvelope) => void | Promise): void; interface TicketDefinitionDeletedEnvelope { data: TicketDefinitionDeleted; metadata: BaseEventMetadata; } /** @permissionScope Manage Events - all permissions * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS * @permissionScope Manage Events * @permissionScopeId SCOPE.EVENTS.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 * @serviceIdentifier wix.events.ticketing.TicketDefinitionManagement * @slug ticket_definition_deleted */ declare function onTicketDefinitionDeleted(handler: (event: TicketDefinitionDeletedEnvelope) => void | Promise): void; interface TicketDefinitionUpdatedEnvelope { data: TicketDefinitionUpdated; metadata: BaseEventMetadata; } /** @permissionScope Manage Events - all permissions * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS * @permissionScope Manage Events * @permissionScopeId SCOPE.EVENTS.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 * @serviceIdentifier wix.events.ticketing.TicketDefinitionManagement * @slug ticket_definition_updated */ 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 * @applicableIdentity APP * @fqn wix.events.ticketing.TicketDefinitionManagement.QueryTicketDefinitions * @deprecated * @targetRemovalDate 2024-12-01 */ declare function queryTicketDefinitions(options?: QueryTicketDefinitionsOptions): Promise>; 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). * @max 100 */ 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). * @maxSize 20 */ fieldset?: TicketDefinitionFieldsetWithLiterals[]; /** Filter. */ filter?: Record | null; /** * Sort order. Defaults to: "created:asc". * @maxLength 100 */ sort?: string; /** * Filter facets to include in the response. * @maxLength 20 * @maxSize 10 */ 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 * @permissionId WIX_EVENTS.READ_TICKET_DEFINITIONS * @applicableIdentity APP * @fqn wix.events.ticketing.TicketDefinitionManagement.QueryTicketDefinitionsV2 * @deprecated * @targetRemovalDate 2024-12-01 */ declare function queryTicketDefinitionsV2(options?: QueryTicketDefinitionsV2Options): DefinitionsQueryBuilder; interface QueryTicketDefinitionsV2Options { } interface QueryCursorResult { cursors: Cursors; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } interface DefinitionsQueryResult extends QueryCursorResult { items: TicketDefinition[]; query: DefinitionsQueryBuilder; next: () => Promise; prev: () => Promise; } 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; } /** * @hidden * @fqn wix.events.ticketing.TicketDefinitionManagement.QueryTicketDefinitionsV2 * @requiredField query */ declare function typedQueryTicketDefinitionsV2(query: TicketDefinitionQuery, options?: QueryTicketDefinitionsV2Options): Promise>; interface TicketDefinitionQuerySpec extends QuerySpec { paging: 'cursor'; wql: []; } type CommonQueryWithEntityContext = Query; type TicketDefinitionQuery = { /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */ cursorPaging?: { /** Maximum number of items to return in the results. @max: 100 */ limit?: NonNullable['limit'] | null; /** Pointer to the next or previous page in the list of results. Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response. Not relevant for the first request. @maxLength: 16000 */ cursor?: NonNullable['cursor'] | null; }; /** Filter object. Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#filters). */ filter?: CommonQueryWithEntityContext['filter'] | null; /** Sort object. Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#sorting). */ 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; }; }; /** * **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 * @applicableIdentity APP * @fqn wix.events.ticketing.TicketDefinitionManagement.ListTicketDefinitions * @deprecated * @targetRemovalDate 2024-12-01 */ declare function listTicketDefinitions(options?: ListTicketDefinitionsOptions): Promise>; interface ListTicketDefinitionsOptions { /** * Event ID. * @format GUID * @maxSize 100 */ eventId?: string[]; /** Offset. */ offset?: number; /** * Paging limit. * @max 100 */ 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`. * @maxSize 20 */ fieldset?: TicketDefinitionFieldsetWithLiterals[]; /** * Event creator ID. * @format GUID * @maxSize 1 */ eventCreatorId?: string[]; /** * Filter by ticket definition state. * * Supported values: `"VISIBLE"`, `"HIDDEN"`, `"FREE"`, `"PAID"` * @maxSize 20 */ state?: StateWithLiterals[]; /** * Sort order. * * Default: `"created"`:`"asc"`. * * See [Ticket Definitions Sort](/wix-events-v2/ticketdefinitions/ticket-definitions-sort) for more information. * * * * * @maxLength 100 */ sort?: string; /** * Ticket sale status. * * Supported values: `"SALE_SCHEDULED"`, `"SALE_STARTED"`, `"SALE_ENDED"` * @maxSize 5 */ saleStatus?: TicketSaleStatusWithLiterals[]; /** * Filter facets. * @maxLength 20 * @maxSize 10 */ 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 * @applicableIdentity APP * @returns Retrieved ticket definition. * @fqn wix.events.ticketing.TicketDefinitionManagement.GetTicketDefinition * @deprecated * @targetRemovalDate 2024-12-01 */ declare function getTicketDefinition(definitionId: string, options?: GetTicketDefinitionOptions): Promise>; 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`. * @maxSize 20 */ fieldset?: TicketDefinitionFieldsetWithLiterals[]; } /** * **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 * @applicableIdentity APP * @fqn wix.events.ticketing.TicketDefinitionManagement.CreateTicketDefinition * @deprecated * @targetRemovalDate 2024-12-01 */ declare function createTicketDefinition(eventId: string, options: NonNullablePaths): Promise>; 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 * @param identifiers - Details of the ticket definition to update. * @param options - Ticket definition details to update. * @permissionId WIX_EVENTS.MANAGE_TICKET_DEFINITIONS * @applicableIdentity APP * @fqn wix.events.ticketing.TicketDefinitionManagement.UpdateTicketDefinition * @deprecated * @targetRemovalDate 2024-12-01 */ declare function updateTicketDefinition(definitionId: string, eventId: string, options?: UpdateTicketDefinitionOptions): Promise>; 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 * @applicableIdentity APP * @fqn wix.events.ticketing.TicketDefinitionManagement.DeleteTicketDefinition * @deprecated * @targetRemovalDate 2024-12-01 */ declare function deleteTicketDefinition(eventId: string, options?: DeleteTicketDefinitionOptions): Promise; interface DeleteTicketDefinitionOptions extends DeleteTicketDefinitionOptionsDeleteOneOf { /** Ticket definitions to delete. */ byId?: ById; /** Whether to delete all event tickets. */ all?: boolean; } /** @oneof */ interface DeleteTicketDefinitionOptionsDeleteOneOf { /** 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 * @applicableIdentity APP * @fqn wix.events.ticketing.TicketDefinitionManagement.ChangeCurrency * @deprecated * @targetRemovalDate 2024-12-01 */ declare function changeCurrency(options?: NonNullablePaths): Promise; interface ChangeCurrencyOptions { /** * Event ID. * @format GUID */ eventId?: string; /** * Event currency, in 3-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. * @minLength 3 * @maxLength 3 */ currency: string; } export { type AccountInfo, type BaseEventMetadata, type BulkCopyTicketDefinitionsByEventIdRequest, type BulkCopyTicketDefinitionsByEventIdResponse, type ById, type ChangeCurrencyOptions, type ChangeCurrencyRequest, type ChangeCurrencyResponse, type CommonQueryWithEntityContext, type CopiedTicketDefinition, type CreateTicketDefinitionOptions, type CreateTicketDefinitionRequest, type CreateTicketDefinitionResponse, type CursorPaging, type Cursors, type Dashboard, type DefinitionsQueryBuilder, type DefinitionsQueryResult, type DeleteTicketDefinitionOptions, type DeleteTicketDefinitionOptionsDeleteOneOf, type DeleteTicketDefinitionRequest, type DeleteTicketDefinitionRequestDeleteOneOf, type DeleteTicketDefinitionResponse, type FacetCounts, FeeType, type FeeTypeWithLiterals, type GetTicketDefinitionOptions, type GetTicketDefinitionRequest, type GetTicketDefinitionResponse, GroupBy, type GroupByWithLiterals, type IdentificationData, type IdentificationDataIdOneOf, type ListTicketDefinitionsOptions, type ListTicketDefinitionsRequest, type ListTicketDefinitionsResponse, type MessageEnvelope, type Money, type OriginatedFrom, type Paging, type PagingMetadataV2, type PaidTicketDefinitionExistsRequest, type PaidTicketDefinitionExistsResponse, type PricingOption, type PricingOptions, type QueryTicketDefinitionsOptions, type QueryTicketDefinitionsRequest, type QueryTicketDefinitionsResponse, type QueryTicketDefinitionsV2Options, type QueryTicketDefinitionsV2Request, type QueryTicketDefinitionsV2Response, type QueryV2, type QueryV2PagingMethodOneOf, type ResponseMetaData, SortOrder, type SortOrderWithLiterals, type Sorting, State, type StateWithLiterals, type TicketDefinition, type TicketDefinitionCreated, type TicketDefinitionCreatedEnvelope, type TicketDefinitionData, type TicketDefinitionDeleted, type TicketDefinitionDeletedEnvelope, TicketDefinitionFieldset, type TicketDefinitionFieldsetWithLiterals, type TicketDefinitionQuery, type TicketDefinitionQuerySpec, TicketDefinitionStateEnumState, type TicketDefinitionStateEnumStateWithLiterals, type TicketDefinitionUpdated, type TicketDefinitionUpdatedEnvelope, type TicketPricing, type TicketPricingPriceOneOf, type TicketSalePeriod, TicketSaleStatus, type TicketSaleStatusWithLiterals, Type, type TypeWithLiterals, type UpdateTicketDefinitionOptions, type UpdateTicketDefinitionRequest, type UpdateTicketDefinitionResponse, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, type WixFeeConfig, changeCurrency, createTicketDefinition, deleteTicketDefinition, getTicketDefinition, listTicketDefinitions, onTicketDefinitionCreated, onTicketDefinitionDeleted, onTicketDefinitionUpdated, queryTicketDefinitions, queryTicketDefinitionsV2, typedQueryTicketDefinitionsV2, updateTicketDefinition, utils };