@itm-studio/partner-sdk 0.6.6 → 0.6.8
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 +132 -63
- package/dist/index.d.mts +168 -13
- package/dist/index.d.ts +168 -13
- package/dist/index.js +398 -175
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +376 -176
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/schema/partner.graphql +58 -6
package/package.json
CHANGED
package/schema/partner.graphql
CHANGED
|
@@ -2058,7 +2058,7 @@ type Query {
|
|
|
2058
2058
|
getPartnerAgentEmailContext: BrandAgentEmailContext!
|
|
2059
2059
|
getAgentMediaUpload(uid: String!): AgentMediaUploadReservation!
|
|
2060
2060
|
|
|
2061
|
-
"""Active brand-linked assets, newest first. Defaults to 50, capped at 100. READ_MEDIA for agents."""
|
|
2061
|
+
"""Active brand-linked assets, newest first. Defaults to 50, capped at 100. READ_MEDIA for agents; itm:media:write for AI connections."""
|
|
2062
2062
|
getPartnerMediaAssets(input: GetPartnerMediaAssetsInput!): GetPartnerMediaAssetsResponse!
|
|
2063
2063
|
|
|
2064
2064
|
"""
|
|
@@ -2066,7 +2066,7 @@ type Query {
|
|
|
2066
2066
|
"""
|
|
2067
2067
|
getPartnerMerch(input: GetMerchPaginatedInput!): GetMerchPaginatedResponse!
|
|
2068
2068
|
|
|
2069
|
-
"""An active asset linked to the caller's brand; null when unavailable. READ_MEDIA for agents."""
|
|
2069
|
+
"""An active asset linked to the caller's brand; null when unavailable. READ_MEDIA for agents; itm:media:write for AI connections."""
|
|
2070
2070
|
getPartnerMediaAsset(uid: String!): MediaAsset
|
|
2071
2071
|
|
|
2072
2072
|
"""
|
|
@@ -2585,9 +2585,45 @@ type MediaAssetUploadUrl {
|
|
|
2585
2585
|
filename: String!
|
|
2586
2586
|
}
|
|
2587
2587
|
|
|
2588
|
+
input CreatePartnerMediaUploadInput {
|
|
2589
|
+
"""
|
|
2590
|
+
MIME type of the file: image/jpeg, image/png, image/gif, image/webp, image/avif,
|
|
2591
|
+
video/mp4, video/quicktime, video/webm, audio/mpeg, audio/mp4, audio/wav,
|
|
2592
|
+
audio/flac, audio/ogg or audio/webm.
|
|
2593
|
+
"""
|
|
2594
|
+
contentType: String!
|
|
2595
|
+
"""Exact file size in bytes. Images up to 25 MB, audio up to 250 MB, video up to 1 GB."""
|
|
2596
|
+
byteSize: Int!
|
|
2597
|
+
}
|
|
2598
|
+
|
|
2599
|
+
"""
|
|
2600
|
+
A short-lived upload that stores only the declared type and exact size.
|
|
2601
|
+
Returned by createPartnerMediaUpload.
|
|
2602
|
+
"""
|
|
2603
|
+
type PartnerMediaUpload {
|
|
2604
|
+
"""Pass back to completePartnerMediaUpload after the PUT."""
|
|
2605
|
+
uploadKey: String!
|
|
2606
|
+
"""
|
|
2607
|
+
PUT the file here with the declared Content-Type and exact byte size (both signed).
|
|
2608
|
+
Treat it as a secret until it expires.
|
|
2609
|
+
"""
|
|
2610
|
+
uploadUrl: String!
|
|
2611
|
+
expiresAt: DateTime!
|
|
2612
|
+
}
|
|
2613
|
+
|
|
2614
|
+
input CompletePartnerMediaUploadInput {
|
|
2615
|
+
"""uploadKey from createPartnerMediaUpload."""
|
|
2616
|
+
uploadKey: String!
|
|
2617
|
+
"""
|
|
2618
|
+
Frame size of a video, when known. Ignored for images, which are measured
|
|
2619
|
+
from the file, and for audio.
|
|
2620
|
+
"""
|
|
2621
|
+
dimensions: DimensionsInput
|
|
2622
|
+
}
|
|
2623
|
+
|
|
2588
2624
|
"""
|
|
2589
2625
|
A media asset uploaded by a partner.
|
|
2590
|
-
Returned by createPartnerMediaAsset.
|
|
2626
|
+
Returned by completePartnerMediaUpload and createPartnerMediaAsset.
|
|
2591
2627
|
"""
|
|
2592
2628
|
type MediaAsset {
|
|
2593
2629
|
uid: ID!
|
|
@@ -2658,14 +2694,30 @@ type Mutation {
|
|
|
2658
2694
|
finishAgentMediaUpload(uid: String!): Boolean!
|
|
2659
2695
|
|
|
2660
2696
|
"""
|
|
2661
|
-
|
|
2697
|
+
Start a brand media upload: a short-lived URL that stores only the declared
|
|
2698
|
+
type and exact size. PUT the file there, then call completePartnerMediaUpload.
|
|
2699
|
+
Partner tokens, and AI connections holding itm:media:write.
|
|
2700
|
+
Rate limited to 30 requests per minute.
|
|
2701
|
+
"""
|
|
2702
|
+
createPartnerMediaUpload(input: CreatePartnerMediaUploadInput!): PartnerMediaUpload!
|
|
2703
|
+
|
|
2704
|
+
"""
|
|
2705
|
+
Verify an uploaded file and add it to the brand's media library. The stored
|
|
2706
|
+
bytes must be the declared type; images are measured from the file.
|
|
2707
|
+
Completing the same upload again returns the same asset.
|
|
2708
|
+
Rate limited to 30 requests per minute.
|
|
2709
|
+
"""
|
|
2710
|
+
completePartnerMediaUpload(input: CompletePartnerMediaUploadInput!): MediaAsset!
|
|
2711
|
+
|
|
2712
|
+
"""
|
|
2713
|
+
Legacy upload URL with no type or size check. Prefer createPartnerMediaUpload.
|
|
2662
2714
|
Rate limited to 30 requests per minute.
|
|
2663
2715
|
"""
|
|
2664
2716
|
getPartnerUploadUrl(filename: String!, fileExtension: String!): MediaAssetUploadUrl!
|
|
2665
2717
|
|
|
2666
2718
|
"""
|
|
2667
|
-
Record
|
|
2668
|
-
|
|
2719
|
+
Record a file uploaded through getPartnerUploadUrl and link it to the partner's brand.
|
|
2720
|
+
Legacy: the type and dimensions are taken as given. Prefer completePartnerMediaUpload.
|
|
2669
2721
|
"""
|
|
2670
2722
|
createPartnerMediaAsset(
|
|
2671
2723
|
mimetype: String!
|