@meaple-com/types 1.0.2 → 1.0.4

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.
package/dist/index.d.mts CHANGED
@@ -17,8 +17,8 @@ type AddressProps = {
17
17
  type CategoryProps = {
18
18
  id: string;
19
19
  name: string;
20
- description: string | null;
21
- iconUrl: string | null;
20
+ description: string;
21
+ iconUrl: string;
22
22
  };
23
23
 
24
24
  type FileProps = {
@@ -42,6 +42,22 @@ type ChannelProps = {
42
42
  eventsCount?: number;
43
43
  };
44
44
 
45
+ type TagProps = {
46
+ id: string;
47
+ name: string;
48
+ displayName: string;
49
+ description: string | null;
50
+ emoji: string | null;
51
+ parentId: string | null;
52
+ parent?: {
53
+ id: string;
54
+ name: string;
55
+ description: string | null;
56
+ emoji: string | null;
57
+ } | null;
58
+ children?: TagProps[];
59
+ };
60
+
45
61
  type EventContact = {
46
62
  email?: string;
47
63
  phoneNumber?: string;
@@ -53,50 +69,39 @@ type ExternalAnalyticsProps = {
53
69
  value: string;
54
70
  };
55
71
 
56
- type EventStatus = 'PUBLISHED' | 'PRIVATE' | 'HIDDEN' | 'DRAFT';
57
-
58
- type EventChildProps = {
59
- id: string;
60
- name: string;
61
- startsAt: string;
62
- timezone: string;
63
- isSeatAssigned: boolean;
64
- };
65
-
66
- type EventTagProps = {
67
- id: string;
68
- name: string;
69
- description: string | null;
70
- emoji: string | null;
71
- parentId: string | null;
72
- };
72
+ type EventType = 'DRAFT' | 'PUBLISHED' | 'PRIVATE';
73
73
 
74
74
  type EventProps = {
75
75
  id: string;
76
76
  slug: string;
77
- channelId?: string;
77
+ channelId: string;
78
78
  name: string;
79
- description: string | null;
80
- status: EventStatus;
81
- createdAt?: string;
79
+ isSeatAssigned: boolean;
80
+ description: Record<string, any>[];
81
+ status: EventType;
82
+ createdAt: string;
82
83
  startsAt: string;
83
- endsAt: string | null;
84
- presaleStartsAt: string | null;
84
+ endsAt: string;
85
+ opensAt?: string | null;
86
+ presaleStartsAt?: string | null;
85
87
  timezone: string;
86
88
  canceledAt: string | null;
87
- legalAgeRequired?: number | null;
88
- isSeatAssigned?: boolean;
89
- image: FileProps | null;
90
- address: AddressProps | null;
89
+ address?: AddressProps | null;
90
+ image: FileProps;
91
+ legalAgeRequired: boolean;
92
+ contact?: EventContact;
93
+ categories: CategoryProps[];
94
+ tags: TagProps[];
95
+ hasTicketInsurance: boolean;
91
96
  channel: Pick<
92
97
  ChannelProps,
93
- 'id' | 'name' | 'slug' | 'avatar' | 'eventsCount'
98
+ 'id' | 'name' | 'avatar' | 'slug' | 'eventsCount'
94
99
  >;
95
- categories: CategoryProps[];
96
- tags?: EventTagProps[];
97
- contact?: EventContact | null;
98
- externalAnalytics?: ExternalAnalyticsProps[] | null;
99
- children?: EventChildProps[];
100
+ externalAnalytics: ExternalAnalyticsProps[] | null;
101
+ children: Pick<
102
+ EventProps,
103
+ 'id' | 'startsAt' | 'timezone' | 'isSeatAssigned'
104
+ >[];
100
105
  };
101
106
 
102
107
  type GetChannelEventProps = {
@@ -132,14 +137,45 @@ type CreateEventReminderProps = {
132
137
  email: string;
133
138
  };
134
139
 
140
+ type ChartCategoryProps = {
141
+ id: string;
142
+ name: string;
143
+ };
144
+
135
145
  type GaugeProps = {
136
146
  totalAmount: number;
137
147
  usedAmount: number;
138
148
  };
139
149
 
140
- type ChartCategoryProps = {
150
+ type GroupProps = {
141
151
  id: string;
142
152
  name: string;
153
+ description?: string;
154
+ scanStartsAt?: string | null;
155
+ scanEndsAt?: string | null;
156
+ tickets: TicketProps[];
157
+ gauge: Pick<GaugeProps, 'totalAmount' | 'usedAmount'> | null;
158
+ defaultOpen: boolean;
159
+ orderAt: number;
160
+ maxBuyAmount?: number;
161
+ };
162
+
163
+ type TicketCustomFieldType =
164
+ | 'TEXT'
165
+ | 'NUMBER'
166
+ | 'BOOLEAN'
167
+ | 'DATE'
168
+ | 'SELECT'
169
+ | 'MULTI_SELECT'
170
+ | 'FILE';
171
+
172
+ type TicketCustomField = {
173
+ id: string;
174
+ name: string;
175
+ defaultValue?: string;
176
+ isRequired: boolean;
177
+ options?: string[];
178
+ type: TicketCustomFieldType;
143
179
  };
144
180
 
145
181
  type TicketVisibility = 'PUBLIC' | 'PRIVATE' | 'DRAFT';
@@ -172,37 +208,21 @@ type TicketProps = {
172
208
  predecessor?: Pick<TicketProps, 'id' | 'name' | 'group'>;
173
209
  expireBehavior?: 'VISIBLE' | 'HIDDEN';
174
210
  orderAt: number;
175
- };
176
-
177
- type GroupProps = {
178
- id: string;
179
- name: string;
180
- description?: string;
181
- scanStartsAt?: string | null;
182
- scanEndsAt?: string | null;
183
- tickets: TicketProps[];
184
- gauge: Pick<GaugeProps, 'totalAmount' | 'usedAmount'> | null;
185
- defaultOpen: boolean;
186
- orderAt: number;
187
- maxBuyAmount?: number;
188
- };
189
-
190
- type EventProductProps = {
191
- id: string;
192
- maxBuyAmount?: number;
211
+ customFields?: TicketCustomField[];
193
212
  };
194
213
 
195
214
  type FindEventProductsProps = {
196
- event: EventProductProps;
215
+ event: Pick<
216
+ EventProps,
217
+ 'id',
218
+ 'endsAt',
219
+ 'presaleStartsAt',
220
+ 'maxBuyAmount',
221
+ 'gauge'
222
+ >;
197
223
  products: TicketProps[];
198
224
  };
199
225
 
200
- type FindEventTicketsProps = {
201
- event: EventProductProps;
202
- tickets: TicketProps[];
203
- groups: GroupProps[];
204
- };
205
-
206
226
  type FindEventsProps = {
207
227
  events: EventProps[];
208
228
  cursor?: string;
@@ -219,6 +239,19 @@ type FindEventsParams = {
219
239
  categoryIds?: string[];
220
240
  };
221
241
 
242
+ type FindEventTicketsProps = {
243
+ event: Pick<
244
+ EventProps,
245
+ 'id',
246
+ 'startsAt',
247
+ 'endsAt',
248
+ 'presaleStartsAt',
249
+ 'maxBuyAmount'
250
+ >;
251
+ tickets: TicketProps[];
252
+ groups: GroupProps[];
253
+ };
254
+
222
255
  type BuyerProps = {
223
256
  name: string;
224
257
  email: string;
@@ -327,7 +360,14 @@ type UserTicketProps = {
327
360
 
328
361
  type OrderItemTicketProps = Pick<
329
362
  TicketProps,
330
- 'id' | 'type' | 'name' | 'image' | 'price' | 'nominable' | 'beginsAt'
363
+ | 'id'
364
+ | 'type'
365
+ | 'name'
366
+ | 'image'
367
+ | 'price'
368
+ | 'nominable'
369
+ | 'beginsAt'
370
+ | 'event'
331
371
  > & {
332
372
  group: Pick<GroupProps, 'id' | 'name'> | null;
333
373
  };
@@ -404,11 +444,6 @@ type GetOrderProps = {
404
444
  paymentIntent?: PaymentIntentProps;
405
445
  };
406
446
 
407
- type GetPlatformFeeProps = {
408
- channelId?: string;
409
- eventId?: string;
410
- };
411
-
412
447
  type BaseFeeProps = {
413
448
  fee: number;
414
449
  minFeeAmount: number;
@@ -510,4 +545,4 @@ type FindUserEventTicketsProps = {
510
545
  userTickets: UserTicketProps[];
511
546
  };
512
547
 
513
- export type { AddressProps, BuyerProps, CategoryProps, ChannelProps, ChartCategoryProps, CheckCouponProps, CouponProps, CouponsListProps, CreateEventReminderProps, CreateOrderProps, CreateOrderTicketProps, CreateTicketFileProps, CreateUserProps, CreatedOrderProps, EventContact, EventProductProps, EventProps, ExternalAnalyticsProps, FileProps, FindEventProductsProps, FindEventTicketsProps, FindEventsParams, FindEventsProps, FindUserEventTicketsProps, GaugeProps, GetChannelEventProps, GetChannelEventsProps, GetOrderProps, GetPlatformFeeProps, GetUserEventsProps, GetUserOrdersProps, GroupProps, NominationProps, OrderItemProps, OrderItemTicketProps, OrderProps, PaymentIntentProps, PlatformFeeProps, TicketFileOutput, TicketProps, TransferTicketProps, TransferTicketRecipientProps, UpdateUserEmailProps, UpdateUserPasswordProps, UpdateUserProps, UpdateUserTicketProps, UserOrderItemProps, UserOrderProps, UserProps, UserTicketProps };
548
+ export type { AddressProps, BuyerProps, CategoryProps, ChannelProps, ChartCategoryProps, CheckCouponProps, CouponProps, CouponsListProps, CreateEventReminderProps, CreateOrderProps, CreateOrderTicketProps, CreateTicketFileProps, CreateUserProps, CreatedOrderProps, EventContact, EventProps, ExternalAnalyticsProps, FileProps, FindEventProductsProps, FindEventTicketsProps, FindEventsParams, FindEventsProps, FindUserEventTicketsProps, GaugeProps, GetChannelEventProps, GetChannelEventsProps, GetOrderProps, GetUserEventsProps, GetUserOrdersProps, GroupProps, NominationProps, OrderItemProps, OrderItemTicketProps, OrderProps, PaymentIntentProps, PlatformFeeProps, TagProps, TicketCustomField, TicketCustomFieldType, TicketFileOutput, TicketProps, TransferTicketProps, TransferTicketRecipientProps, UpdateUserEmailProps, UpdateUserPasswordProps, UpdateUserProps, UpdateUserTicketProps, UserOrderItemProps, UserOrderProps, UserProps, UserTicketProps };
package/dist/index.d.ts CHANGED
@@ -17,8 +17,8 @@ type AddressProps = {
17
17
  type CategoryProps = {
18
18
  id: string;
19
19
  name: string;
20
- description: string | null;
21
- iconUrl: string | null;
20
+ description: string;
21
+ iconUrl: string;
22
22
  };
23
23
 
24
24
  type FileProps = {
@@ -42,6 +42,22 @@ type ChannelProps = {
42
42
  eventsCount?: number;
43
43
  };
44
44
 
45
+ type TagProps = {
46
+ id: string;
47
+ name: string;
48
+ displayName: string;
49
+ description: string | null;
50
+ emoji: string | null;
51
+ parentId: string | null;
52
+ parent?: {
53
+ id: string;
54
+ name: string;
55
+ description: string | null;
56
+ emoji: string | null;
57
+ } | null;
58
+ children?: TagProps[];
59
+ };
60
+
45
61
  type EventContact = {
46
62
  email?: string;
47
63
  phoneNumber?: string;
@@ -53,50 +69,39 @@ type ExternalAnalyticsProps = {
53
69
  value: string;
54
70
  };
55
71
 
56
- type EventStatus = 'PUBLISHED' | 'PRIVATE' | 'HIDDEN' | 'DRAFT';
57
-
58
- type EventChildProps = {
59
- id: string;
60
- name: string;
61
- startsAt: string;
62
- timezone: string;
63
- isSeatAssigned: boolean;
64
- };
65
-
66
- type EventTagProps = {
67
- id: string;
68
- name: string;
69
- description: string | null;
70
- emoji: string | null;
71
- parentId: string | null;
72
- };
72
+ type EventType = 'DRAFT' | 'PUBLISHED' | 'PRIVATE';
73
73
 
74
74
  type EventProps = {
75
75
  id: string;
76
76
  slug: string;
77
- channelId?: string;
77
+ channelId: string;
78
78
  name: string;
79
- description: string | null;
80
- status: EventStatus;
81
- createdAt?: string;
79
+ isSeatAssigned: boolean;
80
+ description: Record<string, any>[];
81
+ status: EventType;
82
+ createdAt: string;
82
83
  startsAt: string;
83
- endsAt: string | null;
84
- presaleStartsAt: string | null;
84
+ endsAt: string;
85
+ opensAt?: string | null;
86
+ presaleStartsAt?: string | null;
85
87
  timezone: string;
86
88
  canceledAt: string | null;
87
- legalAgeRequired?: number | null;
88
- isSeatAssigned?: boolean;
89
- image: FileProps | null;
90
- address: AddressProps | null;
89
+ address?: AddressProps | null;
90
+ image: FileProps;
91
+ legalAgeRequired: boolean;
92
+ contact?: EventContact;
93
+ categories: CategoryProps[];
94
+ tags: TagProps[];
95
+ hasTicketInsurance: boolean;
91
96
  channel: Pick<
92
97
  ChannelProps,
93
- 'id' | 'name' | 'slug' | 'avatar' | 'eventsCount'
98
+ 'id' | 'name' | 'avatar' | 'slug' | 'eventsCount'
94
99
  >;
95
- categories: CategoryProps[];
96
- tags?: EventTagProps[];
97
- contact?: EventContact | null;
98
- externalAnalytics?: ExternalAnalyticsProps[] | null;
99
- children?: EventChildProps[];
100
+ externalAnalytics: ExternalAnalyticsProps[] | null;
101
+ children: Pick<
102
+ EventProps,
103
+ 'id' | 'startsAt' | 'timezone' | 'isSeatAssigned'
104
+ >[];
100
105
  };
101
106
 
102
107
  type GetChannelEventProps = {
@@ -132,14 +137,45 @@ type CreateEventReminderProps = {
132
137
  email: string;
133
138
  };
134
139
 
140
+ type ChartCategoryProps = {
141
+ id: string;
142
+ name: string;
143
+ };
144
+
135
145
  type GaugeProps = {
136
146
  totalAmount: number;
137
147
  usedAmount: number;
138
148
  };
139
149
 
140
- type ChartCategoryProps = {
150
+ type GroupProps = {
141
151
  id: string;
142
152
  name: string;
153
+ description?: string;
154
+ scanStartsAt?: string | null;
155
+ scanEndsAt?: string | null;
156
+ tickets: TicketProps[];
157
+ gauge: Pick<GaugeProps, 'totalAmount' | 'usedAmount'> | null;
158
+ defaultOpen: boolean;
159
+ orderAt: number;
160
+ maxBuyAmount?: number;
161
+ };
162
+
163
+ type TicketCustomFieldType =
164
+ | 'TEXT'
165
+ | 'NUMBER'
166
+ | 'BOOLEAN'
167
+ | 'DATE'
168
+ | 'SELECT'
169
+ | 'MULTI_SELECT'
170
+ | 'FILE';
171
+
172
+ type TicketCustomField = {
173
+ id: string;
174
+ name: string;
175
+ defaultValue?: string;
176
+ isRequired: boolean;
177
+ options?: string[];
178
+ type: TicketCustomFieldType;
143
179
  };
144
180
 
145
181
  type TicketVisibility = 'PUBLIC' | 'PRIVATE' | 'DRAFT';
@@ -172,37 +208,21 @@ type TicketProps = {
172
208
  predecessor?: Pick<TicketProps, 'id' | 'name' | 'group'>;
173
209
  expireBehavior?: 'VISIBLE' | 'HIDDEN';
174
210
  orderAt: number;
175
- };
176
-
177
- type GroupProps = {
178
- id: string;
179
- name: string;
180
- description?: string;
181
- scanStartsAt?: string | null;
182
- scanEndsAt?: string | null;
183
- tickets: TicketProps[];
184
- gauge: Pick<GaugeProps, 'totalAmount' | 'usedAmount'> | null;
185
- defaultOpen: boolean;
186
- orderAt: number;
187
- maxBuyAmount?: number;
188
- };
189
-
190
- type EventProductProps = {
191
- id: string;
192
- maxBuyAmount?: number;
211
+ customFields?: TicketCustomField[];
193
212
  };
194
213
 
195
214
  type FindEventProductsProps = {
196
- event: EventProductProps;
215
+ event: Pick<
216
+ EventProps,
217
+ 'id',
218
+ 'endsAt',
219
+ 'presaleStartsAt',
220
+ 'maxBuyAmount',
221
+ 'gauge'
222
+ >;
197
223
  products: TicketProps[];
198
224
  };
199
225
 
200
- type FindEventTicketsProps = {
201
- event: EventProductProps;
202
- tickets: TicketProps[];
203
- groups: GroupProps[];
204
- };
205
-
206
226
  type FindEventsProps = {
207
227
  events: EventProps[];
208
228
  cursor?: string;
@@ -219,6 +239,19 @@ type FindEventsParams = {
219
239
  categoryIds?: string[];
220
240
  };
221
241
 
242
+ type FindEventTicketsProps = {
243
+ event: Pick<
244
+ EventProps,
245
+ 'id',
246
+ 'startsAt',
247
+ 'endsAt',
248
+ 'presaleStartsAt',
249
+ 'maxBuyAmount'
250
+ >;
251
+ tickets: TicketProps[];
252
+ groups: GroupProps[];
253
+ };
254
+
222
255
  type BuyerProps = {
223
256
  name: string;
224
257
  email: string;
@@ -327,7 +360,14 @@ type UserTicketProps = {
327
360
 
328
361
  type OrderItemTicketProps = Pick<
329
362
  TicketProps,
330
- 'id' | 'type' | 'name' | 'image' | 'price' | 'nominable' | 'beginsAt'
363
+ | 'id'
364
+ | 'type'
365
+ | 'name'
366
+ | 'image'
367
+ | 'price'
368
+ | 'nominable'
369
+ | 'beginsAt'
370
+ | 'event'
331
371
  > & {
332
372
  group: Pick<GroupProps, 'id' | 'name'> | null;
333
373
  };
@@ -404,11 +444,6 @@ type GetOrderProps = {
404
444
  paymentIntent?: PaymentIntentProps;
405
445
  };
406
446
 
407
- type GetPlatformFeeProps = {
408
- channelId?: string;
409
- eventId?: string;
410
- };
411
-
412
447
  type BaseFeeProps = {
413
448
  fee: number;
414
449
  minFeeAmount: number;
@@ -510,4 +545,4 @@ type FindUserEventTicketsProps = {
510
545
  userTickets: UserTicketProps[];
511
546
  };
512
547
 
513
- export type { AddressProps, BuyerProps, CategoryProps, ChannelProps, ChartCategoryProps, CheckCouponProps, CouponProps, CouponsListProps, CreateEventReminderProps, CreateOrderProps, CreateOrderTicketProps, CreateTicketFileProps, CreateUserProps, CreatedOrderProps, EventContact, EventProductProps, EventProps, ExternalAnalyticsProps, FileProps, FindEventProductsProps, FindEventTicketsProps, FindEventsParams, FindEventsProps, FindUserEventTicketsProps, GaugeProps, GetChannelEventProps, GetChannelEventsProps, GetOrderProps, GetPlatformFeeProps, GetUserEventsProps, GetUserOrdersProps, GroupProps, NominationProps, OrderItemProps, OrderItemTicketProps, OrderProps, PaymentIntentProps, PlatformFeeProps, TicketFileOutput, TicketProps, TransferTicketProps, TransferTicketRecipientProps, UpdateUserEmailProps, UpdateUserPasswordProps, UpdateUserProps, UpdateUserTicketProps, UserOrderItemProps, UserOrderProps, UserProps, UserTicketProps };
548
+ export type { AddressProps, BuyerProps, CategoryProps, ChannelProps, ChartCategoryProps, CheckCouponProps, CouponProps, CouponsListProps, CreateEventReminderProps, CreateOrderProps, CreateOrderTicketProps, CreateTicketFileProps, CreateUserProps, CreatedOrderProps, EventContact, EventProps, ExternalAnalyticsProps, FileProps, FindEventProductsProps, FindEventTicketsProps, FindEventsParams, FindEventsProps, FindUserEventTicketsProps, GaugeProps, GetChannelEventProps, GetChannelEventsProps, GetOrderProps, GetUserEventsProps, GetUserOrdersProps, GroupProps, NominationProps, OrderItemProps, OrderItemTicketProps, OrderProps, PaymentIntentProps, PlatformFeeProps, TagProps, TicketCustomField, TicketCustomFieldType, TicketFileOutput, TicketProps, TransferTicketProps, TransferTicketRecipientProps, UpdateUserEmailProps, UpdateUserPasswordProps, UpdateUserProps, UpdateUserTicketProps, UserOrderItemProps, UserOrderProps, UserProps, UserTicketProps };
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './dto/address';\nexport * from './dto/category';\nexport * from './dto/channel';\nexport * from './dto/coupon';\nexport * from './dto/event';\nexport * from './dto/file';\nexport * from './dto/gauge';\nexport * from './dto/order';\nexport * from './dto/payment';\nexport * from './dto/ticket';\nexport * from './dto/user';\nexport * from './dto/user-ticket';\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './dto/address';\nexport * from './dto/category';\nexport * from './dto/channel';\nexport * from './dto/coupon';\nexport * from './dto/event';\nexport * from './dto/file';\nexport * from './dto/gauge';\nexport * from './dto/order';\nexport * from './dto/payment';\nexport * from './dto/tag';\nexport * from './dto/ticket';\nexport * from './dto/user';\nexport * from './dto/user-ticket';\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meaple-com/types",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "TypeScript types for Meaple SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",