@pushwoosh/rpc-v2-http-api-data 0.2.374 → 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 +40 -0
- package/media_files.d.ts +28 -3
- package/news.d.ts +16 -5
- package/package.json +1 -1
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
|
}
|
|
@@ -24072,6 +24098,12 @@ export const data = {
|
|
|
24072
24098
|
},
|
|
24073
24099
|
"lastSyncedArticles": {
|
|
24074
24100
|
"type": "number"
|
|
24101
|
+
},
|
|
24102
|
+
"syncIntervalMinutes": {
|
|
24103
|
+
"type": "number"
|
|
24104
|
+
},
|
|
24105
|
+
"journeyUuid": {
|
|
24106
|
+
"type": "string"
|
|
24075
24107
|
}
|
|
24076
24108
|
}
|
|
24077
24109
|
},
|
|
@@ -24109,6 +24141,14 @@ export const data = {
|
|
|
24109
24141
|
},
|
|
24110
24142
|
"enabled": {
|
|
24111
24143
|
"type": "boolean"
|
|
24144
|
+
},
|
|
24145
|
+
"syncIntervalMinutes": {
|
|
24146
|
+
"type": "number",
|
|
24147
|
+
"optional": true
|
|
24148
|
+
},
|
|
24149
|
+
"journeyUuid": {
|
|
24150
|
+
"type": "string",
|
|
24151
|
+
"optional": true
|
|
24112
24152
|
}
|
|
24113
24153
|
}
|
|
24114
24154
|
},
|
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
|
|
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
|
-
/**
|
|
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/news.d.ts
CHANGED
|
@@ -4,14 +4,14 @@ export type NewsService_SetNewsFeed = RpcMethod<SetNewsFeedRequest, SetNewsFeedR
|
|
|
4
4
|
export type NewsService_DeleteNewsFeed = RpcMethod<DeleteNewsFeedRequest, DeleteNewsFeedResponse>;
|
|
5
5
|
/**
|
|
6
6
|
* NewsService manages the registry of news feeds an application's email news
|
|
7
|
-
* blocks read from. Feeds are imported
|
|
7
|
+
* blocks read from. Feeds are imported on their own interval by uds/rss-feeds.
|
|
8
8
|
*/
|
|
9
9
|
export interface NewsService {
|
|
10
|
-
/** Lists the news feeds registered for an application (code XXXXX-XXXXX), each with the outcome of its last
|
|
10
|
+
/** Lists the news feeds registered for an application (code XXXXX-XXXXX), each with the outcome of its last import. Use to fill the feed selector of an email news block and to show why a feed went quiet. */
|
|
11
11
|
ListNewsFeeds: NewsService_ListNewsFeeds;
|
|
12
|
-
/** Registers an RSS/Atom news feed for an application (code XXXXX-XXXXX), or updates one when code is given. Articles are imported
|
|
12
|
+
/** Registers an RSS/Atom news feed for an application (code XXXXX-XXXXX), or updates one when code is given. Articles are imported on the feed's interval; an application may have several feeds. */
|
|
13
13
|
SetNewsFeed: NewsService_SetNewsFeed;
|
|
14
|
-
/** Removes a news feed of an application (code XXXXX-XXXXX) from the registry. Its already imported articles are deleted by the next
|
|
14
|
+
/** Removes a news feed of an application (code XXXXX-XXXXX) from the registry. Its already imported articles are deleted by the next import run. */
|
|
15
15
|
DeleteNewsFeed: NewsService_DeleteNewsFeed;
|
|
16
16
|
}
|
|
17
17
|
export type NewsFeed = {
|
|
@@ -25,7 +25,7 @@ export type NewsFeed = {
|
|
|
25
25
|
enabled: boolean;
|
|
26
26
|
created: Date;
|
|
27
27
|
updated: Date;
|
|
28
|
-
/** Outcome of the last
|
|
28
|
+
/** Outcome of the last import: "ok" | "error", empty before the first run. */
|
|
29
29
|
lastStatus: string;
|
|
30
30
|
/** Why that import failed; empty when it succeeded. */
|
|
31
31
|
lastError: string;
|
|
@@ -33,6 +33,10 @@ export type NewsFeed = {
|
|
|
33
33
|
lastSyncedAt?: Date;
|
|
34
34
|
/** Articles the last successful import stored. */
|
|
35
35
|
lastSyncedArticles: number;
|
|
36
|
+
/** Minutes between imports of this feed. */
|
|
37
|
+
syncIntervalMinutes: number;
|
|
38
|
+
/** Journey started for every new article through its API-based entry point; empty when none. */
|
|
39
|
+
journeyUuid: string;
|
|
36
40
|
};
|
|
37
41
|
export type ListNewsFeedsRequest = {
|
|
38
42
|
/** Pushwoosh application code (XXXXX-XXXXX). */
|
|
@@ -50,6 +54,13 @@ export type SetNewsFeedRequest = {
|
|
|
50
54
|
/** http(s) URL of an RSS or Atom feed. */
|
|
51
55
|
url?: string;
|
|
52
56
|
enabled?: boolean;
|
|
57
|
+
/** Minutes between imports, 1..60. Absent keeps the stored value (60 for a new feed). */
|
|
58
|
+
syncIntervalMinutes?: number;
|
|
59
|
+
/**
|
|
60
|
+
* Journey to start for every new article: the application's own, with an API-based entry point.
|
|
61
|
+
* Absent keeps the stored link, empty removes it.
|
|
62
|
+
*/
|
|
63
|
+
journeyUuid?: string;
|
|
53
64
|
};
|
|
54
65
|
export type SetNewsFeedResponse = {
|
|
55
66
|
feed: NewsFeed;
|