@platfformx/proto-contracts 1.2.7 → 1.2.8

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,5 +1,5 @@
1
1
  import { Observable } from "rxjs";
2
- export declare const protobufPackage = "product";
2
+ export declare const protobufPackage = "product.v1";
3
3
  export interface CreateProductRequest {
4
4
  title: string;
5
5
  description?: string | undefined;
@@ -54,7 +54,7 @@ export interface ProductResponse {
54
54
  createdAt: string;
55
55
  updatedAt: string;
56
56
  }
57
- export declare const PRODUCT_PACKAGE_NAME = "product";
57
+ export declare const PRODUCT_V1_PACKAGE_NAME = "product.v1";
58
58
  export interface ProductServiceClient {
59
59
  createProduct(request: CreateProductRequest): Observable<ProductResponse>;
60
60
  updateProduct(request: UpdateProductRequest): Observable<ProductResponse>;
@@ -5,12 +5,12 @@
5
5
  // protoc v7.34.0
6
6
  // source: products-service/product.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.PRODUCT_SERVICE_NAME = exports.PRODUCT_PACKAGE_NAME = exports.protobufPackage = void 0;
8
+ exports.PRODUCT_SERVICE_NAME = exports.PRODUCT_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
9
9
  exports.ProductServiceControllerMethods = ProductServiceControllerMethods;
10
10
  /* eslint-disable */
11
11
  const microservices_1 = require("@nestjs/microservices");
12
- exports.protobufPackage = "product";
13
- exports.PRODUCT_PACKAGE_NAME = "product";
12
+ exports.protobufPackage = "product.v1";
13
+ exports.PRODUCT_V1_PACKAGE_NAME = "product.v1";
14
14
  function ProductServiceControllerMethods() {
15
15
  return function (constructor) {
16
16
  const grpcMethods = ["createProduct", "updateProduct", "deleteProduct", "getProduct", "getProducts"];
@@ -0,0 +1,23 @@
1
+ import { Observable } from "rxjs";
2
+ export declare const protobufPackage = "s3_service.v1";
3
+ export interface FilePayload {
4
+ buffer: Uint8Array;
5
+ originalname: string;
6
+ mimetype: string;
7
+ }
8
+ export interface UploadFilesRequest {
9
+ files: FilePayload[];
10
+ folder: string;
11
+ }
12
+ export interface UploadFilesResponse {
13
+ urls: string[];
14
+ }
15
+ export declare const S3_SERVICE_V1_PACKAGE_NAME = "s3_service.v1";
16
+ export interface S3ServiceClient {
17
+ uploadFiles(request: UploadFilesRequest): Observable<UploadFilesResponse>;
18
+ }
19
+ export interface S3ServiceController {
20
+ uploadFiles(request: UploadFilesRequest): Promise<UploadFilesResponse> | Observable<UploadFilesResponse> | UploadFilesResponse;
21
+ }
22
+ export declare function S3ServiceControllerMethods(): (constructor: Function) => void;
23
+ export declare const S3_SERVICE_NAME = "S3Service";
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.11.8
5
+ // protoc v7.34.0
6
+ // source: s3-service/s3.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.S3_SERVICE_NAME = exports.S3_SERVICE_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
9
+ exports.S3ServiceControllerMethods = S3ServiceControllerMethods;
10
+ /* eslint-disable */
11
+ const microservices_1 = require("@nestjs/microservices");
12
+ exports.protobufPackage = "s3_service.v1";
13
+ exports.S3_SERVICE_V1_PACKAGE_NAME = "s3_service.v1";
14
+ function S3ServiceControllerMethods() {
15
+ return function (constructor) {
16
+ const grpcMethods = ["uploadFiles"];
17
+ for (const method of grpcMethods) {
18
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
19
+ (0, microservices_1.GrpcMethod)("S3Service", method)(constructor.prototype[method], method, descriptor);
20
+ }
21
+ const grpcStreamMethods = [];
22
+ for (const method of grpcStreamMethods) {
23
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
24
+ (0, microservices_1.GrpcStreamMethod)("S3Service", method)(constructor.prototype[method], method, descriptor);
25
+ }
26
+ };
27
+ }
28
+ exports.S3_SERVICE_NAME = "S3Service";
package/dist/index.d.ts CHANGED
@@ -2,5 +2,6 @@ export * from './paths/index';
2
2
  export * from './paths/proto-paths';
3
3
  export { OAuthProvider } from './gen/ts/auth-service/auth';
4
4
  export * as Auth from './gen/ts/auth-service/auth';
5
+ export * as S3 from './gen/ts/s3-service/s3';
5
6
  export * as Account from './gen/ts/users-service/account';
6
7
  export * as Product from './gen/ts/products-service/product';
package/dist/index.js CHANGED
@@ -36,11 +36,12 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  };
37
37
  })();
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.Product = exports.Account = exports.Auth = exports.OAuthProvider = void 0;
39
+ exports.Product = exports.Account = exports.S3 = exports.Auth = exports.OAuthProvider = void 0;
40
40
  __exportStar(require("./paths/index"), exports);
41
41
  __exportStar(require("./paths/proto-paths"), exports);
42
42
  var auth_1 = require("./gen/ts/auth-service/auth");
43
43
  Object.defineProperty(exports, "OAuthProvider", { enumerable: true, get: function () { return auth_1.OAuthProvider; } });
44
44
  exports.Auth = __importStar(require("./gen/ts/auth-service/auth"));
45
+ exports.S3 = __importStar(require("./gen/ts/s3-service/s3"));
45
46
  exports.Account = __importStar(require("./gen/ts/users-service/account"));
46
47
  exports.Product = __importStar(require("./gen/ts/products-service/product"));
@@ -2,4 +2,5 @@ export declare const PROTO_PATHS: {
2
2
  readonly ACCOUNT: string;
3
3
  readonly AUTH: string;
4
4
  readonly PRODUCT: string;
5
+ readonly S3: string;
5
6
  };
@@ -6,4 +6,5 @@ exports.PROTO_PATHS = {
6
6
  ACCOUNT: (0, path_1.join)(__dirname, '../../proto/users-service/account.proto'),
7
7
  AUTH: (0, path_1.join)(__dirname, '../../proto/auth-service/auth.proto'),
8
8
  PRODUCT: (0, path_1.join)(__dirname, '../../proto/products-service/product.proto'),
9
+ S3: (0, path_1.join)(__dirname, '../../proto/s3-service/s3.proto'),
9
10
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platfformx/proto-contracts",
3
- "version": "1.2.7",
3
+ "version": "1.2.8",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,6 +1,6 @@
1
1
  syntax = "proto3";
2
2
 
3
- package product;
3
+ package product.v1;
4
4
 
5
5
  service ProductService {
6
6
  rpc CreateProduct (CreateProductRequest) returns (ProductResponse);
@@ -0,0 +1,23 @@
1
+ syntax = "proto3";
2
+
3
+ package s3_service.v1;
4
+
5
+
6
+ service S3Service {
7
+ rpc UploadFiles (UploadFilesRequest) returns (UploadFilesResponse);
8
+ }
9
+
10
+ message FilePayload {
11
+ bytes buffer = 1;
12
+ string originalname = 2;
13
+ string mimetype = 3;
14
+ }
15
+
16
+ message UploadFilesRequest {
17
+ repeated FilePayload files = 1;
18
+ string folder = 2;
19
+ }
20
+
21
+ message UploadFilesResponse {
22
+ repeated string urls = 1;
23
+ }