@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,40 @@
1
+
2
+ # WebhookListItem
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `id` | string
10
+ `url` | string
11
+ `active` | boolean
12
+ `created_at` | Date
13
+
14
+ ## Example
15
+
16
+ ```typescript
17
+ import type { WebhookListItem } from '@liqhtworks/sophon-sdk'
18
+
19
+ // TODO: Update the object below with actual values
20
+ const example = {
21
+ "id": null,
22
+ "url": null,
23
+ "active": null,
24
+ "created_at": null,
25
+ } satisfies WebhookListItem
26
+
27
+ console.log(example)
28
+
29
+ // Convert the instance to a JSON string
30
+ const exampleJSON: string = JSON.stringify(example)
31
+ console.log(exampleJSON)
32
+
33
+ // Parse the JSON string back to an object
34
+ const exampleParsed = JSON.parse(exampleJSON) as WebhookListItem
35
+ console.log(exampleParsed)
36
+ ```
37
+
38
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
39
+
40
+
@@ -0,0 +1,34 @@
1
+
2
+ # WebhookListResponse
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `webhooks` | [Array<WebhookListItem>](WebhookListItem.md)
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import type { WebhookListResponse } from '@liqhtworks/sophon-sdk'
15
+
16
+ // TODO: Update the object below with actual values
17
+ const example = {
18
+ "webhooks": null,
19
+ } satisfies WebhookListResponse
20
+
21
+ console.log(example)
22
+
23
+ // Convert the instance to a JSON string
24
+ const exampleJSON: string = JSON.stringify(example)
25
+ console.log(exampleJSON)
26
+
27
+ // Parse the JSON string back to an object
28
+ const exampleParsed = JSON.parse(exampleJSON) as WebhookListResponse
29
+ console.log(exampleParsed)
30
+ ```
31
+
32
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
33
+
34
+
@@ -0,0 +1,42 @@
1
+
2
+ # WebhookResponse
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `id` | string
10
+ `url` | string
11
+ `secret` | string
12
+ `active` | boolean
13
+ `created_at` | Date
14
+
15
+ ## Example
16
+
17
+ ```typescript
18
+ import type { WebhookResponse } from '@liqhtworks/sophon-sdk'
19
+
20
+ // TODO: Update the object below with actual values
21
+ const example = {
22
+ "id": wh_abc123def456,
23
+ "url": null,
24
+ "secret": null,
25
+ "active": null,
26
+ "created_at": null,
27
+ } satisfies WebhookResponse
28
+
29
+ console.log(example)
30
+
31
+ // Convert the instance to a JSON string
32
+ const exampleJSON: string = JSON.stringify(example)
33
+ console.log(exampleJSON)
34
+
35
+ // Parse the JSON string back to an object
36
+ const exampleParsed = JSON.parse(exampleJSON) as WebhookResponse
37
+ console.log(exampleParsed)
38
+ ```
39
+
40
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
41
+
42
+
@@ -0,0 +1,235 @@
1
+ # WebhooksApi
2
+
3
+ All URIs are relative to *https://api.liqhtworks.xyz*
4
+
5
+ | Method | HTTP request | Description |
6
+ |------------- | ------------- | -------------|
7
+ | [**createWebhook**](WebhooksApi.md#createwebhookoperation) | **POST** /v1/webhooks | Register a webhook endpoint |
8
+ | [**deleteWebhook**](WebhooksApi.md#deletewebhook) | **DELETE** /v1/webhooks/{id} | Soft-delete a webhook endpoint |
9
+ | [**listWebhooks**](WebhooksApi.md#listwebhooks) | **GET** /v1/webhooks | List active webhook endpoints |
10
+
11
+
12
+
13
+ ## createWebhook
14
+
15
+ > WebhookResponse createWebhook(idempotencyKey, createWebhookRequest)
16
+
17
+ Register a webhook endpoint
18
+
19
+ Registers an HTTPS endpoint for terminal job events and returns the HMAC signing secret once at creation time.
20
+
21
+ ### Example
22
+
23
+ ```ts
24
+ import {
25
+ Configuration,
26
+ WebhooksApi,
27
+ } from '@liqhtworks/sophon-sdk';
28
+ import type { CreateWebhookOperationRequest } from '@liqhtworks/sophon-sdk';
29
+
30
+ async function example() {
31
+ console.log("🚀 Testing @liqhtworks/sophon-sdk SDK...");
32
+ const config = new Configuration({
33
+ // To configure API key authorization: sessionCookie
34
+ apiKey: "YOUR API KEY",
35
+ // Configure HTTP bearer authorization: bearerApiKey
36
+ accessToken: "YOUR BEARER TOKEN",
37
+ });
38
+ const api = new WebhooksApi(config);
39
+
40
+ const body = {
41
+ // string | Client-generated UUID or string for exactly-once semantics. Required on all POST endpoints. Replaying the same key with the same request body returns the original response without side effects.
42
+ idempotencyKey: idempotencyKey_example,
43
+ // CreateWebhookRequest
44
+ createWebhookRequest: ...,
45
+ } satisfies CreateWebhookOperationRequest;
46
+
47
+ try {
48
+ const data = await api.createWebhook(body);
49
+ console.log(data);
50
+ } catch (error) {
51
+ console.error(error);
52
+ }
53
+ }
54
+
55
+ // Run the test
56
+ example().catch(console.error);
57
+ ```
58
+
59
+ ### Parameters
60
+
61
+
62
+ | Name | Type | Description | Notes |
63
+ |------------- | ------------- | ------------- | -------------|
64
+ | **idempotencyKey** | `string` | Client-generated UUID or string for exactly-once semantics. Required on all POST endpoints. Replaying the same key with the same request body returns the original response without side effects. | [Defaults to `undefined`] |
65
+ | **createWebhookRequest** | [CreateWebhookRequest](CreateWebhookRequest.md) | | |
66
+
67
+ ### Return type
68
+
69
+ [**WebhookResponse**](WebhookResponse.md)
70
+
71
+ ### Authorization
72
+
73
+ [sessionCookie](../README.md#sessionCookie), [bearerApiKey](../README.md#bearerApiKey)
74
+
75
+ ### HTTP request headers
76
+
77
+ - **Content-Type**: `application/json`
78
+ - **Accept**: `application/json`
79
+
80
+
81
+ ### HTTP response details
82
+ | Status code | Description | Response headers |
83
+ |-------------|-------------|------------------|
84
+ | **201** | Webhook registered. The response includes the HMAC secret (shown only once). | * X-Request-Id - <br> |
85
+ | **400** | Invalid URL (non-HTTPS, private IP, userinfo, etc.). | * X-Request-Id - <br> |
86
+ | **401** | Missing or invalid credentials. | * X-Request-Id - <br> |
87
+ | **403** | Insufficient scope (requires webhooks:manage). | * X-Request-Id - <br> |
88
+ | **409** | Idempotency conflict. | * X-Request-Id - <br> |
89
+ | **429** | Rate limited. | * X-Request-Id - <br> |
90
+
91
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
92
+
93
+
94
+ ## deleteWebhook
95
+
96
+ > deleteWebhook(id)
97
+
98
+ Soft-delete a webhook endpoint
99
+
100
+ Sets the webhook to inactive. It will no longer receive deliveries.
101
+
102
+ ### Example
103
+
104
+ ```ts
105
+ import {
106
+ Configuration,
107
+ WebhooksApi,
108
+ } from '@liqhtworks/sophon-sdk';
109
+ import type { DeleteWebhookRequest } from '@liqhtworks/sophon-sdk';
110
+
111
+ async function example() {
112
+ console.log("🚀 Testing @liqhtworks/sophon-sdk SDK...");
113
+ const config = new Configuration({
114
+ // To configure API key authorization: sessionCookie
115
+ apiKey: "YOUR API KEY",
116
+ // Configure HTTP bearer authorization: bearerApiKey
117
+ accessToken: "YOUR BEARER TOKEN",
118
+ });
119
+ const api = new WebhooksApi(config);
120
+
121
+ const body = {
122
+ // string
123
+ id: id_example,
124
+ } satisfies DeleteWebhookRequest;
125
+
126
+ try {
127
+ const data = await api.deleteWebhook(body);
128
+ console.log(data);
129
+ } catch (error) {
130
+ console.error(error);
131
+ }
132
+ }
133
+
134
+ // Run the test
135
+ example().catch(console.error);
136
+ ```
137
+
138
+ ### Parameters
139
+
140
+
141
+ | Name | Type | Description | Notes |
142
+ |------------- | ------------- | ------------- | -------------|
143
+ | **id** | `string` | | [Defaults to `undefined`] |
144
+
145
+ ### Return type
146
+
147
+ `void` (Empty response body)
148
+
149
+ ### Authorization
150
+
151
+ [sessionCookie](../README.md#sessionCookie), [bearerApiKey](../README.md#bearerApiKey)
152
+
153
+ ### HTTP request headers
154
+
155
+ - **Content-Type**: Not defined
156
+ - **Accept**: `application/json`
157
+
158
+
159
+ ### HTTP response details
160
+ | Status code | Description | Response headers |
161
+ |-------------|-------------|------------------|
162
+ | **204** | Webhook deactivated. No content returned. | * X-Request-Id - <br> |
163
+ | **401** | Missing or invalid credentials. | * X-Request-Id - <br> |
164
+ | **403** | Insufficient scope (requires webhooks:manage). | * X-Request-Id - <br> |
165
+ | **404** | Webhook not found or already inactive. | * X-Request-Id - <br> |
166
+
167
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
168
+
169
+
170
+ ## listWebhooks
171
+
172
+ > WebhookListResponse listWebhooks()
173
+
174
+ List active webhook endpoints
175
+
176
+ Lists active webhook endpoints for the authenticated organization.
177
+
178
+ ### Example
179
+
180
+ ```ts
181
+ import {
182
+ Configuration,
183
+ WebhooksApi,
184
+ } from '@liqhtworks/sophon-sdk';
185
+ import type { ListWebhooksRequest } from '@liqhtworks/sophon-sdk';
186
+
187
+ async function example() {
188
+ console.log("🚀 Testing @liqhtworks/sophon-sdk SDK...");
189
+ const config = new Configuration({
190
+ // To configure API key authorization: sessionCookie
191
+ apiKey: "YOUR API KEY",
192
+ // Configure HTTP bearer authorization: bearerApiKey
193
+ accessToken: "YOUR BEARER TOKEN",
194
+ });
195
+ const api = new WebhooksApi(config);
196
+
197
+ try {
198
+ const data = await api.listWebhooks();
199
+ console.log(data);
200
+ } catch (error) {
201
+ console.error(error);
202
+ }
203
+ }
204
+
205
+ // Run the test
206
+ example().catch(console.error);
207
+ ```
208
+
209
+ ### Parameters
210
+
211
+ This endpoint does not need any parameter.
212
+
213
+ ### Return type
214
+
215
+ [**WebhookListResponse**](WebhookListResponse.md)
216
+
217
+ ### Authorization
218
+
219
+ [sessionCookie](../README.md#sessionCookie), [bearerApiKey](../README.md#bearerApiKey)
220
+
221
+ ### HTTP request headers
222
+
223
+ - **Content-Type**: Not defined
224
+ - **Accept**: `application/json`
225
+
226
+
227
+ ### HTTP response details
228
+ | Status code | Description | Response headers |
229
+ |-------------|-------------|------------------|
230
+ | **200** | List of active webhooks for the authenticated organization. | * X-Request-Id - <br> |
231
+ | **401** | Missing or invalid credentials. | * X-Request-Id - <br> |
232
+ | **403** | Insufficient scope (requires webhooks:manage). | * X-Request-Id - <br> |
233
+
234
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
235
+
package/package.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "@liqhtworks/sophon-sdk",
3
+ "version": "0.1.0",
4
+ "description": "OpenAPI client for @liqhtworks/sophon-sdk",
5
+ "author": "OpenAPI-Generator",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/Liqhtworks/sophon-sdk-typescript.git"
9
+ },
10
+ "main": "./dist/index.js",
11
+ "types": "./dist/index.d.ts",
12
+ "module": "./dist/esm/index.js",
13
+ "sideEffects": false,
14
+ "scripts": {
15
+ "build": "tsc && tsc -p tsconfig.esm.json",
16
+ "prepare": "npm run build"
17
+ },
18
+ "devDependencies": {
19
+ "typescript": "^4.0 || ^5.0"
20
+ },
21
+ "publishConfig": {
22
+ "registry": "https://github.com/Liqhtworks/sophon-sdk-typescript"
23
+ }
24
+ }
@@ -0,0 +1,114 @@
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
+ import * as runtime from '../runtime';
17
+ import type {
18
+ ErrorEnvelope,
19
+ } from '../models/index';
20
+ import {
21
+ ErrorEnvelopeFromJSON,
22
+ ErrorEnvelopeToJSON,
23
+ } from '../models/index';
24
+
25
+ export interface DownloadRequest {
26
+ token: string;
27
+ }
28
+
29
+ /**
30
+ * DownloadsApi - interface
31
+ *
32
+ * @export
33
+ * @interface DownloadsApiInterface
34
+ */
35
+ export interface DownloadsApiInterface {
36
+ /**
37
+ * Creates request options for download without sending the request
38
+ * @param {string} token HMAC-signed download token encoding the object key and expiry.
39
+ * @throws {RequiredError}
40
+ * @memberof DownloadsApiInterface
41
+ */
42
+ downloadRequestOpts(requestParameters: DownloadRequest): Promise<runtime.RequestOpts>;
43
+
44
+ /**
45
+ * 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.
46
+ * @summary Download an output file via signed token
47
+ * @param {string} token HMAC-signed download token encoding the object key and expiry.
48
+ * @param {*} [options] Override http request option.
49
+ * @throws {RequiredError}
50
+ * @memberof DownloadsApiInterface
51
+ */
52
+ downloadRaw(requestParameters: DownloadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>>;
53
+
54
+ /**
55
+ * 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.
56
+ * Download an output file via signed token
57
+ */
58
+ download(requestParameters: DownloadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob>;
59
+
60
+ }
61
+
62
+ /**
63
+ *
64
+ */
65
+ export class DownloadsApi extends runtime.BaseAPI implements DownloadsApiInterface {
66
+
67
+ /**
68
+ * Creates request options for download without sending the request
69
+ */
70
+ async downloadRequestOpts(requestParameters: DownloadRequest): Promise<runtime.RequestOpts> {
71
+ if (requestParameters['token'] == null) {
72
+ throw new runtime.RequiredError(
73
+ 'token',
74
+ 'Required parameter "token" was null or undefined when calling download().'
75
+ );
76
+ }
77
+
78
+ const queryParameters: any = {};
79
+
80
+ const headerParameters: runtime.HTTPHeaders = {};
81
+
82
+
83
+ let urlPath = `/v1/downloads/{token}`;
84
+ urlPath = urlPath.replace(`{${"token"}}`, encodeURIComponent(String(requestParameters['token'])));
85
+
86
+ return {
87
+ path: urlPath,
88
+ method: 'GET',
89
+ headers: headerParameters,
90
+ query: queryParameters,
91
+ };
92
+ }
93
+
94
+ /**
95
+ * 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.
96
+ * Download an output file via signed token
97
+ */
98
+ async downloadRaw(requestParameters: DownloadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>> {
99
+ const requestOptions = await this.downloadRequestOpts(requestParameters);
100
+ const response = await this.request(requestOptions, initOverrides);
101
+
102
+ return new runtime.BlobApiResponse(response);
103
+ }
104
+
105
+ /**
106
+ * 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.
107
+ * Download an output file via signed token
108
+ */
109
+ async download(requestParameters: DownloadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
110
+ const response = await this.downloadRaw(requestParameters, initOverrides);
111
+ return await response.value();
112
+ }
113
+
114
+ }
@@ -0,0 +1,160 @@
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
+ import * as runtime from '../runtime';
17
+ import type {
18
+ ReadyResponse,
19
+ } from '../models/index';
20
+ import {
21
+ ReadyResponseFromJSON,
22
+ ReadyResponseToJSON,
23
+ } from '../models/index';
24
+
25
+ /**
26
+ * HealthApi - interface
27
+ *
28
+ * @export
29
+ * @interface HealthApiInterface
30
+ */
31
+ export interface HealthApiInterface {
32
+ /**
33
+ * Creates request options for healthz without sending the request
34
+ * @throws {RequiredError}
35
+ * @memberof HealthApiInterface
36
+ */
37
+ healthzRequestOpts(): Promise<runtime.RequestOpts>;
38
+
39
+ /**
40
+ * Always returns 200. Used by load balancers and orchestrators.
41
+ * @summary Liveness probe
42
+ * @param {*} [options] Override http request option.
43
+ * @throws {RequiredError}
44
+ * @memberof HealthApiInterface
45
+ */
46
+ healthzRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
47
+
48
+ /**
49
+ * Always returns 200. Used by load balancers and orchestrators.
50
+ * Liveness probe
51
+ */
52
+ healthz(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
53
+
54
+ /**
55
+ * Creates request options for readyz without sending the request
56
+ * @throws {RequiredError}
57
+ * @memberof HealthApiInterface
58
+ */
59
+ readyzRequestOpts(): Promise<runtime.RequestOpts>;
60
+
61
+ /**
62
+ * Returns 200 when the service is ready to accept traffic. Checks database connectivity, disk headroom (warning and critical thresholds), worker liveness, and drain state.
63
+ * @summary Readiness probe
64
+ * @param {*} [options] Override http request option.
65
+ * @throws {RequiredError}
66
+ * @memberof HealthApiInterface
67
+ */
68
+ readyzRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ReadyResponse>>;
69
+
70
+ /**
71
+ * Returns 200 when the service is ready to accept traffic. Checks database connectivity, disk headroom (warning and critical thresholds), worker liveness, and drain state.
72
+ * Readiness probe
73
+ */
74
+ readyz(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ReadyResponse>;
75
+
76
+ }
77
+
78
+ /**
79
+ *
80
+ */
81
+ export class HealthApi extends runtime.BaseAPI implements HealthApiInterface {
82
+
83
+ /**
84
+ * Creates request options for healthz without sending the request
85
+ */
86
+ async healthzRequestOpts(): Promise<runtime.RequestOpts> {
87
+ const queryParameters: any = {};
88
+
89
+ const headerParameters: runtime.HTTPHeaders = {};
90
+
91
+
92
+ let urlPath = `/healthz`;
93
+
94
+ return {
95
+ path: urlPath,
96
+ method: 'GET',
97
+ headers: headerParameters,
98
+ query: queryParameters,
99
+ };
100
+ }
101
+
102
+ /**
103
+ * Always returns 200. Used by load balancers and orchestrators.
104
+ * Liveness probe
105
+ */
106
+ async healthzRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
107
+ const requestOptions = await this.healthzRequestOpts();
108
+ const response = await this.request(requestOptions, initOverrides);
109
+
110
+ return new runtime.VoidApiResponse(response);
111
+ }
112
+
113
+ /**
114
+ * Always returns 200. Used by load balancers and orchestrators.
115
+ * Liveness probe
116
+ */
117
+ async healthz(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
118
+ await this.healthzRaw(initOverrides);
119
+ }
120
+
121
+ /**
122
+ * Creates request options for readyz without sending the request
123
+ */
124
+ async readyzRequestOpts(): Promise<runtime.RequestOpts> {
125
+ const queryParameters: any = {};
126
+
127
+ const headerParameters: runtime.HTTPHeaders = {};
128
+
129
+
130
+ let urlPath = `/readyz`;
131
+
132
+ return {
133
+ path: urlPath,
134
+ method: 'GET',
135
+ headers: headerParameters,
136
+ query: queryParameters,
137
+ };
138
+ }
139
+
140
+ /**
141
+ * Returns 200 when the service is ready to accept traffic. Checks database connectivity, disk headroom (warning and critical thresholds), worker liveness, and drain state.
142
+ * Readiness probe
143
+ */
144
+ async readyzRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ReadyResponse>> {
145
+ const requestOptions = await this.readyzRequestOpts();
146
+ const response = await this.request(requestOptions, initOverrides);
147
+
148
+ return new runtime.JSONApiResponse(response, (jsonValue) => ReadyResponseFromJSON(jsonValue));
149
+ }
150
+
151
+ /**
152
+ * Returns 200 when the service is ready to accept traffic. Checks database connectivity, disk headroom (warning and critical thresholds), worker liveness, and drain state.
153
+ * Readiness probe
154
+ */
155
+ async readyz(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ReadyResponse> {
156
+ const response = await this.readyzRaw(initOverrides);
157
+ return await response.value();
158
+ }
159
+
160
+ }