@sync.so/sdk 0.1.6

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 (269) hide show
  1. package/Client.d.ts +31 -0
  2. package/Client.js +17 -0
  3. package/README.md +183 -0
  4. package/api/index.d.ts +1 -0
  5. package/api/index.js +17 -0
  6. package/api/resources/common/errors/BadRequestError.d.ts +9 -0
  7. package/api/resources/common/errors/BadRequestError.js +52 -0
  8. package/api/resources/common/errors/InternalServerError.d.ts +9 -0
  9. package/api/resources/common/errors/InternalServerError.js +52 -0
  10. package/api/resources/common/errors/NotFoundError.d.ts +9 -0
  11. package/api/resources/common/errors/NotFoundError.js +52 -0
  12. package/api/resources/common/errors/UnauthorizedError.d.ts +9 -0
  13. package/api/resources/common/errors/UnauthorizedError.js +52 -0
  14. package/api/resources/common/errors/index.d.ts +4 -0
  15. package/api/resources/common/errors/index.js +20 -0
  16. package/api/resources/common/index.d.ts +2 -0
  17. package/api/resources/common/index.js +18 -0
  18. package/api/resources/common/types/Audio.d.ts +11 -0
  19. package/api/resources/common/types/Audio.js +5 -0
  20. package/api/resources/common/types/CreateGenerationDto.d.ts +14 -0
  21. package/api/resources/common/types/CreateGenerationDto.js +5 -0
  22. package/api/resources/common/types/ElevenLabs.d.ts +10 -0
  23. package/api/resources/common/types/ElevenLabs.js +5 -0
  24. package/api/resources/common/types/EstimatedGenerationCost.d.ts +9 -0
  25. package/api/resources/common/types/EstimatedGenerationCost.js +5 -0
  26. package/api/resources/common/types/Generation.d.ts +25 -0
  27. package/api/resources/common/types/Generation.js +5 -0
  28. package/api/resources/common/types/GenerationError.d.ts +12 -0
  29. package/api/resources/common/types/GenerationError.js +5 -0
  30. package/api/resources/common/types/GenerationErrorMessage.d.ts +7 -0
  31. package/api/resources/common/types/GenerationErrorMessage.js +5 -0
  32. package/api/resources/common/types/GenerationId.d.ts +7 -0
  33. package/api/resources/common/types/GenerationId.js +5 -0
  34. package/api/resources/common/types/GenerationOptions.d.ts +22 -0
  35. package/api/resources/common/types/GenerationOptions.js +5 -0
  36. package/api/resources/common/types/GenerationStatus.d.ts +13 -0
  37. package/api/resources/common/types/GenerationStatus.js +12 -0
  38. package/api/resources/common/types/Input.d.ts +8 -0
  39. package/api/resources/common/types/Input.js +5 -0
  40. package/api/resources/common/types/Model.d.ts +14 -0
  41. package/api/resources/common/types/Model.js +13 -0
  42. package/api/resources/common/types/SegmentFrames.d.ts +7 -0
  43. package/api/resources/common/types/SegmentFrames.js +5 -0
  44. package/api/resources/common/types/SegmentSecs.d.ts +7 -0
  45. package/api/resources/common/types/SegmentSecs.js +5 -0
  46. package/api/resources/common/types/SyncMode.d.ts +11 -0
  47. package/api/resources/common/types/SyncMode.js +13 -0
  48. package/api/resources/common/types/Tts.d.ts +12 -0
  49. package/api/resources/common/types/Tts.js +5 -0
  50. package/api/resources/common/types/TtsProviderConfig.d.ts +5 -0
  51. package/api/resources/common/types/TtsProviderConfig.js +5 -0
  52. package/api/resources/common/types/Video.d.ts +13 -0
  53. package/api/resources/common/types/Video.js +5 -0
  54. package/api/resources/common/types/index.d.ts +18 -0
  55. package/api/resources/common/types/index.js +34 -0
  56. package/api/resources/generate/client/Client.d.ts +106 -0
  57. package/api/resources/generate/client/Client.js +346 -0
  58. package/api/resources/generate/client/index.d.ts +1 -0
  59. package/api/resources/generate/client/index.js +17 -0
  60. package/api/resources/generate/client/requests/LipsyncListGenerationsRequest.d.ts +14 -0
  61. package/api/resources/generate/client/requests/LipsyncListGenerationsRequest.js +5 -0
  62. package/api/resources/generate/client/requests/index.d.ts +1 -0
  63. package/api/resources/generate/client/requests/index.js +2 -0
  64. package/api/resources/generate/index.d.ts +1 -0
  65. package/api/resources/generate/index.js +17 -0
  66. package/api/resources/index.d.ts +7 -0
  67. package/api/resources/index.js +46 -0
  68. package/api/resources/webhooks/index.d.ts +1 -0
  69. package/api/resources/webhooks/index.js +17 -0
  70. package/api/resources/webhooks/types/GenerationNotification.d.ts +24 -0
  71. package/api/resources/webhooks/types/GenerationNotification.js +5 -0
  72. package/api/resources/webhooks/types/WebhookStatus.d.ts +11 -0
  73. package/api/resources/webhooks/types/WebhookStatus.js +10 -0
  74. package/api/resources/webhooks/types/index.d.ts +2 -0
  75. package/api/resources/webhooks/types/index.js +18 -0
  76. package/core/fetcher/APIResponse.d.ts +20 -0
  77. package/core/fetcher/APIResponse.js +2 -0
  78. package/core/fetcher/Fetcher.d.ts +39 -0
  79. package/core/fetcher/Fetcher.js +107 -0
  80. package/core/fetcher/Headers.d.ts +2 -0
  81. package/core/fetcher/Headers.js +84 -0
  82. package/core/fetcher/HttpResponsePromise.d.ts +58 -0
  83. package/core/fetcher/HttpResponsePromise.js +103 -0
  84. package/core/fetcher/RawResponse.d.ts +29 -0
  85. package/core/fetcher/RawResponse.js +44 -0
  86. package/core/fetcher/Supplier.d.ts +4 -0
  87. package/core/fetcher/Supplier.js +22 -0
  88. package/core/fetcher/createRequestUrl.d.ts +1 -0
  89. package/core/fetcher/createRequestUrl.js +12 -0
  90. package/core/fetcher/getFetchFn.d.ts +4 -0
  91. package/core/fetcher/getFetchFn.js +68 -0
  92. package/core/fetcher/getHeader.d.ts +1 -0
  93. package/core/fetcher/getHeader.js +11 -0
  94. package/core/fetcher/getRequestBody.d.ts +7 -0
  95. package/core/fetcher/getRequestBody.js +23 -0
  96. package/core/fetcher/getResponseBody.d.ts +1 -0
  97. package/core/fetcher/getResponseBody.js +54 -0
  98. package/core/fetcher/index.d.ts +8 -0
  99. package/core/fetcher/index.js +15 -0
  100. package/core/fetcher/makeRequest.d.ts +1 -0
  101. package/core/fetcher/makeRequest.js +42 -0
  102. package/core/fetcher/requestWithRetries.d.ts +1 -0
  103. package/core/fetcher/requestWithRetries.js +40 -0
  104. package/core/fetcher/signals.d.ts +11 -0
  105. package/core/fetcher/signals.js +36 -0
  106. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
  107. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
  108. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +21 -0
  109. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +126 -0
  110. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
  111. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
  112. package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
  113. package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +59 -0
  114. package/core/index.d.ts +2 -0
  115. package/core/index.js +18 -0
  116. package/core/json.d.ts +15 -0
  117. package/core/json.js +24 -0
  118. package/core/runtime/index.d.ts +1 -0
  119. package/core/runtime/index.js +5 -0
  120. package/core/runtime/runtime.d.ts +9 -0
  121. package/core/runtime/runtime.js +103 -0
  122. package/dist/Client.d.ts +31 -0
  123. package/dist/Client.js +17 -0
  124. package/dist/api/index.d.ts +1 -0
  125. package/dist/api/index.js +17 -0
  126. package/dist/api/resources/common/errors/BadRequestError.d.ts +9 -0
  127. package/dist/api/resources/common/errors/BadRequestError.js +52 -0
  128. package/dist/api/resources/common/errors/InternalServerError.d.ts +9 -0
  129. package/dist/api/resources/common/errors/InternalServerError.js +52 -0
  130. package/dist/api/resources/common/errors/NotFoundError.d.ts +9 -0
  131. package/dist/api/resources/common/errors/NotFoundError.js +52 -0
  132. package/dist/api/resources/common/errors/UnauthorizedError.d.ts +9 -0
  133. package/dist/api/resources/common/errors/UnauthorizedError.js +52 -0
  134. package/dist/api/resources/common/errors/index.d.ts +4 -0
  135. package/dist/api/resources/common/errors/index.js +20 -0
  136. package/dist/api/resources/common/index.d.ts +2 -0
  137. package/dist/api/resources/common/index.js +18 -0
  138. package/dist/api/resources/common/types/Audio.d.ts +11 -0
  139. package/dist/api/resources/common/types/Audio.js +5 -0
  140. package/dist/api/resources/common/types/CreateGenerationDto.d.ts +14 -0
  141. package/dist/api/resources/common/types/CreateGenerationDto.js +5 -0
  142. package/dist/api/resources/common/types/ElevenLabs.d.ts +10 -0
  143. package/dist/api/resources/common/types/ElevenLabs.js +5 -0
  144. package/dist/api/resources/common/types/EstimatedGenerationCost.d.ts +9 -0
  145. package/dist/api/resources/common/types/EstimatedGenerationCost.js +5 -0
  146. package/dist/api/resources/common/types/Generation.d.ts +25 -0
  147. package/dist/api/resources/common/types/Generation.js +5 -0
  148. package/dist/api/resources/common/types/GenerationError.d.ts +12 -0
  149. package/dist/api/resources/common/types/GenerationError.js +5 -0
  150. package/dist/api/resources/common/types/GenerationErrorMessage.d.ts +7 -0
  151. package/dist/api/resources/common/types/GenerationErrorMessage.js +5 -0
  152. package/dist/api/resources/common/types/GenerationId.d.ts +7 -0
  153. package/dist/api/resources/common/types/GenerationId.js +5 -0
  154. package/dist/api/resources/common/types/GenerationOptions.d.ts +22 -0
  155. package/dist/api/resources/common/types/GenerationOptions.js +5 -0
  156. package/dist/api/resources/common/types/GenerationStatus.d.ts +13 -0
  157. package/dist/api/resources/common/types/GenerationStatus.js +12 -0
  158. package/dist/api/resources/common/types/Input.d.ts +8 -0
  159. package/dist/api/resources/common/types/Input.js +5 -0
  160. package/dist/api/resources/common/types/Model.d.ts +14 -0
  161. package/dist/api/resources/common/types/Model.js +13 -0
  162. package/dist/api/resources/common/types/SegmentFrames.d.ts +7 -0
  163. package/dist/api/resources/common/types/SegmentFrames.js +5 -0
  164. package/dist/api/resources/common/types/SegmentSecs.d.ts +7 -0
  165. package/dist/api/resources/common/types/SegmentSecs.js +5 -0
  166. package/dist/api/resources/common/types/SyncMode.d.ts +11 -0
  167. package/dist/api/resources/common/types/SyncMode.js +13 -0
  168. package/dist/api/resources/common/types/Tts.d.ts +12 -0
  169. package/dist/api/resources/common/types/Tts.js +5 -0
  170. package/dist/api/resources/common/types/TtsProviderConfig.d.ts +5 -0
  171. package/dist/api/resources/common/types/TtsProviderConfig.js +5 -0
  172. package/dist/api/resources/common/types/Video.d.ts +13 -0
  173. package/dist/api/resources/common/types/Video.js +5 -0
  174. package/dist/api/resources/common/types/index.d.ts +18 -0
  175. package/dist/api/resources/common/types/index.js +34 -0
  176. package/dist/api/resources/generate/client/Client.d.ts +106 -0
  177. package/dist/api/resources/generate/client/Client.js +346 -0
  178. package/dist/api/resources/generate/client/index.d.ts +1 -0
  179. package/dist/api/resources/generate/client/index.js +17 -0
  180. package/dist/api/resources/generate/client/requests/LipsyncListGenerationsRequest.d.ts +14 -0
  181. package/dist/api/resources/generate/client/requests/LipsyncListGenerationsRequest.js +5 -0
  182. package/dist/api/resources/generate/client/requests/index.d.ts +1 -0
  183. package/dist/api/resources/generate/client/requests/index.js +2 -0
  184. package/dist/api/resources/generate/index.d.ts +1 -0
  185. package/dist/api/resources/generate/index.js +17 -0
  186. package/dist/api/resources/index.d.ts +7 -0
  187. package/dist/api/resources/index.js +46 -0
  188. package/dist/api/resources/webhooks/index.d.ts +1 -0
  189. package/dist/api/resources/webhooks/index.js +17 -0
  190. package/dist/api/resources/webhooks/types/GenerationNotification.d.ts +24 -0
  191. package/dist/api/resources/webhooks/types/GenerationNotification.js +5 -0
  192. package/dist/api/resources/webhooks/types/WebhookStatus.d.ts +11 -0
  193. package/dist/api/resources/webhooks/types/WebhookStatus.js +10 -0
  194. package/dist/api/resources/webhooks/types/index.d.ts +2 -0
  195. package/dist/api/resources/webhooks/types/index.js +18 -0
  196. package/dist/core/fetcher/APIResponse.d.ts +20 -0
  197. package/dist/core/fetcher/APIResponse.js +2 -0
  198. package/dist/core/fetcher/Fetcher.d.ts +39 -0
  199. package/dist/core/fetcher/Fetcher.js +107 -0
  200. package/dist/core/fetcher/Headers.d.ts +2 -0
  201. package/dist/core/fetcher/Headers.js +84 -0
  202. package/dist/core/fetcher/HttpResponsePromise.d.ts +58 -0
  203. package/dist/core/fetcher/HttpResponsePromise.js +103 -0
  204. package/dist/core/fetcher/RawResponse.d.ts +29 -0
  205. package/dist/core/fetcher/RawResponse.js +44 -0
  206. package/dist/core/fetcher/Supplier.d.ts +4 -0
  207. package/dist/core/fetcher/Supplier.js +22 -0
  208. package/dist/core/fetcher/createRequestUrl.d.ts +1 -0
  209. package/dist/core/fetcher/createRequestUrl.js +12 -0
  210. package/dist/core/fetcher/getFetchFn.d.ts +4 -0
  211. package/dist/core/fetcher/getFetchFn.js +68 -0
  212. package/dist/core/fetcher/getHeader.d.ts +1 -0
  213. package/dist/core/fetcher/getHeader.js +11 -0
  214. package/dist/core/fetcher/getRequestBody.d.ts +7 -0
  215. package/dist/core/fetcher/getRequestBody.js +23 -0
  216. package/dist/core/fetcher/getResponseBody.d.ts +1 -0
  217. package/dist/core/fetcher/getResponseBody.js +54 -0
  218. package/dist/core/fetcher/index.d.ts +8 -0
  219. package/dist/core/fetcher/index.js +15 -0
  220. package/dist/core/fetcher/makeRequest.d.ts +1 -0
  221. package/dist/core/fetcher/makeRequest.js +42 -0
  222. package/dist/core/fetcher/requestWithRetries.d.ts +1 -0
  223. package/dist/core/fetcher/requestWithRetries.js +40 -0
  224. package/dist/core/fetcher/signals.d.ts +11 -0
  225. package/dist/core/fetcher/signals.js +36 -0
  226. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +30 -0
  227. package/dist/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +247 -0
  228. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +21 -0
  229. package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +126 -0
  230. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +31 -0
  231. package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +229 -0
  232. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +18 -0
  233. package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +59 -0
  234. package/dist/core/index.d.ts +2 -0
  235. package/dist/core/index.js +18 -0
  236. package/dist/core/json.d.ts +15 -0
  237. package/dist/core/json.js +24 -0
  238. package/dist/core/runtime/index.d.ts +1 -0
  239. package/dist/core/runtime/index.js +5 -0
  240. package/dist/core/runtime/runtime.d.ts +9 -0
  241. package/dist/core/runtime/runtime.js +103 -0
  242. package/dist/environments.d.ts +7 -0
  243. package/dist/environments.js +9 -0
  244. package/dist/errors/SyncError.d.ts +15 -0
  245. package/dist/errors/SyncError.js +30 -0
  246. package/dist/errors/SyncTimeoutError.d.ts +6 -0
  247. package/dist/errors/SyncTimeoutError.js +13 -0
  248. package/dist/errors/index.d.ts +2 -0
  249. package/dist/errors/index.js +7 -0
  250. package/dist/index.d.ts +4 -0
  251. package/dist/index.js +44 -0
  252. package/dist/version.d.ts +1 -0
  253. package/dist/version.js +4 -0
  254. package/environments.d.ts +7 -0
  255. package/environments.js +9 -0
  256. package/errors/SyncError.d.ts +15 -0
  257. package/errors/SyncError.js +30 -0
  258. package/errors/SyncTimeoutError.d.ts +6 -0
  259. package/errors/SyncTimeoutError.js +13 -0
  260. package/errors/index.d.ts +2 -0
  261. package/errors/index.js +7 -0
  262. package/index.d.ts +4 -0
  263. package/index.js +44 -0
  264. package/jest.config.mjs +8 -0
  265. package/package.json +43 -0
  266. package/reference.md +225 -0
  267. package/scripts/rename-to-esm-files.js +115 -0
  268. package/version.d.ts +1 -0
  269. package/version.js +4 -0
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.InternalServerError = void 0;
40
+ const errors = __importStar(require("../../../../errors/index"));
41
+ class InternalServerError extends errors.SyncError {
42
+ constructor(body, rawResponse) {
43
+ super({
44
+ message: "InternalServerError",
45
+ statusCode: 500,
46
+ body: body,
47
+ rawResponse: rawResponse,
48
+ });
49
+ Object.setPrototypeOf(this, InternalServerError.prototype);
50
+ }
51
+ }
52
+ exports.InternalServerError = InternalServerError;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as errors from "../../../../errors/index";
5
+ import * as Sync from "../../../index";
6
+ import * as core from "../../../../core";
7
+ export declare class NotFoundError extends errors.SyncError {
8
+ constructor(body: Sync.GenerationError, rawResponse?: core.RawResponse);
9
+ }
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.NotFoundError = void 0;
40
+ const errors = __importStar(require("../../../../errors/index"));
41
+ class NotFoundError extends errors.SyncError {
42
+ constructor(body, rawResponse) {
43
+ super({
44
+ message: "NotFoundError",
45
+ statusCode: 404,
46
+ body: body,
47
+ rawResponse: rawResponse,
48
+ });
49
+ Object.setPrototypeOf(this, NotFoundError.prototype);
50
+ }
51
+ }
52
+ exports.NotFoundError = NotFoundError;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as errors from "../../../../errors/index";
5
+ import * as Sync from "../../../index";
6
+ import * as core from "../../../../core";
7
+ export declare class UnauthorizedError extends errors.SyncError {
8
+ constructor(body: Sync.GenerationError, rawResponse?: core.RawResponse);
9
+ }
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.UnauthorizedError = void 0;
40
+ const errors = __importStar(require("../../../../errors/index"));
41
+ class UnauthorizedError extends errors.SyncError {
42
+ constructor(body, rawResponse) {
43
+ super({
44
+ message: "UnauthorizedError",
45
+ statusCode: 401,
46
+ body: body,
47
+ rawResponse: rawResponse,
48
+ });
49
+ Object.setPrototypeOf(this, UnauthorizedError.prototype);
50
+ }
51
+ }
52
+ exports.UnauthorizedError = UnauthorizedError;
@@ -0,0 +1,4 @@
1
+ export * from "./BadRequestError";
2
+ export * from "./InternalServerError";
3
+ export * from "./NotFoundError";
4
+ export * from "./UnauthorizedError";
@@ -0,0 +1,20 @@
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
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./BadRequestError"), exports);
18
+ __exportStar(require("./InternalServerError"), exports);
19
+ __exportStar(require("./NotFoundError"), exports);
20
+ __exportStar(require("./UnauthorizedError"), exports);
@@ -0,0 +1,2 @@
1
+ export * from "./types";
2
+ export * from "./errors";
@@ -0,0 +1,18 @@
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
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./types"), exports);
18
+ __exportStar(require("./errors"), exports);
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * Recorded/Captured audio input
6
+ */
7
+ export interface Audio {
8
+ type: "audio";
9
+ /** URL of the audio to be used for generation */
10
+ url: string;
11
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Sync from "../../../index";
5
+ export interface CreateGenerationDto {
6
+ /** name of the model to use for generation. */
7
+ model: Sync.Model;
8
+ /** Array of input objects. Must include one video input item and one audio input item. Audio input items can be provided as either: recorded/captured audio url or a text-to-speech input with tts provider configuration. */
9
+ input: Sync.Input[];
10
+ /** additional options available for generation. */
11
+ options?: Sync.GenerationOptions;
12
+ /** webhook url for generation status updates. once the generation completes we will send a POST request to the webhook url with the generation data. */
13
+ webhookUrl?: string;
14
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface ElevenLabs {
5
+ name: "elevenlabs";
6
+ /** id of the voice to be used for generation */
7
+ voiceId: string;
8
+ /** script to be used for generation */
9
+ script: string;
10
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface EstimatedGenerationCost {
5
+ /** The estimated frame count for the generation. */
6
+ estimatedFrameCount: number;
7
+ /** The estimated cost of the generation in USD. */
8
+ estimatedGenerationCost: number;
9
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,25 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Sync from "../../../index";
5
+ export interface Generation {
6
+ /** The date and time the generation was created. */
7
+ createdAt: string;
8
+ /** The error message if the generation failed. */
9
+ error?: string;
10
+ id: Sync.GenerationId;
11
+ /** An array of input objects used for generation. */
12
+ input: Sync.Input[];
13
+ /** The name of the model used for generation. */
14
+ model: Sync.Model;
15
+ /** Options for the generation. */
16
+ options?: Sync.GenerationOptions;
17
+ /** The duration of the output media. */
18
+ outputDuration?: number;
19
+ /** The URL of the output media. */
20
+ outputUrl?: string;
21
+ /** The status of the generation. */
22
+ status: Sync.GenerationStatus;
23
+ /** The URL to the webhook endpoint. */
24
+ webhookUrl?: string;
25
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Sync from "../../../index";
5
+ export interface GenerationError {
6
+ /** The type of error that occurred. */
7
+ error: string;
8
+ /** A message describing the error. */
9
+ message: Sync.GenerationErrorMessage;
10
+ /** The type of error that occurred. */
11
+ statusCode: number;
12
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * A message describing the error.
6
+ */
7
+ export type GenerationErrorMessage = string | string[];
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * A unique identifier for the generation.
6
+ */
7
+ export type GenerationId = string;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,22 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Sync from "../../../index";
5
+ export interface GenerationOptions {
6
+ /** lipsync mode when audio and video durations are out of sync. By default if the audio and video durations are out of sync and audio is longer than video, the video will loop. Otherwise, the video will be cut off at the end of the audio. */
7
+ sync_mode?: Sync.SyncMode;
8
+ /** generation temperature randomness between 0 and 1. only works for lipsync-2 based models. */
9
+ temperature?: number;
10
+ /** Whether to detect active speaker and apply generation to them */
11
+ active_speaker?: boolean;
12
+ /** number of frames to pad the video on each side */
13
+ pads?: number[];
14
+ /** speed up the video by this factor. */
15
+ speedup?: number;
16
+ /** output format of the generated video. */
17
+ output_format?: string;
18
+ /** frames per second of the generated video. */
19
+ fps?: number;
20
+ /** resolution of the generated video. */
21
+ output_resolution?: number[];
22
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * The status of the generation.
6
+ */
7
+ export type GenerationStatus = "PENDING" | "PROCESSING" | "COMPLETED" | "FAILED";
8
+ export declare const GenerationStatus: {
9
+ readonly Pending: "PENDING";
10
+ readonly Processing: "PROCESSING";
11
+ readonly Completed: "COMPLETED";
12
+ readonly Failed: "FAILED";
13
+ };
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.GenerationStatus = void 0;
7
+ exports.GenerationStatus = {
8
+ Pending: "PENDING",
9
+ Processing: "PROCESSING",
10
+ Completed: "COMPLETED",
11
+ Failed: "FAILED",
12
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Sync from "../../../index";
5
+ /**
6
+ * An input item for a generation.
7
+ */
8
+ export type Input = Sync.Video | Sync.Audio | Sync.Tts;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,14 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * name of the model to use for generation.
6
+ */
7
+ export type Model = "lipsync-2" | "lipsync-1.9.0-beta" | "lipsync-1.8.0" | "lipsync-1.7.1" | "lipsync-1.6.0";
8
+ export declare const Model: {
9
+ readonly Lipsync2: "lipsync-2";
10
+ readonly Lipsync190Beta: "lipsync-1.9.0-beta";
11
+ readonly Lipsync180: "lipsync-1.8.0";
12
+ readonly Lipsync171: "lipsync-1.7.1";
13
+ readonly Lipsync160: "lipsync-1.6.0";
14
+ };
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Model = void 0;
7
+ exports.Model = {
8
+ Lipsync2: "lipsync-2",
9
+ Lipsync190Beta: "lipsync-1.9.0-beta",
10
+ Lipsync180: "lipsync-1.8.0",
11
+ Lipsync171: "lipsync-1.7.1",
12
+ Lipsync160: "lipsync-1.6.0",
13
+ };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * start and end frames of the video segment to apply generation to
6
+ */
7
+ export type SegmentFrames = number[][];
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * start and end times (in seconds) of the video segment to apply generation to
6
+ */
7
+ export type SegmentSecs = number[][];
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export type SyncMode = "loop" | "bounce" | "cut_off" | "silence" | "remap";
5
+ export declare const SyncMode: {
6
+ readonly Loop: "loop";
7
+ readonly Bounce: "bounce";
8
+ readonly CutOff: "cut_off";
9
+ readonly Silence: "silence";
10
+ readonly Remap: "remap";
11
+ };
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.SyncMode = void 0;
7
+ exports.SyncMode = {
8
+ Loop: "loop",
9
+ Bounce: "bounce",
10
+ CutOff: "cut_off",
11
+ Silence: "silence",
12
+ Remap: "remap",
13
+ };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Sync from "../../../index";
5
+ /**
6
+ * Text to speech input
7
+ */
8
+ export interface Tts {
9
+ type: "text";
10
+ /** Integration provider configuration */
11
+ provider: Sync.TtsProviderConfig;
12
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Sync from "../../../index";
5
+ export type TtsProviderConfig = Sync.ElevenLabs;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Sync from "../../../index";
5
+ export interface Video {
6
+ type: "video";
7
+ /** URL of the video to be used for generation */
8
+ url: string;
9
+ /** Start time and end time (in seconds) of the video segment to apply generation to. Configured as a list of lists, where each inner list contains the start time and end time of the segment. Currently only one segment is supported. ex: [[10.5, 20.5]] will lipsync only the segment between 10.5 and 20.5 seconds of the video. */
10
+ segments_secs?: Sync.SegmentSecs;
11
+ /** Start frame and end frame of the video segment to apply generation to. Configured as a list of lists, where each inner list contains the start frame and end frame of the segment. Currently only one segment is supported. ex: [[100, 200]] will lipsync only the segment between frames 100 and 200 of the video */
12
+ segments_frames?: Sync.SegmentFrames;
13
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,18 @@
1
+ export * from "./GenerationId";
2
+ export * from "./CreateGenerationDto";
3
+ export * from "./Input";
4
+ export * from "./Model";
5
+ export * from "./EstimatedGenerationCost";
6
+ export * from "./Generation";
7
+ export * from "./GenerationError";
8
+ export * from "./GenerationErrorMessage";
9
+ export * from "./GenerationOptions";
10
+ export * from "./SyncMode";
11
+ export * from "./GenerationStatus";
12
+ export * from "./TtsProviderConfig";
13
+ export * from "./ElevenLabs";
14
+ export * from "./Tts";
15
+ export * from "./Audio";
16
+ export * from "./Video";
17
+ export * from "./SegmentSecs";
18
+ export * from "./SegmentFrames";