@itm-studio/partner-sdk 0.1.0 → 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 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 (by start date)
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
@@ -51,6 +51,7 @@ interface Moment {
51
51
  soldOut: Scalars['Boolean'];
52
52
  timezone: Scalars['String'];
53
53
  minimumAge: Scalars['Int'];
54
+ externalUrl: (Scalars['String'] | null);
54
55
  venue: (Venue | null);
55
56
  ticketTiers: TicketTier[];
56
57
  createdAt: Scalars['DateTime'];
@@ -68,8 +69,6 @@ interface TicketTier {
68
69
  maxPerUser: Scalars['Int'];
69
70
  minPerUser: Scalars['Int'];
70
71
  remainingSupply: Scalars['Int'];
71
- numSold: Scalars['Float'];
72
- numCheckedIn: Scalars['Float'];
73
72
  startDateOverride: (Scalars['DateTime'] | null);
74
73
  endDateOverride: (Scalars['DateTime'] | null);
75
74
  createdAt: Scalars['DateTime'];
@@ -147,6 +146,27 @@ interface PartnerCustomer {
147
146
  tickets: Ticket[];
148
147
  __typename: 'PartnerCustomer';
149
148
  }
149
+ interface MomentCollectionLink {
150
+ uid: Scalars['ID'];
151
+ url: Scalars['String'];
152
+ label: (Scalars['String'] | null);
153
+ createdAt: Scalars['DateTime'];
154
+ updatedAt: Scalars['DateTime'];
155
+ __typename: 'MomentCollectionLink';
156
+ }
157
+ interface MomentCollection {
158
+ uid: Scalars['ID'];
159
+ name: Scalars['String'];
160
+ description: (Scalars['String'] | null);
161
+ slug: Scalars['String'];
162
+ subLabel: (Scalars['String'] | null);
163
+ availableQueryFilters: Scalars['String'][];
164
+ moments: Moment[];
165
+ links: MomentCollectionLink[];
166
+ createdAt: Scalars['DateTime'];
167
+ updatedAt: Scalars['DateTime'];
168
+ __typename: 'MomentCollection';
169
+ }
150
170
  interface GetPublicMomentsResponse {
151
171
  moments: Moment[];
152
172
  totalCount: Scalars['Int'];
@@ -180,6 +200,11 @@ interface Query {
180
200
  * Sorted by newest first (based on earliest ticket purchase time).
181
201
  */
182
202
  getPartnerCustomersForMoment: GetPartnerCustomersResponse;
203
+ /**
204
+ * Get a moment collection by slug.
205
+ * Returns the collection with its moments and links.
206
+ */
207
+ getPartnerMomentCollection: (MomentCollection | null);
183
208
  __typename: 'Query';
184
209
  }
185
210
  interface CurrencyGenqlSelection {
@@ -222,6 +247,7 @@ interface MomentGenqlSelection {
222
247
  soldOut?: boolean | number;
223
248
  timezone?: boolean | number;
224
249
  minimumAge?: boolean | number;
250
+ externalUrl?: boolean | number;
225
251
  venue?: VenueGenqlSelection;
226
252
  ticketTiers?: TicketTierGenqlSelection;
227
253
  createdAt?: boolean | number;
@@ -240,8 +266,6 @@ interface TicketTierGenqlSelection {
240
266
  maxPerUser?: boolean | number;
241
267
  minPerUser?: boolean | number;
242
268
  remainingSupply?: boolean | number;
243
- numSold?: boolean | number;
244
- numCheckedIn?: boolean | number;
245
269
  startDateOverride?: boolean | number;
246
270
  endDateOverride?: boolean | number;
247
271
  createdAt?: boolean | number;
@@ -320,6 +344,33 @@ interface PartnerCustomerGenqlSelection {
320
344
  __typename?: boolean | number;
321
345
  __scalar?: boolean | number;
322
346
  }
347
+ interface MomentCollectionLinkGenqlSelection {
348
+ uid?: boolean | number;
349
+ url?: boolean | number;
350
+ label?: boolean | number;
351
+ createdAt?: boolean | number;
352
+ updatedAt?: boolean | number;
353
+ __typename?: boolean | number;
354
+ __scalar?: boolean | number;
355
+ }
356
+ interface MomentCollectionGenqlSelection {
357
+ uid?: boolean | number;
358
+ name?: boolean | number;
359
+ description?: boolean | number;
360
+ slug?: boolean | number;
361
+ subLabel?: boolean | number;
362
+ availableQueryFilters?: boolean | number;
363
+ moments?: (MomentGenqlSelection & {
364
+ __args?: {
365
+ queryFilters?: (Scalars['String'][] | null);
366
+ };
367
+ });
368
+ links?: MomentCollectionLinkGenqlSelection;
369
+ createdAt?: boolean | number;
370
+ updatedAt?: boolean | number;
371
+ __typename?: boolean | number;
372
+ __scalar?: boolean | number;
373
+ }
323
374
  interface GetPublicMomentsResponseGenqlSelection {
324
375
  moments?: MomentGenqlSelection;
325
376
  totalCount?: boolean | number;
@@ -385,6 +436,15 @@ interface QueryGenqlSelection {
385
436
  take?: (Scalars['Int'] | null);
386
437
  };
387
438
  });
439
+ /**
440
+ * Get a moment collection by slug.
441
+ * Returns the collection with its moments and links.
442
+ */
443
+ getPartnerMomentCollection?: (MomentCollectionGenqlSelection & {
444
+ __args: {
445
+ slug: Scalars['String'];
446
+ };
447
+ });
388
448
  __typename?: boolean | number;
389
449
  __scalar?: boolean | number;
390
450
  }
@@ -483,4 +543,4 @@ type ITMPartnerClient = Client;
483
543
  */
484
544
  declare function createITMPartnerClient(config: ITMPartnerClientConfig): ITMPartnerClient;
485
545
 
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 };
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
@@ -51,6 +51,7 @@ interface Moment {
51
51
  soldOut: Scalars['Boolean'];
52
52
  timezone: Scalars['String'];
53
53
  minimumAge: Scalars['Int'];
54
+ externalUrl: (Scalars['String'] | null);
54
55
  venue: (Venue | null);
55
56
  ticketTiers: TicketTier[];
56
57
  createdAt: Scalars['DateTime'];
@@ -68,8 +69,6 @@ interface TicketTier {
68
69
  maxPerUser: Scalars['Int'];
69
70
  minPerUser: Scalars['Int'];
70
71
  remainingSupply: Scalars['Int'];
71
- numSold: Scalars['Float'];
72
- numCheckedIn: Scalars['Float'];
73
72
  startDateOverride: (Scalars['DateTime'] | null);
74
73
  endDateOverride: (Scalars['DateTime'] | null);
75
74
  createdAt: Scalars['DateTime'];
@@ -147,6 +146,27 @@ interface PartnerCustomer {
147
146
  tickets: Ticket[];
148
147
  __typename: 'PartnerCustomer';
149
148
  }
149
+ interface MomentCollectionLink {
150
+ uid: Scalars['ID'];
151
+ url: Scalars['String'];
152
+ label: (Scalars['String'] | null);
153
+ createdAt: Scalars['DateTime'];
154
+ updatedAt: Scalars['DateTime'];
155
+ __typename: 'MomentCollectionLink';
156
+ }
157
+ interface MomentCollection {
158
+ uid: Scalars['ID'];
159
+ name: Scalars['String'];
160
+ description: (Scalars['String'] | null);
161
+ slug: Scalars['String'];
162
+ subLabel: (Scalars['String'] | null);
163
+ availableQueryFilters: Scalars['String'][];
164
+ moments: Moment[];
165
+ links: MomentCollectionLink[];
166
+ createdAt: Scalars['DateTime'];
167
+ updatedAt: Scalars['DateTime'];
168
+ __typename: 'MomentCollection';
169
+ }
150
170
  interface GetPublicMomentsResponse {
151
171
  moments: Moment[];
152
172
  totalCount: Scalars['Int'];
@@ -180,6 +200,11 @@ interface Query {
180
200
  * Sorted by newest first (based on earliest ticket purchase time).
181
201
  */
182
202
  getPartnerCustomersForMoment: GetPartnerCustomersResponse;
203
+ /**
204
+ * Get a moment collection by slug.
205
+ * Returns the collection with its moments and links.
206
+ */
207
+ getPartnerMomentCollection: (MomentCollection | null);
183
208
  __typename: 'Query';
184
209
  }
185
210
  interface CurrencyGenqlSelection {
@@ -222,6 +247,7 @@ interface MomentGenqlSelection {
222
247
  soldOut?: boolean | number;
223
248
  timezone?: boolean | number;
224
249
  minimumAge?: boolean | number;
250
+ externalUrl?: boolean | number;
225
251
  venue?: VenueGenqlSelection;
226
252
  ticketTiers?: TicketTierGenqlSelection;
227
253
  createdAt?: boolean | number;
@@ -240,8 +266,6 @@ interface TicketTierGenqlSelection {
240
266
  maxPerUser?: boolean | number;
241
267
  minPerUser?: boolean | number;
242
268
  remainingSupply?: boolean | number;
243
- numSold?: boolean | number;
244
- numCheckedIn?: boolean | number;
245
269
  startDateOverride?: boolean | number;
246
270
  endDateOverride?: boolean | number;
247
271
  createdAt?: boolean | number;
@@ -320,6 +344,33 @@ interface PartnerCustomerGenqlSelection {
320
344
  __typename?: boolean | number;
321
345
  __scalar?: boolean | number;
322
346
  }
347
+ interface MomentCollectionLinkGenqlSelection {
348
+ uid?: boolean | number;
349
+ url?: boolean | number;
350
+ label?: boolean | number;
351
+ createdAt?: boolean | number;
352
+ updatedAt?: boolean | number;
353
+ __typename?: boolean | number;
354
+ __scalar?: boolean | number;
355
+ }
356
+ interface MomentCollectionGenqlSelection {
357
+ uid?: boolean | number;
358
+ name?: boolean | number;
359
+ description?: boolean | number;
360
+ slug?: boolean | number;
361
+ subLabel?: boolean | number;
362
+ availableQueryFilters?: boolean | number;
363
+ moments?: (MomentGenqlSelection & {
364
+ __args?: {
365
+ queryFilters?: (Scalars['String'][] | null);
366
+ };
367
+ });
368
+ links?: MomentCollectionLinkGenqlSelection;
369
+ createdAt?: boolean | number;
370
+ updatedAt?: boolean | number;
371
+ __typename?: boolean | number;
372
+ __scalar?: boolean | number;
373
+ }
323
374
  interface GetPublicMomentsResponseGenqlSelection {
324
375
  moments?: MomentGenqlSelection;
325
376
  totalCount?: boolean | number;
@@ -385,6 +436,15 @@ interface QueryGenqlSelection {
385
436
  take?: (Scalars['Int'] | null);
386
437
  };
387
438
  });
439
+ /**
440
+ * Get a moment collection by slug.
441
+ * Returns the collection with its moments and links.
442
+ */
443
+ getPartnerMomentCollection?: (MomentCollectionGenqlSelection & {
444
+ __args: {
445
+ slug: Scalars['String'];
446
+ };
447
+ });
388
448
  __typename?: boolean | number;
389
449
  __scalar?: boolean | number;
390
450
  }
@@ -483,4 +543,4 @@ type ITMPartnerClient = Client;
483
543
  */
484
544
  declare function createITMPartnerClient(config: ITMPartnerClientConfig): ITMPartnerClient;
485
545
 
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 };
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.js CHANGED
@@ -680,6 +680,9 @@ var types_default = {
680
680
  "minimumAge": [
681
681
  14
682
682
  ],
683
+ "externalUrl": [
684
+ 10
685
+ ],
683
686
  "venue": [
684
687
  11
685
688
  ],
@@ -729,12 +732,6 @@ var types_default = {
729
732
  "remainingSupply": [
730
733
  14
731
734
  ],
732
- "numSold": [
733
- 16
734
- ],
735
- "numCheckedIn": [
736
- 16
737
- ],
738
735
  "startDateOverride": [
739
736
  0
740
737
  ],
@@ -937,6 +934,67 @@ var types_default = {
937
934
  10
938
935
  ]
939
936
  },
937
+ "MomentCollectionLink": {
938
+ "uid": [
939
+ 9
940
+ ],
941
+ "url": [
942
+ 10
943
+ ],
944
+ "label": [
945
+ 10
946
+ ],
947
+ "createdAt": [
948
+ 0
949
+ ],
950
+ "updatedAt": [
951
+ 0
952
+ ],
953
+ "__typename": [
954
+ 10
955
+ ]
956
+ },
957
+ "MomentCollection": {
958
+ "uid": [
959
+ 9
960
+ ],
961
+ "name": [
962
+ 10
963
+ ],
964
+ "description": [
965
+ 10
966
+ ],
967
+ "slug": [
968
+ 10
969
+ ],
970
+ "subLabel": [
971
+ 10
972
+ ],
973
+ "availableQueryFilters": [
974
+ 10
975
+ ],
976
+ "moments": [
977
+ 12,
978
+ {
979
+ "queryFilters": [
980
+ 10,
981
+ "[String!]"
982
+ ]
983
+ }
984
+ ],
985
+ "links": [
986
+ 24
987
+ ],
988
+ "createdAt": [
989
+ 0
990
+ ],
991
+ "updatedAt": [
992
+ 0
993
+ ],
994
+ "__typename": [
995
+ 10
996
+ ]
997
+ },
940
998
  "GetPublicMomentsResponse": {
941
999
  "moments": [
942
1000
  12
@@ -990,7 +1048,7 @@ var types_default = {
990
1048
  },
991
1049
  "Query": {
992
1050
  "getPartnerMomentsForBrand": [
993
- 24,
1051
+ 26,
994
1052
  {
995
1053
  "cursor": [
996
1054
  10
@@ -1016,7 +1074,7 @@ var types_default = {
1016
1074
  }
1017
1075
  ],
1018
1076
  "getPartnerTicketsForMoment": [
1019
- 25,
1077
+ 27,
1020
1078
  {
1021
1079
  "momentSlug": [
1022
1080
  10,
@@ -1034,7 +1092,7 @@ var types_default = {
1034
1092
  }
1035
1093
  ],
1036
1094
  "getPartnerCustomersForMoment": [
1037
- 26,
1095
+ 28,
1038
1096
  {
1039
1097
  "momentSlug": [
1040
1098
  10,
@@ -1048,6 +1106,15 @@ var types_default = {
1048
1106
  ]
1049
1107
  }
1050
1108
  ],
1109
+ "getPartnerMomentCollection": [
1110
+ 25,
1111
+ {
1112
+ "slug": [
1113
+ 10,
1114
+ "String!"
1115
+ ]
1116
+ }
1117
+ ],
1051
1118
  "__typename": [
1052
1119
  10
1053
1120
  ]