@getmicdrop/venue-calendar 3.2.0 → 3.3.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.
@@ -1,182 +1,182 @@
1
- /**
2
- * MicDrop Public Checkout API
3
- *
4
- * This module provides a complete API layer for the public checkout flow:
5
- * - Order creation and management
6
- * - Payment processing with Stripe
7
- * - Promo code validation
8
- * - Event and venue data fetching
9
- * - Session management
10
- *
11
- * All endpoints are public (no authentication required) and use
12
- * the /api/v2/public base path.
13
- *
14
- * @example
15
- * ```typescript
16
- * import {
17
- * createPaymentIntent,
18
- * validatePromoCode,
19
- * transformOrder,
20
- * } from '@getmicdrop/venue-calendar/api';
21
- *
22
- * // Create payment intent
23
- * const intent = await createPaymentIntent(cartId, { 123: 2 });
24
- *
25
- * // Validate promo code
26
- * const promo = await validatePromoCode(eventId, 'DISCOUNT10');
27
- *
28
- * // Transform order for display
29
- * const order = transformOrder(apiResponse);
30
- * ```
31
- */
32
-
33
- // ============================================================================
34
- // Client Configuration
35
- // ============================================================================
36
-
37
- export {
38
- configureApi,
39
- getApiConfig,
40
- getPublicBaseUrl,
41
- getLegacyPublicUrl,
42
- getOrdersPublicUrl,
43
- getClientIP,
44
- apiGet,
45
- apiPost,
46
- apiPut,
47
- apiDelete,
48
- } from './client.js';
49
-
50
- // ============================================================================
51
- // Orders API
52
- // ============================================================================
53
-
54
- export {
55
- // Payment
56
- createPaymentIntent,
57
- validatePaymentIntent,
58
-
59
- // Order lifecycle
60
- createOrder,
61
- getOrder,
62
- completeReservation,
63
- cancelReservation,
64
-
65
- // Session management
66
- extendCheckoutSession,
67
- getSessionStatus,
68
-
69
- // Legacy aliases (for micdrop-frontend compatibility)
70
- initiateOrder,
71
- trackUTMSource,
72
- } from './orders.js';
73
-
74
- // ============================================================================
75
- // Promo Codes API
76
- // ============================================================================
77
-
78
- export {
79
- validatePromoCode,
80
- hasPromoCodes,
81
- applyPromoCode,
82
- removePromoCode,
83
- } from './promo.js';
84
-
85
- // ============================================================================
86
- // Events API
87
- // ============================================================================
88
-
89
- export {
90
- fetchEventDetails,
91
- fetchEventTickets,
92
- fetchEventPerformers,
93
- fetchAllVenues,
94
- fetchVenueEvents,
95
- getMonthEvents,
96
- getOrgMonthEvents,
97
- getSeriesOccurrences,
98
- fetchSeriesOccurrences,
99
- checkEventPassword,
100
- testNetworkConnection,
101
- } from './events.js';
102
-
103
- // ============================================================================
104
- // Venues API
105
- // ============================================================================
106
-
107
- export {
108
- getVenue,
109
- getVenueFees,
110
- getVenueBySlug,
111
- } from './venues.js';
112
-
113
- // ============================================================================
114
- // Transformers
115
- // ============================================================================
116
-
117
- export {
118
- // Order
119
- transformOrder,
120
- transformTicket,
121
- transformOrderForDisplay,
122
-
123
- // Event
124
- transformEvent,
125
- transformEventData,
126
- transformAvailableTicket,
127
- getCDNImageUrl,
128
- getEventImageUrl,
129
- calculateCtaState,
130
-
131
- // Venue
132
- transformVenue,
133
- extractVenueFees,
134
- formatVenueAddress,
135
- } from './transformers/index.js';
136
-
137
- // ============================================================================
138
- // Types
139
- // ============================================================================
140
-
141
- export type {
142
- // API Configuration
143
- ApiConfig,
144
- ApiResponse,
145
-
146
- // Orders & Payment
147
- PaymentIntentRequest,
148
- PaymentIntentResponse,
149
- CompleteReservationResponse,
150
- CancelReservationResponse,
151
- CreateOrderRequest,
152
- CreateOrderResponse,
153
- ValidatePaymentRequest,
154
- ValidatePaymentResponse,
155
- AttendeeInfo,
156
-
157
- // Session
158
- ExtendSessionRequest,
159
- ExtendSessionResponse,
160
- SessionStatus,
161
-
162
- // Promo
163
- PromoValidationResponse,
164
- HasPromoCodesResponse,
165
-
166
- // Orders
167
- Order,
168
- PurchasedTicket,
169
-
170
- // Events
171
- Event,
172
- AvailableTicket,
173
- EventPerformersResponse,
174
- Performer,
175
-
176
- // Venues
177
- Venue,
178
-
179
- // Series
180
- SeriesOccurrence,
181
- SeriesOccurrencesResponse,
182
- } from './types.js';
1
+ /**
2
+ * MicDrop Public Checkout API
3
+ *
4
+ * This module provides a complete API layer for the public checkout flow:
5
+ * - Order creation and management
6
+ * - Payment processing with Stripe
7
+ * - Promo code validation
8
+ * - Event and venue data fetching
9
+ * - Session management
10
+ *
11
+ * All endpoints are public (no authentication required) and use
12
+ * the /api/v2/public base path.
13
+ *
14
+ * @example
15
+ * ```typescript
16
+ * import {
17
+ * createPaymentIntent,
18
+ * validatePromoCode,
19
+ * transformOrder,
20
+ * } from '@getmicdrop/venue-calendar/api';
21
+ *
22
+ * // Create payment intent
23
+ * const intent = await createPaymentIntent(cartId, { 123: 2 });
24
+ *
25
+ * // Validate promo code
26
+ * const promo = await validatePromoCode(eventId, 'DISCOUNT10');
27
+ *
28
+ * // Transform order for display
29
+ * const order = transformOrder(apiResponse);
30
+ * ```
31
+ */
32
+
33
+ // ============================================================================
34
+ // Client Configuration
35
+ // ============================================================================
36
+
37
+ export {
38
+ configureApi,
39
+ getApiConfig,
40
+ getPublicBaseUrl,
41
+ getLegacyPublicUrl,
42
+ getOrdersPublicUrl,
43
+ getClientIP,
44
+ apiGet,
45
+ apiPost,
46
+ apiPut,
47
+ apiDelete,
48
+ } from './client.js';
49
+
50
+ // ============================================================================
51
+ // Orders API
52
+ // ============================================================================
53
+
54
+ export {
55
+ // Payment
56
+ createPaymentIntent,
57
+ validatePaymentIntent,
58
+
59
+ // Order lifecycle
60
+ createOrder,
61
+ getOrder,
62
+ completeReservation,
63
+ cancelReservation,
64
+
65
+ // Session management
66
+ extendCheckoutSession,
67
+ getSessionStatus,
68
+
69
+ // Legacy aliases (for micdrop-frontend compatibility)
70
+ initiateOrder,
71
+ trackUTMSource,
72
+ } from './orders.js';
73
+
74
+ // ============================================================================
75
+ // Promo Codes API
76
+ // ============================================================================
77
+
78
+ export {
79
+ validatePromoCode,
80
+ hasPromoCodes,
81
+ applyPromoCode,
82
+ removePromoCode,
83
+ } from './promo.js';
84
+
85
+ // ============================================================================
86
+ // Events API
87
+ // ============================================================================
88
+
89
+ export {
90
+ fetchEventDetails,
91
+ fetchEventTickets,
92
+ fetchEventPerformers,
93
+ fetchAllVenues,
94
+ fetchVenueEvents,
95
+ getMonthEvents,
96
+ getOrgMonthEvents,
97
+ getSeriesOccurrences,
98
+ fetchSeriesOccurrences,
99
+ checkEventPassword,
100
+ testNetworkConnection,
101
+ } from './events.js';
102
+
103
+ // ============================================================================
104
+ // Venues API
105
+ // ============================================================================
106
+
107
+ export {
108
+ getVenue,
109
+ getVenueFees,
110
+ getVenueBySlug,
111
+ } from './venues.js';
112
+
113
+ // ============================================================================
114
+ // Transformers
115
+ // ============================================================================
116
+
117
+ export {
118
+ // Order
119
+ transformOrder,
120
+ transformTicket,
121
+ transformOrderForDisplay,
122
+
123
+ // Event
124
+ transformEvent,
125
+ transformEventData,
126
+ transformAvailableTicket,
127
+ getCDNImageUrl,
128
+ getEventImageUrl,
129
+ calculateCtaState,
130
+
131
+ // Venue
132
+ transformVenue,
133
+ extractVenueFees,
134
+ formatVenueAddress,
135
+ } from './transformers/index.js';
136
+
137
+ // ============================================================================
138
+ // Types
139
+ // ============================================================================
140
+
141
+ export type {
142
+ // API Configuration
143
+ ApiConfig,
144
+ ApiResponse,
145
+
146
+ // Orders & Payment
147
+ PaymentIntentRequest,
148
+ PaymentIntentResponse,
149
+ CompleteReservationResponse,
150
+ CancelReservationResponse,
151
+ CreateOrderRequest,
152
+ CreateOrderResponse,
153
+ ValidatePaymentRequest,
154
+ ValidatePaymentResponse,
155
+ AttendeeInfo,
156
+
157
+ // Session
158
+ ExtendSessionRequest,
159
+ ExtendSessionResponse,
160
+ SessionStatus,
161
+
162
+ // Promo
163
+ PromoValidationResponse,
164
+ HasPromoCodesResponse,
165
+
166
+ // Orders
167
+ Order,
168
+ PurchasedTicket,
169
+
170
+ // Events
171
+ Event,
172
+ AvailableTicket,
173
+ EventPerformersResponse,
174
+ Performer,
175
+
176
+ // Venues
177
+ Venue,
178
+
179
+ // Series
180
+ SeriesOccurrence,
181
+ SeriesOccurrencesResponse,
182
+ } from './types.js';