@longvansoftware/service-js-client 1.9.0 → 1.9.1
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,3 +1,4 @@ | |
| 1 1 | 
             
            export declare const CREATE_ORDER: import("graphql").DocumentNode;
         | 
| 2 2 | 
             
            export declare const UPDATE_QUANTITY_V2: import("graphql").DocumentNode;
         | 
| 3 3 | 
             
            export declare const ADD_TO_CART: import("graphql").DocumentNode;
         | 
| 4 | 
            +
            export declare const REMOVE_PRODUCT_OPTION_ORDER_LINE_ITEM: import("graphql").DocumentNode;
         | 
| @@ -1,6 +1,6 @@ | |
| 1 1 | 
             
            "use strict";
         | 
| 2 2 | 
             
            Object.defineProperty(exports, "__esModule", { value: true });
         | 
| 3 | 
            -
            exports.ADD_TO_CART = exports.UPDATE_QUANTITY_V2 = exports.CREATE_ORDER = void 0;
         | 
| 3 | 
            +
            exports.REMOVE_PRODUCT_OPTION_ORDER_LINE_ITEM = exports.ADD_TO_CART = exports.UPDATE_QUANTITY_V2 = exports.CREATE_ORDER = void 0;
         | 
| 4 4 | 
             
            const graphql_tag_1 = require("graphql-tag");
         | 
| 5 5 | 
             
            exports.CREATE_ORDER = (0, graphql_tag_1.gql) `
         | 
| 6 6 | 
             
              mutation CreateOrder($input: CreateOrderInput!) {
         | 
| @@ -342,3 +342,18 @@ exports.ADD_TO_CART = (0, graphql_tag_1.gql) ` | |
| 342 342 | 
             
                }
         | 
| 343 343 | 
             
              }
         | 
| 344 344 | 
             
            `;
         | 
| 345 | 
            +
            exports.REMOVE_PRODUCT_OPTION_ORDER_LINE_ITEM = (0, graphql_tag_1.gql) `
         | 
| 346 | 
            +
              mutation RemoveProductOptionOrderLineItem(
         | 
| 347 | 
            +
                $partnerId: String!
         | 
| 348 | 
            +
                $orderLineItemId: String!
         | 
| 349 | 
            +
                $optionId: String!
         | 
| 350 | 
            +
                $updateBy: String!
         | 
| 351 | 
            +
              ) {
         | 
| 352 | 
            +
                removeProductOptionOrderLineItem(
         | 
| 353 | 
            +
                  partnerId: $partnerId
         | 
| 354 | 
            +
                  orderLineItemId: $orderLineItemId
         | 
| 355 | 
            +
                  optionId: $optionId
         | 
| 356 | 
            +
                  updateBy: $updateBy
         | 
| 357 | 
            +
                )
         | 
| 358 | 
            +
              }
         | 
| 359 | 
            +
            `;
         | 
| @@ -9,4 +9,5 @@ export declare class OrderGraphQLService extends Service { | |
| 9 9 | 
             
                getOrderLineItemByServiceId(serviceId: string): Promise<any>;
         | 
| 10 10 | 
             
                getOrderByServiceId(serviceId: string): Promise<any>;
         | 
| 11 11 | 
             
                addToCart(serviceId: string, actorId: string, cartId: string): Promise<any>;
         | 
| 12 | 
            +
                removeProductOptionOrderLineItem(orderLineItemId: string, optionId: string, updateBy: string): Promise<any>;
         | 
| 12 13 | 
             
            }
         | 
| @@ -120,5 +120,24 @@ class OrderGraphQLService extends serviceSDK_1.Service { | |
| 120 120 | 
             
                        }
         | 
| 121 121 | 
             
                    });
         | 
| 122 122 | 
             
                }
         | 
| 123 | 
            +
                removeProductOptionOrderLineItem(orderLineItemId, optionId, updateBy) {
         | 
| 124 | 
            +
                    return __awaiter(this, void 0, void 0, function* () {
         | 
| 125 | 
            +
                        const mutation = mutations_1.REMOVE_PRODUCT_OPTION_ORDER_LINE_ITEM;
         | 
| 126 | 
            +
                        const variables = {
         | 
| 127 | 
            +
                            partnerId: this.orgId,
         | 
| 128 | 
            +
                            orderLineItemId,
         | 
| 129 | 
            +
                            optionId,
         | 
| 130 | 
            +
                            updateBy
         | 
| 131 | 
            +
                        };
         | 
| 132 | 
            +
                        try {
         | 
| 133 | 
            +
                            const response = yield this.graphqlMutationV2(mutation, variables);
         | 
| 134 | 
            +
                            return response.removeProductOptionOrderLineItem;
         | 
| 135 | 
            +
                        }
         | 
| 136 | 
            +
                        catch (error) {
         | 
| 137 | 
            +
                            console.log(`Error in removeProductOptionOrderLineItem: ${error}`);
         | 
| 138 | 
            +
                            throw error;
         | 
| 139 | 
            +
                        }
         | 
| 140 | 
            +
                    });
         | 
| 141 | 
            +
                }
         | 
| 123 142 | 
             
            }
         | 
| 124 143 | 
             
            exports.OrderGraphQLService = OrderGraphQLService;
         |