-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample-models.ts
366 lines (329 loc) · 11 KB
/
example-models.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
export interface Campaign {
readonly id: number;
readonly start?: string;
readonly end?: string;
readonly name?: string;
readonly description?: string;
readonly localizations?: readonly string[];
readonly locale?: string;
readonly created_by?: string;
readonly updated_by?: string;
}
export interface ConnectedAccount {
readonly id: number;
readonly name: string;
readonly stripe_connect_account_id: string;
readonly published_at?: string;
readonly created_by?: string;
readonly updated_by?: string;
}
export interface CrowdednessHistory {
readonly id: number;
readonly place?: string;
readonly crowdedness: 'many_seats_available' | 'few_seats_available' | 'full' | 'unset' | 'closed';
readonly created_by?: string;
readonly updated_by?: string;
}
export interface PaymentMethod {
readonly id: number;
readonly name?: string;
readonly localizations?: readonly string[];
readonly locale?: string;
readonly created_by?: string;
readonly updated_by?: string;
}
export interface PlaceCategory {
readonly id: number;
readonly places?: readonly string[];
readonly name: string;
readonly localizations?: readonly string[];
readonly locale?: string;
readonly created_by?: string;
readonly updated_by?: string;
}
export interface PlaceManager {
readonly id: number;
readonly place?: string;
readonly user?: string;
readonly created_by?: string;
readonly updated_by?: string;
}
export interface Place {
readonly id: number;
readonly category?: string;
readonly photos?: readonly string[];
readonly opening_hours?: readonly DefaultPlaceOpeningHoursPeriodComponent[];
readonly opening_hours_note?: string;
readonly website?: string;
readonly phone_number?: string;
readonly email?: string;
readonly available_payment_methods?: readonly string[];
readonly available_payment_methods_note?: string;
readonly crowdedness_history?: readonly string[];
readonly related_product_groups?: readonly string[];
readonly position?: DefaultPositionComponent;
readonly campaigns?: readonly DefaultPlaceCampaignComponent[];
readonly manager?: string;
readonly label?: string;
readonly name: string;
readonly description?: string;
readonly zipcode?: string;
readonly address?: string;
readonly access?: string;
readonly parking?: string;
readonly ticket_molds?: readonly string[];
readonly localizations?: readonly string[];
readonly locale?: string;
readonly created_by?: string;
readonly updated_by?: string;
}
export interface ProductGroupView {
readonly id: number;
readonly product_groups?: readonly string[];
readonly created_by?: string;
readonly updated_by?: string;
}
export interface ProductGroup {
readonly id: number;
readonly products?: readonly string[];
readonly map_view: unknown;
readonly related_places?: readonly string[];
readonly name: string;
readonly description?: string;
readonly localizations?: readonly string[];
readonly locale?: string;
readonly created_by?: string;
readonly updated_by?: string;
}
export interface ProductTag {
readonly id: number;
readonly name: string;
readonly hidden: boolean;
readonly products?: readonly string[];
readonly localizations?: readonly string[];
readonly locale?: string;
readonly created_by?: string;
readonly updated_by?: string;
}
export interface Product {
readonly id: number;
readonly available_from?: string;
readonly available_to?: string;
readonly ticket_molds?: readonly string[];
readonly pricing_rule: DefaultPriceCalculatorComponent;
readonly name: string;
readonly description?: string;
readonly product_group?: string;
readonly refundable: boolean;
readonly attrs?: readonly DefaultAttributeComponent[];
readonly tags?: readonly string[];
readonly confirmation_required: boolean;
readonly payment_destination?: string;
readonly localizations?: readonly string[];
readonly locale?: string;
readonly created_by?: string;
readonly updated_by?: string;
}
export interface TemplateEnvironment {
readonly id: number;
readonly global?: string;
readonly locale_specific?: string;
readonly localizations?: readonly string[];
readonly locale?: string;
readonly created_by?: string;
readonly updated_by?: string;
}
export interface TicketKind {
readonly id: number;
readonly label: string;
readonly background_image?: string;
readonly created_by?: string;
readonly updated_by?: string;
}
export interface TicketMold {
readonly id: number;
readonly expires_at?: string;
readonly valid_from?: string;
readonly validity_duration?: string;
readonly kind?: string;
readonly name: string;
readonly description: string;
readonly redemption: DefaultTicketRedemptionComponent;
readonly input_specs?: readonly DefaultInputSpecComponent[];
readonly reservation_configuration?: DefaultReservationConfigurationComponent;
readonly attrs?: readonly DefaultAttributeComponent[];
readonly place?: string;
readonly localizations?: readonly string[];
readonly locale?: string;
readonly created_by?: string;
readonly updated_by?: string;
}
export interface CoreStore {
readonly id: number;
readonly key?: string;
readonly value?: string;
readonly type?: string;
readonly environment?: string;
readonly tag?: string;
}
export interface StrapiWebhooks {
readonly id: number;
readonly name?: string;
readonly url?: string;
readonly headers?: unknown;
readonly events?: unknown;
readonly enabled?: boolean;
}
export interface Locale {
readonly id: number;
readonly name?: string;
readonly code?: string;
readonly created_by?: string;
readonly updated_by?: string;
}
export interface File {
readonly id: number;
readonly name: string;
readonly alternativeText?: string;
readonly caption?: string;
readonly width?: number;
readonly height?: number;
readonly formats?: unknown;
readonly hash: string;
readonly ext?: string;
readonly mime: string;
readonly size: number;
readonly url: string;
readonly previewUrl?: string;
readonly provider: string;
readonly provider_metadata?: unknown;
readonly related?: readonly string[];
readonly created_by?: string;
readonly updated_by?: string;
}
export interface Permission {
readonly id: number;
readonly type: string;
readonly controller: string;
readonly action: string;
readonly enabled: boolean;
readonly policy?: string;
readonly role?: string;
readonly created_by?: string;
readonly updated_by?: string;
}
export interface Role {
readonly id: number;
readonly name: string;
readonly description?: string;
readonly type?: string;
readonly permissions?: readonly string[];
readonly users?: readonly string[];
readonly created_by?: string;
readonly updated_by?: string;
}
export interface User {
readonly id: number;
readonly username: string;
readonly email: string;
readonly provider?: string;
readonly password?: string;
readonly resetPasswordToken?: string;
readonly confirmationToken?: string;
readonly confirmed?: boolean;
readonly blocked?: boolean;
readonly role?: string;
readonly created_by?: string;
readonly updated_by?: string;
}
export type Model = Campaign | ConnectedAccount | CrowdednessHistory | PaymentMethod | PlaceCategory | PlaceManager | Place | ProductGroupView | ProductGroup | ProductTag | Product | TemplateEnvironment | TicketKind | TicketMold | CoreStore | StrapiWebhooks | Locale | File | Permission | Role | User;
export interface ModelByName {
readonly 'campaign': Campaign;
readonly 'connected-account': ConnectedAccount;
readonly 'crowdedness-history': CrowdednessHistory;
readonly 'payment-method': PaymentMethod;
readonly 'place-category': PlaceCategory;
readonly 'place-manager': PlaceManager;
readonly 'place': Place;
readonly 'product-group-view': ProductGroupView;
readonly 'product-group': ProductGroup;
readonly 'product-tag': ProductTag;
readonly 'product': Product;
readonly 'template-environment': TemplateEnvironment;
readonly 'ticket-kind': TicketKind;
readonly 'ticket-mold': TicketMold;
readonly 'core_store': CoreStore;
readonly 'strapi_webhooks': StrapiWebhooks;
readonly 'locale': Locale;
readonly 'file': File;
readonly 'permission': Permission;
readonly 'role': Role;
readonly 'user': User;
}
export interface DefaultAttributeComponent {
readonly name: string;
readonly value?: string;
readonly important: boolean;
}
export interface DefaultInputSpecComponent {
readonly type: 'text' | 'number' | 'number_people' | 'date_reservation' | 'repeater';
readonly name: DefaultMultilingualStringComponent;
readonly description?: DefaultMultilingualStringComponent;
readonly key: string;
readonly configuration?: unknown;
}
export interface DefaultMultilingualRichTextComponent {
readonly ja: string;
readonly en?: string;
}
export interface DefaultMultilingualStringComponent {
readonly en?: string;
readonly ja: string;
}
export interface DefaultPlaceCampaignComponent {
readonly campaign?: string;
readonly description?: DefaultMultilingualRichTextComponent;
readonly menu?: readonly DefaultPlaceMenuItemComponent[];
}
export interface DefaultPlaceMenuItemComponent {
readonly price: number;
readonly name_en?: string;
readonly name_ja: string;
}
export interface DefaultPlaceOpeningHoursPeriodComponent {
readonly open: DefaultPlaceOpeningHoursTimeComponent;
readonly close?: DefaultPlaceOpeningHoursTimeComponent;
}
export interface DefaultPlaceOpeningHoursTimeComponent {
readonly day: 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday';
readonly hours: number;
readonly minutes: number;
}
export interface DefaultPositionComponent {
readonly latitude: number;
readonly longitude: number;
}
export interface DefaultPriceCalculatorComponent {
readonly type: 'fixed' | 'fare_classes_with_quantity' | 'tl_lincoln';
readonly configuration?: unknown;
}
export interface DefaultProductOptionComponent {
readonly name: DefaultMultilingualStringComponent;
readonly price: number;
readonly ticket_molds?: readonly string[];
readonly refund_fee: number;
}
export interface DefaultReservationConfigurationComponent {
readonly type: 'tists' | 'reservation_cms_date' | 'tl_lincoln';
readonly configuration?: unknown;
}
export interface DefaultTicketMoldInputComponent {
readonly type: 'text' | 'number' | 'number_people' | 'date_reservation';
readonly name: DefaultMultilingualStringComponent;
readonly key: string;
}
export interface DefaultTicketRedemptionComponent {
readonly type?: 'simple' | 'transportation';
readonly configuration?: unknown;
}
export type Component = DefaultAttributeComponent | DefaultInputSpecComponent | DefaultMultilingualRichTextComponent | DefaultMultilingualStringComponent | DefaultPlaceCampaignComponent | DefaultPlaceMenuItemComponent | DefaultPlaceOpeningHoursPeriodComponent | DefaultPlaceOpeningHoursTimeComponent | DefaultPositionComponent | DefaultPriceCalculatorComponent | DefaultProductOptionComponent | DefaultReservationConfigurationComponent | DefaultTicketMoldInputComponent | DefaultTicketRedemptionComponent;