@wix/auto_sdk_events_ticket-definitions 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +18 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/index.typings.d.ts +1 -0
  5. package/build/cjs/index.typings.js +18 -0
  6. package/build/cjs/index.typings.js.map +1 -0
  7. package/build/cjs/meta.d.ts +1 -0
  8. package/build/cjs/meta.js +18 -0
  9. package/build/cjs/meta.js.map +1 -0
  10. package/build/cjs/src/events-v1-ticket-definition-ticket-definitions.context.d.ts +22 -0
  11. package/build/cjs/src/events-v1-ticket-definition-ticket-definitions.context.js +34 -0
  12. package/build/cjs/src/events-v1-ticket-definition-ticket-definitions.context.js.map +1 -0
  13. package/build/cjs/src/events-v1-ticket-definition-ticket-definitions.http.d.ts +125 -0
  14. package/build/cjs/src/events-v1-ticket-definition-ticket-definitions.http.js +696 -0
  15. package/build/cjs/src/events-v1-ticket-definition-ticket-definitions.http.js.map +1 -0
  16. package/build/cjs/src/events-v1-ticket-definition-ticket-definitions.meta.d.ts +24 -0
  17. package/build/cjs/src/events-v1-ticket-definition-ticket-definitions.meta.js +180 -0
  18. package/build/cjs/src/events-v1-ticket-definition-ticket-definitions.meta.js.map +1 -0
  19. package/build/cjs/src/events-v1-ticket-definition-ticket-definitions.public.d.ts +168 -0
  20. package/build/cjs/src/events-v1-ticket-definition-ticket-definitions.public.js +86 -0
  21. package/build/cjs/src/events-v1-ticket-definition-ticket-definitions.public.js.map +1 -0
  22. package/build/cjs/src/events-v1-ticket-definition-ticket-definitions.types.d.ts +593 -0
  23. package/build/cjs/src/events-v1-ticket-definition-ticket-definitions.types.js +71 -0
  24. package/build/cjs/src/events-v1-ticket-definition-ticket-definitions.types.js.map +1 -0
  25. package/build/cjs/src/events-v1-ticket-definition-ticket-definitions.universal.d.ts +1006 -0
  26. package/build/cjs/src/events-v1-ticket-definition-ticket-definitions.universal.js +577 -0
  27. package/build/cjs/src/events-v1-ticket-definition-ticket-definitions.universal.js.map +1 -0
  28. package/build/es/index.d.ts +1 -0
  29. package/build/es/index.js +2 -0
  30. package/build/es/index.js.map +1 -0
  31. package/build/es/index.typings.d.ts +1 -0
  32. package/build/es/index.typings.js +2 -0
  33. package/build/es/index.typings.js.map +1 -0
  34. package/build/es/meta.d.ts +1 -0
  35. package/build/es/meta.js +2 -0
  36. package/build/es/meta.js.map +1 -0
  37. package/build/es/package.json +3 -0
  38. package/build/es/src/events-v1-ticket-definition-ticket-definitions.context.d.ts +22 -0
  39. package/build/es/src/events-v1-ticket-definition-ticket-definitions.context.js +22 -0
  40. package/build/es/src/events-v1-ticket-definition-ticket-definitions.context.js.map +1 -0
  41. package/build/es/src/events-v1-ticket-definition-ticket-definitions.http.d.ts +125 -0
  42. package/build/es/src/events-v1-ticket-definition-ticket-definitions.http.js +685 -0
  43. package/build/es/src/events-v1-ticket-definition-ticket-definitions.http.js.map +1 -0
  44. package/build/es/src/events-v1-ticket-definition-ticket-definitions.meta.d.ts +24 -0
  45. package/build/es/src/events-v1-ticket-definition-ticket-definitions.meta.js +146 -0
  46. package/build/es/src/events-v1-ticket-definition-ticket-definitions.meta.js.map +1 -0
  47. package/build/es/src/events-v1-ticket-definition-ticket-definitions.public.d.ts +168 -0
  48. package/build/es/src/events-v1-ticket-definition-ticket-definitions.public.js +66 -0
  49. package/build/es/src/events-v1-ticket-definition-ticket-definitions.public.js.map +1 -0
  50. package/build/es/src/events-v1-ticket-definition-ticket-definitions.types.d.ts +593 -0
  51. package/build/es/src/events-v1-ticket-definition-ticket-definitions.types.js +68 -0
  52. package/build/es/src/events-v1-ticket-definition-ticket-definitions.types.js.map +1 -0
  53. package/build/es/src/events-v1-ticket-definition-ticket-definitions.universal.d.ts +1006 -0
  54. package/build/es/src/events-v1-ticket-definition-ticket-definitions.universal.js +543 -0
  55. package/build/es/src/events-v1-ticket-definition-ticket-definitions.universal.js.map +1 -0
  56. package/build/internal/cjs/index.d.ts +1 -0
  57. package/build/internal/cjs/index.js +18 -0
  58. package/build/internal/cjs/index.js.map +1 -0
  59. package/build/internal/cjs/index.typings.d.ts +1 -0
  60. package/build/internal/cjs/index.typings.js +18 -0
  61. package/build/internal/cjs/index.typings.js.map +1 -0
  62. package/build/internal/cjs/meta.d.ts +1 -0
  63. package/build/internal/cjs/meta.js +18 -0
  64. package/build/internal/cjs/meta.js.map +1 -0
  65. package/build/internal/cjs/src/events-v1-ticket-definition-ticket-definitions.context.d.ts +22 -0
  66. package/build/internal/cjs/src/events-v1-ticket-definition-ticket-definitions.context.js +34 -0
  67. package/build/internal/cjs/src/events-v1-ticket-definition-ticket-definitions.context.js.map +1 -0
  68. package/build/internal/cjs/src/events-v1-ticket-definition-ticket-definitions.http.d.ts +125 -0
  69. package/build/internal/cjs/src/events-v1-ticket-definition-ticket-definitions.http.js +696 -0
  70. package/build/internal/cjs/src/events-v1-ticket-definition-ticket-definitions.http.js.map +1 -0
  71. package/build/internal/cjs/src/events-v1-ticket-definition-ticket-definitions.meta.d.ts +24 -0
  72. package/build/internal/cjs/src/events-v1-ticket-definition-ticket-definitions.meta.js +180 -0
  73. package/build/internal/cjs/src/events-v1-ticket-definition-ticket-definitions.meta.js.map +1 -0
  74. package/build/internal/cjs/src/events-v1-ticket-definition-ticket-definitions.public.d.ts +168 -0
  75. package/build/internal/cjs/src/events-v1-ticket-definition-ticket-definitions.public.js +86 -0
  76. package/build/internal/cjs/src/events-v1-ticket-definition-ticket-definitions.public.js.map +1 -0
  77. package/build/internal/cjs/src/events-v1-ticket-definition-ticket-definitions.types.d.ts +593 -0
  78. package/build/internal/cjs/src/events-v1-ticket-definition-ticket-definitions.types.js +71 -0
  79. package/build/internal/cjs/src/events-v1-ticket-definition-ticket-definitions.types.js.map +1 -0
  80. package/build/internal/cjs/src/events-v1-ticket-definition-ticket-definitions.universal.d.ts +1012 -0
  81. package/build/internal/cjs/src/events-v1-ticket-definition-ticket-definitions.universal.js +577 -0
  82. package/build/internal/cjs/src/events-v1-ticket-definition-ticket-definitions.universal.js.map +1 -0
  83. package/build/internal/es/index.d.ts +1 -0
  84. package/build/internal/es/index.js +2 -0
  85. package/build/internal/es/index.js.map +1 -0
  86. package/build/internal/es/index.typings.d.ts +1 -0
  87. package/build/internal/es/index.typings.js +2 -0
  88. package/build/internal/es/index.typings.js.map +1 -0
  89. package/build/internal/es/meta.d.ts +1 -0
  90. package/build/internal/es/meta.js +2 -0
  91. package/build/internal/es/meta.js.map +1 -0
  92. package/build/internal/es/src/events-v1-ticket-definition-ticket-definitions.context.d.ts +22 -0
  93. package/build/internal/es/src/events-v1-ticket-definition-ticket-definitions.context.js +22 -0
  94. package/build/internal/es/src/events-v1-ticket-definition-ticket-definitions.context.js.map +1 -0
  95. package/build/internal/es/src/events-v1-ticket-definition-ticket-definitions.http.d.ts +125 -0
  96. package/build/internal/es/src/events-v1-ticket-definition-ticket-definitions.http.js +685 -0
  97. package/build/internal/es/src/events-v1-ticket-definition-ticket-definitions.http.js.map +1 -0
  98. package/build/internal/es/src/events-v1-ticket-definition-ticket-definitions.meta.d.ts +24 -0
  99. package/build/internal/es/src/events-v1-ticket-definition-ticket-definitions.meta.js +146 -0
  100. package/build/internal/es/src/events-v1-ticket-definition-ticket-definitions.meta.js.map +1 -0
  101. package/build/internal/es/src/events-v1-ticket-definition-ticket-definitions.public.d.ts +168 -0
  102. package/build/internal/es/src/events-v1-ticket-definition-ticket-definitions.public.js +66 -0
  103. package/build/internal/es/src/events-v1-ticket-definition-ticket-definitions.public.js.map +1 -0
  104. package/build/internal/es/src/events-v1-ticket-definition-ticket-definitions.types.d.ts +593 -0
  105. package/build/internal/es/src/events-v1-ticket-definition-ticket-definitions.types.js +68 -0
  106. package/build/internal/es/src/events-v1-ticket-definition-ticket-definitions.types.js.map +1 -0
  107. package/build/internal/es/src/events-v1-ticket-definition-ticket-definitions.universal.d.ts +1012 -0
  108. package/build/internal/es/src/events-v1-ticket-definition-ticket-definitions.universal.js +543 -0
  109. package/build/internal/es/src/events-v1-ticket-definition-ticket-definitions.universal.js.map +1 -0
  110. package/meta/package.json +3 -0
  111. package/package.json +52 -0
@@ -0,0 +1,1006 @@
1
+ export interface TicketDefinition {
2
+ /** Ticket definition ID. */
3
+ _id?: string;
4
+ /** Ticket price. */
5
+ price?: Money;
6
+ /** Whether the ticket is free (read only). */
7
+ free?: boolean;
8
+ /** Ticket name. */
9
+ name?: string;
10
+ /** Ticket description. */
11
+ description?: string;
12
+ /**
13
+ * Limit of tickets that can be purchased per checkout.
14
+ * Set to 20 for unlimited ticket definition.
15
+ */
16
+ limitPerCheckout?: number;
17
+ /** Custom sort index. */
18
+ orderIndex?: number;
19
+ /** Policy information plain text block, as printed on the ticket. */
20
+ policy?: string;
21
+ /** Sensitive dashboard data. */
22
+ dashboard?: Dashboard;
23
+ /** Event ID associated with the ticket. */
24
+ eventId?: string;
25
+ /**
26
+ * Configuration of the fixed-rate Wix ticket service fee that is applied at checkout to each ticket sold.
27
+ * @readonly
28
+ */
29
+ wixFeeConfig?: WixFeeConfig;
30
+ /** Ticket sale period. */
31
+ salePeriod?: TicketSalePeriod;
32
+ /**
33
+ * Ticket sale status.
34
+ * @readonly
35
+ */
36
+ saleStatus?: TicketSaleStatus;
37
+ /** Ticket state. */
38
+ state?: TicketDefinitionStateEnumState[];
39
+ /** Ticket pricing. */
40
+ pricing?: TicketPricing;
41
+ }
42
+ export interface Money {
43
+ /**
44
+ * Three-letter currency code in
45
+ * [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.
46
+ */
47
+ currency?: string;
48
+ /** 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. */
49
+ value?: string | null;
50
+ }
51
+ export interface Dashboard {
52
+ /** Whether ticket is hidden and cannot be sold. */
53
+ hidden?: boolean;
54
+ /**
55
+ * Number of tickets sold and reserved.
56
+ * @deprecated
57
+ */
58
+ sold?: number;
59
+ /** Whether the ticket has limited quantity. */
60
+ limited?: boolean;
61
+ /** Ticket limit. `NULL` for unlimited ticket definitions. */
62
+ quantity?: number | null;
63
+ /** Number of unsold tickets. `NULL` for unlimited ticket definitions. */
64
+ unsold?: number | null;
65
+ /** Number of tickets sold. */
66
+ ticketsSold?: number;
67
+ /** Number of tickets reserved. */
68
+ ticketsReserved?: number;
69
+ }
70
+ export interface WixFeeConfig {
71
+ /**
72
+ * Fee calculation method.
73
+ *
74
+ * Supported values: `"FEE_ADDED"`, `"FEE_INCLUDED"`, `"FEE_ADDED_AT_CHECKOUT"`
75
+ *
76
+ * Default: `"FEE_ADDED_AT_CHECKOUT"`
77
+ */
78
+ type?: FeeType;
79
+ }
80
+ export declare enum FeeType {
81
+ /** Fee is added to the ticket price at checkout. */
82
+ FEE_ADDED = "FEE_ADDED",
83
+ /** Seller absorbs the fee. It is deducted from the ticket price. */
84
+ FEE_INCLUDED = "FEE_INCLUDED",
85
+ /** Fee is added to the ticket price at checkout. */
86
+ FEE_ADDED_AT_CHECKOUT = "FEE_ADDED_AT_CHECKOUT"
87
+ }
88
+ export interface TicketSalePeriod {
89
+ /** Ticket sale start timestamp. */
90
+ startDate?: Date | null;
91
+ /** Ticket sale end timestamp. */
92
+ endDate?: Date | null;
93
+ /** Whether to hide this ticket if it's not on sale */
94
+ hideNotOnSale?: boolean;
95
+ }
96
+ export declare enum TicketSaleStatus {
97
+ /** Ticket sale is scheduled to start. */
98
+ SALE_SCHEDULED = "SALE_SCHEDULED",
99
+ /** Ticket sale has started. */
100
+ SALE_STARTED = "SALE_STARTED",
101
+ /** Ticket sale has ended. */
102
+ SALE_ENDED = "SALE_ENDED"
103
+ }
104
+ export declare enum TicketDefinitionStateEnumState {
105
+ INCLUDE_HIDDEN_NOT_ON_SALE = "INCLUDE_HIDDEN_NOT_ON_SALE"
106
+ }
107
+ export interface TicketPricing extends TicketPricingPriceOneOf {
108
+ /** Ticket price which is read only. */
109
+ fixedPrice?: Money;
110
+ /** Min price per ticket, customizable. */
111
+ minPrice?: Money;
112
+ /** Ticket pricing options. */
113
+ pricingOptions?: PricingOptions;
114
+ /**
115
+ * Ticket pricing type.
116
+ * @readonly
117
+ */
118
+ pricingType?: Type;
119
+ }
120
+ /** @oneof */
121
+ export interface TicketPricingPriceOneOf {
122
+ /** Ticket price which is read only. */
123
+ fixedPrice?: Money;
124
+ /** Min price per ticket, customizable. */
125
+ minPrice?: Money;
126
+ /** Ticket pricing options. */
127
+ pricingOptions?: PricingOptions;
128
+ }
129
+ export interface PricingOptions {
130
+ /** Multiple ticket pricing options. */
131
+ options?: PricingOption[];
132
+ }
133
+ export interface PricingOption {
134
+ /** Ticket pricing option ID. */
135
+ _id?: string | null;
136
+ /** Ticket pricing option name. */
137
+ name?: string | null;
138
+ /** Ticket pricing option price. */
139
+ price?: Money;
140
+ }
141
+ export declare enum Type {
142
+ STANDARD = "STANDARD",
143
+ DONATION = "DONATION"
144
+ }
145
+ export interface QueryTicketDefinitionsRequest {
146
+ /** Offset. See [Pagination](https://dev.wix.com/api/rest/getting-started/pagination). */
147
+ offset?: number;
148
+ /** Limit. See [Pagination](https://dev.wix.com/api/rest/getting-started/pagination). */
149
+ limit?: number;
150
+ /** 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). */
151
+ fieldset?: TicketDefinitionFieldset[];
152
+ /** 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). */
153
+ filter?: Record<string, any> | null;
154
+ /**
155
+ * Sort order. Defaults to: "created:asc".
156
+ * 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).
157
+ */
158
+ sort?: string;
159
+ /**
160
+ * Filter facets to include in the response.
161
+ * 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).
162
+ */
163
+ facet?: string[];
164
+ }
165
+ export declare enum TicketDefinitionFieldset {
166
+ /** Include `policy` in the response. */
167
+ POLICY = "POLICY",
168
+ /** Include `dashboard` in the response. */
169
+ DASHBOARD = "DASHBOARD"
170
+ }
171
+ export interface QueryTicketDefinitionsResponse {
172
+ /** Total ticket definitions matching the given filters. */
173
+ total?: number;
174
+ /** Offset. */
175
+ offset?: number;
176
+ /** Limit. */
177
+ limit?: number;
178
+ /** Ticket definitions. */
179
+ definitions?: TicketDefinition[];
180
+ /** Filter facets. */
181
+ facets?: Record<string, FacetCounts>;
182
+ }
183
+ export interface FacetCounts {
184
+ /** Facet counts aggregated per value. */
185
+ counts?: Record<string, number>;
186
+ }
187
+ export interface QueryTicketDefinitionsV2Request {
188
+ /** Query request object. */
189
+ query?: QueryV2;
190
+ }
191
+ export interface QueryV2 extends QueryV2PagingMethodOneOf {
192
+ /** Paging options to limit and skip the number of items. */
193
+ paging?: Paging;
194
+ /** 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`. */
195
+ cursorPaging?: CursorPaging;
196
+ /**
197
+ * Filter object.
198
+ *
199
+ * Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).
200
+ */
201
+ filter?: Record<string, any> | null;
202
+ /**
203
+ * Sort object.
204
+ *
205
+ * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).
206
+ */
207
+ sort?: Sorting[];
208
+ /** 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. */
209
+ fields?: string[];
210
+ /** 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. */
211
+ fieldsets?: string[];
212
+ }
213
+ /** @oneof */
214
+ export interface QueryV2PagingMethodOneOf {
215
+ /** Paging options to limit and skip the number of items. */
216
+ paging?: Paging;
217
+ /** 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`. */
218
+ cursorPaging?: CursorPaging;
219
+ }
220
+ export interface Sorting {
221
+ /** Name of the field to sort by. */
222
+ fieldName?: string;
223
+ /** Sort order. */
224
+ order?: SortOrder;
225
+ }
226
+ export declare enum SortOrder {
227
+ ASC = "ASC",
228
+ DESC = "DESC"
229
+ }
230
+ export interface Paging {
231
+ /** Number of items to load. */
232
+ limit?: number | null;
233
+ /** Number of items to skip in the current sort order. */
234
+ offset?: number | null;
235
+ }
236
+ export interface CursorPaging {
237
+ /** Maximum number of items to return in the results. */
238
+ limit?: number | null;
239
+ /**
240
+ * Pointer to the next or previous page in the list of results.
241
+ *
242
+ * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
243
+ * Not relevant for the first request.
244
+ */
245
+ cursor?: string | null;
246
+ }
247
+ export interface QueryTicketDefinitionsV2Response {
248
+ /** Ticket definitions. */
249
+ definitions?: TicketDefinition[];
250
+ /** Paging metadata definitions. */
251
+ metadata?: PagingMetadataV2;
252
+ }
253
+ export interface PagingMetadataV2 {
254
+ /** Number of items returned in the response. */
255
+ count?: number | null;
256
+ /** Offset that was requested. */
257
+ offset?: number | null;
258
+ /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
259
+ total?: number | null;
260
+ /** Flag that indicates the server failed to calculate the `total` field. */
261
+ tooManyToCount?: boolean | null;
262
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
263
+ cursors?: Cursors;
264
+ }
265
+ export interface Cursors {
266
+ /** Cursor string pointing to the next page in the list of results. */
267
+ next?: string | null;
268
+ /** Cursor pointing to the previous page in the list of results. */
269
+ prev?: string | null;
270
+ }
271
+ export interface ListTicketDefinitionsRequest {
272
+ /** Event ID. */
273
+ eventId?: string[];
274
+ /** Offset. */
275
+ offset?: number;
276
+ /** Paging limit. */
277
+ limit?: number;
278
+ /**
279
+ * Predefined sets of fields to return.
280
+ * - `DASHBOARD`: Returns `dashboard`.
281
+ * - `POLICY`: Returns `policy`.
282
+ *
283
+ * Default: If `fieldset` is omitted from the request, `id`, `price`, `free`, `name`, `limitPerCheckout`, `orderIndex`, `eventId`.
284
+ *
285
+ */
286
+ fieldset?: TicketDefinitionFieldset[];
287
+ /** Event creator ID. */
288
+ eventCreatorId?: string[];
289
+ /**
290
+ * Filter by ticket definition state.
291
+ *
292
+ * Supported values: `"VISIBLE"`, `"HIDDEN"`, `"FREE"`, `"PAID"`
293
+ */
294
+ state?: State[];
295
+ /**
296
+ * Sort order.
297
+ *
298
+ * Default: `"created"`:`"asc"`
299
+ */
300
+ sort?: string;
301
+ /**
302
+ * Ticket sale status.
303
+ *
304
+ * Supported values: `"SALE_SCHEDULED"`, `"SALE_STARTED"`, `"SALE_ENDED"`
305
+ */
306
+ saleStatus?: TicketSaleStatus[];
307
+ /** Filter facets. */
308
+ facet?: string[];
309
+ }
310
+ export declare enum State {
311
+ /** The ticket is available for purchase. */
312
+ VISIBLE = "VISIBLE",
313
+ /** The ticket is unavailable for purchase. */
314
+ HIDDEN = "HIDDEN",
315
+ /** The ticket price is 0. */
316
+ FREE = "FREE",
317
+ /** The ticket price is greater than 0. */
318
+ PAID = "PAID"
319
+ }
320
+ export declare enum GroupBy {
321
+ /** No grouping. */
322
+ NONE = "NONE",
323
+ /** Groups by event created date with descending sorting. */
324
+ EVENT_CREATED_DESC = "EVENT_CREATED_DESC",
325
+ /** Groups by event created date with ascending sorting. */
326
+ EVENT_CREATED_ASC = "EVENT_CREATED_ASC"
327
+ }
328
+ export interface ListTicketDefinitionsResponse {
329
+ /** Meta data. */
330
+ metaData?: ResponseMetaData;
331
+ /** Retrieved ticket definitions. */
332
+ definitions?: TicketDefinition[];
333
+ /** Filter facets. */
334
+ facets?: Record<string, FacetCounts>;
335
+ }
336
+ export interface ResponseMetaData {
337
+ /** Number of items in the response. */
338
+ count?: number;
339
+ /** Offset of items. */
340
+ offset?: number;
341
+ /** Total number of matching items. */
342
+ total?: number;
343
+ }
344
+ export interface GetTicketDefinitionRequest {
345
+ /** Ticket definition ID. */
346
+ definitionId: string;
347
+ /**
348
+ * Predefined sets of fields to return.
349
+ * - `DASHBOARD`: Returns `dashboard`.
350
+ * - `POLICY`: Returns `policy`.
351
+ *
352
+ * Default: If `fieldset` is omitted from the request, `id`, `price`, `free`, `name`, `limitPerCheckout`, `orderIndex`, `eventId`.
353
+ */
354
+ fieldset?: TicketDefinitionFieldset[];
355
+ }
356
+ export interface GetTicketDefinitionResponse {
357
+ /** Retrieved ticket definition. */
358
+ definition?: TicketDefinition;
359
+ }
360
+ export interface CreateTicketDefinitionRequest {
361
+ /** Event ID. */
362
+ eventId: string;
363
+ /** Ticket definition data. */
364
+ definition: TicketDefinitionData;
365
+ }
366
+ export interface TicketDefinitionData {
367
+ /** Ticket name. */
368
+ name?: string | null;
369
+ /** Ticket price. */
370
+ price?: Money;
371
+ /** Ticket description. */
372
+ description?: string | null;
373
+ /** Whether this ticket type is limited in quantity. */
374
+ limited?: boolean;
375
+ /**
376
+ * Limit for this ticket type.
377
+ *
378
+ * `NULL` for unlimited.
379
+ */
380
+ quantity?: number | null;
381
+ /** Custom sort index for manual tickets ordering implementation. */
382
+ orderIndex?: number;
383
+ /** Policy information in plain text (as listed on the ticket). */
384
+ policy?: string | null;
385
+ /** Whether this ticket type is hidden to customers and cannot be purchased. */
386
+ hidden?: boolean;
387
+ /** Configuration of the fixed-rate Wix ticket service fee that is applied to each ticket sold. */
388
+ wixFeeConfig?: WixFeeConfig;
389
+ /** Ticket sale period. */
390
+ salePeriod?: TicketSalePeriod;
391
+ /** Ticket pricing. */
392
+ pricing?: TicketPricing;
393
+ }
394
+ export interface CreateTicketDefinitionResponse {
395
+ /** Created ticket definition. */
396
+ definition?: TicketDefinition;
397
+ }
398
+ export interface TicketDefinitionCreated {
399
+ /** Ticket Definition created timestamp in ISO UTC format. */
400
+ timestamp?: Date | null;
401
+ /** Ticket Definition ID. */
402
+ ticketDefinitionId?: string;
403
+ /** Event ID. */
404
+ eventId?: string;
405
+ /** Originated from. */
406
+ originatedFrom?: OriginatedFrom;
407
+ }
408
+ export interface OriginatedFrom {
409
+ /** Instance ID. Indicates the original app instance which current entity originated from. */
410
+ instanceId?: string;
411
+ /** Event ID. Indicates the original event which current entity originated from. */
412
+ eventId?: string;
413
+ /** Event ID. Indicates the original entity which current entity originated from. */
414
+ entityId?: string;
415
+ }
416
+ export interface UpdateTicketDefinitionRequest {
417
+ /** Event ID. */
418
+ eventId: string;
419
+ /** Ticket definition ID. */
420
+ definitionId: string;
421
+ /** Ticket definition data. */
422
+ definition?: TicketDefinitionData;
423
+ /** Set of field paths, specifying which parts of ticket definition to update. */
424
+ fields?: string[];
425
+ }
426
+ export interface UpdateTicketDefinitionResponse {
427
+ /** Updated ticket definition. */
428
+ definition?: TicketDefinition;
429
+ }
430
+ export interface TicketDefinitionUpdated {
431
+ /** Ticket definition updated timestamp in ISO UTC format. */
432
+ timestamp?: Date | null;
433
+ /** Ticket definition ID. */
434
+ ticketDefinitionId?: string;
435
+ /** Event ID. */
436
+ eventId?: string;
437
+ }
438
+ export interface DeleteTicketDefinitionRequest extends DeleteTicketDefinitionRequestDeleteOneOf {
439
+ /** Ticket definitions to delete. */
440
+ byId?: ById;
441
+ /** Whether to delete all event tickets. */
442
+ all?: boolean;
443
+ /** Event ID. */
444
+ eventId: string;
445
+ }
446
+ /** @oneof */
447
+ export interface DeleteTicketDefinitionRequestDeleteOneOf {
448
+ /** Ticket definitions to delete. */
449
+ byId?: ById;
450
+ /** Whether to delete all event tickets. */
451
+ all?: boolean;
452
+ }
453
+ export interface ById {
454
+ /** Ticket definition IDs. */
455
+ definitionId?: string[];
456
+ }
457
+ export interface DeleteTicketDefinitionResponse {
458
+ }
459
+ export interface TicketDefinitionDeleted {
460
+ /** Ticket definition deleted timestamp in ISO UTC format. */
461
+ timestamp?: Date | null;
462
+ /** Ticket definition ID. */
463
+ ticketDefinitionId?: string;
464
+ /** Event ID. */
465
+ eventId?: string;
466
+ }
467
+ export interface ChangeCurrencyRequest {
468
+ /** Event ID. */
469
+ eventId?: string;
470
+ /** Event currency, in 3-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. */
471
+ currency: string;
472
+ }
473
+ export interface ChangeCurrencyResponse {
474
+ }
475
+ export interface BulkCopyTicketDefinitionsByEventIdRequest {
476
+ /** Origin instance ID. */
477
+ originInstanceId?: string | null;
478
+ /** Origin Event ID. */
479
+ originEventId?: string;
480
+ /** Target Event ID. */
481
+ targetEventId?: string;
482
+ }
483
+ export interface BulkCopyTicketDefinitionsByEventIdResponse {
484
+ /** Copied ticket definitions. */
485
+ definitions?: CopiedTicketDefinition[];
486
+ }
487
+ export interface CopiedTicketDefinition {
488
+ /** Origin Ticket definition ID. */
489
+ originTicketDefinitionId?: string;
490
+ /** Ticket definition ID. */
491
+ ticketDefinitionId?: string;
492
+ }
493
+ export interface PaidTicketDefinitionExistsRequest {
494
+ }
495
+ export interface PaidTicketDefinitionExistsResponse {
496
+ /** Paid exists. */
497
+ paidExists?: boolean;
498
+ }
499
+ export interface MessageEnvelope {
500
+ /** App instance ID. */
501
+ instanceId?: string | null;
502
+ /** Event type. */
503
+ eventType?: string;
504
+ /** The identification type and identity data. */
505
+ identity?: IdentificationData;
506
+ /** Stringify payload. */
507
+ data?: string;
508
+ }
509
+ export interface IdentificationData extends IdentificationDataIdOneOf {
510
+ /** ID of a site visitor that has not logged in to the site. */
511
+ anonymousVisitorId?: string;
512
+ /** ID of a site visitor that has logged in to the site. */
513
+ memberId?: string;
514
+ /** ID of a Wix user (site owner, contributor, etc.). */
515
+ wixUserId?: string;
516
+ /** ID of an app. */
517
+ appId?: string;
518
+ /** @readonly */
519
+ identityType?: WebhookIdentityType;
520
+ }
521
+ /** @oneof */
522
+ export interface IdentificationDataIdOneOf {
523
+ /** ID of a site visitor that has not logged in to the site. */
524
+ anonymousVisitorId?: string;
525
+ /** ID of a site visitor that has logged in to the site. */
526
+ memberId?: string;
527
+ /** ID of a Wix user (site owner, contributor, etc.). */
528
+ wixUserId?: string;
529
+ /** ID of an app. */
530
+ appId?: string;
531
+ }
532
+ export declare enum WebhookIdentityType {
533
+ UNKNOWN = "UNKNOWN",
534
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
535
+ MEMBER = "MEMBER",
536
+ WIX_USER = "WIX_USER",
537
+ APP = "APP"
538
+ }
539
+ interface MoneyNonNullableFields {
540
+ amount: string;
541
+ currency: string;
542
+ }
543
+ interface DashboardNonNullableFields {
544
+ hidden: boolean;
545
+ sold: number;
546
+ limited: boolean;
547
+ ticketsSold: number;
548
+ ticketsReserved: number;
549
+ }
550
+ interface WixFeeConfigNonNullableFields {
551
+ type: FeeType;
552
+ }
553
+ interface TicketSalePeriodNonNullableFields {
554
+ hideNotOnSale: boolean;
555
+ }
556
+ interface PricingOptionNonNullableFields {
557
+ price?: MoneyNonNullableFields;
558
+ }
559
+ interface PricingOptionsNonNullableFields {
560
+ options: PricingOptionNonNullableFields[];
561
+ }
562
+ interface TicketPricingNonNullableFields {
563
+ fixedPrice?: MoneyNonNullableFields;
564
+ minPrice?: MoneyNonNullableFields;
565
+ pricingOptions?: PricingOptionsNonNullableFields;
566
+ pricingType: Type;
567
+ }
568
+ export interface TicketDefinitionNonNullableFields {
569
+ _id: string;
570
+ price?: MoneyNonNullableFields;
571
+ free: boolean;
572
+ name: string;
573
+ description: string;
574
+ limitPerCheckout: number;
575
+ orderIndex: number;
576
+ policy: string;
577
+ dashboard?: DashboardNonNullableFields;
578
+ eventId: string;
579
+ wixFeeConfig?: WixFeeConfigNonNullableFields;
580
+ salePeriod?: TicketSalePeriodNonNullableFields;
581
+ saleStatus: TicketSaleStatus;
582
+ state: TicketDefinitionStateEnumState[];
583
+ pricing?: TicketPricingNonNullableFields;
584
+ }
585
+ export interface QueryTicketDefinitionsResponseNonNullableFields {
586
+ total: number;
587
+ offset: number;
588
+ limit: number;
589
+ definitions: TicketDefinitionNonNullableFields[];
590
+ }
591
+ export interface QueryTicketDefinitionsV2ResponseNonNullableFields {
592
+ definitions: TicketDefinitionNonNullableFields[];
593
+ }
594
+ interface ResponseMetaDataNonNullableFields {
595
+ count: number;
596
+ offset: number;
597
+ total: number;
598
+ }
599
+ export interface ListTicketDefinitionsResponseNonNullableFields {
600
+ metaData?: ResponseMetaDataNonNullableFields;
601
+ definitions: TicketDefinitionNonNullableFields[];
602
+ }
603
+ export interface GetTicketDefinitionResponseNonNullableFields {
604
+ definition?: TicketDefinitionNonNullableFields;
605
+ }
606
+ export interface CreateTicketDefinitionResponseNonNullableFields {
607
+ definition?: TicketDefinitionNonNullableFields;
608
+ }
609
+ export interface UpdateTicketDefinitionResponseNonNullableFields {
610
+ definition?: TicketDefinitionNonNullableFields;
611
+ }
612
+ export interface BaseEventMetadata {
613
+ /** App instance ID. */
614
+ instanceId?: string | null;
615
+ /** Event type. */
616
+ eventType?: string;
617
+ /** The identification type and identity data. */
618
+ identity?: IdentificationData;
619
+ }
620
+ export interface TicketDefinitionCreatedEnvelope {
621
+ data: TicketDefinitionCreated;
622
+ metadata: BaseEventMetadata;
623
+ }
624
+ /** @permissionScope Manage Events - all permissions
625
+ * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS
626
+ * @permissionScope Manage Orders
627
+ * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-ORDERS
628
+ * @permissionScope Manage Ticket Definitions
629
+ * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-TICKET-DEF
630
+ * @permissionId WIX_EVENTS.READ_TICKET_DEFINITIONS
631
+ * @webhook
632
+ * @eventType wix.events.ticketing.events.TicketDefinitionCreated
633
+ */
634
+ export declare function onTicketDefinitionCreated(handler: (event: TicketDefinitionCreatedEnvelope) => void | Promise<void>): void;
635
+ export interface TicketDefinitionDeletedEnvelope {
636
+ data: TicketDefinitionDeleted;
637
+ metadata: BaseEventMetadata;
638
+ }
639
+ /** @permissionScope Manage Events - all permissions
640
+ * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS
641
+ * @permissionScope Manage Orders
642
+ * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-ORDERS
643
+ * @permissionScope Manage Ticket Definitions
644
+ * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-TICKET-DEF
645
+ * @permissionId WIX_EVENTS.READ_TICKET_DEFINITIONS
646
+ * @webhook
647
+ * @eventType wix.events.ticketing.events.TicketDefinitionDeleted
648
+ */
649
+ export declare function onTicketDefinitionDeleted(handler: (event: TicketDefinitionDeletedEnvelope) => void | Promise<void>): void;
650
+ export interface TicketDefinitionUpdatedEnvelope {
651
+ data: TicketDefinitionUpdated;
652
+ metadata: BaseEventMetadata;
653
+ }
654
+ /** @permissionScope Manage Events - all permissions
655
+ * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS
656
+ * @permissionScope Manage Orders
657
+ * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-ORDERS
658
+ * @permissionScope Manage Ticket Definitions
659
+ * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-TICKET-DEF
660
+ * @permissionId WIX_EVENTS.READ_TICKET_DEFINITIONS
661
+ * @webhook
662
+ * @eventType wix.events.ticketing.events.TicketDefinitionUpdated
663
+ */
664
+ export declare function onTicketDefinitionUpdated(handler: (event: TicketDefinitionUpdatedEnvelope) => void | Promise<void>): void;
665
+ /**
666
+ * **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.
667
+ * >**Migration Instructions**.
668
+ * > 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).
669
+ * > To migrate to the new function:
670
+ * > 1. Add the new import statement:
671
+ * > ```js
672
+ * > import { ticketDefinitionsV2 } from 'wix-events.v2';
673
+ * > ```
674
+ * > 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.
675
+ * > 3. Test your changes to make sure your code behaves as expected.
676
+ *
677
+ * Retrieves a list of up to 100 ticket definitions.
678
+ * @public
679
+ * @permissionId WIX_EVENTS.READ_TICKET_DEFINITIONS
680
+ * @permissionScope Manage Events - all permissions
681
+ * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS
682
+ * @permissionScope Manage Orders
683
+ * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-ORDERS
684
+ * @permissionScope Manage Ticket Definitions
685
+ * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-TICKET-DEF
686
+ * @applicableIdentity APP
687
+ * @fqn wix.events.ticketing.TicketDefinitionManagement.QueryTicketDefinitions
688
+ */
689
+ export declare function queryTicketDefinitions(options?: QueryTicketDefinitionsOptions): Promise<QueryTicketDefinitionsResponse & QueryTicketDefinitionsResponseNonNullableFields>;
690
+ export interface QueryTicketDefinitionsOptions {
691
+ /** Offset. See [Pagination](https://dev.wix.com/api/rest/getting-started/pagination). */
692
+ offset?: number;
693
+ /** Limit. See [Pagination](https://dev.wix.com/api/rest/getting-started/pagination). */
694
+ limit?: number;
695
+ /** 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). */
696
+ fieldset?: TicketDefinitionFieldset[];
697
+ /** 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). */
698
+ filter?: Record<string, any> | null;
699
+ /**
700
+ * Sort order. Defaults to: "created:asc".
701
+ * 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).
702
+ */
703
+ sort?: string;
704
+ /**
705
+ * Filter facets to include in the response.
706
+ * 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).
707
+ */
708
+ facet?: string[];
709
+ }
710
+ /**
711
+ * **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).
712
+ * >**Migration Instructions**.
713
+ * > 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).
714
+ * > To migrate to the new function:
715
+ * > 1. Add the new import statement:
716
+ * > ```js
717
+ * > import { ticketDefinitionsV2 } from 'wix-events.v2';
718
+ * > ```
719
+ * > 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.
720
+ * > 3. Test your changes to make sure your code behaves as expected.
721
+ *
722
+ * Retrieves a list of up to 1,000 ticket definitions, given the provided paging and filtering.
723
+ * @public
724
+ * @documentationMaturity preview
725
+ * @permissionScope Manage Events - all permissions
726
+ * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS
727
+ * @permissionScope Manage Orders
728
+ * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-ORDERS
729
+ * @permissionScope Manage Ticket Definitions
730
+ * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-TICKET-DEF
731
+ * @permissionId WIX_EVENTS.READ_TICKET_DEFINITIONS
732
+ * @applicableIdentity APP
733
+ * @fqn wix.events.ticketing.TicketDefinitionManagement.QueryTicketDefinitionsV2
734
+ */
735
+ export declare function queryTicketDefinitionsV2(options?: QueryTicketDefinitionsV2Options): DefinitionsQueryBuilder;
736
+ export interface QueryTicketDefinitionsV2Options {
737
+ }
738
+ interface QueryCursorResult {
739
+ cursors: Cursors;
740
+ hasNext: () => boolean;
741
+ hasPrev: () => boolean;
742
+ length: number;
743
+ pageSize: number;
744
+ }
745
+ export interface DefinitionsQueryResult extends QueryCursorResult {
746
+ items: TicketDefinition[];
747
+ query: DefinitionsQueryBuilder;
748
+ next: () => Promise<DefinitionsQueryResult>;
749
+ prev: () => Promise<DefinitionsQueryResult>;
750
+ }
751
+ export interface DefinitionsQueryBuilder {
752
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
753
+ * @documentationMaturity preview
754
+ */
755
+ limit: (limit: number) => DefinitionsQueryBuilder;
756
+ /** @param cursor - A pointer to specific record
757
+ * @documentationMaturity preview
758
+ */
759
+ skipTo: (cursor: string) => DefinitionsQueryBuilder;
760
+ /** @documentationMaturity preview */
761
+ find: () => Promise<DefinitionsQueryResult>;
762
+ }
763
+ /**
764
+ * **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.
765
+ * >**Migration Instructions**.
766
+ * > 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).
767
+ * > To migrate to the new function:
768
+ * > 1. Add the new import statement:
769
+ * > ```js
770
+ * > import { ticketDefinitionsV2 } from 'wix-events.v2';
771
+ * > ```
772
+ * > 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.
773
+ * > 3. Test your changes to make sure your code behaves as expected.
774
+ *
775
+ * Retrieves a list of up to 100 ticket definitions, with basic filter support.
776
+ * @public
777
+ * @param options - Details for the tickets to retrieve.
778
+ * @permissionId WIX_EVENTS.READ_TICKET_DEFINITIONS
779
+ * @permissionScope Manage Events - all permissions
780
+ * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS
781
+ * @permissionScope Manage Orders
782
+ * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-ORDERS
783
+ * @permissionScope Manage Ticket Definitions
784
+ * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-TICKET-DEF
785
+ * @applicableIdentity APP
786
+ * @fqn wix.events.ticketing.TicketDefinitionManagement.ListTicketDefinitions
787
+ */
788
+ export declare function listTicketDefinitions(options?: ListTicketDefinitionsOptions): Promise<ListTicketDefinitionsResponse & ListTicketDefinitionsResponseNonNullableFields>;
789
+ export interface ListTicketDefinitionsOptions {
790
+ /** Event ID. */
791
+ eventId?: string[];
792
+ /** Offset. */
793
+ offset?: number;
794
+ /** Paging limit. */
795
+ limit?: number;
796
+ /**
797
+ * Predefined sets of fields to return.
798
+ * - `DASHBOARD`: Returns `dashboard`.
799
+ * - `POLICY`: Returns `policy`.
800
+ *
801
+ * Default: If `fieldset` is omitted from the request, `id`, `price`, `free`, `name`, `limitPerCheckout`, `orderIndex`, `eventId`.
802
+ */
803
+ fieldset?: TicketDefinitionFieldset[];
804
+ /** Event creator ID. */
805
+ eventCreatorId?: string[];
806
+ /**
807
+ * Filter by ticket definition state.
808
+ *
809
+ * Supported values: `"VISIBLE"`, `"HIDDEN"`, `"FREE"`, `"PAID"`
810
+ */
811
+ state?: State[];
812
+ /**
813
+ * Sort order.
814
+ *
815
+ * Default: `"created"`:`"asc"`.
816
+ *
817
+ * See [Ticket Definitions Sort](/wix-events-v2/ticketdefinitions/ticket-definitions-sort) for more information.
818
+ *
819
+ *
820
+ *
821
+ *
822
+ */
823
+ sort?: string;
824
+ /**
825
+ * Ticket sale status.
826
+ *
827
+ * Supported values: `"SALE_SCHEDULED"`, `"SALE_STARTED"`, `"SALE_ENDED"`
828
+ */
829
+ saleStatus?: TicketSaleStatus[];
830
+ /** Filter facets. */
831
+ facet?: string[];
832
+ }
833
+ /**
834
+ * **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.
835
+ * >**Migration Instructions**.
836
+ * > 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).
837
+ * > To migrate to the new function:
838
+ * > 1. Add the new import statement:
839
+ * > ```js
840
+ * > import { ticketDefinitionsV2 } from 'wix-events.v2';
841
+ * > ```
842
+ * > 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.
843
+ * > 3. Test your changes to make sure your code behaves as expected.
844
+ *
845
+ * Retrieves a ticket definition.
846
+ * @param definitionId - Ticket definition ID.
847
+ * @public
848
+ * @requiredField definitionId
849
+ * @param options - Details for the ticket to retrieve.
850
+ * @permissionId WIX_EVENTS.READ_TICKET_DEFINITIONS
851
+ * @permissionScope Manage Events - all permissions
852
+ * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS
853
+ * @permissionScope Manage Orders
854
+ * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-ORDERS
855
+ * @permissionScope Manage Ticket Definitions
856
+ * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-TICKET-DEF
857
+ * @applicableIdentity APP
858
+ * @returns Retrieved ticket definition.
859
+ * @fqn wix.events.ticketing.TicketDefinitionManagement.GetTicketDefinition
860
+ */
861
+ export declare function getTicketDefinition(definitionId: string, options?: GetTicketDefinitionOptions): Promise<TicketDefinition & TicketDefinitionNonNullableFields>;
862
+ export interface GetTicketDefinitionOptions {
863
+ /**
864
+ * Predefined sets of fields to return.
865
+ * - `DASHBOARD`: Returns `dashboard`.
866
+ * - `POLICY`: Returns `policy`.
867
+ *
868
+ * Default: If `fieldset` is omitted from the request, `id`, `price`, `free`, `name`, `limitPerCheckout`, `orderIndex`, `eventId`.
869
+ */
870
+ fieldset?: TicketDefinitionFieldset[];
871
+ }
872
+ /**
873
+ * **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.
874
+ * >**Migration Instructions**.
875
+ * > 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).
876
+ * > To migrate to the new function:
877
+ * > 1. Add the new import statement:
878
+ * > ```js
879
+ * > import { ticketDefinitionsV2 } from 'wix-events.v2';
880
+ * > ```
881
+ * > 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.
882
+ * > 3. Test your changes to make sure your code behaves as expected.
883
+ *
884
+ * Creates a ticket definition (and enables ticket sales).
885
+ * @param eventId - Event ID.
886
+ * @public
887
+ * @requiredField eventId
888
+ * @requiredField options
889
+ * @requiredField options.definition
890
+ * @requiredField options.definition.name
891
+ * @permissionId WIX_EVENTS.MANAGE_TICKET_DEFINITIONS
892
+ * @permissionScope Manage Events - all permissions
893
+ * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS
894
+ * @permissionScope Manage Ticket Definitions
895
+ * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-TICKET-DEF
896
+ * @applicableIdentity APP
897
+ * @fqn wix.events.ticketing.TicketDefinitionManagement.CreateTicketDefinition
898
+ */
899
+ export declare function createTicketDefinition(eventId: string, options: CreateTicketDefinitionOptions): Promise<CreateTicketDefinitionResponse & CreateTicketDefinitionResponseNonNullableFields>;
900
+ export interface CreateTicketDefinitionOptions {
901
+ /** Ticket definition data. */
902
+ definition: TicketDefinitionData;
903
+ }
904
+ /**
905
+ * **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.
906
+ * >**Migration Instructions**.
907
+ * > 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).
908
+ * > To migrate to the new function:
909
+ * > 1. Add the new import statement:
910
+ * > ```js
911
+ * > import { ticketDefinitionsV2 } from 'wix-events.v2';
912
+ * > ```
913
+ * > 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.
914
+ * > 3. Test your changes to make sure your code behaves as expected.
915
+ *
916
+ *
917
+ * Updates a ticket definition.
918
+ *
919
+ * See [Partial Updates](/wix-events-v2/partial-updates) for more information.
920
+ * @param definitionId - Ticket definition ID.
921
+ * @param eventId - Event ID.
922
+ * @public
923
+ * @requiredField definitionId
924
+ * @requiredField eventId
925
+ * @requiredField options.definition.pricing
926
+ * @param identifiers - Details of the ticket definition to update.
927
+ * @param options - Ticket definition details to update.
928
+ * @permissionId WIX_EVENTS.MANAGE_TICKET_DEFINITIONS
929
+ * @permissionScope Manage Events - all permissions
930
+ * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS
931
+ * @permissionScope Manage Ticket Definitions
932
+ * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-TICKET-DEF
933
+ * @applicableIdentity APP
934
+ * @fqn wix.events.ticketing.TicketDefinitionManagement.UpdateTicketDefinition
935
+ */
936
+ export declare function updateTicketDefinition(definitionId: string, eventId: string, options?: UpdateTicketDefinitionOptions): Promise<UpdateTicketDefinitionResponse & UpdateTicketDefinitionResponseNonNullableFields>;
937
+ export interface UpdateTicketDefinitionOptions {
938
+ /** Ticket definition data. */
939
+ definition?: TicketDefinitionData;
940
+ /** Set of field paths, specifying which parts of ticket definition to update. */
941
+ fields?: string[];
942
+ }
943
+ /**
944
+ * **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.
945
+ * >**Migration Instructions**.
946
+ * > 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).
947
+ * > To migrate to the new function:
948
+ * > 1. Add the new import statement:
949
+ * > ```js
950
+ * > import { ticketDefinitionsV2 } from 'wix-events.v2';
951
+ * > ```
952
+ * > 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.
953
+ * > 3. Test your changes to make sure your code behaves as expected.
954
+ *
955
+ * Deletes a ticket definition.
956
+ * @param eventId - Event ID.
957
+ * @public
958
+ * @requiredField eventId
959
+ * @param options - Details of tickets to delete.
960
+ * @permissionId WIX_EVENTS.MANAGE_TICKET_DEFINITIONS
961
+ * @permissionScope Manage Events - all permissions
962
+ * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS
963
+ * @permissionScope Manage Ticket Definitions
964
+ * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-TICKET-DEF
965
+ * @applicableIdentity APP
966
+ * @fqn wix.events.ticketing.TicketDefinitionManagement.DeleteTicketDefinition
967
+ */
968
+ export declare function deleteTicketDefinition(eventId: string, options?: DeleteTicketDefinitionOptions): Promise<void>;
969
+ export interface DeleteTicketDefinitionOptions extends DeleteTicketDefinitionRequestDeleteOneOf {
970
+ /** Ticket definitions to delete. */
971
+ byId?: ById;
972
+ /** Whether to delete all event tickets. */
973
+ all?: boolean;
974
+ }
975
+ /**
976
+ * **Deprecated.** This function will continue to work until November 8, 2024, but a newer version is available at [`changeCurrency()`](/ticket-definitions-v2/change-currency).
977
+ * >**Migration Instructions**.
978
+ * > 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).
979
+ * > To migrate to the new function:
980
+ * > 1. Add the new import statement:
981
+ * > ```js
982
+ * > import { ticketDefinitionsV2 } from 'wix-events.v2';
983
+ * > ```
984
+ * > 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.
985
+ * > 3. Test your changes to make sure your code behaves as expected.
986
+ *
987
+ * Changes the currency for all tickets per event.
988
+ *
989
+ * @public
990
+ * @requiredField options.currency
991
+ * @permissionId WIX_EVENTS.MANAGE_TICKET_DEFINITIONS
992
+ * @permissionScope Manage Events - all permissions
993
+ * @permissionScopeId SCOPE.DC-EVENTS-MEGA.MANAGE-EVENTS
994
+ * @permissionScope Manage Ticket Definitions
995
+ * @permissionScopeId SCOPE.DC-EVENTS.MANAGE-TICKET-DEF
996
+ * @applicableIdentity APP
997
+ * @fqn wix.events.ticketing.TicketDefinitionManagement.ChangeCurrency
998
+ */
999
+ export declare function changeCurrency(options?: ChangeCurrencyOptions): Promise<void>;
1000
+ export interface ChangeCurrencyOptions {
1001
+ /** Event ID. */
1002
+ eventId?: string;
1003
+ /** Event currency, in 3-letter [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. */
1004
+ currency: string;
1005
+ }
1006
+ export {};