@itm-studio/partner-sdk 0.1.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.
- package/README.md +259 -0
- package/dist/index.d.mts +486 -0
- package/dist/index.d.ts +486 -0
- package/dist/index.js +1098 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1094 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +53 -0
- package/schema/partner.graphql +439 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,486 @@
|
|
|
1
|
+
type Scalars = {
|
|
2
|
+
DateTime: any;
|
|
3
|
+
ID: string;
|
|
4
|
+
String: string;
|
|
5
|
+
Boolean: boolean;
|
|
6
|
+
Int: number;
|
|
7
|
+
Float: number;
|
|
8
|
+
};
|
|
9
|
+
type MomentStatus = 'UPCOMING' | 'LIVE' | 'ENDED';
|
|
10
|
+
type MomentSortOrder = 'ASC' | 'DESC';
|
|
11
|
+
type MomentType = 'DIGITAL' | 'IRL';
|
|
12
|
+
type MomentCategory = 'ACTIVATION' | 'CONCERT' | 'DIGITAL' | 'DINING' | 'EDUCATION' | 'EXHIBITION' | 'FASHION' | 'FESTIVAL' | 'LAUNCH' | 'NIGHTLIFE' | 'OTHER' | 'PARTY' | 'PERFORMING_ARTS' | 'SCREENING' | 'SPORTS' | 'WELLNESS';
|
|
13
|
+
type MomentSubcategory = 'ACOUSTIC_SET' | 'ADVANCE_SCREENING' | 'AFTER_PARTY' | 'AIRDROP' | 'ALBUM_DROP' | 'ALBUM_RELEASE_SHOW' | 'AMA' | 'ANNIVERSARY' | 'ARTIST_TALK' | 'ART_FAIR' | 'ART_FESTIVAL' | 'ATHLETE_APPEARANCE' | 'AWARDS' | 'BAR_TAKEOVER' | 'BATTLE' | 'BEER_AND_WINE_FESTIVAL' | 'BIENNALE' | 'BIRTHDAY' | 'BLOCK_PARTY' | 'BRAND_EXPERIENCE' | 'BRAND_REVEAL' | 'BREATHWORK' | 'BRUNCH_EVENT' | 'BURLESQUE' | 'CACAO_CEREMONY' | 'CARNIVAL' | 'CELEBRATION' | 'CHAMPIONSHIP' | 'CHEF_DINNER' | 'CHOIR_OR_ENSEMBLE' | 'CLUB_NIGHT' | 'CLUB_SET' | 'COLD_PLUNGE' | 'COLLABORATION_REVEAL' | 'COLLECTION_DROP' | 'COMEDY_FESTIVAL' | 'COMEDY_NIGHT' | 'COMEDY_SHOW' | 'COMMUNITY_MEETUP' | 'CONFERENCE' | 'COOKING_CLASS' | 'CULTURAL_FESTIVAL' | 'DANCE_PERFORMANCE' | 'DAYCLUB' | 'DIRECTORS_CUT' | 'DISCORD_EVENT' | 'DOCUMENTARY' | 'DRAG_SHOW' | 'ECSTATIC_DANCE' | 'ESPORTS' | 'EXHIBITION_GAME' | 'EXTREME_SPORTS' | 'FAN_EXPERIENCE' | 'FAN_FEST' | 'FASHION_FESTIVAL' | 'FASHION_PANEL' | 'FASHION_WEEK' | 'FIGHT_NIGHT' | 'FILM_FESTIVAL' | 'FILM_PREMIERE' | 'FINISSAGE' | 'FIRESIDE_CHAT' | 'FITNESS_CLASS' | 'FITTING_EVENT' | 'FOOD_FESTIVAL' | 'FOOD_PAIRING' | 'GALLERY_OPENING' | 'GAME_DAY' | 'GIVEAWAY' | 'GROUP_EXHIBITION' | 'GUERRILLA' | 'HACKATHON' | 'HEADLINER_SHOW' | 'HOLIDAY_PARTY' | 'HYBRID_EVENT' | 'IMMERSIVE_EXPERIENCE' | 'IMPROV_SHOW' | 'INFLUENCER_EVENT' | 'INSTALLATION' | 'INTERACTIVE_INSTALLATION' | 'JAZZ_NIGHT' | 'JAZZ_SESSION' | 'KARAOKE_NIGHT' | 'KEYNOTE' | 'LATE_NIGHT_SET' | 'LISTENING_PARTY' | 'LIVESTREAM' | 'LOOKBOOK_SHOOT' | 'MASQUERADE' | 'MASTERCLASS' | 'MEDITATION' | 'MEET_AND_GREET' | 'MEMBERS_ONLY' | 'MOBILE_TOUR' | 'MUSEUM_EVENT' | 'MUSICAL' | 'MUSIC_FESTIVAL' | 'MUSIC_VIDEO_PREMIERE' | 'NETWORKING_MIXER' | 'NFT_MINT' | 'ONLINE_DROP' | 'ONLINE_PREMIERE' | 'ONLINE_WATCH_PARTY' | 'OPEN_MIC' | 'OPERA' | 'ORCHESTRA' | 'OTHER' | 'OUTDOOR_CINEMA' | 'PANEL' | 'PERFORMANCE_ART' | 'PHOTO_ACTIVATION' | 'POOL_PARTY' | 'POP_UP_BOUTIQUE' | 'POP_UP_DINING' | 'POP_UP_GALLERY' | 'POP_UP_SHOP' | 'PRESENTATION' | 'PRESS_EVENT' | 'PREVIEW' | 'PRIDE_FESTIVAL' | 'PRIVATE_EVENT' | 'PRODUCT_LAUNCH' | 'RAVE' | 'RELEASE_PARTY' | 'RESIDENCY' | 'RESTAURANT_OPENING' | 'RETREAT' | 'RIVALRY_GAME' | 'ROOFTOP_PARTY' | 'ROUNDTABLE' | 'RUNWAY_SHOW' | 'RUN_CLUB' | 'RUN_OR_RACE' | 'SAMPLE_SALE' | 'SAMPLING' | 'SECRET_DINING' | 'SEMINAR' | 'SHORT_FILM' | 'SHOWCASE' | 'SHOWROOM' | 'SILENT_DISCO' | 'SOCIAL_CHALLENGE' | 'SOLO_EXHIBITION' | 'SOUND_BATH' | 'SPA_EXPERIENCE' | 'SPOKEN_WORD' | 'SPONSORSHIP' | 'SPORTS_CLINIC' | 'SPORTS_WATCH_PARTY' | 'STANDUP_COMEDY' | 'STREET_TEAM' | 'STUDIO_VISIT' | 'SUMMIT' | 'SUPPER_CLUB' | 'TAILGATE' | 'TASTING' | 'THEATER' | 'THEMED_NIGHT' | 'TOURNAMENT' | 'TOUR_STOP' | 'TRIBUTE_SHOW' | 'TRUNK_SHOW' | 'TWITTER_SPACE' | 'VARIETY_SHOW' | 'VENUE_OPENING' | 'VIRTUAL_CONCERT' | 'VIRTUAL_EVENT' | 'WAREHOUSE_PARTY' | 'WATCH_PARTY' | 'WEBINAR' | 'WELLNESS_FESTIVAL' | 'WELLNESS_WORKSHOP' | 'WORKSHOP' | 'YOGA_SESSION';
|
|
14
|
+
type PaymentStatus = 'PENDING' | 'SUCCEEDED' | 'FAILED';
|
|
15
|
+
type TicketExtensionStatus = 'PENDING' | 'APPLIED' | 'CANCELLED' | 'EXPIRED' | 'FAILED' | 'REFUNDED';
|
|
16
|
+
interface Currency {
|
|
17
|
+
uid: Scalars['ID'];
|
|
18
|
+
code: Scalars['String'];
|
|
19
|
+
name: Scalars['String'];
|
|
20
|
+
symbol: Scalars['String'];
|
|
21
|
+
country: Scalars['String'];
|
|
22
|
+
countryCode: Scalars['String'];
|
|
23
|
+
createdAt: Scalars['DateTime'];
|
|
24
|
+
updatedAt: Scalars['DateTime'];
|
|
25
|
+
__typename: 'Currency';
|
|
26
|
+
}
|
|
27
|
+
interface Venue {
|
|
28
|
+
uid: Scalars['ID'];
|
|
29
|
+
name: Scalars['String'];
|
|
30
|
+
address: (Scalars['String'] | null);
|
|
31
|
+
city: Scalars['String'];
|
|
32
|
+
country: Scalars['String'];
|
|
33
|
+
postalCode: (Scalars['String'] | null);
|
|
34
|
+
createdAt: Scalars['DateTime'];
|
|
35
|
+
updatedAt: Scalars['DateTime'];
|
|
36
|
+
__typename: 'Venue';
|
|
37
|
+
}
|
|
38
|
+
interface Moment {
|
|
39
|
+
uid: Scalars['ID'];
|
|
40
|
+
name: Scalars['String'];
|
|
41
|
+
description: (Scalars['String'] | null);
|
|
42
|
+
blurb: Scalars['String'];
|
|
43
|
+
slug: Scalars['String'];
|
|
44
|
+
startDate: Scalars['DateTime'];
|
|
45
|
+
endDate: Scalars['DateTime'];
|
|
46
|
+
isPrivate: Scalars['Boolean'];
|
|
47
|
+
type: MomentType;
|
|
48
|
+
category: MomentCategory;
|
|
49
|
+
subcategory: MomentSubcategory;
|
|
50
|
+
status: MomentStatus;
|
|
51
|
+
soldOut: Scalars['Boolean'];
|
|
52
|
+
timezone: Scalars['String'];
|
|
53
|
+
minimumAge: Scalars['Int'];
|
|
54
|
+
venue: (Venue | null);
|
|
55
|
+
ticketTiers: TicketTier[];
|
|
56
|
+
createdAt: Scalars['DateTime'];
|
|
57
|
+
updatedAt: Scalars['DateTime'];
|
|
58
|
+
__typename: 'Moment';
|
|
59
|
+
}
|
|
60
|
+
interface TicketTier {
|
|
61
|
+
uid: Scalars['ID'];
|
|
62
|
+
name: Scalars['String'];
|
|
63
|
+
description: (Scalars['String'] | null);
|
|
64
|
+
price: Scalars['Float'];
|
|
65
|
+
currency: Currency;
|
|
66
|
+
isActive: Scalars['Boolean'];
|
|
67
|
+
isPrivate: Scalars['Boolean'];
|
|
68
|
+
maxPerUser: Scalars['Int'];
|
|
69
|
+
minPerUser: Scalars['Int'];
|
|
70
|
+
remainingSupply: Scalars['Int'];
|
|
71
|
+
numSold: Scalars['Float'];
|
|
72
|
+
numCheckedIn: Scalars['Float'];
|
|
73
|
+
startDateOverride: (Scalars['DateTime'] | null);
|
|
74
|
+
endDateOverride: (Scalars['DateTime'] | null);
|
|
75
|
+
createdAt: Scalars['DateTime'];
|
|
76
|
+
updatedAt: Scalars['DateTime'];
|
|
77
|
+
__typename: 'TicketTier';
|
|
78
|
+
}
|
|
79
|
+
interface User {
|
|
80
|
+
uid: Scalars['ID'];
|
|
81
|
+
name: (Scalars['String'] | null);
|
|
82
|
+
phoneNumber: Scalars['String'];
|
|
83
|
+
primaryEmail: (Scalars['String'] | null);
|
|
84
|
+
instagramProfile: (Scalars['String'] | null);
|
|
85
|
+
twitterProfile: (Scalars['String'] | null);
|
|
86
|
+
spotifyProfile: (Scalars['String'] | null);
|
|
87
|
+
tiktokProfile: (Scalars['String'] | null);
|
|
88
|
+
createdAt: Scalars['DateTime'];
|
|
89
|
+
updatedAt: Scalars['DateTime'];
|
|
90
|
+
__typename: 'User';
|
|
91
|
+
}
|
|
92
|
+
interface Ticket {
|
|
93
|
+
uid: Scalars['ID'];
|
|
94
|
+
price: Scalars['Float'];
|
|
95
|
+
redeemedAt: (Scalars['DateTime'] | null);
|
|
96
|
+
encryptedQRCode: Scalars['String'];
|
|
97
|
+
notes: (Scalars['String'] | null);
|
|
98
|
+
externalId: (Scalars['String'] | null);
|
|
99
|
+
hasExpired: Scalars['Boolean'];
|
|
100
|
+
ticketTier: TicketTier;
|
|
101
|
+
user: User;
|
|
102
|
+
moment: Moment;
|
|
103
|
+
payment: (Payment | null);
|
|
104
|
+
extensions: TicketExtension[];
|
|
105
|
+
discountCodeUsages: MomentDiscountCodeUsage[];
|
|
106
|
+
createdAt: Scalars['DateTime'];
|
|
107
|
+
updatedAt: Scalars['DateTime'];
|
|
108
|
+
__typename: 'Ticket';
|
|
109
|
+
}
|
|
110
|
+
interface TicketExtension {
|
|
111
|
+
uid: Scalars['ID'];
|
|
112
|
+
hours: Scalars['Int'];
|
|
113
|
+
previousTotalHours: Scalars['Int'];
|
|
114
|
+
newTotalHours: Scalars['Int'];
|
|
115
|
+
pricePerHourCents: Scalars['Int'];
|
|
116
|
+
totalPriceCents: Scalars['Int'];
|
|
117
|
+
status: TicketExtensionStatus;
|
|
118
|
+
appliedAt: (Scalars['DateTime'] | null);
|
|
119
|
+
createdAt: Scalars['DateTime'];
|
|
120
|
+
updatedAt: Scalars['DateTime'];
|
|
121
|
+
__typename: 'TicketExtension';
|
|
122
|
+
}
|
|
123
|
+
interface MomentDiscountCodeUsage {
|
|
124
|
+
uid: Scalars['ID'];
|
|
125
|
+
createdAt: Scalars['DateTime'];
|
|
126
|
+
updatedAt: Scalars['DateTime'];
|
|
127
|
+
__typename: 'MomentDiscountCodeUsage';
|
|
128
|
+
}
|
|
129
|
+
interface Payment {
|
|
130
|
+
uid: Scalars['ID'];
|
|
131
|
+
amount: Scalars['Float'];
|
|
132
|
+
status: PaymentStatus;
|
|
133
|
+
stripePaymentIntentId: Scalars['String'];
|
|
134
|
+
stripeConnectedPaymentId: (Scalars['String'] | null);
|
|
135
|
+
createdAt: Scalars['DateTime'];
|
|
136
|
+
updatedAt: Scalars['DateTime'];
|
|
137
|
+
__typename: 'Payment';
|
|
138
|
+
}
|
|
139
|
+
interface MerchPurchase {
|
|
140
|
+
uid: Scalars['ID'];
|
|
141
|
+
createdAt: Scalars['DateTime'];
|
|
142
|
+
updatedAt: Scalars['DateTime'];
|
|
143
|
+
__typename: 'MerchPurchase';
|
|
144
|
+
}
|
|
145
|
+
interface PartnerCustomer {
|
|
146
|
+
user: User;
|
|
147
|
+
tickets: Ticket[];
|
|
148
|
+
__typename: 'PartnerCustomer';
|
|
149
|
+
}
|
|
150
|
+
interface GetPublicMomentsResponse {
|
|
151
|
+
moments: Moment[];
|
|
152
|
+
totalCount: Scalars['Int'];
|
|
153
|
+
hasNextPage: Scalars['Boolean'];
|
|
154
|
+
nextCursor: (Scalars['String'] | null);
|
|
155
|
+
__typename: 'GetPublicMomentsResponse';
|
|
156
|
+
}
|
|
157
|
+
interface GetTicketsResponse {
|
|
158
|
+
tickets: Ticket[];
|
|
159
|
+
totalCount: Scalars['Int'];
|
|
160
|
+
hasNextPage: Scalars['Boolean'];
|
|
161
|
+
nextCursor: (Scalars['String'] | null);
|
|
162
|
+
__typename: 'GetTicketsResponse';
|
|
163
|
+
}
|
|
164
|
+
interface GetPartnerCustomersResponse {
|
|
165
|
+
customers: PartnerCustomer[];
|
|
166
|
+
totalCount: Scalars['Int'];
|
|
167
|
+
hasNextPage: Scalars['Boolean'];
|
|
168
|
+
nextCursor: (Scalars['String'] | null);
|
|
169
|
+
__typename: 'GetPartnerCustomersResponse';
|
|
170
|
+
}
|
|
171
|
+
interface Query {
|
|
172
|
+
/** Get paginated moments for the brand associated with the partner token. */
|
|
173
|
+
getPartnerMomentsForBrand: GetPublicMomentsResponse;
|
|
174
|
+
/** Get a single moment by slug. */
|
|
175
|
+
getPartnerMoment: (Moment | null);
|
|
176
|
+
/** Get paginated tickets for a moment. */
|
|
177
|
+
getPartnerTicketsForMoment: GetTicketsResponse;
|
|
178
|
+
/**
|
|
179
|
+
* Get paginated customers (users with tickets) for a moment.
|
|
180
|
+
* Sorted by newest first (based on earliest ticket purchase time).
|
|
181
|
+
*/
|
|
182
|
+
getPartnerCustomersForMoment: GetPartnerCustomersResponse;
|
|
183
|
+
__typename: 'Query';
|
|
184
|
+
}
|
|
185
|
+
interface CurrencyGenqlSelection {
|
|
186
|
+
uid?: boolean | number;
|
|
187
|
+
code?: boolean | number;
|
|
188
|
+
name?: boolean | number;
|
|
189
|
+
symbol?: boolean | number;
|
|
190
|
+
country?: boolean | number;
|
|
191
|
+
countryCode?: boolean | number;
|
|
192
|
+
createdAt?: boolean | number;
|
|
193
|
+
updatedAt?: boolean | number;
|
|
194
|
+
__typename?: boolean | number;
|
|
195
|
+
__scalar?: boolean | number;
|
|
196
|
+
}
|
|
197
|
+
interface VenueGenqlSelection {
|
|
198
|
+
uid?: boolean | number;
|
|
199
|
+
name?: boolean | number;
|
|
200
|
+
address?: boolean | number;
|
|
201
|
+
city?: boolean | number;
|
|
202
|
+
country?: boolean | number;
|
|
203
|
+
postalCode?: boolean | number;
|
|
204
|
+
createdAt?: boolean | number;
|
|
205
|
+
updatedAt?: boolean | number;
|
|
206
|
+
__typename?: boolean | number;
|
|
207
|
+
__scalar?: boolean | number;
|
|
208
|
+
}
|
|
209
|
+
interface MomentGenqlSelection {
|
|
210
|
+
uid?: boolean | number;
|
|
211
|
+
name?: boolean | number;
|
|
212
|
+
description?: boolean | number;
|
|
213
|
+
blurb?: boolean | number;
|
|
214
|
+
slug?: boolean | number;
|
|
215
|
+
startDate?: boolean | number;
|
|
216
|
+
endDate?: boolean | number;
|
|
217
|
+
isPrivate?: boolean | number;
|
|
218
|
+
type?: boolean | number;
|
|
219
|
+
category?: boolean | number;
|
|
220
|
+
subcategory?: boolean | number;
|
|
221
|
+
status?: boolean | number;
|
|
222
|
+
soldOut?: boolean | number;
|
|
223
|
+
timezone?: boolean | number;
|
|
224
|
+
minimumAge?: boolean | number;
|
|
225
|
+
venue?: VenueGenqlSelection;
|
|
226
|
+
ticketTiers?: TicketTierGenqlSelection;
|
|
227
|
+
createdAt?: boolean | number;
|
|
228
|
+
updatedAt?: boolean | number;
|
|
229
|
+
__typename?: boolean | number;
|
|
230
|
+
__scalar?: boolean | number;
|
|
231
|
+
}
|
|
232
|
+
interface TicketTierGenqlSelection {
|
|
233
|
+
uid?: boolean | number;
|
|
234
|
+
name?: boolean | number;
|
|
235
|
+
description?: boolean | number;
|
|
236
|
+
price?: boolean | number;
|
|
237
|
+
currency?: CurrencyGenqlSelection;
|
|
238
|
+
isActive?: boolean | number;
|
|
239
|
+
isPrivate?: boolean | number;
|
|
240
|
+
maxPerUser?: boolean | number;
|
|
241
|
+
minPerUser?: boolean | number;
|
|
242
|
+
remainingSupply?: boolean | number;
|
|
243
|
+
numSold?: boolean | number;
|
|
244
|
+
numCheckedIn?: boolean | number;
|
|
245
|
+
startDateOverride?: boolean | number;
|
|
246
|
+
endDateOverride?: boolean | number;
|
|
247
|
+
createdAt?: boolean | number;
|
|
248
|
+
updatedAt?: boolean | number;
|
|
249
|
+
__typename?: boolean | number;
|
|
250
|
+
__scalar?: boolean | number;
|
|
251
|
+
}
|
|
252
|
+
interface UserGenqlSelection {
|
|
253
|
+
uid?: boolean | number;
|
|
254
|
+
name?: boolean | number;
|
|
255
|
+
phoneNumber?: boolean | number;
|
|
256
|
+
primaryEmail?: boolean | number;
|
|
257
|
+
instagramProfile?: boolean | number;
|
|
258
|
+
twitterProfile?: boolean | number;
|
|
259
|
+
spotifyProfile?: boolean | number;
|
|
260
|
+
tiktokProfile?: boolean | number;
|
|
261
|
+
createdAt?: boolean | number;
|
|
262
|
+
updatedAt?: boolean | number;
|
|
263
|
+
__typename?: boolean | number;
|
|
264
|
+
__scalar?: boolean | number;
|
|
265
|
+
}
|
|
266
|
+
interface TicketGenqlSelection {
|
|
267
|
+
uid?: boolean | number;
|
|
268
|
+
price?: boolean | number;
|
|
269
|
+
redeemedAt?: boolean | number;
|
|
270
|
+
encryptedQRCode?: boolean | number;
|
|
271
|
+
notes?: boolean | number;
|
|
272
|
+
externalId?: boolean | number;
|
|
273
|
+
hasExpired?: boolean | number;
|
|
274
|
+
ticketTier?: TicketTierGenqlSelection;
|
|
275
|
+
user?: UserGenqlSelection;
|
|
276
|
+
moment?: MomentGenqlSelection;
|
|
277
|
+
payment?: PaymentGenqlSelection;
|
|
278
|
+
extensions?: TicketExtensionGenqlSelection;
|
|
279
|
+
discountCodeUsages?: MomentDiscountCodeUsageGenqlSelection;
|
|
280
|
+
createdAt?: boolean | number;
|
|
281
|
+
updatedAt?: boolean | number;
|
|
282
|
+
__typename?: boolean | number;
|
|
283
|
+
__scalar?: boolean | number;
|
|
284
|
+
}
|
|
285
|
+
interface TicketExtensionGenqlSelection {
|
|
286
|
+
uid?: boolean | number;
|
|
287
|
+
hours?: boolean | number;
|
|
288
|
+
previousTotalHours?: boolean | number;
|
|
289
|
+
newTotalHours?: boolean | number;
|
|
290
|
+
pricePerHourCents?: boolean | number;
|
|
291
|
+
totalPriceCents?: boolean | number;
|
|
292
|
+
status?: boolean | number;
|
|
293
|
+
appliedAt?: boolean | number;
|
|
294
|
+
createdAt?: boolean | number;
|
|
295
|
+
updatedAt?: boolean | number;
|
|
296
|
+
__typename?: boolean | number;
|
|
297
|
+
__scalar?: boolean | number;
|
|
298
|
+
}
|
|
299
|
+
interface MomentDiscountCodeUsageGenqlSelection {
|
|
300
|
+
uid?: boolean | number;
|
|
301
|
+
createdAt?: boolean | number;
|
|
302
|
+
updatedAt?: boolean | number;
|
|
303
|
+
__typename?: boolean | number;
|
|
304
|
+
__scalar?: boolean | number;
|
|
305
|
+
}
|
|
306
|
+
interface PaymentGenqlSelection {
|
|
307
|
+
uid?: boolean | number;
|
|
308
|
+
amount?: boolean | number;
|
|
309
|
+
status?: boolean | number;
|
|
310
|
+
stripePaymentIntentId?: boolean | number;
|
|
311
|
+
stripeConnectedPaymentId?: boolean | number;
|
|
312
|
+
createdAt?: boolean | number;
|
|
313
|
+
updatedAt?: boolean | number;
|
|
314
|
+
__typename?: boolean | number;
|
|
315
|
+
__scalar?: boolean | number;
|
|
316
|
+
}
|
|
317
|
+
interface PartnerCustomerGenqlSelection {
|
|
318
|
+
user?: UserGenqlSelection;
|
|
319
|
+
tickets?: TicketGenqlSelection;
|
|
320
|
+
__typename?: boolean | number;
|
|
321
|
+
__scalar?: boolean | number;
|
|
322
|
+
}
|
|
323
|
+
interface GetPublicMomentsResponseGenqlSelection {
|
|
324
|
+
moments?: MomentGenqlSelection;
|
|
325
|
+
totalCount?: boolean | number;
|
|
326
|
+
hasNextPage?: boolean | number;
|
|
327
|
+
nextCursor?: boolean | number;
|
|
328
|
+
__typename?: boolean | number;
|
|
329
|
+
__scalar?: boolean | number;
|
|
330
|
+
}
|
|
331
|
+
interface GetTicketsResponseGenqlSelection {
|
|
332
|
+
tickets?: TicketGenqlSelection;
|
|
333
|
+
totalCount?: boolean | number;
|
|
334
|
+
hasNextPage?: boolean | number;
|
|
335
|
+
nextCursor?: boolean | number;
|
|
336
|
+
__typename?: boolean | number;
|
|
337
|
+
__scalar?: boolean | number;
|
|
338
|
+
}
|
|
339
|
+
interface GetPartnerCustomersResponseGenqlSelection {
|
|
340
|
+
customers?: PartnerCustomerGenqlSelection;
|
|
341
|
+
totalCount?: boolean | number;
|
|
342
|
+
hasNextPage?: boolean | number;
|
|
343
|
+
nextCursor?: boolean | number;
|
|
344
|
+
__typename?: boolean | number;
|
|
345
|
+
__scalar?: boolean | number;
|
|
346
|
+
}
|
|
347
|
+
interface QueryGenqlSelection {
|
|
348
|
+
/** Get paginated moments for the brand associated with the partner token. */
|
|
349
|
+
getPartnerMomentsForBrand?: (GetPublicMomentsResponseGenqlSelection & {
|
|
350
|
+
__args: {
|
|
351
|
+
/** The cursor to start from, timestamp string */
|
|
352
|
+
cursor?: (Scalars['String'] | null);
|
|
353
|
+
take?: (Scalars['Int'] | null);
|
|
354
|
+
status?: (MomentStatus | null);
|
|
355
|
+
/** Sort order for moments by start date (default: DESC - newest to oldest) */
|
|
356
|
+
sortOrder?: (MomentSortOrder | null);
|
|
357
|
+
};
|
|
358
|
+
});
|
|
359
|
+
/** Get a single moment by slug. */
|
|
360
|
+
getPartnerMoment?: (MomentGenqlSelection & {
|
|
361
|
+
__args: {
|
|
362
|
+
slug: Scalars['String'];
|
|
363
|
+
};
|
|
364
|
+
});
|
|
365
|
+
/** Get paginated tickets for a moment. */
|
|
366
|
+
getPartnerTicketsForMoment?: (GetTicketsResponseGenqlSelection & {
|
|
367
|
+
__args: {
|
|
368
|
+
momentSlug: Scalars['String'];
|
|
369
|
+
/** Cursor UID for pagination */
|
|
370
|
+
cursor?: (Scalars['String'] | null);
|
|
371
|
+
take?: (Scalars['Int'] | null);
|
|
372
|
+
/** Filter by check-in status */
|
|
373
|
+
checkedIn?: (Scalars['Boolean'] | null);
|
|
374
|
+
};
|
|
375
|
+
});
|
|
376
|
+
/**
|
|
377
|
+
* Get paginated customers (users with tickets) for a moment.
|
|
378
|
+
* Sorted by newest first (based on earliest ticket purchase time).
|
|
379
|
+
*/
|
|
380
|
+
getPartnerCustomersForMoment?: (GetPartnerCustomersResponseGenqlSelection & {
|
|
381
|
+
__args: {
|
|
382
|
+
momentSlug: Scalars['String'];
|
|
383
|
+
/** Cursor UID for pagination (user UID) */
|
|
384
|
+
cursor?: (Scalars['String'] | null);
|
|
385
|
+
take?: (Scalars['Int'] | null);
|
|
386
|
+
};
|
|
387
|
+
});
|
|
388
|
+
__typename?: boolean | number;
|
|
389
|
+
__scalar?: boolean | number;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
interface GraphqlOperation {
|
|
393
|
+
query: string;
|
|
394
|
+
variables?: {
|
|
395
|
+
[name: string]: any;
|
|
396
|
+
};
|
|
397
|
+
operationName?: string;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
type FieldsSelection<SRC extends Anify<DST> | undefined, DST> = {
|
|
401
|
+
scalar: SRC;
|
|
402
|
+
union: Handle__isUnion<SRC, DST>;
|
|
403
|
+
object: HandleObject<SRC, DST>;
|
|
404
|
+
array: SRC extends Nil ? never : SRC extends Array<infer T | null> ? Array<FieldsSelection<T, DST>> : never;
|
|
405
|
+
__scalar: Handle__scalar<SRC, DST>;
|
|
406
|
+
never: never;
|
|
407
|
+
}[DST extends Nil ? 'never' : DST extends false | 0 ? 'never' : SRC extends Scalar ? 'scalar' : SRC extends any[] ? 'array' : SRC extends {
|
|
408
|
+
__isUnion?: any;
|
|
409
|
+
} ? 'union' : DST extends {
|
|
410
|
+
__scalar?: any;
|
|
411
|
+
} ? '__scalar' : DST extends {} ? 'object' : 'never'];
|
|
412
|
+
type HandleObject<SRC extends Anify<DST>, DST> = DST extends boolean ? SRC : SRC extends Nil ? never : Pick<{
|
|
413
|
+
[Key in keyof SRC]: Key extends keyof DST ? FieldsSelection<SRC[Key], NonNullable<DST[Key]>> : SRC[Key];
|
|
414
|
+
}, Exclude<keyof DST, FieldsToRemove>>;
|
|
415
|
+
type Handle__scalar<SRC extends Anify<DST>, DST> = SRC extends Nil ? never : Pick<{
|
|
416
|
+
[Key in keyof SRC]: Key extends keyof DST ? FieldsSelection<SRC[Key], DST[Key]> : SRC[Key];
|
|
417
|
+
}, {
|
|
418
|
+
[Key in keyof SRC]: SRC[Key] extends Nil ? never : Key extends FieldsToRemove ? never : SRC[Key] extends Scalar ? Key : Key extends keyof DST ? Key : never;
|
|
419
|
+
}[keyof SRC]>;
|
|
420
|
+
type Handle__isUnion<SRC extends Anify<DST>, DST> = SRC extends Nil ? never : Omit<SRC, FieldsToRemove>;
|
|
421
|
+
type Scalar = string | number | Date | boolean | null | undefined;
|
|
422
|
+
type Anify<T> = {
|
|
423
|
+
[P in keyof T]?: any;
|
|
424
|
+
};
|
|
425
|
+
type FieldsToRemove = '__isUnion' | '__scalar' | '__name' | '__args';
|
|
426
|
+
type Nil = undefined | null;
|
|
427
|
+
|
|
428
|
+
interface Client {
|
|
429
|
+
query<R extends QueryGenqlSelection>(request: R & {
|
|
430
|
+
__name?: string;
|
|
431
|
+
}): Promise<FieldsSelection<Query, R>>;
|
|
432
|
+
}
|
|
433
|
+
declare const everything: {
|
|
434
|
+
__scalar: boolean;
|
|
435
|
+
};
|
|
436
|
+
declare const generateQueryOp: (fields: QueryGenqlSelection & {
|
|
437
|
+
__name?: string;
|
|
438
|
+
}) => GraphqlOperation;
|
|
439
|
+
|
|
440
|
+
interface ITMPartnerClientConfig {
|
|
441
|
+
/**
|
|
442
|
+
* Partner API token (from backstage: Settings > Partner API).
|
|
443
|
+
* Sent as `x-partner-api-key` header on every request.
|
|
444
|
+
*/
|
|
445
|
+
token: string;
|
|
446
|
+
/**
|
|
447
|
+
* Base URL of the ITM GraphQL API.
|
|
448
|
+
* @default 'https://api.itm.studio/graphql'
|
|
449
|
+
*/
|
|
450
|
+
baseUrl?: string;
|
|
451
|
+
/**
|
|
452
|
+
* Additional headers to include on every request.
|
|
453
|
+
*/
|
|
454
|
+
headers?: Record<string, string>;
|
|
455
|
+
}
|
|
456
|
+
type ITMPartnerClient = Client;
|
|
457
|
+
/**
|
|
458
|
+
* Create a typed ITM Partner API client.
|
|
459
|
+
*
|
|
460
|
+
* @example
|
|
461
|
+
* ```ts
|
|
462
|
+
* import { createITMPartnerClient } from '@itm-studio/partner-sdk';
|
|
463
|
+
*
|
|
464
|
+
* const itm = createITMPartnerClient({
|
|
465
|
+
* token: process.env.ITM_PARTNER_TOKEN!,
|
|
466
|
+
* });
|
|
467
|
+
*
|
|
468
|
+
* const { getPartnerMomentsForBrand } = await itm.query({
|
|
469
|
+
* getPartnerMomentsForBrand: {
|
|
470
|
+
* __args: { take: 10 },
|
|
471
|
+
* moments: {
|
|
472
|
+
* uid: true,
|
|
473
|
+
* name: true,
|
|
474
|
+
* startDate: true,
|
|
475
|
+
* venue: { name: true, city: true },
|
|
476
|
+
* },
|
|
477
|
+
* totalCount: true,
|
|
478
|
+
* hasNextPage: true,
|
|
479
|
+
* nextCursor: true,
|
|
480
|
+
* },
|
|
481
|
+
* });
|
|
482
|
+
* ```
|
|
483
|
+
*/
|
|
484
|
+
declare function createITMPartnerClient(config: ITMPartnerClientConfig): ITMPartnerClient;
|
|
485
|
+
|
|
486
|
+
export { type Currency, type GetPartnerCustomersResponse, type GetPublicMomentsResponse, type GetTicketsResponse, type ITMPartnerClient, type ITMPartnerClientConfig, type MerchPurchase, type Moment, type MomentCategory, type MomentDiscountCodeUsage, type MomentSortOrder, type MomentStatus, type MomentSubcategory, type MomentType, type PartnerCustomer, type Payment, type PaymentStatus, type Query, type Ticket, type TicketExtension, type TicketExtensionStatus, type TicketTier, type User, type Venue, createITMPartnerClient, everything, generateQueryOp };
|