@itm-studio/partner-sdk 0.3.5 → 0.3.6

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.3.5",
3
+ "version": "0.3.6",
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",
@@ -438,6 +438,21 @@ enum TagSource {
438
438
  AUTO
439
439
  }
440
440
 
441
+ enum ContributionStatus {
442
+ EXPIRED
443
+ FAILED
444
+ PENDING
445
+ PROCESSING
446
+ REVIEW_REQUIRED
447
+ SUCCEEDED
448
+ }
449
+
450
+ enum ContributionPageStatusFilter {
451
+ ACCEPTING
452
+ ARCHIVED
453
+ PAUSED
454
+ }
455
+
441
456
  # ─── Types ───────────────────────────────────────────────────────────────────
442
457
 
443
458
  type Currency {
@@ -451,6 +466,75 @@ type Currency {
451
466
  updatedAt: DateTime!
452
467
  }
453
468
 
469
+ """
470
+ A contribution (tip/donation) page owned by the partner's brand, with confirmed
471
+ money totals. Amount fields are ITM cents (major units × 100, including
472
+ zero-decimal currencies). Totals are strings because they can exceed Int.
473
+ """
474
+ type ContributionPageAdmin {
475
+ uid: ID!
476
+ slug: String!
477
+ title: String!
478
+ description: String
479
+ """Legal/terms copy rendered beneath the page."""
480
+ finePrint: String
481
+ brandUid: String!
482
+ brandName: String!
483
+ brandSlug: String!
484
+ currency: Currency!
485
+ suggestedAmountsCents: [Int!]!
486
+ """Highlighted quick-pick; always one of suggestedAmountsCents."""
487
+ recommendedAmountCents: Int
488
+ minimumAmountCents: Int
489
+ maximumAmountCents: Int
490
+ requireItmAccount: Boolean!
491
+ """Shows an optional note field at checkout."""
492
+ allowContributorNote: Boolean!
493
+ isAccepting: Boolean!
494
+ """True when the page is accepting, not archived, and its payout account is verified."""
495
+ canContribute: Boolean!
496
+ """Public checkout URL for this page on ITM."""
497
+ publicUrl: String!
498
+ """Data URL of a QR code that resolves to publicUrl."""
499
+ qrCodeImageUrl: String!
500
+ archivedAt: DateTime
501
+ successfulContributionCount: Int!
502
+ """Number of successful refunds."""
503
+ refundCount: Int!
504
+ grossAmountCents: String!
505
+ refundedAmountCents: String!
506
+ """Brand net after platform and processing fees, reduced pro rata by successful refunds."""
507
+ netAmountCents: String!
508
+ createdAt: DateTime!
509
+ updatedAt: DateTime!
510
+ }
511
+
512
+ """
513
+ A single contribution to one of the brand's contribution pages.
514
+ Only SUCCEEDED contributions represent confirmed money.
515
+ """
516
+ type ContributionAdmin {
517
+ uid: ID!
518
+ contributionPageUid: String!
519
+ """Page title snapshotted at checkout."""
520
+ pageTitle: String!
521
+ donorName: String!
522
+ donorEmail: String!
523
+ """Note left by the contributor at checkout; null when none was given."""
524
+ note: String
525
+ currencyCode: String!
526
+ amountCents: Int!
527
+ refundedAmountCents: Int!
528
+ status: ContributionStatus!
529
+ paidAt: DateTime
530
+ """Paid without an ITM account."""
531
+ isGuest: Boolean!
532
+ """When a guest contribution was linked to an ITM account."""
533
+ claimedAt: DateTime
534
+ createdAt: DateTime!
535
+ updatedAt: DateTime!
536
+ }
537
+
454
538
  """
455
539
  The authenticated partner's brand identity and public-facing details.
456
540
  The brand is derived from the partner token and cannot be selected by UID or slug.
@@ -883,6 +967,20 @@ type GetPartnerDropsResponse {
883
967
  nextCursor: String
884
968
  }
885
969
 
970
+ type ContributionPagesResponse {
971
+ items: [ContributionPageAdmin!]!
972
+ totalCount: Int!
973
+ hasNextPage: Boolean!
974
+ nextCursor: String
975
+ }
976
+
977
+ type ContributionsResponse {
978
+ items: [ContributionAdmin!]!
979
+ totalCount: Int!
980
+ hasNextPage: Boolean!
981
+ nextCursor: String
982
+ }
983
+
886
984
  type GetMomentLineupsResponse {
887
985
  lineups: [MomentLineup!]!
888
986
  totalCount: Int!
@@ -1382,6 +1480,36 @@ type Query {
1382
1480
  take: Int
1383
1481
  ): GetBrandEchoesForUserResponse!
1384
1482
 
1483
+ """
1484
+ Paginated contribution pages for the brand associated with the partner token,
1485
+ newest first. Each page carries its public checkout URL and confirmed totals.
1486
+ """
1487
+ getPartnerContributionPages(
1488
+ """ACCEPTING, PAUSED or ARCHIVED; omit for all pages."""
1489
+ status: ContributionPageStatusFilter
1490
+ """Case-insensitive search over title and slug."""
1491
+ search: String
1492
+ cursor: String
1493
+ """1–100, default 25."""
1494
+ take: Int
1495
+ ): ContributionPagesResponse!
1496
+
1497
+ """
1498
+ Paginated contributions for the brand associated with the partner token,
1499
+ newest first. Filter status: SUCCEEDED for confirmed contributors.
1500
+ """
1501
+ getPartnerContributions(
1502
+ """Restrict to one contribution page owned by the brand."""
1503
+ contributionPageUid: String
1504
+ """Omit for all statuses; SUCCEEDED lists paid contributions."""
1505
+ status: ContributionStatus
1506
+ """Case-insensitive search over donor name and email."""
1507
+ search: String
1508
+ cursor: String
1509
+ """1–100, default 25."""
1510
+ take: Int
1511
+ ): ContributionsResponse!
1512
+
1385
1513
  """
1386
1514
  Get paginated ticket tiers for a partner-owned moment.
1387
1515
  Provide either momentSlug or momentUid. Omitted isActive defaults to active tiers only.