@itm-studio/partner-sdk 0.6.0 → 0.6.2

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.6.0",
3
+ "version": "0.6.2",
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",
@@ -453,6 +453,66 @@ enum ContributionPageStatusFilter {
453
453
  PAUSED
454
454
  }
455
455
 
456
+ """
457
+ How a merch payment collected outside ITM was taken. A null paymentMethod
458
+ means the purchase was paid through ITM checkout, in person through ITM, or was free.
459
+ """
460
+ enum MerchPurchasePaymentMethod {
461
+ """Physical currency."""
462
+ CASH
463
+ """Card taken on a non-ITM terminal or processor (Square, SumUp, Clover...), including Apple Pay or Google Pay tapped on that terminal."""
464
+ CARD
465
+ """Venmo, Cash App, PayPal, Zelle and similar apps."""
466
+ DIGITAL_WALLET
467
+ """ACH, wire or bank deposit."""
468
+ BANK_TRANSFER
469
+ """Check or money order."""
470
+ CHECK
471
+ """Anything else, such as a third-party gift card, store credit or crypto."""
472
+ OTHER
473
+ }
474
+
475
+ enum MerchPurchaseSource {
476
+ APP
477
+ DASHBOARD
478
+ POS
479
+ """Recorded through the partner API."""
480
+ PARTNER
481
+ }
482
+
483
+ enum MerchPurchaseState {
484
+ FAILED
485
+ PENDING
486
+ REFUNDED
487
+ REFUND_PENDING
488
+ SUCCESS
489
+ }
490
+
491
+ enum MerchPurchaseFulfillmentChoice {
492
+ PICKUP
493
+ SHIPPING
494
+ }
495
+
496
+ """How merch reaches the customer: pickup at a moment, shipping, or either."""
497
+ enum MerchFulfillmentType {
498
+ MOMENT
499
+ MOMENT_OR_SHIPPING
500
+ SHIPPING
501
+ }
502
+
503
+ """EXTERNAL means Shopify fulfills the order; such purchases cannot be redeemed from ITM."""
504
+ enum FulfillmentPlatform {
505
+ EXTERNAL
506
+ ITM
507
+ }
508
+
509
+ """Only ITM-checkout merch can be recorded through createPartnerMerchPurchase."""
510
+ enum CheckoutPlatform {
511
+ EXTERNAL
512
+ ITM
513
+ WEBSITE
514
+ }
515
+
456
516
  # ─── Types ───────────────────────────────────────────────────────────────────
457
517
 
458
518
  type Currency {
@@ -797,6 +857,140 @@ type MerchPurchase {
797
857
  updatedAt: DateTime!
798
858
  }
799
859
 
860
+ """
861
+ A merch purchase as a partner token sees it. Related records are referenced by
862
+ uid only; the customer's ITM account is never exposed.
863
+ """
864
+ type PartnerMerchPurchase {
865
+ uid: ID!
866
+ merchUid: String!
867
+ merchSizeUid: String!
868
+ """The customer's ITM user uid. Null for box-office walk-up purchases with no customer."""
869
+ userUid: String
870
+ pickupMomentUid: String
871
+ quantity: Int!
872
+ """Total charged in ITM cents (major units times 100)."""
873
+ amountCents: Int!
874
+ currencyCode: String!
875
+ state: MerchPurchaseState!
876
+ source: MerchPurchaseSource!
877
+ """How a payment collected outside ITM was taken; null for ITM-paid or free purchases."""
878
+ paymentMethod: MerchPurchasePaymentMethod
879
+ """Who took the off-platform payment, e.g. "Square POS" or "Venmo"."""
880
+ paymentProvider: String
881
+ """The off-platform payment system's transaction or order ID."""
882
+ externalPaymentReference: String
883
+ fulfillmentChoice: MerchPurchaseFulfillmentChoice
884
+ notes: String
885
+ """When the purchase was handed over; null until redeemed."""
886
+ redeemedAt: DateTime
887
+ createdAt: DateTime!
888
+ updatedAt: DateTime!
889
+ }
890
+
891
+ type MerchSize {
892
+ uid: ID!
893
+ name: String!
894
+ isSoldOut: Boolean!
895
+ createdAt: DateTime!
896
+ updatedAt: DateTime!
897
+ }
898
+
899
+ type Merch {
900
+ uid: ID!
901
+ name: String!
902
+ description: String
903
+ """Price in ITM cents (major units times 100)."""
904
+ price: Float!
905
+ currency: Currency!
906
+ fulfillmentType: MerchFulfillmentType!
907
+ fulfillmentPlatform: FulfillmentPlatform!
908
+ checkoutPlatform: CheckoutPlatform!
909
+ maxPerUser: Int
910
+ isLive: Boolean!
911
+ merchSizes: [MerchSize!]!
912
+ """Moments where this merch can be picked up; pass one as pickupMomentUid."""
913
+ merchPickupMoments: [Moment!]!
914
+ createdAt: DateTime!
915
+ updatedAt: DateTime!
916
+ }
917
+
918
+ type GetMerchPaginatedResponse {
919
+ items: [Merch!]!
920
+ totalCount: Int!
921
+ hasNextPage: Boolean!
922
+ nextCursor: String
923
+ }
924
+
925
+ input MerchFiltersInput {
926
+ """Merch associated with this moment, including display, upsell and pickup links. Check merchPickupMoments for pickup eligibility."""
927
+ momentUid: String
928
+ search: String
929
+ }
930
+
931
+ input GetMerchPaginatedInput {
932
+ cursor: String
933
+ """Page size, 1-100. Defaults to 50."""
934
+ take: Int
935
+ query: String
936
+ filters: MerchFiltersInput
937
+ }
938
+
939
+ input PartnerMerchCustomerInput {
940
+ email: String
941
+ """Phone number with country code, e.g. +14155550123."""
942
+ phoneNumber: String
943
+ name: String
944
+ }
945
+
946
+ input PartnerMerchShippingAddressInput {
947
+ """Full name for shipping."""
948
+ name: String!
949
+ """Contact number for shipping."""
950
+ phoneNumber: String!
951
+ addressLine1: String!
952
+ addressLine2: String
953
+ city: String!
954
+ """State, province or region."""
955
+ state: String!
956
+ country: String!
957
+ postalCode: String!
958
+ }
959
+
960
+ input CreatePartnerMerchPurchaseInput {
961
+ """
962
+ Caller-generated id, 8-128 letters, digits, underscores or hyphens.
963
+ Retrying with the same requestUid returns the original purchase; different details are rejected.
964
+ """
965
+ requestUid: String!
966
+ merchUid: String!
967
+ merchSizeUid: String!
968
+ quantity: Int!
969
+ """Total collected in ITM cents (major units times 100, including zero-decimal currencies). 0 for a free purchase."""
970
+ amountCents: Int!
971
+ """ISO currency code; must match the merch's currency."""
972
+ currencyCode: String!
973
+ """How the customer paid outside ITM. Required when amountCents is above 0; omit for a free purchase."""
974
+ paymentMethod: MerchPurchasePaymentMethod
975
+ """Who took the payment, e.g. "Square POS" or "Venmo". Requires paymentMethod."""
976
+ paymentProvider: String
977
+ """The payment system's transaction or order ID, for reconciliation. Requires paymentMethod."""
978
+ externalPaymentReference: String
979
+ """Matched to an existing ITM account by phone number or email (verified login identities first) and never written onto it; a customer is created when nobody matches."""
980
+ customer: PartnerMerchCustomerInput!
981
+ """Pickup moment, required for pickup fulfillment."""
982
+ pickupMomentUid: String
983
+ """Required for merch offered as pickup or shipping."""
984
+ fulfillmentChoice: MerchPurchaseFulfillmentChoice
985
+ """Required when the purchase ships."""
986
+ shippingAddress: PartnerMerchShippingAddressInput
987
+ notes: String
988
+ """Mark the purchase redeemed (handed over) now. Not allowed for Shopify-fulfilled merch. Defaults to false."""
989
+ redeemed: Boolean
990
+ """Send ITM's SMS or email confirmation with the pickup QR code. Defaults to false."""
991
+ sendConfirmation: Boolean
992
+ }
993
+
800
994
  type PartnerCustomer {
801
995
  user: User!
802
996
  tickets: [Ticket!]!
@@ -834,6 +1028,7 @@ type PartnerMomentStats {
834
1028
  waitlistCount: Int!
835
1029
  externalRsvpCount: Int!
836
1030
  ticketRsvpRequestsCount: Int!
1031
+ guestlist: MomentGuestListTotals!
837
1032
  }
838
1033
 
839
1034
  type PartnerMomentAttendanceCount {
@@ -1783,6 +1978,11 @@ type Query {
1783
1978
  """Active brand-linked assets, newest first. Defaults to 50, capped at 100. READ_MEDIA for agents."""
1784
1979
  getPartnerMediaAssets(input: GetPartnerMediaAssetsInput!): GetPartnerMediaAssetsResponse!
1785
1980
 
1981
+ """
1982
+ List the brand's merch with sizes and pickup moments, to find the merchUid, merchSizeUid and pickupMomentUid for createPartnerMerchPurchase.
1983
+ """
1984
+ getPartnerMerch(input: GetMerchPaginatedInput!): GetMerchPaginatedResponse!
1985
+
1786
1986
  """An active asset linked to the caller's brand; null when unavailable. READ_MEDIA for agents."""
1787
1987
  getPartnerMediaAsset(uid: String!): MediaAsset
1788
1988
 
@@ -1980,6 +2180,8 @@ type Query {
1980
2180
  getPartnerPlanBudget(budgetUid: String!): PlanBudget!
1981
2181
  getPartnerPlanningSource(offset: Int! = 0, take: Int! = 50, uid: String!): PlanningSource!
1982
2182
  getPartnerPlanningProposal(uid: String!): PlanningProposal!
2183
+ getPartnerGuestListCheckIns(cursor: String, guestlistUid: String!, momentSlug: String!, take: Int): GetPartnerGuestListCheckInsResponse!
2184
+ getPartnerGuestListForMoment(cursor: String, filters: GetMomentGuestListFiltersInput, momentSlug: String!, sort: MomentGuestListSortInput, take: Int): GetPartnerMomentGuestListResponse!
1983
2185
  }
1984
2186
 
1985
2187
  # ─── Input Types ──────────────────────────────────────────────────────────────
@@ -2360,6 +2562,15 @@ type Mutation {
2360
2562
  """Log a payment received off-site. Brand scope comes from the authenticated token or agent session. Amount is in ITM cents (major units times 100). Retain requestUid across retries."""
2361
2563
  createPartnerManualContribution(input: CreateManualContributionInput!): ContributionAdmin!
2362
2564
 
2565
+ """
2566
+ Record a merch sale whose payment was collected outside ITM (cash, a card terminal, Venmo...), so it reaches the brand's CRM.
2567
+ Brand scope comes from the token. Amount is in ITM cents (major units times 100). Retain requestUid across retries.
2568
+ """
2569
+ createPartnerMerchPurchase(input: CreatePartnerMerchPurchaseInput!): PartnerMerchPurchase!
2570
+
2571
+ """Mark one of the brand's merch purchases redeemed (handed over). Redeeming an already redeemed purchase returns it unchanged."""
2572
+ redeemPartnerMerchPurchase(merchPurchaseUid: String!): PartnerMerchPurchase!
2573
+
2363
2574
  reserveAgentMediaUpload(input: ReserveAgentMediaUploadInput!): AgentMediaUploadReservation!
2364
2575
  finishAgentMediaUpload(uid: String!): Boolean!
2365
2576
 
@@ -2885,3 +3096,228 @@ input UpdatePlanInput {
2885
3096
  slug: String
2886
3097
  status: PlanStatus
2887
3098
  }
3099
+
3100
+ type GetPartnerGuestListCheckInsResponse {
3101
+ batches: [PartnerGuestListCheckIn!]!
3102
+ hasNextPage: Boolean!
3103
+ nextCursor: String
3104
+ totalCount: Int!
3105
+ }
3106
+
3107
+ type PartnerGuestListCheckIn {
3108
+ """Of those, still checked in (not undone)."""
3109
+ activeCount: Int!
3110
+ checkedInAt: DateTime!
3111
+ """People admitted by this action."""
3112
+ count: Int!
3113
+ source: MomentGuestListCheckInSource!
3114
+ """Pass to undoGuestCheckIn as checkInBatchUid."""
3115
+ uid: ID!
3116
+ voidReason: String
3117
+ """Most recent undo of this batch, if any."""
3118
+ voidedAt: DateTime
3119
+ }
3120
+
3121
+ """
3122
+ How a guest list check-in was recorded. Clients send QR_SCAN or MANUAL; BULK and BACKFILL are recorded by the server.
3123
+ """
3124
+ enum MomentGuestListCheckInSource {
3125
+ BACKFILL
3126
+ BULK
3127
+ MANUAL
3128
+ QR_SCAN
3129
+ }
3130
+
3131
+ input GetMomentGuestListFiltersInput {
3132
+ """Guests added by any of these admins."""
3133
+ addedByAdminUids: [String!]
3134
+ """Guests in any of these check-in states."""
3135
+ checkInStatus: [MomentGuestListCheckInStatus!]
3136
+ checkedIn: Boolean
3137
+ hasEmail: Boolean
3138
+ hasNotes: Boolean
3139
+ """true: party of 2 or more. false: just the guest."""
3140
+ hasPlusOnes: Boolean
3141
+ """
3142
+ Also include guests with no labels (with labelUids: any of those labels or no label).
3143
+ """
3144
+ includeUnlabeled: Boolean
3145
+ labelUid: String
3146
+ """Guests with any of these labels. Combines with labelUid."""
3147
+ labelUids: [String!]
3148
+ """
3149
+ Guests on this occurrence: those assigned to it plus guests with no assigned occurrences (whole moment).
3150
+ """
3151
+ momentOccurrenceUid: String
3152
+ """Whether the guest has been sent their QR code email."""
3153
+ qrCodeSent: Boolean
3154
+ search: String
3155
+ sessionDate: DateTime
3156
+ }
3157
+
3158
+ """
3159
+ NOT_ARRIVED: no one in the party is in. PARTIAL: some are. ALL_IN: the whole party is in.
3160
+ """
3161
+ enum MomentGuestListCheckInStatus {
3162
+ ALL_IN
3163
+ NOT_ARRIVED
3164
+ PARTIAL
3165
+ }
3166
+
3167
+ input MomentGuestListSortInput {
3168
+ """
3169
+ Defaults: CREATED_AT desc, NAME asc, PARTY_SIZE desc, LAST_CHECKED_IN desc. Guests never checked in sort last.
3170
+ """
3171
+ direction: SortDirection
3172
+ field: MomentGuestListSortField!
3173
+ }
3174
+
3175
+ enum MomentGuestListSortField {
3176
+ CREATED_AT
3177
+ LAST_CHECKED_IN
3178
+ NAME
3179
+ PARTY_SIZE
3180
+ }
3181
+
3182
+ type GetPartnerMomentGuestListResponse {
3183
+ guestLists: [PartnerMomentGuestList!]!
3184
+ hasNextPage: Boolean!
3185
+ nextCursor: String
3186
+ totalCount: Int!
3187
+ }
3188
+
3189
+ type PartnerMomentGuestList {
3190
+ """Flag this guest's arrival in the live check-in feed."""
3191
+ alertOnArrival: Boolean!
3192
+ checkInStatus: MomentGuestListCheckInStatus!
3193
+ checkedInAt: DateTime
3194
+ createdAt: DateTime!
3195
+ email: String
3196
+ guestInfos: [MomentGuestListGuestInfo!]!
3197
+ invitationResponse: PartnerGuestListInvitationResponse
3198
+ labels: [MomentGuestListLabel!]!
3199
+ momentOccurrences: [MomentOccurrence!]!
3200
+ name: String!
3201
+ notes: String
3202
+ numCheckedIn: Float!
3203
+ numGuests: Float!
3204
+ phoneNumber: String
3205
+ """Additional guests: numGuests includes the invitee."""
3206
+ plusOnes: Int!
3207
+ """Last time this guest's QR code email was sent."""
3208
+ qrCodeSentAt: DateTime
3209
+ respondedToInvitation: Boolean!
3210
+ sessionDate: DateTime
3211
+ source: MomentGuestListSource
3212
+ uid: ID!
3213
+ updatedAt: DateTime!
3214
+ }
3215
+
3216
+ type MomentGuestListGuestInfo {
3217
+ address: JSON
3218
+ addressString: String
3219
+ """Date of birth as YYYY-MM-DD."""
3220
+ birthday: String
3221
+ companyName: String
3222
+ createdAt: DateTime!
3223
+ fullName: String
3224
+ """0 is the invitee; 1 and up are plus-ones."""
3225
+ guestIndex: Int!
3226
+ instagramHandle: String
3227
+ invitedBy: String
3228
+ jobTitle: String
3229
+ linkedinUrl: String
3230
+ phoneNumber: String
3231
+ submittedAt: DateTime!
3232
+ tiktokHandle: String
3233
+ uid: ID!
3234
+ updatedAt: DateTime!
3235
+ websiteUrl: String
3236
+ xHandle: String
3237
+ youtubeUrl: String
3238
+ }
3239
+
3240
+ type PartnerGuestListInvitationResponse {
3241
+ createdAt: DateTime!
3242
+ email: String!
3243
+ guestNames: [String!]
3244
+ name: String!
3245
+ """
3246
+ Total number of guests attending, including the invitee themselves (e.g. 3 means the invitee + 2 additional guests)
3247
+ """
3248
+ numGuests: Int!
3249
+ uid: ID!
3250
+ updatedAt: DateTime!
3251
+ }
3252
+
3253
+ type MomentGuestListLabel {
3254
+ """Flag arrivals of guests with this label in the live check-in feed."""
3255
+ alertOnArrival: Boolean!
3256
+ color: String
3257
+ createdAt: DateTime!
3258
+ description: String
3259
+ name: String!
3260
+ uid: ID!
3261
+ updatedAt: DateTime!
3262
+ }
3263
+
3264
+ type MomentOccurrence {
3265
+ createdAt: DateTime!
3266
+ endsAt: DateTime!
3267
+ label: String
3268
+ sortOrder: Int!
3269
+ source: MomentOccurrenceSource!
3270
+ startsAt: DateTime!
3271
+ status: MomentOccurrenceStatus!
3272
+ ticketTierSetupStatus: MomentTicketTierSetupStatus!
3273
+ timezone: String!
3274
+ uid: ID!
3275
+ updatedAt: DateTime!
3276
+ }
3277
+
3278
+ enum MomentOccurrenceSource {
3279
+ BACKFILLED
3280
+ DEFAULT
3281
+ EXPLICIT
3282
+ GENERATED
3283
+ }
3284
+
3285
+ enum MomentOccurrenceStatus {
3286
+ ACTIVE
3287
+ CANCELED
3288
+ }
3289
+
3290
+ enum MomentTicketTierSetupStatus {
3291
+ FAILED
3292
+ PENDING
3293
+ READY
3294
+ RUNNING
3295
+ }
3296
+
3297
+ """How a guest list entry was added."""
3298
+ enum MomentGuestListSource {
3299
+ BRAND_LIST
3300
+ BULK
3301
+ DUPLICATE
3302
+ IMPORT
3303
+ INVITATION
3304
+ MANUAL
3305
+ MEMBERSHIP
3306
+ REQUEST
3307
+ }
3308
+
3309
+ """
3310
+ Moment-wide guest list totals. Each guest counts once, however many labels or time slots they have.
3311
+ """
3312
+ type MomentGuestListTotals {
3313
+ """Guest list entries."""
3314
+ names: Int!
3315
+ namesAllIn: Int!
3316
+ namesNotArrived: Int!
3317
+ namesPartial: Int!
3318
+ """People across all parties."""
3319
+ people: Int!
3320
+ peopleCheckedIn: Int!
3321
+ peopleRemaining: Int!
3322
+ plusOnes: Int!
3323
+ }