@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.
Files changed (89) hide show
  1. package/asyncapi/ErrorCode.ts +19 -0
  2. package/asyncapi/MergeOutputType.ts +9 -0
  3. package/asyncapi/NotificationsOperationsQueue.ts +4 -0
  4. package/asyncapi/OperationMetrics.ts +12 -0
  5. package/asyncapi/OperationProgress.ts +12 -0
  6. package/asyncapi/OperationRequest.ts +21 -0
  7. package/asyncapi/OperationResult.ts +20 -0
  8. package/asyncapi/OperationType.ts +10 -0
  9. package/asyncapi/ProgressStatus.ts +8 -0
  10. package/asyncapi/README.md +16 -0
  11. package/asyncapi/ResultStatus.ts +6 -0
  12. package/asyncapi/SourceEntry.ts +9 -0
  13. package/asyncapi/index.ts +11 -0
  14. package/index.ts +5 -0
  15. package/openapi/.openapi-generator-ignore +26 -0
  16. package/openapi/README.md +17 -0
  17. package/openapi/index.ts +4 -0
  18. package/openapi/models/CallbackEventType.ts +60 -0
  19. package/openapi/models/ContactRequest.ts +113 -0
  20. package/openapi/models/ContactSubject.ts +62 -0
  21. package/openapi/models/ContactValidationErrorResponse.ts +67 -0
  22. package/openapi/models/ErrorEnvelope.ts +85 -0
  23. package/openapi/models/ExportConfig.ts +108 -0
  24. package/openapi/models/JobDefinition.ts +56 -0
  25. package/openapi/models/JobDownload.ts +92 -0
  26. package/openapi/models/JobInput.ts +89 -0
  27. package/openapi/models/JobResponse.ts +119 -0
  28. package/openapi/models/JobSource.ts +79 -0
  29. package/openapi/models/JobStatus.ts +62 -0
  30. package/openapi/models/JobType.ts +60 -0
  31. package/openapi/models/LivenessResponse.ts +66 -0
  32. package/openapi/models/MetadataResponse.ts +223 -0
  33. package/openapi/models/MetadataResponseDimensions.ts +73 -0
  34. package/openapi/models/MetadataResponseExif.ts +97 -0
  35. package/openapi/models/MetadataResponseExifGps.ts +73 -0
  36. package/openapi/models/MetadataSuccessEnvelope.ts +93 -0
  37. package/openapi/models/MimeGroupSchema.ts +91 -0
  38. package/openapi/models/MultipartCompleteRequest.ts +85 -0
  39. package/openapi/models/MultipartCompleteRequestPartsInner.ts +75 -0
  40. package/openapi/models/MultipartInitiateResponse.ts +137 -0
  41. package/openapi/models/MultipartInitiateSuccessEnvelope.ts +93 -0
  42. package/openapi/models/OperationDefinition.ts +91 -0
  43. package/openapi/models/OperationDownload.ts +102 -0
  44. package/openapi/models/OperationInputModel.ts +56 -0
  45. package/openapi/models/OperationResponse.ts +124 -0
  46. package/openapi/models/OperationResult.ts +100 -0
  47. package/openapi/models/OperationResultMetrics.ts +73 -0
  48. package/openapi/models/OperationSchemaDefinition.ts +163 -0
  49. package/openapi/models/OperationStatus.ts +62 -0
  50. package/openapi/models/OperationType.ts +64 -0
  51. package/openapi/models/OperationsSchemaResponse.ts +90 -0
  52. package/openapi/models/OptionSchema.ts +160 -0
  53. package/openapi/models/PresignedUrlPart.ts +86 -0
  54. package/openapi/models/ReadinessResponse.ts +73 -0
  55. package/openapi/models/ResponseEnvelope.ts +70 -0
  56. package/openapi/models/RetryResponse.ts +94 -0
  57. package/openapi/models/RetrySuccessEnvelope.ts +93 -0
  58. package/openapi/models/SseEventType.ts +68 -0
  59. package/openapi/models/SseJobCompletedData.ts +94 -0
  60. package/openapi/models/SseJobFailedData.ts +94 -0
  61. package/openapi/models/SseOperationCompletedData.ts +143 -0
  62. package/openapi/models/SseOperationFailedData.ts +129 -0
  63. package/openapi/models/SseOperationProgressData.ts +103 -0
  64. package/openapi/models/SseWorkflowTerminalData.ts +89 -0
  65. package/openapi/models/UploadResponse.ts +93 -0
  66. package/openapi/models/UploadSuccessEnvelope.ts +93 -0
  67. package/openapi/models/ValidationErrorEnvelope.ts +104 -0
  68. package/openapi/models/ValidationErrorEnvelopeDetailsInner.ts +90 -0
  69. package/openapi/models/WebhookOperationContext.ts +77 -0
  70. package/openapi/models/WebhookPayload.ts +132 -0
  71. package/openapi/models/WorkflowCreateRequest.ts +143 -0
  72. package/openapi/models/WorkflowCreateResponse.ts +114 -0
  73. package/openapi/models/WorkflowCreateSuccessEnvelope.ts +93 -0
  74. package/openapi/models/WorkflowDownloadResponse.ts +74 -0
  75. package/openapi/models/WorkflowDownloadSuccessEnvelope.ts +93 -0
  76. package/openapi/models/WorkflowEdge.ts +77 -0
  77. package/openapi/models/WorkflowStatus.ts +62 -0
  78. package/openapi/models/WorkflowStatusResponse.ts +101 -0
  79. package/openapi/models/WorkflowStatusSuccessEnvelope.ts +93 -0
  80. package/openapi/models/index.ts +64 -0
  81. package/openapi/runtime.ts +432 -0
  82. package/operations/README.md +17 -0
  83. package/operations/archive.ts +16 -0
  84. package/operations/compress.ts +177 -0
  85. package/operations/convert.ts +69 -0
  86. package/operations/index.ts +7 -0
  87. package/operations/merge.ts +95 -0
  88. package/operations/thumbnail.ts +66 -0
  89. package/package.json +19 -0
@@ -0,0 +1,19 @@
1
+
2
+ enum ErrorCode {
3
+ S3_DOWNLOAD_FAILED = "s3_download_failed",
4
+ S3_UPLOAD_FAILED = "s3_upload_failed",
5
+ S3_ACCESS_DENIED = "s3_access_denied",
6
+ OUT_OF_MEMORY = "out_of_memory",
7
+ TIMEOUT = "timeout",
8
+ INVALID_FORMAT = "invalid_format",
9
+ FORMAT_MISMATCH = "format_mismatch",
10
+ DECODE_FAILED = "decode_failed",
11
+ PROCESSING_FAILED = "processing_failed",
12
+ OUTPUT_TOO_LARGE = "output_too_large",
13
+ INVALID_OPTIONS = "invalid_options",
14
+ MISSING_SOURCE = "missing_source",
15
+ INVALID_KEY = "invalid_key",
16
+ INVALID_REQUEST = "invalid_request",
17
+ UNKNOWN = "unknown",
18
+ }
19
+ export default ErrorCode;
@@ -0,0 +1,9 @@
1
+
2
+ enum MergeOutputType {
3
+ RESERVED_IMAGE = "image",
4
+ GIF = "gif",
5
+ VIDEO = "video",
6
+ AUDIO = "audio",
7
+ RESERVED_DOCUMENT = "document",
8
+ }
9
+ export default MergeOutputType;
@@ -0,0 +1,4 @@
1
+ import OperationProgress from './OperationProgress';
2
+ import OperationResult from './OperationResult';
3
+ type NotificationsOperationsQueue = OperationProgress | OperationResult;
4
+ export default NotificationsOperationsQueue;
@@ -0,0 +1,12 @@
1
+
2
+ interface OperationMetrics {
3
+ 'original_size_bytes'?: number;
4
+ 'output_size_bytes'?: number;
5
+ 'compression_ratio'?: number;
6
+ 'duration_ms'?: number;
7
+ 'input_count'?: number;
8
+ 'file_count'?: number;
9
+ 'total_input_size_bytes'?: number;
10
+ 'additionalProperties'?: Record<string, any>;
11
+ }
12
+ export default OperationMetrics;
@@ -0,0 +1,12 @@
1
+ import OperationType from './OperationType';
2
+ import ProgressStatus from './ProgressStatus';
3
+ interface OperationProgress {
4
+ 'job_id': string;
5
+ 'operation_id': string;
6
+ 'operation_type': OperationType;
7
+ 'status': ProgressStatus;
8
+ 'progress': number;
9
+ 'stage'?: string;
10
+ 'additionalProperties'?: Record<string, any>;
11
+ }
12
+ export default OperationProgress;
@@ -0,0 +1,21 @@
1
+ import OperationType from './OperationType';
2
+ import SourceEntry from './SourceEntry';
3
+ import MergeOutputType from './MergeOutputType';
4
+ interface OperationRequest {
5
+ 'job_id': string;
6
+ 'operation_id': string;
7
+ 'operation_type': OperationType;
8
+ 'workflow_id'?: string;
9
+ 'file_type'?: string;
10
+ 'source_bucket'?: string;
11
+ 'source_key'?: string;
12
+ 'sources'?: SourceEntry[];
13
+ 'output_bucket': string;
14
+ 'output_key_prefix': string;
15
+ 'output_type'?: MergeOutputType;
16
+ 'options'?: Record<string, any>;
17
+ 'source_credentials'?: Record<string, any>;
18
+ 'export'?: Record<string, any>;
19
+ 'additionalProperties'?: Record<string, any>;
20
+ }
21
+ export default OperationRequest;
@@ -0,0 +1,20 @@
1
+ import OperationType from './OperationType';
2
+ import ResultStatus from './ResultStatus';
3
+ import OperationMetrics from './OperationMetrics';
4
+ import ErrorCode from './ErrorCode';
5
+ interface OperationResult {
6
+ 'job_id': string;
7
+ 'operation_id': string;
8
+ 'operation_type': OperationType;
9
+ 'status': ResultStatus;
10
+ 'output_bucket'?: string;
11
+ 'output_key'?: string;
12
+ 'output_size_bytes'?: number;
13
+ 'metrics'?: OperationMetrics;
14
+ 'error_code'?: ErrorCode;
15
+ 'error_message'?: string;
16
+ 'is_retryable'?: boolean;
17
+ 'last_progress'?: number;
18
+ 'additionalProperties'?: Record<string, any>;
19
+ }
20
+ export default OperationResult;
@@ -0,0 +1,10 @@
1
+
2
+ enum OperationType {
3
+ COMPRESS = "compress",
4
+ THUMBNAIL = "thumbnail",
5
+ WATERMARK = "watermark",
6
+ CONVERT = "convert",
7
+ MERGE = "merge",
8
+ ARCHIVE = "archive",
9
+ }
10
+ export default OperationType;
@@ -0,0 +1,8 @@
1
+
2
+ enum ProgressStatus {
3
+ STARTED = "started",
4
+ DOWNLOADING = "downloading",
5
+ PROCESSING = "processing",
6
+ UPLOADING = "uploading",
7
+ }
8
+ export default ProgressStatus;
@@ -0,0 +1,16 @@
1
+ # TypeScript -- AsyncAPI Event Models
2
+
3
+ > **Auto-generated** -- do not edit manually. Changes will be overwritten on the next generation run.
4
+ >
5
+ > Regenerate with: `make project/generate-tests`
6
+
7
+ ## Source
8
+
9
+ - **Spec:** `compression_contracts/asyncapi/events.yaml` (AsyncAPI 3.0)
10
+ - **Generator:** [asyncapi/cli](https://www.asyncapi.com/tools/cli) 6.0.0
11
+ (Docker image: `asyncapi/cli:6.0.0`)
12
+ - **Files:** 12
13
+
14
+ ## Contents
15
+
16
+ TypeScript interfaces and enum types for async event models (operation requests, progress updates, results).
@@ -0,0 +1,6 @@
1
+
2
+ enum ResultStatus {
3
+ COMPLETED = "completed",
4
+ FAILED = "failed",
5
+ }
6
+ export default ResultStatus;
@@ -0,0 +1,9 @@
1
+
2
+ interface SourceEntry {
3
+ 'bucket': string;
4
+ 'key': string;
5
+ 'transition'?: string;
6
+ 'page_range'?: string;
7
+ 'additionalProperties'?: Record<string, any>;
8
+ }
9
+ export default SourceEntry;
@@ -0,0 +1,11 @@
1
+ export { default as ErrorCode } from './ErrorCode';
2
+ export { default as MergeOutputType } from './MergeOutputType';
3
+ export { default as NotificationsOperationsQueue } from './NotificationsOperationsQueue';
4
+ export { default as OperationMetrics } from './OperationMetrics';
5
+ export { default as OperationProgress } from './OperationProgress';
6
+ export { default as OperationRequest } from './OperationRequest';
7
+ export { default as OperationResult } from './OperationResult';
8
+ export { default as OperationType } from './OperationType';
9
+ export { default as ProgressStatus } from './ProgressStatus';
10
+ export { default as ResultStatus } from './ResultStatus';
11
+ export { default as SourceEntry } from './SourceEntry';
package/index.ts ADDED
@@ -0,0 +1,5 @@
1
+ // Auto-generated -- do not edit
2
+
3
+ export * as openapi from './openapi/index';
4
+ export * as asyncapi from './asyncapi/index';
5
+ export * as operations from './operations/index';
@@ -0,0 +1,26 @@
1
+ # Ignore everything except models and required supporting files
2
+ docs/**
3
+ test/**
4
+ tests/**
5
+ .travis.yml
6
+ .gitlab-ci.yml
7
+ .github/**
8
+ git_push.sh
9
+ tox.ini
10
+ setup.cfg
11
+ setup.py
12
+ pyproject.toml
13
+ requirements.txt
14
+ test-requirements.txt
15
+ README.md
16
+ .gitignore
17
+ .openapi-generator/**
18
+ # PHP-specific junk
19
+ .php-cs-fixer.dist.php
20
+ phpunit.xml.dist
21
+ # Package manifests (unified manifest generated separately)
22
+ composer.json
23
+ # No API clients needed (models only)
24
+ **/api/**
25
+ **/apis/**
26
+ **/Api/**
@@ -0,0 +1,17 @@
1
+ # TypeScript -- OpenAPI Models
2
+
3
+ > **Auto-generated** -- do not edit manually. Changes will be overwritten on the next generation run.
4
+ >
5
+ > Regenerate with: `make project/generate-tests`
6
+
7
+ ## Source
8
+
9
+ - **Spec:** `compression_contracts/openapi/api.yaml` (OpenAPI 3.1)
10
+ - **Generator:** [openapi-generator-cli](https://openapi-generator.tech/) v7.13.0
11
+ (Docker image: `openapitools/openapi-generator-cli:v7.13.0`)
12
+ - **Generator preset:** `typescript-fetch`, models only
13
+ - **Files:** 65
14
+
15
+ ## Contents
16
+
17
+ TypeScript interfaces and enum types for the REST API, generated with the `typescript-fetch` generator.
@@ -0,0 +1,4 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export * from './runtime';
4
+ export * from './models/index';
@@ -0,0 +1,60 @@
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
+ * Events that can trigger a webhook callback:
18
+ * - workflow.completed: All jobs done successfully
19
+ * - workflow.failed: At least one job failed, none in progress
20
+ * - workflow.partially_failed: Some succeeded, some failed
21
+ * - operation.completed: Individual operation done (opt-in for granular progress)
22
+ *
23
+ * @export
24
+ */
25
+ export const CallbackEventType = {
26
+ workflow_completed: 'workflow.completed',
27
+ workflow_failed: 'workflow.failed',
28
+ workflow_partially_failed: 'workflow.partially_failed',
29
+ operation_completed: 'operation.completed'
30
+ } as const;
31
+ export type CallbackEventType = typeof CallbackEventType[keyof typeof CallbackEventType];
32
+
33
+
34
+ export function instanceOfCallbackEventType(value: any): boolean {
35
+ for (const key in CallbackEventType) {
36
+ if (Object.prototype.hasOwnProperty.call(CallbackEventType, key)) {
37
+ if (CallbackEventType[key as keyof typeof CallbackEventType] === value) {
38
+ return true;
39
+ }
40
+ }
41
+ }
42
+ return false;
43
+ }
44
+
45
+ export function CallbackEventTypeFromJSON(json: any): CallbackEventType {
46
+ return CallbackEventTypeFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function CallbackEventTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): CallbackEventType {
50
+ return json as CallbackEventType;
51
+ }
52
+
53
+ export function CallbackEventTypeToJSON(value?: CallbackEventType | null): any {
54
+ return value as any;
55
+ }
56
+
57
+ export function CallbackEventTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): CallbackEventType {
58
+ return value as CallbackEventType;
59
+ }
60
+
@@ -0,0 +1,113 @@
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 { ContactSubject } from './ContactSubject';
17
+ import {
18
+ ContactSubjectFromJSON,
19
+ ContactSubjectFromJSONTyped,
20
+ ContactSubjectToJSON,
21
+ ContactSubjectToJSONTyped,
22
+ } from './ContactSubject';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface ContactRequest
28
+ */
29
+ export interface ContactRequest {
30
+ /**
31
+ * Sender's name (optional)
32
+ * @type {string}
33
+ * @memberof ContactRequest
34
+ */
35
+ name?: string;
36
+ /**
37
+ * Sender's email address
38
+ * @type {string}
39
+ * @memberof ContactRequest
40
+ */
41
+ email: string;
42
+ /**
43
+ *
44
+ * @type {ContactSubject}
45
+ * @memberof ContactRequest
46
+ */
47
+ subject: ContactSubject;
48
+ /**
49
+ * Message body
50
+ * @type {string}
51
+ * @memberof ContactRequest
52
+ */
53
+ message: string;
54
+ /**
55
+ * Honeypot field for bot detection. Hidden from real users via CSS.
56
+ * Legitimate submissions must omit this field or send an empty string.
57
+ * The API rejects any request where this field is non-empty.
58
+ *
59
+ * @type {string}
60
+ * @memberof ContactRequest
61
+ */
62
+ website?: string;
63
+ }
64
+
65
+
66
+
67
+ /**
68
+ * Check if a given object implements the ContactRequest interface.
69
+ */
70
+ export function instanceOfContactRequest(value: object): value is ContactRequest {
71
+ if (!('email' in value) || value['email'] === undefined) return false;
72
+ if (!('subject' in value) || value['subject'] === undefined) return false;
73
+ if (!('message' in value) || value['message'] === undefined) return false;
74
+ return true;
75
+ }
76
+
77
+ export function ContactRequestFromJSON(json: any): ContactRequest {
78
+ return ContactRequestFromJSONTyped(json, false);
79
+ }
80
+
81
+ export function ContactRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContactRequest {
82
+ if (json == null) {
83
+ return json;
84
+ }
85
+ return {
86
+
87
+ 'name': json['name'] == null ? undefined : json['name'],
88
+ 'email': json['email'],
89
+ 'subject': ContactSubjectFromJSON(json['subject']),
90
+ 'message': json['message'],
91
+ 'website': json['website'] == null ? undefined : json['website'],
92
+ };
93
+ }
94
+
95
+ export function ContactRequestToJSON(json: any): ContactRequest {
96
+ return ContactRequestToJSONTyped(json, false);
97
+ }
98
+
99
+ export function ContactRequestToJSONTyped(value?: ContactRequest | null, ignoreDiscriminator: boolean = false): any {
100
+ if (value == null) {
101
+ return value;
102
+ }
103
+
104
+ return {
105
+
106
+ 'name': value['name'],
107
+ 'email': value['email'],
108
+ 'subject': ContactSubjectToJSON(value['subject']),
109
+ 'message': value['message'],
110
+ 'website': value['website'],
111
+ };
112
+ }
113
+
@@ -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
+ * Subject category:
18
+ * - general_enquiry: General questions
19
+ * - bug_report: Report a bug or issue
20
+ * - suggestion: Feature suggestion or improvement idea
21
+ * - complaint: Complaint about the service
22
+ * - business_enquiry: Business or partnership enquiry
23
+ *
24
+ * @export
25
+ */
26
+ export const ContactSubject = {
27
+ general_enquiry: 'general_enquiry',
28
+ bug_report: 'bug_report',
29
+ suggestion: 'suggestion',
30
+ complaint: 'complaint',
31
+ business_enquiry: 'business_enquiry'
32
+ } as const;
33
+ export type ContactSubject = typeof ContactSubject[keyof typeof ContactSubject];
34
+
35
+
36
+ export function instanceOfContactSubject(value: any): boolean {
37
+ for (const key in ContactSubject) {
38
+ if (Object.prototype.hasOwnProperty.call(ContactSubject, key)) {
39
+ if (ContactSubject[key as keyof typeof ContactSubject] === value) {
40
+ return true;
41
+ }
42
+ }
43
+ }
44
+ return false;
45
+ }
46
+
47
+ export function ContactSubjectFromJSON(json: any): ContactSubject {
48
+ return ContactSubjectFromJSONTyped(json, false);
49
+ }
50
+
51
+ export function ContactSubjectFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContactSubject {
52
+ return json as ContactSubject;
53
+ }
54
+
55
+ export function ContactSubjectToJSON(value?: ContactSubject | null): any {
56
+ return value as any;
57
+ }
58
+
59
+ export function ContactSubjectToJSONTyped(value: any, ignoreDiscriminator: boolean): ContactSubject {
60
+ return value as ContactSubject;
61
+ }
62
+
@@ -0,0 +1,67 @@
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
+ *
18
+ * @export
19
+ * @interface ContactValidationErrorResponse
20
+ */
21
+ export interface ContactValidationErrorResponse {
22
+ /**
23
+ * Map of field names to arrays of validation error messages.
24
+ *
25
+ * @type {{ [key: string]: Array<string>; }}
26
+ * @memberof ContactValidationErrorResponse
27
+ */
28
+ errors: { [key: string]: Array<string>; };
29
+ }
30
+
31
+ /**
32
+ * Check if a given object implements the ContactValidationErrorResponse interface.
33
+ */
34
+ export function instanceOfContactValidationErrorResponse(value: object): value is ContactValidationErrorResponse {
35
+ if (!('errors' in value) || value['errors'] === undefined) return false;
36
+ return true;
37
+ }
38
+
39
+ export function ContactValidationErrorResponseFromJSON(json: any): ContactValidationErrorResponse {
40
+ return ContactValidationErrorResponseFromJSONTyped(json, false);
41
+ }
42
+
43
+ export function ContactValidationErrorResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ContactValidationErrorResponse {
44
+ if (json == null) {
45
+ return json;
46
+ }
47
+ return {
48
+
49
+ 'errors': json['errors'],
50
+ };
51
+ }
52
+
53
+ export function ContactValidationErrorResponseToJSON(json: any): ContactValidationErrorResponse {
54
+ return ContactValidationErrorResponseToJSONTyped(json, false);
55
+ }
56
+
57
+ export function ContactValidationErrorResponseToJSONTyped(value?: ContactValidationErrorResponse | null, ignoreDiscriminator: boolean = false): any {
58
+ if (value == null) {
59
+ return value;
60
+ }
61
+
62
+ return {
63
+
64
+ 'errors': value['errors'],
65
+ };
66
+ }
67
+
@@ -0,0 +1,85 @@
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
+ * Error response envelope
18
+ * @export
19
+ * @interface ErrorEnvelope
20
+ */
21
+ export interface ErrorEnvelope {
22
+ /**
23
+ *
24
+ * @type {boolean}
25
+ * @memberof ErrorEnvelope
26
+ */
27
+ success: ErrorEnvelopeSuccessEnum;
28
+ /**
29
+ * Human-readable error message
30
+ * @type {string}
31
+ * @memberof ErrorEnvelope
32
+ */
33
+ error: string;
34
+ }
35
+
36
+
37
+ /**
38
+ * @export
39
+ */
40
+ export const ErrorEnvelopeSuccessEnum = {
41
+ false: false
42
+ } as const;
43
+ export type ErrorEnvelopeSuccessEnum = typeof ErrorEnvelopeSuccessEnum[keyof typeof ErrorEnvelopeSuccessEnum];
44
+
45
+
46
+ /**
47
+ * Check if a given object implements the ErrorEnvelope interface.
48
+ */
49
+ export function instanceOfErrorEnvelope(value: object): value is ErrorEnvelope {
50
+ if (!('success' in value) || value['success'] === undefined) return false;
51
+ if (!('error' in value) || value['error'] === undefined) return false;
52
+ return true;
53
+ }
54
+
55
+ export function ErrorEnvelopeFromJSON(json: any): ErrorEnvelope {
56
+ return ErrorEnvelopeFromJSONTyped(json, false);
57
+ }
58
+
59
+ export function ErrorEnvelopeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorEnvelope {
60
+ if (json == null) {
61
+ return json;
62
+ }
63
+ return {
64
+
65
+ 'success': json['success'],
66
+ 'error': json['error'],
67
+ };
68
+ }
69
+
70
+ export function ErrorEnvelopeToJSON(json: any): ErrorEnvelope {
71
+ return ErrorEnvelopeToJSONTyped(json, false);
72
+ }
73
+
74
+ export function ErrorEnvelopeToJSONTyped(value?: ErrorEnvelope | null, ignoreDiscriminator: boolean = false): any {
75
+ if (value == null) {
76
+ return value;
77
+ }
78
+
79
+ return {
80
+
81
+ 'success': value['success'],
82
+ 'error': value['error'],
83
+ };
84
+ }
85
+