@pushwoosh/rpc-v2-http-api-data 0.1.971 → 0.1.973
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 +72 -0
- package/media_files.d.ts +42 -0
- package/package.json +1 -1
package/data.js
CHANGED
|
@@ -13489,6 +13489,67 @@ export const data = {
|
|
|
13489
13489
|
"response": "pushwoosh.rpc_v2.media_files.ListMediaFilesResponse",
|
|
13490
13490
|
"method": "get",
|
|
13491
13491
|
"path": "/api/media/files"
|
|
13492
|
+
},
|
|
13493
|
+
"CreateVariant": {
|
|
13494
|
+
"request": "pushwoosh.rpc_v2.media_files.CreateVariantRequest",
|
|
13495
|
+
"response": "pushwoosh.rpc_v2.media_files.CreateVariantResponse",
|
|
13496
|
+
"method": "post",
|
|
13497
|
+
"path": "/api/media/variants"
|
|
13498
|
+
}
|
|
13499
|
+
}
|
|
13500
|
+
},
|
|
13501
|
+
"pushwoosh.rpc_v2.media_files.AspectRatio": {
|
|
13502
|
+
"type": "E",
|
|
13503
|
+
"values": [
|
|
13504
|
+
"ASPECT_RATIO_UNSPECIFIED",
|
|
13505
|
+
"ASPECT_RATIO_1_1",
|
|
13506
|
+
"ASPECT_RATIO_4_3",
|
|
13507
|
+
"ASPECT_RATIO_3_2",
|
|
13508
|
+
"ASPECT_RATIO_4_5",
|
|
13509
|
+
"ASPECT_RATIO_5_4",
|
|
13510
|
+
"ASPECT_RATIO_16_9",
|
|
13511
|
+
"ASPECT_RATIO_16_10",
|
|
13512
|
+
"ASPECT_RATIO_21_9",
|
|
13513
|
+
"ASPECT_RATIO_9_16"
|
|
13514
|
+
]
|
|
13515
|
+
},
|
|
13516
|
+
"pushwoosh.rpc_v2.media_files.CreateVariantRequest": {
|
|
13517
|
+
"type": "I",
|
|
13518
|
+
"fields": {
|
|
13519
|
+
"application": {
|
|
13520
|
+
"type": "string"
|
|
13521
|
+
},
|
|
13522
|
+
"uuid": {
|
|
13523
|
+
"type": "string"
|
|
13524
|
+
},
|
|
13525
|
+
"ratio": {
|
|
13526
|
+
"type": "pushwoosh.rpc_v2.media_files.AspectRatio"
|
|
13527
|
+
},
|
|
13528
|
+
"quality": {
|
|
13529
|
+
"type": "number",
|
|
13530
|
+
"optional": true
|
|
13531
|
+
},
|
|
13532
|
+
"width": {
|
|
13533
|
+
"type": "number"
|
|
13534
|
+
},
|
|
13535
|
+
"height": {
|
|
13536
|
+
"type": "number"
|
|
13537
|
+
}
|
|
13538
|
+
},
|
|
13539
|
+
"oneofs": {
|
|
13540
|
+
"size": {
|
|
13541
|
+
"oneof": [
|
|
13542
|
+
"width",
|
|
13543
|
+
"height"
|
|
13544
|
+
]
|
|
13545
|
+
}
|
|
13546
|
+
}
|
|
13547
|
+
},
|
|
13548
|
+
"pushwoosh.rpc_v2.media_files.CreateVariantResponse": {
|
|
13549
|
+
"type": "I",
|
|
13550
|
+
"fields": {
|
|
13551
|
+
"file": {
|
|
13552
|
+
"type": "pushwoosh.rpc_v2.media_files.MediaFile"
|
|
13492
13553
|
}
|
|
13493
13554
|
}
|
|
13494
13555
|
},
|
|
@@ -13532,6 +13593,10 @@ export const data = {
|
|
|
13532
13593
|
},
|
|
13533
13594
|
"perPage": {
|
|
13534
13595
|
"type": "number"
|
|
13596
|
+
},
|
|
13597
|
+
"parentUuid": {
|
|
13598
|
+
"type": "string",
|
|
13599
|
+
"optional": true
|
|
13535
13600
|
}
|
|
13536
13601
|
}
|
|
13537
13602
|
},
|
|
@@ -13570,6 +13635,9 @@ export const data = {
|
|
|
13570
13635
|
},
|
|
13571
13636
|
"thumbnailHeight": {
|
|
13572
13637
|
"type": "number"
|
|
13638
|
+
},
|
|
13639
|
+
"ratio": {
|
|
13640
|
+
"type": "string"
|
|
13573
13641
|
}
|
|
13574
13642
|
}
|
|
13575
13643
|
},
|
|
@@ -13598,6 +13666,10 @@ export const data = {
|
|
|
13598
13666
|
"type": "string",
|
|
13599
13667
|
"optional": true
|
|
13600
13668
|
},
|
|
13669
|
+
"parentUuid": {
|
|
13670
|
+
"type": "string",
|
|
13671
|
+
"optional": true
|
|
13672
|
+
},
|
|
13601
13673
|
"imageMeta": {
|
|
13602
13674
|
"type": "pushwoosh.rpc_v2.media_files.MediaFile.ImageMeta"
|
|
13603
13675
|
}
|
package/media_files.d.ts
CHANGED
|
@@ -1,8 +1,41 @@
|
|
|
1
1
|
import { RpcMethod } from './commonTypes';
|
|
2
2
|
export type MediaFilesService_List = RpcMethod<ListMediaFilesRequest, ListMediaFilesResponse>;
|
|
3
|
+
export type MediaFilesService_CreateVariant = RpcMethod<CreateVariantRequest, CreateVariantResponse>;
|
|
3
4
|
export interface MediaFilesService {
|
|
4
5
|
List: MediaFilesService_List;
|
|
6
|
+
/**
|
|
7
|
+
* CreateVariant creates a cropped variant of an existing image for the given
|
|
8
|
+
* aspect ratio. The variant references the original via parent_uuid. Calling
|
|
9
|
+
* it again with the same original and ratio returns the existing variant.
|
|
10
|
+
*/
|
|
11
|
+
CreateVariant: MediaFilesService_CreateVariant;
|
|
5
12
|
}
|
|
13
|
+
/** AspectRatio enumerates the supported aspect ratios for image variants. */
|
|
14
|
+
export type AspectRatio = 'ASPECT_RATIO_UNSPECIFIED' | 'ASPECT_RATIO_1_1' | 'ASPECT_RATIO_4_3' | 'ASPECT_RATIO_3_2' | 'ASPECT_RATIO_4_5' | 'ASPECT_RATIO_5_4' | 'ASPECT_RATIO_16_9' | 'ASPECT_RATIO_16_10' | 'ASPECT_RATIO_21_9' | 'ASPECT_RATIO_9_16';
|
|
15
|
+
export type CreateVariantRequest_size_width = {
|
|
16
|
+
type: 'width';
|
|
17
|
+
data: number;
|
|
18
|
+
};
|
|
19
|
+
export type CreateVariantRequest_size_height = {
|
|
20
|
+
type: 'height';
|
|
21
|
+
data: number;
|
|
22
|
+
};
|
|
23
|
+
export type CreateVariantRequest_size = CreateVariantRequest_size_width | CreateVariantRequest_size_height;
|
|
24
|
+
export type CreateVariantRequest = {
|
|
25
|
+
application?: string;
|
|
26
|
+
/** uuid of the existing original image to derive the variant from. */
|
|
27
|
+
uuid?: string;
|
|
28
|
+
ratio?: AspectRatio;
|
|
29
|
+
/**
|
|
30
|
+
* quality is the JPEG encode quality (1-100). Applies only when the variant
|
|
31
|
+
* is encoded as JPEG (i.e. the original is a JPEG); ignored otherwise.
|
|
32
|
+
*/
|
|
33
|
+
quality?: number;
|
|
34
|
+
size: CreateVariantRequest_size;
|
|
35
|
+
};
|
|
36
|
+
export type CreateVariantResponse = {
|
|
37
|
+
file: MediaFile;
|
|
38
|
+
};
|
|
6
39
|
export type UploadMediaFileRequest = {
|
|
7
40
|
application: string;
|
|
8
41
|
filename: string;
|
|
@@ -17,6 +50,11 @@ export type ListMediaFilesRequest = {
|
|
|
17
50
|
application?: string;
|
|
18
51
|
page?: number;
|
|
19
52
|
perPage?: number;
|
|
53
|
+
/**
|
|
54
|
+
* parent_uuid filters the listing: when set, returns the variants of that
|
|
55
|
+
* original image; when empty, returns only originals (no variants).
|
|
56
|
+
*/
|
|
57
|
+
parentUuid?: string;
|
|
20
58
|
};
|
|
21
59
|
export type ListMediaFilesResponse = {
|
|
22
60
|
files: MediaFile[];
|
|
@@ -30,6 +68,8 @@ export type MediaFile_ImageMeta = {
|
|
|
30
68
|
thumbnailUrl: string;
|
|
31
69
|
thumbnailWidth: number;
|
|
32
70
|
thumbnailHeight: number;
|
|
71
|
+
/** ratio is the aspect ratio of a variant (e.g. "16:9"), empty for originals. */
|
|
72
|
+
ratio: string;
|
|
33
73
|
};
|
|
34
74
|
export type MediaFile_meta_imageMeta = {
|
|
35
75
|
type: 'imageMeta';
|
|
@@ -44,5 +84,7 @@ export type MediaFile = {
|
|
|
44
84
|
mimeType: string;
|
|
45
85
|
createdAt: Date;
|
|
46
86
|
description?: string;
|
|
87
|
+
/** parent_uuid is set on variants and points to the original image's uuid. */
|
|
88
|
+
parentUuid?: string;
|
|
47
89
|
meta: MediaFile_meta;
|
|
48
90
|
};
|