@pushwoosh/rpc-v2-http-api-data 0.2.450 → 0.2.452
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/data.js +14 -0
- package/media_files.d.ts +14 -1
- package/package.json +1 -1
package/data.js
CHANGED
|
@@ -24655,6 +24655,9 @@ export const data = {
|
|
|
24655
24655
|
},
|
|
24656
24656
|
"height": {
|
|
24657
24657
|
"type": "number"
|
|
24658
|
+
},
|
|
24659
|
+
"focalPoint": {
|
|
24660
|
+
"type": "pushwoosh.rpc_v2.media_files.FocalPoint"
|
|
24658
24661
|
}
|
|
24659
24662
|
},
|
|
24660
24663
|
"oneofs": {
|
|
@@ -24666,6 +24669,17 @@ export const data = {
|
|
|
24666
24669
|
}
|
|
24667
24670
|
}
|
|
24668
24671
|
},
|
|
24672
|
+
"pushwoosh.rpc_v2.media_files.FocalPoint": {
|
|
24673
|
+
"type": "I",
|
|
24674
|
+
"fields": {
|
|
24675
|
+
"x": {
|
|
24676
|
+
"type": "number"
|
|
24677
|
+
},
|
|
24678
|
+
"y": {
|
|
24679
|
+
"type": "number"
|
|
24680
|
+
}
|
|
24681
|
+
}
|
|
24682
|
+
},
|
|
24669
24683
|
"pushwoosh.rpc_v2.media_files.CreateVariantResponse": {
|
|
24670
24684
|
"type": "I",
|
|
24671
24685
|
"fields": {
|
package/media_files.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export type MediaFilesService_UpdateSettings = RpcMethod<UpdateMediaSettingsRequ
|
|
|
8
8
|
export interface MediaFilesService {
|
|
9
9
|
/** Lists an application's media image files newest-first, with paging and an optional filename substring search. Returns only originals by default, and of an edited image only its newest version (versions_count tells how many exist); pass parent_uuid to list the cropped variants of an original, or version_root_uuid to list every version of one image. */
|
|
10
10
|
List: MediaFilesService_List;
|
|
11
|
-
/** Creates a cropped variant of an existing original image (by uuid) for the given aspect ratio, storing it in S3 as a child of the original. Idempotent per original and
|
|
11
|
+
/** Creates a cropped variant of an existing original image (by uuid) for the given aspect ratio, storing it in S3 as a child of the original; focal_point moves the crop window off center. Idempotent per original, ratio, output size and window position: calling again with the same ones returns the existing variant instead of duplicating it. */
|
|
12
12
|
CreateVariant: MediaFilesService_CreateVariant;
|
|
13
13
|
/** Deletes a media file by uuid, removing its database record and S3 objects; deleting an original cascades to all of its cropped variants, while deleting a variant removes only that variant. Deleting the newest version of an edited image lists the previous version again. Not reversible. */
|
|
14
14
|
Delete: MediaFilesService_Delete;
|
|
@@ -45,8 +45,21 @@ export type CreateVariantRequest = {
|
|
|
45
45
|
* is encoded as JPEG (i.e. the original is a JPEG); ignored otherwise.
|
|
46
46
|
*/
|
|
47
47
|
quality?: number;
|
|
48
|
+
/**
|
|
49
|
+
* focal_point is the center of the crop window on the original; the window is shifted
|
|
50
|
+
* back inside the image near an edge. Unset means the center (0.5, 0.5).
|
|
51
|
+
*/
|
|
52
|
+
focalPoint?: FocalPoint;
|
|
48
53
|
size: CreateVariantRequest_size;
|
|
49
54
|
};
|
|
55
|
+
/**
|
|
56
|
+
* FocalPoint is a point on an image as a fraction of its width (x) and height (y), each 0..1
|
|
57
|
+
* from the top-left corner.
|
|
58
|
+
*/
|
|
59
|
+
export type FocalPoint = {
|
|
60
|
+
x: number;
|
|
61
|
+
y: number;
|
|
62
|
+
};
|
|
50
63
|
export type CreateVariantResponse = {
|
|
51
64
|
file: MediaFile;
|
|
52
65
|
};
|