@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.
- package/.github/workflows/publish.yml +56 -0
- package/.openapi-generator/FILES +73 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/LICENSE +12 -0
- package/README.md +164 -0
- package/dist/apis/DownloadsApi.d.ts +63 -0
- package/dist/apis/DownloadsApi.js +58 -0
- package/dist/apis/HealthApi.d.ts +92 -0
- package/dist/apis/HealthApi.js +85 -0
- package/dist/apis/JobsApi.d.ts +225 -0
- package/dist/apis/JobsApi.js +245 -0
- package/dist/apis/UploadsApi.d.ts +228 -0
- package/dist/apis/UploadsApi.js +255 -0
- package/dist/apis/WebhooksApi.d.ts +138 -0
- package/dist/apis/WebhooksApi.js +152 -0
- package/dist/apis/index.d.ts +5 -0
- package/dist/apis/index.js +23 -0
- package/dist/esm/apis/DownloadsApi.d.ts +63 -0
- package/dist/esm/apis/DownloadsApi.js +54 -0
- package/dist/esm/apis/HealthApi.d.ts +92 -0
- package/dist/esm/apis/HealthApi.js +81 -0
- package/dist/esm/apis/JobsApi.d.ts +225 -0
- package/dist/esm/apis/JobsApi.js +241 -0
- package/dist/esm/apis/UploadsApi.d.ts +228 -0
- package/dist/esm/apis/UploadsApi.js +251 -0
- package/dist/esm/apis/WebhooksApi.d.ts +138 -0
- package/dist/esm/apis/WebhooksApi.js +148 -0
- package/dist/esm/apis/index.d.ts +5 -0
- package/dist/esm/apis/index.js +7 -0
- package/dist/esm/helpers/index.d.ts +3 -0
- package/dist/esm/helpers/index.js +3 -0
- package/dist/esm/helpers/jobs.d.ts +48 -0
- package/dist/esm/helpers/jobs.js +61 -0
- package/dist/esm/helpers/uploads.d.ts +71 -0
- package/dist/esm/helpers/uploads.js +146 -0
- package/dist/esm/helpers/webhooks.d.ts +23 -0
- package/dist/esm/helpers/webhooks.js +84 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +6 -0
- package/dist/esm/models/CompleteUploadResponse.d.ts +57 -0
- package/dist/esm/models/CompleteUploadResponse.js +63 -0
- package/dist/esm/models/CreateJobOutputOptions.d.ts +55 -0
- package/dist/esm/models/CreateJobOutputOptions.js +46 -0
- package/dist/esm/models/CreateJobRequest.d.ts +61 -0
- package/dist/esm/models/CreateJobRequest.js +56 -0
- package/dist/esm/models/CreateUploadRequest.d.ts +44 -0
- package/dist/esm/models/CreateUploadRequest.js +51 -0
- package/dist/esm/models/CreateUploadResponse.d.ts +52 -0
- package/dist/esm/models/CreateUploadResponse.js +55 -0
- package/dist/esm/models/CreateWebhookRequest.d.ts +40 -0
- package/dist/esm/models/CreateWebhookRequest.js +45 -0
- package/dist/esm/models/ErrorBody.d.ts +72 -0
- package/dist/esm/models/ErrorBody.js +74 -0
- package/dist/esm/models/ErrorEnvelope.d.ts +33 -0
- package/dist/esm/models/ErrorEnvelope.js +44 -0
- package/dist/esm/models/JobOutputInfo.d.ts +95 -0
- package/dist/esm/models/JobOutputInfo.js +72 -0
- package/dist/esm/models/JobProfile.d.ts +49 -0
- package/dist/esm/models/JobProfile.js +69 -0
- package/dist/esm/models/JobProgress.d.ts +75 -0
- package/dist/esm/models/JobProgress.js +60 -0
- package/dist/esm/models/JobResponse.d.ts +134 -0
- package/dist/esm/models/JobResponse.js +94 -0
- package/dist/esm/models/JobSourceInfo.d.ts +62 -0
- package/dist/esm/models/JobSourceInfo.js +53 -0
- package/dist/esm/models/JobSourceType.d.ts +24 -0
- package/dist/esm/models/JobSourceType.js +44 -0
- package/dist/esm/models/JobStatus.d.ts +31 -0
- package/dist/esm/models/JobStatus.js +51 -0
- package/dist/esm/models/ListJobsResponse.d.ts +45 -0
- package/dist/esm/models/ListJobsResponse.js +50 -0
- package/dist/esm/models/OutputContainer.d.ts +27 -0
- package/dist/esm/models/OutputContainer.js +47 -0
- package/dist/esm/models/ReadyResponse.d.ts +38 -0
- package/dist/esm/models/ReadyResponse.js +45 -0
- package/dist/esm/models/UploadJobSource.d.ts +39 -0
- package/dist/esm/models/UploadJobSource.js +48 -0
- package/dist/esm/models/UploadPartResponse.d.ts +38 -0
- package/dist/esm/models/UploadPartResponse.js +47 -0
- package/dist/esm/models/UploadStatusResponse.d.ts +96 -0
- package/dist/esm/models/UploadStatusResponse.js +80 -0
- package/dist/esm/models/WebhookDeliveryPayload.d.ts +85 -0
- package/dist/esm/models/WebhookDeliveryPayload.js +83 -0
- package/dist/esm/models/WebhookListItem.d.ts +50 -0
- package/dist/esm/models/WebhookListItem.js +55 -0
- package/dist/esm/models/WebhookListResponse.d.ts +33 -0
- package/dist/esm/models/WebhookListResponse.js +44 -0
- package/dist/esm/models/WebhookResponse.d.ts +58 -0
- package/dist/esm/models/WebhookResponse.js +59 -0
- package/dist/esm/models/index.d.ts +25 -0
- package/dist/esm/models/index.js +27 -0
- package/dist/esm/runtime.d.ts +184 -0
- package/dist/esm/runtime.js +348 -0
- package/dist/helpers/index.d.ts +3 -0
- package/dist/helpers/index.js +19 -0
- package/dist/helpers/jobs.d.ts +48 -0
- package/dist/helpers/jobs.js +67 -0
- package/dist/helpers/uploads.d.ts +71 -0
- package/dist/helpers/uploads.js +149 -0
- package/dist/helpers/webhooks.d.ts +23 -0
- package/dist/helpers/webhooks.js +89 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +22 -0
- package/dist/models/CompleteUploadResponse.d.ts +57 -0
- package/dist/models/CompleteUploadResponse.js +71 -0
- package/dist/models/CreateJobOutputOptions.d.ts +55 -0
- package/dist/models/CreateJobOutputOptions.js +53 -0
- package/dist/models/CreateJobRequest.d.ts +61 -0
- package/dist/models/CreateJobRequest.js +63 -0
- package/dist/models/CreateUploadRequest.d.ts +44 -0
- package/dist/models/CreateUploadRequest.js +58 -0
- package/dist/models/CreateUploadResponse.d.ts +52 -0
- package/dist/models/CreateUploadResponse.js +62 -0
- package/dist/models/CreateWebhookRequest.d.ts +40 -0
- package/dist/models/CreateWebhookRequest.js +52 -0
- package/dist/models/ErrorBody.d.ts +72 -0
- package/dist/models/ErrorBody.js +82 -0
- package/dist/models/ErrorEnvelope.d.ts +33 -0
- package/dist/models/ErrorEnvelope.js +51 -0
- package/dist/models/JobOutputInfo.d.ts +95 -0
- package/dist/models/JobOutputInfo.js +80 -0
- package/dist/models/JobProfile.d.ts +49 -0
- package/dist/models/JobProfile.js +77 -0
- package/dist/models/JobProgress.d.ts +75 -0
- package/dist/models/JobProgress.js +67 -0
- package/dist/models/JobResponse.d.ts +134 -0
- package/dist/models/JobResponse.js +101 -0
- package/dist/models/JobSourceInfo.d.ts +62 -0
- package/dist/models/JobSourceInfo.js +60 -0
- package/dist/models/JobSourceType.d.ts +24 -0
- package/dist/models/JobSourceType.js +52 -0
- package/dist/models/JobStatus.d.ts +31 -0
- package/dist/models/JobStatus.js +59 -0
- package/dist/models/ListJobsResponse.d.ts +45 -0
- package/dist/models/ListJobsResponse.js +57 -0
- package/dist/models/OutputContainer.d.ts +27 -0
- package/dist/models/OutputContainer.js +55 -0
- package/dist/models/ReadyResponse.d.ts +38 -0
- package/dist/models/ReadyResponse.js +52 -0
- package/dist/models/UploadJobSource.d.ts +39 -0
- package/dist/models/UploadJobSource.js +55 -0
- package/dist/models/UploadPartResponse.d.ts +38 -0
- package/dist/models/UploadPartResponse.js +54 -0
- package/dist/models/UploadStatusResponse.d.ts +96 -0
- package/dist/models/UploadStatusResponse.js +88 -0
- package/dist/models/WebhookDeliveryPayload.d.ts +85 -0
- package/dist/models/WebhookDeliveryPayload.js +91 -0
- package/dist/models/WebhookListItem.d.ts +50 -0
- package/dist/models/WebhookListItem.js +62 -0
- package/dist/models/WebhookListResponse.d.ts +33 -0
- package/dist/models/WebhookListResponse.js +51 -0
- package/dist/models/WebhookResponse.d.ts +58 -0
- package/dist/models/WebhookResponse.js +66 -0
- package/dist/models/index.d.ts +25 -0
- package/dist/models/index.js +43 -0
- package/dist/runtime.d.ts +184 -0
- package/dist/runtime.js +364 -0
- package/docs/CompleteUploadResponse.md +40 -0
- package/docs/CreateJobOutputOptions.md +39 -0
- package/docs/CreateJobRequest.md +42 -0
- package/docs/CreateUploadRequest.md +38 -0
- package/docs/CreateUploadResponse.md +40 -0
- package/docs/CreateWebhookRequest.md +36 -0
- package/docs/DownloadsApi.md +78 -0
- package/docs/ErrorBody.md +40 -0
- package/docs/ErrorEnvelope.md +34 -0
- package/docs/HealthApi.md +129 -0
- package/docs/JobOutputInfo.md +50 -0
- package/docs/JobProfile.md +33 -0
- package/docs/JobProgress.md +48 -0
- package/docs/JobResponse.md +62 -0
- package/docs/JobSourceInfo.md +44 -0
- package/docs/JobSourceType.md +33 -0
- package/docs/JobStatus.md +33 -0
- package/docs/JobsApi.md +407 -0
- package/docs/ListJobsResponse.md +38 -0
- package/docs/OutputContainer.md +33 -0
- package/docs/ReadyResponse.md +36 -0
- package/docs/UploadJobSource.md +37 -0
- package/docs/UploadPartResponse.md +36 -0
- package/docs/UploadStatusResponse.md +50 -0
- package/docs/UploadsApi.md +415 -0
- package/docs/WebhookDeliveryPayload.md +45 -0
- package/docs/WebhookEventsApi.md +91 -0
- package/docs/WebhookListItem.md +40 -0
- package/docs/WebhookListResponse.md +34 -0
- package/docs/WebhookResponse.md +42 -0
- package/docs/WebhooksApi.md +235 -0
- package/package.json +24 -0
- package/src/apis/DownloadsApi.ts +114 -0
- package/src/apis/HealthApi.ts +160 -0
- package/src/apis/JobsApi.ts +491 -0
- package/src/apis/UploadsApi.ts +522 -0
- package/src/apis/WebhooksApi.ts +298 -0
- package/src/apis/index.ts +7 -0
- package/src/helpers/index.ts +3 -0
- package/src/helpers/jobs.ts +112 -0
- package/src/helpers/uploads.ts +243 -0
- package/src/helpers/webhooks.ts +134 -0
- package/src/index.ts +7 -0
- package/src/models/CompleteUploadResponse.ts +102 -0
- package/src/models/CreateJobOutputOptions.ts +101 -0
- package/src/models/CreateJobRequest.ts +123 -0
- package/src/models/CreateUploadRequest.ts +84 -0
- package/src/models/CreateUploadResponse.ts +95 -0
- package/src/models/CreateWebhookRequest.ts +76 -0
- package/src/models/ErrorBody.ts +116 -0
- package/src/models/ErrorEnvelope.ts +74 -0
- package/src/models/JobOutputInfo.ts +149 -0
- package/src/models/JobProfile.ts +76 -0
- package/src/models/JobProgress.ts +133 -0
- package/src/models/JobResponse.ts +236 -0
- package/src/models/JobSourceInfo.ts +106 -0
- package/src/models/JobSourceType.ts +51 -0
- package/src/models/JobStatus.ts +58 -0
- package/src/models/ListJobsResponse.ts +91 -0
- package/src/models/OutputContainer.ts +54 -0
- package/src/models/ReadyResponse.ts +74 -0
- package/src/models/UploadJobSource.ts +85 -0
- package/src/models/UploadPartResponse.ts +75 -0
- package/src/models/UploadStatusResponse.ts +153 -0
- package/src/models/WebhookDeliveryPayload.ts +134 -0
- package/src/models/WebhookListItem.ts +93 -0
- package/src/models/WebhookListResponse.ts +74 -0
- package/src/models/WebhookResponse.ts +104 -0
- package/src/models/index.ts +27 -0
- package/src/runtime.ts +450 -0
- package/tsconfig.esm.json +7 -0
- 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,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
|
+
}
|