@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,76 @@
|
|
|
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
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface CreateWebhookRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface CreateWebhookRequest {
|
|
22
|
+
/**
|
|
23
|
+
* HTTPS URL to receive webhook deliveries. Must not point to
|
|
24
|
+
* private, loopback, link-local, or multicast addresses (SSRF prevention).
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof CreateWebhookRequest
|
|
28
|
+
*/
|
|
29
|
+
url: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof CreateWebhookRequest
|
|
34
|
+
*/
|
|
35
|
+
name?: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the CreateWebhookRequest interface.
|
|
40
|
+
*/
|
|
41
|
+
export function instanceOfCreateWebhookRequest(value: object): value is CreateWebhookRequest {
|
|
42
|
+
if (!('url' in value) || value['url'] === undefined) return false;
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function CreateWebhookRequestFromJSON(json: any): CreateWebhookRequest {
|
|
47
|
+
return CreateWebhookRequestFromJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function CreateWebhookRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateWebhookRequest {
|
|
51
|
+
if (json == null) {
|
|
52
|
+
return json;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
|
|
56
|
+
'url': json['url'],
|
|
57
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function CreateWebhookRequestToJSON(json: any): CreateWebhookRequest {
|
|
62
|
+
return CreateWebhookRequestToJSONTyped(json, false);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function CreateWebhookRequestToJSONTyped(value?: CreateWebhookRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
66
|
+
if (value == null) {
|
|
67
|
+
return value;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return {
|
|
71
|
+
|
|
72
|
+
'url': value['url'],
|
|
73
|
+
'name': value['name'],
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
@@ -0,0 +1,116 @@
|
|
|
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
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ErrorBody
|
|
20
|
+
*/
|
|
21
|
+
export interface ErrorBody {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {ErrorBodyCodeEnum}
|
|
25
|
+
* @memberof ErrorBody
|
|
26
|
+
*/
|
|
27
|
+
code: ErrorBodyCodeEnum;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof ErrorBody
|
|
32
|
+
*/
|
|
33
|
+
message: string;
|
|
34
|
+
/**
|
|
35
|
+
* True for rate_limited, capacity_exceeded, and internal_error.
|
|
36
|
+
* Clients should retry with exponential backoff when true.
|
|
37
|
+
*
|
|
38
|
+
* @type {boolean}
|
|
39
|
+
* @memberof ErrorBody
|
|
40
|
+
*/
|
|
41
|
+
retryable: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Server-assigned request ID for correlation with logs.
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof ErrorBody
|
|
46
|
+
*/
|
|
47
|
+
request_id?: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @export
|
|
52
|
+
* @enum {string}
|
|
53
|
+
*/
|
|
54
|
+
export enum ErrorBodyCodeEnum {
|
|
55
|
+
VALIDATION_ERROR = 'validation_error',
|
|
56
|
+
UNAUTHORIZED = 'unauthorized',
|
|
57
|
+
FORBIDDEN = 'forbidden',
|
|
58
|
+
NOT_FOUND = 'not_found',
|
|
59
|
+
CONFLICT = 'conflict',
|
|
60
|
+
RATE_LIMITED = 'rate_limited',
|
|
61
|
+
QUOTA_EXCEEDED = 'quota_exceeded',
|
|
62
|
+
CAPACITY_EXCEEDED = 'capacity_exceeded',
|
|
63
|
+
SOURCE_INVALID = 'source_invalid',
|
|
64
|
+
SOURCE_UNSUPPORTED = 'source_unsupported',
|
|
65
|
+
JOB_NOT_CANCELABLE = 'job_not_cancelable',
|
|
66
|
+
OUTPUT_NOT_READY = 'output_not_ready',
|
|
67
|
+
OUTPUT_PERSISTENCE_FAILED = 'output_persistence_failed',
|
|
68
|
+
INTERNAL_ERROR = 'internal_error'
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Check if a given object implements the ErrorBody interface.
|
|
74
|
+
*/
|
|
75
|
+
export function instanceOfErrorBody(value: object): value is ErrorBody {
|
|
76
|
+
if (!('code' in value) || value['code'] === undefined) return false;
|
|
77
|
+
if (!('message' in value) || value['message'] === undefined) return false;
|
|
78
|
+
if (!('retryable' in value) || value['retryable'] === undefined) return false;
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function ErrorBodyFromJSON(json: any): ErrorBody {
|
|
83
|
+
return ErrorBodyFromJSONTyped(json, false);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function ErrorBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorBody {
|
|
87
|
+
if (json == null) {
|
|
88
|
+
return json;
|
|
89
|
+
}
|
|
90
|
+
return {
|
|
91
|
+
|
|
92
|
+
'code': json['code'],
|
|
93
|
+
'message': json['message'],
|
|
94
|
+
'retryable': json['retryable'],
|
|
95
|
+
'request_id': json['request_id'] == null ? undefined : json['request_id'],
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function ErrorBodyToJSON(json: any): ErrorBody {
|
|
100
|
+
return ErrorBodyToJSONTyped(json, false);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export function ErrorBodyToJSONTyped(value?: ErrorBody | null, ignoreDiscriminator: boolean = false): any {
|
|
104
|
+
if (value == null) {
|
|
105
|
+
return value;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
return {
|
|
109
|
+
|
|
110
|
+
'code': value['code'],
|
|
111
|
+
'message': value['message'],
|
|
112
|
+
'retryable': value['retryable'],
|
|
113
|
+
'request_id': value['request_id'],
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
|
|
@@ -0,0 +1,74 @@
|
|
|
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
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { ErrorBody } from './ErrorBody';
|
|
17
|
+
import {
|
|
18
|
+
ErrorBodyFromJSON,
|
|
19
|
+
ErrorBodyFromJSONTyped,
|
|
20
|
+
ErrorBodyToJSON,
|
|
21
|
+
ErrorBodyToJSONTyped,
|
|
22
|
+
} from './ErrorBody';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface ErrorEnvelope
|
|
28
|
+
*/
|
|
29
|
+
export interface ErrorEnvelope {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {ErrorBody}
|
|
33
|
+
* @memberof ErrorEnvelope
|
|
34
|
+
*/
|
|
35
|
+
error: ErrorBody;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Check if a given object implements the ErrorEnvelope interface.
|
|
40
|
+
*/
|
|
41
|
+
export function instanceOfErrorEnvelope(value: object): value is ErrorEnvelope {
|
|
42
|
+
if (!('error' in value) || value['error'] === undefined) return false;
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function ErrorEnvelopeFromJSON(json: any): ErrorEnvelope {
|
|
47
|
+
return ErrorEnvelopeFromJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function ErrorEnvelopeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorEnvelope {
|
|
51
|
+
if (json == null) {
|
|
52
|
+
return json;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
|
|
56
|
+
'error': ErrorBodyFromJSON(json['error']),
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function ErrorEnvelopeToJSON(json: any): ErrorEnvelope {
|
|
61
|
+
return ErrorEnvelopeToJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function ErrorEnvelopeToJSONTyped(value?: ErrorEnvelope | null, ignoreDiscriminator: boolean = false): any {
|
|
65
|
+
if (value == null) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'error': ErrorBodyToJSON(value['error']),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
@@ -0,0 +1,149 @@
|
|
|
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
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface JobOutputInfo
|
|
20
|
+
*/
|
|
21
|
+
export interface JobOutputInfo {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {JobOutputInfoStateEnum}
|
|
25
|
+
* @memberof JobOutputInfo
|
|
26
|
+
*/
|
|
27
|
+
state: JobOutputInfoStateEnum;
|
|
28
|
+
/**
|
|
29
|
+
* Output container format ("mp4" or "mkv").
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof JobOutputInfo
|
|
32
|
+
*/
|
|
33
|
+
container: string;
|
|
34
|
+
/**
|
|
35
|
+
* Whether the output file actually contains audio.
|
|
36
|
+
* Reflects the muxed result, not the request flag — a
|
|
37
|
+
* video-only source with audio requested will report false.
|
|
38
|
+
*
|
|
39
|
+
* @type {boolean}
|
|
40
|
+
* @memberof JobOutputInfo
|
|
41
|
+
*/
|
|
42
|
+
audio: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Customer-requested output height, echoed back. Null when the
|
|
45
|
+
* job ran at source dimensions (passthrough).
|
|
46
|
+
*
|
|
47
|
+
* @type {number}
|
|
48
|
+
* @memberof JobOutputInfo
|
|
49
|
+
*/
|
|
50
|
+
target_height?: number;
|
|
51
|
+
/**
|
|
52
|
+
* Actual encoded output width in pixels (post-ffprobe). Null until
|
|
53
|
+
* the job completes or if the probe failed.
|
|
54
|
+
*
|
|
55
|
+
* @type {number}
|
|
56
|
+
* @memberof JobOutputInfo
|
|
57
|
+
*/
|
|
58
|
+
width?: number;
|
|
59
|
+
/**
|
|
60
|
+
* Actual encoded output height in pixels. See `width`.
|
|
61
|
+
* @type {number}
|
|
62
|
+
* @memberof JobOutputInfo
|
|
63
|
+
*/
|
|
64
|
+
height?: number;
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* @type {number}
|
|
68
|
+
* @memberof JobOutputInfo
|
|
69
|
+
*/
|
|
70
|
+
bytes?: number;
|
|
71
|
+
/**
|
|
72
|
+
*
|
|
73
|
+
* @type {string}
|
|
74
|
+
* @memberof JobOutputInfo
|
|
75
|
+
*/
|
|
76
|
+
sha256?: string;
|
|
77
|
+
/**
|
|
78
|
+
*
|
|
79
|
+
* @type {Date}
|
|
80
|
+
* @memberof JobOutputInfo
|
|
81
|
+
*/
|
|
82
|
+
retention_expires_at?: Date;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* @export
|
|
87
|
+
* @enum {string}
|
|
88
|
+
*/
|
|
89
|
+
export enum JobOutputInfoStateEnum {
|
|
90
|
+
PENDING = 'pending',
|
|
91
|
+
AVAILABLE = 'available'
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Check if a given object implements the JobOutputInfo interface.
|
|
97
|
+
*/
|
|
98
|
+
export function instanceOfJobOutputInfo(value: object): value is JobOutputInfo {
|
|
99
|
+
if (!('state' in value) || value['state'] === undefined) return false;
|
|
100
|
+
if (!('container' in value) || value['container'] === undefined) return false;
|
|
101
|
+
if (!('audio' in value) || value['audio'] === undefined) return false;
|
|
102
|
+
return true;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export function JobOutputInfoFromJSON(json: any): JobOutputInfo {
|
|
106
|
+
return JobOutputInfoFromJSONTyped(json, false);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function JobOutputInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): JobOutputInfo {
|
|
110
|
+
if (json == null) {
|
|
111
|
+
return json;
|
|
112
|
+
}
|
|
113
|
+
return {
|
|
114
|
+
|
|
115
|
+
'state': json['state'],
|
|
116
|
+
'container': json['container'],
|
|
117
|
+
'audio': json['audio'],
|
|
118
|
+
'target_height': json['target_height'] == null ? undefined : json['target_height'],
|
|
119
|
+
'width': json['width'] == null ? undefined : json['width'],
|
|
120
|
+
'height': json['height'] == null ? undefined : json['height'],
|
|
121
|
+
'bytes': json['bytes'] == null ? undefined : json['bytes'],
|
|
122
|
+
'sha256': json['sha256'] == null ? undefined : json['sha256'],
|
|
123
|
+
'retention_expires_at': json['retention_expires_at'] == null ? undefined : (new Date(json['retention_expires_at'])),
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export function JobOutputInfoToJSON(json: any): JobOutputInfo {
|
|
128
|
+
return JobOutputInfoToJSONTyped(json, false);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export function JobOutputInfoToJSONTyped(value?: JobOutputInfo | null, ignoreDiscriminator: boolean = false): any {
|
|
132
|
+
if (value == null) {
|
|
133
|
+
return value;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return {
|
|
137
|
+
|
|
138
|
+
'state': value['state'],
|
|
139
|
+
'container': value['container'],
|
|
140
|
+
'audio': value['audio'],
|
|
141
|
+
'target_height': value['target_height'],
|
|
142
|
+
'width': value['width'],
|
|
143
|
+
'height': value['height'],
|
|
144
|
+
'bytes': value['bytes'],
|
|
145
|
+
'sha256': value['sha256'],
|
|
146
|
+
'retention_expires_at': value['retention_expires_at'] == null ? value['retention_expires_at'] : value['retention_expires_at'].toISOString(),
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
|
|
@@ -0,0 +1,76 @@
|
|
|
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
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Encoding profile ID. Coffee-themed naming: prep time maps to encode speed,
|
|
17
|
+
* bare name is the 8-bit default (universal decoder compatibility),
|
|
18
|
+
* `-10bit` suffix opts into HEVC Main10 for higher-quality playback on
|
|
19
|
+
* newer decoders.
|
|
20
|
+
*
|
|
21
|
+
* **8-bit (default):**
|
|
22
|
+
* - `sophon-espresso` — fastest, lowest compression
|
|
23
|
+
* - `sophon-cortado` — balanced speed and quality
|
|
24
|
+
* - `sophon-americano` — slowest, highest compression
|
|
25
|
+
*
|
|
26
|
+
* **10-bit (HEVC Main10):**
|
|
27
|
+
* - `sophon-espresso-10bit`
|
|
28
|
+
* - `sophon-cortado-10bit`
|
|
29
|
+
* - `sophon-americano-10bit`
|
|
30
|
+
*
|
|
31
|
+
* **Adaptive dispatcher:**
|
|
32
|
+
* - `sophon-auto` — public opt-in profile. The worker classifies
|
|
33
|
+
* the source and records the concrete `effective_profile_id` on
|
|
34
|
+
* the job once dispatch resolves.
|
|
35
|
+
*
|
|
36
|
+
* @export
|
|
37
|
+
* @enum {string}
|
|
38
|
+
*/
|
|
39
|
+
export enum JobProfile {
|
|
40
|
+
SOPHON_ESPRESSO = 'sophon-espresso',
|
|
41
|
+
SOPHON_CORTADO = 'sophon-cortado',
|
|
42
|
+
SOPHON_AMERICANO = 'sophon-americano',
|
|
43
|
+
SOPHON_ESPRESSO_10BIT = 'sophon-espresso-10bit',
|
|
44
|
+
SOPHON_CORTADO_10BIT = 'sophon-cortado-10bit',
|
|
45
|
+
SOPHON_AMERICANO_10BIT = 'sophon-americano-10bit',
|
|
46
|
+
SOPHON_AUTO = 'sophon-auto'
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
export function instanceOfJobProfile(value: any): boolean {
|
|
51
|
+
for (const key in JobProfile) {
|
|
52
|
+
if (Object.prototype.hasOwnProperty.call(JobProfile, key)) {
|
|
53
|
+
if (JobProfile[key as keyof typeof JobProfile] === value) {
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function JobProfileFromJSON(json: any): JobProfile {
|
|
62
|
+
return JobProfileFromJSONTyped(json, false);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function JobProfileFromJSONTyped(json: any, ignoreDiscriminator: boolean): JobProfile {
|
|
66
|
+
return json as JobProfile;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function JobProfileToJSON(value?: JobProfile | null): any {
|
|
70
|
+
return value as any;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function JobProfileToJSONTyped(value: any, ignoreDiscriminator: boolean): JobProfile {
|
|
74
|
+
return value as JobProfile;
|
|
75
|
+
}
|
|
76
|
+
|
|
@@ -0,0 +1,133 @@
|
|
|
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
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { JobStatus } from './JobStatus';
|
|
17
|
+
import {
|
|
18
|
+
JobStatusFromJSON,
|
|
19
|
+
JobStatusFromJSONTyped,
|
|
20
|
+
JobStatusToJSON,
|
|
21
|
+
JobStatusToJSONTyped,
|
|
22
|
+
} from './JobStatus';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface JobProgress
|
|
28
|
+
*/
|
|
29
|
+
export interface JobProgress {
|
|
30
|
+
/**
|
|
31
|
+
* Current processing stage label (e.g. "probing", "encoding", "muxing").
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof JobProgress
|
|
34
|
+
*/
|
|
35
|
+
stage?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Canonical pipeline phase used for progress semantics.
|
|
38
|
+
* @type {JobStatus}
|
|
39
|
+
* @memberof JobProgress
|
|
40
|
+
*/
|
|
41
|
+
phase: JobStatus;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof JobProgress
|
|
46
|
+
*/
|
|
47
|
+
percent: number;
|
|
48
|
+
/**
|
|
49
|
+
* Progress within the current phase. Null before active processing.
|
|
50
|
+
* @type {number}
|
|
51
|
+
* @memberof JobProgress
|
|
52
|
+
*/
|
|
53
|
+
phase_percent?: number;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {number}
|
|
57
|
+
* @memberof JobProgress
|
|
58
|
+
*/
|
|
59
|
+
fps?: number;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {number}
|
|
63
|
+
* @memberof JobProgress
|
|
64
|
+
*/
|
|
65
|
+
eta_seconds?: number;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @type {number}
|
|
69
|
+
* @memberof JobProgress
|
|
70
|
+
*/
|
|
71
|
+
frames_done?: number;
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @type {number}
|
|
75
|
+
* @memberof JobProgress
|
|
76
|
+
*/
|
|
77
|
+
frames_total?: number;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Check if a given object implements the JobProgress interface.
|
|
84
|
+
*/
|
|
85
|
+
export function instanceOfJobProgress(value: object): value is JobProgress {
|
|
86
|
+
if (!('phase' in value) || value['phase'] === undefined) return false;
|
|
87
|
+
if (!('percent' in value) || value['percent'] === undefined) return false;
|
|
88
|
+
return true;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function JobProgressFromJSON(json: any): JobProgress {
|
|
92
|
+
return JobProgressFromJSONTyped(json, false);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function JobProgressFromJSONTyped(json: any, ignoreDiscriminator: boolean): JobProgress {
|
|
96
|
+
if (json == null) {
|
|
97
|
+
return json;
|
|
98
|
+
}
|
|
99
|
+
return {
|
|
100
|
+
|
|
101
|
+
'stage': json['stage'] == null ? undefined : json['stage'],
|
|
102
|
+
'phase': JobStatusFromJSON(json['phase']),
|
|
103
|
+
'percent': json['percent'],
|
|
104
|
+
'phase_percent': json['phase_percent'] == null ? undefined : json['phase_percent'],
|
|
105
|
+
'fps': json['fps'] == null ? undefined : json['fps'],
|
|
106
|
+
'eta_seconds': json['eta_seconds'] == null ? undefined : json['eta_seconds'],
|
|
107
|
+
'frames_done': json['frames_done'] == null ? undefined : json['frames_done'],
|
|
108
|
+
'frames_total': json['frames_total'] == null ? undefined : json['frames_total'],
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export function JobProgressToJSON(json: any): JobProgress {
|
|
113
|
+
return JobProgressToJSONTyped(json, false);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export function JobProgressToJSONTyped(value?: JobProgress | null, ignoreDiscriminator: boolean = false): any {
|
|
117
|
+
if (value == null) {
|
|
118
|
+
return value;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
return {
|
|
122
|
+
|
|
123
|
+
'stage': value['stage'],
|
|
124
|
+
'phase': JobStatusToJSON(value['phase']),
|
|
125
|
+
'percent': value['percent'],
|
|
126
|
+
'phase_percent': value['phase_percent'],
|
|
127
|
+
'fps': value['fps'],
|
|
128
|
+
'eta_seconds': value['eta_seconds'],
|
|
129
|
+
'frames_done': value['frames_done'],
|
|
130
|
+
'frames_total': value['frames_total'],
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
|