@barumetric/contracts 1.3.21 → 1.3.23

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 +1 @@
1
- export * from "./top-up.interface";
1
+ export * from "./process-images.interface";
@@ -14,4 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./top-up.interface"), exports);
17
+ __exportStar(require("./process-images.interface"), exports);
@@ -0,0 +1,10 @@
1
+ export interface TopUpBalanceEvent {
2
+ tempId: string;
3
+ images: Array<{
4
+ fileName: string;
5
+ folder: string;
6
+ contentType: string;
7
+ data: Buffer;
8
+ }>;
9
+ listingId?: string;
10
+ }
@@ -0,0 +1 @@
1
+ export * from "./top-up.interface";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./top-up.interface"), exports);
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,5 @@
1
1
  export * from "./account";
2
2
  export * from "./auth";
3
3
  export * from "./balance";
4
+ export * from "./listings";
4
5
  export * from "./payment";
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./account"), exports);
18
18
  __exportStar(require("./auth"), exports);
19
19
  __exportStar(require("./balance"), exports);
20
+ __exportStar(require("./listings"), exports);
20
21
  __exportStar(require("./payment"), exports);
@@ -0,0 +1,62 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.11.0
4
+ // protoc v3.21.12
5
+ // source: images.proto
6
+
7
+ /* eslint-disable */
8
+ import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
9
+ import { Observable } from "rxjs";
10
+ import { Timestamp } from "./google/protobuf/timestamp";
11
+
12
+ export const protobufPackage = "images.v1";
13
+
14
+ export interface GetStatusImagesRequest {
15
+ tempId: string;
16
+ }
17
+
18
+ export interface GetStatusImagesResponse {
19
+ tempId: string;
20
+ status: string;
21
+ listingId: string;
22
+ imageCount: number;
23
+ results: ImageProcessing[];
24
+ createdAt: Timestamp | undefined;
25
+ completedAt: Timestamp | undefined;
26
+ }
27
+
28
+ export interface ImageProcessing {
29
+ fileName: string;
30
+ url?: string | undefined;
31
+ status: string;
32
+ error: string;
33
+ }
34
+
35
+ export const IMAGES_V1_PACKAGE_NAME = "images.v1";
36
+
37
+ export interface ImagesServiceClient {
38
+ getStatusImages(request: GetStatusImagesRequest): Observable<GetStatusImagesResponse>;
39
+ }
40
+
41
+ export interface ImagesServiceController {
42
+ getStatusImages(
43
+ request: GetStatusImagesRequest,
44
+ ): Promise<GetStatusImagesResponse> | Observable<GetStatusImagesResponse> | GetStatusImagesResponse;
45
+ }
46
+
47
+ export function ImagesServiceControllerMethods() {
48
+ return function (constructor: Function) {
49
+ const grpcMethods: string[] = ["getStatusImages"];
50
+ for (const method of grpcMethods) {
51
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
52
+ GrpcMethod("ImagesService", method)(constructor.prototype[method], method, descriptor);
53
+ }
54
+ const grpcStreamMethods: string[] = [];
55
+ for (const method of grpcStreamMethods) {
56
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
57
+ GrpcStreamMethod("ImagesService", method)(constructor.prototype[method], method, descriptor);
58
+ }
59
+ };
60
+ }
61
+
62
+ export const IMAGES_SERVICE_NAME = "ImagesService";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barumetric/contracts",
3
- "version": "1.3.21",
3
+ "version": "1.3.23",
4
4
  "description": "Protobuf definitions and generated TypeScript types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -0,0 +1,31 @@
1
+ syntax = "proto3";
2
+
3
+ package images.v1;
4
+
5
+ import "google/protobuf/timestamp.proto";
6
+
7
+
8
+ service ImagesService {
9
+ rpc GetStatusImages (GetStatusImagesRequest) returns (GetStatusImagesResponse);
10
+ }
11
+
12
+ message GetStatusImagesRequest {
13
+ string temp_id = 1;
14
+ }
15
+
16
+ message GetStatusImagesResponse {
17
+ string temp_id = 1;
18
+ string status = 2;
19
+ string listing_id = 3;
20
+ int32 image_count = 4;
21
+ repeated ImageProcessing results = 5;
22
+ google.protobuf.Timestamp created_at = 6;
23
+ google.protobuf.Timestamp completed_at = 7;
24
+ }
25
+
26
+ message ImageProcessing {
27
+ string file_name = 1;
28
+ optional string url = 2;
29
+ string status = 3;
30
+ string error = 4;
31
+ }