@pushwoosh/rpc-v2-http-api-data 0.2.449 → 0.2.450

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 CHANGED
@@ -24602,6 +24602,18 @@ export const data = {
24602
24602
  "response": "pushwoosh.rpc_v2.media_files.GetMediaFilesUsageResponse",
24603
24603
  "method": "get",
24604
24604
  "path": "/api/media/files/usage"
24605
+ },
24606
+ "GetSettings": {
24607
+ "request": "pushwoosh.rpc_v2.media_files.GetMediaSettingsRequest",
24608
+ "response": "pushwoosh.rpc_v2.media_files.GetMediaSettingsResponse",
24609
+ "method": "get",
24610
+ "path": "/api/media/settings"
24611
+ },
24612
+ "UpdateSettings": {
24613
+ "request": "pushwoosh.rpc_v2.media_files.UpdateMediaSettingsRequest",
24614
+ "response": "pushwoosh.rpc_v2.media_files.UpdateMediaSettingsResponse",
24615
+ "method": "put",
24616
+ "path": "/api/media/settings"
24605
24617
  }
24606
24618
  }
24607
24619
  },
@@ -24849,6 +24861,9 @@ export const data = {
24849
24861
  "versionsCount": {
24850
24862
  "type": "number"
24851
24863
  },
24864
+ "originalFileSize": {
24865
+ "type": "number"
24866
+ },
24852
24867
  "imageMeta": {
24853
24868
  "type": "pushwoosh.rpc_v2.media_files.MediaFile.ImageMeta"
24854
24869
  }
@@ -24861,6 +24876,53 @@ export const data = {
24861
24876
  }
24862
24877
  }
24863
24878
  },
24879
+ "pushwoosh.rpc_v2.media_files.MediaSettings": {
24880
+ "type": "I",
24881
+ "fields": {
24882
+ "compressPng": {
24883
+ "type": "boolean"
24884
+ }
24885
+ }
24886
+ },
24887
+ "pushwoosh.rpc_v2.media_files.GetMediaSettingsRequest": {
24888
+ "type": "I",
24889
+ "fields": {
24890
+ "application": {
24891
+ "type": "string"
24892
+ }
24893
+ }
24894
+ },
24895
+ "pushwoosh.rpc_v2.media_files.GetMediaSettingsResponse": {
24896
+ "type": "I",
24897
+ "fields": {
24898
+ "settings": {
24899
+ "type": "pushwoosh.rpc_v2.media_files.MediaSettings"
24900
+ },
24901
+ "canModify": {
24902
+ "type": "boolean"
24903
+ }
24904
+ }
24905
+ },
24906
+ "pushwoosh.rpc_v2.media_files.UpdateMediaSettingsRequest": {
24907
+ "type": "I",
24908
+ "fields": {
24909
+ "application": {
24910
+ "type": "string"
24911
+ },
24912
+ "compressPng": {
24913
+ "type": "boolean",
24914
+ "optional": true
24915
+ }
24916
+ }
24917
+ },
24918
+ "pushwoosh.rpc_v2.media_files.UpdateMediaSettingsResponse": {
24919
+ "type": "I",
24920
+ "fields": {
24921
+ "settings": {
24922
+ "type": "pushwoosh.rpc_v2.media_files.MediaSettings"
24923
+ }
24924
+ }
24925
+ },
24864
24926
  "pushwoosh.rpc_v2.messages.MessagesService": {
24865
24927
  "type": "S",
24866
24928
  "key": "messages",
package/media_files.d.ts CHANGED
@@ -3,6 +3,8 @@ export type MediaFilesService_List = RpcMethod<ListMediaFilesRequest, ListMediaF
3
3
  export type MediaFilesService_CreateVariant = RpcMethod<CreateVariantRequest, CreateVariantResponse>;
4
4
  export type MediaFilesService_Delete = RpcMethod<DeleteMediaFileRequest, DeleteMediaFileResponse>;
5
5
  export type MediaFilesService_GetUsage = RpcMethod<GetMediaFilesUsageRequest, GetMediaFilesUsageResponse>;
6
+ export type MediaFilesService_GetSettings = RpcMethod<GetMediaSettingsRequest, GetMediaSettingsResponse>;
7
+ export type MediaFilesService_UpdateSettings = RpcMethod<UpdateMediaSettingsRequest, UpdateMediaSettingsResponse>;
6
8
  export interface MediaFilesService {
7
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. */
8
10
  List: MediaFilesService_List;
@@ -12,6 +14,10 @@ export interface MediaFilesService {
12
14
  Delete: MediaFilesService_Delete;
13
15
  /** Returns an application's media storage footprint: count of original files, total file count including cropped variants, and total bytes stored in S3 (originals, variants and thumbnails). Use to check or report media quota usage for an application code. */
14
16
  GetUsage: MediaFilesService_GetUsage;
17
+ /** Returns an application's media storage settings, e.g. whether PNG images are compressed on upload, and whether the caller may change them. */
18
+ GetSettings: MediaFilesService_GetSettings;
19
+ /** Changes an application's media storage settings. Only the fields present in the request change, the rest keep their value. Applies to images uploaded afterwards; files already stored are not touched. */
20
+ UpdateSettings: MediaFilesService_UpdateSettings;
15
21
  }
16
22
  /** AspectRatio enumerates the supported aspect ratios for image variants. */
17
23
  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'
@@ -161,5 +167,30 @@ export type MediaFile = {
161
167
  versionRootUuid: string;
162
168
  /** versions_count is how many versions of this image exist, this one included. */
163
169
  versionsCount: number;
170
+ /** original_file_size is the size before PNG compression; set only in an upload response when compression shrank the file. */
171
+ originalFileSize: number;
164
172
  meta: MediaFile_meta;
165
173
  };
174
+ /** MediaSettings are per-application media storage settings. The zero value of every field is the default. */
175
+ export type MediaSettings = {
176
+ /** compress_png quantizes PNG images on upload (lossy palette compression, transparency kept). */
177
+ compressPng: boolean;
178
+ };
179
+ export type GetMediaSettingsRequest = {
180
+ /** Application code (format XXXXX-XXXXX) whose media settings to read. */
181
+ application?: string;
182
+ };
183
+ export type GetMediaSettingsResponse = {
184
+ settings: MediaSettings;
185
+ /** can_modify tells whether the caller may change the settings. */
186
+ canModify: boolean;
187
+ };
188
+ export type UpdateMediaSettingsRequest = {
189
+ /** Application code (format XXXXX-XXXXX) whose media settings to change. */
190
+ application?: string;
191
+ /** Unset leaves the stored value as is. */
192
+ compressPng?: boolean;
193
+ };
194
+ export type UpdateMediaSettingsResponse = {
195
+ settings: MediaSettings;
196
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-v2-http-api-data",
3
- "version": "0.2.449",
3
+ "version": "0.2.450",
4
4
  "description": "RPC V2 HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",