@liqhtworks/sophon-sdk 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (230) hide show
  1. package/.github/workflows/publish.yml +56 -0
  2. package/.openapi-generator/FILES +73 -0
  3. package/.openapi-generator/VERSION +1 -0
  4. package/.openapi-generator-ignore +23 -0
  5. package/LICENSE +12 -0
  6. package/README.md +164 -0
  7. package/dist/apis/DownloadsApi.d.ts +63 -0
  8. package/dist/apis/DownloadsApi.js +58 -0
  9. package/dist/apis/HealthApi.d.ts +92 -0
  10. package/dist/apis/HealthApi.js +85 -0
  11. package/dist/apis/JobsApi.d.ts +225 -0
  12. package/dist/apis/JobsApi.js +245 -0
  13. package/dist/apis/UploadsApi.d.ts +228 -0
  14. package/dist/apis/UploadsApi.js +255 -0
  15. package/dist/apis/WebhooksApi.d.ts +138 -0
  16. package/dist/apis/WebhooksApi.js +152 -0
  17. package/dist/apis/index.d.ts +5 -0
  18. package/dist/apis/index.js +23 -0
  19. package/dist/esm/apis/DownloadsApi.d.ts +63 -0
  20. package/dist/esm/apis/DownloadsApi.js +54 -0
  21. package/dist/esm/apis/HealthApi.d.ts +92 -0
  22. package/dist/esm/apis/HealthApi.js +81 -0
  23. package/dist/esm/apis/JobsApi.d.ts +225 -0
  24. package/dist/esm/apis/JobsApi.js +241 -0
  25. package/dist/esm/apis/UploadsApi.d.ts +228 -0
  26. package/dist/esm/apis/UploadsApi.js +251 -0
  27. package/dist/esm/apis/WebhooksApi.d.ts +138 -0
  28. package/dist/esm/apis/WebhooksApi.js +148 -0
  29. package/dist/esm/apis/index.d.ts +5 -0
  30. package/dist/esm/apis/index.js +7 -0
  31. package/dist/esm/helpers/index.d.ts +3 -0
  32. package/dist/esm/helpers/index.js +3 -0
  33. package/dist/esm/helpers/jobs.d.ts +48 -0
  34. package/dist/esm/helpers/jobs.js +61 -0
  35. package/dist/esm/helpers/uploads.d.ts +71 -0
  36. package/dist/esm/helpers/uploads.js +146 -0
  37. package/dist/esm/helpers/webhooks.d.ts +23 -0
  38. package/dist/esm/helpers/webhooks.js +84 -0
  39. package/dist/esm/index.d.ts +4 -0
  40. package/dist/esm/index.js +6 -0
  41. package/dist/esm/models/CompleteUploadResponse.d.ts +57 -0
  42. package/dist/esm/models/CompleteUploadResponse.js +63 -0
  43. package/dist/esm/models/CreateJobOutputOptions.d.ts +55 -0
  44. package/dist/esm/models/CreateJobOutputOptions.js +46 -0
  45. package/dist/esm/models/CreateJobRequest.d.ts +61 -0
  46. package/dist/esm/models/CreateJobRequest.js +56 -0
  47. package/dist/esm/models/CreateUploadRequest.d.ts +44 -0
  48. package/dist/esm/models/CreateUploadRequest.js +51 -0
  49. package/dist/esm/models/CreateUploadResponse.d.ts +52 -0
  50. package/dist/esm/models/CreateUploadResponse.js +55 -0
  51. package/dist/esm/models/CreateWebhookRequest.d.ts +40 -0
  52. package/dist/esm/models/CreateWebhookRequest.js +45 -0
  53. package/dist/esm/models/ErrorBody.d.ts +72 -0
  54. package/dist/esm/models/ErrorBody.js +74 -0
  55. package/dist/esm/models/ErrorEnvelope.d.ts +33 -0
  56. package/dist/esm/models/ErrorEnvelope.js +44 -0
  57. package/dist/esm/models/JobOutputInfo.d.ts +95 -0
  58. package/dist/esm/models/JobOutputInfo.js +72 -0
  59. package/dist/esm/models/JobProfile.d.ts +49 -0
  60. package/dist/esm/models/JobProfile.js +69 -0
  61. package/dist/esm/models/JobProgress.d.ts +75 -0
  62. package/dist/esm/models/JobProgress.js +60 -0
  63. package/dist/esm/models/JobResponse.d.ts +134 -0
  64. package/dist/esm/models/JobResponse.js +94 -0
  65. package/dist/esm/models/JobSourceInfo.d.ts +62 -0
  66. package/dist/esm/models/JobSourceInfo.js +53 -0
  67. package/dist/esm/models/JobSourceType.d.ts +24 -0
  68. package/dist/esm/models/JobSourceType.js +44 -0
  69. package/dist/esm/models/JobStatus.d.ts +31 -0
  70. package/dist/esm/models/JobStatus.js +51 -0
  71. package/dist/esm/models/ListJobsResponse.d.ts +45 -0
  72. package/dist/esm/models/ListJobsResponse.js +50 -0
  73. package/dist/esm/models/OutputContainer.d.ts +27 -0
  74. package/dist/esm/models/OutputContainer.js +47 -0
  75. package/dist/esm/models/ReadyResponse.d.ts +38 -0
  76. package/dist/esm/models/ReadyResponse.js +45 -0
  77. package/dist/esm/models/UploadJobSource.d.ts +39 -0
  78. package/dist/esm/models/UploadJobSource.js +48 -0
  79. package/dist/esm/models/UploadPartResponse.d.ts +38 -0
  80. package/dist/esm/models/UploadPartResponse.js +47 -0
  81. package/dist/esm/models/UploadStatusResponse.d.ts +96 -0
  82. package/dist/esm/models/UploadStatusResponse.js +80 -0
  83. package/dist/esm/models/WebhookDeliveryPayload.d.ts +85 -0
  84. package/dist/esm/models/WebhookDeliveryPayload.js +83 -0
  85. package/dist/esm/models/WebhookListItem.d.ts +50 -0
  86. package/dist/esm/models/WebhookListItem.js +55 -0
  87. package/dist/esm/models/WebhookListResponse.d.ts +33 -0
  88. package/dist/esm/models/WebhookListResponse.js +44 -0
  89. package/dist/esm/models/WebhookResponse.d.ts +58 -0
  90. package/dist/esm/models/WebhookResponse.js +59 -0
  91. package/dist/esm/models/index.d.ts +25 -0
  92. package/dist/esm/models/index.js +27 -0
  93. package/dist/esm/runtime.d.ts +184 -0
  94. package/dist/esm/runtime.js +348 -0
  95. package/dist/helpers/index.d.ts +3 -0
  96. package/dist/helpers/index.js +19 -0
  97. package/dist/helpers/jobs.d.ts +48 -0
  98. package/dist/helpers/jobs.js +67 -0
  99. package/dist/helpers/uploads.d.ts +71 -0
  100. package/dist/helpers/uploads.js +149 -0
  101. package/dist/helpers/webhooks.d.ts +23 -0
  102. package/dist/helpers/webhooks.js +89 -0
  103. package/dist/index.d.ts +4 -0
  104. package/dist/index.js +22 -0
  105. package/dist/models/CompleteUploadResponse.d.ts +57 -0
  106. package/dist/models/CompleteUploadResponse.js +71 -0
  107. package/dist/models/CreateJobOutputOptions.d.ts +55 -0
  108. package/dist/models/CreateJobOutputOptions.js +53 -0
  109. package/dist/models/CreateJobRequest.d.ts +61 -0
  110. package/dist/models/CreateJobRequest.js +63 -0
  111. package/dist/models/CreateUploadRequest.d.ts +44 -0
  112. package/dist/models/CreateUploadRequest.js +58 -0
  113. package/dist/models/CreateUploadResponse.d.ts +52 -0
  114. package/dist/models/CreateUploadResponse.js +62 -0
  115. package/dist/models/CreateWebhookRequest.d.ts +40 -0
  116. package/dist/models/CreateWebhookRequest.js +52 -0
  117. package/dist/models/ErrorBody.d.ts +72 -0
  118. package/dist/models/ErrorBody.js +82 -0
  119. package/dist/models/ErrorEnvelope.d.ts +33 -0
  120. package/dist/models/ErrorEnvelope.js +51 -0
  121. package/dist/models/JobOutputInfo.d.ts +95 -0
  122. package/dist/models/JobOutputInfo.js +80 -0
  123. package/dist/models/JobProfile.d.ts +49 -0
  124. package/dist/models/JobProfile.js +77 -0
  125. package/dist/models/JobProgress.d.ts +75 -0
  126. package/dist/models/JobProgress.js +67 -0
  127. package/dist/models/JobResponse.d.ts +134 -0
  128. package/dist/models/JobResponse.js +101 -0
  129. package/dist/models/JobSourceInfo.d.ts +62 -0
  130. package/dist/models/JobSourceInfo.js +60 -0
  131. package/dist/models/JobSourceType.d.ts +24 -0
  132. package/dist/models/JobSourceType.js +52 -0
  133. package/dist/models/JobStatus.d.ts +31 -0
  134. package/dist/models/JobStatus.js +59 -0
  135. package/dist/models/ListJobsResponse.d.ts +45 -0
  136. package/dist/models/ListJobsResponse.js +57 -0
  137. package/dist/models/OutputContainer.d.ts +27 -0
  138. package/dist/models/OutputContainer.js +55 -0
  139. package/dist/models/ReadyResponse.d.ts +38 -0
  140. package/dist/models/ReadyResponse.js +52 -0
  141. package/dist/models/UploadJobSource.d.ts +39 -0
  142. package/dist/models/UploadJobSource.js +55 -0
  143. package/dist/models/UploadPartResponse.d.ts +38 -0
  144. package/dist/models/UploadPartResponse.js +54 -0
  145. package/dist/models/UploadStatusResponse.d.ts +96 -0
  146. package/dist/models/UploadStatusResponse.js +88 -0
  147. package/dist/models/WebhookDeliveryPayload.d.ts +85 -0
  148. package/dist/models/WebhookDeliveryPayload.js +91 -0
  149. package/dist/models/WebhookListItem.d.ts +50 -0
  150. package/dist/models/WebhookListItem.js +62 -0
  151. package/dist/models/WebhookListResponse.d.ts +33 -0
  152. package/dist/models/WebhookListResponse.js +51 -0
  153. package/dist/models/WebhookResponse.d.ts +58 -0
  154. package/dist/models/WebhookResponse.js +66 -0
  155. package/dist/models/index.d.ts +25 -0
  156. package/dist/models/index.js +43 -0
  157. package/dist/runtime.d.ts +184 -0
  158. package/dist/runtime.js +364 -0
  159. package/docs/CompleteUploadResponse.md +40 -0
  160. package/docs/CreateJobOutputOptions.md +39 -0
  161. package/docs/CreateJobRequest.md +42 -0
  162. package/docs/CreateUploadRequest.md +38 -0
  163. package/docs/CreateUploadResponse.md +40 -0
  164. package/docs/CreateWebhookRequest.md +36 -0
  165. package/docs/DownloadsApi.md +78 -0
  166. package/docs/ErrorBody.md +40 -0
  167. package/docs/ErrorEnvelope.md +34 -0
  168. package/docs/HealthApi.md +129 -0
  169. package/docs/JobOutputInfo.md +50 -0
  170. package/docs/JobProfile.md +33 -0
  171. package/docs/JobProgress.md +48 -0
  172. package/docs/JobResponse.md +62 -0
  173. package/docs/JobSourceInfo.md +44 -0
  174. package/docs/JobSourceType.md +33 -0
  175. package/docs/JobStatus.md +33 -0
  176. package/docs/JobsApi.md +407 -0
  177. package/docs/ListJobsResponse.md +38 -0
  178. package/docs/OutputContainer.md +33 -0
  179. package/docs/ReadyResponse.md +36 -0
  180. package/docs/UploadJobSource.md +37 -0
  181. package/docs/UploadPartResponse.md +36 -0
  182. package/docs/UploadStatusResponse.md +50 -0
  183. package/docs/UploadsApi.md +415 -0
  184. package/docs/WebhookDeliveryPayload.md +45 -0
  185. package/docs/WebhookEventsApi.md +91 -0
  186. package/docs/WebhookListItem.md +40 -0
  187. package/docs/WebhookListResponse.md +34 -0
  188. package/docs/WebhookResponse.md +42 -0
  189. package/docs/WebhooksApi.md +235 -0
  190. package/package.json +24 -0
  191. package/src/apis/DownloadsApi.ts +114 -0
  192. package/src/apis/HealthApi.ts +160 -0
  193. package/src/apis/JobsApi.ts +491 -0
  194. package/src/apis/UploadsApi.ts +522 -0
  195. package/src/apis/WebhooksApi.ts +298 -0
  196. package/src/apis/index.ts +7 -0
  197. package/src/helpers/index.ts +3 -0
  198. package/src/helpers/jobs.ts +112 -0
  199. package/src/helpers/uploads.ts +243 -0
  200. package/src/helpers/webhooks.ts +134 -0
  201. package/src/index.ts +7 -0
  202. package/src/models/CompleteUploadResponse.ts +102 -0
  203. package/src/models/CreateJobOutputOptions.ts +101 -0
  204. package/src/models/CreateJobRequest.ts +123 -0
  205. package/src/models/CreateUploadRequest.ts +84 -0
  206. package/src/models/CreateUploadResponse.ts +95 -0
  207. package/src/models/CreateWebhookRequest.ts +76 -0
  208. package/src/models/ErrorBody.ts +116 -0
  209. package/src/models/ErrorEnvelope.ts +74 -0
  210. package/src/models/JobOutputInfo.ts +149 -0
  211. package/src/models/JobProfile.ts +76 -0
  212. package/src/models/JobProgress.ts +133 -0
  213. package/src/models/JobResponse.ts +236 -0
  214. package/src/models/JobSourceInfo.ts +106 -0
  215. package/src/models/JobSourceType.ts +51 -0
  216. package/src/models/JobStatus.ts +58 -0
  217. package/src/models/ListJobsResponse.ts +91 -0
  218. package/src/models/OutputContainer.ts +54 -0
  219. package/src/models/ReadyResponse.ts +74 -0
  220. package/src/models/UploadJobSource.ts +85 -0
  221. package/src/models/UploadPartResponse.ts +75 -0
  222. package/src/models/UploadStatusResponse.ts +153 -0
  223. package/src/models/WebhookDeliveryPayload.ts +134 -0
  224. package/src/models/WebhookListItem.ts +93 -0
  225. package/src/models/WebhookListResponse.ts +74 -0
  226. package/src/models/WebhookResponse.ts +104 -0
  227. package/src/models/index.ts +27 -0
  228. package/src/runtime.ts +450 -0
  229. package/tsconfig.esm.json +7 -0
  230. package/tsconfig.json +20 -0
@@ -0,0 +1,152 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * SOPHON Encoding API
6
+ * REST API for submitting, monitoring, and retrieving SOPHON encoding jobs. Authentication is via Bearer API key or session cookie. All POST endpoints require an Idempotency-Key header. List endpoints use opaque cursor-based pagination.
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.WebhooksApi = void 0;
17
+ const runtime = require("../runtime");
18
+ const index_1 = require("../models/index");
19
+ /**
20
+ *
21
+ */
22
+ class WebhooksApi extends runtime.BaseAPI {
23
+ /**
24
+ * Creates request options for createWebhook without sending the request
25
+ */
26
+ async createWebhookRequestOpts(requestParameters) {
27
+ if (requestParameters['idempotencyKey'] == null) {
28
+ throw new runtime.RequiredError('idempotencyKey', 'Required parameter "idempotencyKey" was null or undefined when calling createWebhook().');
29
+ }
30
+ if (requestParameters['createWebhookRequest'] == null) {
31
+ throw new runtime.RequiredError('createWebhookRequest', 'Required parameter "createWebhookRequest" was null or undefined when calling createWebhook().');
32
+ }
33
+ const queryParameters = {};
34
+ const headerParameters = {};
35
+ headerParameters['Content-Type'] = 'application/json';
36
+ if (requestParameters['idempotencyKey'] != null) {
37
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
38
+ }
39
+ if (this.configuration && this.configuration.accessToken) {
40
+ const token = this.configuration.accessToken;
41
+ const tokenString = await token("bearerApiKey", []);
42
+ if (tokenString) {
43
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
44
+ }
45
+ }
46
+ let urlPath = `/v1/webhooks`;
47
+ return {
48
+ path: urlPath,
49
+ method: 'POST',
50
+ headers: headerParameters,
51
+ query: queryParameters,
52
+ body: (0, index_1.CreateWebhookRequestToJSON)(requestParameters['createWebhookRequest']),
53
+ };
54
+ }
55
+ /**
56
+ * Registers an HTTPS endpoint for terminal job events and returns the HMAC signing secret once at creation time.
57
+ * Register a webhook endpoint
58
+ */
59
+ async createWebhookRaw(requestParameters, initOverrides) {
60
+ const requestOptions = await this.createWebhookRequestOpts(requestParameters);
61
+ const response = await this.request(requestOptions, initOverrides);
62
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WebhookResponseFromJSON)(jsonValue));
63
+ }
64
+ /**
65
+ * Registers an HTTPS endpoint for terminal job events and returns the HMAC signing secret once at creation time.
66
+ * Register a webhook endpoint
67
+ */
68
+ async createWebhook(requestParameters, initOverrides) {
69
+ const response = await this.createWebhookRaw(requestParameters, initOverrides);
70
+ return await response.value();
71
+ }
72
+ /**
73
+ * Creates request options for deleteWebhook without sending the request
74
+ */
75
+ async deleteWebhookRequestOpts(requestParameters) {
76
+ if (requestParameters['id'] == null) {
77
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling deleteWebhook().');
78
+ }
79
+ const queryParameters = {};
80
+ const headerParameters = {};
81
+ if (this.configuration && this.configuration.accessToken) {
82
+ const token = this.configuration.accessToken;
83
+ const tokenString = await token("bearerApiKey", []);
84
+ if (tokenString) {
85
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
86
+ }
87
+ }
88
+ let urlPath = `/v1/webhooks/{id}`;
89
+ urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
90
+ return {
91
+ path: urlPath,
92
+ method: 'DELETE',
93
+ headers: headerParameters,
94
+ query: queryParameters,
95
+ };
96
+ }
97
+ /**
98
+ * Sets the webhook to inactive. It will no longer receive deliveries.
99
+ * Soft-delete a webhook endpoint
100
+ */
101
+ async deleteWebhookRaw(requestParameters, initOverrides) {
102
+ const requestOptions = await this.deleteWebhookRequestOpts(requestParameters);
103
+ const response = await this.request(requestOptions, initOverrides);
104
+ return new runtime.VoidApiResponse(response);
105
+ }
106
+ /**
107
+ * Sets the webhook to inactive. It will no longer receive deliveries.
108
+ * Soft-delete a webhook endpoint
109
+ */
110
+ async deleteWebhook(requestParameters, initOverrides) {
111
+ await this.deleteWebhookRaw(requestParameters, initOverrides);
112
+ }
113
+ /**
114
+ * Creates request options for listWebhooks without sending the request
115
+ */
116
+ async listWebhooksRequestOpts() {
117
+ const queryParameters = {};
118
+ const headerParameters = {};
119
+ if (this.configuration && this.configuration.accessToken) {
120
+ const token = this.configuration.accessToken;
121
+ const tokenString = await token("bearerApiKey", []);
122
+ if (tokenString) {
123
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
124
+ }
125
+ }
126
+ let urlPath = `/v1/webhooks`;
127
+ return {
128
+ path: urlPath,
129
+ method: 'GET',
130
+ headers: headerParameters,
131
+ query: queryParameters,
132
+ };
133
+ }
134
+ /**
135
+ * Lists active webhook endpoints for the authenticated organization.
136
+ * List active webhook endpoints
137
+ */
138
+ async listWebhooksRaw(initOverrides) {
139
+ const requestOptions = await this.listWebhooksRequestOpts();
140
+ const response = await this.request(requestOptions, initOverrides);
141
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.WebhookListResponseFromJSON)(jsonValue));
142
+ }
143
+ /**
144
+ * Lists active webhook endpoints for the authenticated organization.
145
+ * List active webhook endpoints
146
+ */
147
+ async listWebhooks(initOverrides) {
148
+ const response = await this.listWebhooksRaw(initOverrides);
149
+ return await response.value();
150
+ }
151
+ }
152
+ exports.WebhooksApi = WebhooksApi;
@@ -0,0 +1,5 @@
1
+ export * from './DownloadsApi';
2
+ export * from './HealthApi';
3
+ export * from './JobsApi';
4
+ export * from './UploadsApi';
5
+ export * from './WebhooksApi';
@@ -0,0 +1,23 @@
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
+ /* tslint:disable */
18
+ /* eslint-disable */
19
+ __exportStar(require("./DownloadsApi"), exports);
20
+ __exportStar(require("./HealthApi"), exports);
21
+ __exportStar(require("./JobsApi"), exports);
22
+ __exportStar(require("./UploadsApi"), exports);
23
+ __exportStar(require("./WebhooksApi"), exports);
@@ -0,0 +1,63 @@
1
+ /**
2
+ * SOPHON Encoding API
3
+ * REST API for submitting, monitoring, and retrieving SOPHON encoding jobs. Authentication is via Bearer API key or session cookie. All POST endpoints require an Idempotency-Key header. List endpoints use opaque cursor-based pagination.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import * as runtime from '../runtime';
13
+ export interface DownloadRequest {
14
+ token: string;
15
+ }
16
+ /**
17
+ * DownloadsApi - interface
18
+ *
19
+ * @export
20
+ * @interface DownloadsApiInterface
21
+ */
22
+ export interface DownloadsApiInterface {
23
+ /**
24
+ * Creates request options for download without sending the request
25
+ * @param {string} token HMAC-signed download token encoding the object key and expiry.
26
+ * @throws {RequiredError}
27
+ * @memberof DownloadsApiInterface
28
+ */
29
+ downloadRequestOpts(requestParameters: DownloadRequest): Promise<runtime.RequestOpts>;
30
+ /**
31
+ * Serves the encoded output file. No Authorization header required -- the HMAC-signed token (generated by GET /v1/jobs/{id}/output) IS the credential. Tokens expire after 24 hours.
32
+ * @summary Download an output file via signed token
33
+ * @param {string} token HMAC-signed download token encoding the object key and expiry.
34
+ * @param {*} [options] Override http request option.
35
+ * @throws {RequiredError}
36
+ * @memberof DownloadsApiInterface
37
+ */
38
+ downloadRaw(requestParameters: DownloadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>>;
39
+ /**
40
+ * Serves the encoded output file. No Authorization header required -- the HMAC-signed token (generated by GET /v1/jobs/{id}/output) IS the credential. Tokens expire after 24 hours.
41
+ * Download an output file via signed token
42
+ */
43
+ download(requestParameters: DownloadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob>;
44
+ }
45
+ /**
46
+ *
47
+ */
48
+ export declare class DownloadsApi extends runtime.BaseAPI implements DownloadsApiInterface {
49
+ /**
50
+ * Creates request options for download without sending the request
51
+ */
52
+ downloadRequestOpts(requestParameters: DownloadRequest): Promise<runtime.RequestOpts>;
53
+ /**
54
+ * Serves the encoded output file. No Authorization header required -- the HMAC-signed token (generated by GET /v1/jobs/{id}/output) IS the credential. Tokens expire after 24 hours.
55
+ * Download an output file via signed token
56
+ */
57
+ downloadRaw(requestParameters: DownloadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>>;
58
+ /**
59
+ * Serves the encoded output file. No Authorization header required -- the HMAC-signed token (generated by GET /v1/jobs/{id}/output) IS the credential. Tokens expire after 24 hours.
60
+ * Download an output file via signed token
61
+ */
62
+ download(requestParameters: DownloadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob>;
63
+ }
@@ -0,0 +1,54 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * SOPHON Encoding API
5
+ * REST API for submitting, monitoring, and retrieving SOPHON encoding jobs. Authentication is via Bearer API key or session cookie. All POST endpoints require an Idempotency-Key header. List endpoints use opaque cursor-based pagination.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ import * as runtime from '../runtime';
15
+ /**
16
+ *
17
+ */
18
+ export class DownloadsApi extends runtime.BaseAPI {
19
+ /**
20
+ * Creates request options for download without sending the request
21
+ */
22
+ async downloadRequestOpts(requestParameters) {
23
+ if (requestParameters['token'] == null) {
24
+ throw new runtime.RequiredError('token', 'Required parameter "token" was null or undefined when calling download().');
25
+ }
26
+ const queryParameters = {};
27
+ const headerParameters = {};
28
+ let urlPath = `/v1/downloads/{token}`;
29
+ urlPath = urlPath.replace(`{${"token"}}`, encodeURIComponent(String(requestParameters['token'])));
30
+ return {
31
+ path: urlPath,
32
+ method: 'GET',
33
+ headers: headerParameters,
34
+ query: queryParameters,
35
+ };
36
+ }
37
+ /**
38
+ * Serves the encoded output file. No Authorization header required -- the HMAC-signed token (generated by GET /v1/jobs/{id}/output) IS the credential. Tokens expire after 24 hours.
39
+ * Download an output file via signed token
40
+ */
41
+ async downloadRaw(requestParameters, initOverrides) {
42
+ const requestOptions = await this.downloadRequestOpts(requestParameters);
43
+ const response = await this.request(requestOptions, initOverrides);
44
+ return new runtime.BlobApiResponse(response);
45
+ }
46
+ /**
47
+ * Serves the encoded output file. No Authorization header required -- the HMAC-signed token (generated by GET /v1/jobs/{id}/output) IS the credential. Tokens expire after 24 hours.
48
+ * Download an output file via signed token
49
+ */
50
+ async download(requestParameters, initOverrides) {
51
+ const response = await this.downloadRaw(requestParameters, initOverrides);
52
+ return await response.value();
53
+ }
54
+ }
@@ -0,0 +1,92 @@
1
+ /**
2
+ * SOPHON Encoding API
3
+ * REST API for submitting, monitoring, and retrieving SOPHON encoding jobs. Authentication is via Bearer API key or session cookie. All POST endpoints require an Idempotency-Key header. List endpoints use opaque cursor-based pagination.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import * as runtime from '../runtime';
13
+ import type { ReadyResponse } from '../models/index';
14
+ /**
15
+ * HealthApi - interface
16
+ *
17
+ * @export
18
+ * @interface HealthApiInterface
19
+ */
20
+ export interface HealthApiInterface {
21
+ /**
22
+ * Creates request options for healthz without sending the request
23
+ * @throws {RequiredError}
24
+ * @memberof HealthApiInterface
25
+ */
26
+ healthzRequestOpts(): Promise<runtime.RequestOpts>;
27
+ /**
28
+ * Always returns 200. Used by load balancers and orchestrators.
29
+ * @summary Liveness probe
30
+ * @param {*} [options] Override http request option.
31
+ * @throws {RequiredError}
32
+ * @memberof HealthApiInterface
33
+ */
34
+ healthzRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
35
+ /**
36
+ * Always returns 200. Used by load balancers and orchestrators.
37
+ * Liveness probe
38
+ */
39
+ healthz(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
40
+ /**
41
+ * Creates request options for readyz without sending the request
42
+ * @throws {RequiredError}
43
+ * @memberof HealthApiInterface
44
+ */
45
+ readyzRequestOpts(): Promise<runtime.RequestOpts>;
46
+ /**
47
+ * Returns 200 when the service is ready to accept traffic. Checks database connectivity, disk headroom (warning and critical thresholds), worker liveness, and drain state.
48
+ * @summary Readiness probe
49
+ * @param {*} [options] Override http request option.
50
+ * @throws {RequiredError}
51
+ * @memberof HealthApiInterface
52
+ */
53
+ readyzRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ReadyResponse>>;
54
+ /**
55
+ * Returns 200 when the service is ready to accept traffic. Checks database connectivity, disk headroom (warning and critical thresholds), worker liveness, and drain state.
56
+ * Readiness probe
57
+ */
58
+ readyz(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ReadyResponse>;
59
+ }
60
+ /**
61
+ *
62
+ */
63
+ export declare class HealthApi extends runtime.BaseAPI implements HealthApiInterface {
64
+ /**
65
+ * Creates request options for healthz without sending the request
66
+ */
67
+ healthzRequestOpts(): Promise<runtime.RequestOpts>;
68
+ /**
69
+ * Always returns 200. Used by load balancers and orchestrators.
70
+ * Liveness probe
71
+ */
72
+ healthzRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
73
+ /**
74
+ * Always returns 200. Used by load balancers and orchestrators.
75
+ * Liveness probe
76
+ */
77
+ healthz(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
78
+ /**
79
+ * Creates request options for readyz without sending the request
80
+ */
81
+ readyzRequestOpts(): Promise<runtime.RequestOpts>;
82
+ /**
83
+ * Returns 200 when the service is ready to accept traffic. Checks database connectivity, disk headroom (warning and critical thresholds), worker liveness, and drain state.
84
+ * Readiness probe
85
+ */
86
+ readyzRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ReadyResponse>>;
87
+ /**
88
+ * Returns 200 when the service is ready to accept traffic. Checks database connectivity, disk headroom (warning and critical thresholds), worker liveness, and drain state.
89
+ * Readiness probe
90
+ */
91
+ readyz(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ReadyResponse>;
92
+ }
@@ -0,0 +1,81 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * SOPHON Encoding API
5
+ * REST API for submitting, monitoring, and retrieving SOPHON encoding jobs. Authentication is via Bearer API key or session cookie. All POST endpoints require an Idempotency-Key header. List endpoints use opaque cursor-based pagination.
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ import * as runtime from '../runtime';
15
+ import { ReadyResponseFromJSON, } from '../models/index';
16
+ /**
17
+ *
18
+ */
19
+ export class HealthApi extends runtime.BaseAPI {
20
+ /**
21
+ * Creates request options for healthz without sending the request
22
+ */
23
+ async healthzRequestOpts() {
24
+ const queryParameters = {};
25
+ const headerParameters = {};
26
+ let urlPath = `/healthz`;
27
+ return {
28
+ path: urlPath,
29
+ method: 'GET',
30
+ headers: headerParameters,
31
+ query: queryParameters,
32
+ };
33
+ }
34
+ /**
35
+ * Always returns 200. Used by load balancers and orchestrators.
36
+ * Liveness probe
37
+ */
38
+ async healthzRaw(initOverrides) {
39
+ const requestOptions = await this.healthzRequestOpts();
40
+ const response = await this.request(requestOptions, initOverrides);
41
+ return new runtime.VoidApiResponse(response);
42
+ }
43
+ /**
44
+ * Always returns 200. Used by load balancers and orchestrators.
45
+ * Liveness probe
46
+ */
47
+ async healthz(initOverrides) {
48
+ await this.healthzRaw(initOverrides);
49
+ }
50
+ /**
51
+ * Creates request options for readyz without sending the request
52
+ */
53
+ async readyzRequestOpts() {
54
+ const queryParameters = {};
55
+ const headerParameters = {};
56
+ let urlPath = `/readyz`;
57
+ return {
58
+ path: urlPath,
59
+ method: 'GET',
60
+ headers: headerParameters,
61
+ query: queryParameters,
62
+ };
63
+ }
64
+ /**
65
+ * Returns 200 when the service is ready to accept traffic. Checks database connectivity, disk headroom (warning and critical thresholds), worker liveness, and drain state.
66
+ * Readiness probe
67
+ */
68
+ async readyzRaw(initOverrides) {
69
+ const requestOptions = await this.readyzRequestOpts();
70
+ const response = await this.request(requestOptions, initOverrides);
71
+ return new runtime.JSONApiResponse(response, (jsonValue) => ReadyResponseFromJSON(jsonValue));
72
+ }
73
+ /**
74
+ * Returns 200 when the service is ready to accept traffic. Checks database connectivity, disk headroom (warning and critical thresholds), worker liveness, and drain state.
75
+ * Readiness probe
76
+ */
77
+ async readyz(initOverrides) {
78
+ const response = await this.readyzRaw(initOverrides);
79
+ return await response.value();
80
+ }
81
+ }