@itm-studio/partner-sdk 0.2.10 → 0.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itm-studio/partner-sdk",
3
- "version": "0.2.10",
3
+ "version": "0.3.0",
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",
@@ -9,10 +9,21 @@ scalar JSON
9
9
 
10
10
  # ─── Enums ───────────────────────────────────────────────────────────────────
11
11
 
12
- enum MomentStatus {
13
- UPCOMING
14
- LIVE
15
- ENDED
12
+ enum ConsentStatus {
13
+ NEVER_SUBSCRIBED
14
+ SUBSCRIBED
15
+ UNSUBSCRIBED
16
+ }
17
+
18
+ enum UserSource {
19
+ BRAND
20
+ DICE
21
+ ITM
22
+ }
23
+
24
+ enum SortDirection {
25
+ ASC
26
+ DESC
16
27
  }
17
28
 
18
29
  enum BrandAgentEmailSendBatchStatus {
@@ -32,6 +43,21 @@ enum BrandAgentEmailSendMessageStatus {
32
43
  UNKNOWN
33
44
  }
34
45
 
46
+ enum PartnerAudienceSortField {
47
+ CITY
48
+ CREATED_AT
49
+ NAME
50
+ NUM_MOMENTS
51
+ TOTAL_SPEND_USD
52
+ UPDATED_AT
53
+ }
54
+
55
+ enum MomentStatus {
56
+ UPCOMING
57
+ LIVE
58
+ ENDED
59
+ }
60
+
35
61
  enum MomentSortOrder {
36
62
  ASC
37
63
  DESC
@@ -514,6 +540,28 @@ type PartnerCustomer {
514
540
  tickets: [Ticket!]!
515
541
  }
516
542
 
543
+ type PartnerAudienceCustomer {
544
+ uid: String!
545
+ name: String
546
+ email: String
547
+ emailVerified: Boolean!
548
+ phoneNumber: String
549
+ city: String
550
+ country: String
551
+ source: UserSource!
552
+ isSubscribed: Boolean!
553
+ emailConsentStatus: ConsentStatus!
554
+ smsConsentStatus: ConsentStatus!
555
+ communicationsOptedOut: Boolean!
556
+ isSuppressed: Boolean!
557
+ totalSpendUsdCents: Int!
558
+ numMoments: Int!
559
+ numProducts: Int!
560
+ numEchoes: Int!
561
+ createdAt: DateTime!
562
+ updatedAt: DateTime!
563
+ }
564
+
517
565
  type PartnerMomentStats {
518
566
  generatedAt: DateTime!
519
567
  ticketsCount: Int!
@@ -740,6 +788,13 @@ type GetPartnerCustomersResponse {
740
788
  nextCursor: String
741
789
  }
742
790
 
791
+ type GetPartnerAudienceResponse {
792
+ customers: [PartnerAudienceCustomer!]!
793
+ hasNextPage: Boolean!
794
+ nextCursor: String
795
+ totalCount: Int
796
+ }
797
+
743
798
  type GetBrandEchoesForUserResponse {
744
799
  echoes: [Echo!]!
745
800
  totalCount: Int!
@@ -977,6 +1032,46 @@ input PartnerMomentsFiltersInput {
977
1032
  includePrivate: Boolean
978
1033
  }
979
1034
 
1035
+ input PartnerAudienceFiltersInput {
1036
+ customerUids: [String!]
1037
+ search: String
1038
+ hasEmail: Boolean
1039
+ hasPhone: Boolean
1040
+ isSubscribed: Boolean
1041
+ emailConsentStatuses: [ConsentStatus!]
1042
+ smsConsentStatuses: [ConsentStatus!]
1043
+ communicationsOptedOut: Boolean
1044
+ isSuppressed: Boolean
1045
+ sources: [UserSource!]
1046
+ cities: [String!]
1047
+ countries: [String!]
1048
+ createdAtFrom: DateTime
1049
+ createdAtBefore: DateTime
1050
+ updatedAtFrom: DateTime
1051
+ updatedAtBefore: DateTime
1052
+ minTotalSpendUsdCents: Int
1053
+ maxTotalSpendUsdCents: Int
1054
+ minNumMoments: Int
1055
+ maxNumMoments: Int
1056
+ momentUids: [String!]
1057
+ ticketTierUids: [String!]
1058
+ brandListUids: [String!]
1059
+ membershipTierUids: [String!]
1060
+ }
1061
+
1062
+ input PartnerAudienceSortInput {
1063
+ field: PartnerAudienceSortField!
1064
+ direction: SortDirection!
1065
+ }
1066
+
1067
+ input GetPartnerAudienceInput {
1068
+ filters: PartnerAudienceFiltersInput
1069
+ sort: PartnerAudienceSortInput
1070
+ cursor: String
1071
+ take: Int
1072
+ includeTotalCount: Boolean
1073
+ }
1074
+
980
1075
  # ─── Queries ─────────────────────────────────────────────────────────────────
981
1076
 
982
1077
  type BrandAgentEmailSendMessage {
@@ -1003,6 +1098,17 @@ type BrandAgentEmailSendBatch {
1003
1098
  messages: [BrandAgentEmailSendMessage!]!
1004
1099
  }
1005
1100
 
1101
+ type AgentThreadSeedContext {
1102
+ """
1103
+ Rendered prior-conversation transcript to seed a fresh agent session with,
1104
+ or null when the thread has no renderable history.
1105
+ """
1106
+ seed: String
1107
+ includedMessages: Int!
1108
+ totalMessages: Int!
1109
+ truncated: Boolean!
1110
+ }
1111
+
1006
1112
  type Query {
1007
1113
  """
1008
1114
  Get details for the brand associated with the partner token.
@@ -1012,6 +1118,13 @@ type Query {
1012
1118
  """Retrieve one AgentMail send batch owned by the authenticated partner brand."""
1013
1119
  getPartnerAgentEmailBatch(batchUid: String!): BrandAgentEmailSendBatch!
1014
1120
 
1121
+ """
1122
+ Seed context for restoring a conversation thread into a fresh agent
1123
+ session. Agent-access-token mode only: admin, brand, and thread scope all
1124
+ derive from the verified token claims, so the operation takes no arguments.
1125
+ """
1126
+ getAgentThreadSeed: AgentThreadSeedContext!
1127
+
1015
1128
  """
1016
1129
  Get paginated moments for the brand associated with the partner token.
1017
1130
  """
@@ -1081,6 +1194,12 @@ type Query {
1081
1194
  take: Int
1082
1195
  ): GetPartnerCustomersResponse!
1083
1196
 
1197
+ """
1198
+ Get the authenticated brand's customer audience using an allowlisted profile,
1199
+ effective consent, and aggregate-metrics projection.
1200
+ """
1201
+ getPartnerAudience(input: GetPartnerAudienceInput): GetPartnerAudienceResponse!
1202
+
1084
1203
  """
1085
1204
  Get a moment collection by slug.
1086
1205
  Returns the collection with its moments and links.
@@ -1158,6 +1277,8 @@ input SendPartnerAgentEmailInput {
1158
1277
  idempotencyKey: String!
1159
1278
  """One to ten personalized, single-recipient plain-text emails."""
1160
1279
  messages: [BrandAgentEmailMessageInput!]!
1280
+ """Brand-agent session callers only; rejected for partner API keys"""
1281
+ toolCallId: String
1161
1282
  }
1162
1283
 
1163
1284
  input VenueInput {
@@ -1224,6 +1345,10 @@ input CreatePartnerMomentInput {
1224
1345
  subcategory: MomentSubcategory
1225
1346
  """Ticket tiers to create along with the moment."""
1226
1347
  ticketTiers: [CreatePartnerTicketTierInput!]
1348
+ """Brand-agent session callers only; rejected for partner API keys"""
1349
+ idempotencyKey: String
1350
+ """Brand-agent session callers only; rejected for partner API keys"""
1351
+ toolCallId: String
1227
1352
  }
1228
1353
 
1229
1354
  input GetPartnerTicketTiersForMomentInput {