@itm-studio/partner-sdk 0.6.3 → 0.6.5

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.6.3",
3
+ "version": "0.6.5",
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",
@@ -737,6 +737,22 @@ type Moment {
737
737
  updatedAt: DateTime!
738
738
  }
739
739
 
740
+ """An ordered photo in a moment's gallery, separate from its cover image."""
741
+ type MomentMedia {
742
+ uid: ID!
743
+ sortOrder: String!
744
+ mediaAsset: MediaAsset!
745
+ createdAt: DateTime!
746
+ updatedAt: DateTime!
747
+ }
748
+
749
+ type GetMomentGalleryPhotosResponse {
750
+ momentMedia: [MomentMedia!]!
751
+ totalCount: Int!
752
+ hasNextPage: Boolean!
753
+ nextCursor: String
754
+ }
755
+
740
756
  """
741
757
  Public-facing lineup entry for a moment.
742
758
  Only approved entries are returned by getPublicMomentLineups.
@@ -1745,6 +1761,7 @@ type GetPartnerMembershipTiersResponse {
1745
1761
  }
1746
1762
 
1747
1763
  type PartnerMember {
1764
+ signupFormResponseUid: String
1748
1765
  billingInterval: MembershipBillingInterval
1749
1766
  cancelAtPeriodEnd: Boolean!
1750
1767
  cancelledAt: DateTime
@@ -1783,6 +1800,7 @@ type PartnerMemberTier {
1783
1800
  }
1784
1801
 
1785
1802
  type PartnerMembershipTier {
1803
+ signupFormUid: String
1786
1804
  """Memberships currently ACTIVE or PAST_DUE on this tier"""
1787
1805
  activeMemberCount: Int!
1788
1806
  benefits: [String!]!
@@ -1791,6 +1809,13 @@ type PartnerMembershipTier {
1791
1809
  """ISO 4217 currency code"""
1792
1810
  currencyCode: String!
1793
1811
  description: String
1812
+ coverImage: MediaAsset
1813
+ finePrint: String
1814
+ """Maximum optional contribution per unit, in hundredths of the currency's major unit."""
1815
+ payWhatYouWantMaxPrice: Int
1816
+ """Suggested optional contribution per unit, in hundredths of the currency's major unit."""
1817
+ payWhatYouWantSuggestedPrice: Int
1818
+ payWhatYouWantMessage: String
1794
1819
  durationDays: Int
1795
1820
  expiryType: MembershipExpiryType
1796
1821
  fixedEndDate: DateTime
@@ -1969,6 +1994,10 @@ type PartnerAppLogin {
1969
1994
  }
1970
1995
 
1971
1996
  type Query {
1997
+ getPartnerForms(input: GetPartnerFormsInput): GetFormsPaginatedResponse!
1998
+ getPartnerForm(uid: String!): Form!
1999
+ getPartnerFormResponses(input: GetPartnerFormResponsesInput): GetPartnerFormResponsesResponse!
2000
+
1972
2001
  """
1973
2002
  Itemized POS orders for an owned moment, newest first. Defaults to 50 orders and caps take at 100.
1974
2003
  """
@@ -2009,6 +2038,12 @@ type Query {
2009
2038
  """List the authenticated partner brand's non-deleted membership tiers, including inactive and private tiers."""
2010
2039
  getPartnerMembershipTiers(input: GetPartnerMembershipTiersInput): GetPartnerMembershipTiersResponse!
2011
2040
 
2041
+ """
2042
+ Ordered gallery photos for a moment UID. Public read, separate from the cover image.
2043
+ Page size defaults to 20 and is capped at 50. Follow nextCursor while hasNextPage is true.
2044
+ """
2045
+ getMomentGalleryPhotos(momentUid: String!, cursor: String, take: Int): GetMomentGalleryPhotosResponse!
2046
+
2012
2047
  """Get the authenticated agent operator email for the approval preview. Requires a brand-agent session with SEND_EMAIL; unavailable to partner API keys."""
2013
2048
  getPartnerAgentEmailContext: BrandAgentEmailContext!
2014
2049
  getAgentMediaUpload(uid: String!): AgentMediaUploadReservation!
@@ -3617,3 +3652,187 @@ type MomentGuestListTotals {
3617
3652
  peopleRemaining: Int!
3618
3653
  plusOnes: Int!
3619
3654
  }
3655
+
3656
+ # Partner forms and response reads
3657
+ type Form {
3658
+ allowMultipleResponses: Boolean!
3659
+ buttonText: String!
3660
+ category: String
3661
+ createdAt: DateTime!
3662
+ deletedAt: DateTime
3663
+ description: String
3664
+ faqs: [FormFaq!]!
3665
+ fields: [FormField!]!
3666
+ isActive: Boolean!
3667
+ isPublic: Boolean!
3668
+ label: String
3669
+ labelColor: String
3670
+ mode: FormResponseMode!
3671
+ name: String!
3672
+ preSubmitCalloutText: String
3673
+ relevancyScoringContext: String
3674
+ relevancyScoringEnabled: Boolean!
3675
+ responsesCount: Int!
3676
+ sections: [FormFieldSection!]!
3677
+ slug: String!
3678
+ source: FormSource!
3679
+ successMessageBody: String!
3680
+ successMessageTitle: String!
3681
+ uid: ID!
3682
+ updatedAt: DateTime!
3683
+ }
3684
+
3685
+ type FormFaq {
3686
+ answer: String!
3687
+ createdAt: DateTime!
3688
+ isActive: Boolean!
3689
+ question: String!
3690
+ sortOrder: Int!
3691
+ uid: ID!
3692
+ updatedAt: DateTime!
3693
+ }
3694
+
3695
+ type FormField {
3696
+ createdAt: DateTime!
3697
+ defaultValue: String
3698
+ deletedAt: DateTime
3699
+ isRequired: Boolean!
3700
+ label: String!
3701
+ """
3702
+ Pictures on the choices of a single- or multi-choice question. Empty when there are none.
3703
+ """
3704
+ optionImages: [FormFieldOptionImage!]!
3705
+ options: [String!]
3706
+ placeholder: String
3707
+ sectionUid: String
3708
+ sortOrder: Int!
3709
+ subLabel: String
3710
+ type: FormFieldType!
3711
+ uid: ID!
3712
+ updatedAt: DateTime!
3713
+ validationSchema: String
3714
+ }
3715
+
3716
+ """A picture shown with one choice of a single- or multi-choice question."""
3717
+ type FormFieldOptionImage {
3718
+ image: MediaAsset!
3719
+ """The choice this picture belongs to, as listed in `options`."""
3720
+ option: String!
3721
+ }
3722
+
3723
+ type FormFieldSection {
3724
+ createdAt: DateTime!
3725
+ deletedAt: DateTime
3726
+ description: String
3727
+ sortOrder: Int!
3728
+ title: String!
3729
+ uid: ID!
3730
+ updatedAt: DateTime!
3731
+ }
3732
+
3733
+ enum FormFieldType {
3734
+ ADDRESS
3735
+ BOOLEAN
3736
+ DATE
3737
+ EMAIL
3738
+ ETHEREUM_WALLET
3739
+ FULL_NAME
3740
+ MULTI_SELECT
3741
+ NUMBER
3742
+ PHONE
3743
+ SELECT
3744
+ SIGNATURE
3745
+ STRING
3746
+ UPLOAD
3747
+ URL
3748
+ }
3749
+
3750
+ enum FormResponseMode {
3751
+ CHAT
3752
+ FORM
3753
+ SINGLE_PAGE
3754
+ }
3755
+
3756
+ enum FormSource {
3757
+ AGENT
3758
+ AUTO
3759
+ MANUAL
3760
+ }
3761
+
3762
+ type GetFormsPaginatedResponse {
3763
+ forms: [Form!]!
3764
+ hasNextPage: Boolean!
3765
+ nextCursor: String
3766
+ totalCount: Int!
3767
+ }
3768
+
3769
+ input GetPartnerFormsInput {
3770
+ cursor: String
3771
+ """Include archived forms. Default false."""
3772
+ includeArchived: Boolean
3773
+ isActive: Boolean
3774
+ """Case-insensitive form name search, at most 100 characters."""
3775
+ search: String
3776
+ sources: [FormSource!]
3777
+ """Page size. Default 50, maximum 100."""
3778
+ take: Int
3779
+ }
3780
+
3781
+ input GetPartnerFormResponsesInput {
3782
+ createdAtBefore: DateTime
3783
+ createdAtFrom: DateTime
3784
+ cursor: String
3785
+ """
3786
+ At most 100 customer UIDs, matching getPartnerMembers.customer.uid and getPartnerAudience.uid.
3787
+ """
3788
+ customerUids: [String!]
3789
+ """At most 100 form UIDs, all owned by the authenticated brand."""
3790
+ formUids: [String!]
3791
+ """
3792
+ At most 100 response UIDs, for example getPartnerMembers.signupFormResponseUid.
3793
+ """
3794
+ responseUids: [String!]
3795
+ """Page size. Default 50, maximum 100."""
3796
+ take: Int
3797
+ }
3798
+
3799
+ type PartnerFormFieldResponse {
3800
+ createdAt: DateTime!
3801
+ """
3802
+ Current question definition, including archived questions that still have answers.
3803
+ """
3804
+ formField: FormField!
3805
+ isValid: Boolean!
3806
+ uid: ID!
3807
+ updatedAt: DateTime!
3808
+ validationError: String
3809
+ value: JSON
3810
+ valueArray: JSON
3811
+ valueBoolean: Boolean
3812
+ valueDate: DateTime
3813
+ valueNumber: Float
3814
+ valueString: String
3815
+ }
3816
+
3817
+ type PartnerFormResponse {
3818
+ contextType: String
3819
+ createdAt: DateTime!
3820
+ customer: PartnerMemberCustomer!
3821
+ extraData: String
3822
+ form: Form!
3823
+ formFieldResponses: [PartnerFormFieldResponse!]!
3824
+ relevancyScore: Int
3825
+ relevancyScoreDetails: JSON
3826
+ relevancyScoredAt: DateTime
3827
+ responseData: JSON!
3828
+ uid: ID!
3829
+ updatedAt: DateTime!
3830
+ }
3831
+
3832
+ type GetPartnerFormResponsesResponse {
3833
+ formResponses: [PartnerFormResponse!]!
3834
+ hasNextPage: Boolean!
3835
+ nextCursor: String
3836
+ totalCount: Int!
3837
+ }
3838
+ # End partner forms and response reads