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