@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,134 @@
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 type { JobStatus } from './JobStatus';
13
+ import type { JobSourceInfo } from './JobSourceInfo';
14
+ import type { JobProfile } from './JobProfile';
15
+ import type { JobOutputInfo } from './JobOutputInfo';
16
+ import type { JobProgress } from './JobProgress';
17
+ /**
18
+ *
19
+ * @export
20
+ * @interface JobResponse
21
+ */
22
+ export interface JobResponse {
23
+ /**
24
+ *
25
+ * @type {string}
26
+ * @memberof JobResponse
27
+ */
28
+ id: string;
29
+ /**
30
+ *
31
+ * @type {JobStatus}
32
+ * @memberof JobResponse
33
+ */
34
+ status: JobStatus;
35
+ /**
36
+ *
37
+ * @type {string}
38
+ * @memberof JobResponse
39
+ */
40
+ status_reason?: string;
41
+ /**
42
+ *
43
+ * @type {number}
44
+ * @memberof JobResponse
45
+ */
46
+ attempt: number;
47
+ /**
48
+ * Whether the job can still be retried (attempt < max_attempts and not terminal).
49
+ * @type {boolean}
50
+ * @memberof JobResponse
51
+ */
52
+ retryable: boolean;
53
+ /**
54
+ * Public profile ID submitted by the customer. For adaptive jobs this
55
+ * stays `sophon-auto`; see `effective_profile_id` for the worker's
56
+ * resolved concrete profile.
57
+ *
58
+ * @type {JobProfile}
59
+ * @memberof JobResponse
60
+ */
61
+ profile: JobProfile;
62
+ /**
63
+ * Concrete profile resolved by the worker. Omitted until dispatch
64
+ * resolves. On explicit-profile jobs this equals `profile`; on
65
+ * `sophon-auto` jobs it is an internal adaptive profile ID.
66
+ *
67
+ * @type {string}
68
+ * @memberof JobResponse
69
+ */
70
+ effective_profile_id?: string;
71
+ /**
72
+ *
73
+ * @type {JobSourceInfo}
74
+ * @memberof JobResponse
75
+ */
76
+ source: JobSourceInfo;
77
+ /**
78
+ *
79
+ * @type {JobProgress}
80
+ * @memberof JobResponse
81
+ */
82
+ progress: JobProgress;
83
+ /**
84
+ *
85
+ * @type {JobOutputInfo}
86
+ * @memberof JobResponse
87
+ */
88
+ output: JobOutputInfo;
89
+ /**
90
+ * Arbitrary JSON object attached to a job. Keys and values are passed
91
+ * through unchanged to webhook deliveries and echoed on job reads. The
92
+ * serialized representation must not exceed 16 KiB. Free-form; SDKs
93
+ * surface this as a `Record<string, unknown>` / `dict[str, Any]` /
94
+ * `map[string]interface{}` depending on language.
95
+ *
96
+ * @type {{ [key: string]: any; }}
97
+ * @memberof JobResponse
98
+ */
99
+ metadata: {
100
+ [key: string]: any;
101
+ };
102
+ /**
103
+ *
104
+ * @type {Date}
105
+ * @memberof JobResponse
106
+ */
107
+ created_at: Date;
108
+ /**
109
+ *
110
+ * @type {Date}
111
+ * @memberof JobResponse
112
+ */
113
+ started_at?: Date;
114
+ /**
115
+ *
116
+ * @type {Date}
117
+ * @memberof JobResponse
118
+ */
119
+ completed_at?: Date;
120
+ /**
121
+ *
122
+ * @type {string}
123
+ * @memberof JobResponse
124
+ */
125
+ error?: string;
126
+ }
127
+ /**
128
+ * Check if a given object implements the JobResponse interface.
129
+ */
130
+ export declare function instanceOfJobResponse(value: object): value is JobResponse;
131
+ export declare function JobResponseFromJSON(json: any): JobResponse;
132
+ export declare function JobResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): JobResponse;
133
+ export declare function JobResponseToJSON(json: any): JobResponse;
134
+ export declare function JobResponseToJSONTyped(value?: JobResponse | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,94 @@
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 { JobStatusFromJSON, JobStatusToJSON, } from './JobStatus';
15
+ import { JobSourceInfoFromJSON, JobSourceInfoToJSON, } from './JobSourceInfo';
16
+ import { JobProfileFromJSON, JobProfileToJSON, } from './JobProfile';
17
+ import { JobOutputInfoFromJSON, JobOutputInfoToJSON, } from './JobOutputInfo';
18
+ import { JobProgressFromJSON, JobProgressToJSON, } from './JobProgress';
19
+ /**
20
+ * Check if a given object implements the JobResponse interface.
21
+ */
22
+ export function instanceOfJobResponse(value) {
23
+ if (!('id' in value) || value['id'] === undefined)
24
+ return false;
25
+ if (!('status' in value) || value['status'] === undefined)
26
+ return false;
27
+ if (!('attempt' in value) || value['attempt'] === undefined)
28
+ return false;
29
+ if (!('retryable' in value) || value['retryable'] === undefined)
30
+ return false;
31
+ if (!('profile' in value) || value['profile'] === undefined)
32
+ return false;
33
+ if (!('source' in value) || value['source'] === undefined)
34
+ return false;
35
+ if (!('progress' in value) || value['progress'] === undefined)
36
+ return false;
37
+ if (!('output' in value) || value['output'] === undefined)
38
+ return false;
39
+ if (!('metadata' in value) || value['metadata'] === undefined)
40
+ return false;
41
+ if (!('created_at' in value) || value['created_at'] === undefined)
42
+ return false;
43
+ return true;
44
+ }
45
+ export function JobResponseFromJSON(json) {
46
+ return JobResponseFromJSONTyped(json, false);
47
+ }
48
+ export function JobResponseFromJSONTyped(json, ignoreDiscriminator) {
49
+ if (json == null) {
50
+ return json;
51
+ }
52
+ return {
53
+ 'id': json['id'],
54
+ 'status': JobStatusFromJSON(json['status']),
55
+ 'status_reason': json['status_reason'] == null ? undefined : json['status_reason'],
56
+ 'attempt': json['attempt'],
57
+ 'retryable': json['retryable'],
58
+ 'profile': JobProfileFromJSON(json['profile']),
59
+ 'effective_profile_id': json['effective_profile_id'] == null ? undefined : json['effective_profile_id'],
60
+ 'source': JobSourceInfoFromJSON(json['source']),
61
+ 'progress': JobProgressFromJSON(json['progress']),
62
+ 'output': JobOutputInfoFromJSON(json['output']),
63
+ 'metadata': json['metadata'],
64
+ 'created_at': (new Date(json['created_at'])),
65
+ 'started_at': json['started_at'] == null ? undefined : (new Date(json['started_at'])),
66
+ 'completed_at': json['completed_at'] == null ? undefined : (new Date(json['completed_at'])),
67
+ 'error': json['error'] == null ? undefined : json['error'],
68
+ };
69
+ }
70
+ export function JobResponseToJSON(json) {
71
+ return JobResponseToJSONTyped(json, false);
72
+ }
73
+ export function JobResponseToJSONTyped(value, ignoreDiscriminator = false) {
74
+ if (value == null) {
75
+ return value;
76
+ }
77
+ return {
78
+ 'id': value['id'],
79
+ 'status': JobStatusToJSON(value['status']),
80
+ 'status_reason': value['status_reason'],
81
+ 'attempt': value['attempt'],
82
+ 'retryable': value['retryable'],
83
+ 'profile': JobProfileToJSON(value['profile']),
84
+ 'effective_profile_id': value['effective_profile_id'],
85
+ 'source': JobSourceInfoToJSON(value['source']),
86
+ 'progress': JobProgressToJSON(value['progress']),
87
+ 'output': JobOutputInfoToJSON(value['output']),
88
+ 'metadata': value['metadata'],
89
+ 'created_at': value['created_at'].toISOString(),
90
+ 'started_at': value['started_at'] == null ? value['started_at'] : value['started_at'].toISOString(),
91
+ 'completed_at': value['completed_at'] == null ? value['completed_at'] : value['completed_at'].toISOString(),
92
+ 'error': value['error'],
93
+ };
94
+ }
@@ -0,0 +1,62 @@
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
+ /**
13
+ *
14
+ * @export
15
+ * @interface JobSourceInfo
16
+ */
17
+ export interface JobSourceInfo {
18
+ /**
19
+ * Original file name of the source.
20
+ * @type {string}
21
+ * @memberof JobSourceInfo
22
+ */
23
+ name?: string;
24
+ /**
25
+ *
26
+ * @type {number}
27
+ * @memberof JobSourceInfo
28
+ */
29
+ bytes?: number;
30
+ /**
31
+ * SHA-256 hex digest of the source file.
32
+ * @type {string}
33
+ * @memberof JobSourceInfo
34
+ */
35
+ sha256: string;
36
+ /**
37
+ *
38
+ * @type {number}
39
+ * @memberof JobSourceInfo
40
+ */
41
+ duration_seconds?: number;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof JobSourceInfo
46
+ */
47
+ resolution?: string;
48
+ /**
49
+ *
50
+ * @type {string}
51
+ * @memberof JobSourceInfo
52
+ */
53
+ frame_rate?: string;
54
+ }
55
+ /**
56
+ * Check if a given object implements the JobSourceInfo interface.
57
+ */
58
+ export declare function instanceOfJobSourceInfo(value: object): value is JobSourceInfo;
59
+ export declare function JobSourceInfoFromJSON(json: any): JobSourceInfo;
60
+ export declare function JobSourceInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): JobSourceInfo;
61
+ export declare function JobSourceInfoToJSON(json: any): JobSourceInfo;
62
+ export declare function JobSourceInfoToJSONTyped(value?: JobSourceInfo | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,53 @@
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
+ * Check if a given object implements the JobSourceInfo interface.
16
+ */
17
+ export function instanceOfJobSourceInfo(value) {
18
+ if (!('sha256' in value) || value['sha256'] === undefined)
19
+ return false;
20
+ return true;
21
+ }
22
+ export function JobSourceInfoFromJSON(json) {
23
+ return JobSourceInfoFromJSONTyped(json, false);
24
+ }
25
+ export function JobSourceInfoFromJSONTyped(json, ignoreDiscriminator) {
26
+ if (json == null) {
27
+ return json;
28
+ }
29
+ return {
30
+ 'name': json['name'] == null ? undefined : json['name'],
31
+ 'bytes': json['bytes'] == null ? undefined : json['bytes'],
32
+ 'sha256': json['sha256'],
33
+ 'duration_seconds': json['duration_seconds'] == null ? undefined : json['duration_seconds'],
34
+ 'resolution': json['resolution'] == null ? undefined : json['resolution'],
35
+ 'frame_rate': json['frame_rate'] == null ? undefined : json['frame_rate'],
36
+ };
37
+ }
38
+ export function JobSourceInfoToJSON(json) {
39
+ return JobSourceInfoToJSONTyped(json, false);
40
+ }
41
+ export function JobSourceInfoToJSONTyped(value, ignoreDiscriminator = false) {
42
+ if (value == null) {
43
+ return value;
44
+ }
45
+ return {
46
+ 'name': value['name'],
47
+ 'bytes': value['bytes'],
48
+ 'sha256': value['sha256'],
49
+ 'duration_seconds': value['duration_seconds'],
50
+ 'resolution': value['resolution'],
51
+ 'frame_rate': value['frame_rate'],
52
+ };
53
+ }
@@ -0,0 +1,24 @@
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
+ /**
13
+ * Discriminator for `JobSource` variants.
14
+ * @export
15
+ * @enum {string}
16
+ */
17
+ export declare enum JobSourceType {
18
+ UPLOAD = "upload"
19
+ }
20
+ export declare function instanceOfJobSourceType(value: any): boolean;
21
+ export declare function JobSourceTypeFromJSON(json: any): JobSourceType;
22
+ export declare function JobSourceTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): JobSourceType;
23
+ export declare function JobSourceTypeToJSON(value?: JobSourceType | null): any;
24
+ export declare function JobSourceTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): JobSourceType;
@@ -0,0 +1,44 @@
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
+ * Discriminator for `JobSource` variants.
16
+ * @export
17
+ * @enum {string}
18
+ */
19
+ export var JobSourceType;
20
+ (function (JobSourceType) {
21
+ JobSourceType["UPLOAD"] = "upload";
22
+ })(JobSourceType || (JobSourceType = {}));
23
+ export function instanceOfJobSourceType(value) {
24
+ for (const key in JobSourceType) {
25
+ if (Object.prototype.hasOwnProperty.call(JobSourceType, key)) {
26
+ if (JobSourceType[key] === value) {
27
+ return true;
28
+ }
29
+ }
30
+ }
31
+ return false;
32
+ }
33
+ export function JobSourceTypeFromJSON(json) {
34
+ return JobSourceTypeFromJSONTyped(json, false);
35
+ }
36
+ export function JobSourceTypeFromJSONTyped(json, ignoreDiscriminator) {
37
+ return json;
38
+ }
39
+ export function JobSourceTypeToJSON(value) {
40
+ return value;
41
+ }
42
+ export function JobSourceTypeToJSONTyped(value, ignoreDiscriminator) {
43
+ return value;
44
+ }
@@ -0,0 +1,31 @@
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
+ /**
13
+ * Lifecycle status for an encoding job.
14
+ * @export
15
+ * @enum {string}
16
+ */
17
+ export declare enum JobStatus {
18
+ QUEUED = "queued",
19
+ PROBING = "probing",
20
+ ENCODING = "encoding",
21
+ MUXING = "muxing",
22
+ UPLOADING_OUTPUT = "uploading_output",
23
+ COMPLETED = "completed",
24
+ FAILED = "failed",
25
+ CANCELED = "canceled"
26
+ }
27
+ export declare function instanceOfJobStatus(value: any): boolean;
28
+ export declare function JobStatusFromJSON(json: any): JobStatus;
29
+ export declare function JobStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): JobStatus;
30
+ export declare function JobStatusToJSON(value?: JobStatus | null): any;
31
+ export declare function JobStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): JobStatus;
@@ -0,0 +1,51 @@
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
+ * Lifecycle status for an encoding job.
16
+ * @export
17
+ * @enum {string}
18
+ */
19
+ export var JobStatus;
20
+ (function (JobStatus) {
21
+ JobStatus["QUEUED"] = "queued";
22
+ JobStatus["PROBING"] = "probing";
23
+ JobStatus["ENCODING"] = "encoding";
24
+ JobStatus["MUXING"] = "muxing";
25
+ JobStatus["UPLOADING_OUTPUT"] = "uploading_output";
26
+ JobStatus["COMPLETED"] = "completed";
27
+ JobStatus["FAILED"] = "failed";
28
+ JobStatus["CANCELED"] = "canceled";
29
+ })(JobStatus || (JobStatus = {}));
30
+ export function instanceOfJobStatus(value) {
31
+ for (const key in JobStatus) {
32
+ if (Object.prototype.hasOwnProperty.call(JobStatus, key)) {
33
+ if (JobStatus[key] === value) {
34
+ return true;
35
+ }
36
+ }
37
+ }
38
+ return false;
39
+ }
40
+ export function JobStatusFromJSON(json) {
41
+ return JobStatusFromJSONTyped(json, false);
42
+ }
43
+ export function JobStatusFromJSONTyped(json, ignoreDiscriminator) {
44
+ return json;
45
+ }
46
+ export function JobStatusToJSON(value) {
47
+ return value;
48
+ }
49
+ export function JobStatusToJSONTyped(value, ignoreDiscriminator) {
50
+ return value;
51
+ }
@@ -0,0 +1,45 @@
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 type { JobResponse } from './JobResponse';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface ListJobsResponse
17
+ */
18
+ export interface ListJobsResponse {
19
+ /**
20
+ *
21
+ * @type {Array<JobResponse>}
22
+ * @memberof ListJobsResponse
23
+ */
24
+ jobs: Array<JobResponse>;
25
+ /**
26
+ * Opaque cursor for the next page. Null when no more results.
27
+ * @type {string}
28
+ * @memberof ListJobsResponse
29
+ */
30
+ next_cursor?: string;
31
+ /**
32
+ *
33
+ * @type {boolean}
34
+ * @memberof ListJobsResponse
35
+ */
36
+ has_more: boolean;
37
+ }
38
+ /**
39
+ * Check if a given object implements the ListJobsResponse interface.
40
+ */
41
+ export declare function instanceOfListJobsResponse(value: object): value is ListJobsResponse;
42
+ export declare function ListJobsResponseFromJSON(json: any): ListJobsResponse;
43
+ export declare function ListJobsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ListJobsResponse;
44
+ export declare function ListJobsResponseToJSON(json: any): ListJobsResponse;
45
+ export declare function ListJobsResponseToJSONTyped(value?: ListJobsResponse | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,50 @@
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 { JobResponseFromJSON, JobResponseToJSON, } from './JobResponse';
15
+ /**
16
+ * Check if a given object implements the ListJobsResponse interface.
17
+ */
18
+ export function instanceOfListJobsResponse(value) {
19
+ if (!('jobs' in value) || value['jobs'] === undefined)
20
+ return false;
21
+ if (!('has_more' in value) || value['has_more'] === undefined)
22
+ return false;
23
+ return true;
24
+ }
25
+ export function ListJobsResponseFromJSON(json) {
26
+ return ListJobsResponseFromJSONTyped(json, false);
27
+ }
28
+ export function ListJobsResponseFromJSONTyped(json, ignoreDiscriminator) {
29
+ if (json == null) {
30
+ return json;
31
+ }
32
+ return {
33
+ 'jobs': (json['jobs'].map(JobResponseFromJSON)),
34
+ 'next_cursor': json['next_cursor'] == null ? undefined : json['next_cursor'],
35
+ 'has_more': json['has_more'],
36
+ };
37
+ }
38
+ export function ListJobsResponseToJSON(json) {
39
+ return ListJobsResponseToJSONTyped(json, false);
40
+ }
41
+ export function ListJobsResponseToJSONTyped(value, ignoreDiscriminator = false) {
42
+ if (value == null) {
43
+ return value;
44
+ }
45
+ return {
46
+ 'jobs': (value['jobs'].map(JobResponseToJSON)),
47
+ 'next_cursor': value['next_cursor'],
48
+ 'has_more': value['has_more'],
49
+ };
50
+ }
@@ -0,0 +1,27 @@
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
+ /**
13
+ * Output container format. MP4 is widely compatible; MKV
14
+ * supports a broader range of audio codecs for passthrough.
15
+ *
16
+ * @export
17
+ * @enum {string}
18
+ */
19
+ export declare enum OutputContainer {
20
+ MP4 = "mp4",
21
+ MKV = "mkv"
22
+ }
23
+ export declare function instanceOfOutputContainer(value: any): boolean;
24
+ export declare function OutputContainerFromJSON(json: any): OutputContainer;
25
+ export declare function OutputContainerFromJSONTyped(json: any, ignoreDiscriminator: boolean): OutputContainer;
26
+ export declare function OutputContainerToJSON(value?: OutputContainer | null): any;
27
+ export declare function OutputContainerToJSONTyped(value: any, ignoreDiscriminator: boolean): OutputContainer;
@@ -0,0 +1,47 @@
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
+ * Output container format. MP4 is widely compatible; MKV
16
+ * supports a broader range of audio codecs for passthrough.
17
+ *
18
+ * @export
19
+ * @enum {string}
20
+ */
21
+ export var OutputContainer;
22
+ (function (OutputContainer) {
23
+ OutputContainer["MP4"] = "mp4";
24
+ OutputContainer["MKV"] = "mkv";
25
+ })(OutputContainer || (OutputContainer = {}));
26
+ export function instanceOfOutputContainer(value) {
27
+ for (const key in OutputContainer) {
28
+ if (Object.prototype.hasOwnProperty.call(OutputContainer, key)) {
29
+ if (OutputContainer[key] === value) {
30
+ return true;
31
+ }
32
+ }
33
+ }
34
+ return false;
35
+ }
36
+ export function OutputContainerFromJSON(json) {
37
+ return OutputContainerFromJSONTyped(json, false);
38
+ }
39
+ export function OutputContainerFromJSONTyped(json, ignoreDiscriminator) {
40
+ return json;
41
+ }
42
+ export function OutputContainerToJSON(value) {
43
+ return value;
44
+ }
45
+ export function OutputContainerToJSONTyped(value, ignoreDiscriminator) {
46
+ return value;
47
+ }