@giveitsmaller/sdk 0.16.0 → 0.17.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 +8 -46
- package/dist/generated/sdk_spec/enums.js +12 -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,15 @@ 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 None: "none";
|
|
26
|
-
readonly Copyright: "copyright";
|
|
27
|
-
readonly Sensitive: "sensitive";
|
|
28
14
|
};
|
|
29
15
|
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
16
|
export declare const VideoCodec: {
|
|
37
17
|
readonly H264: "h264";
|
|
38
18
|
readonly H265: "h265";
|
|
@@ -82,10 +62,10 @@ export declare const AudioSampleRate: {
|
|
|
82
62
|
};
|
|
83
63
|
export type AudioSampleRate = typeof AudioSampleRate[keyof typeof AudioSampleRate];
|
|
84
64
|
export declare const PdfProfile: {
|
|
85
|
-
readonly
|
|
86
|
-
readonly
|
|
87
|
-
readonly
|
|
88
|
-
readonly
|
|
65
|
+
readonly Screen: "screen";
|
|
66
|
+
readonly Ebook: "ebook";
|
|
67
|
+
readonly Printer: "printer";
|
|
68
|
+
readonly Prepress: "prepress";
|
|
89
69
|
};
|
|
90
70
|
export type PdfProfile = typeof PdfProfile[keyof typeof PdfProfile];
|
|
91
71
|
export declare const PdfColorspace: {
|
|
@@ -102,30 +82,12 @@ export declare const ERGONOMIC_ENUMS: {
|
|
|
102
82
|
readonly Balanced: "Balanced";
|
|
103
83
|
readonly Quality: "Quality";
|
|
104
84
|
};
|
|
105
|
-
readonly ImageMode: {
|
|
106
|
-
readonly Lossy: "lossy";
|
|
107
|
-
readonly Lossless: "lossless";
|
|
108
|
-
readonly Auto: "auto";
|
|
109
|
-
};
|
|
110
85
|
readonly ImageFormat: {
|
|
111
86
|
readonly Original: "original";
|
|
112
|
-
readonly Auto: "auto";
|
|
113
|
-
readonly Smallest: "smallest";
|
|
114
|
-
readonly Jpeg: "jpeg";
|
|
115
|
-
readonly Png: "png";
|
|
116
87
|
readonly Webp: "webp";
|
|
117
|
-
readonly Avif: "avif";
|
|
118
88
|
};
|
|
119
89
|
readonly ImageMetadataPolicy: {
|
|
120
90
|
readonly All: "all";
|
|
121
|
-
readonly None: "none";
|
|
122
|
-
readonly Copyright: "copyright";
|
|
123
|
-
readonly Sensitive: "sensitive";
|
|
124
|
-
};
|
|
125
|
-
readonly IccProfilePolicy: {
|
|
126
|
-
readonly Preserve: "preserve";
|
|
127
|
-
readonly Strip: "strip";
|
|
128
|
-
readonly Srgb: "srgb";
|
|
129
91
|
};
|
|
130
92
|
readonly VideoCodec: {
|
|
131
93
|
readonly H264: "h264";
|
|
@@ -170,10 +132,10 @@ export declare const ERGONOMIC_ENUMS: {
|
|
|
170
132
|
readonly _48000: 48000;
|
|
171
133
|
};
|
|
172
134
|
readonly PdfProfile: {
|
|
173
|
-
readonly
|
|
174
|
-
readonly
|
|
175
|
-
readonly
|
|
176
|
-
readonly
|
|
135
|
+
readonly Screen: "screen";
|
|
136
|
+
readonly Ebook: "ebook";
|
|
137
|
+
readonly Printer: "printer";
|
|
138
|
+
readonly Prepress: "prepress";
|
|
177
139
|
};
|
|
178
140
|
readonly PdfColorspace: {
|
|
179
141
|
readonly Unchanged: "unchanged";
|
|
@@ -7,38 +7,19 @@ 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. Single value today (Option B, 2026-06-20):
|
|
16
|
+
// All = strip all EXIF/IPTC/XMP (smallest file)
|
|
17
|
+
// The compress worker always strips metadata; None/Copyright/Sensitive were
|
|
18
|
+
// removed — they never reached the worker (it hardcodes strip-everything), so
|
|
19
|
+
// advertising metadata preservation was an over-claim. Preservation is a
|
|
20
|
+
// possible future feature (would need worker support).
|
|
31
21
|
export const ImageMetadataPolicy = {
|
|
32
22
|
All: "all",
|
|
33
|
-
None: "none",
|
|
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",
|
|
42
23
|
};
|
|
43
24
|
// Video codec. H264 = widest compatibility; H265/Av1 = better compression but slower.
|
|
44
25
|
export const VideoCodec = {
|
|
@@ -88,12 +69,12 @@ export const AudioSampleRate = {
|
|
|
88
69
|
_44100: 44100,
|
|
89
70
|
_48000: 48000,
|
|
90
71
|
};
|
|
91
|
-
// PDF
|
|
72
|
+
// PDF Ghostscript preset. Screen = smallest; Ebook = mid; Printer = 300dpi; Prepress = print-production.
|
|
92
73
|
export const PdfProfile = {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
74
|
+
Screen: "screen",
|
|
75
|
+
Ebook: "ebook",
|
|
76
|
+
Printer: "printer",
|
|
77
|
+
Prepress: "prepress",
|
|
97
78
|
};
|
|
98
79
|
// PDF output color space.
|
|
99
80
|
export const PdfColorspace = {
|
|
@@ -105,10 +86,8 @@ export const PdfColorspace = {
|
|
|
105
86
|
/** Catalog of every ergonomic enum (canonicalName → wire). */
|
|
106
87
|
export const ERGONOMIC_ENUMS = {
|
|
107
88
|
OptimizeFor,
|
|
108
|
-
ImageMode,
|
|
109
89
|
ImageFormat,
|
|
110
90
|
ImageMetadataPolicy,
|
|
111
|
-
IccProfilePolicy,
|
|
112
91
|
VideoCodec,
|
|
113
92
|
VideoPreset,
|
|
114
93
|
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: "
|
|
2
|
-
export declare const PRESET_VERSION: "1.
|
|
3
|
-
export declare const PRESET_CONFIG_HASH: "sha256:
|
|
1
|
+
export declare const SDK_SPEC_VERSION: "2.0.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 = "
|
|
5
|
-
export const PRESET_VERSION = "1.
|
|
6
|
-
export const PRESET_CONFIG_HASH = "sha256:
|
|
4
|
+
export const SDK_SPEC_VERSION = "2.0.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.17.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.34.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
|
},
|