@runwayml/sdk 4.1.0 → 4.2.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.
Files changed (48) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/client.d.mts +3 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +3 -0
  5. package/client.d.ts.map +1 -1
  6. package/client.js +12 -1
  7. package/client.js.map +1 -1
  8. package/client.mjs +12 -1
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/index.d.mts +1 -0
  12. package/resources/index.d.mts.map +1 -1
  13. package/resources/index.d.ts +1 -0
  14. package/resources/index.d.ts.map +1 -1
  15. package/resources/index.js +3 -1
  16. package/resources/index.js.map +1 -1
  17. package/resources/index.mjs +1 -0
  18. package/resources/index.mjs.map +1 -1
  19. package/resources/organization.d.mts +2 -2
  20. package/resources/organization.d.mts.map +1 -1
  21. package/resources/organization.d.ts +2 -2
  22. package/resources/organization.d.ts.map +1 -1
  23. package/resources/recipes.d.mts +428 -0
  24. package/resources/recipes.d.mts.map +1 -0
  25. package/resources/recipes.d.ts +428 -0
  26. package/resources/recipes.d.ts.map +1 -0
  27. package/resources/recipes.js +51 -0
  28. package/resources/recipes.js.map +1 -0
  29. package/resources/recipes.mjs +47 -0
  30. package/resources/recipes.mjs.map +1 -0
  31. package/resources/video-to-video.d.mts +9 -6
  32. package/resources/video-to-video.d.mts.map +1 -1
  33. package/resources/video-to-video.d.ts +9 -6
  34. package/resources/video-to-video.d.ts.map +1 -1
  35. package/resources/video-to-video.js +0 -1
  36. package/resources/video-to-video.js.map +1 -1
  37. package/resources/video-to-video.mjs +0 -1
  38. package/resources/video-to-video.mjs.map +1 -1
  39. package/src/client.ts +42 -1
  40. package/src/resources/index.ts +15 -0
  41. package/src/resources/organization.ts +11 -1
  42. package/src/resources/recipes.ts +565 -0
  43. package/src/resources/video-to-video.ts +11 -7
  44. package/src/version.ts +1 -1
  45. package/version.d.mts +1 -1
  46. package/version.d.ts +1 -1
  47. package/version.js +1 -1
  48. package/version.mjs +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"video-to-video.js","sourceRoot":"","sources":["../src/resources/video-to-video.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,+CAAqF;AAErF;;GAEG;AACH,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,IAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAA,gCAAsB,EAA6B,IAAI,CAAC,OAAO,CAAC,CACrE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAC9D,CAAC;IACJ,CAAC;CACF;AArBD,oCAqBC"}
1
+ {"version":3,"file":"video-to-video.js","sourceRoot":"","sources":["../src/resources/video-to-video.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,+CAAqF;AAErF;;GAEG;AACH,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;;;;;;;;;OAUG;IACH,MAAM,CACJ,IAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAA,gCAAsB,EAA6B,IAAI,CAAC,OAAO,CAAC,CACrE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAC9D,CAAC;IACJ,CAAC;CACF;AApBD,oCAoBC"}
@@ -12,7 +12,6 @@ export class VideoToVideo extends APIResource {
12
12
  * ```ts
13
13
  * const videoToVideo = await client.videoToVideo.create({
14
14
  * model: 'aleph2',
15
- * promptText: 'x',
16
15
  * videoUri: 'https://example.com/video.mp4',
17
16
  * });
18
17
  * ```
@@ -1 +1 @@
1
- {"version":3,"file":"video-to-video.mjs","sourceRoot":"","sources":["../src/resources/video-to-video.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAE/C,OAAO,EAA+B,sBAAsB,EAAE,2BAAuB;AAErF;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,IAA8B,EAC9B,OAAwB;QAExB,OAAO,sBAAsB,CAA6B,IAAI,CAAC,OAAO,CAAC,CACrE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAC9D,CAAC;IACJ,CAAC;CACF"}
1
+ {"version":3,"file":"video-to-video.mjs","sourceRoot":"","sources":["../src/resources/video-to-video.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAE/C,OAAO,EAA+B,sBAAsB,EAAE,2BAAuB;AAErF;;GAEG;AACH,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;OAUG;IACH,MAAM,CACJ,IAA8B,EAC9B,OAAwB;QAExB,OAAO,sBAAsB,CAA6B,IAAI,CAAC,OAAO,CAAC,CACrE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAC9D,CAAC;IACJ,CAAC;CACF"}
package/src/client.ts CHANGED
@@ -77,6 +77,21 @@ import {
77
77
  RealtimeSessionRetrieveResponse,
78
78
  RealtimeSessions,
79
79
  } from './resources/realtime-sessions';
80
+ import {
81
+ RecipeMarketingStockImageParams,
82
+ RecipeMarketingStockImageResponse,
83
+ RecipeMultiShotVideoParams,
84
+ RecipeMultiShotVideoResponse,
85
+ RecipeProductAdParams,
86
+ RecipeProductAdResponse,
87
+ RecipeProductCampaignImageParams,
88
+ RecipeProductCampaignImageResponse,
89
+ RecipeProductSwapParams,
90
+ RecipeProductSwapResponse,
91
+ RecipeProductUgcParams,
92
+ RecipeProductUgcResponse,
93
+ Recipes,
94
+ } from './resources/recipes';
80
95
  import { SoundEffect, SoundEffectCreateParams, SoundEffectCreateResponse } from './resources/sound-effect';
81
96
  import {
82
97
  SpeechToSpeech,
@@ -816,11 +831,19 @@ export class RunwayML {
816
831
  return () => controller.abort();
817
832
  }
818
833
 
819
- private buildBody({ options: { body, headers: rawHeaders } }: { options: FinalRequestOptions }): {
834
+ private buildBody({ options }: { options: FinalRequestOptions }): {
820
835
  bodyHeaders: HeadersLike;
821
836
  body: BodyInit | undefined;
822
837
  } {
838
+ const { body, headers: rawHeaders } = options;
823
839
  if (!body) {
840
+ // A resource method always passes a `body` key when its operation defines a
841
+ // request body, even if the caller omitted an optional body param. Keep the
842
+ // content-type for those, and only elide it for operations with no body at
843
+ // all (e.g. GET/DELETE).
844
+ if (body == null && 'body' in options) {
845
+ return this.#encoder({ body, headers: buildHeaders([rawHeaders]) });
846
+ }
824
847
  return { bodyHeaders: undefined, body: undefined };
825
848
  }
826
849
  const headers = buildHeaders([rawHeaders]);
@@ -934,6 +957,7 @@ export class RunwayML {
934
957
  avatarVideos: API.AvatarVideos = new API.AvatarVideos(this);
935
958
  documents: API.Documents = new API.Documents(this);
936
959
  realtimeSessions: API.RealtimeSessions = new API.RealtimeSessions(this);
960
+ recipes: API.Recipes = new API.Recipes(this);
937
961
  voices: API.Voices = new API.Voices(this);
938
962
  uploads: API.Uploads = new API.Uploads(this);
939
963
  workflows: API.Workflows = new API.Workflows(this);
@@ -958,6 +982,7 @@ RunwayML.AvatarConversations = AvatarConversations;
958
982
  RunwayML.AvatarVideos = AvatarVideos;
959
983
  RunwayML.Documents = Documents;
960
984
  RunwayML.RealtimeSessions = RealtimeSessions;
985
+ RunwayML.Recipes = Recipes;
961
986
  RunwayML.Voices = Voices;
962
987
  RunwayML.Uploads = Uploads;
963
988
  RunwayML.Workflows = Workflows;
@@ -1090,6 +1115,22 @@ export declare namespace RunwayML {
1090
1115
  type RealtimeSessionCreateParams as RealtimeSessionCreateParams,
1091
1116
  };
1092
1117
 
1118
+ export {
1119
+ Recipes as Recipes,
1120
+ type RecipeMarketingStockImageResponse as RecipeMarketingStockImageResponse,
1121
+ type RecipeMultiShotVideoResponse as RecipeMultiShotVideoResponse,
1122
+ type RecipeProductAdResponse as RecipeProductAdResponse,
1123
+ type RecipeProductCampaignImageResponse as RecipeProductCampaignImageResponse,
1124
+ type RecipeProductSwapResponse as RecipeProductSwapResponse,
1125
+ type RecipeProductUgcResponse as RecipeProductUgcResponse,
1126
+ type RecipeMarketingStockImageParams as RecipeMarketingStockImageParams,
1127
+ type RecipeMultiShotVideoParams as RecipeMultiShotVideoParams,
1128
+ type RecipeProductAdParams as RecipeProductAdParams,
1129
+ type RecipeProductCampaignImageParams as RecipeProductCampaignImageParams,
1130
+ type RecipeProductSwapParams as RecipeProductSwapParams,
1131
+ type RecipeProductUgcParams as RecipeProductUgcParams,
1132
+ };
1133
+
1093
1134
  export {
1094
1135
  Voices as Voices,
1095
1136
  type VoiceCreateResponse as VoiceCreateResponse,
@@ -58,6 +58,21 @@ export {
58
58
  type RealtimeSessionRetrieveResponse,
59
59
  type RealtimeSessionCreateParams,
60
60
  } from './realtime-sessions';
61
+ export {
62
+ Recipes,
63
+ type RecipeMarketingStockImageResponse,
64
+ type RecipeMultiShotVideoResponse,
65
+ type RecipeProductAdResponse,
66
+ type RecipeProductCampaignImageResponse,
67
+ type RecipeProductSwapResponse,
68
+ type RecipeProductUgcResponse,
69
+ type RecipeMarketingStockImageParams,
70
+ type RecipeMultiShotVideoParams,
71
+ type RecipeProductAdParams,
72
+ type RecipeProductCampaignImageParams,
73
+ type RecipeProductSwapParams,
74
+ type RecipeProductUgcParams,
75
+ } from './recipes';
61
76
  export { SoundEffect, type SoundEffectCreateResponse, type SoundEffectCreateParams } from './sound-effect';
62
77
  export {
63
78
  SpeechToSpeech,
@@ -139,6 +139,11 @@ export interface OrganizationRetrieveUsageResponse {
139
139
  | 'happyhorse_1_0'
140
140
  | 'aleph2'
141
141
  | 'product_swap'
142
+ | 'product_ad'
143
+ | 'multi_shot_video'
144
+ | 'product_ugc'
145
+ | 'marketing_stock_image'
146
+ | 'product_campaign_image'
142
147
  >;
143
148
 
144
149
  results: Array<OrganizationRetrieveUsageResponse.Result>;
@@ -207,7 +212,12 @@ export namespace OrganizationRetrieveUsageResponse {
207
212
  | 'klingO3_4k'
208
213
  | 'happyhorse_1_0'
209
214
  | 'aleph2'
210
- | 'product_swap';
215
+ | 'product_swap'
216
+ | 'product_ad'
217
+ | 'multi_shot_video'
218
+ | 'product_ugc'
219
+ | 'marketing_stock_image'
220
+ | 'product_campaign_image';
211
221
  }
212
222
  }
213
223
  }