@itm-studio/partner-sdk 0.6.10 → 0.6.11
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 +124 -0
- package/dist/index.d.mts +286 -1
- package/dist/index.d.ts +286 -1
- package/dist/index.js +572 -187
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +571 -188
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
- package/schema/integration.json +177 -0
- package/schema/partner.graphql +53 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itm-studio/partner-sdk",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.11",
|
|
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",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"schema"
|
|
28
28
|
],
|
|
29
29
|
"scripts": {
|
|
30
|
-
"generate": "genql --schema ./schema/partner.graphql --output ./src/generated",
|
|
30
|
+
"generate": "genql --schema ./schema/partner.graphql --output ./src/generated && node scripts/generate-integration-contract.mjs",
|
|
31
31
|
"build": "npm run generate && tsup",
|
|
32
32
|
"test": "vitest run",
|
|
33
33
|
"test:package-guards": "node scripts/verify-runtime-guards.mjs",
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"@types/pngjs": "^6.0.5",
|
|
53
53
|
"@types/qrcode": "^1.5.6",
|
|
54
54
|
"esbuild": "0.27.3",
|
|
55
|
+
"graphql": "^16.9.0",
|
|
55
56
|
"jsqr": "^1.4.0",
|
|
56
57
|
"msw": "^2.7.0",
|
|
57
58
|
"pngjs": "^7.0.0",
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
{
|
|
2
|
+
"getPartnerBrand": {
|
|
3
|
+
"kind": "query",
|
|
4
|
+
"scope": "itm:workspace:read",
|
|
5
|
+
"fields": "uid name slug bio publicUrl customDomain spotifyUrl youtubeEmbedUrl"
|
|
6
|
+
},
|
|
7
|
+
"getPartnerMomentsForBrand": {
|
|
8
|
+
"kind": "query",
|
|
9
|
+
"scope": "itm:workspace:read",
|
|
10
|
+
"fields": "moments{uid name slug publicUrl blurb startDate endDate timezone status type category isPrivate soldOut capacity venue{name city country}} totalCount hasNextPage nextCursor"
|
|
11
|
+
},
|
|
12
|
+
"getPartnerMoment": {
|
|
13
|
+
"kind": "query",
|
|
14
|
+
"scope": "itm:workspace:read",
|
|
15
|
+
"fields": "uid name slug publicUrl blurb startDate endDate timezone status type category isPrivate soldOut capacity venue{name address city country postalCode} description minimumAge externalUrl lineupDisplayLabel coverImage{url} ticketTiers{uid name description currency{code} attendanceMode soldOut minPerUser maxPerUser}"
|
|
16
|
+
},
|
|
17
|
+
"getPartnerMomentStats": {
|
|
18
|
+
"kind": "query",
|
|
19
|
+
"scope": "itm:workspace:read",
|
|
20
|
+
"fields": "generatedAt ticketsCount paidTicketsCount freeTicketsCount waitlistCount externalRsvpCount ticketRsvpRequestsCount inPersonOrdersCount inPersonChargesCount guestlist{names namesAllIn namesPartial namesNotArrived people peopleCheckedIn peopleRemaining plusOnes}"
|
|
21
|
+
},
|
|
22
|
+
"getPartnerMomentAttendanceStats": {
|
|
23
|
+
"kind": "query",
|
|
24
|
+
"scope": "itm:workspace:read",
|
|
25
|
+
"fields": "momentUid momentSlug generatedAt tickets{total checkedIn tiers{tierUid name label total checkedIn}} guestlist{total checkedIn unlabeled{total checkedIn} labels{labelUid name total checkedIn}}"
|
|
26
|
+
},
|
|
27
|
+
"getPartnerTicketTiersForMoment": {
|
|
28
|
+
"kind": "query",
|
|
29
|
+
"scope": "itm:workspace:read",
|
|
30
|
+
"fields": "ticketTiers{uid name label price facilityFee currencyCode supply remainingSupply fillRate isActive isPrivate slotDate slotDurationHours} totalCount hasNextPage nextCursor"
|
|
31
|
+
},
|
|
32
|
+
"getPartnerMomentCollection": {
|
|
33
|
+
"kind": "query",
|
|
34
|
+
"scope": "itm:workspace:read",
|
|
35
|
+
"fields": "uid name slug description subLabel links{url label} moments{uid name slug startDate endDate status soldOut venue{name city}}"
|
|
36
|
+
},
|
|
37
|
+
"getPartnerDrops": {
|
|
38
|
+
"kind": "query",
|
|
39
|
+
"scope": "itm:workspace:read",
|
|
40
|
+
"fields": "drops{uid name slug publicUrl subtitle isPublic isActive ctaType ctaUrl captureName captureEmail createdAt} totalCount hasNextPage nextCursor"
|
|
41
|
+
},
|
|
42
|
+
"getPartnerPublicEchoes": {
|
|
43
|
+
"kind": "query",
|
|
44
|
+
"scope": "itm:workspace:read",
|
|
45
|
+
"fields": "echoes{uid type name slug publicUrl description postBody publishTime externalLink moment{uid name slug}} totalCount hasNextPage nextCursor"
|
|
46
|
+
},
|
|
47
|
+
"getPartnerMerch": {
|
|
48
|
+
"kind": "query",
|
|
49
|
+
"scope": "itm:workspace:read",
|
|
50
|
+
"fields": "items{uid name publicUrl description price currency{code} fulfillmentType isLive maxPerUser merchSizes{uid name isSoldOut}} totalCount hasNextPage nextCursor"
|
|
51
|
+
},
|
|
52
|
+
"getPartnerMembershipTiers": {
|
|
53
|
+
"kind": "query",
|
|
54
|
+
"scope": "itm:workspace:read",
|
|
55
|
+
"fields": "membershipTiers{uid name slug publicUrl description passType billingInterval currencyCode price yearlyPrice oneTimePrice trialDays isActive isPublic memberLimit activeMemberCount benefits} totalCount hasNextPage nextCursor"
|
|
56
|
+
},
|
|
57
|
+
"getPartnerContributionPages": {
|
|
58
|
+
"kind": "query",
|
|
59
|
+
"scope": "itm:workspace:read",
|
|
60
|
+
"fields": "items{uid brandUid slug title description isAccepting archivedAt publicUrl currency{code} successfulContributionCount refundCount grossAmountCents refundedAmountCents netAmountCents createdAt} totalCount hasNextPage nextCursor"
|
|
61
|
+
},
|
|
62
|
+
"getPartnerPlans": {
|
|
63
|
+
"kind": "query",
|
|
64
|
+
"scope": "itm:workspace:read",
|
|
65
|
+
"fields": "plans{uid name slug description kind status tags{name} moodboardItemCount createdAt updatedAt} totalCount hasNextPage nextCursor"
|
|
66
|
+
},
|
|
67
|
+
"getPartnerPlan": {
|
|
68
|
+
"kind": "query",
|
|
69
|
+
"scope": "itm:workspace:read",
|
|
70
|
+
"fields": "uid name slug description kind status tags{name} updatedAt schedule{type timezone startsAt endsAt startsOn endsOn frequency interval daysOfWeek count includeDates excludeDates occurrenceCount times{time durationMinutes}} moodboard{items{uid type title note linkUrl position}}"
|
|
71
|
+
},
|
|
72
|
+
"getPartnerPlanDatePoll": {
|
|
73
|
+
"kind": "query",
|
|
74
|
+
"scope": "itm:workspace:read",
|
|
75
|
+
"fields": "uid status timeMode timezone durationMinutes replyByDate chosenOptionUid answeredCount notAnsweredCount needsUpdateCount results{optionUid localDate startTime endTime status freeCount ifNeedBeCount unavailableCount unansweredCount bestSlot{startTime endTime}}"
|
|
76
|
+
},
|
|
77
|
+
"getPartnerPlanBudgets": {
|
|
78
|
+
"kind": "query",
|
|
79
|
+
"scope": "itm:workspace:read",
|
|
80
|
+
"fields": "uid name planUid currencyCode currencyExponent revision scheduleIsStale updatedAt"
|
|
81
|
+
},
|
|
82
|
+
"getPartnerPlanBudget": {
|
|
83
|
+
"kind": "query",
|
|
84
|
+
"scope": "itm:workspace:read",
|
|
85
|
+
"fields": "uid name planUid currencyCode currencyExponent revision scheduleIsStale document calculation updatedAt"
|
|
86
|
+
},
|
|
87
|
+
"getPartnerAudience": {
|
|
88
|
+
"kind": "query",
|
|
89
|
+
"scope": "itm:audience:read",
|
|
90
|
+
"fields": "customers{uid name email phoneNumber city country isSubscribed emailConsentStatus smsConsentStatus communicationsOptedOut totalSpendUsdCents numMoments numProducts createdAt} totalCount hasNextPage nextCursor"
|
|
91
|
+
},
|
|
92
|
+
"getPartnerCustomersForMoment": {
|
|
93
|
+
"kind": "query",
|
|
94
|
+
"scope": "itm:audience:read",
|
|
95
|
+
"fields": "customers{user{uid name primaryEmail phoneNumber} tickets{uid status price redeemedAt ticketTier{uid name}}} totalCount hasNextPage nextCursor"
|
|
96
|
+
},
|
|
97
|
+
"getPartnerMembers": {
|
|
98
|
+
"kind": "query",
|
|
99
|
+
"scope": "itm:audience:read",
|
|
100
|
+
"fields": "members{uid status membershipNumber source purchaseType billingInterval quantity issuedAt currentPeriodEnd cancelAtPeriodEnd cancelledAt customer{uid name email phoneNumber} membershipTier{uid name slug passType}} totalCount hasNextPage nextCursor"
|
|
101
|
+
},
|
|
102
|
+
"getPartnerTicketsForMoment": {
|
|
103
|
+
"kind": "query",
|
|
104
|
+
"scope": "itm:audience:read",
|
|
105
|
+
"fields": "tickets{uid status price redeemedAt hasExpired notes createdAt ticketTier{uid name} user{uid name primaryEmail phoneNumber} payment{status}} totalCount hasNextPage nextCursor"
|
|
106
|
+
},
|
|
107
|
+
"getPartnerTicketsForUser": {
|
|
108
|
+
"kind": "query",
|
|
109
|
+
"scope": "itm:audience:read",
|
|
110
|
+
"fields": "tickets{uid status price redeemedAt hasExpired createdAt ticketTier{uid name} moment{uid name slug startDate}} totalCount hasNextPage nextCursor"
|
|
111
|
+
},
|
|
112
|
+
"getPartnerGuestListForMoment": {
|
|
113
|
+
"kind": "query",
|
|
114
|
+
"scope": "itm:audience:read",
|
|
115
|
+
"fields": "guestLists{uid name email phoneNumber plusOnes numGuests numCheckedIn checkInStatus checkedInAt notes source respondedToInvitation labels{uid name} createdAt} totalCount hasNextPage nextCursor"
|
|
116
|
+
},
|
|
117
|
+
"getPartnerGuestListCheckIns": {
|
|
118
|
+
"kind": "query",
|
|
119
|
+
"scope": "itm:audience:read",
|
|
120
|
+
"fields": "batches{uid checkedInAt count activeCount source voidedAt voidReason} totalCount hasNextPage nextCursor"
|
|
121
|
+
},
|
|
122
|
+
"getPartnerContributions": {
|
|
123
|
+
"kind": "query",
|
|
124
|
+
"scope": "itm:audience:read",
|
|
125
|
+
"fields": "items{uid contributionPageUid pageTitle donorName donorEmail donorPhoneNumber source currencyCode amountCents refundedAmountCents status paidAt note isGuest createdAt} totalCount hasNextPage nextCursor"
|
|
126
|
+
},
|
|
127
|
+
"getPartnerInPersonOrdersForMoment": {
|
|
128
|
+
"kind": "query",
|
|
129
|
+
"scope": "itm:audience:read",
|
|
130
|
+
"fields": "orders{uid status momentSlug currencyCode grossAmount subtotalAmount taxAmount refundedAmount paidAt createdAt user{uid name primaryEmail phoneNumber} items{uid type category name variantName quantity unitAmount lineAmount refundedQuantity}} totalCount hasNextPage nextCursor"
|
|
131
|
+
},
|
|
132
|
+
"getPartnerInPersonOrder": {
|
|
133
|
+
"kind": "query",
|
|
134
|
+
"scope": "itm:audience:read",
|
|
135
|
+
"fields": "uid status momentSlug currencyCode grossAmount subtotalAmount taxAmount refundedAmount paidAt createdAt user{uid name primaryEmail phoneNumber} items{uid type category name variantName quantity unitAmount lineAmount refundedQuantity} cancellationReason charge{uid status amount category cardBrand cardLast4 billingEmail} refunds{uid amount status reason failureReason source createdAt}"
|
|
136
|
+
},
|
|
137
|
+
"getPartnerInPersonChargesForMoment": {
|
|
138
|
+
"kind": "query",
|
|
139
|
+
"scope": "itm:audience:read",
|
|
140
|
+
"fields": "charges{uid orderUid status category currencyCode amount subtotalAmount taxAmount quantity description cardBrand cardLast4 billingEmail linkingStatus createdAt} totalCount hasNextPage nextCursor"
|
|
141
|
+
},
|
|
142
|
+
"getPartnerSpaceLocations": {
|
|
143
|
+
"kind": "query",
|
|
144
|
+
"scope": "itm:workspace:read",
|
|
145
|
+
"fields": "locations{uid name city country timezone spaces{uid name kind capacity setupMinutes teardownMinutes parts{uid}}} totalCount hasNextPage nextCursor"
|
|
146
|
+
},
|
|
147
|
+
"getPartnerSpaceCalendar": {
|
|
148
|
+
"kind": "query",
|
|
149
|
+
"scope": "itm:workspace:read",
|
|
150
|
+
"fields": "locationUid locationName timezone spaces{uid name kind capacity parts{uid}} holds{uid spaceUid localDate startsAt endsAt occupiedStartsAt occupiedEndsAt status position expiresAt respondBy isLapsed isChallengeOverdue request{uid title requesterKind organization headcount}} blocks{uid spaceUid startsAt endsAt reason} closures{spaceUid localDate startsAt endsAt note}"
|
|
151
|
+
},
|
|
152
|
+
"getPartnerSpaceAvailability": {
|
|
153
|
+
"kind": "query",
|
|
154
|
+
"scope": "itm:workspace:read",
|
|
155
|
+
"fields": "timezone spaces{spaceUid name dates{localDate outcome lineSize closed conflicts{kind label startsAt endsAt}}}"
|
|
156
|
+
},
|
|
157
|
+
"getPartnerMediaAssets": {
|
|
158
|
+
"kind": "query",
|
|
159
|
+
"scope": "itm:media:write",
|
|
160
|
+
"fields": "mediaAssets{uid url mimeType size dimensions{width height} createdAt} totalCount hasNextPage nextCursor"
|
|
161
|
+
},
|
|
162
|
+
"getPartnerMediaAsset": {
|
|
163
|
+
"kind": "query",
|
|
164
|
+
"scope": "itm:media:write",
|
|
165
|
+
"fields": "uid url mimeType size dimensions{width height} createdAt"
|
|
166
|
+
},
|
|
167
|
+
"createPartnerMediaUpload": {
|
|
168
|
+
"kind": "mutation",
|
|
169
|
+
"scope": "itm:media:write",
|
|
170
|
+
"fields": "uploadKey uploadUrl expiresAt"
|
|
171
|
+
},
|
|
172
|
+
"completePartnerMediaUpload": {
|
|
173
|
+
"kind": "mutation",
|
|
174
|
+
"scope": "itm:media:write",
|
|
175
|
+
"fields": "uid url mimeType size dimensions{width height} createdAt"
|
|
176
|
+
}
|
|
177
|
+
}
|
package/schema/partner.graphql
CHANGED
|
@@ -1329,6 +1329,8 @@ type GetBrandEchoesForUserResponse {
|
|
|
1329
1329
|
}
|
|
1330
1330
|
|
|
1331
1331
|
type PartnerTicketTier {
|
|
1332
|
+
"""ISO 4217 currency of the tier price and facility fee."""
|
|
1333
|
+
currencyCode: String!
|
|
1332
1334
|
"""Sold-through fill rate as a 0-1 ratio."""
|
|
1333
1335
|
fillRate: Float!
|
|
1334
1336
|
isActive: Boolean!
|
|
@@ -2264,6 +2266,8 @@ type Query {
|
|
|
2264
2266
|
getMomentLineupByToken(token: String!): PublicMomentLineupInfo!
|
|
2265
2267
|
getPartnerPlans(input: GetPlansInput!): GetPlansResponse!
|
|
2266
2268
|
getPartnerPlan(planUid: String!): Plan!
|
|
2269
|
+
"""Aggregate date-poll progress, or null if the plan has no poll."""
|
|
2270
|
+
getPartnerPlanDatePoll(planUid: String!): PartnerPlanDatePoll
|
|
2267
2271
|
getPartnerPlanBudgets(planUid: String!): [PlanBudgetSummary!]!
|
|
2268
2272
|
getPartnerPlanBudget(budgetUid: String!): PlanBudget!
|
|
2269
2273
|
getPartnerPlanningSource(offset: Int! = 0, take: Int! = 50, uid: String!): PlanningSource!
|
|
@@ -2936,6 +2940,55 @@ enum PlanMoodboardItemType {
|
|
|
2936
2940
|
MEDIA
|
|
2937
2941
|
}
|
|
2938
2942
|
|
|
2943
|
+
type PartnerPlanDatePoll {
|
|
2944
|
+
uid: ID!
|
|
2945
|
+
status: PlanDatePollStatus!
|
|
2946
|
+
timeMode: PlanDatePollTimeMode!
|
|
2947
|
+
timezone: String!
|
|
2948
|
+
durationMinutes: Int
|
|
2949
|
+
replyByDate: String
|
|
2950
|
+
chosenOptionUid: ID
|
|
2951
|
+
answeredCount: Int!
|
|
2952
|
+
notAnsweredCount: Int!
|
|
2953
|
+
needsUpdateCount: Int!
|
|
2954
|
+
results: [PartnerPlanDatePollOptionResult!]!
|
|
2955
|
+
}
|
|
2956
|
+
|
|
2957
|
+
type PartnerPlanDatePollOptionResult {
|
|
2958
|
+
optionUid: ID!
|
|
2959
|
+
localDate: String!
|
|
2960
|
+
startTime: String
|
|
2961
|
+
endTime: String
|
|
2962
|
+
status: PlanDatePollOptionStatus!
|
|
2963
|
+
freeCount: Int!
|
|
2964
|
+
ifNeedBeCount: Int!
|
|
2965
|
+
unavailableCount: Int!
|
|
2966
|
+
unansweredCount: Int!
|
|
2967
|
+
bestSlot: PlanDatePollSlot
|
|
2968
|
+
}
|
|
2969
|
+
|
|
2970
|
+
type PlanDatePollSlot {
|
|
2971
|
+
startTime: String!
|
|
2972
|
+
endTime: String!
|
|
2973
|
+
}
|
|
2974
|
+
|
|
2975
|
+
enum PlanDatePollStatus {
|
|
2976
|
+
CLOSED
|
|
2977
|
+
OPEN
|
|
2978
|
+
}
|
|
2979
|
+
|
|
2980
|
+
enum PlanDatePollTimeMode {
|
|
2981
|
+
ANY_TIME
|
|
2982
|
+
EXACT
|
|
2983
|
+
WINDOW
|
|
2984
|
+
}
|
|
2985
|
+
|
|
2986
|
+
enum PlanDatePollOptionStatus {
|
|
2987
|
+
BLOCKED
|
|
2988
|
+
WAITING
|
|
2989
|
+
WORKS
|
|
2990
|
+
}
|
|
2991
|
+
|
|
2939
2992
|
type PlanBudgetSummary {
|
|
2940
2993
|
createdAt: DateTime!
|
|
2941
2994
|
currencyCode: String!
|