@itm-studio/partner-sdk 0.6.5 → 0.6.7

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.6.5",
3
+ "version": "0.6.7",
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",
@@ -706,6 +706,8 @@ type Moment {
706
706
  description: String
707
707
  blurb: String!
708
708
  slug: String!
709
+ """Canonical public URL on ITM. Always returned, whatever the moment's visibility; check isPrivate and status before sharing it."""
710
+ publicUrl: String!
709
711
  startDate: DateTime!
710
712
  endDate: DateTime!
711
713
  isPrivate: Boolean!
@@ -915,6 +917,8 @@ type MerchSize {
915
917
  type Merch {
916
918
  uid: ID!
917
919
  name: String!
920
+ """Canonical public URL on ITM. Always returned, whatever the item's visibility; check isLive before sharing it."""
921
+ publicUrl: String!
918
922
  description: String
919
923
  """Price in ITM cents (major units times 100)."""
920
924
  price: Float!
@@ -1195,6 +1199,8 @@ type Echo {
1195
1199
  type: EchoType!
1196
1200
  name: String!
1197
1201
  slug: String
1202
+ """Canonical public URL on ITM. Always returned, whatever the echo's visibility; check isPublic and publishTime before sharing it."""
1203
+ publicUrl: String!
1198
1204
  description: String
1199
1205
  """Rich text body for POST-type echoes."""
1200
1206
  postBody: String
@@ -1219,6 +1225,8 @@ type BrandDrop {
1219
1225
  uid: ID!
1220
1226
  name: String!
1221
1227
  slug: String!
1228
+ """Canonical public URL on ITM. Always returned, whatever the drop's visibility; check isPublic and isActive before sharing it."""
1229
+ publicUrl: String!
1222
1230
  subtitle: String
1223
1231
  disclosures: String
1224
1232
  isPublic: Boolean!
@@ -1832,6 +1840,8 @@ type PartnerMembershipTier {
1832
1840
  Amount in hundredths of the currency's major unit (always x100, including zero-decimal currencies such as JPY)
1833
1841
  """
1834
1842
  price: Int!
1843
+ """Canonical public URL on ITM. Always returned, whatever the pass's visibility; check isPublic and isActive before sharing it."""
1844
+ publicUrl: String!
1835
1845
  slug: String!
1836
1846
  sortOrder: Int!
1837
1847
  supplyCap: Int
@@ -2048,7 +2058,7 @@ type Query {
2048
2058
  getPartnerAgentEmailContext: BrandAgentEmailContext!
2049
2059
  getAgentMediaUpload(uid: String!): AgentMediaUploadReservation!
2050
2060
 
2051
- """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."""
2052
2062
  getPartnerMediaAssets(input: GetPartnerMediaAssetsInput!): GetPartnerMediaAssetsResponse!
2053
2063
 
2054
2064
  """
@@ -2056,7 +2066,7 @@ type Query {
2056
2066
  """
2057
2067
  getPartnerMerch(input: GetMerchPaginatedInput!): GetMerchPaginatedResponse!
2058
2068
 
2059
- """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."""
2060
2070
  getPartnerMediaAsset(uid: String!): MediaAsset
2061
2071
 
2062
2072
  """
@@ -2575,9 +2585,45 @@ type MediaAssetUploadUrl {
2575
2585
  filename: String!
2576
2586
  }
2577
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
+
2578
2624
  """
2579
2625
  A media asset uploaded by a partner.
2580
- Returned by createPartnerMediaAsset.
2626
+ Returned by completePartnerMediaUpload and createPartnerMediaAsset.
2581
2627
  """
2582
2628
  type MediaAsset {
2583
2629
  uid: ID!
@@ -2648,14 +2694,30 @@ type Mutation {
2648
2694
  finishAgentMediaUpload(uid: String!): Boolean!
2649
2695
 
2650
2696
  """
2651
- Get a presigned S3 URL for direct file upload.
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.
2652
2714
  Rate limited to 30 requests per minute.
2653
2715
  """
2654
2716
  getPartnerUploadUrl(filename: String!, fileExtension: String!): MediaAssetUploadUrl!
2655
2717
 
2656
2718
  """
2657
- Record an uploaded media asset and link it to the partner's brand.
2658
- Call after uploading to S3 via the presigned URL from getPartnerUploadUrl.
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.
2659
2721
  """
2660
2722
  createPartnerMediaAsset(
2661
2723
  mimetype: String!
@@ -3670,6 +3732,8 @@ type Form {
3670
3732
  mode: FormResponseMode!
3671
3733
  name: String!
3672
3734
  preSubmitCalloutText: String
3735
+ """Canonical public URL on ITM. Always returned, whatever the form's visibility; check isPublic and isActive before sharing it."""
3736
+ publicUrl: String!
3673
3737
  relevancyScoringContext: String
3674
3738
  relevancyScoringEnabled: Boolean!
3675
3739
  responsesCount: Int!