@itm-studio/partner-sdk 0.2.10 → 0.3.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itm-studio/partner-sdk",
3
- "version": "0.2.10",
3
+ "version": "0.3.1",
4
4
  "description": "TypeScript SDK for the ITM Partner API — typed GraphQL client with zero introspection required",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -9,10 +9,21 @@ scalar JSON
9
9
 
10
10
  # ─── Enums ───────────────────────────────────────────────────────────────────
11
11
 
12
- enum MomentStatus {
13
- UPCOMING
14
- LIVE
15
- ENDED
12
+ enum ConsentStatus {
13
+ NEVER_SUBSCRIBED
14
+ SUBSCRIBED
15
+ UNSUBSCRIBED
16
+ }
17
+
18
+ enum UserSource {
19
+ BRAND
20
+ DICE
21
+ ITM
22
+ }
23
+
24
+ enum SortDirection {
25
+ ASC
26
+ DESC
16
27
  }
17
28
 
18
29
  enum BrandAgentEmailSendBatchStatus {
@@ -32,6 +43,21 @@ enum BrandAgentEmailSendMessageStatus {
32
43
  UNKNOWN
33
44
  }
34
45
 
46
+ enum PartnerAudienceSortField {
47
+ CITY
48
+ CREATED_AT
49
+ NAME
50
+ NUM_MOMENTS
51
+ TOTAL_SPEND_USD
52
+ UPDATED_AT
53
+ }
54
+
55
+ enum MomentStatus {
56
+ UPCOMING
57
+ LIVE
58
+ ENDED
59
+ }
60
+
35
61
  enum MomentSortOrder {
36
62
  ASC
37
63
  DESC
@@ -70,6 +96,8 @@ enum TicketAttendanceMode {
70
96
 
71
97
  enum MomentCategory {
72
98
  ACTIVATION
99
+ BUSINESS
100
+ COMMUNITY
73
101
  CONCERT
74
102
  DIGITAL
75
103
  DINING
@@ -96,6 +124,9 @@ enum MomentSubcategory {
96
124
  ALBUM_RELEASE_SHOW
97
125
  AMA
98
126
  ANNIVERSARY
127
+ APP_LAUNCH
128
+ ARTIST_POP_UP
129
+ ARTIST_RECEPTION
99
130
  ARTIST_TALK
100
131
  ART_FAIR
101
132
  ART_FESTIVAL
@@ -103,21 +134,30 @@ enum MomentSubcategory {
103
134
  AWARDS
104
135
  BAR_TAKEOVER
105
136
  BATTLE
137
+ BEAUTY_FASHION_EVENT
106
138
  BEER_AND_WINE_FESTIVAL
139
+ BEER_TASTING
107
140
  BIENNALE
108
141
  BIRTHDAY
109
142
  BLOCK_PARTY
143
+ BOOK_LAUNCH
144
+ BOOK_TALK
110
145
  BRAND_EXPERIENCE
111
146
  BRAND_REVEAL
112
147
  BREATHWORK
113
148
  BRUNCH_EVENT
114
149
  BURLESQUE
150
+ BUSINESS_MIXER
115
151
  CACAO_CEREMONY
152
+ CAREER_FAIR
116
153
  CARNIVAL
117
154
  CELEBRATION
118
155
  CHAMPIONSHIP
156
+ CHARITY_EVENT
119
157
  CHEF_DINNER
120
158
  CHOIR_OR_ENSEMBLE
159
+ CLASS
160
+ CLUB_MEETING
121
161
  CLUB_NIGHT
122
162
  CLUB_SET
123
163
  COLD_PLUNGE
@@ -126,12 +166,22 @@ enum MomentSubcategory {
126
166
  COMEDY_FESTIVAL
127
167
  COMEDY_NIGHT
128
168
  COMEDY_SHOW
169
+ COMMUNITY_FESTIVAL
170
+ COMMUNITY_MARKET
129
171
  COMMUNITY_MEETUP
130
172
  CONFERENCE
131
173
  COOKING_CLASS
174
+ COURSE
175
+ CREATOR_POP_UP
132
176
  CULTURAL_FESTIVAL
177
+ CULTURAL_GATHERING
178
+ DANCE_PARTY
133
179
  DANCE_PERFORMANCE
134
180
  DAYCLUB
181
+ DEMO_DAY
182
+ DESIGNER_MEET_AND_GREET
183
+ DESIGN_EXHIBITION
184
+ DINNER_PARTY
135
185
  DIRECTORS_CUT
136
186
  DISCORD_EVENT
137
187
  DOCUMENTARY
@@ -140,6 +190,7 @@ enum MomentSubcategory {
140
190
  ESPORTS
141
191
  EXHIBITION_GAME
142
192
  EXTREME_SPORTS
193
+ FAMILY_EVENT
143
194
  FAN_EXPERIENCE
144
195
  FAN_FEST
145
196
  FASHION_FESTIVAL
@@ -148,49 +199,77 @@ enum MomentSubcategory {
148
199
  FIGHT_NIGHT
149
200
  FILM_FESTIVAL
150
201
  FILM_PREMIERE
202
+ FILM_SCREENING
151
203
  FINISSAGE
152
204
  FIRESIDE_CHAT
153
205
  FITNESS_CLASS
154
206
  FITTING_EVENT
155
207
  FOOD_FESTIVAL
208
+ FOOD_MARKET
156
209
  FOOD_PAIRING
210
+ FOUNDER_MEETUP
211
+ FUNDRAISER
157
212
  GALLERY_OPENING
158
213
  GAME_DAY
214
+ GAME_LAUNCH
215
+ GAMING_STREAM
159
216
  GIVEAWAY
160
217
  GROUP_EXHIBITION
161
218
  GUERRILLA
162
219
  HACKATHON
163
220
  HEADLINER_SHOW
221
+ HIIT_CLASS
164
222
  HOLIDAY_PARTY
165
223
  HYBRID_EVENT
166
224
  IMMERSIVE_EXPERIENCE
167
225
  IMPROV_SHOW
226
+ INDUSTRY_PANEL
168
227
  INFLUENCER_EVENT
169
228
  INSTALLATION
170
229
  INTERACTIVE_INSTALLATION
230
+ INVESTOR_EVENT
231
+ JAM_SESSION
171
232
  JAZZ_NIGHT
172
233
  JAZZ_SESSION
234
+ JOB_FAIR
173
235
  KARAOKE_NIGHT
174
236
  KEYNOTE
175
237
  LATE_NIGHT_SET
238
+ LATIN_NIGHT
239
+ LECTURE
176
240
  LISTENING_PARTY
177
241
  LIVESTREAM
242
+ LIVE_AUDIO_ROOM
243
+ LIVE_PERFORMANCE
244
+ LIVE_PODCAST
245
+ LOCAL_MEETUP
178
246
  LOOKBOOK_SHOOT
247
+ MAGIC_SHOW
179
248
  MASQUERADE
180
249
  MASTERCLASS
181
250
  MEDITATION
182
251
  MEET_AND_GREET
183
252
  MEMBERS_ONLY
253
+ MIXOLOGY_CLASS
184
254
  MOBILE_TOUR
185
255
  MUSEUM_EVENT
186
256
  MUSICAL
187
257
  MUSIC_FESTIVAL
188
258
  MUSIC_VIDEO_PREMIERE
259
+ NETWORKING_EVENT
189
260
  NETWORKING_MIXER
190
261
  NFT_MINT
262
+ NUTRITION_WORKSHOP
263
+ OFFICE_HOURS
264
+ ONLINE_CLASS
265
+ ONLINE_COURSE
191
266
  ONLINE_DROP
267
+ ONLINE_LECTURE
268
+ ONLINE_OFFICE_HOURS
192
269
  ONLINE_PREMIERE
193
270
  ONLINE_WATCH_PARTY
271
+ OPEN_DECKS
272
+ OPEN_HOUSE
194
273
  OPEN_MIC
195
274
  OPERA
196
275
  ORCHESTRA
@@ -199,6 +278,10 @@ enum MomentSubcategory {
199
278
  PANEL
200
279
  PERFORMANCE_ART
201
280
  PHOTO_ACTIVATION
281
+ PHOTO_EXHIBITION
282
+ PICKUP_GAME
283
+ PILATES_CLASS
284
+ PITCH_NIGHT
202
285
  POOL_PARTY
203
286
  POP_UP_BOUTIQUE
204
287
  POP_UP_DINING
@@ -209,8 +292,11 @@ enum MomentSubcategory {
209
292
  PREVIEW
210
293
  PRIDE_FESTIVAL
211
294
  PRIVATE_EVENT
295
+ PRODUCT_DEMO
212
296
  PRODUCT_LAUNCH
297
+ Q_AND_A_SCREENING
213
298
  RAVE
299
+ READING
214
300
  RELEASE_PARTY
215
301
  RESIDENCY
216
302
  RESTAURANT_OPENING
@@ -225,41 +311,61 @@ enum MomentSubcategory {
225
311
  SAMPLING
226
312
  SECRET_DINING
227
313
  SEMINAR
314
+ SERIES_SCREENING
228
315
  SHORT_FILM
229
316
  SHOWCASE
230
317
  SHOWROOM
231
318
  SILENT_DISCO
319
+ SKATE_JAM
232
320
  SOCIAL_CHALLENGE
233
321
  SOLO_EXHIBITION
322
+ SONGWRITER_ROUND
234
323
  SOUND_BATH
235
324
  SPA_EXPERIENCE
236
325
  SPOKEN_WORD
237
326
  SPONSORSHIP
238
327
  SPORTS_CLINIC
328
+ SPORTS_TRAINING
239
329
  SPORTS_WATCH_PARTY
240
330
  STANDUP_COMEDY
331
+ STORYTELLING
332
+ STREAMING_RELEASE
241
333
  STREET_TEAM
242
334
  STUDIO_VISIT
335
+ STUDY_GROUP
336
+ STYLING_SESSION
243
337
  SUMMIT
244
338
  SUPPER_CLUB
245
339
  TAILGATE
246
340
  TASTING
341
+ TECH_FESTIVAL
247
342
  THEATER
248
343
  THEMED_NIGHT
249
344
  TOURNAMENT
250
345
  TOUR_STOP
346
+ TOWN_HALL
347
+ TRADE_SHOW
348
+ TRAINING
251
349
  TRIBUTE_SHOW
252
350
  TRUNK_SHOW
351
+ TV_PREMIERE
253
352
  TWITTER_SPACE
254
353
  VARIETY_SHOW
255
354
  VENUE_OPENING
256
355
  VIRTUAL_CONCERT
257
356
  VIRTUAL_EVENT
357
+ VIRTUAL_EXPO
358
+ VIRTUAL_MEETUP
359
+ VIRTUAL_NETWORKING
360
+ VIRTUAL_SUMMIT
361
+ VIRTUAL_WORKSHOP
362
+ VOLUNTEER_EVENT
258
363
  WAREHOUSE_PARTY
259
364
  WATCH_PARTY
260
365
  WEBINAR
261
366
  WELLNESS_FESTIVAL
262
367
  WELLNESS_WORKSHOP
368
+ WINE_TASTING
263
369
  WORKSHOP
264
370
  YOGA_SESSION
265
371
  }
@@ -327,6 +433,11 @@ enum TicketExtensionStatus {
327
433
  REFUNDED
328
434
  }
329
435
 
436
+ enum TagSource {
437
+ MANUAL
438
+ AUTO
439
+ }
440
+
330
441
  # ─── Types ───────────────────────────────────────────────────────────────────
331
442
 
332
443
  type Currency {
@@ -380,6 +491,32 @@ type MomentCoverImage {
380
491
  mimeType: String!
381
492
  }
382
493
 
494
+ type Tag {
495
+ uid: ID!
496
+ name: String!
497
+ createdAt: DateTime!
498
+ updatedAt: DateTime!
499
+ }
500
+
501
+ type MomentTagAssignment {
502
+ tag: Tag!
503
+ source: TagSource!
504
+ isPublic: Boolean!
505
+ confidence: Float!
506
+ }
507
+
508
+ type GetMomentTagAssignmentsResponse {
509
+ assignments: [MomentTagAssignment!]!
510
+ totalCount: Int!
511
+ hasNextPage: Boolean!
512
+ nextCursor: String
513
+ }
514
+
515
+ input PaginationInput {
516
+ cursor: String
517
+ take: Float
518
+ }
519
+
383
520
  type Moment {
384
521
  uid: ID!
385
522
  name: String!
@@ -404,6 +541,11 @@ type Moment {
404
541
  """Cover image for the moment. Null if no cover image is set."""
405
542
  coverImage: MomentCoverImage!
406
543
  venue: Venue
544
+ """Public tag assignments owned by the authenticated partner's brand."""
545
+ momentTags(
546
+ pagination: PaginationInput
547
+ sources: [TagSource!]
548
+ ): GetMomentTagAssignmentsResponse!
407
549
  ticketTiers: [TicketTier!]!
408
550
  createdAt: DateTime!
409
551
  updatedAt: DateTime!
@@ -514,6 +656,28 @@ type PartnerCustomer {
514
656
  tickets: [Ticket!]!
515
657
  }
516
658
 
659
+ type PartnerAudienceCustomer {
660
+ uid: String!
661
+ name: String
662
+ email: String
663
+ emailVerified: Boolean!
664
+ phoneNumber: String
665
+ city: String
666
+ country: String
667
+ source: UserSource!
668
+ isSubscribed: Boolean!
669
+ emailConsentStatus: ConsentStatus!
670
+ smsConsentStatus: ConsentStatus!
671
+ communicationsOptedOut: Boolean!
672
+ isSuppressed: Boolean!
673
+ totalSpendUsdCents: Int!
674
+ numMoments: Int!
675
+ numProducts: Int!
676
+ numEchoes: Int!
677
+ createdAt: DateTime!
678
+ updatedAt: DateTime!
679
+ }
680
+
517
681
  type PartnerMomentStats {
518
682
  generatedAt: DateTime!
519
683
  ticketsCount: Int!
@@ -740,6 +904,13 @@ type GetPartnerCustomersResponse {
740
904
  nextCursor: String
741
905
  }
742
906
 
907
+ type GetPartnerAudienceResponse {
908
+ customers: [PartnerAudienceCustomer!]!
909
+ hasNextPage: Boolean!
910
+ nextCursor: String
911
+ totalCount: Int
912
+ }
913
+
743
914
  type GetBrandEchoesForUserResponse {
744
915
  echoes: [Echo!]!
745
916
  totalCount: Int!
@@ -977,6 +1148,46 @@ input PartnerMomentsFiltersInput {
977
1148
  includePrivate: Boolean
978
1149
  }
979
1150
 
1151
+ input PartnerAudienceFiltersInput {
1152
+ customerUids: [String!]
1153
+ search: String
1154
+ hasEmail: Boolean
1155
+ hasPhone: Boolean
1156
+ isSubscribed: Boolean
1157
+ emailConsentStatuses: [ConsentStatus!]
1158
+ smsConsentStatuses: [ConsentStatus!]
1159
+ communicationsOptedOut: Boolean
1160
+ isSuppressed: Boolean
1161
+ sources: [UserSource!]
1162
+ cities: [String!]
1163
+ countries: [String!]
1164
+ createdAtFrom: DateTime
1165
+ createdAtBefore: DateTime
1166
+ updatedAtFrom: DateTime
1167
+ updatedAtBefore: DateTime
1168
+ minTotalSpendUsdCents: Int
1169
+ maxTotalSpendUsdCents: Int
1170
+ minNumMoments: Int
1171
+ maxNumMoments: Int
1172
+ momentUids: [String!]
1173
+ ticketTierUids: [String!]
1174
+ brandListUids: [String!]
1175
+ membershipTierUids: [String!]
1176
+ }
1177
+
1178
+ input PartnerAudienceSortInput {
1179
+ field: PartnerAudienceSortField!
1180
+ direction: SortDirection!
1181
+ }
1182
+
1183
+ input GetPartnerAudienceInput {
1184
+ filters: PartnerAudienceFiltersInput
1185
+ sort: PartnerAudienceSortInput
1186
+ cursor: String
1187
+ take: Int
1188
+ includeTotalCount: Boolean
1189
+ }
1190
+
980
1191
  # ─── Queries ─────────────────────────────────────────────────────────────────
981
1192
 
982
1193
  type BrandAgentEmailSendMessage {
@@ -1003,6 +1214,17 @@ type BrandAgentEmailSendBatch {
1003
1214
  messages: [BrandAgentEmailSendMessage!]!
1004
1215
  }
1005
1216
 
1217
+ type AgentThreadSeedContext {
1218
+ """
1219
+ Rendered prior-conversation transcript to seed a fresh agent session with,
1220
+ or null when the thread has no renderable history.
1221
+ """
1222
+ seed: String
1223
+ includedMessages: Int!
1224
+ totalMessages: Int!
1225
+ truncated: Boolean!
1226
+ }
1227
+
1006
1228
  type Query {
1007
1229
  """
1008
1230
  Get details for the brand associated with the partner token.
@@ -1012,6 +1234,13 @@ type Query {
1012
1234
  """Retrieve one AgentMail send batch owned by the authenticated partner brand."""
1013
1235
  getPartnerAgentEmailBatch(batchUid: String!): BrandAgentEmailSendBatch!
1014
1236
 
1237
+ """
1238
+ Seed context for restoring a conversation thread into a fresh agent
1239
+ session. Agent-access-token mode only: admin, brand, and thread scope all
1240
+ derive from the verified token claims, so the operation takes no arguments.
1241
+ """
1242
+ getAgentThreadSeed: AgentThreadSeedContext!
1243
+
1015
1244
  """
1016
1245
  Get paginated moments for the brand associated with the partner token.
1017
1246
  """
@@ -1081,6 +1310,12 @@ type Query {
1081
1310
  take: Int
1082
1311
  ): GetPartnerCustomersResponse!
1083
1312
 
1313
+ """
1314
+ Get the authenticated brand's customer audience using an allowlisted profile,
1315
+ effective consent, and aggregate-metrics projection.
1316
+ """
1317
+ getPartnerAudience(input: GetPartnerAudienceInput): GetPartnerAudienceResponse!
1318
+
1084
1319
  """
1085
1320
  Get a moment collection by slug.
1086
1321
  Returns the collection with its moments and links.
@@ -1158,6 +1393,8 @@ input SendPartnerAgentEmailInput {
1158
1393
  idempotencyKey: String!
1159
1394
  """One to ten personalized, single-recipient plain-text emails."""
1160
1395
  messages: [BrandAgentEmailMessageInput!]!
1396
+ """Brand-agent session callers only; rejected for partner API keys"""
1397
+ toolCallId: String
1161
1398
  }
1162
1399
 
1163
1400
  input VenueInput {
@@ -1224,6 +1461,10 @@ input CreatePartnerMomentInput {
1224
1461
  subcategory: MomentSubcategory
1225
1462
  """Ticket tiers to create along with the moment."""
1226
1463
  ticketTiers: [CreatePartnerTicketTierInput!]
1464
+ """Brand-agent session callers only; rejected for partner API keys"""
1465
+ idempotencyKey: String
1466
+ """Brand-agent session callers only; rejected for partner API keys"""
1467
+ toolCallId: String
1227
1468
  }
1228
1469
 
1229
1470
  input GetPartnerTicketTiersForMomentInput {
@@ -1382,6 +1623,13 @@ input PostSubscriptionMessageInput {
1382
1623
 
1383
1624
  input CreatePartnerBrandSubscriptionInput {
1384
1625
  compliance: SubscriptionComplianceInput
1626
+
1627
+ """
1628
+ Exact opt-in disclosure the subscriber accepted, stored as consent evidence
1629
+ alongside the subscription compliance record. Send the verbatim text shown on
1630
+ your signup surface — it is the record of what the subscriber agreed to.
1631
+ """
1632
+ consentText: String
1385
1633
  email: String
1386
1634
 
1387
1635
  """Optional full name. If provided, include first and last name."""