@aepstore-dev/contracts 1.26.0 → 1.27.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,78 +1,88 @@
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
- }
13
-
14
- message Category {
15
- string id = 1;
16
- string name = 2;
17
- string description = 3;
18
- string created_at = 4;
19
- string updated_at = 5;
20
- }
21
-
22
- message Application {
23
- string id = 1;
24
- string name = 2;
25
- string description = 3;
26
- string created_at = 4;
27
- string updated_at = 5;
28
- }
29
-
30
- message Tag {
31
- string id = 1;
32
- string name = 2;
33
- }
34
-
35
- // =================================================================
36
- // Requests / responses
37
- // =================================================================
38
-
39
- message Empty {}
40
-
41
- message CategoriesListResponse {
42
- repeated Category items = 1;
43
- }
44
-
45
- message ApplicationsListResponse {
46
- repeated Application items = 1;
47
- }
48
-
49
- message QueryTagsRequest {
50
- string search = 1;
51
- int32 page = 2;
52
- int32 limit = 3;
53
- }
54
-
55
- message TagsListResponse {
56
- repeated Tag items = 1;
57
- int32 total = 2;
58
- int32 page = 3;
59
- int32 limit = 4;
60
- }
61
-
62
- message CreateCategoryRequest {
63
- string name = 1;
64
- string description = 2;
65
- }
66
-
67
- message CategoryResponse {
68
- Category category = 1;
69
- }
70
-
71
- message CreateApplicationRequest {
72
- string name = 1;
73
- string description = 2;
74
- }
75
-
76
- message ApplicationResponse {
77
- Application application = 1;
78
- }
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
+
15
+ message Category {
16
+ string id = 1;
17
+ string name = 2;
18
+ string description = 3;
19
+ string created_at = 4;
20
+ string updated_at = 5;
21
+ }
22
+
23
+ message Application {
24
+ string id = 1;
25
+ string name = 2;
26
+ string description = 3;
27
+ string created_at = 4;
28
+ string updated_at = 5;
29
+ string icon_url = 6; // public S3 URL to brand SVG (admin-set), empty if none
30
+ }
31
+
32
+ message Tag {
33
+ string id = 1;
34
+ string name = 2;
35
+ }
36
+
37
+ // =================================================================
38
+ // Requests / responses
39
+ // =================================================================
40
+
41
+ message Empty {}
42
+
43
+ message CategoriesListResponse {
44
+ repeated Category items = 1;
45
+ }
46
+
47
+ message ApplicationsListResponse {
48
+ repeated Application items = 1;
49
+ }
50
+
51
+ message QueryTagsRequest {
52
+ string search = 1;
53
+ int32 page = 2;
54
+ int32 limit = 3;
55
+ }
56
+
57
+ message TagsListResponse {
58
+ repeated Tag items = 1;
59
+ int32 total = 2;
60
+ int32 page = 3;
61
+ int32 limit = 4;
62
+ }
63
+
64
+ message CreateCategoryRequest {
65
+ string name = 1;
66
+ string description = 2;
67
+ }
68
+
69
+ message CategoryResponse {
70
+ Category category = 1;
71
+ }
72
+
73
+ message CreateApplicationRequest {
74
+ string name = 1;
75
+ string description = 2;
76
+ string icon_url = 3;
77
+ }
78
+
79
+ message UpdateApplicationRequest {
80
+ string id = 1;
81
+ string name = 2; // optional — empty keeps current
82
+ string description = 3; // optional
83
+ string icon_url = 4; // optional — empty keeps current
84
+ }
85
+
86
+ message ApplicationResponse {
87
+ Application application = 1;
88
+ }
@@ -1,150 +1,150 @@
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
- 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
-
35
- // Determines the object key prefix (and future ACL/privacy policy).
36
- // ATTACHMENT = paid product deliverable (private; presigned GET only after purchase).
37
- // MEDIA / AVATAR / BANNER = preview assets.
38
- enum UploadKind {
39
- UPLOAD_KIND_UNSPECIFIED = 0;
40
- UPLOAD_KIND_ATTACHMENT = 1;
41
- UPLOAD_KIND_MEDIA = 2;
42
- UPLOAD_KIND_AVATAR = 3;
43
- UPLOAD_KIND_BANNER = 4;
44
- }
45
-
46
- message Ok {
47
- bool ok = 1;
48
- }
49
-
50
- // ---------------------------------------------------------------------------
51
- // Multipart upload (large files)
52
- // ---------------------------------------------------------------------------
53
-
54
- message CreateMultipartUploadRequest {
55
- string file_name = 1;
56
- string mime_type = 2;
57
- int64 file_size = 3;
58
- UploadKind kind = 4;
59
- string owner_id = 5; // user initiating, for key namespacing + audit
60
- }
61
-
62
- message CreateMultipartUploadResponse {
63
- string upload_id = 1; // S3 multipart UploadId
64
- string file_key = 2; // object key this service generated
65
- int64 part_size = 3; // recommended part size (bytes) the client should slice with
66
- int32 part_count = 4; // number of parts for file_size at part_size
67
- }
68
-
69
- message SignPartRequest {
70
- string file_key = 1;
71
- string upload_id = 2;
72
- int32 part_number = 3; // 1-based
73
- }
74
-
75
- message SignPartResponse {
76
- string url = 1; // presigned PUT URL for this single part
77
- int32 expires_in = 2;
78
- }
79
-
80
- message CompletedPart {
81
- int32 part_number = 1;
82
- string etag = 2; // ETag the client received in the S3 PUT response header for this part
83
- }
84
-
85
- message CompleteMultipartUploadRequest {
86
- string file_key = 1;
87
- string upload_id = 2;
88
- repeated CompletedPart parts = 3;
89
- }
90
-
91
- message CompleteMultipartUploadResponse {
92
- string file_key = 1;
93
- string location = 2; // final object location (internal reference)
94
- int64 file_size = 3;
95
- }
96
-
97
- message AbortMultipartUploadRequest {
98
- string file_key = 1;
99
- string upload_id = 2;
100
- }
101
-
102
- // ---------------------------------------------------------------------------
103
- // Single-PUT upload (small files)
104
- // ---------------------------------------------------------------------------
105
-
106
- message CreateUploadUrlRequest {
107
- string file_name = 1;
108
- string mime_type = 2;
109
- UploadKind kind = 3;
110
- string owner_id = 4;
111
- }
112
-
113
- message CreateUploadUrlResponse {
114
- string url = 1; // presigned PUT URL (client PUTs the whole file)
115
- string file_key = 2;
116
- int32 expires_in = 3;
117
- }
118
-
119
- // ---------------------------------------------------------------------------
120
- // Download
121
- // ---------------------------------------------------------------------------
122
-
123
- message SignedUrlRequest {
124
- string file_key = 1;
125
- int32 expires_in = 2; // optional, default 3600
126
- string download_file_name = 3; // optional: forces Content-Disposition attachment filename
127
- }
128
-
129
- message SignedUrlResponse {
130
- string signed_url = 1;
131
- int32 expires_in = 2;
132
- }
133
-
134
- message HeadObjectRequest {
135
- string file_key = 1;
136
- }
137
-
138
- message HeadObjectResponse {
139
- bool exists = 1; // false only when the object is definitively absent (404)
140
- double size = 2; // bytes (0 when absent)
141
- string content_type = 3;
142
- }
143
-
144
- // ---------------------------------------------------------------------------
145
- // Cleanup
146
- // ---------------------------------------------------------------------------
147
-
148
- message DeleteObjectRequest {
149
- string file_key = 1;
150
- }
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
+ 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
+
35
+ // Determines the object key prefix (and future ACL/privacy policy).
36
+ // ATTACHMENT = paid product deliverable (private; presigned GET only after purchase).
37
+ // MEDIA / AVATAR / BANNER = preview assets.
38
+ enum UploadKind {
39
+ UPLOAD_KIND_UNSPECIFIED = 0;
40
+ UPLOAD_KIND_ATTACHMENT = 1;
41
+ UPLOAD_KIND_MEDIA = 2;
42
+ UPLOAD_KIND_AVATAR = 3;
43
+ UPLOAD_KIND_BANNER = 4;
44
+ }
45
+
46
+ message Ok {
47
+ bool ok = 1;
48
+ }
49
+
50
+ // ---------------------------------------------------------------------------
51
+ // Multipart upload (large files)
52
+ // ---------------------------------------------------------------------------
53
+
54
+ message CreateMultipartUploadRequest {
55
+ string file_name = 1;
56
+ string mime_type = 2;
57
+ int64 file_size = 3;
58
+ UploadKind kind = 4;
59
+ string owner_id = 5; // user initiating, for key namespacing + audit
60
+ }
61
+
62
+ message CreateMultipartUploadResponse {
63
+ string upload_id = 1; // S3 multipart UploadId
64
+ string file_key = 2; // object key this service generated
65
+ int64 part_size = 3; // recommended part size (bytes) the client should slice with
66
+ int32 part_count = 4; // number of parts for file_size at part_size
67
+ }
68
+
69
+ message SignPartRequest {
70
+ string file_key = 1;
71
+ string upload_id = 2;
72
+ int32 part_number = 3; // 1-based
73
+ }
74
+
75
+ message SignPartResponse {
76
+ string url = 1; // presigned PUT URL for this single part
77
+ int32 expires_in = 2;
78
+ }
79
+
80
+ message CompletedPart {
81
+ int32 part_number = 1;
82
+ string etag = 2; // ETag the client received in the S3 PUT response header for this part
83
+ }
84
+
85
+ message CompleteMultipartUploadRequest {
86
+ string file_key = 1;
87
+ string upload_id = 2;
88
+ repeated CompletedPart parts = 3;
89
+ }
90
+
91
+ message CompleteMultipartUploadResponse {
92
+ string file_key = 1;
93
+ string location = 2; // final object location (internal reference)
94
+ int64 file_size = 3;
95
+ }
96
+
97
+ message AbortMultipartUploadRequest {
98
+ string file_key = 1;
99
+ string upload_id = 2;
100
+ }
101
+
102
+ // ---------------------------------------------------------------------------
103
+ // Single-PUT upload (small files)
104
+ // ---------------------------------------------------------------------------
105
+
106
+ message CreateUploadUrlRequest {
107
+ string file_name = 1;
108
+ string mime_type = 2;
109
+ UploadKind kind = 3;
110
+ string owner_id = 4;
111
+ }
112
+
113
+ message CreateUploadUrlResponse {
114
+ string url = 1; // presigned PUT URL (client PUTs the whole file)
115
+ string file_key = 2;
116
+ int32 expires_in = 3;
117
+ }
118
+
119
+ // ---------------------------------------------------------------------------
120
+ // Download
121
+ // ---------------------------------------------------------------------------
122
+
123
+ message SignedUrlRequest {
124
+ string file_key = 1;
125
+ int32 expires_in = 2; // optional, default 3600
126
+ string download_file_name = 3; // optional: forces Content-Disposition attachment filename
127
+ }
128
+
129
+ message SignedUrlResponse {
130
+ string signed_url = 1;
131
+ int32 expires_in = 2;
132
+ }
133
+
134
+ message HeadObjectRequest {
135
+ string file_key = 1;
136
+ }
137
+
138
+ message HeadObjectResponse {
139
+ bool exists = 1; // false only when the object is definitively absent (404)
140
+ double size = 2; // bytes (0 when absent)
141
+ string content_type = 3;
142
+ }
143
+
144
+ // ---------------------------------------------------------------------------
145
+ // Cleanup
146
+ // ---------------------------------------------------------------------------
147
+
148
+ message DeleteObjectRequest {
149
+ string file_key = 1;
150
+ }