@aepstore-dev/contracts 1.27.0 → 1.28.0
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/gen/taxonomy.ts +34 -0
- package/gen/upload.ts +4 -0
- package/package.json +1 -1
- package/proto/taxonomy.proto +17 -0
- package/proto/upload.proto +3 -1
package/gen/taxonomy.ts
CHANGED
|
@@ -86,6 +86,21 @@ export interface ApplicationResponse {
|
|
|
86
86
|
application: Application | undefined;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
+
export interface CreateIconUploadUrlRequest {
|
|
90
|
+
fileName: string;
|
|
91
|
+
/** e.g. image/svg+xml */
|
|
92
|
+
mimeType: string;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export interface IconUploadUrlResponse {
|
|
96
|
+
/** presigned PUT URL — client uploads the SVG bytes here */
|
|
97
|
+
uploadUrl: string;
|
|
98
|
+
/** final public URL to store as Application.iconUrl */
|
|
99
|
+
iconUrl: string;
|
|
100
|
+
fileKey: string;
|
|
101
|
+
expiresIn: number;
|
|
102
|
+
}
|
|
103
|
+
|
|
89
104
|
export const TAXONOMY_V1_PACKAGE_NAME = "taxonomy.v1";
|
|
90
105
|
|
|
91
106
|
export interface TaxonomyServiceClient {
|
|
@@ -100,6 +115,14 @@ export interface TaxonomyServiceClient {
|
|
|
100
115
|
createApplication(request: CreateApplicationRequest): Observable<ApplicationResponse>;
|
|
101
116
|
|
|
102
117
|
updateApplication(request: UpdateApplicationRequest): Observable<ApplicationResponse>;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Mint a presigned PUT URL for an application icon SVG (proxies upload-service,
|
|
121
|
+
* kind=ICON → public/icons/). Client PUTs the bytes to upload_url, then passes
|
|
122
|
+
* icon_url to Create/UpdateApplication.
|
|
123
|
+
*/
|
|
124
|
+
|
|
125
|
+
createIconUploadUrl(request: CreateIconUploadUrlRequest): Observable<IconUploadUrlResponse>;
|
|
103
126
|
}
|
|
104
127
|
|
|
105
128
|
export interface TaxonomyServiceController {
|
|
@@ -124,6 +147,16 @@ export interface TaxonomyServiceController {
|
|
|
124
147
|
updateApplication(
|
|
125
148
|
request: UpdateApplicationRequest,
|
|
126
149
|
): Promise<ApplicationResponse> | Observable<ApplicationResponse> | ApplicationResponse;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Mint a presigned PUT URL for an application icon SVG (proxies upload-service,
|
|
153
|
+
* kind=ICON → public/icons/). Client PUTs the bytes to upload_url, then passes
|
|
154
|
+
* icon_url to Create/UpdateApplication.
|
|
155
|
+
*/
|
|
156
|
+
|
|
157
|
+
createIconUploadUrl(
|
|
158
|
+
request: CreateIconUploadUrlRequest,
|
|
159
|
+
): Promise<IconUploadUrlResponse> | Observable<IconUploadUrlResponse> | IconUploadUrlResponse;
|
|
127
160
|
}
|
|
128
161
|
|
|
129
162
|
export function TaxonomyServiceControllerMethods() {
|
|
@@ -135,6 +168,7 @@ export function TaxonomyServiceControllerMethods() {
|
|
|
135
168
|
"createCategory",
|
|
136
169
|
"createApplication",
|
|
137
170
|
"updateApplication",
|
|
171
|
+
"createIconUploadUrl",
|
|
138
172
|
];
|
|
139
173
|
for (const method of grpcMethods) {
|
|
140
174
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
package/gen/upload.ts
CHANGED
|
@@ -21,6 +21,8 @@ export enum UploadKind {
|
|
|
21
21
|
UPLOAD_KIND_MEDIA = 2,
|
|
22
22
|
UPLOAD_KIND_AVATAR = 3,
|
|
23
23
|
UPLOAD_KIND_BANNER = 4,
|
|
24
|
+
/** UPLOAD_KIND_ICON - taxonomy program/app brand icons → public/icons/ */
|
|
25
|
+
UPLOAD_KIND_ICON = 5,
|
|
24
26
|
UNRECOGNIZED = -1,
|
|
25
27
|
}
|
|
26
28
|
|
|
@@ -97,6 +99,8 @@ export interface CreateUploadUrlResponse {
|
|
|
97
99
|
url: string;
|
|
98
100
|
fileKey: string;
|
|
99
101
|
expiresIn: number;
|
|
102
|
+
/** final object URL (only meaningful for public kinds) */
|
|
103
|
+
publicUrl: string;
|
|
100
104
|
}
|
|
101
105
|
|
|
102
106
|
export interface SignedUrlRequest {
|
package/package.json
CHANGED
package/proto/taxonomy.proto
CHANGED
|
@@ -10,6 +10,11 @@ service TaxonomyService {
|
|
|
10
10
|
rpc CreateCategory(CreateCategoryRequest) returns (CategoryResponse);
|
|
11
11
|
rpc CreateApplication(CreateApplicationRequest) returns (ApplicationResponse);
|
|
12
12
|
rpc UpdateApplication(UpdateApplicationRequest) returns (ApplicationResponse);
|
|
13
|
+
|
|
14
|
+
// Mint a presigned PUT URL for an application icon SVG (proxies upload-service,
|
|
15
|
+
// kind=ICON → public/icons/). Client PUTs the bytes to upload_url, then passes
|
|
16
|
+
// icon_url to Create/UpdateApplication.
|
|
17
|
+
rpc CreateIconUploadUrl(CreateIconUploadUrlRequest) returns (IconUploadUrlResponse);
|
|
13
18
|
}
|
|
14
19
|
|
|
15
20
|
message Category {
|
|
@@ -86,3 +91,15 @@ message UpdateApplicationRequest {
|
|
|
86
91
|
message ApplicationResponse {
|
|
87
92
|
Application application = 1;
|
|
88
93
|
}
|
|
94
|
+
|
|
95
|
+
message CreateIconUploadUrlRequest {
|
|
96
|
+
string file_name = 1;
|
|
97
|
+
string mime_type = 2; // e.g. image/svg+xml
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
message IconUploadUrlResponse {
|
|
101
|
+
string upload_url = 1; // presigned PUT URL — client uploads the SVG bytes here
|
|
102
|
+
string icon_url = 2; // final public URL to store as Application.iconUrl
|
|
103
|
+
string file_key = 3;
|
|
104
|
+
int32 expires_in = 4;
|
|
105
|
+
}
|
package/proto/upload.proto
CHANGED
|
@@ -41,6 +41,7 @@ enum UploadKind {
|
|
|
41
41
|
UPLOAD_KIND_MEDIA = 2;
|
|
42
42
|
UPLOAD_KIND_AVATAR = 3;
|
|
43
43
|
UPLOAD_KIND_BANNER = 4;
|
|
44
|
+
UPLOAD_KIND_ICON = 5; // taxonomy program/app brand icons → public/icons/
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
message Ok {
|
|
@@ -111,9 +112,10 @@ message CreateUploadUrlRequest {
|
|
|
111
112
|
}
|
|
112
113
|
|
|
113
114
|
message CreateUploadUrlResponse {
|
|
114
|
-
string url = 1;
|
|
115
|
+
string url = 1; // presigned PUT URL (client PUTs the whole file)
|
|
115
116
|
string file_key = 2;
|
|
116
117
|
int32 expires_in = 3;
|
|
118
|
+
string public_url = 4; // final object URL (only meaningful for public kinds)
|
|
117
119
|
}
|
|
118
120
|
|
|
119
121
|
// ---------------------------------------------------------------------------
|