@itm-studio/partner-sdk 0.3.3 → 0.3.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/README.md +28 -0
- package/dist/index.d.mts +582 -1
- package/dist/index.d.ts +582 -1
- package/dist/index.js +1101 -31
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1101 -31
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/schema/partner.graphql +482 -0
package/README.md
CHANGED
|
@@ -1885,3 +1885,31 @@ Deploy the backend media schema and migration before releasing this SDK contract
|
|
|
1885
1885
|
Agent-session email callers first query `getPartnerAgentEmailContext { operatorCcEmail }`, show that address with every email draft, and include `operatorCcEmail` in `SendPartnerAgentEmailInput` after approval. The backend verifies it against the authenticated admin, snapshots it on the batch, and CCs that address on each message. When the operator is already the primary recipient, no duplicate CC is added. Read the approved snapshot through `BrandAgentEmailSendBatch.operatorCcEmail`. A changed operator address before queuing requires a revised draft and approval; queued retries retain the original address.
|
|
1886
1886
|
|
|
1887
1887
|
Partner API-key callers cannot query operator context or supply operator CC. Existing partner sends and the brand Reply-To address retain their existing behavior.
|
|
1888
|
+
|
|
1889
|
+
### Agent-generated posters
|
|
1890
|
+
|
|
1891
|
+
Agent sessions with `UPLOAD_MEDIA` can reserve an immutable upload using
|
|
1892
|
+
`reserveAgentMediaUpload({ input: { idempotencyKey, toolCallId, requestHash } })`.
|
|
1893
|
+
The request hash is SHA-256 of the canonical generation brief and model settings.
|
|
1894
|
+
Only the first claim receives `mayGenerate: true`; replays must inspect
|
|
1895
|
+
`getAgentMediaUpload({ uid })` and must never repeat a paid generation.
|
|
1896
|
+
|
|
1897
|
+
Generate pixels inside Eve through AI Gateway. PUT the PNG to the reserved
|
|
1898
|
+
`uploadUrl` with `Content-Type: image/png` and `If-None-Match: *`. Keep signed URLs
|
|
1899
|
+
and image bytes out of chat/tool results. Reserved posters are 1024 × 1280 PNGs,
|
|
1900
|
+
up to 10 MB. Register through `createPartnerMediaAsset` with the reservation's
|
|
1901
|
+
`filename`, `reservationUid`, `idempotencyKey: "media-upload:" + reservation.uid`,
|
|
1902
|
+
and the current `toolCallId`. Registration links the resulting asset to brand media.
|
|
1903
|
+
Return its UID, URL, MIME type and dimensions for preview and moment selection.
|
|
1904
|
+
|
|
1905
|
+
`getAgentMediaUpload` returns an existing asset or reports whether the object was
|
|
1906
|
+
uploaded, allowing registration after interruption without another model call.
|
|
1907
|
+
`finishAgentMediaUpload({ uid })` releases an unsuccessful attempt's active slot;
|
|
1908
|
+
it never grants permission to regenerate that attempt. A brand allows one active
|
|
1909
|
+
attempt for five minutes. Recovery requires the original brand and admin identity
|
|
1910
|
+
with current authorization; partner API keys cannot use reservation operations.
|
|
1911
|
+
Each requested revision gets a new reservation and brand media asset.
|
|
1912
|
+
|
|
1913
|
+
Deploy the backend reservation migration and schema before publishing SDK 0.3.3,
|
|
1914
|
+
then release the Eve and Backstage consumers. These operations do not call an
|
|
1915
|
+
image provider or consume notification credits.
|