spitch 1.49.0 → 1.50.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 (192) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +11 -39
  3. package/api-promise.d.mts +1 -0
  4. package/api-promise.d.mts.map +1 -1
  5. package/api-promise.d.ts +2 -1
  6. package/api-promise.d.ts.map +1 -1
  7. package/api-promise.js +15 -2
  8. package/api-promise.js.map +1 -1
  9. package/api-promise.mjs +1 -0
  10. package/api-promise.mjs.map +1 -1
  11. package/client.d.mts +3 -1
  12. package/client.d.mts.map +1 -1
  13. package/client.d.ts +20 -18
  14. package/client.d.ts.map +1 -1
  15. package/client.js +80 -26
  16. package/client.js.map +1 -1
  17. package/client.mjs +23 -2
  18. package/client.mjs.map +1 -1
  19. package/core/api-promise.d.mts.map +1 -1
  20. package/core/api-promise.d.ts +3 -3
  21. package/core/api-promise.d.ts.map +1 -1
  22. package/core/api-promise.js +15 -5
  23. package/core/api-promise.js.map +1 -1
  24. package/core/api-promise.mjs +11 -1
  25. package/core/api-promise.mjs.map +1 -1
  26. package/core/error.js +1 -1
  27. package/core/error.js.map +1 -1
  28. package/core/error.mjs.map +1 -1
  29. package/core/pagination.d.mts.map +1 -1
  30. package/core/pagination.d.ts +4 -4
  31. package/core/pagination.d.ts.map +1 -1
  32. package/core/pagination.js +17 -7
  33. package/core/pagination.js.map +1 -1
  34. package/core/pagination.mjs +11 -1
  35. package/core/pagination.mjs.map +1 -1
  36. package/core/resource.d.mts.map +1 -1
  37. package/core/resource.d.ts +1 -1
  38. package/core/resource.d.ts.map +1 -1
  39. package/core/uploads.d.mts.map +1 -1
  40. package/core/uploads.d.ts +2 -2
  41. package/core/uploads.d.ts.map +1 -1
  42. package/core/uploads.js +1 -1
  43. package/core/uploads.js.map +1 -1
  44. package/core/uploads.mjs.map +1 -1
  45. package/error.d.mts +1 -0
  46. package/error.d.mts.map +1 -1
  47. package/error.d.ts +2 -1
  48. package/error.d.ts.map +1 -1
  49. package/error.js +15 -2
  50. package/error.js.map +1 -1
  51. package/error.mjs +1 -0
  52. package/error.mjs.map +1 -1
  53. package/index.d.mts.map +1 -1
  54. package/index.d.ts +6 -6
  55. package/index.d.ts.map +1 -1
  56. package/index.js +6 -6
  57. package/index.js.map +1 -1
  58. package/index.mjs.map +1 -1
  59. package/internal/detect-platform.js +1 -1
  60. package/internal/detect-platform.js.map +1 -1
  61. package/internal/detect-platform.mjs.map +1 -1
  62. package/internal/headers.js +1 -1
  63. package/internal/headers.js.map +1 -1
  64. package/internal/headers.mjs.map +1 -1
  65. package/internal/parse.d.mts.map +1 -1
  66. package/internal/parse.d.ts +2 -2
  67. package/internal/parse.d.ts.map +1 -1
  68. package/internal/parse.js +1 -1
  69. package/internal/parse.js.map +1 -1
  70. package/internal/parse.mjs.map +1 -1
  71. package/internal/request-options.d.mts.map +1 -1
  72. package/internal/request-options.d.ts +4 -4
  73. package/internal/request-options.d.ts.map +1 -1
  74. package/internal/shims.d.mts +6 -0
  75. package/internal/shims.d.mts.map +1 -1
  76. package/internal/shims.d.ts +8 -2
  77. package/internal/shims.d.ts.map +1 -1
  78. package/internal/to-file.d.mts.map +1 -1
  79. package/internal/to-file.d.ts +1 -1
  80. package/internal/to-file.d.ts.map +1 -1
  81. package/internal/to-file.js +2 -2
  82. package/internal/to-file.js.map +1 -1
  83. package/internal/to-file.mjs.map +1 -1
  84. package/internal/uploads.d.mts.map +1 -1
  85. package/internal/uploads.d.ts +3 -3
  86. package/internal/uploads.d.ts.map +1 -1
  87. package/internal/uploads.js +1 -1
  88. package/internal/uploads.js.map +1 -1
  89. package/internal/uploads.mjs.map +1 -1
  90. package/internal/utils/base64.js +2 -2
  91. package/internal/utils/base64.js.map +1 -1
  92. package/internal/utils/base64.mjs.map +1 -1
  93. package/internal/utils/log.d.mts.map +1 -1
  94. package/internal/utils/log.d.ts +2 -2
  95. package/internal/utils/log.d.ts.map +1 -1
  96. package/internal/utils/log.js +3 -1
  97. package/internal/utils/log.js.map +1 -1
  98. package/internal/utils/log.mjs +2 -0
  99. package/internal/utils/log.mjs.map +1 -1
  100. package/internal/utils/path.js +1 -1
  101. package/internal/utils/path.js.map +1 -1
  102. package/internal/utils/path.mjs.map +1 -1
  103. package/internal/utils/query.js +1 -1
  104. package/internal/utils/query.js.map +1 -1
  105. package/internal/utils/query.mjs.map +1 -1
  106. package/internal/utils/values.js +1 -1
  107. package/internal/utils/values.js.map +1 -1
  108. package/internal/utils/values.mjs.map +1 -1
  109. package/internal/utils.d.mts.map +1 -1
  110. package/internal/utils.d.ts +7 -7
  111. package/internal/utils.d.ts.map +1 -1
  112. package/internal/utils.js +21 -8
  113. package/internal/utils.js.map +1 -1
  114. package/internal/utils.mjs.map +1 -1
  115. package/package.json +1 -1
  116. package/pagination.d.mts +1 -0
  117. package/pagination.d.mts.map +1 -1
  118. package/pagination.d.ts +2 -1
  119. package/pagination.d.ts.map +1 -1
  120. package/pagination.js +15 -2
  121. package/pagination.js.map +1 -1
  122. package/pagination.mjs +1 -0
  123. package/pagination.mjs.map +1 -1
  124. package/resource.d.mts +1 -0
  125. package/resource.d.mts.map +1 -1
  126. package/resource.d.ts +2 -1
  127. package/resource.d.ts.map +1 -1
  128. package/resource.js +15 -2
  129. package/resource.js.map +1 -1
  130. package/resource.mjs +1 -0
  131. package/resource.mjs.map +1 -1
  132. package/resources/balance.d.mts +13 -0
  133. package/resources/balance.d.mts.map +1 -0
  134. package/resources/balance.d.ts +13 -0
  135. package/resources/balance.d.ts.map +1 -0
  136. package/resources/balance.js +12 -0
  137. package/resources/balance.js.map +1 -0
  138. package/resources/balance.mjs +8 -0
  139. package/resources/balance.mjs.map +1 -0
  140. package/resources/files.d.mts.map +1 -1
  141. package/resources/files.d.ts +5 -5
  142. package/resources/files.d.ts.map +1 -1
  143. package/resources/files.js +4 -4
  144. package/resources/files.js.map +1 -1
  145. package/resources/files.mjs.map +1 -1
  146. package/resources/index.d.mts +1 -0
  147. package/resources/index.d.mts.map +1 -1
  148. package/resources/index.d.ts +4 -3
  149. package/resources/index.d.ts.map +1 -1
  150. package/resources/index.js +6 -4
  151. package/resources/index.js.map +1 -1
  152. package/resources/index.mjs +1 -0
  153. package/resources/index.mjs.map +1 -1
  154. package/resources/speech.d.mts.map +1 -1
  155. package/resources/speech.d.ts +4 -4
  156. package/resources/speech.d.ts.map +1 -1
  157. package/resources/speech.js +3 -3
  158. package/resources/speech.js.map +1 -1
  159. package/resources/speech.mjs.map +1 -1
  160. package/resources/text.d.mts.map +1 -1
  161. package/resources/text.d.ts +3 -3
  162. package/resources/text.d.ts.map +1 -1
  163. package/resources/text.js +1 -1
  164. package/resources/text.js.map +1 -1
  165. package/resources/text.mjs.map +1 -1
  166. package/resources.d.mts.map +1 -1
  167. package/resources.d.ts +1 -1
  168. package/resources.d.ts.map +1 -1
  169. package/resources.js +15 -2
  170. package/resources.js.map +1 -1
  171. package/resources.mjs.map +1 -1
  172. package/src/client.ts +14 -1
  173. package/src/internal/utils/log.ts +2 -0
  174. package/src/resources/balance.ts +16 -0
  175. package/src/resources/index.ts +1 -0
  176. package/src/version.ts +1 -1
  177. package/uploads.d.mts +1 -0
  178. package/uploads.d.mts.map +1 -1
  179. package/uploads.d.ts +2 -1
  180. package/uploads.d.ts.map +1 -1
  181. package/uploads.js +15 -2
  182. package/uploads.js.map +1 -1
  183. package/uploads.mjs +1 -0
  184. package/uploads.mjs.map +1 -1
  185. package/version.d.mts +1 -1
  186. package/version.d.ts +1 -1
  187. package/version.js +1 -1
  188. package/version.js.map +1 -1
  189. package/version.mjs +1 -1
  190. package/version.mjs.map +1 -1
  191. package/internal/tslib.js +0 -81
  192. package/internal/tslib.mjs +0 -17
@@ -1 +1 @@
1
- {"version":3,"file":"speech.mjs","sourceRoot":"","sources":["../src/resources/speech.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,YAAY,EAAE;OAEhB,EAAE,2BAA2B,EAAE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C5B,OAAO,EACL,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
@@ -1,6 +1,6 @@
1
- import { APIResource } from "../core/resource.js";
2
- import { APIPromise } from "../core/api-promise.js";
3
- import { RequestOptions } from "../internal/request-options.js";
1
+ import { APIResource } from '../core/resource';
2
+ import { APIPromise } from '../core/api-promise';
3
+ import { RequestOptions } from '../internal/request-options';
4
4
  export declare class Text extends APIResource {
5
5
  /**
6
6
  * Add appropriate tone marks to text.
@@ -1 +1 @@
1
- {"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../src/resources/text.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,IAAK,SAAQ,WAAW;IACnC;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,UAAU,CAAC;IAIpF;;;OAGG;IACH,SAAS,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC;CAGxF;AAED,MAAM,WAAW,UAAU;IACzB,UAAU,EAAE,MAAM,CAAC;IAEnB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,MAAM,CAAC;IAEnB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,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AAM,CAAC;IAEf;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,SAAS,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAEhC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,cAAc,GAAG,WAAW,CAAC;CAC1D;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
package/resources/text.js CHANGED
@@ -2,7 +2,7 @@
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.Text = void 0;
5
- const resource_1 = require("../core/resource.js");
5
+ const resource_1 = require("../core/resource");
6
6
  class Text extends resource_1.APIResource {
7
7
  /**
8
8
  * Add appropriate tone marks to text.
@@ -1 +1 @@
1
- {"version":3,"file":"text.js","sourceRoot":"","sources":["../src/resources/text.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,IAAK,SAAQ,sBAAW;IACnC;;OAEG;IACH,QAAQ,CAAC,IAAwB,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;IAED;;;OAGG;IACH,SAAS,CAAC,IAAyB,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClE,CAAC;CACF;AAfD,oBAeC"}
1
+ {"version":3,"file":"text.js","sourceRoot":"","sources":["../src/resources/text.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,+CAA+C;AAI/C,MAAa,IAAK,SAAQ,sBAAW;IACnC;;OAEG;IACH,QAAQ,CAAC,IAAwB,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;IAED;;;OAGG;IACH,SAAS,CAAC,IAAyB,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClE,CAAC;CACF;AAfD,oBAeC"}
@@ -1 +1 @@
1
- {"version":3,"file":"text.mjs","sourceRoot":"","sources":["../src/resources/text.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,IAAK,SAAQ,WAAW;IACnC;;OAEG;IACH,QAAQ,CAAC,IAAwB,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;IAED;;;OAGG;IACH,SAAS,CAAC,IAAyB,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClE,CAAC;CACF"}
1
+ {"version":3,"file":"text.mjs","sourceRoot":"","sources":["../src/resources/text.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAI/C,MAAM,OAAO,IAAK,SAAQ,WAAW;IACnC;;OAEG;IACH,QAAQ,CAAC,IAAwB,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;IAED;;;OAGG;IACH,SAAS,CAAC,IAAyB,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClE,CAAC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"resources.d.mts","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"resources.d.mts","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":"AAAA,sCAAkC"}
package/resources.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export * from "./resources/index.js";
1
+ export * from './resources/index';
2
2
  //# sourceMappingURL=resources.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
package/resources.js CHANGED
@@ -1,5 +1,18 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("./internal/tslib.js");
4
- tslib_1.__exportStar(require("./resources/index.js"), exports);
17
+ __exportStar(require("./resources/index"), exports);
5
18
  //# sourceMappingURL=resources.js.map
package/resources.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"resources.js","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":";;;AAAA,+DAAkC"}
1
+ {"version":3,"file":"resources.js","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC"}
package/resources.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"resources.mjs","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"resources.mjs","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":"AAAA,sCAAkC"}
package/src/client.ts CHANGED
@@ -15,6 +15,7 @@ import { stringifyQuery } from './internal/utils/query';
15
15
  import { VERSION } from './version';
16
16
  import * as Errors from './core/error';
17
17
  import * as Pagination from './core/pagination';
18
+ import { Balance, type BalanceResponse } from './resources/balance';
18
19
  import { AbstractPage, type FilesCursorParams, FilesCursorResponse } from './core/pagination';
19
20
  import * as Uploads from './core/uploads';
20
21
  import * as API from './resources/index';
@@ -719,11 +720,19 @@ export class Spitch {
719
720
  return () => controller.abort();
720
721
  }
721
722
 
722
- private buildBody({ options: { body, headers: rawHeaders } }: { options: FinalRequestOptions }): {
723
+ private buildBody({ options }: { options: FinalRequestOptions }): {
723
724
  bodyHeaders: HeadersLike;
724
725
  body: BodyInit | undefined;
725
726
  } {
727
+ const { body, headers: rawHeaders } = options;
726
728
  if (!body) {
729
+ // A resource method always passes a `body` key when its operation defines a
730
+ // request body, even if the caller omitted an optional body param. Keep the
731
+ // content-type for those, and only elide it for operations with no body at
732
+ // all (e.g. GET/DELETE).
733
+ if (body == null && 'body' in options) {
734
+ return this.#encoder({ body, headers: buildHeaders([rawHeaders]) });
735
+ }
727
736
  return { bodyHeaders: undefined, body: undefined };
728
737
  }
729
738
  const headers = buildHeaders([rawHeaders]);
@@ -788,11 +797,13 @@ export class Spitch {
788
797
  */
789
798
  speech: API.Speech = new API.Speech(this);
790
799
  text: API.Text = new API.Text(this);
800
+ balance: API.Balance = new API.Balance(this);
791
801
  files: API.Files = new API.Files(this);
792
802
  }
793
803
 
794
804
  Spitch.Speech = Speech;
795
805
  Spitch.Text = Text;
806
+ Spitch.Balance = Balance;
796
807
  Spitch.Files = Files;
797
808
 
798
809
  export declare namespace Spitch {
@@ -818,6 +829,8 @@ export declare namespace Spitch {
818
829
  };
819
830
 
820
831
  export {
832
+ Balance as Balance,
833
+ type BalanceResponse as BalanceResponse,
821
834
  Files as Files,
822
835
  type FileMeta as FileMeta,
823
836
  type FileUsage as FileUsage,
@@ -107,6 +107,8 @@ export const formatRequestDetails = (details: {
107
107
  name,
108
108
  (
109
109
  name.toLowerCase() === 'authorization' ||
110
+ name.toLowerCase() === 'api-key' ||
111
+ name.toLowerCase() === 'x-api-key' ||
110
112
  name.toLowerCase() === 'cookie' ||
111
113
  name.toLowerCase() === 'set-cookie'
112
114
  ) ?
@@ -0,0 +1,16 @@
1
+ import { APIResource } from '../core/resource';
2
+ import { APIPromise } from '../core/api-promise';
3
+ import { RequestOptions } from '../internal/request-options';
4
+
5
+ export class Balance extends APIResource {
6
+ /** Read the prepaid balance for the account that owns the API key. */
7
+ get(options?: RequestOptions): APIPromise<BalanceResponse> {
8
+ return this._client.get('/v1/balance', options);
9
+ }
10
+ }
11
+
12
+ export interface BalanceResponse {
13
+ /** Available prepaid credit as an exact decimal string. */
14
+ amount: string;
15
+ currency: 'USD';
16
+ }
@@ -1,5 +1,6 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
+ export { Balance, type BalanceResponse } from './balance';
3
4
  export {
4
5
  Files,
5
6
  type FileMeta,
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '1.49.0'; // x-release-please-version
1
+ export const VERSION = '1.50.0';
package/uploads.d.mts CHANGED
@@ -1,2 +1,3 @@
1
+ /** @deprecated Import from ./core/uploads instead */
1
2
  export * from "./core/uploads.mjs";
2
3
  //# sourceMappingURL=uploads.d.mts.map
package/uploads.d.mts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"uploads.d.mts","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"uploads.d.mts","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,mCAA+B"}
package/uploads.d.ts CHANGED
@@ -1,2 +1,3 @@
1
- export * from "./core/uploads.js";
1
+ /** @deprecated Import from ./core/uploads instead */
2
+ export * from './core/uploads';
2
3
  //# sourceMappingURL=uploads.d.ts.map
package/uploads.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"uploads.d.ts","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"uploads.d.ts","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,cAAc,gBAAgB,CAAC"}
package/uploads.js CHANGED
@@ -1,6 +1,19 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("./internal/tslib.js");
4
17
  /** @deprecated Import from ./core/uploads instead */
5
- tslib_1.__exportStar(require("./core/uploads.js"), exports);
18
+ __exportStar(require("./core/uploads"), exports);
6
19
  //# sourceMappingURL=uploads.js.map
package/uploads.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"uploads.js","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":";;;AAAA,qDAAqD;AACrD,4DAA+B"}
1
+ {"version":3,"file":"uploads.js","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAqD;AACrD,iDAA+B"}
package/uploads.mjs CHANGED
@@ -1,2 +1,3 @@
1
+ /** @deprecated Import from ./core/uploads instead */
1
2
  export * from "./core/uploads.mjs";
2
3
  //# sourceMappingURL=uploads.mjs.map
package/uploads.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"uploads.mjs","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"uploads.mjs","sourceRoot":"","sources":["src/uploads.ts"],"names":[],"mappings":"AAAA,qDAAqD;AACrD,mCAA+B"}
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.49.0";
1
+ export declare const VERSION = "1.50.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.49.0";
1
+ export declare const VERSION = "1.50.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '1.49.0'; // x-release-please-version
4
+ exports.VERSION = '1.50.0';
5
5
  //# sourceMappingURL=version.js.map
package/version.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,QAAQ,CAAC,CAAC,2BAA2B"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,QAAQ,CAAC"}
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '1.49.0'; // x-release-please-version
1
+ export const VERSION = '1.50.0';
2
2
  //# sourceMappingURL=version.mjs.map
package/version.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,2BAA2B"}
1
+ {"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC"}
package/internal/tslib.js DELETED
@@ -1,81 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.__setModuleDefault = exports.__createBinding = void 0;
4
- exports.__classPrivateFieldSet = __classPrivateFieldSet;
5
- exports.__classPrivateFieldGet = __classPrivateFieldGet;
6
- exports.__importStar = __importStar;
7
- exports.__exportStar = __exportStar;
8
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
9
- if (kind === "m")
10
- throw new TypeError("Private method is not writable");
11
- if (kind === "a" && !f)
12
- throw new TypeError("Private accessor was defined without a setter");
13
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
14
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
15
- return kind === "a" ? f.call(receiver, value) : f ? (f.value = value) : state.set(receiver, value), value;
16
- }
17
- function __classPrivateFieldGet(receiver, state, kind, f) {
18
- if (kind === "a" && !f)
19
- throw new TypeError("Private accessor was defined without a getter");
20
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
21
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
22
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
23
- }
24
- var __createBinding = Object.create
25
- ? function (o, m, k, k2) {
26
- if (k2 === void 0)
27
- k2 = k;
28
- var desc = Object.getOwnPropertyDescriptor(m, k);
29
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
30
- desc = {
31
- enumerable: true,
32
- get: function () {
33
- return m[k];
34
- },
35
- };
36
- }
37
- Object.defineProperty(o, k2, desc);
38
- }
39
- : function (o, m, k, k2) {
40
- if (k2 === void 0)
41
- k2 = k;
42
- o[k2] = m[k];
43
- };
44
- exports.__createBinding = __createBinding;
45
- var __setModuleDefault = Object.create
46
- ? function (o, v) {
47
- Object.defineProperty(o, "default", { enumerable: true, value: v });
48
- }
49
- : function (o, v) {
50
- o["default"] = v;
51
- };
52
- exports.__setModuleDefault = __setModuleDefault;
53
- var ownKeys = function (o) {
54
- ownKeys =
55
- Object.getOwnPropertyNames ||
56
- function (o2) {
57
- var ar = [];
58
- for (var k in o2)
59
- if (Object.prototype.hasOwnProperty.call(o2, k))
60
- ar[ar.length] = k;
61
- return ar;
62
- };
63
- return ownKeys(o);
64
- };
65
- function __importStar(mod) {
66
- if (mod && mod.__esModule)
67
- return mod;
68
- var result = {};
69
- if (mod != null) {
70
- for (var k = ownKeys(mod), i = 0; i < k.length; i++)
71
- if (k[i] !== "default")
72
- __createBinding(result, mod, k[i]);
73
- }
74
- __setModuleDefault(result, mod);
75
- return result;
76
- }
77
- function __exportStar(m, o) {
78
- for (var p in m)
79
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
80
- __createBinding(o, m, p);
81
- }
@@ -1,17 +0,0 @@
1
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
2
- if (kind === "m")
3
- throw new TypeError("Private method is not writable");
4
- if (kind === "a" && !f)
5
- throw new TypeError("Private accessor was defined without a setter");
6
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
7
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
8
- return kind === "a" ? f.call(receiver, value) : f ? (f.value = value) : state.set(receiver, value), value;
9
- }
10
- function __classPrivateFieldGet(receiver, state, kind, f) {
11
- if (kind === "a" && !f)
12
- throw new TypeError("Private accessor was defined without a getter");
13
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
14
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
15
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
16
- }
17
- export { __classPrivateFieldSet, __classPrivateFieldGet };