@vsniksnet/contracts 1.2.0 → 1.2.2
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/dist/events/auth/account-created.event.d.ts +5 -0
- package/dist/events/auth/account-created.event.js +4 -0
- package/dist/events/auth/index.d.ts +1 -0
- package/dist/events/auth/index.js +1 -0
- package/dist/proto/paths.d.ts +1 -0
- package/dist/proto/paths.js +1 -0
- package/gen/media.ts +56 -0
- package/package.json +1 -1
- package/proto/media.proto +19 -0
package/dist/proto/paths.d.ts
CHANGED
package/dist/proto/paths.js
CHANGED
|
@@ -6,4 +6,5 @@ exports.PROTO_PATHS = {
|
|
|
6
6
|
AUTH: (0, path_1.join)(__dirname, '../../proto/auth.proto'),
|
|
7
7
|
ACCOUNT: (0, path_1.join)(__dirname, '../../proto/account.proto'),
|
|
8
8
|
USERS: (0, path_1.join)(__dirname, '../../proto/users.proto'),
|
|
9
|
+
MEDIA: (0, path_1.join)(__dirname, '../../proto/media.proto'),
|
|
9
10
|
};
|
package/gen/media.ts
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.11.4
|
|
4
|
+
// protoc v6.33.1
|
|
5
|
+
// source: media.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
9
|
+
import { Observable } from "rxjs";
|
|
10
|
+
|
|
11
|
+
export const protobufPackage = "auth.v1";
|
|
12
|
+
|
|
13
|
+
export interface UploadRequest {
|
|
14
|
+
filename: string;
|
|
15
|
+
contentType: string;
|
|
16
|
+
data: Uint8Array;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface UploadResponse {
|
|
20
|
+
path: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const AUTH_V1_PACKAGE_NAME = "auth.v1";
|
|
24
|
+
|
|
25
|
+
/** Media service */
|
|
26
|
+
|
|
27
|
+
export interface MediaServiceClient {
|
|
28
|
+
/** Upload media file */
|
|
29
|
+
|
|
30
|
+
upload(request: UploadRequest): Observable<UploadResponse>;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** Media service */
|
|
34
|
+
|
|
35
|
+
export interface MediaServiceController {
|
|
36
|
+
/** Upload media file */
|
|
37
|
+
|
|
38
|
+
upload(request: UploadRequest): Promise<UploadResponse> | Observable<UploadResponse> | UploadResponse;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function MediaServiceControllerMethods() {
|
|
42
|
+
return function (constructor: Function) {
|
|
43
|
+
const grpcMethods: string[] = ["upload"];
|
|
44
|
+
for (const method of grpcMethods) {
|
|
45
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
46
|
+
GrpcMethod("MediaService", method)(constructor.prototype[method], method, descriptor);
|
|
47
|
+
}
|
|
48
|
+
const grpcStreamMethods: string[] = [];
|
|
49
|
+
for (const method of grpcStreamMethods) {
|
|
50
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
51
|
+
GrpcStreamMethod("MediaService", method)(constructor.prototype[method], method, descriptor);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export const MEDIA_SERVICE_NAME = "MediaService";
|
package/package.json
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package auth.v1;
|
|
4
|
+
|
|
5
|
+
/* Media service */
|
|
6
|
+
service MediaService {
|
|
7
|
+
/* Upload media file */
|
|
8
|
+
rpc Upload (UploadRequest) returns (UploadResponse);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
message UploadRequest {
|
|
12
|
+
string filename = 1;
|
|
13
|
+
string content_type = 2;
|
|
14
|
+
bytes data = 3;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
message UploadResponse {
|
|
18
|
+
string path = 1;
|
|
19
|
+
}
|