@pushwoosh/rpc-v2-http-api-data 0.1.979 → 0.1.981
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 +49 -0
- package/media_files.d.ts +31 -0
- package/package.json +1 -1
package/data.js
CHANGED
|
@@ -13516,6 +13516,18 @@ export const data = {
|
|
|
13516
13516
|
"response": "pushwoosh.rpc_v2.media_files.CreateVariantResponse",
|
|
13517
13517
|
"method": "post",
|
|
13518
13518
|
"path": "/api/media/variants"
|
|
13519
|
+
},
|
|
13520
|
+
"Delete": {
|
|
13521
|
+
"request": "pushwoosh.rpc_v2.media_files.DeleteMediaFileRequest",
|
|
13522
|
+
"response": "pushwoosh.rpc_v2.media_files.DeleteMediaFileResponse",
|
|
13523
|
+
"method": "delete",
|
|
13524
|
+
"path": "/api/media/files/{application}/{uuid}"
|
|
13525
|
+
},
|
|
13526
|
+
"GetUsage": {
|
|
13527
|
+
"request": "pushwoosh.rpc_v2.media_files.GetMediaFilesUsageRequest",
|
|
13528
|
+
"response": "pushwoosh.rpc_v2.media_files.GetMediaFilesUsageResponse",
|
|
13529
|
+
"method": "get",
|
|
13530
|
+
"path": "/api/media/files/usage"
|
|
13519
13531
|
}
|
|
13520
13532
|
}
|
|
13521
13533
|
},
|
|
@@ -13639,6 +13651,43 @@ export const data = {
|
|
|
13639
13651
|
}
|
|
13640
13652
|
}
|
|
13641
13653
|
},
|
|
13654
|
+
"pushwoosh.rpc_v2.media_files.DeleteMediaFileRequest": {
|
|
13655
|
+
"type": "I",
|
|
13656
|
+
"fields": {
|
|
13657
|
+
"application": {
|
|
13658
|
+
"type": "string"
|
|
13659
|
+
},
|
|
13660
|
+
"uuid": {
|
|
13661
|
+
"type": "string"
|
|
13662
|
+
}
|
|
13663
|
+
}
|
|
13664
|
+
},
|
|
13665
|
+
"pushwoosh.rpc_v2.media_files.DeleteMediaFileResponse": {
|
|
13666
|
+
"type": "I",
|
|
13667
|
+
"fields": {}
|
|
13668
|
+
},
|
|
13669
|
+
"pushwoosh.rpc_v2.media_files.GetMediaFilesUsageRequest": {
|
|
13670
|
+
"type": "I",
|
|
13671
|
+
"fields": {
|
|
13672
|
+
"application": {
|
|
13673
|
+
"type": "string"
|
|
13674
|
+
}
|
|
13675
|
+
}
|
|
13676
|
+
},
|
|
13677
|
+
"pushwoosh.rpc_v2.media_files.GetMediaFilesUsageResponse": {
|
|
13678
|
+
"type": "I",
|
|
13679
|
+
"fields": {
|
|
13680
|
+
"originalsCount": {
|
|
13681
|
+
"type": "number"
|
|
13682
|
+
},
|
|
13683
|
+
"totalCount": {
|
|
13684
|
+
"type": "number"
|
|
13685
|
+
},
|
|
13686
|
+
"totalSize": {
|
|
13687
|
+
"type": "number"
|
|
13688
|
+
}
|
|
13689
|
+
}
|
|
13690
|
+
},
|
|
13642
13691
|
"pushwoosh.rpc_v2.media_files.MediaFile.ImageMeta": {
|
|
13643
13692
|
"type": "I",
|
|
13644
13693
|
"fields": {
|
package/media_files.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { RpcMethod } from './commonTypes';
|
|
2
2
|
export type MediaFilesService_List = RpcMethod<ListMediaFilesRequest, ListMediaFilesResponse>;
|
|
3
3
|
export type MediaFilesService_CreateVariant = RpcMethod<CreateVariantRequest, CreateVariantResponse>;
|
|
4
|
+
export type MediaFilesService_Delete = RpcMethod<DeleteMediaFileRequest, DeleteMediaFileResponse>;
|
|
5
|
+
export type MediaFilesService_GetUsage = RpcMethod<GetMediaFilesUsageRequest, GetMediaFilesUsageResponse>;
|
|
4
6
|
export interface MediaFilesService {
|
|
5
7
|
List: MediaFilesService_List;
|
|
6
8
|
/**
|
|
@@ -9,6 +11,16 @@ export interface MediaFilesService {
|
|
|
9
11
|
* it again with the same original and ratio returns the existing variant.
|
|
10
12
|
*/
|
|
11
13
|
CreateVariant: MediaFilesService_CreateVariant;
|
|
14
|
+
/**
|
|
15
|
+
* Delete removes a media file. Deleting an original also removes all of its
|
|
16
|
+
* cropped variants; deleting a variant removes only that variant.
|
|
17
|
+
*/
|
|
18
|
+
Delete: MediaFilesService_Delete;
|
|
19
|
+
/**
|
|
20
|
+
* GetUsage returns the total stored size (bytes) and file count for an
|
|
21
|
+
* application, counting both originals and their cropped variants.
|
|
22
|
+
*/
|
|
23
|
+
GetUsage: MediaFilesService_GetUsage;
|
|
12
24
|
}
|
|
13
25
|
/** AspectRatio enumerates the supported aspect ratios for image variants. */
|
|
14
26
|
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';
|
|
@@ -62,6 +74,25 @@ export type ListMediaFilesResponse = {
|
|
|
62
74
|
perPage: number;
|
|
63
75
|
total: number;
|
|
64
76
|
};
|
|
77
|
+
export type DeleteMediaFileRequest = {
|
|
78
|
+
application?: string;
|
|
79
|
+
uuid?: string;
|
|
80
|
+
};
|
|
81
|
+
export type DeleteMediaFileResponse = {};
|
|
82
|
+
export type GetMediaFilesUsageRequest = {
|
|
83
|
+
application?: string;
|
|
84
|
+
};
|
|
85
|
+
export type GetMediaFilesUsageResponse = {
|
|
86
|
+
/** originals_count is the number of original files (no parent). */
|
|
87
|
+
originalsCount: number;
|
|
88
|
+
/** total_count is the number of files, including cropped variants. */
|
|
89
|
+
totalCount: number;
|
|
90
|
+
/**
|
|
91
|
+
* total_size is the total bytes stored in S3 for the application —
|
|
92
|
+
* originals, variants and thumbnails.
|
|
93
|
+
*/
|
|
94
|
+
totalSize: number;
|
|
95
|
+
};
|
|
65
96
|
export type MediaFile_ImageMeta = {
|
|
66
97
|
width: number;
|
|
67
98
|
height: number;
|