@platfformx/proto-contracts 1.4.9 → 1.4.10
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,6 +10,13 @@ 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;
|
|
@@ -17,9 +24,11 @@ export interface OrderItem {
|
|
|
17
24
|
export declare const ORDER_V1_PACKAGE_NAME = "order.v1";
|
|
18
25
|
export interface OrderSeriveClient {
|
|
19
26
|
createOrder(request: CreateOrderRequest): Observable<CreateOrderResponse>;
|
|
27
|
+
updateOrderStatus(request: UpdateOrderStatusRequest): Observable<UpdateOrderStatusResponse>;
|
|
20
28
|
}
|
|
21
29
|
export interface OrderSeriveController {
|
|
22
30
|
createOrder(request: CreateOrderRequest): Promise<CreateOrderResponse> | Observable<CreateOrderResponse> | CreateOrderResponse;
|
|
31
|
+
updateOrderStatus(request: UpdateOrderStatusRequest): Promise<UpdateOrderStatusResponse> | Observable<UpdateOrderStatusResponse> | UpdateOrderStatusResponse;
|
|
23
32
|
}
|
|
24
33
|
export declare function OrderSeriveControllerMethods(): (constructor: Function) => void;
|
|
25
34
|
export declare const ORDER_SERIVE_SERVICE_NAME = "OrderSerive";
|
|
@@ -13,7 +13,7 @@ exports.protobufPackage = "order.v1";
|
|
|
13
13
|
exports.ORDER_V1_PACKAGE_NAME = "order.v1";
|
|
14
14
|
function OrderSeriveControllerMethods() {
|
|
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
19
|
(0, microservices_1.GrpcMethod)("OrderSerive", method)(constructor.prototype[method], method, descriptor);
|
package/package.json
CHANGED
|
@@ -4,6 +4,7 @@ package order.v1;
|
|
|
4
4
|
|
|
5
5
|
service OrderSerive {
|
|
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
|
}
|