@aepstore-dev/contracts 1.107.0 → 1.108.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.
@@ -1,105 +1,105 @@
1
- syntax = "proto3";
2
-
3
- package taxonomy.v1;
4
-
5
- service TaxonomyService {
6
- rpc FindAllCategories(Empty) returns (CategoriesListResponse);
7
- rpc FindAllApplications(Empty) returns (ApplicationsListResponse);
8
- rpc FindAllTags(QueryTagsRequest) returns (TagsListResponse);
9
-
10
- rpc CreateCategory(CreateCategoryRequest) returns (CategoryResponse);
11
- rpc CreateApplication(CreateApplicationRequest) returns (ApplicationResponse);
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);
18
- }
19
-
20
- message Category {
21
- string id = 1;
22
- string name = 2;
23
- string description = 3;
24
- string created_at = 4;
25
- string updated_at = 5;
26
- }
27
-
28
- message Application {
29
- string id = 1;
30
- string name = 2;
31
- string description = 3;
32
- string created_at = 4;
33
- string updated_at = 5;
34
- string icon_url = 6; // public S3 URL to brand SVG (admin-set), empty if none
35
- }
36
-
37
- message Tag {
38
- string id = 1;
39
- string name = 2;
40
- }
41
-
42
- // =================================================================
43
- // Requests / responses
44
- // =================================================================
45
-
46
- message Empty {}
47
-
48
- message CategoriesListResponse {
49
- repeated Category items = 1;
50
- }
51
-
52
- message ApplicationsListResponse {
53
- repeated Application items = 1;
54
- }
55
-
56
- message QueryTagsRequest {
57
- string search = 1;
58
- int32 page = 2;
59
- int32 limit = 3;
60
- }
61
-
62
- message TagsListResponse {
63
- repeated Tag items = 1;
64
- int32 total = 2;
65
- int32 page = 3;
66
- int32 limit = 4;
67
- }
68
-
69
- message CreateCategoryRequest {
70
- string name = 1;
71
- string description = 2;
72
- }
73
-
74
- message CategoryResponse {
75
- Category category = 1;
76
- }
77
-
78
- message CreateApplicationRequest {
79
- string name = 1;
80
- string description = 2;
81
- string icon_url = 3;
82
- }
83
-
84
- message UpdateApplicationRequest {
85
- string id = 1;
86
- string name = 2; // optional — empty keeps current
87
- string description = 3; // optional
88
- string icon_url = 4; // optional — empty keeps current
89
- }
90
-
91
- message ApplicationResponse {
92
- Application application = 1;
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
- }
1
+ syntax = "proto3";
2
+
3
+ package taxonomy.v1;
4
+
5
+ service TaxonomyService {
6
+ rpc FindAllCategories(Empty) returns (CategoriesListResponse);
7
+ rpc FindAllApplications(Empty) returns (ApplicationsListResponse);
8
+ rpc FindAllTags(QueryTagsRequest) returns (TagsListResponse);
9
+
10
+ rpc CreateCategory(CreateCategoryRequest) returns (CategoryResponse);
11
+ rpc CreateApplication(CreateApplicationRequest) returns (ApplicationResponse);
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);
18
+ }
19
+
20
+ message Category {
21
+ string id = 1;
22
+ string name = 2;
23
+ string description = 3;
24
+ string created_at = 4;
25
+ string updated_at = 5;
26
+ }
27
+
28
+ message Application {
29
+ string id = 1;
30
+ string name = 2;
31
+ string description = 3;
32
+ string created_at = 4;
33
+ string updated_at = 5;
34
+ string icon_url = 6; // public S3 URL to brand SVG (admin-set), empty if none
35
+ }
36
+
37
+ message Tag {
38
+ string id = 1;
39
+ string name = 2;
40
+ }
41
+
42
+ // =================================================================
43
+ // Requests / responses
44
+ // =================================================================
45
+
46
+ message Empty {}
47
+
48
+ message CategoriesListResponse {
49
+ repeated Category items = 1;
50
+ }
51
+
52
+ message ApplicationsListResponse {
53
+ repeated Application items = 1;
54
+ }
55
+
56
+ message QueryTagsRequest {
57
+ string search = 1;
58
+ int32 page = 2;
59
+ int32 limit = 3;
60
+ }
61
+
62
+ message TagsListResponse {
63
+ repeated Tag items = 1;
64
+ int32 total = 2;
65
+ int32 page = 3;
66
+ int32 limit = 4;
67
+ }
68
+
69
+ message CreateCategoryRequest {
70
+ string name = 1;
71
+ string description = 2;
72
+ }
73
+
74
+ message CategoryResponse {
75
+ Category category = 1;
76
+ }
77
+
78
+ message CreateApplicationRequest {
79
+ string name = 1;
80
+ string description = 2;
81
+ string icon_url = 3;
82
+ }
83
+
84
+ message UpdateApplicationRequest {
85
+ string id = 1;
86
+ string name = 2; // optional — empty keeps current
87
+ string description = 3; // optional
88
+ string icon_url = 4; // optional — empty keeps current
89
+ }
90
+
91
+ message ApplicationResponse {
92
+ Application application = 1;
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
+ }
@@ -1,171 +1,210 @@
1
- syntax = "proto3";
2
-
3
- package upload.v1;
4
-
5
- // Thin signing service. File bytes NEVER pass through this service — clients
6
- // upload/download directly to/from S3 (Yandex Object Storage) using presigned
7
- // URLs this service mints. Memory/bandwidth flat regardless of file size.
8
- //
9
- // Large files (product deliverables, up to ~1GB) use the multipart flow:
10
- // CreateMultipartUpload → (SignPart × N, client PUTs each part to S3) →
11
- // CompleteMultipartUpload (or AbortMultipartUpload on failure)
12
- //
13
- // Small files (preview images, avatars) use the single-PUT flow: CreateUploadUrl.
14
- //
15
- // Downloads are gated elsewhere (products-service verifies purchase, then calls
16
- // GenerateSignedUrl). This service does not know about purchases.
1
+ syntax = "proto3";
2
+
3
+ package upload.v1;
4
+
5
+ // Thin signing service. File bytes NEVER pass through this service — clients
6
+ // upload/download directly to/from S3 (Yandex Object Storage) using presigned
7
+ // URLs this service mints. Memory/bandwidth flat regardless of file size.
8
+ //
9
+ // Large files (product deliverables, up to ~1GB) use the multipart flow:
10
+ // CreateMultipartUpload → (SignPart × N, client PUTs each part to S3) →
11
+ // CompleteMultipartUpload (or AbortMultipartUpload on failure)
12
+ //
13
+ // Small files (preview images, avatars) use the single-PUT flow: CreateUploadUrl.
14
+ //
15
+ // Downloads are gated elsewhere (products-service verifies purchase, then calls
16
+ // GenerateSignedUrl). This service does not know about purchases.
17
17
  service UploadService {
18
- rpc CreateMultipartUpload(CreateMultipartUploadRequest) returns (CreateMultipartUploadResponse);
19
- rpc SignPart(SignPartRequest) returns (SignPartResponse);
20
- rpc CompleteMultipartUpload(CompleteMultipartUploadRequest) returns (CompleteMultipartUploadResponse);
21
- rpc AbortMultipartUpload(AbortMultipartUploadRequest) returns (Ok);
22
-
23
- rpc CreateUploadUrl(CreateUploadUrlRequest) returns (CreateUploadUrlResponse);
24
-
25
- rpc GenerateSignedUrl(SignedUrlRequest) returns (SignedUrlResponse);
26
-
27
- // Verify an object actually exists (and read its size/type). Used by
28
- // products-service to confirm a client-echoed fileKey points at a real
29
- // uploaded object before persisting attachment metadata.
30
- rpc HeadObject(HeadObjectRequest) returns (HeadObjectResponse);
31
-
32
- rpc DeleteObject(DeleteObjectRequest) returns (Ok);
33
-
34
- // List objects under a prefix (paginated) — for GC/reconciliation jobs
35
- // (e.g. tasks-service sweeping orphaned uploads). Not for user traffic.
36
- rpc ListObjects(ListObjectsRequest) returns (ListObjectsResponse);
37
- }
38
-
39
- message ListObjectsRequest {
40
- string prefix = 1;
41
- string continuation_token = 2; // empty for the first page
42
- }
43
-
44
- message StoredObject {
45
- string key = 1;
46
- string last_modified = 2; // ISO 8601
47
- }
48
-
49
- message ListObjectsResponse {
50
- repeated StoredObject objects = 1;
51
- string next_continuation_token = 2; // empty when there are no more pages
52
- }
53
-
54
- // Determines the object key prefix (and future ACL/privacy policy).
55
- // ATTACHMENT = paid product deliverable (private; presigned GET only after purchase).
56
- // MEDIA / AVATAR / BANNER = preview assets.
57
- enum UploadKind {
58
- UPLOAD_KIND_UNSPECIFIED = 0;
59
- UPLOAD_KIND_ATTACHMENT = 1;
60
- UPLOAD_KIND_MEDIA = 2;
61
- UPLOAD_KIND_AVATAR = 3;
62
- UPLOAD_KIND_BANNER = 4;
63
- UPLOAD_KIND_ICON = 5; // taxonomy program/app brand icons → public/icons/
64
- }
65
-
66
- message Ok {
67
- bool ok = 1;
68
- }
69
-
70
- // ---------------------------------------------------------------------------
71
- // Multipart upload (large files)
72
- // ---------------------------------------------------------------------------
73
-
74
- message CreateMultipartUploadRequest {
75
- string file_name = 1;
76
- string mime_type = 2;
77
- int64 file_size = 3;
78
- UploadKind kind = 4;
79
- string owner_id = 5; // user initiating, for key namespacing + audit
80
- }
81
-
18
+ // Complete single PUT, poll readiness, validate domain metadata.
19
+ rpc CompleteUpload(UploadSessionRequest) returns (UploadSessionResponse);
20
+ rpc GetUploadSession(UploadSessionRequest) returns (UploadSessionResponse);
21
+ rpc ValidateReadyUpload(ValidateReadyUploadRequest) returns (UploadSessionResponse);
22
+ rpc CreateMultipartUpload(CreateMultipartUploadRequest) returns (CreateMultipartUploadResponse);
23
+ rpc SignPart(SignPartRequest) returns (SignPartResponse);
24
+ rpc CompleteMultipartUpload(CompleteMultipartUploadRequest) returns (CompleteMultipartUploadResponse);
25
+ rpc AbortMultipartUpload(AbortMultipartUploadRequest) returns (Ok);
26
+
27
+ rpc CreateUploadUrl(CreateUploadUrlRequest) returns (CreateUploadUrlResponse);
28
+
29
+ rpc GenerateSignedUrl(SignedUrlRequest) returns (SignedUrlResponse);
30
+
31
+ // Verify an object actually exists (and read its size/type). Used by
32
+ // products-service to confirm a client-echoed fileKey points at a real
33
+ // uploaded object before persisting attachment metadata.
34
+ rpc HeadObject(HeadObjectRequest) returns (HeadObjectResponse);
35
+
36
+ rpc DeleteObject(DeleteObjectRequest) returns (Ok);
37
+
38
+ // List objects under a prefix (paginated) — for GC/reconciliation jobs
39
+ // (e.g. tasks-service sweeping orphaned uploads). Not for user traffic.
40
+ rpc ListObjects(ListObjectsRequest) returns (ListObjectsResponse);
41
+ }
42
+
43
+ message ListObjectsRequest {
44
+ string prefix = 1;
45
+ string continuation_token = 2; // empty for the first page
46
+ }
47
+
48
+ message StoredObject {
49
+ string key = 1;
50
+ string last_modified = 2; // ISO 8601
51
+ }
52
+
53
+ message ListObjectsResponse {
54
+ repeated StoredObject objects = 1;
55
+ string next_continuation_token = 2; // empty when there are no more pages
56
+ }
57
+
58
+ // Determines the object key prefix (and future ACL/privacy policy).
59
+ // ATTACHMENT = paid product deliverable (private; presigned GET only after purchase).
60
+ // MEDIA / AVATAR / BANNER = preview assets.
61
+ enum UploadKind {
62
+ UPLOAD_KIND_UNSPECIFIED = 0;
63
+ UPLOAD_KIND_ATTACHMENT = 1;
64
+ UPLOAD_KIND_MEDIA = 2;
65
+ UPLOAD_KIND_AVATAR = 3;
66
+ UPLOAD_KIND_BANNER = 4;
67
+ UPLOAD_KIND_ICON = 5; // taxonomy program/app brand icons → public/icons/
68
+ }
69
+
70
+ message Ok {
71
+ bool ok = 1;
72
+ }
73
+
74
+ // ---------------------------------------------------------------------------
75
+ // Multipart upload (large files)
76
+ // ---------------------------------------------------------------------------
77
+
78
+ message CreateMultipartUploadRequest {
79
+ string file_name = 1;
80
+ string mime_type = 2;
81
+ int64 file_size = 3;
82
+ UploadKind kind = 4;
83
+ string owner_id = 5; // user initiating, for key namespacing + audit
84
+ }
85
+
82
86
  message CreateMultipartUploadResponse {
83
- string upload_id = 1; // S3 multipart UploadId
84
- string file_key = 2; // object key this service generated
85
- int64 part_size = 3; // recommended part size (bytes) the client should slice with
86
- int32 part_count = 4; // number of parts for file_size at part_size
87
- }
88
-
87
+ optional string session_id = 5;
88
+ optional string status = 6;
89
+ string upload_id = 1; // S3 multipart UploadId
90
+ string file_key = 2; // object key this service generated
91
+ int64 part_size = 3; // recommended part size (bytes) the client should slice with
92
+ int32 part_count = 4; // number of parts for file_size at part_size
93
+ }
94
+
89
95
  message SignPartRequest {
90
- string file_key = 1;
91
- string upload_id = 2;
92
- int32 part_number = 3; // 1-based
93
- }
94
-
95
- message SignPartResponse {
96
- string url = 1; // presigned PUT URL for this single part
97
- int32 expires_in = 2;
98
- }
99
-
100
- message CompletedPart {
101
- int32 part_number = 1;
102
- string etag = 2; // ETag the client received in the S3 PUT response header for this part
103
- }
104
-
96
+ optional string owner_id = 4;
97
+ string file_key = 1;
98
+ string upload_id = 2;
99
+ int32 part_number = 3; // 1-based
100
+ }
101
+
102
+ message SignPartResponse {
103
+ string url = 1; // presigned PUT URL for this single part
104
+ int32 expires_in = 2;
105
+ }
106
+
107
+ message CompletedPart {
108
+ int32 part_number = 1;
109
+ string etag = 2; // ETag the client received in the S3 PUT response header for this part
110
+ }
111
+
105
112
  message CompleteMultipartUploadRequest {
106
- string file_key = 1;
107
- string upload_id = 2;
108
- repeated CompletedPart parts = 3;
109
- }
110
-
113
+ optional string owner_id = 4;
114
+ string file_key = 1;
115
+ string upload_id = 2;
116
+ repeated CompletedPart parts = 3;
117
+ }
118
+
111
119
  message CompleteMultipartUploadResponse {
112
- string file_key = 1;
113
- string location = 2; // final object location (internal reference)
114
- int64 file_size = 3;
115
- }
116
-
120
+ optional string session_id = 4;
121
+ optional string status = 5;
122
+ string file_key = 1;
123
+ string location = 2; // final object location (internal reference)
124
+ int64 file_size = 3;
125
+ }
126
+
117
127
  message AbortMultipartUploadRequest {
118
- string file_key = 1;
119
- string upload_id = 2;
120
- }
121
-
122
- // ---------------------------------------------------------------------------
123
- // Single-PUT upload (small files)
124
- // ---------------------------------------------------------------------------
125
-
128
+ optional string owner_id = 3;
129
+ string file_key = 1;
130
+ string upload_id = 2;
131
+ }
132
+
133
+ // ---------------------------------------------------------------------------
134
+ // Single-PUT upload (small files)
135
+ // ---------------------------------------------------------------------------
136
+
126
137
  message CreateUploadUrlRequest {
127
- string file_name = 1;
128
- string mime_type = 2;
129
- UploadKind kind = 3;
130
- string owner_id = 4;
131
- }
132
-
138
+ optional int64 file_size = 5;
139
+ string file_name = 1;
140
+ string mime_type = 2;
141
+ UploadKind kind = 3;
142
+ string owner_id = 4;
143
+ }
144
+
133
145
  message CreateUploadUrlResponse {
134
- string url = 1; // presigned PUT URL (client PUTs the whole file)
135
- string file_key = 2;
136
- int32 expires_in = 3;
137
- string public_url = 4; // final object URL (only meaningful for public kinds)
138
- }
139
-
140
- // ---------------------------------------------------------------------------
141
- // Download
142
- // ---------------------------------------------------------------------------
143
-
144
- message SignedUrlRequest {
146
+ optional string session_id = 5;
147
+ optional string status = 6;
148
+ string url = 1; // presigned PUT URL (client PUTs the whole file)
149
+ string file_key = 2;
150
+ int32 expires_in = 3;
151
+ string public_url = 4; // final object URL (only meaningful for public kinds)
152
+ }
153
+
154
+ // ---------------------------------------------------------------------------
155
+ // Download
156
+ // ---------------------------------------------------------------------------
157
+
158
+ message SignedUrlRequest {
159
+ string file_key = 1;
160
+ int32 expires_in = 2; // optional, default 3600
161
+ string download_file_name = 3; // optional: forces Content-Disposition attachment filename
162
+ }
163
+
164
+ message SignedUrlResponse {
165
+ string signed_url = 1;
166
+ int32 expires_in = 2;
167
+ }
168
+
169
+ message HeadObjectRequest {
170
+ string file_key = 1;
171
+ }
172
+
173
+ message HeadObjectResponse {
174
+ bool exists = 1; // false only when the object is definitively absent (404)
175
+ double size = 2; // bytes (0 when absent)
176
+ string content_type = 3;
177
+ }
178
+
179
+ // ---------------------------------------------------------------------------
180
+ // Cleanup
181
+ // ---------------------------------------------------------------------------
182
+
183
+ message DeleteObjectRequest {
145
184
  string file_key = 1;
146
- int32 expires_in = 2; // optional, default 3600
147
- string download_file_name = 3; // optional: forces Content-Disposition attachment filename
148
185
  }
149
186
 
150
- message SignedUrlResponse {
151
- string signed_url = 1;
152
- int32 expires_in = 2;
187
+ message UploadSessionRequest {
188
+ string session_id = 1;
189
+ string owner_id = 2;
153
190
  }
154
191
 
155
- message HeadObjectRequest {
156
- string file_key = 1;
192
+ message UploadSessionResponse {
193
+ string session_id = 1;
194
+ string status = 2;
195
+ // Final metadata is returned only for READY; quarantine keys are never returned here.
196
+ string storage_key = 3;
197
+ string file_name = 4;
198
+ int64 file_size = 5;
199
+ string mime_type = 6;
200
+ string url = 7;
201
+ string failure_code = 8;
157
202
  }
158
203
 
159
- message HeadObjectResponse {
160
- bool exists = 1; // false only when the object is definitively absent (404)
161
- double size = 2; // bytes (0 when absent)
162
- string content_type = 3;
163
- }
164
-
165
- // ---------------------------------------------------------------------------
166
- // Cleanup
167
- // ---------------------------------------------------------------------------
168
-
169
- message DeleteObjectRequest {
170
- string file_key = 1;
204
+ message ValidateReadyUploadRequest {
205
+ string owner_id = 1;
206
+ string storage_key = 2;
207
+ UploadKind kind = 3;
208
+ optional int64 file_size = 4;
209
+ optional string mime_type = 5;
171
210
  }