@platfformx/proto-contracts 1.4.9 → 1.4.11

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.
@@ -10,16 +10,25 @@ export interface CreateOrderResponse {
10
10
  status: string;
11
11
  clientSecret: string;
12
12
  }
13
+ export interface UpdateOrderStatusRequest {
14
+ orderId: string;
15
+ status: string;
16
+ }
17
+ export interface UpdateOrderStatusResponse {
18
+ ok: boolean;
19
+ }
13
20
  export interface OrderItem {
14
21
  productId: string;
15
22
  quantity: number;
16
23
  }
17
24
  export declare const ORDER_V1_PACKAGE_NAME = "order.v1";
18
- export interface OrderSeriveClient {
25
+ export interface OrderServiceClient {
19
26
  createOrder(request: CreateOrderRequest): Observable<CreateOrderResponse>;
27
+ updateOrderStatus(request: UpdateOrderStatusRequest): Observable<UpdateOrderStatusResponse>;
20
28
  }
21
- export interface OrderSeriveController {
29
+ export interface OrderServiceController {
22
30
  createOrder(request: CreateOrderRequest): Promise<CreateOrderResponse> | Observable<CreateOrderResponse> | CreateOrderResponse;
31
+ updateOrderStatus(request: UpdateOrderStatusRequest): Promise<UpdateOrderStatusResponse> | Observable<UpdateOrderStatusResponse> | UpdateOrderStatusResponse;
23
32
  }
24
- export declare function OrderSeriveControllerMethods(): (constructor: Function) => void;
25
- export declare const ORDER_SERIVE_SERVICE_NAME = "OrderSerive";
33
+ export declare function OrderServiceControllerMethods(): (constructor: Function) => void;
34
+ export declare const ORDER_SERVICE_NAME = "OrderService";
@@ -5,24 +5,24 @@
5
5
  // protoc v7.34.0
6
6
  // source: order-service/order.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.ORDER_SERIVE_SERVICE_NAME = exports.ORDER_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
9
- exports.OrderSeriveControllerMethods = OrderSeriveControllerMethods;
8
+ exports.ORDER_SERVICE_NAME = exports.ORDER_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
9
+ exports.OrderServiceControllerMethods = OrderServiceControllerMethods;
10
10
  /* eslint-disable */
11
11
  const microservices_1 = require("@nestjs/microservices");
12
12
  exports.protobufPackage = "order.v1";
13
13
  exports.ORDER_V1_PACKAGE_NAME = "order.v1";
14
- function OrderSeriveControllerMethods() {
14
+ function OrderServiceControllerMethods() {
15
15
  return function (constructor) {
16
- const grpcMethods = ["createOrder"];
16
+ const grpcMethods = ["createOrder", "updateOrderStatus"];
17
17
  for (const method of grpcMethods) {
18
18
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
19
- (0, microservices_1.GrpcMethod)("OrderSerive", method)(constructor.prototype[method], method, descriptor);
19
+ (0, microservices_1.GrpcMethod)("OrderService", method)(constructor.prototype[method], method, descriptor);
20
20
  }
21
21
  const grpcStreamMethods = [];
22
22
  for (const method of grpcStreamMethods) {
23
23
  const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
24
- (0, microservices_1.GrpcStreamMethod)("OrderSerive", method)(constructor.prototype[method], method, descriptor);
24
+ (0, microservices_1.GrpcStreamMethod)("OrderService", method)(constructor.prototype[method], method, descriptor);
25
25
  }
26
26
  };
27
27
  }
28
- exports.ORDER_SERIVE_SERVICE_NAME = "OrderSerive";
28
+ exports.ORDER_SERVICE_NAME = "OrderService";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platfformx/proto-contracts",
3
- "version": "1.4.9",
3
+ "version": "1.4.11",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -2,8 +2,9 @@ syntax = "proto3";
2
2
 
3
3
  package order.v1;
4
4
 
5
- service OrderSerive {
5
+ service OrderService {
6
6
  rpc CreateOrder (CreateOrderRequest) returns (CreateOrderResponse);
7
+ rpc UpdateOrderStatus (UpdateOrderStatusRequest) returns (UpdateOrderStatusResponse);
7
8
  }
8
9
 
9
10
  message CreateOrderRequest {
@@ -17,9 +18,15 @@ message CreateOrderResponse {
17
18
  string status = 3;
18
19
  string client_secret = 4;
19
20
  }
21
+ message UpdateOrderStatusRequest {
22
+ string order_id = 1;
23
+ string status = 2;
24
+ }
25
+ message UpdateOrderStatusResponse {
26
+ bool ok = 1;
27
+ }
20
28
 
21
29
  message OrderItem {
22
30
  string product_id = 1;
23
31
  int32 quantity = 2;
24
-
25
32
  }