@giveitsmaller/contracts 0.1.2 → 0.2.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/dist/asyncapi/OperationType.d.ts +4 -0
- package/dist/asyncapi/OperationType.js +4 -0
- package/dist/openapi/models/JobType.d.ts +8 -1
- package/dist/openapi/models/JobType.js +8 -1
- package/dist/openapi/models/OperationInputModel.d.ts +3 -1
- package/dist/openapi/models/OperationInputModel.js +3 -1
- package/dist/openapi/models/OperationType.d.ts +24 -2
- package/dist/openapi/models/OperationType.js +24 -2
- package/dist/operations/index.d.ts +1 -0
- package/dist/operations/index.js +1 -0
- package/dist/operations/watermark.d.ts +28 -0
- package/dist/operations/watermark.js +19 -0
- package/package.json +1 -1
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
declare enum OperationType {
|
|
2
2
|
COMPRESS = "compress",
|
|
3
3
|
THUMBNAIL = "thumbnail",
|
|
4
|
+
THUMBNAIL_IMAGE = "thumbnail_image",
|
|
5
|
+
THUMBNAIL_VIDEO = "thumbnail_video",
|
|
6
|
+
THUMBNAIL_DOCUMENT = "thumbnail_document",
|
|
7
|
+
THUMBNAIL_OFFICE = "thumbnail_office",
|
|
4
8
|
WATERMARK = "watermark",
|
|
5
9
|
CONVERT = "convert",
|
|
6
10
|
MERGE = "merge",
|
|
@@ -2,6 +2,10 @@ var OperationType;
|
|
|
2
2
|
(function (OperationType) {
|
|
3
3
|
OperationType["COMPRESS"] = "compress";
|
|
4
4
|
OperationType["THUMBNAIL"] = "thumbnail";
|
|
5
|
+
OperationType["THUMBNAIL_IMAGE"] = "thumbnail_image";
|
|
6
|
+
OperationType["THUMBNAIL_VIDEO"] = "thumbnail_video";
|
|
7
|
+
OperationType["THUMBNAIL_DOCUMENT"] = "thumbnail_document";
|
|
8
|
+
OperationType["THUMBNAIL_OFFICE"] = "thumbnail_office";
|
|
5
9
|
OperationType["WATERMARK"] = "watermark";
|
|
6
10
|
OperationType["CONVERT"] = "convert";
|
|
7
11
|
OperationType["MERGE"] = "merge";
|
|
@@ -10,7 +10,14 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
|
-
* Media type category derived from MIME type. Used
|
|
13
|
+
* Media type category derived from MIME type. Used as the
|
|
14
|
+
* `job_type` SNS message attribute on the `job-requests` topic —
|
|
15
|
+
* the single filter attribute that routes compression traffic to
|
|
16
|
+
* per-media-type compression queues. Not used by any other SNS
|
|
17
|
+
* topic; non-compression operations are routed by `operation_type`
|
|
18
|
+
* on the separate `operations` topic.
|
|
19
|
+
*
|
|
20
|
+
* Derivation:
|
|
14
21
|
* - image/* -> image
|
|
15
22
|
* - video/* -> video
|
|
16
23
|
* - audio/* -> audio
|
|
@@ -12,7 +12,14 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
/**
|
|
15
|
-
* Media type category derived from MIME type. Used
|
|
15
|
+
* Media type category derived from MIME type. Used as the
|
|
16
|
+
* `job_type` SNS message attribute on the `job-requests` topic —
|
|
17
|
+
* the single filter attribute that routes compression traffic to
|
|
18
|
+
* per-media-type compression queues. Not used by any other SNS
|
|
19
|
+
* topic; non-compression operations are routed by `operation_type`
|
|
20
|
+
* on the separate `operations` topic.
|
|
21
|
+
*
|
|
22
|
+
* Derivation:
|
|
16
23
|
* - image/* -> image
|
|
17
24
|
* - video/* -> video
|
|
18
25
|
* - audio/* -> audio
|
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
13
|
* Whether the operation accepts a single file or multiple files:
|
|
14
|
-
* - single: One input file (compress, thumbnail,
|
|
14
|
+
* - single: One input file (compress, thumbnail, thumbnail_image,
|
|
15
|
+
* thumbnail_video, thumbnail_document, thumbnail_office,
|
|
16
|
+
* watermark, convert)
|
|
15
17
|
* - multi: Multiple input files (merge, archive)
|
|
16
18
|
*
|
|
17
19
|
* @export
|
|
@@ -13,7 +13,9 @@
|
|
|
13
13
|
*/
|
|
14
14
|
/**
|
|
15
15
|
* Whether the operation accepts a single file or multiple files:
|
|
16
|
-
* - single: One input file (compress, thumbnail,
|
|
16
|
+
* - single: One input file (compress, thumbnail, thumbnail_image,
|
|
17
|
+
* thumbnail_video, thumbnail_document, thumbnail_office,
|
|
18
|
+
* watermark, convert)
|
|
17
19
|
* - multi: Multiple input files (merge, archive)
|
|
18
20
|
*
|
|
19
21
|
* @export
|
|
@@ -12,17 +12,39 @@
|
|
|
12
12
|
/**
|
|
13
13
|
* Available operation types:
|
|
14
14
|
* - compress: Reduce file size (images, audio, video, documents)
|
|
15
|
-
* - thumbnail:
|
|
16
|
-
*
|
|
15
|
+
* - thumbnail: Legacy thumbnail value. Generates a preview image
|
|
16
|
+
* for any media type via a single Lambda. Currently the only
|
|
17
|
+
* thumbnail value the compression_api publisher emits; retirement
|
|
18
|
+
* is planned after the publisher adopts the four sub-type values
|
|
19
|
+
* below in a follow-up API PR.
|
|
20
|
+
* - thumbnail_image: Image thumbnail sub-type. Backed by a dedicated
|
|
21
|
+
* Rust image Lambda. Not yet emitted by the publisher.
|
|
22
|
+
* - thumbnail_video: Video thumbnail sub-type. Backed by a dedicated
|
|
23
|
+
* FFmpeg Lambda. Not yet emitted.
|
|
24
|
+
* - thumbnail_document: PDF/EPUB thumbnail sub-type. Backed by a
|
|
25
|
+
* dedicated Ghostscript Lambda. Not yet emitted.
|
|
26
|
+
* - thumbnail_office: Office document (DOCX/XLSX/PPTX/ODT/ODS/ODP)
|
|
27
|
+
* thumbnail sub-type. Backed by a dedicated LibreOffice Lambda.
|
|
28
|
+
* Not yet emitted.
|
|
29
|
+
* - watermark: Apply branding/protection (images only)
|
|
17
30
|
* - merge: Concatenate/combine multiple files into one (images, video, audio, documents/PDF). Multi-input.
|
|
18
31
|
* - archive: Bundle files into ZIP/tar.gz (all types). Multi-input.
|
|
19
32
|
* - convert: Change file format (all types)
|
|
20
33
|
*
|
|
34
|
+
* Both the legacy `thumbnail` value and the four sub-type values
|
|
35
|
+
* are valid routing targets today during the thumbnail migration
|
|
36
|
+
* window. See `asyncapi/events.yaml` for the full routing
|
|
37
|
+
* vocabulary and the publisher branching rule.
|
|
38
|
+
*
|
|
21
39
|
* @export
|
|
22
40
|
*/
|
|
23
41
|
export declare const OperationType: {
|
|
24
42
|
readonly compress: "compress";
|
|
25
43
|
readonly thumbnail: "thumbnail";
|
|
44
|
+
readonly thumbnail_image: "thumbnail_image";
|
|
45
|
+
readonly thumbnail_video: "thumbnail_video";
|
|
46
|
+
readonly thumbnail_document: "thumbnail_document";
|
|
47
|
+
readonly thumbnail_office: "thumbnail_office";
|
|
26
48
|
readonly watermark: "watermark";
|
|
27
49
|
readonly merge: "merge";
|
|
28
50
|
readonly archive: "archive";
|
|
@@ -14,17 +14,39 @@
|
|
|
14
14
|
/**
|
|
15
15
|
* Available operation types:
|
|
16
16
|
* - compress: Reduce file size (images, audio, video, documents)
|
|
17
|
-
* - thumbnail:
|
|
18
|
-
*
|
|
17
|
+
* - thumbnail: Legacy thumbnail value. Generates a preview image
|
|
18
|
+
* for any media type via a single Lambda. Currently the only
|
|
19
|
+
* thumbnail value the compression_api publisher emits; retirement
|
|
20
|
+
* is planned after the publisher adopts the four sub-type values
|
|
21
|
+
* below in a follow-up API PR.
|
|
22
|
+
* - thumbnail_image: Image thumbnail sub-type. Backed by a dedicated
|
|
23
|
+
* Rust image Lambda. Not yet emitted by the publisher.
|
|
24
|
+
* - thumbnail_video: Video thumbnail sub-type. Backed by a dedicated
|
|
25
|
+
* FFmpeg Lambda. Not yet emitted.
|
|
26
|
+
* - thumbnail_document: PDF/EPUB thumbnail sub-type. Backed by a
|
|
27
|
+
* dedicated Ghostscript Lambda. Not yet emitted.
|
|
28
|
+
* - thumbnail_office: Office document (DOCX/XLSX/PPTX/ODT/ODS/ODP)
|
|
29
|
+
* thumbnail sub-type. Backed by a dedicated LibreOffice Lambda.
|
|
30
|
+
* Not yet emitted.
|
|
31
|
+
* - watermark: Apply branding/protection (images only)
|
|
19
32
|
* - merge: Concatenate/combine multiple files into one (images, video, audio, documents/PDF). Multi-input.
|
|
20
33
|
* - archive: Bundle files into ZIP/tar.gz (all types). Multi-input.
|
|
21
34
|
* - convert: Change file format (all types)
|
|
22
35
|
*
|
|
36
|
+
* Both the legacy `thumbnail` value and the four sub-type values
|
|
37
|
+
* are valid routing targets today during the thumbnail migration
|
|
38
|
+
* window. See `asyncapi/events.yaml` for the full routing
|
|
39
|
+
* vocabulary and the publisher branching rule.
|
|
40
|
+
*
|
|
23
41
|
* @export
|
|
24
42
|
*/
|
|
25
43
|
export const OperationType = {
|
|
26
44
|
compress: 'compress',
|
|
27
45
|
thumbnail: 'thumbnail',
|
|
46
|
+
thumbnail_image: 'thumbnail_image',
|
|
47
|
+
thumbnail_video: 'thumbnail_video',
|
|
48
|
+
thumbnail_document: 'thumbnail_document',
|
|
49
|
+
thumbnail_office: 'thumbnail_office',
|
|
28
50
|
watermark: 'watermark',
|
|
29
51
|
merge: 'merge',
|
|
30
52
|
archive: 'archive',
|
package/dist/operations/index.js
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare enum WatermarkImageWatermarkType {
|
|
2
|
+
Image = "image",
|
|
3
|
+
Text = "text"
|
|
4
|
+
}
|
|
5
|
+
export declare enum WatermarkImagePosition {
|
|
6
|
+
Center = "center",
|
|
7
|
+
TopLeft = "top-left",
|
|
8
|
+
TopRight = "top-right",
|
|
9
|
+
BottomLeft = "bottom-left",
|
|
10
|
+
BottomRight = "bottom-right"
|
|
11
|
+
}
|
|
12
|
+
export declare enum WatermarkImageWatermarkMode {
|
|
13
|
+
Single = "single",
|
|
14
|
+
Tiled = "tiled"
|
|
15
|
+
}
|
|
16
|
+
export interface WatermarkImageOptions {
|
|
17
|
+
watermark_type?: WatermarkImageWatermarkType;
|
|
18
|
+
position?: WatermarkImagePosition;
|
|
19
|
+
opacity?: number;
|
|
20
|
+
watermark_bucket?: string;
|
|
21
|
+
watermark_key?: string;
|
|
22
|
+
text?: string;
|
|
23
|
+
font_size?: number;
|
|
24
|
+
color?: string;
|
|
25
|
+
watermark_mode?: WatermarkImageWatermarkMode;
|
|
26
|
+
rotation?: number;
|
|
27
|
+
tile_spacing?: number;
|
|
28
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Auto-generated from watermark.yaml -- do not edit
|
|
2
|
+
export var WatermarkImageWatermarkType;
|
|
3
|
+
(function (WatermarkImageWatermarkType) {
|
|
4
|
+
WatermarkImageWatermarkType["Image"] = "image";
|
|
5
|
+
WatermarkImageWatermarkType["Text"] = "text";
|
|
6
|
+
})(WatermarkImageWatermarkType || (WatermarkImageWatermarkType = {}));
|
|
7
|
+
export var WatermarkImagePosition;
|
|
8
|
+
(function (WatermarkImagePosition) {
|
|
9
|
+
WatermarkImagePosition["Center"] = "center";
|
|
10
|
+
WatermarkImagePosition["TopLeft"] = "top-left";
|
|
11
|
+
WatermarkImagePosition["TopRight"] = "top-right";
|
|
12
|
+
WatermarkImagePosition["BottomLeft"] = "bottom-left";
|
|
13
|
+
WatermarkImagePosition["BottomRight"] = "bottom-right";
|
|
14
|
+
})(WatermarkImagePosition || (WatermarkImagePosition = {}));
|
|
15
|
+
export var WatermarkImageWatermarkMode;
|
|
16
|
+
(function (WatermarkImageWatermarkMode) {
|
|
17
|
+
WatermarkImageWatermarkMode["Single"] = "single";
|
|
18
|
+
WatermarkImageWatermarkMode["Tiled"] = "tiled";
|
|
19
|
+
})(WatermarkImageWatermarkMode || (WatermarkImageWatermarkMode = {}));
|