@deepgram/sdk 5.0.0-alpha.3 → 5.0.0-beta.1

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 (157) hide show
  1. package/LICENSE +1 -1
  2. package/dist/browser/index.global.js +496 -1104
  3. package/dist/cjs/BaseClient.d.ts +7 -7
  4. package/dist/cjs/BaseClient.js +2 -2
  5. package/dist/cjs/Client.d.ts +1 -2
  6. package/dist/cjs/CustomClient.js +253 -249
  7. package/dist/cjs/api/resources/agent/client/Client.d.ts +1 -2
  8. package/dist/cjs/api/resources/agent/resources/v1/client/Client.d.ts +1 -2
  9. package/dist/cjs/api/resources/agent/resources/v1/client/Socket.d.ts +8 -8
  10. package/dist/cjs/api/resources/agent/resources/v1/client/Socket.js +9 -9
  11. package/dist/cjs/api/resources/agent/resources/v1/resources/settings/client/Client.d.ts +1 -2
  12. package/dist/cjs/api/resources/agent/resources/v1/resources/settings/resources/think/client/Client.d.ts +1 -2
  13. package/dist/cjs/api/resources/agent/resources/v1/resources/settings/resources/think/resources/models/client/Client.d.ts +1 -2
  14. package/dist/cjs/api/resources/auth/client/Client.d.ts +1 -2
  15. package/dist/cjs/api/resources/auth/resources/v1/client/Client.d.ts +1 -2
  16. package/dist/cjs/api/resources/auth/resources/v1/resources/tokens/client/Client.d.ts +1 -2
  17. package/dist/cjs/api/resources/listen/client/Client.d.ts +1 -2
  18. package/dist/cjs/api/resources/listen/resources/v1/client/Client.d.ts +1 -2
  19. package/dist/cjs/api/resources/listen/resources/v1/client/Client.js +29 -80
  20. package/dist/cjs/api/resources/listen/resources/v1/client/Socket.d.ts +4 -4
  21. package/dist/cjs/api/resources/listen/resources/v1/client/Socket.js +5 -5
  22. package/dist/cjs/api/resources/listen/resources/v1/resources/media/client/Client.d.ts +1 -2
  23. package/dist/cjs/api/resources/listen/resources/v1/resources/media/client/Client.js +76 -298
  24. package/dist/cjs/api/resources/listen/resources/v2/client/Client.d.ts +1 -2
  25. package/dist/cjs/api/resources/listen/resources/v2/client/Client.js +11 -26
  26. package/dist/cjs/api/resources/listen/resources/v2/client/Socket.d.ts +2 -2
  27. package/dist/cjs/api/resources/listen/resources/v2/client/Socket.js +3 -3
  28. package/dist/cjs/api/resources/manage/client/Client.d.ts +1 -2
  29. package/dist/cjs/api/resources/manage/resources/v1/client/Client.d.ts +1 -2
  30. package/dist/cjs/api/resources/manage/resources/v1/resources/models/client/Client.d.ts +1 -2
  31. package/dist/cjs/api/resources/manage/resources/v1/resources/models/client/Client.js +3 -4
  32. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/client/Client.d.ts +1 -2
  33. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/client/Client.js +4 -7
  34. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/billing/client/Client.d.ts +1 -2
  35. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/billing/resources/balances/client/Client.d.ts +1 -2
  36. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/billing/resources/breakdown/client/Client.d.ts +1 -2
  37. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/billing/resources/breakdown/client/Client.js +9 -27
  38. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/billing/resources/fields/client/Client.d.ts +1 -2
  39. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/billing/resources/fields/client/Client.js +4 -7
  40. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/billing/resources/purchases/client/Client.d.ts +1 -2
  41. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/billing/resources/purchases/client/Client.js +3 -4
  42. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/keys/client/Client.d.ts +1 -2
  43. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/keys/client/Client.js +3 -4
  44. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/members/client/Client.d.ts +1 -2
  45. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/members/resources/invites/client/Client.d.ts +1 -2
  46. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/members/resources/scopes/client/Client.d.ts +1 -2
  47. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/models/client/Client.d.ts +1 -2
  48. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/models/client/Client.js +3 -4
  49. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/requests/client/Client.d.ts +1 -2
  50. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/requests/client/Client.js +12 -31
  51. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/usage/client/Client.d.ts +1 -2
  52. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/usage/client/Client.js +46 -133
  53. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/usage/resources/breakdown/client/Client.d.ts +1 -2
  54. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/usage/resources/breakdown/client/Client.js +47 -136
  55. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/usage/resources/fields/client/Client.d.ts +1 -2
  56. package/dist/cjs/api/resources/manage/resources/v1/resources/projects/resources/usage/resources/fields/client/Client.js +4 -7
  57. package/dist/cjs/api/resources/read/client/Client.d.ts +1 -2
  58. package/dist/cjs/api/resources/read/resources/v1/client/Client.d.ts +1 -2
  59. package/dist/cjs/api/resources/read/resources/v1/resources/text/client/Client.d.ts +1 -2
  60. package/dist/cjs/api/resources/read/resources/v1/resources/text/client/Client.js +14 -52
  61. package/dist/cjs/api/resources/selfHosted/client/Client.d.ts +1 -2
  62. package/dist/cjs/api/resources/selfHosted/resources/v1/client/Client.d.ts +1 -2
  63. package/dist/cjs/api/resources/selfHosted/resources/v1/resources/distributionCredentials/client/Client.d.ts +1 -2
  64. package/dist/cjs/api/resources/selfHosted/resources/v1/resources/distributionCredentials/client/Client.js +4 -12
  65. package/dist/cjs/api/resources/speak/client/Client.d.ts +1 -2
  66. package/dist/cjs/api/resources/speak/resources/v1/client/Client.d.ts +1 -2
  67. package/dist/cjs/api/resources/speak/resources/v1/client/Client.js +6 -13
  68. package/dist/cjs/api/resources/speak/resources/v1/client/Socket.d.ts +4 -4
  69. package/dist/cjs/api/resources/speak/resources/v1/client/Socket.js +4 -4
  70. package/dist/cjs/api/resources/speak/resources/v1/resources/audio/client/Client.d.ts +1 -2
  71. package/dist/cjs/api/resources/speak/resources/v1/resources/audio/client/Client.js +11 -33
  72. package/dist/cjs/auth/HeaderAuthProvider.d.ts +14 -8
  73. package/dist/cjs/auth/HeaderAuthProvider.js +19 -9
  74. package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +2 -2
  75. package/dist/cjs/core/fetcher/Fetcher.d.ts +1 -2
  76. package/dist/cjs/core/headers.d.ts +2 -2
  77. package/dist/cjs/core/websocket/ws.d.ts +1 -1
  78. package/dist/cjs/version.d.ts +1 -1
  79. package/dist/cjs/version.js +1 -1
  80. package/dist/esm/BaseClient.d.mts +7 -7
  81. package/dist/esm/BaseClient.mjs +2 -2
  82. package/dist/esm/Client.d.mts +1 -2
  83. package/dist/esm/CustomClient.mjs +254 -250
  84. package/dist/esm/api/resources/agent/client/Client.d.mts +1 -2
  85. package/dist/esm/api/resources/agent/resources/v1/client/Client.d.mts +1 -2
  86. package/dist/esm/api/resources/agent/resources/v1/client/Socket.d.mts +8 -8
  87. package/dist/esm/api/resources/agent/resources/v1/client/Socket.mjs +9 -9
  88. package/dist/esm/api/resources/agent/resources/v1/resources/settings/client/Client.d.mts +1 -2
  89. package/dist/esm/api/resources/agent/resources/v1/resources/settings/resources/think/client/Client.d.mts +1 -2
  90. package/dist/esm/api/resources/agent/resources/v1/resources/settings/resources/think/resources/models/client/Client.d.mts +1 -2
  91. package/dist/esm/api/resources/auth/client/Client.d.mts +1 -2
  92. package/dist/esm/api/resources/auth/resources/v1/client/Client.d.mts +1 -2
  93. package/dist/esm/api/resources/auth/resources/v1/resources/tokens/client/Client.d.mts +1 -2
  94. package/dist/esm/api/resources/listen/client/Client.d.mts +1 -2
  95. package/dist/esm/api/resources/listen/resources/v1/client/Client.d.mts +1 -2
  96. package/dist/esm/api/resources/listen/resources/v1/client/Client.mjs +29 -80
  97. package/dist/esm/api/resources/listen/resources/v1/client/Socket.d.mts +4 -4
  98. package/dist/esm/api/resources/listen/resources/v1/client/Socket.mjs +5 -5
  99. package/dist/esm/api/resources/listen/resources/v1/resources/media/client/Client.d.mts +1 -2
  100. package/dist/esm/api/resources/listen/resources/v1/resources/media/client/Client.mjs +76 -298
  101. package/dist/esm/api/resources/listen/resources/v2/client/Client.d.mts +1 -2
  102. package/dist/esm/api/resources/listen/resources/v2/client/Client.mjs +11 -26
  103. package/dist/esm/api/resources/listen/resources/v2/client/Socket.d.mts +2 -2
  104. package/dist/esm/api/resources/listen/resources/v2/client/Socket.mjs +3 -3
  105. package/dist/esm/api/resources/manage/client/Client.d.mts +1 -2
  106. package/dist/esm/api/resources/manage/resources/v1/client/Client.d.mts +1 -2
  107. package/dist/esm/api/resources/manage/resources/v1/resources/models/client/Client.d.mts +1 -2
  108. package/dist/esm/api/resources/manage/resources/v1/resources/models/client/Client.mjs +3 -4
  109. package/dist/esm/api/resources/manage/resources/v1/resources/projects/client/Client.d.mts +1 -2
  110. package/dist/esm/api/resources/manage/resources/v1/resources/projects/client/Client.mjs +4 -7
  111. package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/billing/client/Client.d.mts +1 -2
  112. package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/billing/resources/balances/client/Client.d.mts +1 -2
  113. package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/billing/resources/breakdown/client/Client.d.mts +1 -2
  114. package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/billing/resources/breakdown/client/Client.mjs +9 -27
  115. package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/billing/resources/fields/client/Client.d.mts +1 -2
  116. package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/billing/resources/fields/client/Client.mjs +4 -7
  117. package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/billing/resources/purchases/client/Client.d.mts +1 -2
  118. package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/billing/resources/purchases/client/Client.mjs +3 -4
  119. package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/keys/client/Client.d.mts +1 -2
  120. package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/keys/client/Client.mjs +3 -4
  121. package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/members/client/Client.d.mts +1 -2
  122. package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/members/resources/invites/client/Client.d.mts +1 -2
  123. package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/members/resources/scopes/client/Client.d.mts +1 -2
  124. package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/models/client/Client.d.mts +1 -2
  125. package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/models/client/Client.mjs +3 -4
  126. package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/requests/client/Client.d.mts +1 -2
  127. package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/requests/client/Client.mjs +12 -31
  128. package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/usage/client/Client.d.mts +1 -2
  129. package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/usage/client/Client.mjs +46 -133
  130. package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/usage/resources/breakdown/client/Client.d.mts +1 -2
  131. package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/usage/resources/breakdown/client/Client.mjs +47 -136
  132. package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/usage/resources/fields/client/Client.d.mts +1 -2
  133. package/dist/esm/api/resources/manage/resources/v1/resources/projects/resources/usage/resources/fields/client/Client.mjs +4 -7
  134. package/dist/esm/api/resources/read/client/Client.d.mts +1 -2
  135. package/dist/esm/api/resources/read/resources/v1/client/Client.d.mts +1 -2
  136. package/dist/esm/api/resources/read/resources/v1/resources/text/client/Client.d.mts +1 -2
  137. package/dist/esm/api/resources/read/resources/v1/resources/text/client/Client.mjs +14 -52
  138. package/dist/esm/api/resources/selfHosted/client/Client.d.mts +1 -2
  139. package/dist/esm/api/resources/selfHosted/resources/v1/client/Client.d.mts +1 -2
  140. package/dist/esm/api/resources/selfHosted/resources/v1/resources/distributionCredentials/client/Client.d.mts +1 -2
  141. package/dist/esm/api/resources/selfHosted/resources/v1/resources/distributionCredentials/client/Client.mjs +4 -12
  142. package/dist/esm/api/resources/speak/client/Client.d.mts +1 -2
  143. package/dist/esm/api/resources/speak/resources/v1/client/Client.d.mts +1 -2
  144. package/dist/esm/api/resources/speak/resources/v1/client/Client.mjs +6 -13
  145. package/dist/esm/api/resources/speak/resources/v1/client/Socket.d.mts +4 -4
  146. package/dist/esm/api/resources/speak/resources/v1/client/Socket.mjs +4 -4
  147. package/dist/esm/api/resources/speak/resources/v1/resources/audio/client/Client.d.mts +1 -2
  148. package/dist/esm/api/resources/speak/resources/v1/resources/audio/client/Client.mjs +11 -33
  149. package/dist/esm/auth/HeaderAuthProvider.d.mts +14 -8
  150. package/dist/esm/auth/HeaderAuthProvider.mjs +19 -9
  151. package/dist/esm/core/fetcher/EndpointSupplier.d.mts +2 -2
  152. package/dist/esm/core/fetcher/Fetcher.d.mts +1 -2
  153. package/dist/esm/core/headers.d.mts +2 -2
  154. package/dist/esm/core/websocket/ws.d.mts +1 -1
  155. package/dist/esm/version.d.mts +1 -1
  156. package/dist/esm/version.mjs +1 -1
  157. package/package.json +10 -7
@@ -77,13 +77,10 @@ class FieldsClient {
77
77
  return __awaiter(this, arguments, void 0, function* (project_id, request = {}, requestOptions) {
78
78
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
79
79
  const { start, end } = request;
80
- const _queryParams = {};
81
- if (start != null) {
82
- _queryParams.start = start;
83
- }
84
- if (end != null) {
85
- _queryParams.end = end;
86
- }
80
+ const _queryParams = {
81
+ start,
82
+ end,
83
+ };
87
84
  const _authRequest = yield this._options.authProvider.getAuthRequest();
88
85
  const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
89
86
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../../../../../..
3
3
  import * as core from "../../../../../../../../../../../../core/index.js";
4
4
  import * as Deepgram from "../../../../../../../../../../../index.js";
5
5
  export declare namespace PurchasesClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -76,10 +76,9 @@ class PurchasesClient {
76
76
  return __awaiter(this, arguments, void 0, function* (project_id, request = {}, requestOptions) {
77
77
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
78
78
  const { limit } = request;
79
- const _queryParams = {};
80
- if (limit != null) {
81
- _queryParams.limit = limit.toString();
82
- }
79
+ const _queryParams = {
80
+ limit,
81
+ };
83
82
  const _authRequest = yield this._options.authProvider.getAuthRequest();
84
83
  const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
85
84
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../../../../../..
3
3
  import * as core from "../../../../../../../../../../core/index.js";
4
4
  import * as Deepgram from "../../../../../../../../../index.js";
5
5
  export declare namespace KeysClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -76,10 +76,9 @@ class KeysClient {
76
76
  return __awaiter(this, arguments, void 0, function* (project_id, request = {}, requestOptions) {
77
77
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
78
78
  const { status } = request;
79
- const _queryParams = {};
80
- if (status != null) {
81
- _queryParams.status = status;
82
- }
79
+ const _queryParams = {
80
+ status: status != null ? status : undefined,
81
+ };
83
82
  const _authRequest = yield this._options.authProvider.getAuthRequest();
84
83
  const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
85
84
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
@@ -5,8 +5,7 @@ import * as Deepgram from "../../../../../../../../../index.js";
5
5
  import { InvitesClient } from "../resources/invites/client/Client.js";
6
6
  import { ScopesClient } from "../resources/scopes/client/Client.js";
7
7
  export declare namespace MembersClient {
8
- interface Options extends BaseClientOptions {
9
- }
8
+ type Options = BaseClientOptions;
10
9
  interface RequestOptions extends BaseRequestOptions {
11
10
  }
12
11
  }
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../../../../../..
3
3
  import * as core from "../../../../../../../../../../../../core/index.js";
4
4
  import * as Deepgram from "../../../../../../../../../../../index.js";
5
5
  export declare namespace InvitesClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../../../../../..
3
3
  import * as core from "../../../../../../../../../../../../core/index.js";
4
4
  import * as Deepgram from "../../../../../../../../../../../index.js";
5
5
  export declare namespace ScopesClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../../../../../..
3
3
  import * as core from "../../../../../../../../../../core/index.js";
4
4
  import * as Deepgram from "../../../../../../../../../index.js";
5
5
  export declare namespace ModelsClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -76,10 +76,9 @@ class ModelsClient {
76
76
  return __awaiter(this, arguments, void 0, function* (project_id, request = {}, requestOptions) {
77
77
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
78
78
  const { include_outdated: includeOutdated } = request;
79
- const _queryParams = {};
80
- if (includeOutdated != null) {
81
- _queryParams.include_outdated = includeOutdated.toString();
82
- }
79
+ const _queryParams = {
80
+ include_outdated: includeOutdated,
81
+ };
83
82
  const _authRequest = yield this._options.authProvider.getAuthRequest();
84
83
  const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
85
84
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../../../../../..
3
3
  import * as core from "../../../../../../../../../../core/index.js";
4
4
  import * as Deepgram from "../../../../../../../../../index.js";
5
5
  export declare namespace RequestsClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -85,37 +85,18 @@ class RequestsClient {
85
85
  return __awaiter(this, arguments, void 0, function* (project_id, request = {}, requestOptions) {
86
86
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
87
87
  const { start, end, limit, page, accessor, request_id: requestId, deployment, endpoint, method, status, } = request;
88
- const _queryParams = {};
89
- if (start != null) {
90
- _queryParams.start = start;
91
- }
92
- if (end != null) {
93
- _queryParams.end = end;
94
- }
95
- if (limit != null) {
96
- _queryParams.limit = limit.toString();
97
- }
98
- if (page != null) {
99
- _queryParams.page = page.toString();
100
- }
101
- if (accessor != null) {
102
- _queryParams.accessor = accessor;
103
- }
104
- if (requestId != null) {
105
- _queryParams.request_id = requestId;
106
- }
107
- if (deployment != null) {
108
- _queryParams.deployment = deployment;
109
- }
110
- if (endpoint != null) {
111
- _queryParams.endpoint = endpoint;
112
- }
113
- if (method != null) {
114
- _queryParams.method = method;
115
- }
116
- if (status != null) {
117
- _queryParams.status = status;
118
- }
88
+ const _queryParams = {
89
+ start,
90
+ end,
91
+ limit,
92
+ page,
93
+ accessor,
94
+ request_id: requestId,
95
+ deployment: deployment != null ? deployment : undefined,
96
+ endpoint: endpoint != null ? endpoint : undefined,
97
+ method: method != null ? method : undefined,
98
+ status: status != null ? status : undefined,
99
+ };
119
100
  const _authRequest = yield this._options.authProvider.getAuthRequest();
120
101
  const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
121
102
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
@@ -5,8 +5,7 @@ import * as Deepgram from "../../../../../../../../../index.js";
5
5
  import { BreakdownClient } from "../resources/breakdown/client/Client.js";
6
6
  import { FieldsClient } from "../resources/fields/client/Client.js";
7
7
  export declare namespace UsageClient {
8
- interface Options extends BaseClientOptions {
9
- }
8
+ type Options = BaseClientOptions;
10
9
  interface RequestOptions extends BaseRequestOptions {
11
10
  }
12
11
  }
@@ -129,139 +129,52 @@ class UsageClient {
129
129
  return __awaiter(this, arguments, void 0, function* (project_id, request = {}, requestOptions) {
130
130
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
131
131
  const { start, end, accessor, alternatives, callback_method: callbackMethod, callback, channels, custom_intent_mode: customIntentMode, custom_intent: customIntent, custom_topic_mode: customTopicMode, custom_topic: customTopic, deployment, detect_entities: detectEntities, detect_language: detectLanguage, diarize, dictation, encoding, endpoint, extra, filler_words: fillerWords, intents, keyterm, keywords, language, measurements, method, model, multichannel, numerals, paragraphs, profanity_filter: profanityFilter, punctuate, redact, replace, sample_rate: sampleRate, search, sentiment, smart_format: smartFormat, summarize, tag, topics, utt_split: uttSplit, utterances, version, } = request;
132
- const _queryParams = {};
133
- if (start != null) {
134
- _queryParams.start = start;
135
- }
136
- if (end != null) {
137
- _queryParams.end = end;
138
- }
139
- if (accessor != null) {
140
- _queryParams.accessor = accessor;
141
- }
142
- if (alternatives != null) {
143
- _queryParams.alternatives = alternatives.toString();
144
- }
145
- if (callbackMethod != null) {
146
- _queryParams.callback_method = callbackMethod.toString();
147
- }
148
- if (callback != null) {
149
- _queryParams.callback = callback.toString();
150
- }
151
- if (channels != null) {
152
- _queryParams.channels = channels.toString();
153
- }
154
- if (customIntentMode != null) {
155
- _queryParams.custom_intent_mode = customIntentMode.toString();
156
- }
157
- if (customIntent != null) {
158
- _queryParams.custom_intent = customIntent.toString();
159
- }
160
- if (customTopicMode != null) {
161
- _queryParams.custom_topic_mode = customTopicMode.toString();
162
- }
163
- if (customTopic != null) {
164
- _queryParams.custom_topic = customTopic.toString();
165
- }
166
- if (deployment != null) {
167
- _queryParams.deployment = deployment;
168
- }
169
- if (detectEntities != null) {
170
- _queryParams.detect_entities = detectEntities.toString();
171
- }
172
- if (detectLanguage != null) {
173
- _queryParams.detect_language = detectLanguage.toString();
174
- }
175
- if (diarize != null) {
176
- _queryParams.diarize = diarize.toString();
177
- }
178
- if (dictation != null) {
179
- _queryParams.dictation = dictation.toString();
180
- }
181
- if (encoding != null) {
182
- _queryParams.encoding = encoding.toString();
183
- }
184
- if (endpoint != null) {
185
- _queryParams.endpoint = endpoint;
186
- }
187
- if (extra != null) {
188
- _queryParams.extra = extra.toString();
189
- }
190
- if (fillerWords != null) {
191
- _queryParams.filler_words = fillerWords.toString();
192
- }
193
- if (intents != null) {
194
- _queryParams.intents = intents.toString();
195
- }
196
- if (keyterm != null) {
197
- _queryParams.keyterm = keyterm.toString();
198
- }
199
- if (keywords != null) {
200
- _queryParams.keywords = keywords.toString();
201
- }
202
- if (language != null) {
203
- _queryParams.language = language.toString();
204
- }
205
- if (measurements != null) {
206
- _queryParams.measurements = measurements.toString();
207
- }
208
- if (method != null) {
209
- _queryParams.method = method;
210
- }
211
- if (model != null) {
212
- _queryParams.model = model;
213
- }
214
- if (multichannel != null) {
215
- _queryParams.multichannel = multichannel.toString();
216
- }
217
- if (numerals != null) {
218
- _queryParams.numerals = numerals.toString();
219
- }
220
- if (paragraphs != null) {
221
- _queryParams.paragraphs = paragraphs.toString();
222
- }
223
- if (profanityFilter != null) {
224
- _queryParams.profanity_filter = profanityFilter.toString();
225
- }
226
- if (punctuate != null) {
227
- _queryParams.punctuate = punctuate.toString();
228
- }
229
- if (redact != null) {
230
- _queryParams.redact = redact.toString();
231
- }
232
- if (replace != null) {
233
- _queryParams.replace = replace.toString();
234
- }
235
- if (sampleRate != null) {
236
- _queryParams.sample_rate = sampleRate.toString();
237
- }
238
- if (search != null) {
239
- _queryParams.search = search.toString();
240
- }
241
- if (sentiment != null) {
242
- _queryParams.sentiment = sentiment.toString();
243
- }
244
- if (smartFormat != null) {
245
- _queryParams.smart_format = smartFormat.toString();
246
- }
247
- if (summarize != null) {
248
- _queryParams.summarize = summarize.toString();
249
- }
250
- if (tag != null) {
251
- _queryParams.tag = tag;
252
- }
253
- if (topics != null) {
254
- _queryParams.topics = topics.toString();
255
- }
256
- if (uttSplit != null) {
257
- _queryParams.utt_split = uttSplit.toString();
258
- }
259
- if (utterances != null) {
260
- _queryParams.utterances = utterances.toString();
261
- }
262
- if (version != null) {
263
- _queryParams.version = version.toString();
264
- }
132
+ const _queryParams = {
133
+ start,
134
+ end,
135
+ accessor,
136
+ alternatives,
137
+ callback_method: callbackMethod,
138
+ callback,
139
+ channels,
140
+ custom_intent_mode: customIntentMode,
141
+ custom_intent: customIntent,
142
+ custom_topic_mode: customTopicMode,
143
+ custom_topic: customTopic,
144
+ deployment: deployment != null ? deployment : undefined,
145
+ detect_entities: detectEntities,
146
+ detect_language: detectLanguage,
147
+ diarize,
148
+ dictation,
149
+ encoding,
150
+ endpoint: endpoint != null ? endpoint : undefined,
151
+ extra,
152
+ filler_words: fillerWords,
153
+ intents,
154
+ keyterm,
155
+ keywords,
156
+ language,
157
+ measurements,
158
+ method: method != null ? method : undefined,
159
+ model,
160
+ multichannel,
161
+ numerals,
162
+ paragraphs,
163
+ profanity_filter: profanityFilter,
164
+ punctuate,
165
+ redact,
166
+ replace,
167
+ sample_rate: sampleRate,
168
+ search,
169
+ sentiment,
170
+ smart_format: smartFormat,
171
+ summarize,
172
+ tag,
173
+ topics,
174
+ utt_split: uttSplit,
175
+ utterances,
176
+ version,
177
+ };
265
178
  const _authRequest = yield this._options.authProvider.getAuthRequest();
266
179
  const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
267
180
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../../../../../..
3
3
  import * as core from "../../../../../../../../../../../../core/index.js";
4
4
  import * as Deepgram from "../../../../../../../../../../../index.js";
5
5
  export declare namespace BreakdownClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -120,142 +120,53 @@ class BreakdownClient {
120
120
  return __awaiter(this, arguments, void 0, function* (project_id, request = {}, requestOptions) {
121
121
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
122
122
  const { start, end, grouping, accessor, alternatives, callback_method: callbackMethod, callback, channels, custom_intent_mode: customIntentMode, custom_intent: customIntent, custom_topic_mode: customTopicMode, custom_topic: customTopic, deployment, detect_entities: detectEntities, detect_language: detectLanguage, diarize, dictation, encoding, endpoint, extra, filler_words: fillerWords, intents, keyterm, keywords, language, measurements, method, model, multichannel, numerals, paragraphs, profanity_filter: profanityFilter, punctuate, redact, replace, sample_rate: sampleRate, search, sentiment, smart_format: smartFormat, summarize, tag, topics, utt_split: uttSplit, utterances, version, } = request;
123
- const _queryParams = {};
124
- if (start != null) {
125
- _queryParams.start = start;
126
- }
127
- if (end != null) {
128
- _queryParams.end = end;
129
- }
130
- if (grouping != null) {
131
- _queryParams.grouping = grouping;
132
- }
133
- if (accessor != null) {
134
- _queryParams.accessor = accessor;
135
- }
136
- if (alternatives != null) {
137
- _queryParams.alternatives = alternatives.toString();
138
- }
139
- if (callbackMethod != null) {
140
- _queryParams.callback_method = callbackMethod.toString();
141
- }
142
- if (callback != null) {
143
- _queryParams.callback = callback.toString();
144
- }
145
- if (channels != null) {
146
- _queryParams.channels = channels.toString();
147
- }
148
- if (customIntentMode != null) {
149
- _queryParams.custom_intent_mode = customIntentMode.toString();
150
- }
151
- if (customIntent != null) {
152
- _queryParams.custom_intent = customIntent.toString();
153
- }
154
- if (customTopicMode != null) {
155
- _queryParams.custom_topic_mode = customTopicMode.toString();
156
- }
157
- if (customTopic != null) {
158
- _queryParams.custom_topic = customTopic.toString();
159
- }
160
- if (deployment != null) {
161
- _queryParams.deployment = deployment;
162
- }
163
- if (detectEntities != null) {
164
- _queryParams.detect_entities = detectEntities.toString();
165
- }
166
- if (detectLanguage != null) {
167
- _queryParams.detect_language = detectLanguage.toString();
168
- }
169
- if (diarize != null) {
170
- _queryParams.diarize = diarize.toString();
171
- }
172
- if (dictation != null) {
173
- _queryParams.dictation = dictation.toString();
174
- }
175
- if (encoding != null) {
176
- _queryParams.encoding = encoding.toString();
177
- }
178
- if (endpoint != null) {
179
- _queryParams.endpoint = endpoint;
180
- }
181
- if (extra != null) {
182
- _queryParams.extra = extra.toString();
183
- }
184
- if (fillerWords != null) {
185
- _queryParams.filler_words = fillerWords.toString();
186
- }
187
- if (intents != null) {
188
- _queryParams.intents = intents.toString();
189
- }
190
- if (keyterm != null) {
191
- _queryParams.keyterm = keyterm.toString();
192
- }
193
- if (keywords != null) {
194
- _queryParams.keywords = keywords.toString();
195
- }
196
- if (language != null) {
197
- _queryParams.language = language.toString();
198
- }
199
- if (measurements != null) {
200
- _queryParams.measurements = measurements.toString();
201
- }
202
- if (method != null) {
203
- _queryParams.method = method;
204
- }
205
- if (model != null) {
206
- _queryParams.model = model;
207
- }
208
- if (multichannel != null) {
209
- _queryParams.multichannel = multichannel.toString();
210
- }
211
- if (numerals != null) {
212
- _queryParams.numerals = numerals.toString();
213
- }
214
- if (paragraphs != null) {
215
- _queryParams.paragraphs = paragraphs.toString();
216
- }
217
- if (profanityFilter != null) {
218
- _queryParams.profanity_filter = profanityFilter.toString();
219
- }
220
- if (punctuate != null) {
221
- _queryParams.punctuate = punctuate.toString();
222
- }
223
- if (redact != null) {
224
- _queryParams.redact = redact.toString();
225
- }
226
- if (replace != null) {
227
- _queryParams.replace = replace.toString();
228
- }
229
- if (sampleRate != null) {
230
- _queryParams.sample_rate = sampleRate.toString();
231
- }
232
- if (search != null) {
233
- _queryParams.search = search.toString();
234
- }
235
- if (sentiment != null) {
236
- _queryParams.sentiment = sentiment.toString();
237
- }
238
- if (smartFormat != null) {
239
- _queryParams.smart_format = smartFormat.toString();
240
- }
241
- if (summarize != null) {
242
- _queryParams.summarize = summarize.toString();
243
- }
244
- if (tag != null) {
245
- _queryParams.tag = tag;
246
- }
247
- if (topics != null) {
248
- _queryParams.topics = topics.toString();
249
- }
250
- if (uttSplit != null) {
251
- _queryParams.utt_split = uttSplit.toString();
252
- }
253
- if (utterances != null) {
254
- _queryParams.utterances = utterances.toString();
255
- }
256
- if (version != null) {
257
- _queryParams.version = version.toString();
258
- }
123
+ const _queryParams = {
124
+ start,
125
+ end,
126
+ grouping: grouping != null ? grouping : undefined,
127
+ accessor,
128
+ alternatives,
129
+ callback_method: callbackMethod,
130
+ callback,
131
+ channels,
132
+ custom_intent_mode: customIntentMode,
133
+ custom_intent: customIntent,
134
+ custom_topic_mode: customTopicMode,
135
+ custom_topic: customTopic,
136
+ deployment: deployment != null ? deployment : undefined,
137
+ detect_entities: detectEntities,
138
+ detect_language: detectLanguage,
139
+ diarize,
140
+ dictation,
141
+ encoding,
142
+ endpoint: endpoint != null ? endpoint : undefined,
143
+ extra,
144
+ filler_words: fillerWords,
145
+ intents,
146
+ keyterm,
147
+ keywords,
148
+ language,
149
+ measurements,
150
+ method: method != null ? method : undefined,
151
+ model,
152
+ multichannel,
153
+ numerals,
154
+ paragraphs,
155
+ profanity_filter: profanityFilter,
156
+ punctuate,
157
+ redact,
158
+ replace,
159
+ sample_rate: sampleRate,
160
+ search,
161
+ sentiment,
162
+ smart_format: smartFormat,
163
+ summarize,
164
+ tag,
165
+ topics,
166
+ utt_split: uttSplit,
167
+ utterances,
168
+ version,
169
+ };
259
170
  const _authRequest = yield this._options.authProvider.getAuthRequest();
260
171
  const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
261
172
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
@@ -3,8 +3,7 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../../../../../..
3
3
  import * as core from "../../../../../../../../../../../../core/index.js";
4
4
  import * as Deepgram from "../../../../../../../../../../../index.js";
5
5
  export declare namespace FieldsClient {
6
- interface Options extends BaseClientOptions {
7
- }
6
+ type Options = BaseClientOptions;
8
7
  interface RequestOptions extends BaseRequestOptions {
9
8
  }
10
9
  }
@@ -77,13 +77,10 @@ class FieldsClient {
77
77
  return __awaiter(this, arguments, void 0, function* (project_id, request = {}, requestOptions) {
78
78
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
79
79
  const { start, end } = request;
80
- const _queryParams = {};
81
- if (start != null) {
82
- _queryParams.start = start;
83
- }
84
- if (end != null) {
85
- _queryParams.end = end;
86
- }
80
+ const _queryParams = {
81
+ start,
82
+ end,
83
+ };
87
84
  const _authRequest = yield this._options.authProvider.getAuthRequest();
88
85
  const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
89
86
  const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
@@ -2,8 +2,7 @@ import type { BaseClientOptions } from "../../../../BaseClient.js";
2
2
  import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
3
3
  import { V1Client } from "../resources/v1/client/Client.js";
4
4
  export declare namespace ReadClient {
5
- interface Options extends BaseClientOptions {
6
- }
5
+ type Options = BaseClientOptions;
7
6
  }
8
7
  export declare class ReadClient {
9
8
  protected readonly _options: NormalizedClientOptionsWithAuth<ReadClient.Options>;