@itm-studio/partner-sdk 0.3.8 → 0.4.1
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 +344 -0
- package/dist/index.d.mts +206 -1
- package/dist/index.d.ts +206 -1
- package/dist/index.js +478 -214
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +478 -214
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/schema/partner.graphql +199 -0
package/package.json
CHANGED
package/schema/partner.graphql
CHANGED
|
@@ -724,7 +724,16 @@ type User {
|
|
|
724
724
|
updatedAt: DateTime!
|
|
725
725
|
}
|
|
726
726
|
|
|
727
|
+
enum PartnerTicketStatus {
|
|
728
|
+
VALID
|
|
729
|
+
REFUNDED
|
|
730
|
+
CANCELLED
|
|
731
|
+
PENDING
|
|
732
|
+
FAILED
|
|
733
|
+
}
|
|
734
|
+
|
|
727
735
|
type Ticket {
|
|
736
|
+
status: PartnerTicketStatus!
|
|
728
737
|
uid: ID!
|
|
729
738
|
price: Float!
|
|
730
739
|
redeemedAt: DateTime
|
|
@@ -868,6 +877,17 @@ enum EventImportPlatform {
|
|
|
868
877
|
EVENTBRITE
|
|
869
878
|
}
|
|
870
879
|
|
|
880
|
+
"""Exactly one account identifier. Current holders only, scoped to the token brand."""
|
|
881
|
+
input PartnerTicketsForUserInput {
|
|
882
|
+
userUid: String
|
|
883
|
+
email: String
|
|
884
|
+
phoneNumber: String
|
|
885
|
+
momentStatuses: [MomentStatus!]
|
|
886
|
+
ticketStatuses: [PartnerTicketStatus!]
|
|
887
|
+
cursor: String
|
|
888
|
+
take: Int
|
|
889
|
+
}
|
|
890
|
+
|
|
871
891
|
"""
|
|
872
892
|
Match the current ITM ticket owner by exactly one of userUid, email, or phoneNumber.
|
|
873
893
|
For an attendee app, derive this identifier from the authenticated user's verified
|
|
@@ -1592,7 +1612,160 @@ type PartnerMembershipTier {
|
|
|
1592
1612
|
yearlyPrice: Int
|
|
1593
1613
|
}
|
|
1594
1614
|
|
|
1615
|
+
# Login with ITM apps and headless partner login
|
|
1616
|
+
"""Whether a Login with ITM app can sign users in."""
|
|
1617
|
+
enum BrandAppStatus {
|
|
1618
|
+
ACTIVE
|
|
1619
|
+
DISABLED
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1622
|
+
enum ConsentChannel {
|
|
1623
|
+
EMAIL
|
|
1624
|
+
PUSH
|
|
1625
|
+
SMS
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
enum ConsentPromptCategory {
|
|
1629
|
+
CUSTOM
|
|
1630
|
+
MARKETING
|
|
1631
|
+
PRIVACY
|
|
1632
|
+
TERMS
|
|
1633
|
+
}
|
|
1634
|
+
|
|
1635
|
+
enum LoginCodeChannel {
|
|
1636
|
+
CALL
|
|
1637
|
+
EMAIL
|
|
1638
|
+
SMS
|
|
1639
|
+
WHATSAPP
|
|
1640
|
+
}
|
|
1641
|
+
|
|
1642
|
+
"""
|
|
1643
|
+
A brand-owned Login with ITM application: a public OAuth/OIDC client that uses PKCE and has no secret.
|
|
1644
|
+
"""
|
|
1645
|
+
type BrandApp {
|
|
1646
|
+
"""Public OAuth client_id. It is not a secret."""
|
|
1647
|
+
clientId: String!
|
|
1648
|
+
createdAt: DateTime!
|
|
1649
|
+
|
|
1650
|
+
"""
|
|
1651
|
+
OpenID Connect issuer URL apps authenticate against; null when Login with ITM is not configured.
|
|
1652
|
+
"""
|
|
1653
|
+
issuer: String
|
|
1654
|
+
name: String!
|
|
1655
|
+
|
|
1656
|
+
"""
|
|
1657
|
+
Exact redirect URIs. All share one origin; that origin may call the token and userinfo endpoints and hand logins to ITM embeds.
|
|
1658
|
+
"""
|
|
1659
|
+
redirectUris: [String!]!
|
|
1660
|
+
status: BrandAppStatus!
|
|
1661
|
+
uid: String!
|
|
1662
|
+
}
|
|
1663
|
+
|
|
1664
|
+
input CreateBrandAppInput {
|
|
1665
|
+
name: String!
|
|
1666
|
+
|
|
1667
|
+
"""
|
|
1668
|
+
Exact https redirect URIs (http is allowed only for localhost) on a single origin.
|
|
1669
|
+
"""
|
|
1670
|
+
redirectUris: [String!]!
|
|
1671
|
+
}
|
|
1672
|
+
|
|
1673
|
+
type CheckoutMarketingConsentPrompt {
|
|
1674
|
+
bodyMarkdown: String
|
|
1675
|
+
category: ConsentPromptCategory!
|
|
1676
|
+
channels: [ConsentChannel!]!
|
|
1677
|
+
labelMarkdown: String!
|
|
1678
|
+
promptUid: String!
|
|
1679
|
+
required: Boolean!
|
|
1680
|
+
version: Int!
|
|
1681
|
+
}
|
|
1682
|
+
|
|
1683
|
+
input CheckoutMarketingConsentInput {
|
|
1684
|
+
accepted: Boolean!
|
|
1685
|
+
language: String
|
|
1686
|
+
pageUrl: String
|
|
1687
|
+
referrerUrl: String
|
|
1688
|
+
screenHeight: Int
|
|
1689
|
+
screenWidth: Int
|
|
1690
|
+
submittedAt: DateTime
|
|
1691
|
+
timezone: String
|
|
1692
|
+
}
|
|
1693
|
+
|
|
1694
|
+
"""
|
|
1695
|
+
Starts a headless Login with ITM sign-in from the brand's server: ITM sends a code that only verifyPartnerAppLogin accepts for this app and partner credential.
|
|
1696
|
+
"""
|
|
1697
|
+
input StartPartnerAppLoginInput {
|
|
1698
|
+
"""The app's public client ID."""
|
|
1699
|
+
clientId: String!
|
|
1700
|
+
|
|
1701
|
+
"""
|
|
1702
|
+
The visitor's request details. ipAddress (the visitor's, not your server's) is required.
|
|
1703
|
+
"""
|
|
1704
|
+
compliance: SubscriptionComplianceInput!
|
|
1705
|
+
|
|
1706
|
+
"""Phone number or email address."""
|
|
1707
|
+
identifier: String!
|
|
1708
|
+
}
|
|
1709
|
+
|
|
1710
|
+
type PartnerAppLoginChallenge {
|
|
1711
|
+
channel: LoginCodeChannel!
|
|
1712
|
+
destinationHint: String
|
|
1713
|
+
|
|
1714
|
+
"""
|
|
1715
|
+
Show this text verbatim with the code field: it is what signing in shares.
|
|
1716
|
+
"""
|
|
1717
|
+
disclosure: String!
|
|
1718
|
+
expiresAt: DateTime!
|
|
1719
|
+
|
|
1720
|
+
"""
|
|
1721
|
+
Optional marketing opt-in. Render verbatim as an unchecked checkbox; signing in must not depend on it.
|
|
1722
|
+
"""
|
|
1723
|
+
marketingConsentPrompt: CheckoutMarketingConsentPrompt!
|
|
1724
|
+
}
|
|
1725
|
+
|
|
1726
|
+
input VerifyPartnerAppLoginInput {
|
|
1727
|
+
clientId: String!
|
|
1728
|
+
code: String!
|
|
1729
|
+
|
|
1730
|
+
"""The visitor's request details. ipAddress is required."""
|
|
1731
|
+
compliance: SubscriptionComplianceInput!
|
|
1732
|
+
|
|
1733
|
+
"""
|
|
1734
|
+
The identifier the code was sent to. Read it from your own session, not from the browser.
|
|
1735
|
+
"""
|
|
1736
|
+
identifier: String!
|
|
1737
|
+
|
|
1738
|
+
"""
|
|
1739
|
+
Send only when the visitor ticked the opt-in (accepted: true; pageUrl here or in compliance). Omit it otherwise; omission never unsubscribes anyone.
|
|
1740
|
+
"""
|
|
1741
|
+
marketingConsent: CheckoutMarketingConsentInput
|
|
1742
|
+
}
|
|
1743
|
+
|
|
1744
|
+
type PartnerAppLoginProfile {
|
|
1745
|
+
email: String
|
|
1746
|
+
emailVerified: Boolean!
|
|
1747
|
+
name: String
|
|
1748
|
+
phoneNumber: String
|
|
1749
|
+
phoneVerified: Boolean!
|
|
1750
|
+
}
|
|
1751
|
+
|
|
1752
|
+
"""
|
|
1753
|
+
A completed headless sign-in. It is not a credential: keep your own session keyed by customerUid.
|
|
1754
|
+
"""
|
|
1755
|
+
type PartnerAppLogin {
|
|
1756
|
+
"""
|
|
1757
|
+
The person's customer UID for your brand (getPartnerAudience customer uid).
|
|
1758
|
+
"""
|
|
1759
|
+
customerUid: String!
|
|
1760
|
+
profile: PartnerAppLoginProfile!
|
|
1761
|
+
}
|
|
1762
|
+
|
|
1595
1763
|
type Query {
|
|
1764
|
+
"""
|
|
1765
|
+
The brand's Login with ITM apps (at most 20), oldest first. Deleted apps are omitted.
|
|
1766
|
+
"""
|
|
1767
|
+
getPartnerBrandApps: [BrandApp!]!
|
|
1768
|
+
|
|
1596
1769
|
"""List the authenticated partner brand's membership rows; PENDING is excluded by default."""
|
|
1597
1770
|
getPartnerMembers(input: GetPartnerMembersInput): GetPartnerMembersResponse!
|
|
1598
1771
|
|
|
@@ -1670,6 +1843,12 @@ type Query {
|
|
|
1670
1843
|
input: PartnerMomentAttendanceLookupInput!
|
|
1671
1844
|
): PartnerMomentAttendanceStats
|
|
1672
1845
|
|
|
1846
|
+
"""
|
|
1847
|
+
Get paginated tickets currently held by one user across the partner brand.
|
|
1848
|
+
Verify the app user's identity on your server before exposing tickets or QR codes.
|
|
1849
|
+
"""
|
|
1850
|
+
getPartnerTicketsForUser(input: PartnerTicketsForUserInput!): GetTicketsResponse!
|
|
1851
|
+
|
|
1673
1852
|
"""
|
|
1674
1853
|
Get confirmed tickets for a moment owned by the partner token's brand.
|
|
1675
1854
|
Use the user filter when retrieving an attendee's tickets for QR display.
|
|
@@ -2154,6 +2333,26 @@ type CreatePartnerBrandSubscriptionResponse {
|
|
|
2154
2333
|
# ─── Mutations ────────────────────────────────────────────────────────────────
|
|
2155
2334
|
|
|
2156
2335
|
type Mutation {
|
|
2336
|
+
"""
|
|
2337
|
+
Registers a Login with ITM app for the brand. A brand can have up to 20 apps.
|
|
2338
|
+
"""
|
|
2339
|
+
createPartnerBrandApp(input: CreateBrandAppInput!): BrandApp!
|
|
2340
|
+
|
|
2341
|
+
"""
|
|
2342
|
+
Disables an app: new logins stop and its tokens and remembered consents are revoked immediately. A partner key cannot re-enable it; ask ITM.
|
|
2343
|
+
"""
|
|
2344
|
+
disablePartnerBrandApp(appUid: String!): BrandApp!
|
|
2345
|
+
|
|
2346
|
+
"""
|
|
2347
|
+
Sends a Login with ITM code for the brand's own sign-in form. Call it from your server; the response is the same whether or not the person has an ITM account.
|
|
2348
|
+
"""
|
|
2349
|
+
startPartnerAppLogin(input: StartPartnerAppLoginInput!): PartnerAppLoginChallenge!
|
|
2350
|
+
|
|
2351
|
+
"""
|
|
2352
|
+
Completes a headless sign-in: checks the code, adds the person to the brand's contacts and records an optional opt-in. Returns no ITM credential.
|
|
2353
|
+
"""
|
|
2354
|
+
verifyPartnerAppLogin(input: VerifyPartnerAppLoginInput!): PartnerAppLogin!
|
|
2355
|
+
|
|
2157
2356
|
"""Log a payment received off-site. Brand scope comes from the authenticated token or agent session. Amount is in ITM cents (major units times 100). Retain requestUid across retries."""
|
|
2158
2357
|
createPartnerManualContribution(input: CreateManualContributionInput!): ContributionAdmin!
|
|
2159
2358
|
|