@itm-studio/partner-sdk 0.1.7 → 0.2.0
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 +199 -0
- package/dist/index.d.mts +172 -1
- package/dist/index.d.ts +172 -1
- package/dist/index.js +201 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +201 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/schema/partner.graphql +115 -0
package/README.md
CHANGED
|
@@ -291,6 +291,205 @@ const { getPartnerPublicEchoes } = await itm.query({
|
|
|
291
291
|
|
|
292
292
|
**Third-party embed types:** `SPOTIFY` | `INSTAGRAM` | `TIKTOK` — use `thirdPartyEchoType` and `thirdPartyEchoConfig` for embed details.
|
|
293
293
|
|
|
294
|
+
## Available Mutations
|
|
295
|
+
|
|
296
|
+
The SDK supports write operations via `client.mutation()`. All mutations use the same authentication — your brand is determined from the token.
|
|
297
|
+
|
|
298
|
+
### Media Upload Flow
|
|
299
|
+
|
|
300
|
+
Uploading media (e.g. cover images) is a two-step process:
|
|
301
|
+
|
|
302
|
+
#### Step 1: `getPartnerUploadUrl`
|
|
303
|
+
|
|
304
|
+
Get a presigned S3 URL to upload a file directly.
|
|
305
|
+
|
|
306
|
+
```typescript
|
|
307
|
+
const { getPartnerUploadUrl } = await itm.mutation({
|
|
308
|
+
getPartnerUploadUrl: {
|
|
309
|
+
__args: { filename: 'event-cover', fileExtension: 'jpg' },
|
|
310
|
+
url: true,
|
|
311
|
+
filename: true,
|
|
312
|
+
},
|
|
313
|
+
});
|
|
314
|
+
|
|
315
|
+
// Upload the file to S3 using the presigned URL
|
|
316
|
+
await fetch(getPartnerUploadUrl.url, {
|
|
317
|
+
method: 'PUT',
|
|
318
|
+
body: fileBuffer, // Buffer, Blob, or ReadableStream
|
|
319
|
+
headers: { 'Content-Type': 'image/jpeg' },
|
|
320
|
+
});
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
#### Step 2: `createPartnerMediaAsset`
|
|
324
|
+
|
|
325
|
+
After uploading, register the asset so it's linked to your brand.
|
|
326
|
+
|
|
327
|
+
```typescript
|
|
328
|
+
const { createPartnerMediaAsset } = await itm.mutation({
|
|
329
|
+
createPartnerMediaAsset: {
|
|
330
|
+
__args: {
|
|
331
|
+
mimetype: 'image/jpeg',
|
|
332
|
+
filename: getPartnerUploadUrl.filename, // from Step 1
|
|
333
|
+
dimensions: { width: 1920, height: 1080 },
|
|
334
|
+
},
|
|
335
|
+
uid: true,
|
|
336
|
+
url: true,
|
|
337
|
+
mimeType: true,
|
|
338
|
+
},
|
|
339
|
+
});
|
|
340
|
+
|
|
341
|
+
// Use createPartnerMediaAsset.uid as coverImageUid when creating a moment
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
### `createPartnerMoment`
|
|
345
|
+
|
|
346
|
+
Create a moment (event) with optional venue and ticket tiers in one atomic operation.
|
|
347
|
+
|
|
348
|
+
```typescript
|
|
349
|
+
const { createPartnerMoment } = await itm.mutation({
|
|
350
|
+
createPartnerMoment: {
|
|
351
|
+
__args: {
|
|
352
|
+
input: {
|
|
353
|
+
name: 'Summer Rooftop Party',
|
|
354
|
+
description: 'A rooftop party in NYC',
|
|
355
|
+
blurb: 'Join us on the roof!',
|
|
356
|
+
startDate: '2026-07-15T20:00:00.000Z',
|
|
357
|
+
endDate: '2026-07-16T02:00:00.000Z',
|
|
358
|
+
timezone: 'America/New_York',
|
|
359
|
+
type: 'IRL',
|
|
360
|
+
coverImageUid: createPartnerMediaAsset.uid, // from upload flow
|
|
361
|
+
venue: {
|
|
362
|
+
name: 'Rooftop Bar',
|
|
363
|
+
city: 'New York',
|
|
364
|
+
country: 'US',
|
|
365
|
+
address: '123 Main St',
|
|
366
|
+
},
|
|
367
|
+
category: 'PARTY',
|
|
368
|
+
subcategory: 'ROOFTOP_PARTY',
|
|
369
|
+
ticketTiers: [
|
|
370
|
+
{
|
|
371
|
+
name: 'General Admission',
|
|
372
|
+
price: 2500, // $25.00 in cents
|
|
373
|
+
supply: 200,
|
|
374
|
+
maxPerUser: 4,
|
|
375
|
+
currencyCode: 'USD',
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
name: 'VIP',
|
|
379
|
+
price: 7500, // $75.00 in cents
|
|
380
|
+
supply: 50,
|
|
381
|
+
maxPerUser: 2,
|
|
382
|
+
currencyCode: 'USD',
|
|
383
|
+
description: 'Includes open bar',
|
|
384
|
+
},
|
|
385
|
+
],
|
|
386
|
+
},
|
|
387
|
+
},
|
|
388
|
+
uid: true,
|
|
389
|
+
name: true,
|
|
390
|
+
slug: true,
|
|
391
|
+
startDate: true,
|
|
392
|
+
endDate: true,
|
|
393
|
+
status: true,
|
|
394
|
+
coverImage: { url: true },
|
|
395
|
+
venue: { name: true, city: true },
|
|
396
|
+
ticketTiers: {
|
|
397
|
+
uid: true,
|
|
398
|
+
name: true,
|
|
399
|
+
price: true,
|
|
400
|
+
currency: { code: true, symbol: true },
|
|
401
|
+
soldOut: true,
|
|
402
|
+
},
|
|
403
|
+
},
|
|
404
|
+
});
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
**Required fields:** `name`, `description`, `blurb`, `startDate`, `endDate`, `timezone`, `type`
|
|
408
|
+
|
|
409
|
+
**Moment types:**
|
|
410
|
+
- `IRL` — in-person event (requires `venue`)
|
|
411
|
+
- `DIGITAL` — online event (no venue needed)
|
|
412
|
+
|
|
413
|
+
**Ticket tier pricing:** `price` is in **cents** (e.g. `2500` = $25.00). Use `0` for free tiers.
|
|
414
|
+
|
|
415
|
+
### Complete Upload + Create Moment Flow
|
|
416
|
+
|
|
417
|
+
```typescript
|
|
418
|
+
import { createITMPartnerClient } from '@itm-studio/partner-sdk';
|
|
419
|
+
import { readFile } from 'fs/promises';
|
|
420
|
+
|
|
421
|
+
const itm = createITMPartnerClient({
|
|
422
|
+
token: process.env.ITM_PARTNER_TOKEN!,
|
|
423
|
+
});
|
|
424
|
+
|
|
425
|
+
// 1. Get presigned upload URL
|
|
426
|
+
const { getPartnerUploadUrl } = await itm.mutation({
|
|
427
|
+
getPartnerUploadUrl: {
|
|
428
|
+
__args: { filename: 'event-cover', fileExtension: 'jpg' },
|
|
429
|
+
url: true,
|
|
430
|
+
filename: true,
|
|
431
|
+
},
|
|
432
|
+
});
|
|
433
|
+
|
|
434
|
+
// 2. Upload file to S3
|
|
435
|
+
const file = await readFile('./event-cover.jpg');
|
|
436
|
+
await fetch(getPartnerUploadUrl.url, {
|
|
437
|
+
method: 'PUT',
|
|
438
|
+
body: file,
|
|
439
|
+
headers: { 'Content-Type': 'image/jpeg' },
|
|
440
|
+
});
|
|
441
|
+
|
|
442
|
+
// 3. Register the uploaded asset
|
|
443
|
+
const { createPartnerMediaAsset } = await itm.mutation({
|
|
444
|
+
createPartnerMediaAsset: {
|
|
445
|
+
__args: {
|
|
446
|
+
mimetype: 'image/jpeg',
|
|
447
|
+
filename: getPartnerUploadUrl.filename,
|
|
448
|
+
dimensions: { width: 1920, height: 1080 },
|
|
449
|
+
},
|
|
450
|
+
uid: true,
|
|
451
|
+
},
|
|
452
|
+
});
|
|
453
|
+
|
|
454
|
+
// 4. Create the moment with the uploaded cover image
|
|
455
|
+
const { createPartnerMoment } = await itm.mutation({
|
|
456
|
+
createPartnerMoment: {
|
|
457
|
+
__args: {
|
|
458
|
+
input: {
|
|
459
|
+
name: 'My Event',
|
|
460
|
+
description: 'An amazing event',
|
|
461
|
+
blurb: 'Come join us!',
|
|
462
|
+
startDate: '2026-07-15T20:00:00.000Z',
|
|
463
|
+
endDate: '2026-07-16T02:00:00.000Z',
|
|
464
|
+
timezone: 'America/New_York',
|
|
465
|
+
type: 'IRL',
|
|
466
|
+
coverImageUid: createPartnerMediaAsset.uid,
|
|
467
|
+
venue: {
|
|
468
|
+
name: 'The Venue',
|
|
469
|
+
city: 'New York',
|
|
470
|
+
country: 'US',
|
|
471
|
+
},
|
|
472
|
+
ticketTiers: [
|
|
473
|
+
{
|
|
474
|
+
name: 'General Admission',
|
|
475
|
+
price: 2500,
|
|
476
|
+
supply: 100,
|
|
477
|
+
maxPerUser: 4,
|
|
478
|
+
currencyCode: 'USD',
|
|
479
|
+
},
|
|
480
|
+
],
|
|
481
|
+
},
|
|
482
|
+
},
|
|
483
|
+
uid: true,
|
|
484
|
+
slug: true,
|
|
485
|
+
status: true,
|
|
486
|
+
ticketTiers: { uid: true, name: true },
|
|
487
|
+
},
|
|
488
|
+
});
|
|
489
|
+
|
|
490
|
+
console.log(`Created: ${createPartnerMoment.slug} (${createPartnerMoment.status})`);
|
|
491
|
+
```
|
|
492
|
+
|
|
294
493
|
## Pagination
|
|
295
494
|
|
|
296
495
|
All list endpoints use cursor-based pagination. The default page size is **50** items if `take` is not specified.
|
package/dist/index.d.mts
CHANGED
|
@@ -285,6 +285,54 @@ interface Query {
|
|
|
285
285
|
getPartnerPublicEchoes: GetBrandEchoesForUserResponse;
|
|
286
286
|
__typename: 'Query';
|
|
287
287
|
}
|
|
288
|
+
/**
|
|
289
|
+
* A presigned S3 upload URL and the generated filename.
|
|
290
|
+
* Returned by getPartnerUploadUrl.
|
|
291
|
+
*/
|
|
292
|
+
interface MediaAssetUploadUrl {
|
|
293
|
+
/** Presigned S3 URL. PUT your file here. */
|
|
294
|
+
url: Scalars['String'];
|
|
295
|
+
/** Generated filename to pass to createPartnerMediaAsset after upload. */
|
|
296
|
+
filename: Scalars['String'];
|
|
297
|
+
__typename: 'MediaAssetUploadUrl';
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* A media asset uploaded by a partner.
|
|
301
|
+
* Returned by createPartnerMediaAsset.
|
|
302
|
+
*/
|
|
303
|
+
interface MediaAsset {
|
|
304
|
+
uid: Scalars['ID'];
|
|
305
|
+
/** CloudFront URL of the asset. */
|
|
306
|
+
url: Scalars['String'];
|
|
307
|
+
mimeType: Scalars['String'];
|
|
308
|
+
s3Key: Scalars['String'];
|
|
309
|
+
dimensions: Dimensions;
|
|
310
|
+
/** File size in bytes. */
|
|
311
|
+
size: Scalars['Int'];
|
|
312
|
+
placeholderUrl: (Scalars['String'] | null);
|
|
313
|
+
blurhash: (Scalars['String'] | null);
|
|
314
|
+
createdAt: Scalars['DateTime'];
|
|
315
|
+
updatedAt: Scalars['DateTime'];
|
|
316
|
+
__typename: 'MediaAsset';
|
|
317
|
+
}
|
|
318
|
+
interface Mutation {
|
|
319
|
+
/**
|
|
320
|
+
* Get a presigned S3 URL for direct file upload.
|
|
321
|
+
* Rate limited to 30 requests per minute.
|
|
322
|
+
*/
|
|
323
|
+
getPartnerUploadUrl: MediaAssetUploadUrl;
|
|
324
|
+
/**
|
|
325
|
+
* Record an uploaded media asset and link it to the partner's brand.
|
|
326
|
+
* Call after uploading to S3 via the presigned URL from getPartnerUploadUrl.
|
|
327
|
+
*/
|
|
328
|
+
createPartnerMediaAsset: MediaAsset;
|
|
329
|
+
/**
|
|
330
|
+
* Create a moment with optional venue and ticket tiers in one atomic operation.
|
|
331
|
+
* When type is IRL, the venue field is required.
|
|
332
|
+
*/
|
|
333
|
+
createPartnerMoment: Moment;
|
|
334
|
+
__typename: 'Mutation';
|
|
335
|
+
}
|
|
288
336
|
interface CurrencyGenqlSelection {
|
|
289
337
|
uid?: boolean | number;
|
|
290
338
|
code?: boolean | number;
|
|
@@ -614,6 +662,123 @@ interface QueryGenqlSelection {
|
|
|
614
662
|
__typename?: boolean | number;
|
|
615
663
|
__scalar?: boolean | number;
|
|
616
664
|
}
|
|
665
|
+
interface DimensionsInput {
|
|
666
|
+
width: Scalars['Int'];
|
|
667
|
+
height: Scalars['Int'];
|
|
668
|
+
}
|
|
669
|
+
interface VenueInput {
|
|
670
|
+
name: Scalars['String'];
|
|
671
|
+
city: Scalars['String'];
|
|
672
|
+
country: Scalars['String'];
|
|
673
|
+
address?: (Scalars['String'] | null);
|
|
674
|
+
postalCode?: (Scalars['String'] | null);
|
|
675
|
+
}
|
|
676
|
+
interface CreatePartnerTicketTierInput {
|
|
677
|
+
/** Name of the ticket tier (e.g. "General Admission", "VIP"). */
|
|
678
|
+
name: Scalars['String'];
|
|
679
|
+
/** Price in cents (0 for free). E.g. 2500 = $25.00. */
|
|
680
|
+
price: Scalars['Int'];
|
|
681
|
+
/** Total number of tickets available. */
|
|
682
|
+
supply: Scalars['Int'];
|
|
683
|
+
/** Maximum tickets per user (1-50). */
|
|
684
|
+
maxPerUser: Scalars['Int'];
|
|
685
|
+
/** ISO 4217 currency code (e.g. "USD", "GBP", "EUR"). */
|
|
686
|
+
currencyCode: Scalars['String'];
|
|
687
|
+
description?: (Scalars['String'] | null);
|
|
688
|
+
/** Minimum tickets per user (default: 1). */
|
|
689
|
+
minPerUser?: (Scalars['Int'] | null);
|
|
690
|
+
/** Default: false. */
|
|
691
|
+
isPrivate?: (Scalars['Boolean'] | null);
|
|
692
|
+
/** Default: true. */
|
|
693
|
+
isActive?: (Scalars['Boolean'] | null);
|
|
694
|
+
}
|
|
695
|
+
interface CreatePartnerMomentInput {
|
|
696
|
+
name: Scalars['String'];
|
|
697
|
+
description: Scalars['String'];
|
|
698
|
+
blurb: Scalars['String'];
|
|
699
|
+
startDate: Scalars['DateTime'];
|
|
700
|
+
endDate: Scalars['DateTime'];
|
|
701
|
+
/** IANA timezone (e.g. "America/New_York"). */
|
|
702
|
+
timezone: Scalars['String'];
|
|
703
|
+
/** IRL (in-person) or DIGITAL. */
|
|
704
|
+
type: MomentType;
|
|
705
|
+
/** UID of a previously uploaded media asset. If omitted, uses the brand default cover image. */
|
|
706
|
+
coverImageUid?: (Scalars['String'] | null);
|
|
707
|
+
/** Required when type is IRL. */
|
|
708
|
+
venue?: (VenueInput | null);
|
|
709
|
+
/** Default: false. */
|
|
710
|
+
isPrivate?: (Scalars['Boolean'] | null);
|
|
711
|
+
category?: (MomentCategory | null);
|
|
712
|
+
subcategory?: (MomentSubcategory | null);
|
|
713
|
+
/** Ticket tiers to create along with the moment. */
|
|
714
|
+
ticketTiers?: (CreatePartnerTicketTierInput[] | null);
|
|
715
|
+
}
|
|
716
|
+
/**
|
|
717
|
+
* A presigned S3 upload URL and the generated filename.
|
|
718
|
+
* Returned by getPartnerUploadUrl.
|
|
719
|
+
*/
|
|
720
|
+
interface MediaAssetUploadUrlGenqlSelection {
|
|
721
|
+
/** Presigned S3 URL. PUT your file here. */
|
|
722
|
+
url?: boolean | number;
|
|
723
|
+
/** Generated filename to pass to createPartnerMediaAsset after upload. */
|
|
724
|
+
filename?: boolean | number;
|
|
725
|
+
__typename?: boolean | number;
|
|
726
|
+
__scalar?: boolean | number;
|
|
727
|
+
}
|
|
728
|
+
/**
|
|
729
|
+
* A media asset uploaded by a partner.
|
|
730
|
+
* Returned by createPartnerMediaAsset.
|
|
731
|
+
*/
|
|
732
|
+
interface MediaAssetGenqlSelection {
|
|
733
|
+
uid?: boolean | number;
|
|
734
|
+
/** CloudFront URL of the asset. */
|
|
735
|
+
url?: boolean | number;
|
|
736
|
+
mimeType?: boolean | number;
|
|
737
|
+
s3Key?: boolean | number;
|
|
738
|
+
dimensions?: DimensionsGenqlSelection;
|
|
739
|
+
/** File size in bytes. */
|
|
740
|
+
size?: boolean | number;
|
|
741
|
+
placeholderUrl?: boolean | number;
|
|
742
|
+
blurhash?: boolean | number;
|
|
743
|
+
createdAt?: boolean | number;
|
|
744
|
+
updatedAt?: boolean | number;
|
|
745
|
+
__typename?: boolean | number;
|
|
746
|
+
__scalar?: boolean | number;
|
|
747
|
+
}
|
|
748
|
+
interface MutationGenqlSelection {
|
|
749
|
+
/**
|
|
750
|
+
* Get a presigned S3 URL for direct file upload.
|
|
751
|
+
* Rate limited to 30 requests per minute.
|
|
752
|
+
*/
|
|
753
|
+
getPartnerUploadUrl?: (MediaAssetUploadUrlGenqlSelection & {
|
|
754
|
+
__args: {
|
|
755
|
+
filename: Scalars['String'];
|
|
756
|
+
fileExtension: Scalars['String'];
|
|
757
|
+
};
|
|
758
|
+
});
|
|
759
|
+
/**
|
|
760
|
+
* Record an uploaded media asset and link it to the partner's brand.
|
|
761
|
+
* Call after uploading to S3 via the presigned URL from getPartnerUploadUrl.
|
|
762
|
+
*/
|
|
763
|
+
createPartnerMediaAsset?: (MediaAssetGenqlSelection & {
|
|
764
|
+
__args: {
|
|
765
|
+
mimetype: Scalars['String'];
|
|
766
|
+
filename: Scalars['String'];
|
|
767
|
+
dimensions: DimensionsInput;
|
|
768
|
+
};
|
|
769
|
+
});
|
|
770
|
+
/**
|
|
771
|
+
* Create a moment with optional venue and ticket tiers in one atomic operation.
|
|
772
|
+
* When type is IRL, the venue field is required.
|
|
773
|
+
*/
|
|
774
|
+
createPartnerMoment?: (MomentGenqlSelection & {
|
|
775
|
+
__args: {
|
|
776
|
+
input: CreatePartnerMomentInput;
|
|
777
|
+
};
|
|
778
|
+
});
|
|
779
|
+
__typename?: boolean | number;
|
|
780
|
+
__scalar?: boolean | number;
|
|
781
|
+
}
|
|
617
782
|
|
|
618
783
|
interface GraphqlOperation {
|
|
619
784
|
query: string;
|
|
@@ -655,6 +820,9 @@ interface Client {
|
|
|
655
820
|
query<R extends QueryGenqlSelection>(request: R & {
|
|
656
821
|
__name?: string;
|
|
657
822
|
}): Promise<FieldsSelection<Query, R>>;
|
|
823
|
+
mutation<R extends MutationGenqlSelection>(request: R & {
|
|
824
|
+
__name?: string;
|
|
825
|
+
}): Promise<FieldsSelection<Mutation, R>>;
|
|
658
826
|
}
|
|
659
827
|
declare const everything: {
|
|
660
828
|
__scalar: boolean;
|
|
@@ -662,6 +830,9 @@ declare const everything: {
|
|
|
662
830
|
declare const generateQueryOp: (fields: QueryGenqlSelection & {
|
|
663
831
|
__name?: string;
|
|
664
832
|
}) => GraphqlOperation;
|
|
833
|
+
declare const generateMutationOp: (fields: MutationGenqlSelection & {
|
|
834
|
+
__name?: string;
|
|
835
|
+
}) => GraphqlOperation;
|
|
665
836
|
|
|
666
837
|
interface ITMPartnerClientConfig {
|
|
667
838
|
/**
|
|
@@ -710,4 +881,4 @@ type ITMPartnerClient = Client;
|
|
|
710
881
|
*/
|
|
711
882
|
declare function createITMPartnerClient(config: ITMPartnerClientConfig): ITMPartnerClient;
|
|
712
883
|
|
|
713
|
-
export { type Currency, type Dimensions, type Echo, type EchoMediaAsset, type EchoType, type GetBrandEchoesForUserResponse, 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 ThirdPartyEchoType, type Ticket, type TicketExtension, type TicketExtensionStatus, type TicketTier, type User, type Venue, createITMPartnerClient, everything, generateQueryOp };
|
|
884
|
+
export { type CreatePartnerMomentInput, type CreatePartnerTicketTierInput, type Currency, type Dimensions, type DimensionsInput, type Echo, type EchoMediaAsset, type EchoType, type GetBrandEchoesForUserResponse, type GetPartnerCustomersResponse, type GetPublicMomentsResponse, type GetTicketsResponse, type ITMPartnerClient, type ITMPartnerClientConfig, type MediaAsset, type MediaAssetUploadUrl, type MerchPurchase, type Moment, type MomentCategory, type MomentCollection, type MomentCollectionLink, type MomentDiscountCodeUsage, type MomentSortOrder, type MomentStatus, type MomentSubcategory, type MomentType, type Mutation, type PartnerCustomer, type Payment, type PaymentStatus, type Query, type ThirdPartyEchoType, type Ticket, type TicketExtension, type TicketExtensionStatus, type TicketTier, type User, type Venue, type VenueInput, createITMPartnerClient, everything, generateMutationOp, generateQueryOp };
|
package/dist/index.d.ts
CHANGED
|
@@ -285,6 +285,54 @@ interface Query {
|
|
|
285
285
|
getPartnerPublicEchoes: GetBrandEchoesForUserResponse;
|
|
286
286
|
__typename: 'Query';
|
|
287
287
|
}
|
|
288
|
+
/**
|
|
289
|
+
* A presigned S3 upload URL and the generated filename.
|
|
290
|
+
* Returned by getPartnerUploadUrl.
|
|
291
|
+
*/
|
|
292
|
+
interface MediaAssetUploadUrl {
|
|
293
|
+
/** Presigned S3 URL. PUT your file here. */
|
|
294
|
+
url: Scalars['String'];
|
|
295
|
+
/** Generated filename to pass to createPartnerMediaAsset after upload. */
|
|
296
|
+
filename: Scalars['String'];
|
|
297
|
+
__typename: 'MediaAssetUploadUrl';
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* A media asset uploaded by a partner.
|
|
301
|
+
* Returned by createPartnerMediaAsset.
|
|
302
|
+
*/
|
|
303
|
+
interface MediaAsset {
|
|
304
|
+
uid: Scalars['ID'];
|
|
305
|
+
/** CloudFront URL of the asset. */
|
|
306
|
+
url: Scalars['String'];
|
|
307
|
+
mimeType: Scalars['String'];
|
|
308
|
+
s3Key: Scalars['String'];
|
|
309
|
+
dimensions: Dimensions;
|
|
310
|
+
/** File size in bytes. */
|
|
311
|
+
size: Scalars['Int'];
|
|
312
|
+
placeholderUrl: (Scalars['String'] | null);
|
|
313
|
+
blurhash: (Scalars['String'] | null);
|
|
314
|
+
createdAt: Scalars['DateTime'];
|
|
315
|
+
updatedAt: Scalars['DateTime'];
|
|
316
|
+
__typename: 'MediaAsset';
|
|
317
|
+
}
|
|
318
|
+
interface Mutation {
|
|
319
|
+
/**
|
|
320
|
+
* Get a presigned S3 URL for direct file upload.
|
|
321
|
+
* Rate limited to 30 requests per minute.
|
|
322
|
+
*/
|
|
323
|
+
getPartnerUploadUrl: MediaAssetUploadUrl;
|
|
324
|
+
/**
|
|
325
|
+
* Record an uploaded media asset and link it to the partner's brand.
|
|
326
|
+
* Call after uploading to S3 via the presigned URL from getPartnerUploadUrl.
|
|
327
|
+
*/
|
|
328
|
+
createPartnerMediaAsset: MediaAsset;
|
|
329
|
+
/**
|
|
330
|
+
* Create a moment with optional venue and ticket tiers in one atomic operation.
|
|
331
|
+
* When type is IRL, the venue field is required.
|
|
332
|
+
*/
|
|
333
|
+
createPartnerMoment: Moment;
|
|
334
|
+
__typename: 'Mutation';
|
|
335
|
+
}
|
|
288
336
|
interface CurrencyGenqlSelection {
|
|
289
337
|
uid?: boolean | number;
|
|
290
338
|
code?: boolean | number;
|
|
@@ -614,6 +662,123 @@ interface QueryGenqlSelection {
|
|
|
614
662
|
__typename?: boolean | number;
|
|
615
663
|
__scalar?: boolean | number;
|
|
616
664
|
}
|
|
665
|
+
interface DimensionsInput {
|
|
666
|
+
width: Scalars['Int'];
|
|
667
|
+
height: Scalars['Int'];
|
|
668
|
+
}
|
|
669
|
+
interface VenueInput {
|
|
670
|
+
name: Scalars['String'];
|
|
671
|
+
city: Scalars['String'];
|
|
672
|
+
country: Scalars['String'];
|
|
673
|
+
address?: (Scalars['String'] | null);
|
|
674
|
+
postalCode?: (Scalars['String'] | null);
|
|
675
|
+
}
|
|
676
|
+
interface CreatePartnerTicketTierInput {
|
|
677
|
+
/** Name of the ticket tier (e.g. "General Admission", "VIP"). */
|
|
678
|
+
name: Scalars['String'];
|
|
679
|
+
/** Price in cents (0 for free). E.g. 2500 = $25.00. */
|
|
680
|
+
price: Scalars['Int'];
|
|
681
|
+
/** Total number of tickets available. */
|
|
682
|
+
supply: Scalars['Int'];
|
|
683
|
+
/** Maximum tickets per user (1-50). */
|
|
684
|
+
maxPerUser: Scalars['Int'];
|
|
685
|
+
/** ISO 4217 currency code (e.g. "USD", "GBP", "EUR"). */
|
|
686
|
+
currencyCode: Scalars['String'];
|
|
687
|
+
description?: (Scalars['String'] | null);
|
|
688
|
+
/** Minimum tickets per user (default: 1). */
|
|
689
|
+
minPerUser?: (Scalars['Int'] | null);
|
|
690
|
+
/** Default: false. */
|
|
691
|
+
isPrivate?: (Scalars['Boolean'] | null);
|
|
692
|
+
/** Default: true. */
|
|
693
|
+
isActive?: (Scalars['Boolean'] | null);
|
|
694
|
+
}
|
|
695
|
+
interface CreatePartnerMomentInput {
|
|
696
|
+
name: Scalars['String'];
|
|
697
|
+
description: Scalars['String'];
|
|
698
|
+
blurb: Scalars['String'];
|
|
699
|
+
startDate: Scalars['DateTime'];
|
|
700
|
+
endDate: Scalars['DateTime'];
|
|
701
|
+
/** IANA timezone (e.g. "America/New_York"). */
|
|
702
|
+
timezone: Scalars['String'];
|
|
703
|
+
/** IRL (in-person) or DIGITAL. */
|
|
704
|
+
type: MomentType;
|
|
705
|
+
/** UID of a previously uploaded media asset. If omitted, uses the brand default cover image. */
|
|
706
|
+
coverImageUid?: (Scalars['String'] | null);
|
|
707
|
+
/** Required when type is IRL. */
|
|
708
|
+
venue?: (VenueInput | null);
|
|
709
|
+
/** Default: false. */
|
|
710
|
+
isPrivate?: (Scalars['Boolean'] | null);
|
|
711
|
+
category?: (MomentCategory | null);
|
|
712
|
+
subcategory?: (MomentSubcategory | null);
|
|
713
|
+
/** Ticket tiers to create along with the moment. */
|
|
714
|
+
ticketTiers?: (CreatePartnerTicketTierInput[] | null);
|
|
715
|
+
}
|
|
716
|
+
/**
|
|
717
|
+
* A presigned S3 upload URL and the generated filename.
|
|
718
|
+
* Returned by getPartnerUploadUrl.
|
|
719
|
+
*/
|
|
720
|
+
interface MediaAssetUploadUrlGenqlSelection {
|
|
721
|
+
/** Presigned S3 URL. PUT your file here. */
|
|
722
|
+
url?: boolean | number;
|
|
723
|
+
/** Generated filename to pass to createPartnerMediaAsset after upload. */
|
|
724
|
+
filename?: boolean | number;
|
|
725
|
+
__typename?: boolean | number;
|
|
726
|
+
__scalar?: boolean | number;
|
|
727
|
+
}
|
|
728
|
+
/**
|
|
729
|
+
* A media asset uploaded by a partner.
|
|
730
|
+
* Returned by createPartnerMediaAsset.
|
|
731
|
+
*/
|
|
732
|
+
interface MediaAssetGenqlSelection {
|
|
733
|
+
uid?: boolean | number;
|
|
734
|
+
/** CloudFront URL of the asset. */
|
|
735
|
+
url?: boolean | number;
|
|
736
|
+
mimeType?: boolean | number;
|
|
737
|
+
s3Key?: boolean | number;
|
|
738
|
+
dimensions?: DimensionsGenqlSelection;
|
|
739
|
+
/** File size in bytes. */
|
|
740
|
+
size?: boolean | number;
|
|
741
|
+
placeholderUrl?: boolean | number;
|
|
742
|
+
blurhash?: boolean | number;
|
|
743
|
+
createdAt?: boolean | number;
|
|
744
|
+
updatedAt?: boolean | number;
|
|
745
|
+
__typename?: boolean | number;
|
|
746
|
+
__scalar?: boolean | number;
|
|
747
|
+
}
|
|
748
|
+
interface MutationGenqlSelection {
|
|
749
|
+
/**
|
|
750
|
+
* Get a presigned S3 URL for direct file upload.
|
|
751
|
+
* Rate limited to 30 requests per minute.
|
|
752
|
+
*/
|
|
753
|
+
getPartnerUploadUrl?: (MediaAssetUploadUrlGenqlSelection & {
|
|
754
|
+
__args: {
|
|
755
|
+
filename: Scalars['String'];
|
|
756
|
+
fileExtension: Scalars['String'];
|
|
757
|
+
};
|
|
758
|
+
});
|
|
759
|
+
/**
|
|
760
|
+
* Record an uploaded media asset and link it to the partner's brand.
|
|
761
|
+
* Call after uploading to S3 via the presigned URL from getPartnerUploadUrl.
|
|
762
|
+
*/
|
|
763
|
+
createPartnerMediaAsset?: (MediaAssetGenqlSelection & {
|
|
764
|
+
__args: {
|
|
765
|
+
mimetype: Scalars['String'];
|
|
766
|
+
filename: Scalars['String'];
|
|
767
|
+
dimensions: DimensionsInput;
|
|
768
|
+
};
|
|
769
|
+
});
|
|
770
|
+
/**
|
|
771
|
+
* Create a moment with optional venue and ticket tiers in one atomic operation.
|
|
772
|
+
* When type is IRL, the venue field is required.
|
|
773
|
+
*/
|
|
774
|
+
createPartnerMoment?: (MomentGenqlSelection & {
|
|
775
|
+
__args: {
|
|
776
|
+
input: CreatePartnerMomentInput;
|
|
777
|
+
};
|
|
778
|
+
});
|
|
779
|
+
__typename?: boolean | number;
|
|
780
|
+
__scalar?: boolean | number;
|
|
781
|
+
}
|
|
617
782
|
|
|
618
783
|
interface GraphqlOperation {
|
|
619
784
|
query: string;
|
|
@@ -655,6 +820,9 @@ interface Client {
|
|
|
655
820
|
query<R extends QueryGenqlSelection>(request: R & {
|
|
656
821
|
__name?: string;
|
|
657
822
|
}): Promise<FieldsSelection<Query, R>>;
|
|
823
|
+
mutation<R extends MutationGenqlSelection>(request: R & {
|
|
824
|
+
__name?: string;
|
|
825
|
+
}): Promise<FieldsSelection<Mutation, R>>;
|
|
658
826
|
}
|
|
659
827
|
declare const everything: {
|
|
660
828
|
__scalar: boolean;
|
|
@@ -662,6 +830,9 @@ declare const everything: {
|
|
|
662
830
|
declare const generateQueryOp: (fields: QueryGenqlSelection & {
|
|
663
831
|
__name?: string;
|
|
664
832
|
}) => GraphqlOperation;
|
|
833
|
+
declare const generateMutationOp: (fields: MutationGenqlSelection & {
|
|
834
|
+
__name?: string;
|
|
835
|
+
}) => GraphqlOperation;
|
|
665
836
|
|
|
666
837
|
interface ITMPartnerClientConfig {
|
|
667
838
|
/**
|
|
@@ -710,4 +881,4 @@ type ITMPartnerClient = Client;
|
|
|
710
881
|
*/
|
|
711
882
|
declare function createITMPartnerClient(config: ITMPartnerClientConfig): ITMPartnerClient;
|
|
712
883
|
|
|
713
|
-
export { type Currency, type Dimensions, type Echo, type EchoMediaAsset, type EchoType, type GetBrandEchoesForUserResponse, 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 ThirdPartyEchoType, type Ticket, type TicketExtension, type TicketExtensionStatus, type TicketTier, type User, type Venue, createITMPartnerClient, everything, generateQueryOp };
|
|
884
|
+
export { type CreatePartnerMomentInput, type CreatePartnerTicketTierInput, type Currency, type Dimensions, type DimensionsInput, type Echo, type EchoMediaAsset, type EchoType, type GetBrandEchoesForUserResponse, type GetPartnerCustomersResponse, type GetPublicMomentsResponse, type GetTicketsResponse, type ITMPartnerClient, type ITMPartnerClientConfig, type MediaAsset, type MediaAssetUploadUrl, type MerchPurchase, type Moment, type MomentCategory, type MomentCollection, type MomentCollectionLink, type MomentDiscountCodeUsage, type MomentSortOrder, type MomentStatus, type MomentSubcategory, type MomentType, type Mutation, type PartnerCustomer, type Payment, type PaymentStatus, type Query, type ThirdPartyEchoType, type Ticket, type TicketExtension, type TicketExtensionStatus, type TicketTier, type User, type Venue, type VenueInput, createITMPartnerClient, everything, generateMutationOp, generateQueryOp };
|