@itm-studio/partner-sdk 0.1.1 → 0.1.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/README.md +59 -3
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -66,10 +66,10 @@ Get paginated moments (events) for your brand.
|
|
|
66
66
|
const { getPartnerMomentsForBrand } = await itm.query({
|
|
67
67
|
getPartnerMomentsForBrand: {
|
|
68
68
|
__args: {
|
|
69
|
-
take: 20, // items per page (default: 50)
|
|
69
|
+
take: 20, // items per page (default: 50, omit to use default)
|
|
70
70
|
cursor: nextCursor, // from previous response
|
|
71
71
|
status: 'UPCOMING', // UPCOMING | LIVE | ENDED
|
|
72
|
-
sortOrder: 'ASC', // ASC | DESC
|
|
72
|
+
sortOrder: 'ASC', // ASC | DESC by start date (default: DESC)
|
|
73
73
|
},
|
|
74
74
|
moments: { uid: true, name: true, startDate: true },
|
|
75
75
|
totalCount: true,
|
|
@@ -148,9 +148,65 @@ const { getPartnerCustomersForMoment } = await itm.query({
|
|
|
148
148
|
});
|
|
149
149
|
```
|
|
150
150
|
|
|
151
|
+
### `getPartnerMomentCollection`
|
|
152
|
+
|
|
153
|
+
Get a moment collection by slug. Collections group related moments together (e.g. a summer series, a festival lineup). Returns the collection with its moments and links.
|
|
154
|
+
|
|
155
|
+
```typescript
|
|
156
|
+
const { getPartnerMomentCollection } = await itm.query({
|
|
157
|
+
getPartnerMomentCollection: {
|
|
158
|
+
__args: { slug: 'summer-series' },
|
|
159
|
+
uid: true,
|
|
160
|
+
name: true,
|
|
161
|
+
description: true,
|
|
162
|
+
subLabel: true,
|
|
163
|
+
availableQueryFilters: true,
|
|
164
|
+
moments: {
|
|
165
|
+
uid: true,
|
|
166
|
+
name: true,
|
|
167
|
+
slug: true,
|
|
168
|
+
startDate: true,
|
|
169
|
+
endDate: true,
|
|
170
|
+
status: true,
|
|
171
|
+
venue: { name: true, city: true },
|
|
172
|
+
ticketTiers: {
|
|
173
|
+
name: true,
|
|
174
|
+
price: true,
|
|
175
|
+
currency: { code: true, symbol: true },
|
|
176
|
+
remainingSupply: true,
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
links: {
|
|
180
|
+
uid: true,
|
|
181
|
+
url: true,
|
|
182
|
+
label: true,
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
});
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
You can filter moments within a collection using `queryFilters`:
|
|
189
|
+
|
|
190
|
+
```typescript
|
|
191
|
+
const { getPartnerMomentCollection } = await itm.query({
|
|
192
|
+
getPartnerMomentCollection: {
|
|
193
|
+
__args: { slug: 'summer-series' },
|
|
194
|
+
name: true,
|
|
195
|
+
moments: {
|
|
196
|
+
__args: { queryFilters: ['upcoming'] },
|
|
197
|
+
uid: true,
|
|
198
|
+
name: true,
|
|
199
|
+
startDate: true,
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
});
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
> **Note:** `getPartnerMomentCollection` returns `null` if no collection matches the given slug.
|
|
206
|
+
|
|
151
207
|
## Pagination
|
|
152
208
|
|
|
153
|
-
All list endpoints use cursor-based pagination
|
|
209
|
+
All list endpoints use cursor-based pagination. The default page size is **50** items if `take` is not specified.
|
|
154
210
|
|
|
155
211
|
```typescript
|
|
156
212
|
let cursor: string | null = null;
|
package/dist/index.d.mts
CHANGED
|
@@ -543,4 +543,4 @@ type ITMPartnerClient = Client;
|
|
|
543
543
|
*/
|
|
544
544
|
declare function createITMPartnerClient(config: ITMPartnerClientConfig): ITMPartnerClient;
|
|
545
545
|
|
|
546
|
-
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 };
|
|
546
|
+
export { type Currency, type GetPartnerCustomersResponse, type GetPublicMomentsResponse, type GetTicketsResponse, type ITMPartnerClient, type ITMPartnerClientConfig, type MerchPurchase, type Moment, type MomentCategory, type MomentCollection, type MomentCollectionLink, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -543,4 +543,4 @@ type ITMPartnerClient = Client;
|
|
|
543
543
|
*/
|
|
544
544
|
declare function createITMPartnerClient(config: ITMPartnerClientConfig): ITMPartnerClient;
|
|
545
545
|
|
|
546
|
-
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 };
|
|
546
|
+
export { type Currency, type GetPartnerCustomersResponse, type GetPublicMomentsResponse, type GetTicketsResponse, type ITMPartnerClient, type ITMPartnerClientConfig, type MerchPurchase, type Moment, type MomentCategory, type MomentCollection, type MomentCollectionLink, 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 };
|
package/package.json
CHANGED