@runwayml/sdk 4.13.2 → 4.14.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 (199) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/client.d.mts +3 -3
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +3 -3
  5. package/client.d.ts.map +1 -1
  6. package/client.js +1 -1
  7. package/client.js.map +1 -1
  8. package/client.mjs +1 -1
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/character-performance.d.mts +17 -0
  12. package/resources/character-performance.d.mts.map +1 -1
  13. package/resources/character-performance.d.ts +17 -0
  14. package/resources/character-performance.d.ts.map +1 -1
  15. package/resources/generate/audio.d.mts +46 -24
  16. package/resources/generate/audio.d.mts.map +1 -1
  17. package/resources/generate/audio.d.ts +46 -24
  18. package/resources/generate/audio.d.ts.map +1 -1
  19. package/resources/generate/audio.js.map +1 -1
  20. package/resources/generate/audio.mjs.map +1 -1
  21. package/resources/generate/generate.d.mts +2 -2
  22. package/resources/generate/generate.d.mts.map +1 -1
  23. package/resources/generate/generate.d.ts +2 -2
  24. package/resources/generate/generate.d.ts.map +1 -1
  25. package/resources/generate/generate.js.map +1 -1
  26. package/resources/generate/generate.mjs.map +1 -1
  27. package/resources/generate/image.d.mts +21 -0
  28. package/resources/generate/image.d.mts.map +1 -1
  29. package/resources/generate/image.d.ts +21 -0
  30. package/resources/generate/image.d.ts.map +1 -1
  31. package/resources/generate/index.d.mts +1 -1
  32. package/resources/generate/index.d.mts.map +1 -1
  33. package/resources/generate/index.d.ts +1 -1
  34. package/resources/generate/index.d.ts.map +1 -1
  35. package/resources/generate/index.js.map +1 -1
  36. package/resources/generate/index.mjs +1 -1
  37. package/resources/generate/index.mjs.map +1 -1
  38. package/resources/generate/video.d.mts +21 -0
  39. package/resources/generate/video.d.mts.map +1 -1
  40. package/resources/generate/video.d.ts +21 -0
  41. package/resources/generate/video.d.ts.map +1 -1
  42. package/resources/image-to-video.d.mts +118 -27
  43. package/resources/image-to-video.d.mts.map +1 -1
  44. package/resources/image-to-video.d.ts +118 -27
  45. package/resources/image-to-video.d.ts.map +1 -1
  46. package/resources/image-upscale.d.mts +17 -0
  47. package/resources/image-upscale.d.mts.map +1 -1
  48. package/resources/image-upscale.d.ts +17 -0
  49. package/resources/image-upscale.d.ts.map +1 -1
  50. package/resources/index.d.mts +2 -2
  51. package/resources/index.d.mts.map +1 -1
  52. package/resources/index.d.ts +2 -2
  53. package/resources/index.d.ts.map +1 -1
  54. package/resources/index.js +1 -1
  55. package/resources/index.js.map +1 -1
  56. package/resources/index.mjs +1 -1
  57. package/resources/index.mjs.map +1 -1
  58. package/resources/organization/index.d.mts +3 -0
  59. package/resources/organization/index.d.mts.map +1 -0
  60. package/resources/organization/index.d.ts +3 -0
  61. package/resources/organization/index.d.ts.map +1 -0
  62. package/resources/organization/index.js +9 -0
  63. package/resources/organization/index.js.map +1 -0
  64. package/resources/organization/index.mjs +4 -0
  65. package/resources/organization/index.mjs.map +1 -0
  66. package/resources/organization/organization.d.mts +154 -0
  67. package/resources/organization/organization.d.mts.map +1 -0
  68. package/resources/organization/organization.d.ts +154 -0
  69. package/resources/organization/organization.d.ts.map +1 -0
  70. package/resources/organization/organization.js +32 -0
  71. package/resources/organization/organization.js.map +1 -0
  72. package/resources/organization/organization.mjs +27 -0
  73. package/resources/organization/organization.mjs.map +1 -0
  74. package/resources/organization/webapp/audit-logs.d.mts +216 -0
  75. package/resources/organization/webapp/audit-logs.d.mts.map +1 -0
  76. package/resources/organization/webapp/audit-logs.d.ts +216 -0
  77. package/resources/organization/webapp/audit-logs.d.ts.map +1 -0
  78. package/resources/organization/webapp/audit-logs.js +30 -0
  79. package/resources/organization/webapp/audit-logs.js.map +1 -0
  80. package/resources/organization/webapp/audit-logs.mjs +26 -0
  81. package/resources/organization/webapp/audit-logs.mjs.map +1 -0
  82. package/resources/organization/webapp/index.d.mts +3 -0
  83. package/resources/organization/webapp/index.d.mts.map +1 -0
  84. package/resources/organization/webapp/index.d.ts +3 -0
  85. package/resources/organization/webapp/index.d.ts.map +1 -0
  86. package/resources/organization/webapp/index.js +9 -0
  87. package/resources/organization/webapp/index.js.map +1 -0
  88. package/resources/organization/webapp/index.mjs +4 -0
  89. package/resources/organization/webapp/index.mjs.map +1 -0
  90. package/resources/organization/webapp/webapp.d.mts +73 -0
  91. package/resources/organization/webapp/webapp.d.mts.map +1 -0
  92. package/resources/organization/webapp/webapp.d.ts +73 -0
  93. package/resources/organization/webapp/webapp.d.ts.map +1 -0
  94. package/resources/organization/webapp/webapp.js +30 -0
  95. package/resources/organization/webapp/webapp.js.map +1 -0
  96. package/resources/organization/webapp/webapp.mjs +25 -0
  97. package/resources/organization/webapp/webapp.mjs.map +1 -0
  98. package/resources/organization/webapp.d.mts +2 -0
  99. package/resources/organization/webapp.d.mts.map +1 -0
  100. package/resources/organization/webapp.d.ts +2 -0
  101. package/resources/organization/webapp.d.ts.map +1 -0
  102. package/resources/organization/webapp.js +6 -0
  103. package/resources/organization/webapp.js.map +1 -0
  104. package/resources/organization/webapp.mjs +3 -0
  105. package/resources/organization/webapp.mjs.map +1 -0
  106. package/resources/organization.d.mts +1 -149
  107. package/resources/organization.d.mts.map +1 -1
  108. package/resources/organization.d.ts +1 -149
  109. package/resources/organization.d.ts.map +1 -1
  110. package/resources/organization.js +2 -20
  111. package/resources/organization.js.map +1 -1
  112. package/resources/organization.mjs +1 -18
  113. package/resources/organization.mjs.map +1 -1
  114. package/resources/recipes.d.mts +119 -0
  115. package/resources/recipes.d.mts.map +1 -1
  116. package/resources/recipes.d.ts +119 -0
  117. package/resources/recipes.d.ts.map +1 -1
  118. package/resources/routers.d.mts +194 -1
  119. package/resources/routers.d.mts.map +1 -1
  120. package/resources/routers.d.ts +194 -1
  121. package/resources/routers.d.ts.map +1 -1
  122. package/resources/routers.js +10 -0
  123. package/resources/routers.js.map +1 -1
  124. package/resources/routers.mjs +10 -0
  125. package/resources/routers.mjs.map +1 -1
  126. package/resources/sound-effect.d.mts +17 -0
  127. package/resources/sound-effect.d.mts.map +1 -1
  128. package/resources/sound-effect.d.ts +17 -0
  129. package/resources/sound-effect.d.ts.map +1 -1
  130. package/resources/speech-to-speech.d.mts +17 -0
  131. package/resources/speech-to-speech.d.mts.map +1 -1
  132. package/resources/speech-to-speech.d.ts +17 -0
  133. package/resources/speech-to-speech.d.ts.map +1 -1
  134. package/resources/tasks.d.mts +90 -0
  135. package/resources/tasks.d.mts.map +1 -1
  136. package/resources/tasks.d.ts +90 -0
  137. package/resources/tasks.d.ts.map +1 -1
  138. package/resources/text-to-image.d.mts +22 -0
  139. package/resources/text-to-image.d.mts.map +1 -1
  140. package/resources/text-to-image.d.ts +22 -0
  141. package/resources/text-to-image.d.ts.map +1 -1
  142. package/resources/text-to-speech.d.mts +77 -1
  143. package/resources/text-to-speech.d.mts.map +1 -1
  144. package/resources/text-to-speech.d.ts +77 -1
  145. package/resources/text-to-speech.d.ts.map +1 -1
  146. package/resources/text-to-video.d.mts +170 -17
  147. package/resources/text-to-video.d.mts.map +1 -1
  148. package/resources/text-to-video.d.ts +170 -17
  149. package/resources/text-to-video.d.ts.map +1 -1
  150. package/resources/video-to-video.d.mts +199 -7
  151. package/resources/video-to-video.d.mts.map +1 -1
  152. package/resources/video-to-video.d.ts +199 -7
  153. package/resources/video-to-video.d.ts.map +1 -1
  154. package/resources/video-upscale.d.mts +17 -0
  155. package/resources/video-upscale.d.mts.map +1 -1
  156. package/resources/video-upscale.d.ts +17 -0
  157. package/resources/video-upscale.d.ts.map +1 -1
  158. package/resources/voice-dubbing.d.mts +17 -0
  159. package/resources/voice-dubbing.d.mts.map +1 -1
  160. package/resources/voice-dubbing.d.ts +17 -0
  161. package/resources/voice-dubbing.d.ts.map +1 -1
  162. package/resources/voice-isolation.d.mts +17 -0
  163. package/resources/voice-isolation.d.mts.map +1 -1
  164. package/resources/voice-isolation.d.ts +17 -0
  165. package/resources/voice-isolation.d.ts.map +1 -1
  166. package/src/client.ts +12 -6
  167. package/src/resources/character-performance.ts +19 -0
  168. package/src/resources/generate/audio.ts +57 -27
  169. package/src/resources/generate/generate.ts +3 -1
  170. package/src/resources/generate/image.ts +24 -0
  171. package/src/resources/generate/index.ts +7 -1
  172. package/src/resources/generate/video.ts +24 -0
  173. package/src/resources/image-to-video.ts +147 -27
  174. package/src/resources/image-upscale.ts +19 -0
  175. package/src/resources/index.ts +4 -1
  176. package/src/resources/organization/index.ts +14 -0
  177. package/src/resources/organization/organization.ts +307 -0
  178. package/src/resources/organization/webapp/audit-logs.ts +440 -0
  179. package/src/resources/organization/webapp/index.ts +16 -0
  180. package/src/resources/organization/webapp/webapp.ts +118 -0
  181. package/src/resources/organization/webapp.ts +3 -0
  182. package/src/resources/organization.ts +1 -283
  183. package/src/resources/recipes.ts +133 -0
  184. package/src/resources/routers.ts +247 -0
  185. package/src/resources/sound-effect.ts +19 -0
  186. package/src/resources/speech-to-speech.ts +19 -0
  187. package/src/resources/tasks.ts +102 -0
  188. package/src/resources/text-to-image.ts +25 -0
  189. package/src/resources/text-to-speech.ts +142 -1
  190. package/src/resources/text-to-video.ts +208 -17
  191. package/src/resources/video-to-video.ts +246 -7
  192. package/src/resources/video-upscale.ts +19 -0
  193. package/src/resources/voice-dubbing.ts +19 -0
  194. package/src/resources/voice-isolation.ts +19 -0
  195. package/src/version.ts +1 -1
  196. package/version.d.mts +1 -1
  197. package/version.d.ts +1 -1
  198. package/version.js +1 -1
  199. package/version.mjs +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webapp.d.mts","sourceRoot":"","sources":["../../../src/resources/organization/webapp/webapp.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,KAAK,YAAY,yBAAqB;AAC7C,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,+BAA+B,EAC/B,sBAAsB,EACtB,wBAAwB,EACxB,SAAS,EACV,yBAAqB;AACtB,OAAO,EAAE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D,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
@@ -0,0 +1,73 @@
1
+ import { APIResource } from "../../../core/resource.js";
2
+ import * as AuditLogsAPI from "./audit-logs.js";
3
+ import { AuditLogListParams, AuditLogListResponse, AuditLogListResponsesCursorPage, AuditLogRetrieveParams, AuditLogRetrieveResponse, AuditLogs } from "./audit-logs.js";
4
+ import { CursorPage, type CursorPageParams, PagePromise } from "../../../core/pagination.js";
5
+ import { RequestOptions } from "../../../internal/request-options.js";
6
+ export declare class Webapp extends APIResource {
7
+ auditLogs: AuditLogsAPI.AuditLogs;
8
+ /**
9
+ * List per-generation credit-usage rows for the linked Runway workspaces you
10
+ * administer, newest first. Unlike `/v1/organization/usage` (this API project's
11
+ * own usage), this reports usage from the workspace linked to this API project.
12
+ * Authorized via that account link.
13
+ */
14
+ listUsage(query: WebappListUsageParams, options?: RequestOptions): PagePromise<WebappListUsageResponsesCursorPage, WebappListUsageResponse>;
15
+ }
16
+ export type WebappListUsageResponsesCursorPage = CursorPage<WebappListUsageResponse>;
17
+ export interface WebappListUsageResponse {
18
+ /**
19
+ * Credits charged for this generation.
20
+ */
21
+ credits: number;
22
+ /**
23
+ * Email of the user who generated.
24
+ */
25
+ email: string;
26
+ /**
27
+ * When the generation was charged.
28
+ */
29
+ timestamp: string;
30
+ /**
31
+ * Model/task display name for the generation.
32
+ */
33
+ tool: string;
34
+ /**
35
+ * Whether the row is a credit charge for a generation or a task refund (negative
36
+ * credits).
37
+ */
38
+ type: 'charge' | 'refund';
39
+ /**
40
+ * ID of the owning workspace.
41
+ */
42
+ workspaceId: number;
43
+ /**
44
+ * Name of the owning workspace.
45
+ */
46
+ workspaceName: string;
47
+ }
48
+ export interface WebappListUsageParams extends CursorPageParams {
49
+ /**
50
+ * Start of the time window (inclusive), ISO-8601 datetime.
51
+ */
52
+ from: string;
53
+ /**
54
+ * End of the time window (exclusive), ISO-8601 datetime. A `cursor` can only
55
+ * narrow this window, never extend it past `to`.
56
+ */
57
+ to: string;
58
+ /**
59
+ * Organization to report on. Optional when this API project is linked to a single
60
+ * organization; required when it is linked to more than one.
61
+ */
62
+ organizationId?: string;
63
+ /**
64
+ * Restrict results to these workspace IDs, as a comma-separated list. Defaults to
65
+ * every workspace you administer in the organization.
66
+ */
67
+ workspaceIds?: string;
68
+ }
69
+ export declare namespace Webapp {
70
+ export { type WebappListUsageResponse as WebappListUsageResponse, type WebappListUsageResponsesCursorPage as WebappListUsageResponsesCursorPage, type WebappListUsageParams as WebappListUsageParams, };
71
+ export { AuditLogs as AuditLogs, type AuditLogRetrieveResponse as AuditLogRetrieveResponse, type AuditLogListResponse as AuditLogListResponse, type AuditLogListResponsesCursorPage as AuditLogListResponsesCursorPage, type AuditLogRetrieveParams as AuditLogRetrieveParams, type AuditLogListParams as AuditLogListParams, };
72
+ }
73
+ //# sourceMappingURL=webapp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webapp.d.ts","sourceRoot":"","sources":["../../../src/resources/organization/webapp/webapp.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,KAAK,YAAY,wBAAqB;AAC7C,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,+BAA+B,EAC/B,sBAAsB,EACtB,wBAAwB,EACxB,SAAS,EACV,wBAAqB;AACtB,OAAO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE,oCAAiC;AAC1F,OAAO,EAAE,cAAc,EAAE,6CAA0C;AAEnE,qBAAa,MAAO,SAAQ,WAAW;IACrC,SAAS,EAAE,YAAY,CAAC,SAAS,CAA4C;IAE7E;;;;;OAKG;IACH,SAAS,CACP,KAAK,EAAE,qBAAqB,EAC5B,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,kCAAkC,EAAE,uBAAuB,CAAC;CAM5E;AAED,MAAM,MAAM,kCAAkC,GAAG,UAAU,CAAC,uBAAuB,CAAC,CAAC;AAErF,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAE1B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB;IAC7D;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAID,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;IAEF,OAAO,EACL,SAAS,IAAI,SAAS,EACtB,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Webapp = void 0;
5
+ const tslib_1 = require("../../../internal/tslib.js");
6
+ const resource_1 = require("../../../core/resource.js");
7
+ const AuditLogsAPI = tslib_1.__importStar(require("./audit-logs.js"));
8
+ const audit_logs_1 = require("./audit-logs.js");
9
+ const pagination_1 = require("../../../core/pagination.js");
10
+ class Webapp extends resource_1.APIResource {
11
+ constructor() {
12
+ super(...arguments);
13
+ this.auditLogs = new AuditLogsAPI.AuditLogs(this._client);
14
+ }
15
+ /**
16
+ * List per-generation credit-usage rows for the linked Runway workspaces you
17
+ * administer, newest first. Unlike `/v1/organization/usage` (this API project's
18
+ * own usage), this reports usage from the workspace linked to this API project.
19
+ * Authorized via that account link.
20
+ */
21
+ listUsage(query, options) {
22
+ return this._client.getAPIList('/v1/organization/webapp/usage', (pagination_1.CursorPage), {
23
+ query,
24
+ ...options,
25
+ });
26
+ }
27
+ }
28
+ exports.Webapp = Webapp;
29
+ Webapp.AuditLogs = audit_logs_1.AuditLogs;
30
+ //# sourceMappingURL=webapp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webapp.js","sourceRoot":"","sources":["../../../src/resources/organization/webapp/webapp.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AACrD,sEAA6C;AAC7C,gDAOsB;AACtB,4DAA0F;AAG1F,MAAa,MAAO,SAAQ,sBAAW;IAAvC;;QACE,cAAS,GAA2B,IAAI,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAiB/E,CAAC;IAfC;;;;;OAKG;IACH,SAAS,CACP,KAA4B,EAC5B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,+BAA+B,EAAE,CAAA,uBAAmC,CAAA,EAAE;YACnG,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AAlBD,wBAkBC;AAmED,MAAM,CAAC,SAAS,GAAG,sBAAS,CAAC"}
@@ -0,0 +1,25 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../../core/resource.mjs";
3
+ import * as AuditLogsAPI from "./audit-logs.mjs";
4
+ import { AuditLogs, } from "./audit-logs.mjs";
5
+ import { CursorPage } from "../../../core/pagination.mjs";
6
+ export class Webapp extends APIResource {
7
+ constructor() {
8
+ super(...arguments);
9
+ this.auditLogs = new AuditLogsAPI.AuditLogs(this._client);
10
+ }
11
+ /**
12
+ * List per-generation credit-usage rows for the linked Runway workspaces you
13
+ * administer, newest first. Unlike `/v1/organization/usage` (this API project's
14
+ * own usage), this reports usage from the workspace linked to this API project.
15
+ * Authorized via that account link.
16
+ */
17
+ listUsage(query, options) {
18
+ return this._client.getAPIList('/v1/organization/webapp/usage', (CursorPage), {
19
+ query,
20
+ ...options,
21
+ });
22
+ }
23
+ }
24
+ Webapp.AuditLogs = AuditLogs;
25
+ //# sourceMappingURL=webapp.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webapp.mjs","sourceRoot":"","sources":["../../../src/resources/organization/webapp/webapp.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;AACrD,OAAO,KAAK,YAAY,yBAAqB;AAC7C,OAAO,EAML,SAAS,GACV,yBAAqB;AACtB,OAAO,EAAE,UAAU,EAAsC,qCAAiC;AAG1F,MAAM,OAAO,MAAO,SAAQ,WAAW;IAAvC;;QACE,cAAS,GAA2B,IAAI,YAAY,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAiB/E,CAAC;IAfC;;;;;OAKG;IACH,SAAS,CACP,KAA4B,EAC5B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,+BAA+B,EAAE,CAAA,UAAmC,CAAA,EAAE;YACnG,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AAmED,MAAM,CAAC,SAAS,GAAG,SAAS,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./webapp/index.mjs";
2
+ //# sourceMappingURL=webapp.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webapp.d.mts","sourceRoot":"","sources":["../../src/resources/organization/webapp.ts"],"names":[],"mappings":"AAEA,mCAA+B"}
@@ -0,0 +1,2 @@
1
+ export * from "./webapp/index.js";
2
+ //# sourceMappingURL=webapp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webapp.d.ts","sourceRoot":"","sources":["../../src/resources/organization/webapp.ts"],"names":[],"mappings":"AAEA,kCAA+B"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const tslib_1 = require("../../internal/tslib.js");
5
+ tslib_1.__exportStar(require("./webapp/index.js"), exports);
6
+ //# sourceMappingURL=webapp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webapp.js","sourceRoot":"","sources":["../../src/resources/organization/webapp.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,4DAA+B"}
@@ -0,0 +1,3 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ export * from "./webapp/index.mjs";
3
+ //# sourceMappingURL=webapp.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webapp.mjs","sourceRoot":"","sources":["../../src/resources/organization/webapp.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,mCAA+B"}
@@ -1,150 +1,2 @@
1
- import { APIResource } from "../core/resource.mjs";
2
- import { APIPromise } from "../core/api-promise.mjs";
3
- import { RequestOptions } from "../internal/request-options.mjs";
4
- export declare class Organization extends APIResource {
5
- /**
6
- * Get usage tier and credit balance information about the organization associated
7
- * with the API key used to make the request.
8
- */
9
- retrieve(options?: RequestOptions): APIPromise<OrganizationRetrieveResponse>;
10
- /**
11
- * Fetch credit usage data broken down by model and day for the organization
12
- * associated with the API key used to make the request. Up to 90 days of data can
13
- * be queried at a time.
14
- */
15
- retrieveUsage(body?: OrganizationRetrieveUsageParams | null | undefined, options?: RequestOptions): APIPromise<OrganizationRetrieveUsageResponse>;
16
- }
17
- export interface OrganizationRetrieveResponse {
18
- /**
19
- * The number of credits remaining in the organization account.
20
- */
21
- creditBalance: number;
22
- /**
23
- * Limits associated with the organization's tier.
24
- */
25
- tier: OrganizationRetrieveResponse.Tier;
26
- /**
27
- * Usage data for the organization.
28
- */
29
- usage: OrganizationRetrieveResponse.Usage;
30
- }
31
- export declare namespace OrganizationRetrieveResponse {
32
- /**
33
- * Limits associated with the organization's tier.
34
- */
35
- interface Tier {
36
- /**
37
- * The maximum number of credits that can be purchased in a month.
38
- */
39
- maxMonthlyCreditSpend: number;
40
- /**
41
- * An object containing model-specific limits. Each key represents a model.
42
- */
43
- models: {
44
- [key: string]: Tier.Models;
45
- };
46
- }
47
- namespace Tier {
48
- /**
49
- * Limits associated with the model.
50
- */
51
- interface Models {
52
- /**
53
- * The maximum number of generations that can be run concurrently for this model.
54
- */
55
- maxConcurrentGenerations: number;
56
- /**
57
- * The maximum number of generations that can be created each day for this model.
58
- */
59
- maxDailyGenerations: number;
60
- }
61
- }
62
- /**
63
- * Usage data for the organization.
64
- */
65
- interface Usage {
66
- models: {
67
- [key: string]: Usage.Models;
68
- };
69
- }
70
- namespace Usage {
71
- /**
72
- * Usage data for the model.
73
- */
74
- interface Models {
75
- /**
76
- * The number of generations that have been run for this model in the past day.
77
- */
78
- dailyGenerations: number;
79
- }
80
- }
81
- }
82
- export interface OrganizationRetrieveUsageResponse {
83
- /**
84
- * The list of models with usage during the queried time range.
85
- */
86
- models: Array<'gen4.5' | 'gen3a_turbo' | 'gen4_turbo' | 'gen4_image' | 'gen4_image_turbo' | 'gpt_image_2' | 'act_two' | 'gen4_aleph' | 'veo3' | 'veo3.1' | 'veo3.1_fast' | 'gemini_2.5_flash' | 'gemini_image3_pro' | 'gemini_image3.1_flash' | 'seedream5_pro' | 'seedream5_lite' | 'gemini_omni_flash' | 'eleven_multilingual_v2' | 'seed_audio' | 'eleven_v3' | 'eleven_text_to_sound_v2' | 'eleven_voice_isolation' | 'eleven_voice_dubbing' | 'eleven_multilingual_sts_v2' | 'eleven_scribe_v2' | 'gwm1_avatars' | 'gwm1_avatar_async_audio_to_video' | 'gwm1_avatar_async_text_to_video' | 'voice_processing' | 'seedance2' | 'seedance2_fast' | 'seedance2_mini' | 'magnific_precision_upscaler_v2' | 'magnific_video_upscaler_creative' | 'kling2.5_turbo_pro' | 'kling3.0_pro' | 'kling3.0_4k' | 'kling3.0_standard' | 'klingO3_pro' | 'klingO3_standard' | 'klingO3_4k' | 'happyhorse_1_0' | 'aleph2' | 'product_swap' | 'product_ad' | 'multi_shot_video' | 'product_ugc' | 'marketing_stock_image' | 'product_campaign_image' | 'ad_localization'>;
87
- results: Array<OrganizationRetrieveUsageResponse.Result>;
88
- /**
89
- * Reserved for future use.
90
- */
91
- apiKeys?: Array<string>;
92
- /**
93
- * Reserved for future use.
94
- */
95
- resultsByApiKey?: Array<OrganizationRetrieveUsageResponse.ResultsByAPIKey>;
96
- }
97
- export declare namespace OrganizationRetrieveUsageResponse {
98
- interface Result {
99
- /**
100
- * The date of the usage data in ISO-8601 format (YYYY-MM-DD). All dates are in
101
- * UTC.
102
- */
103
- date: string;
104
- /**
105
- * The credits used per model for the given date.
106
- */
107
- usedCredits: Array<Result.UsedCredit>;
108
- }
109
- namespace Result {
110
- interface UsedCredit {
111
- /**
112
- * The net number of credits spent on the model. May be negative if refunds
113
- * exceeded charges on this day.
114
- */
115
- amount: number;
116
- /**
117
- * The model that credits were spent on.
118
- */
119
- model: 'gen4.5' | 'gen3a_turbo' | 'gen4_turbo' | 'gen4_image' | 'gen4_image_turbo' | 'gpt_image_2' | 'act_two' | 'gen4_aleph' | 'veo3' | 'veo3.1' | 'veo3.1_fast' | 'gemini_2.5_flash' | 'gemini_image3_pro' | 'gemini_image3.1_flash' | 'seedream5_pro' | 'seedream5_lite' | 'gemini_omni_flash' | 'eleven_multilingual_v2' | 'seed_audio' | 'eleven_v3' | 'eleven_text_to_sound_v2' | 'eleven_voice_isolation' | 'eleven_voice_dubbing' | 'eleven_multilingual_sts_v2' | 'eleven_scribe_v2' | 'gwm1_avatars' | 'gwm1_avatar_async_audio_to_video' | 'gwm1_avatar_async_text_to_video' | 'voice_processing' | 'seedance2' | 'seedance2_fast' | 'seedance2_mini' | 'magnific_precision_upscaler_v2' | 'magnific_video_upscaler_creative' | 'kling2.5_turbo_pro' | 'kling3.0_pro' | 'kling3.0_4k' | 'kling3.0_standard' | 'klingO3_pro' | 'klingO3_standard' | 'klingO3_4k' | 'happyhorse_1_0' | 'aleph2' | 'product_swap' | 'product_ad' | 'multi_shot_video' | 'product_ugc' | 'marketing_stock_image' | 'product_campaign_image' | 'ad_localization';
120
- }
121
- }
122
- interface ResultsByAPIKey {
123
- date: string;
124
- usedCredits: Array<ResultsByAPIKey.UsedCredit>;
125
- }
126
- namespace ResultsByAPIKey {
127
- interface UsedCredit {
128
- amount: number;
129
- apiKeyId: string;
130
- }
131
- }
132
- }
133
- export interface OrganizationRetrieveUsageParams {
134
- /**
135
- * The end date of the usage data in ISO-8601 format (YYYY-MM-DD), not inclusive.
136
- * If unspecified, it will default to thirty days after the start date. Must be
137
- * less than or equal to 90 days after the start date. All dates are in UTC.
138
- */
139
- beforeDate?: string;
140
- /**
141
- * The start date of the usage data in ISO-8601 format (YYYY-MM-DD). If
142
- * unspecified, it will default to 30 days before the current date. All dates are
143
- * in UTC.
144
- */
145
- startDate?: string;
146
- }
147
- export declare namespace Organization {
148
- export { type OrganizationRetrieveResponse as OrganizationRetrieveResponse, type OrganizationRetrieveUsageResponse as OrganizationRetrieveUsageResponse, type OrganizationRetrieveUsageParams as OrganizationRetrieveUsageParams, };
149
- }
1
+ export * from "./organization/index.mjs";
150
2
  //# sourceMappingURL=organization.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"organization.d.mts","sourceRoot":"","sources":["../src/resources/organization.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAA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GACb,SAAS,GACT,YAAY,GACZ,MAAM,GACN,QAAQ,GACR,aAAa,GACb,kBAAkB,GAClB,mBAAmB,GACnB,uBAAuB,GACvB,eAAe,GACf,gBAAgB,GAChB,mBAAmB,GACnB,wBAAwB,GACxB,YAAY,GACZ,WAAW,GACX,yBAAyB,GACzB,wBAAwB,GACxB,sBAAsB,GACtB,4BAA4B,GAC5B,kBAAkB,GAClB,cAAc,GACd,kCAAkC,GAClC,iCAAiC,GACjC,kBAAkB,GAClB,WAAW,GACX,gBAAgB,GAChB,gBAAgB,GAChB,gCAAgC,GAChC,kCAAkC,GAClC,oBAAoB,GACpB,cAAc,GACd,aAAa,GACb,mBAAmB,GACnB,aAAa,GACb,kBAAkB,GAClB,YAAY,GACZ,gBAAgB,GAChB,QAAQ,GACR,cAAc,GACd,YAAY,GACZ,kBAAkB,GAClB,aAAa,GACb,uBAAuB,GACvB,wBAAwB,GACxB,iBAAiB,CAAC;SACvB;KACF;IAED,UAAiB,eAAe;QAC9B,IAAI,EAAE,MAAM,CAAC;QAEb,WAAW,EAAE,KAAK,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;KAChD;IAED,UAAiB,eAAe,CAAC;QAC/B,UAAiB,UAAU;YACzB,MAAM,EAAE,MAAM,CAAC;YAEf,QAAQ,EAAE,MAAM,CAAC;SAClB;KACF;CACF;AAED,MAAM,WAAW,+BAA+B;IAC9C;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;CACH"}
1
+ {"version":3,"file":"organization.d.mts","sourceRoot":"","sources":["../src/resources/organization.ts"],"names":[],"mappings":"AAEA,yCAAqC"}
@@ -1,150 +1,2 @@
1
- import { APIResource } from "../core/resource.js";
2
- import { APIPromise } from "../core/api-promise.js";
3
- import { RequestOptions } from "../internal/request-options.js";
4
- export declare class Organization extends APIResource {
5
- /**
6
- * Get usage tier and credit balance information about the organization associated
7
- * with the API key used to make the request.
8
- */
9
- retrieve(options?: RequestOptions): APIPromise<OrganizationRetrieveResponse>;
10
- /**
11
- * Fetch credit usage data broken down by model and day for the organization
12
- * associated with the API key used to make the request. Up to 90 days of data can
13
- * be queried at a time.
14
- */
15
- retrieveUsage(body?: OrganizationRetrieveUsageParams | null | undefined, options?: RequestOptions): APIPromise<OrganizationRetrieveUsageResponse>;
16
- }
17
- export interface OrganizationRetrieveResponse {
18
- /**
19
- * The number of credits remaining in the organization account.
20
- */
21
- creditBalance: number;
22
- /**
23
- * Limits associated with the organization's tier.
24
- */
25
- tier: OrganizationRetrieveResponse.Tier;
26
- /**
27
- * Usage data for the organization.
28
- */
29
- usage: OrganizationRetrieveResponse.Usage;
30
- }
31
- export declare namespace OrganizationRetrieveResponse {
32
- /**
33
- * Limits associated with the organization's tier.
34
- */
35
- interface Tier {
36
- /**
37
- * The maximum number of credits that can be purchased in a month.
38
- */
39
- maxMonthlyCreditSpend: number;
40
- /**
41
- * An object containing model-specific limits. Each key represents a model.
42
- */
43
- models: {
44
- [key: string]: Tier.Models;
45
- };
46
- }
47
- namespace Tier {
48
- /**
49
- * Limits associated with the model.
50
- */
51
- interface Models {
52
- /**
53
- * The maximum number of generations that can be run concurrently for this model.
54
- */
55
- maxConcurrentGenerations: number;
56
- /**
57
- * The maximum number of generations that can be created each day for this model.
58
- */
59
- maxDailyGenerations: number;
60
- }
61
- }
62
- /**
63
- * Usage data for the organization.
64
- */
65
- interface Usage {
66
- models: {
67
- [key: string]: Usage.Models;
68
- };
69
- }
70
- namespace Usage {
71
- /**
72
- * Usage data for the model.
73
- */
74
- interface Models {
75
- /**
76
- * The number of generations that have been run for this model in the past day.
77
- */
78
- dailyGenerations: number;
79
- }
80
- }
81
- }
82
- export interface OrganizationRetrieveUsageResponse {
83
- /**
84
- * The list of models with usage during the queried time range.
85
- */
86
- models: Array<'gen4.5' | 'gen3a_turbo' | 'gen4_turbo' | 'gen4_image' | 'gen4_image_turbo' | 'gpt_image_2' | 'act_two' | 'gen4_aleph' | 'veo3' | 'veo3.1' | 'veo3.1_fast' | 'gemini_2.5_flash' | 'gemini_image3_pro' | 'gemini_image3.1_flash' | 'seedream5_pro' | 'seedream5_lite' | 'gemini_omni_flash' | 'eleven_multilingual_v2' | 'seed_audio' | 'eleven_v3' | 'eleven_text_to_sound_v2' | 'eleven_voice_isolation' | 'eleven_voice_dubbing' | 'eleven_multilingual_sts_v2' | 'eleven_scribe_v2' | 'gwm1_avatars' | 'gwm1_avatar_async_audio_to_video' | 'gwm1_avatar_async_text_to_video' | 'voice_processing' | 'seedance2' | 'seedance2_fast' | 'seedance2_mini' | 'magnific_precision_upscaler_v2' | 'magnific_video_upscaler_creative' | 'kling2.5_turbo_pro' | 'kling3.0_pro' | 'kling3.0_4k' | 'kling3.0_standard' | 'klingO3_pro' | 'klingO3_standard' | 'klingO3_4k' | 'happyhorse_1_0' | 'aleph2' | 'product_swap' | 'product_ad' | 'multi_shot_video' | 'product_ugc' | 'marketing_stock_image' | 'product_campaign_image' | 'ad_localization'>;
87
- results: Array<OrganizationRetrieveUsageResponse.Result>;
88
- /**
89
- * Reserved for future use.
90
- */
91
- apiKeys?: Array<string>;
92
- /**
93
- * Reserved for future use.
94
- */
95
- resultsByApiKey?: Array<OrganizationRetrieveUsageResponse.ResultsByAPIKey>;
96
- }
97
- export declare namespace OrganizationRetrieveUsageResponse {
98
- interface Result {
99
- /**
100
- * The date of the usage data in ISO-8601 format (YYYY-MM-DD). All dates are in
101
- * UTC.
102
- */
103
- date: string;
104
- /**
105
- * The credits used per model for the given date.
106
- */
107
- usedCredits: Array<Result.UsedCredit>;
108
- }
109
- namespace Result {
110
- interface UsedCredit {
111
- /**
112
- * The net number of credits spent on the model. May be negative if refunds
113
- * exceeded charges on this day.
114
- */
115
- amount: number;
116
- /**
117
- * The model that credits were spent on.
118
- */
119
- model: 'gen4.5' | 'gen3a_turbo' | 'gen4_turbo' | 'gen4_image' | 'gen4_image_turbo' | 'gpt_image_2' | 'act_two' | 'gen4_aleph' | 'veo3' | 'veo3.1' | 'veo3.1_fast' | 'gemini_2.5_flash' | 'gemini_image3_pro' | 'gemini_image3.1_flash' | 'seedream5_pro' | 'seedream5_lite' | 'gemini_omni_flash' | 'eleven_multilingual_v2' | 'seed_audio' | 'eleven_v3' | 'eleven_text_to_sound_v2' | 'eleven_voice_isolation' | 'eleven_voice_dubbing' | 'eleven_multilingual_sts_v2' | 'eleven_scribe_v2' | 'gwm1_avatars' | 'gwm1_avatar_async_audio_to_video' | 'gwm1_avatar_async_text_to_video' | 'voice_processing' | 'seedance2' | 'seedance2_fast' | 'seedance2_mini' | 'magnific_precision_upscaler_v2' | 'magnific_video_upscaler_creative' | 'kling2.5_turbo_pro' | 'kling3.0_pro' | 'kling3.0_4k' | 'kling3.0_standard' | 'klingO3_pro' | 'klingO3_standard' | 'klingO3_4k' | 'happyhorse_1_0' | 'aleph2' | 'product_swap' | 'product_ad' | 'multi_shot_video' | 'product_ugc' | 'marketing_stock_image' | 'product_campaign_image' | 'ad_localization';
120
- }
121
- }
122
- interface ResultsByAPIKey {
123
- date: string;
124
- usedCredits: Array<ResultsByAPIKey.UsedCredit>;
125
- }
126
- namespace ResultsByAPIKey {
127
- interface UsedCredit {
128
- amount: number;
129
- apiKeyId: string;
130
- }
131
- }
132
- }
133
- export interface OrganizationRetrieveUsageParams {
134
- /**
135
- * The end date of the usage data in ISO-8601 format (YYYY-MM-DD), not inclusive.
136
- * If unspecified, it will default to thirty days after the start date. Must be
137
- * less than or equal to 90 days after the start date. All dates are in UTC.
138
- */
139
- beforeDate?: string;
140
- /**
141
- * The start date of the usage data in ISO-8601 format (YYYY-MM-DD). If
142
- * unspecified, it will default to 30 days before the current date. All dates are
143
- * in UTC.
144
- */
145
- startDate?: string;
146
- }
147
- export declare namespace Organization {
148
- export { type OrganizationRetrieveResponse as OrganizationRetrieveResponse, type OrganizationRetrieveUsageResponse as OrganizationRetrieveUsageResponse, type OrganizationRetrieveUsageParams as OrganizationRetrieveUsageParams, };
149
- }
1
+ export * from "./organization/index.js";
150
2
  //# sourceMappingURL=organization.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"organization.d.ts","sourceRoot":"","sources":["../src/resources/organization.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAE7D,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,4BAA4B,CAAC;IAI5E;;;;OAIG;IACH,aAAa,CACX,IAAI,GAAE,+BAA+B,GAAG,IAAI,GAAG,SAAc,EAC7D,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,iCAAiC,CAAC;CAGjD;AAED,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,IAAI,EAAE,4BAA4B,CAAC,IAAI,CAAC;IAExC;;OAEG;IACH,KAAK,EAAE,4BAA4B,CAAC,KAAK,CAAC;CAC3C;AAED,yBAAiB,4BAA4B,CAAC;IAC5C;;OAEG;IACH,UAAiB,IAAI;QACnB;;WAEG;QACH,qBAAqB,EAAE,MAAM,CAAC;QAE9B;;WAEG;QACH,MAAM,EAAE;YAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA;SAAE,CAAC;KACxC;IAED,UAAiB,IAAI,CAAC;QACpB;;WAEG;QACH,UAAiB,MAAM;YACrB;;eAEG;YACH,wBAAwB,EAAE,MAAM,CAAC;YAEjC;;eAEG;YACH,mB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AE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;CACH"}
1
+ {"version":3,"file":"organization.d.ts","sourceRoot":"","sources":["../src/resources/organization.ts"],"names":[],"mappings":"AAEA,wCAAqC"}
@@ -1,24 +1,6 @@
1
1
  "use strict";
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Organization = void 0;
5
- const resource_1 = require("../core/resource.js");
6
- class Organization extends resource_1.APIResource {
7
- /**
8
- * Get usage tier and credit balance information about the organization associated
9
- * with the API key used to make the request.
10
- */
11
- retrieve(options) {
12
- return this._client.get('/v1/organization', options);
13
- }
14
- /**
15
- * Fetch credit usage data broken down by model and day for the organization
16
- * associated with the API key used to make the request. Up to 90 days of data can
17
- * be queried at a time.
18
- */
19
- retrieveUsage(body = {}, options) {
20
- return this._client.post('/v1/organization/usage', { body, ...options });
21
- }
22
- }
23
- exports.Organization = Organization;
4
+ const tslib_1 = require("../internal/tslib.js");
5
+ tslib_1.__exportStar(require("./organization/index.js"), exports);
24
6
  //# sourceMappingURL=organization.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"organization.js","sourceRoot":"","sources":["../src/resources/organization.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;;OAGG;IACH,QAAQ,CAAC,OAAwB;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;IAED;;;;OAIG;IACH,aAAa,CACX,OAA2D,EAAE,EAC7D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wBAAwB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3E,CAAC;CACF;AApBD,oCAoBC"}
1
+ {"version":3,"file":"organization.js","sourceRoot":"","sources":["../src/resources/organization.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kEAAqC"}
@@ -1,20 +1,3 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { APIResource } from "../core/resource.mjs";
3
- export class Organization extends APIResource {
4
- /**
5
- * Get usage tier and credit balance information about the organization associated
6
- * with the API key used to make the request.
7
- */
8
- retrieve(options) {
9
- return this._client.get('/v1/organization', options);
10
- }
11
- /**
12
- * Fetch credit usage data broken down by model and day for the organization
13
- * associated with the API key used to make the request. Up to 90 days of data can
14
- * be queried at a time.
15
- */
16
- retrieveUsage(body = {}, options) {
17
- return this._client.post('/v1/organization/usage', { body, ...options });
18
- }
19
- }
2
+ export * from "./organization/index.mjs";
20
3
  //# sourceMappingURL=organization.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"organization.mjs","sourceRoot":"","sources":["../src/resources/organization.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAI/C,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;;OAGG;IACH,QAAQ,CAAC,OAAwB;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;IAED;;;;OAIG;IACH,aAAa,CACX,OAA2D,EAAE,EAC7D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wBAAwB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3E,CAAC;CACF"}
1
+ {"version":3,"file":"organization.mjs","sourceRoot":"","sources":["../src/resources/organization.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,yCAAqC"}