@pushwoosh/rpc-v2-http-api-data 0.2.375 → 0.2.376

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
@@ -23006,6 +23006,16 @@ export const data = {
23006
23006
  "description": {
23007
23007
  "type": "string",
23008
23008
  "optional": true
23009
+ },
23010
+ "source": {
23011
+ "type": "string"
23012
+ },
23013
+ "sourceRef": {
23014
+ "type": "string"
23015
+ },
23016
+ "replacesUuid": {
23017
+ "type": "string",
23018
+ "optional": true
23009
23019
  }
23010
23020
  }
23011
23021
  },
@@ -23039,6 +23049,10 @@ export const data = {
23039
23049
  "extensions": {
23040
23050
  "type": "string",
23041
23051
  "array": true
23052
+ },
23053
+ "versionRootUuid": {
23054
+ "type": "string",
23055
+ "optional": true
23042
23056
  }
23043
23057
  }
23044
23058
  },
@@ -23149,6 +23163,18 @@ export const data = {
23149
23163
  "type": "string",
23150
23164
  "optional": true
23151
23165
  },
23166
+ "source": {
23167
+ "type": "string"
23168
+ },
23169
+ "version": {
23170
+ "type": "number"
23171
+ },
23172
+ "versionRootUuid": {
23173
+ "type": "string"
23174
+ },
23175
+ "versionsCount": {
23176
+ "type": "number"
23177
+ },
23152
23178
  "imageMeta": {
23153
23179
  "type": "pushwoosh.rpc_v2.media_files.MediaFile.ImageMeta"
23154
23180
  }
package/media_files.d.ts CHANGED
@@ -4,11 +4,11 @@ export type MediaFilesService_CreateVariant = RpcMethod<CreateVariantRequest, Cr
4
4
  export type MediaFilesService_Delete = RpcMethod<DeleteMediaFileRequest, DeleteMediaFileResponse>;
5
5
  export type MediaFilesService_GetUsage = RpcMethod<GetMediaFilesUsageRequest, GetMediaFilesUsageResponse>;
6
6
  export interface MediaFilesService {
7
- /** Lists an application's media image files newest-first, with paging and an optional filename substring search. Returns only originals by default; pass parent_uuid to instead list the cropped variants of that original. */
7
+ /** 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
8
  List: MediaFilesService_List;
9
9
  /** 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 ratio: calling again with the same original and ratio returns the existing variant instead of duplicating it. */
10
10
  CreateVariant: MediaFilesService_CreateVariant;
11
- /** 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. Not reversible. */
11
+ /** 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. */
12
12
  Delete: MediaFilesService_Delete;
13
13
  /** 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
14
  GetUsage: MediaFilesService_GetUsage;
@@ -50,6 +50,15 @@ export type UploadMediaFileRequest = {
50
50
  /** MIME type of the image (image/jpeg, image/png, image/gif, image/webp); auto-detected from the bytes when empty. */
51
51
  mimeType: string;
52
52
  description?: string;
53
+ /** Where the image was imported from: empty for a file from disk, "canva" or "figma". */
54
+ source: string;
55
+ /** Provider-side identity of the image as a JSON object, e.g. {"design_id": "...", "page": 2}. */
56
+ sourceRef: string;
57
+ /**
58
+ * uuid of an original of this application to store a new version of; the old one keeps its URL.
59
+ * Another application's uuid is NOT_FOUND, a cropped variant's INVALID_ARGUMENT.
60
+ */
61
+ replacesUuid?: string;
53
62
  };
54
63
  export type UploadMediaFileResponse = {
55
64
  file: MediaFile;
@@ -76,6 +85,11 @@ export type ListMediaFilesRequest = {
76
85
  * must filter here rather than client-side, so page size and total stay honest.
77
86
  */
78
87
  extensions?: string[];
88
+ /**
89
+ * version_root_uuid lists every version of one image, newest first, including the ones no
90
+ * longer listed by default. Pass a file's version_root_uuid; other filters are ignored.
91
+ */
92
+ versionRootUuid?: string;
79
93
  };
80
94
  export type ListMediaFilesResponse = {
81
95
  files: MediaFile[];
@@ -95,7 +109,10 @@ export type GetMediaFilesUsageRequest = {
95
109
  application?: string;
96
110
  };
97
111
  export type GetMediaFilesUsageResponse = {
98
- /** originals_count is the number of original files (no parent). */
112
+ /**
113
+ * originals_count is the number of original files (no parent), every stored version of an
114
+ * edited image included: each one occupies storage.
115
+ */
99
116
  originalsCount: number;
100
117
  /** total_count is the number of files, including cropped variants. */
101
118
  totalCount: number;
@@ -129,5 +146,13 @@ export type MediaFile = {
129
146
  description?: string;
130
147
  /** parent_uuid is set on variants and points to the original image's uuid. */
131
148
  parentUuid?: string;
149
+ /** source is where the image was imported from: empty for a file from disk, "canva" or "figma". */
150
+ source: string;
151
+ /** version is 0 for the first upload of an image and grows with every new version of it. */
152
+ version: number;
153
+ /** version_root_uuid groups the versions of one image: the uuid of its first version. */
154
+ versionRootUuid: string;
155
+ /** versions_count is how many versions of this image exist, this one included. */
156
+ versionsCount: number;
132
157
  meta: MediaFile_meta;
133
158
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/rpc-v2-http-api-data",
3
- "version": "0.2.375",
3
+ "version": "0.2.376",
4
4
  "description": "RPC V2 HTTP API Types and Data",
5
5
  "main": "index.js",
6
6
  "module": "index.js",