@giveitsmaller/contracts 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/asyncapi/ErrorCode.ts +19 -0
- package/asyncapi/MergeOutputType.ts +9 -0
- package/asyncapi/NotificationsOperationsQueue.ts +4 -0
- package/asyncapi/OperationMetrics.ts +12 -0
- package/asyncapi/OperationProgress.ts +12 -0
- package/asyncapi/OperationRequest.ts +21 -0
- package/asyncapi/OperationResult.ts +20 -0
- package/asyncapi/OperationType.ts +10 -0
- package/asyncapi/ProgressStatus.ts +8 -0
- package/asyncapi/README.md +16 -0
- package/asyncapi/ResultStatus.ts +6 -0
- package/asyncapi/SourceEntry.ts +9 -0
- package/asyncapi/index.ts +11 -0
- package/index.ts +5 -0
- package/openapi/.openapi-generator-ignore +26 -0
- package/openapi/README.md +17 -0
- package/openapi/index.ts +4 -0
- package/openapi/models/CallbackEventType.ts +60 -0
- package/openapi/models/ContactRequest.ts +113 -0
- package/openapi/models/ContactSubject.ts +62 -0
- package/openapi/models/ContactValidationErrorResponse.ts +67 -0
- package/openapi/models/ErrorEnvelope.ts +85 -0
- package/openapi/models/ExportConfig.ts +108 -0
- package/openapi/models/JobDefinition.ts +56 -0
- package/openapi/models/JobDownload.ts +92 -0
- package/openapi/models/JobInput.ts +89 -0
- package/openapi/models/JobResponse.ts +119 -0
- package/openapi/models/JobSource.ts +79 -0
- package/openapi/models/JobStatus.ts +62 -0
- package/openapi/models/JobType.ts +60 -0
- package/openapi/models/LivenessResponse.ts +66 -0
- package/openapi/models/MetadataResponse.ts +223 -0
- package/openapi/models/MetadataResponseDimensions.ts +73 -0
- package/openapi/models/MetadataResponseExif.ts +97 -0
- package/openapi/models/MetadataResponseExifGps.ts +73 -0
- package/openapi/models/MetadataSuccessEnvelope.ts +93 -0
- package/openapi/models/MimeGroupSchema.ts +91 -0
- package/openapi/models/MultipartCompleteRequest.ts +85 -0
- package/openapi/models/MultipartCompleteRequestPartsInner.ts +75 -0
- package/openapi/models/MultipartInitiateResponse.ts +137 -0
- package/openapi/models/MultipartInitiateSuccessEnvelope.ts +93 -0
- package/openapi/models/OperationDefinition.ts +91 -0
- package/openapi/models/OperationDownload.ts +102 -0
- package/openapi/models/OperationInputModel.ts +56 -0
- package/openapi/models/OperationResponse.ts +124 -0
- package/openapi/models/OperationResult.ts +100 -0
- package/openapi/models/OperationResultMetrics.ts +73 -0
- package/openapi/models/OperationSchemaDefinition.ts +163 -0
- package/openapi/models/OperationStatus.ts +62 -0
- package/openapi/models/OperationType.ts +64 -0
- package/openapi/models/OperationsSchemaResponse.ts +90 -0
- package/openapi/models/OptionSchema.ts +160 -0
- package/openapi/models/PresignedUrlPart.ts +86 -0
- package/openapi/models/ReadinessResponse.ts +73 -0
- package/openapi/models/ResponseEnvelope.ts +70 -0
- package/openapi/models/RetryResponse.ts +94 -0
- package/openapi/models/RetrySuccessEnvelope.ts +93 -0
- package/openapi/models/SseEventType.ts +68 -0
- package/openapi/models/SseJobCompletedData.ts +94 -0
- package/openapi/models/SseJobFailedData.ts +94 -0
- package/openapi/models/SseOperationCompletedData.ts +143 -0
- package/openapi/models/SseOperationFailedData.ts +129 -0
- package/openapi/models/SseOperationProgressData.ts +103 -0
- package/openapi/models/SseWorkflowTerminalData.ts +89 -0
- package/openapi/models/UploadResponse.ts +93 -0
- package/openapi/models/UploadSuccessEnvelope.ts +93 -0
- package/openapi/models/ValidationErrorEnvelope.ts +104 -0
- package/openapi/models/ValidationErrorEnvelopeDetailsInner.ts +90 -0
- package/openapi/models/WebhookOperationContext.ts +77 -0
- package/openapi/models/WebhookPayload.ts +132 -0
- package/openapi/models/WorkflowCreateRequest.ts +143 -0
- package/openapi/models/WorkflowCreateResponse.ts +114 -0
- package/openapi/models/WorkflowCreateSuccessEnvelope.ts +93 -0
- package/openapi/models/WorkflowDownloadResponse.ts +74 -0
- package/openapi/models/WorkflowDownloadSuccessEnvelope.ts +93 -0
- package/openapi/models/WorkflowEdge.ts +77 -0
- package/openapi/models/WorkflowStatus.ts +62 -0
- package/openapi/models/WorkflowStatusResponse.ts +101 -0
- package/openapi/models/WorkflowStatusSuccessEnvelope.ts +93 -0
- package/openapi/models/index.ts +64 -0
- package/openapi/runtime.ts +432 -0
- package/operations/README.md +17 -0
- package/operations/archive.ts +16 -0
- package/operations/compress.ts +177 -0
- package/operations/convert.ts +69 -0
- package/operations/index.ts +7 -0
- package/operations/merge.ts +95 -0
- package/operations/thumbnail.ts +66 -0
- package/package.json +19 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* GISL Compression API
|
|
5
|
+
* REST API for the GISL (Give It Smaller) file compression and processing service. **Architecture:** - Upload files to get a `file_id` - Create workflows referencing uploaded files with operations (compress, thumbnail, watermark, merge, archive, convert) - Poll status, stream SSE events, or receive webhook callbacks - Download results per operation output **Response envelope:** All mutation and query endpoints return `{ success: true, data: {...} }` on success and `{ success: false, error: \"...\", details: [...] }` on failure. Exceptions: `GET /api/operations/schema` returns raw JSON (CDN-cacheable), health probes return flat objects, and `POST /api/contact` returns 204 with no body.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2.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
|
+
/**
|
|
17
|
+
* Whether the operation accepts a single file or multiple files:
|
|
18
|
+
* - single: One input file (compress, thumbnail, watermark, convert)
|
|
19
|
+
* - multi: Multiple input files (merge, archive)
|
|
20
|
+
*
|
|
21
|
+
* @export
|
|
22
|
+
*/
|
|
23
|
+
export const OperationInputModel = {
|
|
24
|
+
single: 'single',
|
|
25
|
+
multi: 'multi'
|
|
26
|
+
} as const;
|
|
27
|
+
export type OperationInputModel = typeof OperationInputModel[keyof typeof OperationInputModel];
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
export function instanceOfOperationInputModel(value: any): boolean {
|
|
31
|
+
for (const key in OperationInputModel) {
|
|
32
|
+
if (Object.prototype.hasOwnProperty.call(OperationInputModel, key)) {
|
|
33
|
+
if (OperationInputModel[key as keyof typeof OperationInputModel] === value) {
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function OperationInputModelFromJSON(json: any): OperationInputModel {
|
|
42
|
+
return OperationInputModelFromJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function OperationInputModelFromJSONTyped(json: any, ignoreDiscriminator: boolean): OperationInputModel {
|
|
46
|
+
return json as OperationInputModel;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function OperationInputModelToJSON(value?: OperationInputModel | null): any {
|
|
50
|
+
return value as any;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function OperationInputModelToJSONTyped(value: any, ignoreDiscriminator: boolean): OperationInputModel {
|
|
54
|
+
return value as OperationInputModel;
|
|
55
|
+
}
|
|
56
|
+
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* GISL Compression API
|
|
5
|
+
* REST API for the GISL (Give It Smaller) file compression and processing service. **Architecture:** - Upload files to get a `file_id` - Create workflows referencing uploaded files with operations (compress, thumbnail, watermark, merge, archive, convert) - Poll status, stream SSE events, or receive webhook callbacks - Download results per operation output **Response envelope:** All mutation and query endpoints return `{ success: true, data: {...} }` on success and `{ success: false, error: \"...\", details: [...] }` on failure. Exceptions: `GET /api/operations/schema` returns raw JSON (CDN-cacheable), health probes return flat objects, and `POST /api/contact` returns 204 with no body.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { OperationStatus } from './OperationStatus';
|
|
17
|
+
import {
|
|
18
|
+
OperationStatusFromJSON,
|
|
19
|
+
OperationStatusFromJSONTyped,
|
|
20
|
+
OperationStatusToJSON,
|
|
21
|
+
OperationStatusToJSONTyped,
|
|
22
|
+
} from './OperationStatus';
|
|
23
|
+
import type { OperationResult } from './OperationResult';
|
|
24
|
+
import {
|
|
25
|
+
OperationResultFromJSON,
|
|
26
|
+
OperationResultFromJSONTyped,
|
|
27
|
+
OperationResultToJSON,
|
|
28
|
+
OperationResultToJSONTyped,
|
|
29
|
+
} from './OperationResult';
|
|
30
|
+
import type { OperationType } from './OperationType';
|
|
31
|
+
import {
|
|
32
|
+
OperationTypeFromJSON,
|
|
33
|
+
OperationTypeFromJSONTyped,
|
|
34
|
+
OperationTypeToJSON,
|
|
35
|
+
OperationTypeToJSONTyped,
|
|
36
|
+
} from './OperationType';
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Operation status within a job response
|
|
40
|
+
* @export
|
|
41
|
+
* @interface OperationResponse
|
|
42
|
+
*/
|
|
43
|
+
export interface OperationResponse {
|
|
44
|
+
/**
|
|
45
|
+
* UUID v7 format identifier (time-ordered)
|
|
46
|
+
* @type {string}
|
|
47
|
+
* @memberof OperationResponse
|
|
48
|
+
*/
|
|
49
|
+
id: string;
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
* @type {OperationType}
|
|
53
|
+
* @memberof OperationResponse
|
|
54
|
+
*/
|
|
55
|
+
type: OperationType;
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
* @type {OperationStatus}
|
|
59
|
+
* @memberof OperationResponse
|
|
60
|
+
*/
|
|
61
|
+
status: OperationStatus;
|
|
62
|
+
/**
|
|
63
|
+
* Progress percentage (0-100). Present when in_progress or completed.
|
|
64
|
+
* @type {number}
|
|
65
|
+
* @memberof OperationResponse
|
|
66
|
+
*/
|
|
67
|
+
progress?: number;
|
|
68
|
+
/**
|
|
69
|
+
*
|
|
70
|
+
* @type {OperationResult}
|
|
71
|
+
* @memberof OperationResponse
|
|
72
|
+
*/
|
|
73
|
+
result?: OperationResult;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Check if a given object implements the OperationResponse interface.
|
|
80
|
+
*/
|
|
81
|
+
export function instanceOfOperationResponse(value: object): value is OperationResponse {
|
|
82
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
83
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
84
|
+
if (!('status' in value) || value['status'] === undefined) return false;
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function OperationResponseFromJSON(json: any): OperationResponse {
|
|
89
|
+
return OperationResponseFromJSONTyped(json, false);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function OperationResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): OperationResponse {
|
|
93
|
+
if (json == null) {
|
|
94
|
+
return json;
|
|
95
|
+
}
|
|
96
|
+
return {
|
|
97
|
+
|
|
98
|
+
'id': json['id'],
|
|
99
|
+
'type': OperationTypeFromJSON(json['type']),
|
|
100
|
+
'status': OperationStatusFromJSON(json['status']),
|
|
101
|
+
'progress': json['progress'] == null ? undefined : json['progress'],
|
|
102
|
+
'result': json['result'] == null ? undefined : OperationResultFromJSON(json['result']),
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export function OperationResponseToJSON(json: any): OperationResponse {
|
|
107
|
+
return OperationResponseToJSONTyped(json, false);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export function OperationResponseToJSONTyped(value?: OperationResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
111
|
+
if (value == null) {
|
|
112
|
+
return value;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
return {
|
|
116
|
+
|
|
117
|
+
'id': value['id'],
|
|
118
|
+
'type': OperationTypeToJSON(value['type']),
|
|
119
|
+
'status': OperationStatusToJSON(value['status']),
|
|
120
|
+
'progress': value['progress'],
|
|
121
|
+
'result': OperationResultToJSON(value['result']),
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* GISL Compression API
|
|
5
|
+
* REST API for the GISL (Give It Smaller) file compression and processing service. **Architecture:** - Upload files to get a `file_id` - Create workflows referencing uploaded files with operations (compress, thumbnail, watermark, merge, archive, convert) - Poll status, stream SSE events, or receive webhook callbacks - Download results per operation output **Response envelope:** All mutation and query endpoints return `{ success: true, data: {...} }` on success and `{ success: false, error: \"...\", details: [...] }` on failure. Exceptions: `GET /api/operations/schema` returns raw JSON (CDN-cacheable), health probes return flat objects, and `POST /api/contact` returns 204 with no body.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { OperationResultMetrics } from './OperationResultMetrics';
|
|
17
|
+
import {
|
|
18
|
+
OperationResultMetricsFromJSON,
|
|
19
|
+
OperationResultMetricsFromJSONTyped,
|
|
20
|
+
OperationResultMetricsToJSON,
|
|
21
|
+
OperationResultMetricsToJSONTyped,
|
|
22
|
+
} from './OperationResultMetrics';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Result of a completed operation. Present only when operation status is `completed`.
|
|
26
|
+
*
|
|
27
|
+
* @export
|
|
28
|
+
* @interface OperationResult
|
|
29
|
+
*/
|
|
30
|
+
export interface OperationResult {
|
|
31
|
+
/**
|
|
32
|
+
* Pre-signed download URL for the operation output
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof OperationResult
|
|
35
|
+
*/
|
|
36
|
+
downloadUrl: string;
|
|
37
|
+
/**
|
|
38
|
+
* Output file size in bytes
|
|
39
|
+
* @type {number}
|
|
40
|
+
* @memberof OperationResult
|
|
41
|
+
*/
|
|
42
|
+
sizeBytes: number;
|
|
43
|
+
/**
|
|
44
|
+
* Key in the customer's export destination (if export configured)
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof OperationResult
|
|
47
|
+
*/
|
|
48
|
+
exportKey?: string;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {OperationResultMetrics}
|
|
52
|
+
* @memberof OperationResult
|
|
53
|
+
*/
|
|
54
|
+
metrics?: OperationResultMetrics;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Check if a given object implements the OperationResult interface.
|
|
59
|
+
*/
|
|
60
|
+
export function instanceOfOperationResult(value: object): value is OperationResult {
|
|
61
|
+
if (!('downloadUrl' in value) || value['downloadUrl'] === undefined) return false;
|
|
62
|
+
if (!('sizeBytes' in value) || value['sizeBytes'] === undefined) return false;
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function OperationResultFromJSON(json: any): OperationResult {
|
|
67
|
+
return OperationResultFromJSONTyped(json, false);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function OperationResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): OperationResult {
|
|
71
|
+
if (json == null) {
|
|
72
|
+
return json;
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'downloadUrl': json['download_url'],
|
|
77
|
+
'sizeBytes': json['size_bytes'],
|
|
78
|
+
'exportKey': json['export_key'] == null ? undefined : json['export_key'],
|
|
79
|
+
'metrics': json['metrics'] == null ? undefined : OperationResultMetricsFromJSON(json['metrics']),
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function OperationResultToJSON(json: any): OperationResult {
|
|
84
|
+
return OperationResultToJSONTyped(json, false);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function OperationResultToJSONTyped(value?: OperationResult | null, ignoreDiscriminator: boolean = false): any {
|
|
88
|
+
if (value == null) {
|
|
89
|
+
return value;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
return {
|
|
93
|
+
|
|
94
|
+
'download_url': value['downloadUrl'],
|
|
95
|
+
'size_bytes': value['sizeBytes'],
|
|
96
|
+
'export_key': value['exportKey'],
|
|
97
|
+
'metrics': OperationResultMetricsToJSON(value['metrics']),
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* GISL Compression API
|
|
5
|
+
* REST API for the GISL (Give It Smaller) file compression and processing service. **Architecture:** - Upload files to get a `file_id` - Create workflows referencing uploaded files with operations (compress, thumbnail, watermark, merge, archive, convert) - Poll status, stream SSE events, or receive webhook callbacks - Download results per operation output **Response envelope:** All mutation and query endpoints return `{ success: true, data: {...} }` on success and `{ success: false, error: \"...\", details: [...] }` on failure. Exceptions: `GET /api/operations/schema` returns raw JSON (CDN-cacheable), health probes return flat objects, and `POST /api/contact` returns 204 with no body.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2.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
|
+
* Operation-specific performance metrics
|
|
18
|
+
* @export
|
|
19
|
+
* @interface OperationResultMetrics
|
|
20
|
+
*/
|
|
21
|
+
export interface OperationResultMetrics {
|
|
22
|
+
/**
|
|
23
|
+
* Ratio of output size to input size (e.g. 0.45 = 55% reduction)
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof OperationResultMetrics
|
|
26
|
+
*/
|
|
27
|
+
compressionRatio?: number;
|
|
28
|
+
/**
|
|
29
|
+
* Processing time in milliseconds
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof OperationResultMetrics
|
|
32
|
+
*/
|
|
33
|
+
durationMs?: number;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the OperationResultMetrics interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfOperationResultMetrics(value: object): value is OperationResultMetrics {
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function OperationResultMetricsFromJSON(json: any): OperationResultMetrics {
|
|
44
|
+
return OperationResultMetricsFromJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function OperationResultMetricsFromJSONTyped(json: any, ignoreDiscriminator: boolean): OperationResultMetrics {
|
|
48
|
+
if (json == null) {
|
|
49
|
+
return json;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
|
|
53
|
+
'compressionRatio': json['compression_ratio'] == null ? undefined : json['compression_ratio'],
|
|
54
|
+
'durationMs': json['duration_ms'] == null ? undefined : json['duration_ms'],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function OperationResultMetricsToJSON(json: any): OperationResultMetrics {
|
|
59
|
+
return OperationResultMetricsToJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function OperationResultMetricsToJSONTyped(value?: OperationResultMetrics | null, ignoreDiscriminator: boolean = false): any {
|
|
63
|
+
if (value == null) {
|
|
64
|
+
return value;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return {
|
|
68
|
+
|
|
69
|
+
'compression_ratio': value['compressionRatio'],
|
|
70
|
+
'duration_ms': value['durationMs'],
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* GISL Compression API
|
|
5
|
+
* REST API for the GISL (Give It Smaller) file compression and processing service. **Architecture:** - Upload files to get a `file_id` - Create workflows referencing uploaded files with operations (compress, thumbnail, watermark, merge, archive, convert) - Poll status, stream SSE events, or receive webhook callbacks - Download results per operation output **Response envelope:** All mutation and query endpoints return `{ success: true, data: {...} }` on success and `{ success: false, error: \"...\", details: [...] }` on failure. Exceptions: `GET /api/operations/schema` returns raw JSON (CDN-cacheable), health probes return flat objects, and `POST /api/contact` returns 204 with no body.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { MimeGroupSchema } from './MimeGroupSchema';
|
|
17
|
+
import {
|
|
18
|
+
MimeGroupSchemaFromJSON,
|
|
19
|
+
MimeGroupSchemaFromJSONTyped,
|
|
20
|
+
MimeGroupSchemaToJSON,
|
|
21
|
+
MimeGroupSchemaToJSONTyped,
|
|
22
|
+
} from './MimeGroupSchema';
|
|
23
|
+
import type { OperationInputModel } from './OperationInputModel';
|
|
24
|
+
import {
|
|
25
|
+
OperationInputModelFromJSON,
|
|
26
|
+
OperationInputModelFromJSONTyped,
|
|
27
|
+
OperationInputModelToJSON,
|
|
28
|
+
OperationInputModelToJSONTyped,
|
|
29
|
+
} from './OperationInputModel';
|
|
30
|
+
import type { OptionSchema } from './OptionSchema';
|
|
31
|
+
import {
|
|
32
|
+
OptionSchemaFromJSON,
|
|
33
|
+
OptionSchemaFromJSONTyped,
|
|
34
|
+
OptionSchemaToJSON,
|
|
35
|
+
OptionSchemaToJSONTyped,
|
|
36
|
+
} from './OptionSchema';
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Schema for a single operation type
|
|
40
|
+
* @export
|
|
41
|
+
* @interface OperationSchemaDefinition
|
|
42
|
+
*/
|
|
43
|
+
export interface OperationSchemaDefinition {
|
|
44
|
+
/**
|
|
45
|
+
* Human-readable description of what the operation does
|
|
46
|
+
* @type {string}
|
|
47
|
+
* @memberof OperationSchemaDefinition
|
|
48
|
+
*/
|
|
49
|
+
description: string;
|
|
50
|
+
/**
|
|
51
|
+
* Whether this is the default operation when none specified
|
|
52
|
+
* @type {boolean}
|
|
53
|
+
* @memberof OperationSchemaDefinition
|
|
54
|
+
*/
|
|
55
|
+
_default?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
* @type {OperationInputModel}
|
|
59
|
+
* @memberof OperationSchemaDefinition
|
|
60
|
+
*/
|
|
61
|
+
inputModel: OperationInputModel;
|
|
62
|
+
/**
|
|
63
|
+
* Minimum number of inputs (multi-input operations only)
|
|
64
|
+
* @type {number}
|
|
65
|
+
* @memberof OperationSchemaDefinition
|
|
66
|
+
*/
|
|
67
|
+
minInputs?: number;
|
|
68
|
+
/**
|
|
69
|
+
* Maximum number of inputs (multi-input operations only)
|
|
70
|
+
* @type {number}
|
|
71
|
+
* @memberof OperationSchemaDefinition
|
|
72
|
+
*/
|
|
73
|
+
maxInputs?: number;
|
|
74
|
+
/**
|
|
75
|
+
* Whether mixed MIME types are allowed (archive only)
|
|
76
|
+
* @type {boolean}
|
|
77
|
+
* @memberof OperationSchemaDefinition
|
|
78
|
+
*/
|
|
79
|
+
acceptsMixedTypes?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* MIME-type-specific option schemas. When present, options are grouped
|
|
82
|
+
* by MIME category (image, video, audio, document). Each group lists
|
|
83
|
+
* the supported MIME types and group-specific options.
|
|
84
|
+
*
|
|
85
|
+
* @type {{ [key: string]: MimeGroupSchema; }}
|
|
86
|
+
* @memberof OperationSchemaDefinition
|
|
87
|
+
*/
|
|
88
|
+
mimeGroups?: { [key: string]: MimeGroupSchema; };
|
|
89
|
+
/**
|
|
90
|
+
* Global options applicable regardless of MIME type, keyed by option name.
|
|
91
|
+
* For operations with mime_groups, these are the common options.
|
|
92
|
+
*
|
|
93
|
+
* @type {{ [key: string]: OptionSchema; }}
|
|
94
|
+
* @memberof OperationSchemaDefinition
|
|
95
|
+
*/
|
|
96
|
+
options: { [key: string]: OptionSchema; };
|
|
97
|
+
/**
|
|
98
|
+
* Options that can be overridden per-input for multi-input operations,
|
|
99
|
+
* keyed by option name. For merge: per-join-point transition overrides.
|
|
100
|
+
*
|
|
101
|
+
* @type {{ [key: string]: OptionSchema; }}
|
|
102
|
+
* @memberof OperationSchemaDefinition
|
|
103
|
+
*/
|
|
104
|
+
perInputOptions?: { [key: string]: OptionSchema; };
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Check if a given object implements the OperationSchemaDefinition interface.
|
|
111
|
+
*/
|
|
112
|
+
export function instanceOfOperationSchemaDefinition(value: object): value is OperationSchemaDefinition {
|
|
113
|
+
if (!('description' in value) || value['description'] === undefined) return false;
|
|
114
|
+
if (!('inputModel' in value) || value['inputModel'] === undefined) return false;
|
|
115
|
+
if (!('options' in value) || value['options'] === undefined) return false;
|
|
116
|
+
return true;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export function OperationSchemaDefinitionFromJSON(json: any): OperationSchemaDefinition {
|
|
120
|
+
return OperationSchemaDefinitionFromJSONTyped(json, false);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export function OperationSchemaDefinitionFromJSONTyped(json: any, ignoreDiscriminator: boolean): OperationSchemaDefinition {
|
|
124
|
+
if (json == null) {
|
|
125
|
+
return json;
|
|
126
|
+
}
|
|
127
|
+
return {
|
|
128
|
+
|
|
129
|
+
'description': json['description'],
|
|
130
|
+
'_default': json['default'] == null ? undefined : json['default'],
|
|
131
|
+
'inputModel': OperationInputModelFromJSON(json['input_model']),
|
|
132
|
+
'minInputs': json['min_inputs'] == null ? undefined : json['min_inputs'],
|
|
133
|
+
'maxInputs': json['max_inputs'] == null ? undefined : json['max_inputs'],
|
|
134
|
+
'acceptsMixedTypes': json['accepts_mixed_types'] == null ? undefined : json['accepts_mixed_types'],
|
|
135
|
+
'mimeGroups': json['mime_groups'] == null ? undefined : (mapValues(json['mime_groups'], MimeGroupSchemaFromJSON)),
|
|
136
|
+
'options': (mapValues(json['options'], OptionSchemaFromJSON)),
|
|
137
|
+
'perInputOptions': json['per_input_options'] == null ? undefined : (mapValues(json['per_input_options'], OptionSchemaFromJSON)),
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export function OperationSchemaDefinitionToJSON(json: any): OperationSchemaDefinition {
|
|
142
|
+
return OperationSchemaDefinitionToJSONTyped(json, false);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export function OperationSchemaDefinitionToJSONTyped(value?: OperationSchemaDefinition | null, ignoreDiscriminator: boolean = false): any {
|
|
146
|
+
if (value == null) {
|
|
147
|
+
return value;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
return {
|
|
151
|
+
|
|
152
|
+
'description': value['description'],
|
|
153
|
+
'default': value['_default'],
|
|
154
|
+
'input_model': OperationInputModelToJSON(value['inputModel']),
|
|
155
|
+
'min_inputs': value['minInputs'],
|
|
156
|
+
'max_inputs': value['maxInputs'],
|
|
157
|
+
'accepts_mixed_types': value['acceptsMixedTypes'],
|
|
158
|
+
'mime_groups': value['mimeGroups'] == null ? undefined : (mapValues(value['mimeGroups'], MimeGroupSchemaToJSON)),
|
|
159
|
+
'options': (mapValues(value['options'], OptionSchemaToJSON)),
|
|
160
|
+
'per_input_options': value['perInputOptions'] == null ? undefined : (mapValues(value['perInputOptions'], OptionSchemaToJSON)),
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* GISL Compression API
|
|
5
|
+
* REST API for the GISL (Give It Smaller) file compression and processing service. **Architecture:** - Upload files to get a `file_id` - Create workflows referencing uploaded files with operations (compress, thumbnail, watermark, merge, archive, convert) - Poll status, stream SSE events, or receive webhook callbacks - Download results per operation output **Response envelope:** All mutation and query endpoints return `{ success: true, data: {...} }` on success and `{ success: false, error: \"...\", details: [...] }` on failure. Exceptions: `GET /api/operations/schema` returns raw JSON (CDN-cacheable), health probes return flat objects, and `POST /api/contact` returns 204 with no body.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2.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
|
+
/**
|
|
17
|
+
* Operation lifecycle status:
|
|
18
|
+
* - pending: Created, waiting to start
|
|
19
|
+
* - in_progress: Currently processing
|
|
20
|
+
* - completed: Finished successfully
|
|
21
|
+
* - failed: Encountered an error
|
|
22
|
+
* - retried: Failed and replaced by a new retry operation
|
|
23
|
+
*
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
export const OperationStatus = {
|
|
27
|
+
pending: 'pending',
|
|
28
|
+
in_progress: 'in_progress',
|
|
29
|
+
completed: 'completed',
|
|
30
|
+
failed: 'failed',
|
|
31
|
+
retried: 'retried'
|
|
32
|
+
} as const;
|
|
33
|
+
export type OperationStatus = typeof OperationStatus[keyof typeof OperationStatus];
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
export function instanceOfOperationStatus(value: any): boolean {
|
|
37
|
+
for (const key in OperationStatus) {
|
|
38
|
+
if (Object.prototype.hasOwnProperty.call(OperationStatus, key)) {
|
|
39
|
+
if (OperationStatus[key as keyof typeof OperationStatus] === value) {
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function OperationStatusFromJSON(json: any): OperationStatus {
|
|
48
|
+
return OperationStatusFromJSONTyped(json, false);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function OperationStatusFromJSONTyped(json: any, ignoreDiscriminator: boolean): OperationStatus {
|
|
52
|
+
return json as OperationStatus;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function OperationStatusToJSON(value?: OperationStatus | null): any {
|
|
56
|
+
return value as any;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function OperationStatusToJSONTyped(value: any, ignoreDiscriminator: boolean): OperationStatus {
|
|
60
|
+
return value as OperationStatus;
|
|
61
|
+
}
|
|
62
|
+
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* GISL Compression API
|
|
5
|
+
* REST API for the GISL (Give It Smaller) file compression and processing service. **Architecture:** - Upload files to get a `file_id` - Create workflows referencing uploaded files with operations (compress, thumbnail, watermark, merge, archive, convert) - Poll status, stream SSE events, or receive webhook callbacks - Download results per operation output **Response envelope:** All mutation and query endpoints return `{ success: true, data: {...} }` on success and `{ success: false, error: \"...\", details: [...] }` on failure. Exceptions: `GET /api/operations/schema` returns raw JSON (CDN-cacheable), health probes return flat objects, and `POST /api/contact` returns 204 with no body.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 2.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
|
+
/**
|
|
17
|
+
* Available operation types:
|
|
18
|
+
* - compress: Reduce file size (images, audio, video, documents)
|
|
19
|
+
* - thumbnail: Generate preview image (images, video, documents)
|
|
20
|
+
* - watermark: Apply branding/protection (images, video, audio, documents)
|
|
21
|
+
* - merge: Concatenate/combine multiple files into one (images, video, audio, documents/PDF). Multi-input.
|
|
22
|
+
* - archive: Bundle files into ZIP/tar.gz (all types). Multi-input.
|
|
23
|
+
* - convert: Change file format (all types)
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
*/
|
|
27
|
+
export const OperationType = {
|
|
28
|
+
compress: 'compress',
|
|
29
|
+
thumbnail: 'thumbnail',
|
|
30
|
+
watermark: 'watermark',
|
|
31
|
+
merge: 'merge',
|
|
32
|
+
archive: 'archive',
|
|
33
|
+
convert: 'convert'
|
|
34
|
+
} as const;
|
|
35
|
+
export type OperationType = typeof OperationType[keyof typeof OperationType];
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
export function instanceOfOperationType(value: any): boolean {
|
|
39
|
+
for (const key in OperationType) {
|
|
40
|
+
if (Object.prototype.hasOwnProperty.call(OperationType, key)) {
|
|
41
|
+
if (OperationType[key as keyof typeof OperationType] === value) {
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function OperationTypeFromJSON(json: any): OperationType {
|
|
50
|
+
return OperationTypeFromJSONTyped(json, false);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function OperationTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): OperationType {
|
|
54
|
+
return json as OperationType;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function OperationTypeToJSON(value?: OperationType | null): any {
|
|
58
|
+
return value as any;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function OperationTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): OperationType {
|
|
62
|
+
return value as OperationType;
|
|
63
|
+
}
|
|
64
|
+
|