hume 0.11.1 → 0.11.3

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 (203) hide show
  1. package/.mock/definition/empathic-voice/__package__.yml +24 -0
  2. package/.mock/definition/empathic-voice/configs.yml +2 -0
  3. package/.mock/definition/tts/__package__.yml +28 -0
  4. package/.mock/fern.config.json +1 -1
  5. package/Client.d.ts +11 -7
  6. package/Client.js +54 -6
  7. package/api/resources/empathicVoice/errors/BadRequestError.d.ts +2 -1
  8. package/api/resources/empathicVoice/errors/BadRequestError.js +2 -1
  9. package/api/resources/empathicVoice/resources/chatGroups/client/Client.d.ts +7 -3
  10. package/api/resources/empathicVoice/resources/chatGroups/client/Client.js +79 -52
  11. package/api/resources/empathicVoice/resources/chats/client/Client.d.ts +5 -2
  12. package/api/resources/empathicVoice/resources/chats/client/Client.js +59 -39
  13. package/api/resources/empathicVoice/resources/configs/client/Client.d.ts +17 -8
  14. package/api/resources/empathicVoice/resources/configs/client/Client.js +144 -83
  15. package/api/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.ts +1 -0
  16. package/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.d.ts +1 -0
  17. package/api/resources/empathicVoice/resources/customVoices/client/Client.d.ts +13 -6
  18. package/api/resources/empathicVoice/resources/customVoices/client/Client.js +95 -53
  19. package/api/resources/empathicVoice/resources/prompts/client/Client.d.ts +19 -9
  20. package/api/resources/empathicVoice/resources/prompts/client/Client.js +143 -81
  21. package/api/resources/empathicVoice/resources/tools/client/Client.d.ts +17 -8
  22. package/api/resources/empathicVoice/resources/tools/client/Client.js +144 -83
  23. package/api/resources/empathicVoice/types/PostedNudgeSpec.d.ts +12 -0
  24. package/api/resources/empathicVoice/types/PostedNudgeSpec.js +5 -0
  25. package/api/resources/empathicVoice/types/ReturnConfig.d.ts +1 -0
  26. package/api/resources/empathicVoice/types/ReturnNudgeSpec.d.ts +12 -0
  27. package/api/resources/empathicVoice/types/ReturnNudgeSpec.js +5 -0
  28. package/api/resources/empathicVoice/types/WebhookEventChatStatus.d.ts +2 -1
  29. package/api/resources/empathicVoice/types/WebhookEventChatStatus.js +1 -0
  30. package/api/resources/empathicVoice/types/index.d.ts +2 -0
  31. package/api/resources/empathicVoice/types/index.js +2 -0
  32. package/api/resources/expressionMeasurement/client/Client.d.ts +2 -0
  33. package/api/resources/expressionMeasurement/resources/batch/client/Client.d.ts +15 -7
  34. package/api/resources/expressionMeasurement/resources/batch/client/Client.js +96 -52
  35. package/api/resources/tts/client/Client.d.ts +27 -19
  36. package/api/resources/tts/client/Client.js +89 -50
  37. package/api/resources/tts/client/index.d.ts +1 -1
  38. package/api/resources/tts/client/index.js +15 -0
  39. package/api/resources/tts/client/requests/SynthesizeJsonRequest.d.ts +36 -0
  40. package/api/resources/tts/client/requests/SynthesizeJsonRequest.js +5 -0
  41. package/api/resources/tts/client/requests/index.d.ts +1 -0
  42. package/api/resources/tts/client/requests/index.js +2 -0
  43. package/api/resources/tts/errors/BadRequestError.d.ts +2 -1
  44. package/api/resources/tts/errors/BadRequestError.js +2 -1
  45. package/api/resources/tts/errors/UnprocessableEntityError.d.ts +2 -1
  46. package/api/resources/tts/errors/UnprocessableEntityError.js +2 -1
  47. package/api/resources/tts/resources/voices/client/Client.d.ts +7 -3
  48. package/api/resources/tts/resources/voices/client/Client.js +49 -29
  49. package/api/resources/tts/types/Snippet.d.ts +2 -0
  50. package/api/resources/tts/types/SnippetAudioChunk.d.ts +2 -0
  51. package/core/fetcher/APIResponse.d.ts +10 -0
  52. package/core/fetcher/Fetcher.d.ts +2 -1
  53. package/core/fetcher/Fetcher.js +29 -9
  54. package/core/fetcher/Headers.d.ts +2 -0
  55. package/core/fetcher/Headers.js +84 -0
  56. package/core/fetcher/HttpResponsePromise.d.ts +58 -0
  57. package/core/fetcher/HttpResponsePromise.js +103 -0
  58. package/core/fetcher/RawResponse.d.ts +29 -0
  59. package/core/fetcher/RawResponse.js +44 -0
  60. package/core/fetcher/index.d.ts +3 -0
  61. package/core/fetcher/index.js +7 -1
  62. package/core/form-data-utils/FormDataWrapper.d.ts +3 -0
  63. package/core/form-data-utils/FormDataWrapper.js +53 -13
  64. package/core/form-data-utils/toReadableStream.d.ts +1 -0
  65. package/core/form-data-utils/toReadableStream.js +50 -0
  66. package/core/headers.d.ts +3 -0
  67. package/core/headers.js +29 -0
  68. package/core/index.d.ts +4 -4
  69. package/core/index.js +5 -4
  70. package/core/pagination/Page.d.ts +5 -2
  71. package/core/pagination/Page.js +5 -2
  72. package/core/pagination/Pageable.d.ts +2 -0
  73. package/core/runtime/runtime.js +0 -1
  74. package/dist/Client.d.ts +11 -7
  75. package/dist/Client.js +54 -6
  76. package/dist/api/resources/empathicVoice/errors/BadRequestError.d.ts +2 -1
  77. package/dist/api/resources/empathicVoice/errors/BadRequestError.js +2 -1
  78. package/dist/api/resources/empathicVoice/resources/chatGroups/client/Client.d.ts +7 -3
  79. package/dist/api/resources/empathicVoice/resources/chatGroups/client/Client.js +79 -52
  80. package/dist/api/resources/empathicVoice/resources/chats/client/Client.d.ts +5 -2
  81. package/dist/api/resources/empathicVoice/resources/chats/client/Client.js +59 -39
  82. package/dist/api/resources/empathicVoice/resources/configs/client/Client.d.ts +17 -8
  83. package/dist/api/resources/empathicVoice/resources/configs/client/Client.js +144 -83
  84. package/dist/api/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.ts +1 -0
  85. package/dist/api/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.d.ts +1 -0
  86. package/dist/api/resources/empathicVoice/resources/customVoices/client/Client.d.ts +13 -6
  87. package/dist/api/resources/empathicVoice/resources/customVoices/client/Client.js +95 -53
  88. package/dist/api/resources/empathicVoice/resources/prompts/client/Client.d.ts +19 -9
  89. package/dist/api/resources/empathicVoice/resources/prompts/client/Client.js +143 -81
  90. package/dist/api/resources/empathicVoice/resources/tools/client/Client.d.ts +17 -8
  91. package/dist/api/resources/empathicVoice/resources/tools/client/Client.js +144 -83
  92. package/dist/api/resources/empathicVoice/types/PostedNudgeSpec.d.ts +12 -0
  93. package/dist/api/resources/empathicVoice/types/PostedNudgeSpec.js +5 -0
  94. package/dist/api/resources/empathicVoice/types/ReturnConfig.d.ts +1 -0
  95. package/dist/api/resources/empathicVoice/types/ReturnNudgeSpec.d.ts +12 -0
  96. package/dist/api/resources/empathicVoice/types/ReturnNudgeSpec.js +5 -0
  97. package/dist/api/resources/empathicVoice/types/WebhookEventChatStatus.d.ts +2 -1
  98. package/dist/api/resources/empathicVoice/types/WebhookEventChatStatus.js +1 -0
  99. package/dist/api/resources/empathicVoice/types/index.d.ts +2 -0
  100. package/dist/api/resources/empathicVoice/types/index.js +2 -0
  101. package/dist/api/resources/expressionMeasurement/client/Client.d.ts +2 -0
  102. package/dist/api/resources/expressionMeasurement/resources/batch/client/Client.d.ts +15 -7
  103. package/dist/api/resources/expressionMeasurement/resources/batch/client/Client.js +96 -52
  104. package/dist/api/resources/tts/client/Client.d.ts +27 -19
  105. package/dist/api/resources/tts/client/Client.js +89 -50
  106. package/dist/api/resources/tts/client/index.d.ts +1 -1
  107. package/dist/api/resources/tts/client/index.js +15 -0
  108. package/dist/api/resources/tts/client/requests/SynthesizeJsonRequest.d.ts +36 -0
  109. package/dist/api/resources/tts/client/requests/SynthesizeJsonRequest.js +5 -0
  110. package/dist/api/resources/tts/client/requests/index.d.ts +1 -0
  111. package/dist/api/resources/tts/client/requests/index.js +2 -0
  112. package/dist/api/resources/tts/errors/BadRequestError.d.ts +2 -1
  113. package/dist/api/resources/tts/errors/BadRequestError.js +2 -1
  114. package/dist/api/resources/tts/errors/UnprocessableEntityError.d.ts +2 -1
  115. package/dist/api/resources/tts/errors/UnprocessableEntityError.js +2 -1
  116. package/dist/api/resources/tts/resources/voices/client/Client.d.ts +7 -3
  117. package/dist/api/resources/tts/resources/voices/client/Client.js +49 -29
  118. package/dist/api/resources/tts/types/Snippet.d.ts +2 -0
  119. package/dist/api/resources/tts/types/SnippetAudioChunk.d.ts +2 -0
  120. package/dist/core/fetcher/APIResponse.d.ts +10 -0
  121. package/dist/core/fetcher/Fetcher.d.ts +2 -1
  122. package/dist/core/fetcher/Fetcher.js +29 -9
  123. package/dist/core/fetcher/Headers.d.ts +2 -0
  124. package/dist/core/fetcher/Headers.js +84 -0
  125. package/dist/core/fetcher/HttpResponsePromise.d.ts +58 -0
  126. package/dist/core/fetcher/HttpResponsePromise.js +103 -0
  127. package/dist/core/fetcher/RawResponse.d.ts +29 -0
  128. package/dist/core/fetcher/RawResponse.js +44 -0
  129. package/dist/core/fetcher/index.d.ts +3 -0
  130. package/dist/core/fetcher/index.js +7 -1
  131. package/dist/core/form-data-utils/FormDataWrapper.d.ts +3 -0
  132. package/dist/core/form-data-utils/FormDataWrapper.js +53 -13
  133. package/dist/core/form-data-utils/toReadableStream.d.ts +1 -0
  134. package/dist/core/form-data-utils/toReadableStream.js +50 -0
  135. package/dist/core/headers.d.ts +3 -0
  136. package/dist/core/headers.js +29 -0
  137. package/dist/core/index.d.ts +4 -4
  138. package/dist/core/index.js +5 -4
  139. package/dist/core/pagination/Page.d.ts +5 -2
  140. package/dist/core/pagination/Page.js +5 -2
  141. package/dist/core/pagination/Pageable.d.ts +2 -0
  142. package/dist/core/runtime/runtime.js +0 -1
  143. package/dist/errors/HumeError.d.ts +7 -2
  144. package/dist/errors/HumeError.js +10 -10
  145. package/dist/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.ts +2 -0
  146. package/dist/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfig.js +2 -0
  147. package/dist/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.d.ts +2 -0
  148. package/dist/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.js +2 -0
  149. package/dist/serialization/resources/empathicVoice/types/PostedNudgeSpec.d.ts +13 -0
  150. package/dist/serialization/resources/empathicVoice/types/PostedNudgeSpec.js +44 -0
  151. package/dist/serialization/resources/empathicVoice/types/ReturnConfig.d.ts +2 -0
  152. package/dist/serialization/resources/empathicVoice/types/ReturnConfig.js +2 -0
  153. package/dist/serialization/resources/empathicVoice/types/ReturnNudgeSpec.d.ts +13 -0
  154. package/dist/serialization/resources/empathicVoice/types/ReturnNudgeSpec.js +44 -0
  155. package/dist/serialization/resources/empathicVoice/types/WebhookEventChatStatus.d.ts +1 -1
  156. package/dist/serialization/resources/empathicVoice/types/WebhookEventChatStatus.js +1 -0
  157. package/dist/serialization/resources/empathicVoice/types/index.d.ts +2 -0
  158. package/dist/serialization/resources/empathicVoice/types/index.js +2 -0
  159. package/dist/serialization/resources/tts/types/Snippet.d.ts +1 -0
  160. package/dist/serialization/resources/tts/types/Snippet.js +1 -0
  161. package/dist/serialization/resources/tts/types/SnippetAudioChunk.d.ts +1 -0
  162. package/dist/serialization/resources/tts/types/SnippetAudioChunk.js +1 -0
  163. package/dist/version.d.ts +1 -1
  164. package/dist/version.js +1 -1
  165. package/dist/wrapper/expressionMeasurement/ExpressionMeasurementClient.js +2 -0
  166. package/dist/wrapper/expressionMeasurement/batch/BatchClient.d.ts +2 -1
  167. package/dist/wrapper/expressionMeasurement/batch/BatchClient.js +43 -17
  168. package/errors/HumeError.d.ts +7 -2
  169. package/errors/HumeError.js +10 -10
  170. package/package.json +9 -4
  171. package/reference.md +17 -15
  172. package/scripts/rename-to-esm-files.js +10 -2
  173. package/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfig.d.ts +2 -0
  174. package/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfig.js +2 -0
  175. package/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.d.ts +2 -0
  176. package/serialization/resources/empathicVoice/resources/configs/client/requests/PostedConfigVersion.js +2 -0
  177. package/serialization/resources/empathicVoice/types/PostedNudgeSpec.d.ts +13 -0
  178. package/serialization/resources/empathicVoice/types/PostedNudgeSpec.js +44 -0
  179. package/serialization/resources/empathicVoice/types/ReturnConfig.d.ts +2 -0
  180. package/serialization/resources/empathicVoice/types/ReturnConfig.js +2 -0
  181. package/serialization/resources/empathicVoice/types/ReturnNudgeSpec.d.ts +13 -0
  182. package/serialization/resources/empathicVoice/types/ReturnNudgeSpec.js +44 -0
  183. package/serialization/resources/empathicVoice/types/WebhookEventChatStatus.d.ts +1 -1
  184. package/serialization/resources/empathicVoice/types/WebhookEventChatStatus.js +1 -0
  185. package/serialization/resources/empathicVoice/types/index.d.ts +2 -0
  186. package/serialization/resources/empathicVoice/types/index.js +2 -0
  187. package/serialization/resources/tts/types/Snippet.d.ts +1 -0
  188. package/serialization/resources/tts/types/Snippet.js +1 -0
  189. package/serialization/resources/tts/types/SnippetAudioChunk.d.ts +1 -0
  190. package/serialization/resources/tts/types/SnippetAudioChunk.js +1 -0
  191. package/version.d.ts +1 -1
  192. package/version.js +1 -1
  193. package/wrapper/expressionMeasurement/ExpressionMeasurementClient.js +2 -0
  194. package/wrapper/expressionMeasurement/batch/BatchClient.d.ts +2 -1
  195. package/wrapper/expressionMeasurement/batch/BatchClient.js +43 -17
  196. /package/core/{streaming-fetcher → stream}/Stream.d.ts +0 -0
  197. /package/core/{streaming-fetcher → stream}/Stream.js +0 -0
  198. /package/core/{streaming-fetcher → stream}/index.d.ts +0 -0
  199. /package/core/{streaming-fetcher → stream}/index.js +0 -0
  200. /package/dist/core/{streaming-fetcher → stream}/Stream.d.ts +0 -0
  201. /package/dist/core/{streaming-fetcher → stream}/Stream.js +0 -0
  202. /package/dist/core/{streaming-fetcher → stream}/index.d.ts +0 -0
  203. /package/dist/core/{streaming-fetcher → stream}/index.js +0 -0
@@ -10,6 +10,8 @@ export declare namespace CustomVoices {
10
10
  /** Specify a custom URL to connect the client to. */
11
11
  baseUrl?: core.Supplier<string>;
12
12
  apiKey?: core.Supplier<string | undefined>;
13
+ /** Additional headers to include in requests. */
14
+ headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
13
15
  fetcher?: core.FetchFunction;
14
16
  }
15
17
  interface RequestOptions {
@@ -20,7 +22,7 @@ export declare namespace CustomVoices {
20
22
  /** A hook to abort the request. */
21
23
  abortSignal?: AbortSignal;
22
24
  /** Additional headers to include in the request. */
23
- headers?: Record<string, string>;
25
+ headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
24
26
  }
25
27
  }
26
28
  export declare class CustomVoices {
@@ -57,7 +59,8 @@ export declare class CustomVoices {
57
59
  * parameterModel: "20241004-11parameter"
58
60
  * })
59
61
  */
60
- createCustomVoice(request: Hume.empathicVoice.PostedCustomVoice, requestOptions?: CustomVoices.RequestOptions): Promise<Hume.empathicVoice.ReturnCustomVoice>;
62
+ createCustomVoice(request: Hume.empathicVoice.PostedCustomVoice, requestOptions?: CustomVoices.RequestOptions): core.HttpResponsePromise<Hume.empathicVoice.ReturnCustomVoice>;
63
+ private __createCustomVoice;
61
64
  /**
62
65
  * Fetches a specific **Custom Voice** by ID.
63
66
  *
@@ -71,7 +74,8 @@ export declare class CustomVoices {
71
74
  * @example
72
75
  * await client.empathicVoice.customVoices.getCustomVoice("id")
73
76
  */
74
- getCustomVoice(id: string, requestOptions?: CustomVoices.RequestOptions): Promise<Hume.empathicVoice.ReturnCustomVoice>;
77
+ getCustomVoice(id: string, requestOptions?: CustomVoices.RequestOptions): core.HttpResponsePromise<Hume.empathicVoice.ReturnCustomVoice>;
78
+ private __getCustomVoice;
75
79
  /**
76
80
  * Updates a **Custom Voice** by creating a new version of the **Custom Voice**.
77
81
  *
@@ -90,7 +94,8 @@ export declare class CustomVoices {
90
94
  * parameterModel: "20241004-11parameter"
91
95
  * })
92
96
  */
93
- createCustomVoiceVersion(id: string, request: Hume.empathicVoice.PostedCustomVoice, requestOptions?: CustomVoices.RequestOptions): Promise<Hume.empathicVoice.ReturnCustomVoice>;
97
+ createCustomVoiceVersion(id: string, request: Hume.empathicVoice.PostedCustomVoice, requestOptions?: CustomVoices.RequestOptions): core.HttpResponsePromise<Hume.empathicVoice.ReturnCustomVoice>;
98
+ private __createCustomVoiceVersion;
94
99
  /**
95
100
  * Deletes a **Custom Voice** and its versions.
96
101
  *
@@ -104,7 +109,8 @@ export declare class CustomVoices {
104
109
  * @example
105
110
  * await client.empathicVoice.customVoices.deleteCustomVoice("id")
106
111
  */
107
- deleteCustomVoice(id: string, requestOptions?: CustomVoices.RequestOptions): Promise<void>;
112
+ deleteCustomVoice(id: string, requestOptions?: CustomVoices.RequestOptions): core.HttpResponsePromise<void>;
113
+ private __deleteCustomVoice;
108
114
  /**
109
115
  * Updates the name of a **Custom Voice**.
110
116
  *
@@ -121,7 +127,8 @@ export declare class CustomVoices {
121
127
  * name: "name"
122
128
  * })
123
129
  */
124
- updateCustomVoiceName(id: string, request: Hume.empathicVoice.PostedCustomVoiceName, requestOptions?: CustomVoices.RequestOptions): Promise<string>;
130
+ updateCustomVoiceName(id: string, request: Hume.empathicVoice.PostedCustomVoiceName, requestOptions?: CustomVoices.RequestOptions): core.HttpResponsePromise<string>;
131
+ private __updateCustomVoiceName;
125
132
  protected _getCustomAuthorizationHeaders(): Promise<{
126
133
  "X-Hume-Api-Key": string | undefined;
127
134
  }>;
@@ -52,6 +52,7 @@ exports.CustomVoices = void 0;
52
52
  const environments = __importStar(require("../../../../../../environments"));
53
53
  const core = __importStar(require("../../../../../../core"));
54
54
  const Hume = __importStar(require("../../../../../index"));
55
+ const headers_js_1 = require("../../../../../../core/headers.js");
55
56
  const url_join_1 = __importDefault(require("url-join"));
56
57
  const serializers = __importStar(require("../../../../../../serialization/index"));
57
58
  const errors = __importStar(require("../../../../../../errors/index"));
@@ -74,8 +75,8 @@ class CustomVoices {
74
75
  */
75
76
  listCustomVoices() {
76
77
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
77
- const list = (request) => __awaiter(this, void 0, void 0, function* () {
78
- var _a, _b, _c;
78
+ const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
79
+ var _a, _b, _c, _d;
79
80
  const { pageNumber, pageSize, name } = request;
80
81
  const _queryParams = {};
81
82
  if (pageNumber != null) {
@@ -90,21 +91,22 @@ class CustomVoices {
90
91
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
91
92
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, "v0/evi/custom_voices"),
92
93
  method: "GET",
93
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.11.1", "User-Agent": "hume/0.11.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
94
- contentType: "application/json",
94
+ headers: (0, headers_js_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
95
95
  queryParameters: _queryParams,
96
- requestType: "json",
97
96
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
98
97
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
99
98
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
100
99
  });
101
100
  if (_response.ok) {
102
- return serializers.empathicVoice.ReturnPagedCustomVoices.parseOrThrow(_response.body, {
103
- unrecognizedObjectKeys: "passthrough",
104
- allowUnrecognizedUnionMembers: true,
105
- allowUnrecognizedEnumValues: true,
106
- breadcrumbsPrefix: ["response"],
107
- });
101
+ return {
102
+ data: serializers.empathicVoice.ReturnPagedCustomVoices.parseOrThrow(_response.body, {
103
+ unrecognizedObjectKeys: "passthrough",
104
+ allowUnrecognizedUnionMembers: true,
105
+ allowUnrecognizedEnumValues: true,
106
+ breadcrumbsPrefix: ["response"],
107
+ }),
108
+ rawResponse: _response.rawResponse,
109
+ };
108
110
  }
109
111
  if (_response.error.reason === "status-code") {
110
112
  switch (_response.error.statusCode) {
@@ -114,11 +116,12 @@ class CustomVoices {
114
116
  allowUnrecognizedUnionMembers: true,
115
117
  allowUnrecognizedEnumValues: true,
116
118
  breadcrumbsPrefix: ["response"],
117
- }));
119
+ }), _response.rawResponse);
118
120
  default:
119
121
  throw new errors.HumeError({
120
122
  statusCode: _response.error.statusCode,
121
123
  body: _response.error.body,
124
+ rawResponse: _response.rawResponse,
122
125
  });
123
126
  }
124
127
  }
@@ -127,18 +130,22 @@ class CustomVoices {
127
130
  throw new errors.HumeError({
128
131
  statusCode: _response.error.statusCode,
129
132
  body: _response.error.rawBody,
133
+ rawResponse: _response.rawResponse,
130
134
  });
131
135
  case "timeout":
132
136
  throw new errors.HumeTimeoutError("Timeout exceeded when calling GET /v0/evi/custom_voices.");
133
137
  case "unknown":
134
138
  throw new errors.HumeError({
135
139
  message: _response.error.errorMessage,
140
+ rawResponse: _response.rawResponse,
136
141
  });
137
142
  }
138
- });
143
+ }));
139
144
  let _offset = (request === null || request === void 0 ? void 0 : request.pageNumber) != null ? request === null || request === void 0 ? void 0 : request.pageNumber : 0;
145
+ const dataWithRawResponse = yield list(request).withRawResponse();
140
146
  return new core.Pageable({
141
- response: yield list(request),
147
+ response: dataWithRawResponse.data,
148
+ rawResponse: dataWithRawResponse.rawResponse,
142
149
  hasNextPage: (response) => { var _a; return ((_a = response === null || response === void 0 ? void 0 : response.customVoicesPage) !== null && _a !== void 0 ? _a : []).length > 0; },
143
150
  getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.customVoicesPage) !== null && _a !== void 0 ? _a : []; },
144
151
  loadPage: (_response) => {
@@ -166,12 +173,15 @@ class CustomVoices {
166
173
  * })
167
174
  */
168
175
  createCustomVoice(request, requestOptions) {
176
+ return core.HttpResponsePromise.fromPromise(this.__createCustomVoice(request, requestOptions));
177
+ }
178
+ __createCustomVoice(request, requestOptions) {
169
179
  return __awaiter(this, void 0, void 0, function* () {
170
- var _a, _b, _c;
180
+ var _a, _b, _c, _d;
171
181
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
172
182
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, "v0/evi/custom_voices"),
173
183
  method: "POST",
174
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.11.1", "User-Agent": "hume/0.11.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
184
+ headers: (0, headers_js_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
175
185
  contentType: "application/json",
176
186
  requestType: "json",
177
187
  body: serializers.empathicVoice.PostedCustomVoice.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -180,12 +190,15 @@ class CustomVoices {
180
190
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
181
191
  });
182
192
  if (_response.ok) {
183
- return serializers.empathicVoice.ReturnCustomVoice.parseOrThrow(_response.body, {
184
- unrecognizedObjectKeys: "passthrough",
185
- allowUnrecognizedUnionMembers: true,
186
- allowUnrecognizedEnumValues: true,
187
- breadcrumbsPrefix: ["response"],
188
- });
193
+ return {
194
+ data: serializers.empathicVoice.ReturnCustomVoice.parseOrThrow(_response.body, {
195
+ unrecognizedObjectKeys: "passthrough",
196
+ allowUnrecognizedUnionMembers: true,
197
+ allowUnrecognizedEnumValues: true,
198
+ breadcrumbsPrefix: ["response"],
199
+ }),
200
+ rawResponse: _response.rawResponse,
201
+ };
189
202
  }
190
203
  if (_response.error.reason === "status-code") {
191
204
  switch (_response.error.statusCode) {
@@ -195,11 +208,12 @@ class CustomVoices {
195
208
  allowUnrecognizedUnionMembers: true,
196
209
  allowUnrecognizedEnumValues: true,
197
210
  breadcrumbsPrefix: ["response"],
198
- }));
211
+ }), _response.rawResponse);
199
212
  default:
200
213
  throw new errors.HumeError({
201
214
  statusCode: _response.error.statusCode,
202
215
  body: _response.error.body,
216
+ rawResponse: _response.rawResponse,
203
217
  });
204
218
  }
205
219
  }
@@ -208,12 +222,14 @@ class CustomVoices {
208
222
  throw new errors.HumeError({
209
223
  statusCode: _response.error.statusCode,
210
224
  body: _response.error.rawBody,
225
+ rawResponse: _response.rawResponse,
211
226
  });
212
227
  case "timeout":
213
228
  throw new errors.HumeTimeoutError("Timeout exceeded when calling POST /v0/evi/custom_voices.");
214
229
  case "unknown":
215
230
  throw new errors.HumeError({
216
231
  message: _response.error.errorMessage,
232
+ rawResponse: _response.rawResponse,
217
233
  });
218
234
  }
219
235
  });
@@ -232,25 +248,29 @@ class CustomVoices {
232
248
  * await client.empathicVoice.customVoices.getCustomVoice("id")
233
249
  */
234
250
  getCustomVoice(id, requestOptions) {
251
+ return core.HttpResponsePromise.fromPromise(this.__getCustomVoice(id, requestOptions));
252
+ }
253
+ __getCustomVoice(id, requestOptions) {
235
254
  return __awaiter(this, void 0, void 0, function* () {
236
- var _a, _b, _c;
255
+ var _a, _b, _c, _d;
237
256
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
238
257
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, `v0/evi/custom_voices/${encodeURIComponent(id)}`),
239
258
  method: "GET",
240
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.11.1", "User-Agent": "hume/0.11.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
241
- contentType: "application/json",
242
- requestType: "json",
259
+ headers: (0, headers_js_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
243
260
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
244
261
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
245
262
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
246
263
  });
247
264
  if (_response.ok) {
248
- return serializers.empathicVoice.ReturnCustomVoice.parseOrThrow(_response.body, {
249
- unrecognizedObjectKeys: "passthrough",
250
- allowUnrecognizedUnionMembers: true,
251
- allowUnrecognizedEnumValues: true,
252
- breadcrumbsPrefix: ["response"],
253
- });
265
+ return {
266
+ data: serializers.empathicVoice.ReturnCustomVoice.parseOrThrow(_response.body, {
267
+ unrecognizedObjectKeys: "passthrough",
268
+ allowUnrecognizedUnionMembers: true,
269
+ allowUnrecognizedEnumValues: true,
270
+ breadcrumbsPrefix: ["response"],
271
+ }),
272
+ rawResponse: _response.rawResponse,
273
+ };
254
274
  }
255
275
  if (_response.error.reason === "status-code") {
256
276
  switch (_response.error.statusCode) {
@@ -260,11 +280,12 @@ class CustomVoices {
260
280
  allowUnrecognizedUnionMembers: true,
261
281
  allowUnrecognizedEnumValues: true,
262
282
  breadcrumbsPrefix: ["response"],
263
- }));
283
+ }), _response.rawResponse);
264
284
  default:
265
285
  throw new errors.HumeError({
266
286
  statusCode: _response.error.statusCode,
267
287
  body: _response.error.body,
288
+ rawResponse: _response.rawResponse,
268
289
  });
269
290
  }
270
291
  }
@@ -273,12 +294,14 @@ class CustomVoices {
273
294
  throw new errors.HumeError({
274
295
  statusCode: _response.error.statusCode,
275
296
  body: _response.error.rawBody,
297
+ rawResponse: _response.rawResponse,
276
298
  });
277
299
  case "timeout":
278
300
  throw new errors.HumeTimeoutError("Timeout exceeded when calling GET /v0/evi/custom_voices/{id}.");
279
301
  case "unknown":
280
302
  throw new errors.HumeError({
281
303
  message: _response.error.errorMessage,
304
+ rawResponse: _response.rawResponse,
282
305
  });
283
306
  }
284
307
  });
@@ -302,12 +325,15 @@ class CustomVoices {
302
325
  * })
303
326
  */
304
327
  createCustomVoiceVersion(id, request, requestOptions) {
328
+ return core.HttpResponsePromise.fromPromise(this.__createCustomVoiceVersion(id, request, requestOptions));
329
+ }
330
+ __createCustomVoiceVersion(id, request, requestOptions) {
305
331
  return __awaiter(this, void 0, void 0, function* () {
306
- var _a, _b, _c;
332
+ var _a, _b, _c, _d;
307
333
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
308
334
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, `v0/evi/custom_voices/${encodeURIComponent(id)}`),
309
335
  method: "POST",
310
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.11.1", "User-Agent": "hume/0.11.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
336
+ headers: (0, headers_js_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
311
337
  contentType: "application/json",
312
338
  requestType: "json",
313
339
  body: serializers.empathicVoice.PostedCustomVoice.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -316,12 +342,15 @@ class CustomVoices {
316
342
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
317
343
  });
318
344
  if (_response.ok) {
319
- return serializers.empathicVoice.ReturnCustomVoice.parseOrThrow(_response.body, {
320
- unrecognizedObjectKeys: "passthrough",
321
- allowUnrecognizedUnionMembers: true,
322
- allowUnrecognizedEnumValues: true,
323
- breadcrumbsPrefix: ["response"],
324
- });
345
+ return {
346
+ data: serializers.empathicVoice.ReturnCustomVoice.parseOrThrow(_response.body, {
347
+ unrecognizedObjectKeys: "passthrough",
348
+ allowUnrecognizedUnionMembers: true,
349
+ allowUnrecognizedEnumValues: true,
350
+ breadcrumbsPrefix: ["response"],
351
+ }),
352
+ rawResponse: _response.rawResponse,
353
+ };
325
354
  }
326
355
  if (_response.error.reason === "status-code") {
327
356
  switch (_response.error.statusCode) {
@@ -331,11 +360,12 @@ class CustomVoices {
331
360
  allowUnrecognizedUnionMembers: true,
332
361
  allowUnrecognizedEnumValues: true,
333
362
  breadcrumbsPrefix: ["response"],
334
- }));
363
+ }), _response.rawResponse);
335
364
  default:
336
365
  throw new errors.HumeError({
337
366
  statusCode: _response.error.statusCode,
338
367
  body: _response.error.body,
368
+ rawResponse: _response.rawResponse,
339
369
  });
340
370
  }
341
371
  }
@@ -344,12 +374,14 @@ class CustomVoices {
344
374
  throw new errors.HumeError({
345
375
  statusCode: _response.error.statusCode,
346
376
  body: _response.error.rawBody,
377
+ rawResponse: _response.rawResponse,
347
378
  });
348
379
  case "timeout":
349
380
  throw new errors.HumeTimeoutError("Timeout exceeded when calling POST /v0/evi/custom_voices/{id}.");
350
381
  case "unknown":
351
382
  throw new errors.HumeError({
352
383
  message: _response.error.errorMessage,
384
+ rawResponse: _response.rawResponse,
353
385
  });
354
386
  }
355
387
  });
@@ -368,20 +400,21 @@ class CustomVoices {
368
400
  * await client.empathicVoice.customVoices.deleteCustomVoice("id")
369
401
  */
370
402
  deleteCustomVoice(id, requestOptions) {
403
+ return core.HttpResponsePromise.fromPromise(this.__deleteCustomVoice(id, requestOptions));
404
+ }
405
+ __deleteCustomVoice(id, requestOptions) {
371
406
  return __awaiter(this, void 0, void 0, function* () {
372
- var _a, _b, _c;
407
+ var _a, _b, _c, _d;
373
408
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
374
409
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, `v0/evi/custom_voices/${encodeURIComponent(id)}`),
375
410
  method: "DELETE",
376
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.11.1", "User-Agent": "hume/0.11.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
377
- contentType: "application/json",
378
- requestType: "json",
411
+ headers: (0, headers_js_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
379
412
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
380
413
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
381
414
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
382
415
  });
383
416
  if (_response.ok) {
384
- return;
417
+ return { data: undefined, rawResponse: _response.rawResponse };
385
418
  }
386
419
  if (_response.error.reason === "status-code") {
387
420
  switch (_response.error.statusCode) {
@@ -391,11 +424,12 @@ class CustomVoices {
391
424
  allowUnrecognizedUnionMembers: true,
392
425
  allowUnrecognizedEnumValues: true,
393
426
  breadcrumbsPrefix: ["response"],
394
- }));
427
+ }), _response.rawResponse);
395
428
  default:
396
429
  throw new errors.HumeError({
397
430
  statusCode: _response.error.statusCode,
398
431
  body: _response.error.body,
432
+ rawResponse: _response.rawResponse,
399
433
  });
400
434
  }
401
435
  }
@@ -404,12 +438,14 @@ class CustomVoices {
404
438
  throw new errors.HumeError({
405
439
  statusCode: _response.error.statusCode,
406
440
  body: _response.error.rawBody,
441
+ rawResponse: _response.rawResponse,
407
442
  });
408
443
  case "timeout":
409
444
  throw new errors.HumeTimeoutError("Timeout exceeded when calling DELETE /v0/evi/custom_voices/{id}.");
410
445
  case "unknown":
411
446
  throw new errors.HumeError({
412
447
  message: _response.error.errorMessage,
448
+ rawResponse: _response.rawResponse,
413
449
  });
414
450
  }
415
451
  });
@@ -431,12 +467,15 @@ class CustomVoices {
431
467
  * })
432
468
  */
433
469
  updateCustomVoiceName(id, request, requestOptions) {
470
+ return core.HttpResponsePromise.fromPromise(this.__updateCustomVoiceName(id, request, requestOptions));
471
+ }
472
+ __updateCustomVoiceName(id, request, requestOptions) {
434
473
  return __awaiter(this, void 0, void 0, function* () {
435
- var _a, _b, _c;
474
+ var _a, _b, _c, _d;
436
475
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
437
476
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.HumeEnvironment.Production, `v0/evi/custom_voices/${encodeURIComponent(id)}`),
438
477
  method: "PATCH",
439
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "hume", "X-Fern-SDK-Version": "0.11.1", "User-Agent": "hume/0.11.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
478
+ headers: (0, headers_js_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
440
479
  contentType: "application/json",
441
480
  requestType: "json",
442
481
  body: serializers.empathicVoice.PostedCustomVoiceName.jsonOrThrow(request, {
@@ -448,7 +487,7 @@ class CustomVoices {
448
487
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
449
488
  });
450
489
  if (_response.ok) {
451
- return _response.body;
490
+ return { data: _response.body, rawResponse: _response.rawResponse };
452
491
  }
453
492
  if (_response.error.reason === "status-code") {
454
493
  switch (_response.error.statusCode) {
@@ -458,11 +497,12 @@ class CustomVoices {
458
497
  allowUnrecognizedUnionMembers: true,
459
498
  allowUnrecognizedEnumValues: true,
460
499
  breadcrumbsPrefix: ["response"],
461
- }));
500
+ }), _response.rawResponse);
462
501
  default:
463
502
  throw new errors.HumeError({
464
503
  statusCode: _response.error.statusCode,
465
504
  body: _response.error.body,
505
+ rawResponse: _response.rawResponse,
466
506
  });
467
507
  }
468
508
  }
@@ -471,12 +511,14 @@ class CustomVoices {
471
511
  throw new errors.HumeError({
472
512
  statusCode: _response.error.statusCode,
473
513
  body: _response.error.rawBody,
514
+ rawResponse: _response.rawResponse,
474
515
  });
475
516
  case "timeout":
476
517
  throw new errors.HumeTimeoutError("Timeout exceeded when calling PATCH /v0/evi/custom_voices/{id}.");
477
518
  case "unknown":
478
519
  throw new errors.HumeError({
479
520
  message: _response.error.errorMessage,
521
+ rawResponse: _response.rawResponse,
480
522
  });
481
523
  }
482
524
  });
@@ -10,6 +10,8 @@ export declare namespace Prompts {
10
10
  /** Specify a custom URL to connect the client to. */
11
11
  baseUrl?: core.Supplier<string>;
12
12
  apiKey?: core.Supplier<string | undefined>;
13
+ /** Additional headers to include in requests. */
14
+ headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
13
15
  fetcher?: core.FetchFunction;
14
16
  }
15
17
  interface RequestOptions {
@@ -20,7 +22,7 @@ export declare namespace Prompts {
20
22
  /** A hook to abort the request. */
21
23
  abortSignal?: AbortSignal;
22
24
  /** Additional headers to include in the request. */
23
- headers?: Record<string, string>;
25
+ headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
24
26
  }
25
27
  }
26
28
  export declare class Prompts {
@@ -59,7 +61,8 @@ export declare class Prompts {
59
61
  * text: "<role>You are an AI weather assistant providing users with accurate and up-to-date weather information. Respond to user queries concisely and clearly. Use simple language and avoid technical jargon. Provide temperature, precipitation, wind conditions, and any weather alerts. Include helpful tips if severe weather is expected.</role>"
60
62
  * })
61
63
  */
62
- createPrompt(request: Hume.empathicVoice.PostedPrompt, requestOptions?: Prompts.RequestOptions): Promise<Hume.empathicVoice.ReturnPrompt | undefined>;
64
+ createPrompt(request: Hume.empathicVoice.PostedPrompt, requestOptions?: Prompts.RequestOptions): core.HttpResponsePromise<Hume.empathicVoice.ReturnPrompt | undefined>;
65
+ private __createPrompt;
63
66
  /**
64
67
  * Fetches a list of a **Prompt's** versions.
65
68
  *
@@ -74,7 +77,8 @@ export declare class Prompts {
74
77
  * @example
75
78
  * await client.empathicVoice.prompts.listPromptVersions("af699d45-2985-42cc-91b9-af9e5da3bac5")
76
79
  */
77
- listPromptVersions(id: string, request?: Hume.empathicVoice.PromptsListPromptVersionsRequest, requestOptions?: Prompts.RequestOptions): Promise<Hume.empathicVoice.ReturnPagedPrompts>;
80
+ listPromptVersions(id: string, request?: Hume.empathicVoice.PromptsListPromptVersionsRequest, requestOptions?: Prompts.RequestOptions): core.HttpResponsePromise<Hume.empathicVoice.ReturnPagedPrompts>;
81
+ private __listPromptVersions;
78
82
  /**
79
83
  * Updates a **Prompt** by creating a new version of the **Prompt**.
80
84
  *
@@ -92,7 +96,8 @@ export declare class Prompts {
92
96
  * versionDescription: "This is an updated version of the Weather Assistant Prompt."
93
97
  * })
94
98
  */
95
- createPromptVersion(id: string, request: Hume.empathicVoice.PostedPromptVersion, requestOptions?: Prompts.RequestOptions): Promise<Hume.empathicVoice.ReturnPrompt | undefined>;
99
+ createPromptVersion(id: string, request: Hume.empathicVoice.PostedPromptVersion, requestOptions?: Prompts.RequestOptions): core.HttpResponsePromise<Hume.empathicVoice.ReturnPrompt | undefined>;
100
+ private __createPromptVersion;
96
101
  /**
97
102
  * Deletes a **Prompt** and its versions.
98
103
  *
@@ -106,7 +111,8 @@ export declare class Prompts {
106
111
  * @example
107
112
  * await client.empathicVoice.prompts.deletePrompt("af699d45-2985-42cc-91b9-af9e5da3bac5")
108
113
  */
109
- deletePrompt(id: string, requestOptions?: Prompts.RequestOptions): Promise<void>;
114
+ deletePrompt(id: string, requestOptions?: Prompts.RequestOptions): core.HttpResponsePromise<void>;
115
+ private __deletePrompt;
110
116
  /**
111
117
  * Updates the name of a **Prompt**.
112
118
  *
@@ -123,7 +129,8 @@ export declare class Prompts {
123
129
  * name: "Updated Weather Assistant Prompt Name"
124
130
  * })
125
131
  */
126
- updatePromptName(id: string, request: Hume.empathicVoice.PostedPromptName, requestOptions?: Prompts.RequestOptions): Promise<string>;
132
+ updatePromptName(id: string, request: Hume.empathicVoice.PostedPromptName, requestOptions?: Prompts.RequestOptions): core.HttpResponsePromise<string>;
133
+ private __updatePromptName;
127
134
  /**
128
135
  * Fetches a specified version of a **Prompt**.
129
136
  *
@@ -142,7 +149,8 @@ export declare class Prompts {
142
149
  * @example
143
150
  * await client.empathicVoice.prompts.getPromptVersion("af699d45-2985-42cc-91b9-af9e5da3bac5", 0)
144
151
  */
145
- getPromptVersion(id: string, version: number, requestOptions?: Prompts.RequestOptions): Promise<Hume.empathicVoice.ReturnPrompt | undefined>;
152
+ getPromptVersion(id: string, version: number, requestOptions?: Prompts.RequestOptions): core.HttpResponsePromise<Hume.empathicVoice.ReturnPrompt | undefined>;
153
+ private __getPromptVersion;
146
154
  /**
147
155
  * Deletes a specified version of a **Prompt**.
148
156
  *
@@ -161,7 +169,8 @@ export declare class Prompts {
161
169
  * @example
162
170
  * await client.empathicVoice.prompts.deletePromptVersion("af699d45-2985-42cc-91b9-af9e5da3bac5", 1)
163
171
  */
164
- deletePromptVersion(id: string, version: number, requestOptions?: Prompts.RequestOptions): Promise<void>;
172
+ deletePromptVersion(id: string, version: number, requestOptions?: Prompts.RequestOptions): core.HttpResponsePromise<void>;
173
+ private __deletePromptVersion;
165
174
  /**
166
175
  * Updates the description of a **Prompt**.
167
176
  *
@@ -183,7 +192,8 @@ export declare class Prompts {
183
192
  * versionDescription: "This is an updated version_description."
184
193
  * })
185
194
  */
186
- updatePromptDescription(id: string, version: number, request?: Hume.empathicVoice.PostedPromptVersionDescription, requestOptions?: Prompts.RequestOptions): Promise<Hume.empathicVoice.ReturnPrompt | undefined>;
195
+ updatePromptDescription(id: string, version: number, request?: Hume.empathicVoice.PostedPromptVersionDescription, requestOptions?: Prompts.RequestOptions): core.HttpResponsePromise<Hume.empathicVoice.ReturnPrompt | undefined>;
196
+ private __updatePromptDescription;
187
197
  protected _getCustomAuthorizationHeaders(): Promise<{
188
198
  "X-Hume-Api-Key": string | undefined;
189
199
  }>;