@giveitsmaller/sdk 0.16.0 → 0.18.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/README.md +21 -0
- package/dist/_audit.js +12 -2
- package/dist/client.d.ts +8 -1
- package/dist/client.js +12 -1
- package/dist/ergonomic/image_output_routes.d.ts +89 -0
- package/dist/ergonomic/image_output_routes.js +155 -0
- package/dist/ergonomic/option_types.d.ts +147 -0
- package/dist/ergonomic/option_types.js +57 -0
- package/dist/ergonomic/option_validation.d.ts +58 -0
- package/dist/ergonomic/option_validation.js +143 -0
- package/dist/ergonomic/preset_resolver.d.ts +1 -1
- package/dist/ergonomic/preset_resolver.js +35 -33
- package/dist/ergonomic/presets/document_pdf_compress.d.ts +3 -5
- package/dist/ergonomic/presets/document_pdf_compress.js +10 -12
- package/dist/ergonomic/presets/image_compress.d.ts +4 -11
- package/dist/ergonomic/presets/image_compress.js +12 -25
- package/dist/ergonomic/presets/index.d.ts +21 -1
- package/dist/ergonomic/presets/index.js +4 -4
- package/dist/errors.d.ts +25 -0
- package/dist/errors.js +34 -0
- package/dist/file-first.d.ts +78 -58
- package/dist/file-first.js +220 -66
- package/dist/generated/sdk_spec/enums.d.ts +10 -46
- package/dist/generated/sdk_spec/enums.js +14 -33
- package/dist/generated/sdk_spec/presets.js +9 -20
- package/dist/generated/sdk_spec/version.d.ts +3 -3
- package/dist/generated/sdk_spec/version.js +3 -3
- package/dist/gisl.d.ts +8 -1
- package/dist/gisl.js +12 -0
- package/dist/index.core.d.ts +5 -4
- package/dist/index.core.js +3 -1
- package/package.json +3 -3
|
@@ -4,35 +4,16 @@ export declare const OptimizeFor: {
|
|
|
4
4
|
readonly Quality: "Quality";
|
|
5
5
|
};
|
|
6
6
|
export type OptimizeFor = typeof OptimizeFor[keyof typeof OptimizeFor];
|
|
7
|
-
export declare const ImageMode: {
|
|
8
|
-
readonly Lossy: "lossy";
|
|
9
|
-
readonly Lossless: "lossless";
|
|
10
|
-
readonly Auto: "auto";
|
|
11
|
-
};
|
|
12
|
-
export type ImageMode = typeof ImageMode[keyof typeof ImageMode];
|
|
13
7
|
export declare const ImageFormat: {
|
|
14
8
|
readonly Original: "original";
|
|
15
|
-
readonly Auto: "auto";
|
|
16
|
-
readonly Smallest: "smallest";
|
|
17
|
-
readonly Jpeg: "jpeg";
|
|
18
|
-
readonly Png: "png";
|
|
19
9
|
readonly Webp: "webp";
|
|
20
|
-
readonly Avif: "avif";
|
|
21
10
|
};
|
|
22
11
|
export type ImageFormat = typeof ImageFormat[keyof typeof ImageFormat];
|
|
23
12
|
export declare const ImageMetadataPolicy: {
|
|
24
13
|
readonly All: "all";
|
|
25
|
-
readonly
|
|
26
|
-
readonly Copyright: "copyright";
|
|
27
|
-
readonly Sensitive: "sensitive";
|
|
14
|
+
readonly Keep: "keep";
|
|
28
15
|
};
|
|
29
16
|
export type ImageMetadataPolicy = typeof ImageMetadataPolicy[keyof typeof ImageMetadataPolicy];
|
|
30
|
-
export declare const IccProfilePolicy: {
|
|
31
|
-
readonly Preserve: "preserve";
|
|
32
|
-
readonly Strip: "strip";
|
|
33
|
-
readonly Srgb: "srgb";
|
|
34
|
-
};
|
|
35
|
-
export type IccProfilePolicy = typeof IccProfilePolicy[keyof typeof IccProfilePolicy];
|
|
36
17
|
export declare const VideoCodec: {
|
|
37
18
|
readonly H264: "h264";
|
|
38
19
|
readonly H265: "h265";
|
|
@@ -82,10 +63,10 @@ export declare const AudioSampleRate: {
|
|
|
82
63
|
};
|
|
83
64
|
export type AudioSampleRate = typeof AudioSampleRate[keyof typeof AudioSampleRate];
|
|
84
65
|
export declare const PdfProfile: {
|
|
85
|
-
readonly
|
|
86
|
-
readonly
|
|
87
|
-
readonly
|
|
88
|
-
readonly
|
|
66
|
+
readonly Screen: "screen";
|
|
67
|
+
readonly Ebook: "ebook";
|
|
68
|
+
readonly Printer: "printer";
|
|
69
|
+
readonly Prepress: "prepress";
|
|
89
70
|
};
|
|
90
71
|
export type PdfProfile = typeof PdfProfile[keyof typeof PdfProfile];
|
|
91
72
|
export declare const PdfColorspace: {
|
|
@@ -102,30 +83,13 @@ export declare const ERGONOMIC_ENUMS: {
|
|
|
102
83
|
readonly Balanced: "Balanced";
|
|
103
84
|
readonly Quality: "Quality";
|
|
104
85
|
};
|
|
105
|
-
readonly ImageMode: {
|
|
106
|
-
readonly Lossy: "lossy";
|
|
107
|
-
readonly Lossless: "lossless";
|
|
108
|
-
readonly Auto: "auto";
|
|
109
|
-
};
|
|
110
86
|
readonly ImageFormat: {
|
|
111
87
|
readonly Original: "original";
|
|
112
|
-
readonly Auto: "auto";
|
|
113
|
-
readonly Smallest: "smallest";
|
|
114
|
-
readonly Jpeg: "jpeg";
|
|
115
|
-
readonly Png: "png";
|
|
116
88
|
readonly Webp: "webp";
|
|
117
|
-
readonly Avif: "avif";
|
|
118
89
|
};
|
|
119
90
|
readonly ImageMetadataPolicy: {
|
|
120
91
|
readonly All: "all";
|
|
121
|
-
readonly
|
|
122
|
-
readonly Copyright: "copyright";
|
|
123
|
-
readonly Sensitive: "sensitive";
|
|
124
|
-
};
|
|
125
|
-
readonly IccProfilePolicy: {
|
|
126
|
-
readonly Preserve: "preserve";
|
|
127
|
-
readonly Strip: "strip";
|
|
128
|
-
readonly Srgb: "srgb";
|
|
92
|
+
readonly Keep: "keep";
|
|
129
93
|
};
|
|
130
94
|
readonly VideoCodec: {
|
|
131
95
|
readonly H264: "h264";
|
|
@@ -170,10 +134,10 @@ export declare const ERGONOMIC_ENUMS: {
|
|
|
170
134
|
readonly _48000: 48000;
|
|
171
135
|
};
|
|
172
136
|
readonly PdfProfile: {
|
|
173
|
-
readonly
|
|
174
|
-
readonly
|
|
175
|
-
readonly
|
|
176
|
-
readonly
|
|
137
|
+
readonly Screen: "screen";
|
|
138
|
+
readonly Ebook: "ebook";
|
|
139
|
+
readonly Printer: "printer";
|
|
140
|
+
readonly Prepress: "prepress";
|
|
177
141
|
};
|
|
178
142
|
readonly PdfColorspace: {
|
|
179
143
|
readonly Unchanged: "unchanged";
|
|
@@ -7,38 +7,21 @@ export const OptimizeFor = {
|
|
|
7
7
|
Balanced: "Balanced",
|
|
8
8
|
Quality: "Quality",
|
|
9
9
|
};
|
|
10
|
-
// Image
|
|
11
|
-
export const ImageMode = {
|
|
12
|
-
Lossy: "lossy",
|
|
13
|
-
Lossless: "lossless",
|
|
14
|
-
Auto: "auto",
|
|
15
|
-
};
|
|
16
|
-
// Image output format selection. Original keeps input; Auto picks best per browser support; Smallest tries all and returns smallest.
|
|
10
|
+
// Image output format for compress. Original keeps the input format; Webp recompresses to WebP. Other format changes (jpeg/png/avif/...) are the convert operation's job, not compress.
|
|
17
11
|
export const ImageFormat = {
|
|
18
12
|
Original: "original",
|
|
19
|
-
Auto: "auto",
|
|
20
|
-
Smallest: "smallest",
|
|
21
|
-
Jpeg: "jpeg",
|
|
22
|
-
Png: "png",
|
|
23
13
|
Webp: "webp",
|
|
24
|
-
Avif: "avif",
|
|
25
14
|
};
|
|
26
|
-
// Image metadata handling.
|
|
27
|
-
// All
|
|
28
|
-
//
|
|
29
|
-
//
|
|
30
|
-
//
|
|
15
|
+
// Image metadata handling (compress.image, optimiser/same_format route):
|
|
16
|
+
// All = strip all EXIF/IPTC/XMP (default, smallest file)
|
|
17
|
+
// Keep = preserve EXIF/ICC/XMP — worker-proven on the libcaesium formats
|
|
18
|
+
// (JPEG/PNG/WebP/GIF/TIFF; lambdas PR #260, un-parked 2026-06-23).
|
|
19
|
+
// Keep is NOT available for AVIF (ravif) / SVG (SVGO) — those re-encode from
|
|
20
|
+
// pixels and cannot preserve metadata, so the worker rejects it there (the
|
|
21
|
+
// `metadata` enum is narrowed to [all] on those groups).
|
|
31
22
|
export const ImageMetadataPolicy = {
|
|
32
23
|
All: "all",
|
|
33
|
-
|
|
34
|
-
Copyright: "copyright",
|
|
35
|
-
Sensitive: "sensitive",
|
|
36
|
-
};
|
|
37
|
-
// ICC color profile handling.
|
|
38
|
-
export const IccProfilePolicy = {
|
|
39
|
-
Preserve: "preserve",
|
|
40
|
-
Strip: "strip",
|
|
41
|
-
Srgb: "srgb",
|
|
24
|
+
Keep: "keep",
|
|
42
25
|
};
|
|
43
26
|
// Video codec. H264 = widest compatibility; H265/Av1 = better compression but slower.
|
|
44
27
|
export const VideoCodec = {
|
|
@@ -88,12 +71,12 @@ export const AudioSampleRate = {
|
|
|
88
71
|
_44100: 44100,
|
|
89
72
|
_48000: 48000,
|
|
90
73
|
};
|
|
91
|
-
// PDF
|
|
74
|
+
// PDF Ghostscript preset. Screen = smallest; Ebook = mid; Printer = 300dpi; Prepress = print-production.
|
|
92
75
|
export const PdfProfile = {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
76
|
+
Screen: "screen",
|
|
77
|
+
Ebook: "ebook",
|
|
78
|
+
Printer: "printer",
|
|
79
|
+
Prepress: "prepress",
|
|
97
80
|
};
|
|
98
81
|
// PDF output color space.
|
|
99
82
|
export const PdfColorspace = {
|
|
@@ -105,10 +88,8 @@ export const PdfColorspace = {
|
|
|
105
88
|
/** Catalog of every ergonomic enum (canonicalName → wire). */
|
|
106
89
|
export const ERGONOMIC_ENUMS = {
|
|
107
90
|
OptimizeFor,
|
|
108
|
-
ImageMode,
|
|
109
91
|
ImageFormat,
|
|
110
92
|
ImageMetadataPolicy,
|
|
111
|
-
IccProfilePolicy,
|
|
112
93
|
VideoCodec,
|
|
113
94
|
VideoPreset,
|
|
114
95
|
VideoFit,
|
|
@@ -4,26 +4,18 @@
|
|
|
4
4
|
export const PRESETS = Object.freeze({
|
|
5
5
|
"image_compress": Object.freeze({
|
|
6
6
|
Size: Object.freeze({
|
|
7
|
-
"mode": "Lossy",
|
|
8
7
|
"quality": 65,
|
|
9
8
|
"metadata": "All",
|
|
10
|
-
"iccProfile": "Strip",
|
|
11
|
-
"progressive": true,
|
|
12
9
|
"outputFormat": "Original",
|
|
13
10
|
}),
|
|
14
11
|
Balanced: Object.freeze({
|
|
15
|
-
"mode": "Auto",
|
|
16
12
|
"quality": 80,
|
|
17
|
-
"metadata": "
|
|
18
|
-
"iccProfile": "Preserve",
|
|
19
|
-
"progressive": true,
|
|
13
|
+
"metadata": "All",
|
|
20
14
|
"outputFormat": "Original",
|
|
21
15
|
}),
|
|
22
16
|
Quality: Object.freeze({
|
|
23
|
-
"
|
|
24
|
-
"metadata": "
|
|
25
|
-
"iccProfile": "Preserve",
|
|
26
|
-
"progressive": true,
|
|
17
|
+
"quality": 92,
|
|
18
|
+
"metadata": "All",
|
|
27
19
|
"outputFormat": "Original",
|
|
28
20
|
}),
|
|
29
21
|
}),
|
|
@@ -60,19 +52,16 @@ export const PRESETS = Object.freeze({
|
|
|
60
52
|
}),
|
|
61
53
|
"document_pdf_compress": Object.freeze({
|
|
62
54
|
Size: Object.freeze({
|
|
63
|
-
"profile": "
|
|
64
|
-
"
|
|
65
|
-
"flattenForms": false,
|
|
55
|
+
"profile": "Screen",
|
|
56
|
+
"grayscale": true,
|
|
66
57
|
}),
|
|
67
58
|
Balanced: Object.freeze({
|
|
68
|
-
"profile": "
|
|
69
|
-
"
|
|
70
|
-
"flattenForms": false,
|
|
59
|
+
"profile": "Ebook",
|
|
60
|
+
"grayscale": false,
|
|
71
61
|
}),
|
|
72
62
|
Quality: Object.freeze({
|
|
73
|
-
"profile": "
|
|
74
|
-
"
|
|
75
|
-
"flattenForms": false,
|
|
63
|
+
"profile": "Printer",
|
|
64
|
+
"grayscale": false,
|
|
76
65
|
}),
|
|
77
66
|
}),
|
|
78
67
|
"document_office_compress": Object.freeze({
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const SDK_SPEC_VERSION: "1.
|
|
2
|
-
export declare const PRESET_VERSION: "1.
|
|
3
|
-
export declare const PRESET_CONFIG_HASH: "sha256:
|
|
1
|
+
export declare const SDK_SPEC_VERSION: "2.1.0";
|
|
2
|
+
export declare const PRESET_VERSION: "1.4";
|
|
3
|
+
export declare const PRESET_CONFIG_HASH: "sha256:62fbada24e33f983dacb0f717b0c9bb80824a208c3dc7f9af8523026e783543a";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// CODE GENERATED — DO NOT EDIT.
|
|
2
2
|
// Source: compression_contracts/sdk-spec/ (see sdk-spec/README.md).
|
|
3
3
|
// Regenerate with: scripts/generate.py.
|
|
4
|
-
export const SDK_SPEC_VERSION = "1.
|
|
5
|
-
export const PRESET_VERSION = "1.
|
|
6
|
-
export const PRESET_CONFIG_HASH = "sha256:
|
|
4
|
+
export const SDK_SPEC_VERSION = "2.1.0";
|
|
5
|
+
export const PRESET_VERSION = "1.4";
|
|
6
|
+
export const PRESET_CONFIG_HASH = "sha256:62fbada24e33f983dacb0f717b0c9bb80824a208c3dc7f9af8523026e783543a";
|
package/dist/gisl.d.ts
CHANGED
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
import { GislClient } from './client.js';
|
|
20
20
|
import { GislConfigError, GislFeatureRequiresAuthError, GislMissingCredentialsError } from './errors.js';
|
|
21
21
|
import { type ResolveCredentialsOptions, type ResolveEndpointOptions } from './credentials.js';
|
|
22
|
-
import type { GislClientConfig } from './types.js';
|
|
22
|
+
import type { CreditsUsageOptions, GislClientConfig } from './types.js';
|
|
23
|
+
import type { AccountLimits, CreditsBalanceResponse, CreditsUsageResponse } from '@giveitsmaller/contracts/openapi';
|
|
23
24
|
import { OperationBuilder } from './builder.js';
|
|
24
25
|
import { MergeBuilder, type Asset, type MergeOptions } from './merge.js';
|
|
25
26
|
import { PresetDefaults } from './ergonomic/presets/index.js';
|
|
@@ -128,6 +129,12 @@ export type ErgonomicClient = GislClient & {
|
|
|
128
129
|
* over the existing transport.
|
|
129
130
|
*/
|
|
130
131
|
withPresetDefaults(defaults: PresetDefaults): ErgonomicClient;
|
|
132
|
+
/** Current credit balance (sugar for `getCreditsBalance()`). */
|
|
133
|
+
credits(): Promise<CreditsBalanceResponse>;
|
|
134
|
+
/** Credit usage history (sugar for `getCreditsUsage()`). */
|
|
135
|
+
creditsUsage(options?: CreditsUsageOptions): Promise<CreditsUsageResponse>;
|
|
136
|
+
/** Effective account limits / tier-resolved caps (sugar for `getAccountLimits()`). */
|
|
137
|
+
limits(): Promise<AccountLimits>;
|
|
131
138
|
};
|
|
132
139
|
/**
|
|
133
140
|
* The `gisl` namespace — primary ergonomic-layer entry point.
|
package/dist/gisl.js
CHANGED
|
@@ -166,6 +166,18 @@ function wrapErgonomic(client, presetDefaults, scopedPresetDefaults) {
|
|
|
166
166
|
return new MergeBuilder(target, declared, mergeOpts);
|
|
167
167
|
};
|
|
168
168
|
}
|
|
169
|
+
// 8yqUXLCS — first-class ergonomic billing/limits accessors (thin fluent
|
|
170
|
+
// aliases over the low-level getters, surfaced + documented here rather
|
|
171
|
+
// than relying on undocumented Proxy passthrough).
|
|
172
|
+
if (prop === 'credits') {
|
|
173
|
+
return () => target.getCreditsBalance();
|
|
174
|
+
}
|
|
175
|
+
if (prop === 'creditsUsage') {
|
|
176
|
+
return (options) => target.getCreditsUsage(options);
|
|
177
|
+
}
|
|
178
|
+
if (prop === 'limits') {
|
|
179
|
+
return () => target.getAccountLimits();
|
|
180
|
+
}
|
|
169
181
|
return Reflect.get(target, prop, receiver);
|
|
170
182
|
},
|
|
171
183
|
});
|
package/dist/index.core.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { parseSseStream } from './sse.js';
|
|
|
3
3
|
export type { CreditsUsageOptions, ListWorkflowsOptions, GetSchemaOptions, GetSchemaResult, PreflightClipError, PreflightClipsResult, ProbeWaitOptions, ProbeWaitResult, GislClientConfig, GislSseEvent, UploadOptions, WaitOptions, WorkflowCreatePayload, OperationDef, WorkflowSourcePayload, MultiInputSourcePayload, UploadSourcePayload, JobOutputSourcePayload, ExternalImportSourcePayload, ConnectionSourcePayload, JobInputV2Payload, JobDefinitionPayload, ExternalDestinationPayload, DeliveryPayload, DeliveryModePayload, DeliveryBundleFormatPayload, DeliverySelectionPayload, DeliverySelectionTypePayload, DeliveryOutputRefPayload, WorkflowProcessingPayload, ProcessingClassHintPayload, MultipartCheckpointState, _Sdk3HandCodedUploadedPart, _Sdk3HandCodedMultipartStatusResult, _Sdk3HandCodedPresignedPart, _Sdk3HandCodedPresignPartsResult, _Sdk3HandCodedKeepaliveResult, } from './types.js';
|
|
4
4
|
export { uploadSource, jobOutputSource, externalImportSource, connectionSource, } from './types.js';
|
|
5
5
|
export type { GislConfigErrorMetadata } from './errors.js';
|
|
6
|
-
export { GislError, GislApiError, GislValidationError, GislBalanceExhaustedError, GislTierRestrictedError, GislFeatureTierRestrictedError, GislFeatureNotAvailableError, GislWorkflowExpiredError, GislProbePendingError, GislAuthError, GislUploadCapExceededError, GislMultipartPartError, GislMultipartPartCountError, GislMultipartSessionNotFoundError, GislMultipartSessionOwnershipError, GislMultipartSessionAuthRequiredError, GislTimeoutError, GislAbortError, GislNetworkError, GislConfigError, GislMissingCredentialsError, GislFeatureRequiresAuthError, GislUndeclaredAssetError, GislUnusedAssetError, GislPerInputOptionsNotSupportedError, GislChainCardinalityMismatchError, GislBundleAlreadyArchivedError, GislNoSuchKeyError, GislSinkError, GislResultNotReadyError, } from './errors.js';
|
|
6
|
+
export { GislError, GislApiError, GislValidationError, GislBalanceExhaustedError, GislTierRestrictedError, GislFeatureTierRestrictedError, GislFeatureNotAvailableError, GislWorkflowExpiredError, GislProbePendingError, GislAuthError, GislUploadCapExceededError, GislMultipartPartError, GislMultipartPartCountError, GislMultipartSessionNotFoundError, GislMultipartSessionOwnershipError, GislMultipartSessionAuthRequiredError, GislTimeoutError, GislAbortError, GislNetworkError, GislConfigError, GislMissingCredentialsError, GislFeatureRequiresAuthError, GislUndeclaredAssetError, GislUnusedAssetError, GislPerInputOptionsNotSupportedError, GislChainCardinalityMismatchError, GislBundleAlreadyArchivedError, GislNoSuchKeyError, GislSinkError, GislItemFailedError, GislResultNotReadyError, } from './errors.js';
|
|
7
7
|
export type { GislApiErrorOptions, GislUploadCapKind } from './errors.js';
|
|
8
8
|
export { RunResult } from './file-first.js';
|
|
9
9
|
export type { OutputFile, ItemResult, ItemFailure, Manifest, Downloader, } from './file-first.js';
|
|
@@ -18,20 +18,21 @@ export type { WatermarkWireOp } from './file-first.js';
|
|
|
18
18
|
export { Handle, StatusSnapshot } from './handle.js';
|
|
19
19
|
export { gisl, create } from './gisl.js';
|
|
20
20
|
export type { GislCreateOptions, Environment, ErgonomicClient } from './gisl.js';
|
|
21
|
-
export { presetDefaults, PresetDefaults, type PresetMedia, type PresetOp, type AnyPresetOptions, ImageCompressPresetOptions, type ImageCompressPresetOptionsInput, AudioCompressPresetOptions, type AudioCompressPresetOptionsInput, VideoCompressPresetOptions, type VideoCompressPresetOptionsInput, DocumentPdfCompressPresetOptions, type DocumentPdfCompressPresetOptionsInput, DocumentOfficeCompressPresetOptions, type DocumentOfficeCompressPresetOptionsInput, DocumentOdfCompressPresetOptions, type DocumentOdfCompressPresetOptionsInput, DocumentEpubCompressPresetOptions, type DocumentEpubCompressPresetOptionsInput, OptimizeFor,
|
|
21
|
+
export { presetDefaults, PresetDefaults, type PresetMedia, type PresetOp, type AnyPresetOptions, ImageCompressPresetOptions, type ImageCompressPresetOptionsInput, AudioCompressPresetOptions, type AudioCompressPresetOptionsInput, VideoCompressPresetOptions, type VideoCompressPresetOptionsInput, DocumentPdfCompressPresetOptions, type DocumentPdfCompressPresetOptionsInput, DocumentOfficeCompressPresetOptions, type DocumentOfficeCompressPresetOptionsInput, DocumentOdfCompressPresetOptions, type DocumentOdfCompressPresetOptionsInput, DocumentEpubCompressPresetOptions, type DocumentEpubCompressPresetOptionsInput, OptimizeFor, ImageMetadataPolicy, ImageFormat, VideoCodec, VideoPreset, VideoFit, AudioBitrate, AudioCodec, AudioSampleRate, PdfProfile, PdfColorspace, } from './ergonomic/presets/index.js';
|
|
22
22
|
export { OperationBuilder, MapEachBuilder } from './builder.js';
|
|
23
23
|
export { MergeBuilder, asset, handle, clip } from './merge.js';
|
|
24
24
|
export type { Asset, ClipEntry, ClipOptions, MergeMediaKind, MergeOptions, SequenceEntry, } from './merge.js';
|
|
25
25
|
export type { Artifact, ArtifactRef, JobBreakdown, OperationBreakdown, ProcessingProgressEvent, ProgressEvent, ResolvedOptions, ResolvedOptionsSources, Result, RunOptions, SubmitOptions, UploadProgressEvent, } from './builder.js';
|
|
26
26
|
export { PRESET_VERSION, resolveCompressOptions } from './ergonomic/preset_resolver.js';
|
|
27
27
|
export type { ResolveCompressOptionsInput, ResolveCompressOptionsOutput, } from './ergonomic/preset_resolver.js';
|
|
28
|
-
export type { AudioWatermarkDecodeRequest, AudioWatermarkDecodeResponse, ContactRequest, CreditsBalanceResponse, CreditsUsageResponse, CreditTransaction, ExternalImportCreatedResponse, ExternalImportRequest, LoginUserRequest, LoginUser200ResponseData, LoginUser200ResponseDataUser, WorkflowCancelResponse, WorkflowResumeResponse, WorkflowPausedDetail, WorkflowPausedDetailLinks, UploadResponse, UploadConstraintsApplied, UploadProbeResponse, UploadProbeMediaMetadata, MultipartInitiateRequestMetadataHint, WorkflowCreateResponse, WorkflowStatusResponse, WorkflowListResponse, WorkflowSummary, WorkflowDownloadResponse, MetadataResponse, MetadataResponseDimensions, MetadataResponseExif, MetadataResponseExifGps, OperationsSchemaResponse, OperationSchemaDefinition, MimeGroupSchema, OptionSchema, PerValueAvailabilityEntry, PerRoleCardinalityEntry, RetryResponse, JobDownload, OperationDownload, WebhookPayload, WebhookOperationContext, JobResponse, OperationResponse, OperationResult, OperationResultMetrics, ExternalDestination, Delivery, DeliveryPlan, DeliveryPlanOutput, WorkflowProcessing, ProcessingPlan, ProcessingPlanJob, WorkflowEdge, WorkflowWarning, JobInputV2, WorkflowSource, UploadSource, JobOutputSource, ConnectionSource, ExternalImportToken, BalanceExhaustedResponse, BalanceExhaustedResponseAllOfLinks, TierRestrictionResponse, FeatureTierRestrictedResponse, FeatureNotAvailableResponse, FeatureViolation, WorkflowExpiredResponse, ProbePendingResponse, AuthErrorResponse, } from '@giveitsmaller/contracts/openapi';
|
|
28
|
+
export type { AccountLimits, AccountLimitsLimits, AccountLimitEntry, AudioWatermarkDecodeRequest, AudioWatermarkDecodeResponse, ContactRequest, CreditsBalanceResponse, CreditsUsageResponse, CreditTransaction, ExternalImportCreatedResponse, ExternalImportRequest, LoginUserRequest, LoginUser200ResponseData, LoginUser200ResponseDataUser, WorkflowCancelResponse, WorkflowResumeResponse, WorkflowPausedDetail, WorkflowPausedDetailLinks, UploadResponse, UploadConstraintsApplied, UploadProbeResponse, UploadProbeMediaMetadata, MultipartInitiateRequestMetadataHint, WorkflowCreateResponse, WorkflowStatusResponse, WorkflowListResponse, WorkflowSummary, WorkflowDownloadResponse, MetadataResponse, MetadataResponseDimensions, MetadataResponseExif, MetadataResponseExifGps, OperationsSchemaResponse, OperationSchemaDefinition, MimeGroupSchema, OptionSchema, PerValueAvailabilityEntry, PerRoleCardinalityEntry, RetryResponse, JobDownload, OperationDownload, DownloadBundle, WebhookPayload, WebhookOperationContext, JobResponse, OperationResponse, OperationResult, OperationResultMetrics, ExternalDestination, Delivery, DeliveryPlan, DeliveryPlanOutput, WorkflowProcessing, ProcessingPlan, ProcessingPlanJob, WorkflowEdge, WorkflowWarning, JobInputV2, WorkflowSource, UploadSource, JobOutputSource, ConnectionSource, ExternalImportToken, BalanceExhaustedResponse, BalanceExhaustedResponseAllOfLinks, TierRestrictionResponse, FeatureTierRestrictedResponse, FeatureNotAvailableResponse, FeatureViolation, WorkflowExpiredResponse, ProbePendingResponse, AuthErrorResponse, } from '@giveitsmaller/contracts/openapi';
|
|
29
29
|
export { AudioWatermarkDecodeRequestMethodHintEnum, AudioWatermarkDecodeResponseMethodEnum, OperationInputModel, ExternalImportRequestProviderHintEnum, ContactSubject, CreditTransactionSourceBucket, UploadProbeStatus, UploadProbeProcessingClass, WorkflowCancelBillingEffect, WorkflowPauseRequiredAction, WorkflowStatus, WarningType, WorkflowWarningSeverity, OperationType, SseEventType, CallbackEventType, OperationStatus, JobStatus, JobInputV2RoleEnum, AuthErrorType, TierRestrictionKind, BalanceExhaustedResponseRequiredActionEnum, ProcessingClassReason, DeliveryPlanReason, UserTier, ProcessingClass, } from '@giveitsmaller/contracts/openapi';
|
|
30
30
|
export type { SseOperationProgressData, SseOperationCompletedData, SseOperationFailedData, SseJobCompletedData, SseJobFailedData, SseWorkflowTerminalData, } from '@giveitsmaller/contracts/openapi';
|
|
31
31
|
export type { MultiOutputCompletion, PageIndexed, PositionIndexed, Unindexed, } from '@giveitsmaller/contracts/asyncapi';
|
|
32
32
|
import type { MultiOutputCompletion as _MultiOutputCompletion } from '@giveitsmaller/contracts/asyncapi';
|
|
33
33
|
export type OperationResultOutputEntry = _MultiOutputCompletion['outputs'][number];
|
|
34
|
-
export type { CompressImageOptions, CompressVideoOptions, CompressAudioOptions, CompressDocumentPdfOptions, CompressDocumentOfficeOptions, CompressDocumentOdfOptions, CompressDocumentEpubOptions, ThumbnailImageOptions, ThumbnailVideoOptions, ThumbnailDocumentOptions, ConvertImageOptions, ConvertVideoOptions, ConvertAudioOptions, ConvertDocumentPdfOptions, MergeImageOptions, MergeVideoOptions, MergeVideoPerInputOptions, MergeAudioOptions, MergeAudioPerInputOptions, ArchiveOptions, ImageWatermarkImageOptions, ImageWatermarkImageGifOptions, TextWatermarkImageOptions, CustomLumaVideoOptions, AudioOverlayAudioOptions, AudioOverlayVideoOptions, AudioWatermarkAudioOptions, AudioWatermarkVideoOptions, AudioToVideoAudioOptions, VideoWatermarkVideoOptions, VideoTextWatermarkVideoOptions, SplitImageGifOptions, SplitDocumentPdfOptions, SplitAudioOptions, SplitVideoOptions, } from '@giveitsmaller/contracts/operations';
|
|
34
|
+
export type { CompressImageOptions, CompressImageJpegOptions, CompressImagePngOptions, CompressImageAvifOptions, CompressVideoOptions, CompressAudioOptions, CompressDocumentPdfOptions, CompressDocumentOfficeOptions, CompressDocumentOdfOptions, CompressDocumentEpubOptions, ThumbnailImageOptions, ThumbnailVideoOptions, ThumbnailDocumentOptions, ConvertImageOptions, ConvertVideoOptions, ConvertAudioOptions, ConvertDocumentPdfOptions, MergeImageOptions, MergeVideoOptions, MergeVideoPerInputOptions, MergeAudioOptions, MergeAudioPerInputOptions, ArchiveOptions, ImageWatermarkImageOptions, ImageWatermarkImageGifOptions, TextWatermarkImageOptions, CustomLumaVideoOptions, AudioOverlayAudioOptions, AudioOverlayVideoOptions, AudioWatermarkAudioOptions, AudioWatermarkVideoOptions, AudioToVideoAudioOptions, VideoWatermarkVideoOptions, VideoTextWatermarkVideoOptions, SplitImageGifOptions, SplitDocumentPdfOptions, SplitAudioOptions, SplitVideoOptions, } from '@giveitsmaller/contracts/operations';
|
|
35
35
|
export { ImageWatermarkImageAnchor, ImageWatermarkImageGifAnchor, TextWatermarkImageAnchor, TextWatermarkImageFontFamily, TextWatermarkImageWatermarkMode, AudioOverlayAudioMode, AudioOverlayVideoMode, AudioOverlayVideoNoAudioTrackBehaviour, AudioWatermarkAudioMethod, AudioWatermarkAudioRobustness, AudioWatermarkAudioDensity, AudioWatermarkVideoMethod, AudioWatermarkVideoRobustness, AudioWatermarkVideoDensity, AudioToVideoAudioOutputResolution, AudioToVideoAudioImageFit, AudioToVideoAudioOutputFormat, VideoWatermarkVideoAnchor, VideoTextWatermarkVideoFontFamily, VideoTextWatermarkVideoWatermarkMode, VideoTextWatermarkVideoAnchor, SplitImageGifOutputFormat, SplitDocumentPdfMode, SplitAudioMode, SplitAudioPrecision, SplitVideoMode, SplitVideoPrecision, } from '@giveitsmaller/contracts/operations';
|
|
36
36
|
export { archiveMetadata, audioOverlayMetadata, audioWatermarkMetadata, compressMetadata, convertMetadata, customLumaMetadata, imageWatermarkMetadata, mergeMetadata, textWatermarkMetadata, thumbnailMetadata, audioToVideoMetadata, videoWatermarkMetadata, videoTextWatermarkMetadata, splitMetadata, } from '@giveitsmaller/contracts/operations';
|
|
37
|
+
export type { ConvertOptions, ThumbnailOptions, TextWatermarkOptions, WatermarkOptions, WatermarkAnchor, } from './ergonomic/option_types.js';
|
|
37
38
|
export type { OperationMetadata, AvailabilityValue, AvailabilityEntry, FeatureEntry, MimeGroupMetadata, OptionMetadata, ProcessingClassConstraints, } from '@giveitsmaller/contracts/operations';
|
package/dist/index.core.js
CHANGED
|
@@ -28,6 +28,8 @@ GislChainCardinalityMismatchError,
|
|
|
28
28
|
GislBundleAlreadyArchivedError,
|
|
29
29
|
// FF1 / 3BIxEnfR — file-first result sink errors.
|
|
30
30
|
GislNoSuchKeyError, GislSinkError,
|
|
31
|
+
// AjhOUuqQ — typed terminal item failure stored in RunResult.failed[].error.
|
|
32
|
+
GislItemFailedError,
|
|
31
33
|
// FF5a / Ao8RPVxD — thrown by the file-first Handle.result() when the
|
|
32
34
|
// workflow is not yet terminal (the non-blocking accessor).
|
|
33
35
|
GislResultNotReadyError, } from './errors.js';
|
|
@@ -70,7 +72,7 @@ export { gisl, create } from './gisl.js';
|
|
|
70
72
|
// Ergonomic preset defaults (T4a / VhIj4S7T) — typed leaf DTOs + immutable
|
|
71
73
|
// `PresetDefaults` builder + `presetDefaults()` factory + ergonomic enum
|
|
72
74
|
// re-exports. Resolver wiring (T4b) consumes `PresetDefaults.cellFor()`.
|
|
73
|
-
export { presetDefaults, PresetDefaults, ImageCompressPresetOptions, AudioCompressPresetOptions, VideoCompressPresetOptions, DocumentPdfCompressPresetOptions, DocumentOfficeCompressPresetOptions, DocumentOdfCompressPresetOptions, DocumentEpubCompressPresetOptions, OptimizeFor,
|
|
75
|
+
export { presetDefaults, PresetDefaults, ImageCompressPresetOptions, AudioCompressPresetOptions, VideoCompressPresetOptions, DocumentPdfCompressPresetOptions, DocumentOfficeCompressPresetOptions, DocumentOdfCompressPresetOptions, DocumentEpubCompressPresetOptions, OptimizeFor, ImageMetadataPolicy, ImageFormat, VideoCodec, VideoPreset, VideoFit, AudioBitrate, AudioCodec, AudioSampleRate, PdfProfile, PdfColorspace, } from './ergonomic/presets/index.js';
|
|
74
76
|
// Operation-builder surface (T2 / xVDTIm8C) — `client.compress/convert/thumbnail`
|
|
75
77
|
// returns an `OperationBuilder`; `.run()` projects to a flat `Result` /
|
|
76
78
|
// `.submit({webhook})` returns a `Handle`. Progress events are the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@giveitsmaller/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "Node.js SDK for the GISL (Give It Smaller) file compression and processing API",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
"node": ">=18"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@giveitsmaller/contracts": "^0.
|
|
34
|
+
"@giveitsmaller/contracts": "^0.35.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/node": "^22",
|
|
38
38
|
"esbuild": "^0.27",
|
|
39
|
-
"typescript": "
|
|
39
|
+
"typescript": "5.9.3",
|
|
40
40
|
"vitest": "^3.1 <3.2.5",
|
|
41
41
|
"yaml": "^2.6"
|
|
42
42
|
},
|