@vouch-protocol-official/api-client 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 (113) hide show
  1. package/.openapi-generator/FILES +28 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/LICENSE +198 -0
  5. package/README.md +46 -0
  6. package/dist/apis/AudioApi.d.ts +70 -0
  7. package/dist/apis/AudioApi.js +165 -0
  8. package/dist/apis/DefaultApi.d.ts +56 -0
  9. package/dist/apis/DefaultApi.js +130 -0
  10. package/dist/apis/index.d.ts +2 -0
  11. package/dist/apis/index.js +20 -0
  12. package/dist/esm/apis/AudioApi.d.ts +70 -0
  13. package/dist/esm/apis/AudioApi.js +161 -0
  14. package/dist/esm/apis/DefaultApi.d.ts +56 -0
  15. package/dist/esm/apis/DefaultApi.js +126 -0
  16. package/dist/esm/apis/index.d.ts +2 -0
  17. package/dist/esm/apis/index.js +4 -0
  18. package/dist/esm/index.d.ts +3 -0
  19. package/dist/esm/index.js +5 -0
  20. package/dist/esm/models/AudioDetectRequest.d.ts +31 -0
  21. package/dist/esm/models/AudioDetectRequest.js +40 -0
  22. package/dist/esm/models/AudioDetectResponse.d.ts +69 -0
  23. package/dist/esm/models/AudioDetectResponse.js +52 -0
  24. package/dist/esm/models/AudioEmbedRequest.d.ts +51 -0
  25. package/dist/esm/models/AudioEmbedRequest.js +48 -0
  26. package/dist/esm/models/AudioEmbedResponse.d.ts +67 -0
  27. package/dist/esm/models/AudioEmbedResponse.js +52 -0
  28. package/dist/esm/models/AudioHealthResponse.d.ts +61 -0
  29. package/dist/esm/models/AudioHealthResponse.js +60 -0
  30. package/dist/esm/models/AudioSignRequest.d.ts +57 -0
  31. package/dist/esm/models/AudioSignRequest.js +50 -0
  32. package/dist/esm/models/AudioSignResponse.d.ts +61 -0
  33. package/dist/esm/models/AudioSignResponse.js +50 -0
  34. package/dist/esm/models/HTTPValidationError.d.ts +32 -0
  35. package/dist/esm/models/HTTPValidationError.js +39 -0
  36. package/dist/esm/models/HealthResponse.d.ts +43 -0
  37. package/dist/esm/models/HealthResponse.js +48 -0
  38. package/dist/esm/models/SignRequest.d.ts +73 -0
  39. package/dist/esm/models/SignRequest.js +58 -0
  40. package/dist/esm/models/SignResponse.d.ts +61 -0
  41. package/dist/esm/models/SignResponse.js +50 -0
  42. package/dist/esm/models/ValidationError.d.ts +44 -0
  43. package/dist/esm/models/ValidationError.js +49 -0
  44. package/dist/esm/models/ValidationErrorLocInner.d.ts +25 -0
  45. package/dist/esm/models/ValidationErrorLocInner.js +28 -0
  46. package/dist/esm/models/VerifyRequest.d.ts +31 -0
  47. package/dist/esm/models/VerifyRequest.js +40 -0
  48. package/dist/esm/models/VerifyResponse.d.ts +57 -0
  49. package/dist/esm/models/VerifyResponse.js +48 -0
  50. package/dist/esm/models/index.d.ts +15 -0
  51. package/dist/esm/models/index.js +17 -0
  52. package/dist/esm/runtime.d.ts +181 -0
  53. package/dist/esm/runtime.js +326 -0
  54. package/dist/index.d.ts +3 -0
  55. package/dist/index.js +21 -0
  56. package/dist/models/AudioDetectRequest.d.ts +31 -0
  57. package/dist/models/AudioDetectRequest.js +46 -0
  58. package/dist/models/AudioDetectResponse.d.ts +69 -0
  59. package/dist/models/AudioDetectResponse.js +58 -0
  60. package/dist/models/AudioEmbedRequest.d.ts +51 -0
  61. package/dist/models/AudioEmbedRequest.js +54 -0
  62. package/dist/models/AudioEmbedResponse.d.ts +67 -0
  63. package/dist/models/AudioEmbedResponse.js +58 -0
  64. package/dist/models/AudioHealthResponse.d.ts +61 -0
  65. package/dist/models/AudioHealthResponse.js +66 -0
  66. package/dist/models/AudioSignRequest.d.ts +57 -0
  67. package/dist/models/AudioSignRequest.js +56 -0
  68. package/dist/models/AudioSignResponse.d.ts +61 -0
  69. package/dist/models/AudioSignResponse.js +56 -0
  70. package/dist/models/HTTPValidationError.d.ts +32 -0
  71. package/dist/models/HTTPValidationError.js +45 -0
  72. package/dist/models/HealthResponse.d.ts +43 -0
  73. package/dist/models/HealthResponse.js +54 -0
  74. package/dist/models/SignRequest.d.ts +73 -0
  75. package/dist/models/SignRequest.js +64 -0
  76. package/dist/models/SignResponse.d.ts +61 -0
  77. package/dist/models/SignResponse.js +56 -0
  78. package/dist/models/ValidationError.d.ts +44 -0
  79. package/dist/models/ValidationError.js +55 -0
  80. package/dist/models/ValidationErrorLocInner.d.ts +25 -0
  81. package/dist/models/ValidationErrorLocInner.js +34 -0
  82. package/dist/models/VerifyRequest.d.ts +31 -0
  83. package/dist/models/VerifyRequest.js +46 -0
  84. package/dist/models/VerifyResponse.d.ts +57 -0
  85. package/dist/models/VerifyResponse.js +54 -0
  86. package/dist/models/index.d.ts +15 -0
  87. package/dist/models/index.js +33 -0
  88. package/dist/runtime.d.ts +181 -0
  89. package/dist/runtime.js +341 -0
  90. package/package.json +33 -0
  91. package/src/apis/AudioApi.ts +220 -0
  92. package/src/apis/DefaultApi.ts +167 -0
  93. package/src/apis/index.ts +4 -0
  94. package/src/index.ts +5 -0
  95. package/src/models/AudioDetectRequest.ts +61 -0
  96. package/src/models/AudioDetectResponse.ts +109 -0
  97. package/src/models/AudioEmbedRequest.ts +86 -0
  98. package/src/models/AudioEmbedResponse.ts +109 -0
  99. package/src/models/AudioHealthResponse.ts +106 -0
  100. package/src/models/AudioSignRequest.ts +94 -0
  101. package/src/models/AudioSignResponse.ts +101 -0
  102. package/src/models/HTTPValidationError.ts +67 -0
  103. package/src/models/HealthResponse.ts +79 -0
  104. package/src/models/SignRequest.ts +119 -0
  105. package/src/models/SignResponse.ts +101 -0
  106. package/src/models/ValidationError.ts +86 -0
  107. package/src/models/ValidationErrorLocInner.ts +42 -0
  108. package/src/models/VerifyRequest.ts +61 -0
  109. package/src/models/VerifyResponse.ts +93 -0
  110. package/src/models/index.ts +17 -0
  111. package/src/runtime.ts +426 -0
  112. package/tsconfig.esm.json +7 -0
  113. package/tsconfig.json +16 -0
@@ -0,0 +1,167 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Vouch Bridge
5
+ * C2PA image signing, QR badge overlay, and audio watermarking service
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
+ HTTPValidationError,
19
+ HealthResponse,
20
+ SignRequest,
21
+ SignResponse,
22
+ VerifyRequest,
23
+ VerifyResponse,
24
+ } from '../models/index';
25
+ import {
26
+ HTTPValidationErrorFromJSON,
27
+ HTTPValidationErrorToJSON,
28
+ HealthResponseFromJSON,
29
+ HealthResponseToJSON,
30
+ SignRequestFromJSON,
31
+ SignRequestToJSON,
32
+ SignResponseFromJSON,
33
+ SignResponseToJSON,
34
+ VerifyRequestFromJSON,
35
+ VerifyRequestToJSON,
36
+ VerifyResponseFromJSON,
37
+ VerifyResponseToJSON,
38
+ } from '../models/index';
39
+
40
+ export interface SignImageSignPostRequest {
41
+ signRequest: SignRequest;
42
+ authorization?: string | null;
43
+ }
44
+
45
+ export interface VerifyImageVerifyPostRequest {
46
+ verifyRequest: VerifyRequest;
47
+ authorization?: string | null;
48
+ }
49
+
50
+ /**
51
+ *
52
+ */
53
+ export class DefaultApi extends runtime.BaseAPI {
54
+
55
+ /**
56
+ * Health check — no auth required.
57
+ * Health
58
+ */
59
+ async healthHealthGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<HealthResponse>> {
60
+ const queryParameters: any = {};
61
+
62
+ const headerParameters: runtime.HTTPHeaders = {};
63
+
64
+ const response = await this.request({
65
+ path: `/health`,
66
+ method: 'GET',
67
+ headers: headerParameters,
68
+ query: queryParameters,
69
+ }, initOverrides);
70
+
71
+ return new runtime.JSONApiResponse(response, (jsonValue) => HealthResponseFromJSON(jsonValue));
72
+ }
73
+
74
+ /**
75
+ * Health check — no auth required.
76
+ * Health
77
+ */
78
+ async healthHealthGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<HealthResponse> {
79
+ const response = await this.healthHealthGetRaw(initOverrides);
80
+ return await response.value();
81
+ }
82
+
83
+ /**
84
+ * Sign an image with C2PA manifest and QR badge.
85
+ * Sign Image
86
+ */
87
+ async signImageSignPostRaw(requestParameters: SignImageSignPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SignResponse>> {
88
+ if (requestParameters['signRequest'] == null) {
89
+ throw new runtime.RequiredError(
90
+ 'signRequest',
91
+ 'Required parameter "signRequest" was null or undefined when calling signImageSignPost().'
92
+ );
93
+ }
94
+
95
+ const queryParameters: any = {};
96
+
97
+ const headerParameters: runtime.HTTPHeaders = {};
98
+
99
+ headerParameters['Content-Type'] = 'application/json';
100
+
101
+ if (requestParameters['authorization'] != null) {
102
+ headerParameters['authorization'] = String(requestParameters['authorization']);
103
+ }
104
+
105
+ const response = await this.request({
106
+ path: `/sign`,
107
+ method: 'POST',
108
+ headers: headerParameters,
109
+ query: queryParameters,
110
+ body: SignRequestToJSON(requestParameters['signRequest']),
111
+ }, initOverrides);
112
+
113
+ return new runtime.JSONApiResponse(response, (jsonValue) => SignResponseFromJSON(jsonValue));
114
+ }
115
+
116
+ /**
117
+ * Sign an image with C2PA manifest and QR badge.
118
+ * Sign Image
119
+ */
120
+ async signImageSignPost(requestParameters: SignImageSignPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SignResponse> {
121
+ const response = await this.signImageSignPostRaw(requestParameters, initOverrides);
122
+ return await response.value();
123
+ }
124
+
125
+ /**
126
+ * Verify a signed image\'s C2PA manifest.
127
+ * Verify Image
128
+ */
129
+ async verifyImageVerifyPostRaw(requestParameters: VerifyImageVerifyPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<VerifyResponse>> {
130
+ if (requestParameters['verifyRequest'] == null) {
131
+ throw new runtime.RequiredError(
132
+ 'verifyRequest',
133
+ 'Required parameter "verifyRequest" was null or undefined when calling verifyImageVerifyPost().'
134
+ );
135
+ }
136
+
137
+ const queryParameters: any = {};
138
+
139
+ const headerParameters: runtime.HTTPHeaders = {};
140
+
141
+ headerParameters['Content-Type'] = 'application/json';
142
+
143
+ if (requestParameters['authorization'] != null) {
144
+ headerParameters['authorization'] = String(requestParameters['authorization']);
145
+ }
146
+
147
+ const response = await this.request({
148
+ path: `/verify`,
149
+ method: 'POST',
150
+ headers: headerParameters,
151
+ query: queryParameters,
152
+ body: VerifyRequestToJSON(requestParameters['verifyRequest']),
153
+ }, initOverrides);
154
+
155
+ return new runtime.JSONApiResponse(response, (jsonValue) => VerifyResponseFromJSON(jsonValue));
156
+ }
157
+
158
+ /**
159
+ * Verify a signed image\'s C2PA manifest.
160
+ * Verify Image
161
+ */
162
+ async verifyImageVerifyPost(requestParameters: VerifyImageVerifyPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<VerifyResponse> {
163
+ const response = await this.verifyImageVerifyPostRaw(requestParameters, initOverrides);
164
+ return await response.value();
165
+ }
166
+
167
+ }
@@ -0,0 +1,4 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export * from './AudioApi';
4
+ export * from './DefaultApi';
package/src/index.ts ADDED
@@ -0,0 +1,5 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export * from './runtime';
4
+ export * from './apis/index';
5
+ export * from './models/index';
@@ -0,0 +1,61 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Vouch Bridge
5
+ * C2PA image signing, QR badge overlay, and audio watermarking service
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
+ * Request body for POST /audio/detect.
18
+ * @export
19
+ * @interface AudioDetectRequest
20
+ */
21
+ export interface AudioDetectRequest {
22
+ /**
23
+ * Base64-encoded audio to scan
24
+ * @type {string}
25
+ * @memberof AudioDetectRequest
26
+ */
27
+ audioBase64: string;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the AudioDetectRequest interface.
32
+ */
33
+ export function instanceOfAudioDetectRequest(value: object): value is AudioDetectRequest {
34
+ if (!('audioBase64' in value) || value['audioBase64'] === undefined) return false;
35
+ return true;
36
+ }
37
+
38
+ export function AudioDetectRequestFromJSON(json: any): AudioDetectRequest {
39
+ return AudioDetectRequestFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function AudioDetectRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AudioDetectRequest {
43
+ if (json == null) {
44
+ return json;
45
+ }
46
+ return {
47
+
48
+ 'audioBase64': json['audio_base64'],
49
+ };
50
+ }
51
+
52
+ export function AudioDetectRequestToJSON(value?: AudioDetectRequest | null): any {
53
+ if (value == null) {
54
+ return value;
55
+ }
56
+ return {
57
+
58
+ 'audio_base64': value['audioBase64'],
59
+ };
60
+ }
61
+
@@ -0,0 +1,109 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Vouch Bridge
5
+ * C2PA image signing, QR badge overlay, and audio watermarking service
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
+ * Response body for POST /audio/detect.
18
+ * @export
19
+ * @interface AudioDetectResponse
20
+ */
21
+ export interface AudioDetectResponse {
22
+ /**
23
+ *
24
+ * @type {boolean}
25
+ * @memberof AudioDetectResponse
26
+ */
27
+ success: boolean;
28
+ /**
29
+ *
30
+ * @type {boolean}
31
+ * @memberof AudioDetectResponse
32
+ */
33
+ detected?: boolean;
34
+ /**
35
+ *
36
+ * @type {number}
37
+ * @memberof AudioDetectResponse
38
+ */
39
+ confidence?: number;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof AudioDetectResponse
44
+ */
45
+ signerDid?: string | null;
46
+ /**
47
+ *
48
+ * @type {string}
49
+ * @memberof AudioDetectResponse
50
+ */
51
+ payloadHash?: string | null;
52
+ /**
53
+ *
54
+ * @type {{ [key: string]: any; }}
55
+ * @memberof AudioDetectResponse
56
+ */
57
+ covenant?: { [key: string]: any; } | null;
58
+ /**
59
+ *
60
+ * @type {string}
61
+ * @memberof AudioDetectResponse
62
+ */
63
+ error?: string | null;
64
+ }
65
+
66
+ /**
67
+ * Check if a given object implements the AudioDetectResponse interface.
68
+ */
69
+ export function instanceOfAudioDetectResponse(value: object): value is AudioDetectResponse {
70
+ if (!('success' in value) || value['success'] === undefined) return false;
71
+ return true;
72
+ }
73
+
74
+ export function AudioDetectResponseFromJSON(json: any): AudioDetectResponse {
75
+ return AudioDetectResponseFromJSONTyped(json, false);
76
+ }
77
+
78
+ export function AudioDetectResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AudioDetectResponse {
79
+ if (json == null) {
80
+ return json;
81
+ }
82
+ return {
83
+
84
+ 'success': json['success'],
85
+ 'detected': json['detected'] == null ? undefined : json['detected'],
86
+ 'confidence': json['confidence'] == null ? undefined : json['confidence'],
87
+ 'signerDid': json['signer_did'] == null ? undefined : json['signer_did'],
88
+ 'payloadHash': json['payload_hash'] == null ? undefined : json['payload_hash'],
89
+ 'covenant': json['covenant'] == null ? undefined : json['covenant'],
90
+ 'error': json['error'] == null ? undefined : json['error'],
91
+ };
92
+ }
93
+
94
+ export function AudioDetectResponseToJSON(value?: AudioDetectResponse | null): any {
95
+ if (value == null) {
96
+ return value;
97
+ }
98
+ return {
99
+
100
+ 'success': value['success'],
101
+ 'detected': value['detected'],
102
+ 'confidence': value['confidence'],
103
+ 'signer_did': value['signerDid'],
104
+ 'payload_hash': value['payloadHash'],
105
+ 'covenant': value['covenant'],
106
+ 'error': value['error'],
107
+ };
108
+ }
109
+
@@ -0,0 +1,86 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Vouch Bridge
5
+ * C2PA image signing, QR badge overlay, and audio watermarking service
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
+ * Request body for POST /audio/embed.
18
+ * @export
19
+ * @interface AudioEmbedRequest
20
+ */
21
+ export interface AudioEmbedRequest {
22
+ /**
23
+ * Base64-encoded audio (WAV/MP3/FLAC/OGG/M4A/AAC/Opus/WebM)
24
+ * @type {string}
25
+ * @memberof AudioEmbedRequest
26
+ */
27
+ audioBase64: string;
28
+ /**
29
+ * DID of the signer
30
+ * @type {string}
31
+ * @memberof AudioEmbedRequest
32
+ */
33
+ did: string;
34
+ /**
35
+ * Human-readable signer name
36
+ * @type {string}
37
+ * @memberof AudioEmbedRequest
38
+ */
39
+ displayName?: string;
40
+ /**
41
+ *
42
+ * @type {{ [key: string]: any; }}
43
+ * @memberof AudioEmbedRequest
44
+ */
45
+ covenant?: { [key: string]: any; } | null;
46
+ }
47
+
48
+ /**
49
+ * Check if a given object implements the AudioEmbedRequest interface.
50
+ */
51
+ export function instanceOfAudioEmbedRequest(value: object): value is AudioEmbedRequest {
52
+ if (!('audioBase64' in value) || value['audioBase64'] === undefined) return false;
53
+ if (!('did' in value) || value['did'] === undefined) return false;
54
+ return true;
55
+ }
56
+
57
+ export function AudioEmbedRequestFromJSON(json: any): AudioEmbedRequest {
58
+ return AudioEmbedRequestFromJSONTyped(json, false);
59
+ }
60
+
61
+ export function AudioEmbedRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AudioEmbedRequest {
62
+ if (json == null) {
63
+ return json;
64
+ }
65
+ return {
66
+
67
+ 'audioBase64': json['audio_base64'],
68
+ 'did': json['did'],
69
+ 'displayName': json['display_name'] == null ? undefined : json['display_name'],
70
+ 'covenant': json['covenant'] == null ? undefined : json['covenant'],
71
+ };
72
+ }
73
+
74
+ export function AudioEmbedRequestToJSON(value?: AudioEmbedRequest | null): any {
75
+ if (value == null) {
76
+ return value;
77
+ }
78
+ return {
79
+
80
+ 'audio_base64': value['audioBase64'],
81
+ 'did': value['did'],
82
+ 'display_name': value['displayName'],
83
+ 'covenant': value['covenant'],
84
+ };
85
+ }
86
+
@@ -0,0 +1,109 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Vouch Bridge
5
+ * C2PA image signing, QR badge overlay, and audio watermarking service
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
+ * Response body for POST /audio/embed.
18
+ * @export
19
+ * @interface AudioEmbedResponse
20
+ */
21
+ export interface AudioEmbedResponse {
22
+ /**
23
+ *
24
+ * @type {boolean}
25
+ * @memberof AudioEmbedResponse
26
+ */
27
+ success: boolean;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof AudioEmbedResponse
32
+ */
33
+ audioBase64?: string | null;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof AudioEmbedResponse
38
+ */
39
+ watermarkId?: string | null;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof AudioEmbedResponse
44
+ */
45
+ audioHash?: string | null;
46
+ /**
47
+ *
48
+ * @type {string}
49
+ * @memberof AudioEmbedResponse
50
+ */
51
+ payloadHash?: string | null;
52
+ /**
53
+ *
54
+ * @type {string}
55
+ * @memberof AudioEmbedResponse
56
+ */
57
+ timestamp?: string | null;
58
+ /**
59
+ *
60
+ * @type {string}
61
+ * @memberof AudioEmbedResponse
62
+ */
63
+ error?: string | null;
64
+ }
65
+
66
+ /**
67
+ * Check if a given object implements the AudioEmbedResponse interface.
68
+ */
69
+ export function instanceOfAudioEmbedResponse(value: object): value is AudioEmbedResponse {
70
+ if (!('success' in value) || value['success'] === undefined) return false;
71
+ return true;
72
+ }
73
+
74
+ export function AudioEmbedResponseFromJSON(json: any): AudioEmbedResponse {
75
+ return AudioEmbedResponseFromJSONTyped(json, false);
76
+ }
77
+
78
+ export function AudioEmbedResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AudioEmbedResponse {
79
+ if (json == null) {
80
+ return json;
81
+ }
82
+ return {
83
+
84
+ 'success': json['success'],
85
+ 'audioBase64': json['audio_base64'] == null ? undefined : json['audio_base64'],
86
+ 'watermarkId': json['watermark_id'] == null ? undefined : json['watermark_id'],
87
+ 'audioHash': json['audio_hash'] == null ? undefined : json['audio_hash'],
88
+ 'payloadHash': json['payload_hash'] == null ? undefined : json['payload_hash'],
89
+ 'timestamp': json['timestamp'] == null ? undefined : json['timestamp'],
90
+ 'error': json['error'] == null ? undefined : json['error'],
91
+ };
92
+ }
93
+
94
+ export function AudioEmbedResponseToJSON(value?: AudioEmbedResponse | null): any {
95
+ if (value == null) {
96
+ return value;
97
+ }
98
+ return {
99
+
100
+ 'success': value['success'],
101
+ 'audio_base64': value['audioBase64'],
102
+ 'watermark_id': value['watermarkId'],
103
+ 'audio_hash': value['audioHash'],
104
+ 'payload_hash': value['payloadHash'],
105
+ 'timestamp': value['timestamp'],
106
+ 'error': value['error'],
107
+ };
108
+ }
109
+
@@ -0,0 +1,106 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Vouch Bridge
5
+ * C2PA image signing, QR badge overlay, and audio watermarking service
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
+ * Response body for GET /audio/health.
18
+ * @export
19
+ * @interface AudioHealthResponse
20
+ */
21
+ export interface AudioHealthResponse {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof AudioHealthResponse
26
+ */
27
+ status: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof AudioHealthResponse
32
+ */
33
+ version: string;
34
+ /**
35
+ *
36
+ * @type {boolean}
37
+ * @memberof AudioHealthResponse
38
+ */
39
+ numpyAvailable: boolean;
40
+ /**
41
+ *
42
+ * @type {boolean}
43
+ * @memberof AudioHealthResponse
44
+ */
45
+ c2paAvailable: boolean;
46
+ /**
47
+ *
48
+ * @type {boolean}
49
+ * @memberof AudioHealthResponse
50
+ */
51
+ audiosealAvailable: boolean;
52
+ /**
53
+ *
54
+ * @type {string}
55
+ * @memberof AudioHealthResponse
56
+ */
57
+ watermarker: string;
58
+ }
59
+
60
+ /**
61
+ * Check if a given object implements the AudioHealthResponse interface.
62
+ */
63
+ export function instanceOfAudioHealthResponse(value: object): value is AudioHealthResponse {
64
+ if (!('status' in value) || value['status'] === undefined) return false;
65
+ if (!('version' in value) || value['version'] === undefined) return false;
66
+ if (!('numpyAvailable' in value) || value['numpyAvailable'] === undefined) return false;
67
+ if (!('c2paAvailable' in value) || value['c2paAvailable'] === undefined) return false;
68
+ if (!('audiosealAvailable' in value) || value['audiosealAvailable'] === undefined) return false;
69
+ if (!('watermarker' in value) || value['watermarker'] === undefined) return false;
70
+ return true;
71
+ }
72
+
73
+ export function AudioHealthResponseFromJSON(json: any): AudioHealthResponse {
74
+ return AudioHealthResponseFromJSONTyped(json, false);
75
+ }
76
+
77
+ export function AudioHealthResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AudioHealthResponse {
78
+ if (json == null) {
79
+ return json;
80
+ }
81
+ return {
82
+
83
+ 'status': json['status'],
84
+ 'version': json['version'],
85
+ 'numpyAvailable': json['numpy_available'],
86
+ 'c2paAvailable': json['c2pa_available'],
87
+ 'audiosealAvailable': json['audioseal_available'],
88
+ 'watermarker': json['watermarker'],
89
+ };
90
+ }
91
+
92
+ export function AudioHealthResponseToJSON(value?: AudioHealthResponse | null): any {
93
+ if (value == null) {
94
+ return value;
95
+ }
96
+ return {
97
+
98
+ 'status': value['status'],
99
+ 'version': value['version'],
100
+ 'numpy_available': value['numpyAvailable'],
101
+ 'c2pa_available': value['c2paAvailable'],
102
+ 'audioseal_available': value['audiosealAvailable'],
103
+ 'watermarker': value['watermarker'],
104
+ };
105
+ }
106
+