@itm-studio/partner-sdk 0.3.2 → 0.3.4
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 +34 -0
- package/dist/index.d.mts +64 -0
- package/dist/index.d.ts +64 -0
- package/dist/index.js +125 -35
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +125 -35
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/schema/partner.graphql +34 -0
package/package.json
CHANGED
package/schema/partner.graphql
CHANGED
|
@@ -1205,7 +1205,13 @@ type BrandAgentEmailSendMessage {
|
|
|
1205
1205
|
lastErrorMessage: String
|
|
1206
1206
|
}
|
|
1207
1207
|
|
|
1208
|
+
type BrandAgentEmailContext {
|
|
1209
|
+
operatorCcEmail: String!
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1208
1212
|
type BrandAgentEmailSendBatch {
|
|
1213
|
+
operatorCcEmail: String
|
|
1214
|
+
|
|
1209
1215
|
uid: String!
|
|
1210
1216
|
createdAt: DateTime!
|
|
1211
1217
|
status: BrandAgentEmailSendBatchStatus!
|
|
@@ -1239,7 +1245,28 @@ type GetPartnerMediaAssetsResponse {
|
|
|
1239
1245
|
nextCursor: String
|
|
1240
1246
|
}
|
|
1241
1247
|
|
|
1248
|
+
input ReserveAgentMediaUploadInput {
|
|
1249
|
+
idempotencyKey: String!
|
|
1250
|
+
toolCallId: String!
|
|
1251
|
+
requestHash: String!
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
type AgentMediaUploadReservation {
|
|
1255
|
+
uid: String!
|
|
1256
|
+
mayGenerate: Boolean!
|
|
1257
|
+
filename: String!
|
|
1258
|
+
uploadUrl: String
|
|
1259
|
+
downloadUrl: String!
|
|
1260
|
+
uploaded: Boolean!
|
|
1261
|
+
finishedAt: DateTime
|
|
1262
|
+
mediaAsset: MediaAsset
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1242
1265
|
type Query {
|
|
1266
|
+
"""Get the authenticated agent operator email for the approval preview. Requires a brand-agent session with SEND_EMAIL; unavailable to partner API keys."""
|
|
1267
|
+
getPartnerAgentEmailContext: BrandAgentEmailContext!
|
|
1268
|
+
getAgentMediaUpload(uid: String!): AgentMediaUploadReservation!
|
|
1269
|
+
|
|
1243
1270
|
"""Active brand-linked assets, newest first. Defaults to 50, capped at 100. READ_MEDIA for agents."""
|
|
1244
1271
|
getPartnerMediaAssets(input: GetPartnerMediaAssetsInput!): GetPartnerMediaAssetsResponse!
|
|
1245
1272
|
|
|
@@ -1409,6 +1436,9 @@ input BrandAgentEmailMessageInput {
|
|
|
1409
1436
|
}
|
|
1410
1437
|
|
|
1411
1438
|
input SendPartnerAgentEmailInput {
|
|
1439
|
+
"""Required for agent callers: operator CC from getPartnerAgentEmailContext, shown in the approved draft. Partner callers cannot set this."""
|
|
1440
|
+
operatorCcEmail: String
|
|
1441
|
+
|
|
1412
1442
|
"""Stable business idempotency key for this logical batch."""
|
|
1413
1443
|
idempotencyKey: String!
|
|
1414
1444
|
"""One to ten personalized, single-recipient plain-text emails."""
|
|
@@ -1728,6 +1758,9 @@ type CreatePartnerBrandSubscriptionResponse {
|
|
|
1728
1758
|
# ─── Mutations ────────────────────────────────────────────────────────────────
|
|
1729
1759
|
|
|
1730
1760
|
type Mutation {
|
|
1761
|
+
reserveAgentMediaUpload(input: ReserveAgentMediaUploadInput!): AgentMediaUploadReservation!
|
|
1762
|
+
finishAgentMediaUpload(uid: String!): Boolean!
|
|
1763
|
+
|
|
1731
1764
|
"""
|
|
1732
1765
|
Get a presigned S3 URL for direct file upload.
|
|
1733
1766
|
Rate limited to 30 requests per minute.
|
|
@@ -1746,6 +1779,7 @@ type Mutation {
|
|
|
1746
1779
|
idempotencyKey: String
|
|
1747
1780
|
"""Required for agent sessions; omit for partner tokens."""
|
|
1748
1781
|
toolCallId: String
|
|
1782
|
+
reservationUid: String
|
|
1749
1783
|
): MediaAsset!
|
|
1750
1784
|
|
|
1751
1785
|
"""
|