@longvansoftware/storefront-js-client 4.6.3 → 4.6.4
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.
- package/dist/config/config.d.ts +2 -0
- package/dist/config/config.js +2 -0
- package/dist/src/graphql/cloudService/queries.d.ts +1 -0
- package/dist/src/graphql/cloudService/queries.js +71 -0
- package/dist/src/graphql/marketplace/mutations.d.ts +3 -0
- package/dist/src/graphql/marketplace/mutations.js +54 -0
- package/dist/src/graphql/marketplace/queries.d.ts +2 -0
- package/dist/src/graphql/marketplace/queries.js +45 -0
- package/dist/src/lib/SDK.d.ts +3 -0
- package/dist/src/lib/SDK.js +5 -0
- package/dist/src/lib/cloudService/index.d.ts +5 -0
- package/dist/src/lib/{dns → cloudService}/index.js +11 -16
- package/dist/src/lib/marketplace/index.d.ts +9 -0
- package/dist/src/lib/marketplace/index.js +106 -0
- package/package.json +1 -1
- package/dist/src/graphql/accounting_service/mutations.d.ts +0 -2
- package/dist/src/graphql/accounting_service/mutations.js +0 -100
- package/dist/src/graphql/accounting_service/queries.d.ts +0 -1
- package/dist/src/graphql/accounting_service/queries.js +0 -62
- package/dist/src/graphql/content_api/queries.d.ts +0 -2
- package/dist/src/graphql/content_api/queries.js +0 -23
- package/dist/src/graphql/crm_camping/mutations.d.ts +0 -1
- package/dist/src/graphql/crm_camping/mutations.js +0 -37
- package/dist/src/graphql/crm_camping/queries.d.ts +0 -14
- package/dist/src/graphql/crm_camping/queries.js +0 -420
- package/dist/src/graphql/orderGraphQL/mutations.d.ts +0 -10
- package/dist/src/graphql/orderGraphQL/mutations.js +0 -410
- package/dist/src/graphql/orderGraphQL/queries.d.ts +0 -10
- package/dist/src/graphql/orderGraphQL/queries.js +0 -480
- package/dist/src/graphql/paymentLV/mutations.d.ts +0 -2
- package/dist/src/graphql/paymentLV/mutations.js +0 -31
- package/dist/src/graphql/paymentLV/queries.d.ts +0 -5
- package/dist/src/graphql/paymentLV/queries.js +0 -135
- package/dist/src/graphql/quicklab_service/mutations.d.ts +0 -8
- package/dist/src/graphql/quicklab_service/mutations.js +0 -171
- package/dist/src/graphql/quicklab_service/queries.d.ts +0 -7
- package/dist/src/graphql/quicklab_service/queries.js +0 -131
- package/dist/src/graphql/remote_access_service/mutations.d.ts +0 -7
- package/dist/src/graphql/remote_access_service/mutations.js +0 -89
- package/dist/src/graphql/remote_access_service/queries.d.ts +0 -2
- package/dist/src/graphql/remote_access_service/queries.js +0 -34
- package/dist/src/graphql/resource_permission/mutations.d.ts +0 -2
- package/dist/src/graphql/resource_permission/mutations.js +0 -65
- package/dist/src/graphql/resource_permission/queries.d.ts +0 -1
- package/dist/src/graphql/resource_permission/queries.js +0 -18
- package/dist/src/graphql/storage_s3/mutations.d.ts +0 -27
- package/dist/src/graphql/storage_s3/mutations.js +0 -603
- package/dist/src/graphql/storage_s3/queries.d.ts +0 -12
- package/dist/src/graphql/storage_s3/queries.js +0 -129
- package/dist/src/lib/accounting_service/index.d.ts +0 -9
- package/dist/src/lib/accounting_service/index.js +0 -69
- package/dist/src/lib/cloud_rest/index.d.ts +0 -17
- package/dist/src/lib/cloud_rest/index.js +0 -101
- package/dist/src/lib/content_api/index.d.ts +0 -7
- package/dist/src/lib/content_api/index.js +0 -43
- package/dist/src/lib/crm_camping/index.d.ts +0 -21
- package/dist/src/lib/crm_camping/index.js +0 -302
- package/dist/src/lib/dns/index.d.ts +0 -7
- package/dist/src/lib/orderGraphQL/index.d.ts +0 -24
- package/dist/src/lib/orderGraphQL/index.js +0 -342
- package/dist/src/lib/order_cloud_rest/index.d.ts +0 -7
- package/dist/src/lib/order_cloud_rest/index.js +0 -39
- package/dist/src/lib/paymentLV/index.d.ts +0 -13
- package/dist/src/lib/paymentLV/index.js +0 -149
- package/dist/src/lib/quicklab_service/index.d.ts +0 -19
- package/dist/src/lib/quicklab_service/index.js +0 -211
- package/dist/src/lib/remote_access_service/index.d.ts +0 -16
- package/dist/src/lib/remote_access_service/index.js +0 -181
- package/dist/src/lib/resource_permission/index.d.ts +0 -9
- package/dist/src/lib/resource_permission/index.js +0 -82
- package/dist/src/lib/service.d.ts +0 -14
- package/dist/src/lib/service.js +0 -101
- package/dist/src/lib/storage_s3/index.d.ts +0 -42
- package/dist/src/lib/storage_s3/index.js +0 -736
- package/dist/src/types/remote_access_service.d.ts +0 -12
- package/dist/src/types/remote_access_service.js +0 -2
- package/dist/src/types/storage_s3.d.ts +0 -10
- package/dist/src/types/storage_s3.js +0 -2
- package/dist/src/utils/build-field-string.d.ts +0 -1
- package/dist/src/utils/build-field-string.js +0 -16
package/dist/config/config.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ export declare const environmentEndpoints: {
|
|
|
32
32
|
orderCloud: string;
|
|
33
33
|
cloudCloud: string;
|
|
34
34
|
truedoc: string;
|
|
35
|
+
marketplace: string;
|
|
35
36
|
};
|
|
36
37
|
live: {
|
|
37
38
|
product: string;
|
|
@@ -62,5 +63,6 @@ export declare const environmentEndpoints: {
|
|
|
62
63
|
orderCloud: string;
|
|
63
64
|
cloudCloud: string;
|
|
64
65
|
truedoc: string;
|
|
66
|
+
marketplace: string;
|
|
65
67
|
};
|
|
66
68
|
};
|
package/dist/config/config.js
CHANGED
|
@@ -35,6 +35,7 @@ exports.environmentEndpoints = {
|
|
|
35
35
|
orderCloud: "https://api-gateway.dev.longvan.vn/order-cloud-service/graphql",
|
|
36
36
|
cloudCloud: "https://api-gateway.dev.longvan.vn/cloud-service-api/graphql",
|
|
37
37
|
truedoc: "https://api-gateway.dev.truedoc.vn/bmlconnector/graphql",
|
|
38
|
+
marketplace: "https://api-gateway.dev.longvan.vn/marketplace/graphql",
|
|
38
39
|
},
|
|
39
40
|
live: {
|
|
40
41
|
product: "https://product-service.longvan.vn/product-service/graphql",
|
|
@@ -65,5 +66,6 @@ exports.environmentEndpoints = {
|
|
|
65
66
|
orderCloud: "https://api-gateway.longvan.vn/order-cloud-service/graphql",
|
|
66
67
|
cloudCloud: "https://api-gateway.longvan.vn/cloud-service-api/graphql",
|
|
67
68
|
truedoc: "https://api-gateway.truedoc.vn/bmlconnector/graphql",
|
|
69
|
+
marketplace: "https://api-gateway.longvan.vn/marketplace/graphql",
|
|
68
70
|
},
|
|
69
71
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SEARCH_SERVICE: import("graphql").DocumentNode;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SEARCH_SERVICE = void 0;
|
|
4
|
+
const graphql_tag_1 = require("graphql-tag");
|
|
5
|
+
exports.SEARCH_SERVICE = (0, graphql_tag_1.gql) `
|
|
6
|
+
query SearchService($filter: CloudServiceFilterInput) {
|
|
7
|
+
searchService(filter: $filter) {
|
|
8
|
+
total
|
|
9
|
+
offset
|
|
10
|
+
maxResult
|
|
11
|
+
resultList {
|
|
12
|
+
supplierId
|
|
13
|
+
serviceId
|
|
14
|
+
partnerId
|
|
15
|
+
serviceName
|
|
16
|
+
type
|
|
17
|
+
typeName
|
|
18
|
+
status
|
|
19
|
+
statusFulfillment
|
|
20
|
+
ownerId
|
|
21
|
+
startDate
|
|
22
|
+
endDate
|
|
23
|
+
serviceType
|
|
24
|
+
urlPrivate
|
|
25
|
+
urlPublic
|
|
26
|
+
username
|
|
27
|
+
password
|
|
28
|
+
attrs
|
|
29
|
+
description
|
|
30
|
+
productGroupId
|
|
31
|
+
orderId
|
|
32
|
+
actionRequest {
|
|
33
|
+
id
|
|
34
|
+
name
|
|
35
|
+
uri
|
|
36
|
+
type
|
|
37
|
+
}
|
|
38
|
+
billingCycle {
|
|
39
|
+
quantity
|
|
40
|
+
unit
|
|
41
|
+
}
|
|
42
|
+
productConfiguration {
|
|
43
|
+
productId
|
|
44
|
+
productTitle
|
|
45
|
+
productResources {
|
|
46
|
+
name
|
|
47
|
+
quantity
|
|
48
|
+
unit
|
|
49
|
+
productId
|
|
50
|
+
giftProductId
|
|
51
|
+
gift
|
|
52
|
+
giftQuantity
|
|
53
|
+
campaignId
|
|
54
|
+
campaignActionId
|
|
55
|
+
qualify
|
|
56
|
+
idParent
|
|
57
|
+
addQuantity
|
|
58
|
+
defaultQuantity
|
|
59
|
+
title
|
|
60
|
+
price
|
|
61
|
+
unitPrice
|
|
62
|
+
totalResource
|
|
63
|
+
unitGift
|
|
64
|
+
giftDuration
|
|
65
|
+
giftDurationUnit
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
`;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.REMOVE_PRODUCT_TAG = exports.ADD_PRODUCT_TAG = exports.CREATE_TAG = void 0;
|
|
4
|
+
const graphql_tag_1 = require("graphql-tag");
|
|
5
|
+
exports.CREATE_TAG = (0, graphql_tag_1.gql) `
|
|
6
|
+
mutation CreateTag($name: String!, $slug: String!, $createdBy: String!) {
|
|
7
|
+
createTag(name: $name, slug: $slug, createdBy: $createdBy) {
|
|
8
|
+
id
|
|
9
|
+
name
|
|
10
|
+
slug
|
|
11
|
+
type
|
|
12
|
+
scope
|
|
13
|
+
storeIds
|
|
14
|
+
selected
|
|
15
|
+
title
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
19
|
+
exports.ADD_PRODUCT_TAG = (0, graphql_tag_1.gql) `
|
|
20
|
+
mutation AddProductTag(
|
|
21
|
+
$productId: String!
|
|
22
|
+
$tagId: String!
|
|
23
|
+
$tagGroupId: String
|
|
24
|
+
$createBy: String!
|
|
25
|
+
) {
|
|
26
|
+
addProductTag(
|
|
27
|
+
productId: $productId
|
|
28
|
+
tagId: $tagId
|
|
29
|
+
tagGroupId: $tagGroupId
|
|
30
|
+
createBy: $createBy
|
|
31
|
+
) {
|
|
32
|
+
status
|
|
33
|
+
message
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
`;
|
|
37
|
+
exports.REMOVE_PRODUCT_TAG = (0, graphql_tag_1.gql) `
|
|
38
|
+
mutation RemoveProductTag(
|
|
39
|
+
$productId: String!
|
|
40
|
+
$tagId: String!
|
|
41
|
+
$tagGroupId: String
|
|
42
|
+
$updatedBy: String!
|
|
43
|
+
) {
|
|
44
|
+
removeProductTag(
|
|
45
|
+
productId: $productId
|
|
46
|
+
tagId: $tagId
|
|
47
|
+
tagGroupId: $tagGroupId
|
|
48
|
+
updatedBy: $updatedBy
|
|
49
|
+
) {
|
|
50
|
+
status
|
|
51
|
+
message
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
`;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SEARCH_TAG = exports.GET_TAGS_BY_PRODUCT_ID = void 0;
|
|
4
|
+
const graphql_tag_1 = require("graphql-tag");
|
|
5
|
+
exports.GET_TAGS_BY_PRODUCT_ID = (0, graphql_tag_1.gql) `
|
|
6
|
+
query GetTagsByProductId($productId: String!) {
|
|
7
|
+
getTagsByProductId(productId: $productId) {
|
|
8
|
+
id
|
|
9
|
+
title
|
|
10
|
+
items {
|
|
11
|
+
id
|
|
12
|
+
name
|
|
13
|
+
slug
|
|
14
|
+
type
|
|
15
|
+
scope
|
|
16
|
+
storeIds
|
|
17
|
+
selected
|
|
18
|
+
title
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
23
|
+
exports.SEARCH_TAG = (0, graphql_tag_1.gql) `
|
|
24
|
+
query SearchTag($keyword: String, $currentPage: Int, $maxResult: Int) {
|
|
25
|
+
searchTag(
|
|
26
|
+
keyword: $keyword
|
|
27
|
+
currentPage: $currentPage
|
|
28
|
+
maxResult: $maxResult
|
|
29
|
+
) {
|
|
30
|
+
total
|
|
31
|
+
maxResult
|
|
32
|
+
index
|
|
33
|
+
resultList {
|
|
34
|
+
id
|
|
35
|
+
name
|
|
36
|
+
slug
|
|
37
|
+
type
|
|
38
|
+
scope
|
|
39
|
+
storeIds
|
|
40
|
+
selected
|
|
41
|
+
title
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
`;
|
package/dist/src/lib/SDK.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ import { FileServiceSerVice } from "./fileService";
|
|
|
26
26
|
import { OrderCloudService } from "./orderCloud";
|
|
27
27
|
import { CloudCloudService } from "./cloudCloud";
|
|
28
28
|
import { TruedocService } from "./truedoc";
|
|
29
|
+
import { MarketPlaceService } from "./marketplace";
|
|
29
30
|
export interface Endpoints {
|
|
30
31
|
product: string;
|
|
31
32
|
crm: string;
|
|
@@ -55,6 +56,7 @@ export interface Endpoints {
|
|
|
55
56
|
orderCloud: string;
|
|
56
57
|
cloudCloud: string;
|
|
57
58
|
truedoc: string;
|
|
59
|
+
marketplace: string;
|
|
58
60
|
}
|
|
59
61
|
export declare class SDK {
|
|
60
62
|
orgId: string;
|
|
@@ -88,6 +90,7 @@ export declare class SDK {
|
|
|
88
90
|
orderCloud: OrderCloudService;
|
|
89
91
|
cloudCloud: CloudCloudService;
|
|
90
92
|
truedoc: TruedocService;
|
|
93
|
+
marketplace: MarketPlaceService;
|
|
91
94
|
token: string | null;
|
|
92
95
|
constructor(orgId: string, storeId: string, environment: "dev" | "live");
|
|
93
96
|
setToken(token: string): void;
|
package/dist/src/lib/SDK.js
CHANGED
|
@@ -31,6 +31,7 @@ const fileService_1 = require("./fileService");
|
|
|
31
31
|
const orderCloud_1 = require("./orderCloud");
|
|
32
32
|
const cloudCloud_1 = require("./cloudCloud");
|
|
33
33
|
const truedoc_1 = require("./truedoc");
|
|
34
|
+
const marketplace_1 = require("./marketplace");
|
|
34
35
|
class SDK {
|
|
35
36
|
constructor(orgId, storeId, environment) {
|
|
36
37
|
this.orgId = orgId;
|
|
@@ -66,6 +67,7 @@ class SDK {
|
|
|
66
67
|
this.orderCloud = new orderCloud_1.OrderCloudService(endpoints.orderCloud, orgId, storeId);
|
|
67
68
|
this.cloudCloud = new cloudCloud_1.CloudCloudService(endpoints.cloudCloud, orgId, storeId);
|
|
68
69
|
this.truedoc = new truedoc_1.TruedocService(endpoints.truedoc, orgId, storeId);
|
|
70
|
+
this.marketplace = new marketplace_1.MarketPlaceService(endpoints.marketplace, orgId, storeId);
|
|
69
71
|
// Initialize other services here
|
|
70
72
|
}
|
|
71
73
|
setToken(token) {
|
|
@@ -100,6 +102,7 @@ class SDK {
|
|
|
100
102
|
this.orderCloud.setToken(token);
|
|
101
103
|
this.cloudCloud.setToken(token);
|
|
102
104
|
this.truedoc.setToken(token);
|
|
105
|
+
this.marketplace.setToken(token);
|
|
103
106
|
}
|
|
104
107
|
// các module export từ serviceSDK.ts set storeId vào serviceSDK.ts
|
|
105
108
|
// src/service.ts
|
|
@@ -131,6 +134,7 @@ class SDK {
|
|
|
131
134
|
this.orderCloud.setStoreId(storeId);
|
|
132
135
|
this.cloudCloud.setStoreId(storeId);
|
|
133
136
|
this.truedoc.setStoreId(storeId);
|
|
137
|
+
this.marketplace.setStoreId(storeId);
|
|
134
138
|
// Set storeId for other services here
|
|
135
139
|
}
|
|
136
140
|
setOrgId(orgId) {
|
|
@@ -161,6 +165,7 @@ class SDK {
|
|
|
161
165
|
this.orderCloud.setOrgId(orgId);
|
|
162
166
|
this.cloudCloud.setOrgId(orgId);
|
|
163
167
|
this.truedoc.setOrgId(orgId);
|
|
168
|
+
this.marketplace.setOrgId(orgId);
|
|
164
169
|
}
|
|
165
170
|
}
|
|
166
171
|
exports.SDK = SDK;
|
|
@@ -9,32 +9,27 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.CloudServiceService = void 0;
|
|
13
13
|
const serviceSDK_1 = require("../serviceSDK");
|
|
14
|
-
|
|
14
|
+
const queries_1 = require("../../graphql/cloudService/queries");
|
|
15
|
+
class CloudServiceService extends serviceSDK_1.Service {
|
|
15
16
|
constructor(endpoint, orgId, storeId) {
|
|
16
17
|
super(endpoint, orgId, storeId);
|
|
17
18
|
}
|
|
18
|
-
|
|
19
|
-
this.token = token;
|
|
20
|
-
}
|
|
21
|
-
setStoreId(storeId) {
|
|
22
|
-
this.storeId = storeId;
|
|
23
|
-
}
|
|
24
|
-
getDomain(params) {
|
|
19
|
+
searchService(data) {
|
|
25
20
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
|
|
21
|
+
const query = queries_1.SEARCH_SERVICE;
|
|
22
|
+
const variables = {
|
|
23
|
+
filter: data,
|
|
24
|
+
};
|
|
29
25
|
try {
|
|
30
|
-
const response = yield this.
|
|
31
|
-
return response;
|
|
26
|
+
const response = yield this.graphqlQueryV4(query, variables);
|
|
27
|
+
return response.searchService;
|
|
32
28
|
}
|
|
33
29
|
catch (error) {
|
|
34
|
-
console.log(`Error in addVoucher: ${error}`);
|
|
35
30
|
throw error;
|
|
36
31
|
}
|
|
37
32
|
});
|
|
38
33
|
}
|
|
39
34
|
}
|
|
40
|
-
exports.
|
|
35
|
+
exports.CloudServiceService = CloudServiceService;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Service } from "../serviceSDK";
|
|
2
|
+
export declare class MarketPlaceService extends Service {
|
|
3
|
+
constructor(endpoint: string, orgId: string, storeId: string);
|
|
4
|
+
createTag(name: string, slug: string, createdBy: string): Promise<any>;
|
|
5
|
+
searchTag(keyword: string, currentPage: number, maxResult: number): Promise<any>;
|
|
6
|
+
getTagsByProductId(productId: string): Promise<any>;
|
|
7
|
+
removeProductTag(productId: string, tagId: string, updatedBy: string, tagGroupId?: string): Promise<any>;
|
|
8
|
+
addProductTag(productId: string, tagId: string, createBy: string, tagGroupId?: string): Promise<any>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.MarketPlaceService = void 0;
|
|
13
|
+
const serviceSDK_1 = require("../serviceSDK");
|
|
14
|
+
const queries_1 = require("../../graphql/marketplace/queries");
|
|
15
|
+
const mutations_1 = require("../../graphql/marketplace/mutations");
|
|
16
|
+
class MarketPlaceService extends serviceSDK_1.Service {
|
|
17
|
+
constructor(endpoint, orgId, storeId) {
|
|
18
|
+
super(endpoint, orgId, storeId);
|
|
19
|
+
}
|
|
20
|
+
createTag(name, slug, createdBy) {
|
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
22
|
+
const mutation = mutations_1.CREATE_TAG;
|
|
23
|
+
const variables = {
|
|
24
|
+
name,
|
|
25
|
+
slug,
|
|
26
|
+
createdBy,
|
|
27
|
+
};
|
|
28
|
+
try {
|
|
29
|
+
const response = yield this.graphqlMutation(mutation, variables);
|
|
30
|
+
return response.createTag;
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
throw error;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
searchTag(keyword, currentPage, maxResult) {
|
|
38
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
const queries = queries_1.SEARCH_TAG;
|
|
40
|
+
const variables = {
|
|
41
|
+
keyword,
|
|
42
|
+
currentPage,
|
|
43
|
+
maxResult,
|
|
44
|
+
};
|
|
45
|
+
try {
|
|
46
|
+
const response = yield this.graphqlQuery(queries, variables);
|
|
47
|
+
return response.searchTag;
|
|
48
|
+
}
|
|
49
|
+
catch (error) {
|
|
50
|
+
throw error;
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
getTagsByProductId(productId) {
|
|
55
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
const queries = queries_1.GET_TAGS_BY_PRODUCT_ID;
|
|
57
|
+
const variables = {
|
|
58
|
+
productId,
|
|
59
|
+
};
|
|
60
|
+
try {
|
|
61
|
+
const response = yield this.graphqlQuery(queries, variables);
|
|
62
|
+
return response.getTagsByProductId;
|
|
63
|
+
}
|
|
64
|
+
catch (error) {
|
|
65
|
+
throw error;
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
removeProductTag(productId, tagId, updatedBy, tagGroupId) {
|
|
70
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
71
|
+
const mutation = mutations_1.REMOVE_PRODUCT_TAG;
|
|
72
|
+
const variables = {
|
|
73
|
+
productId,
|
|
74
|
+
tagId,
|
|
75
|
+
updatedBy,
|
|
76
|
+
tagGroupId,
|
|
77
|
+
};
|
|
78
|
+
try {
|
|
79
|
+
const response = yield this.graphqlMutation(mutation, variables);
|
|
80
|
+
return response.removeProductTag;
|
|
81
|
+
}
|
|
82
|
+
catch (error) {
|
|
83
|
+
throw error;
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
addProductTag(productId, tagId, createBy, tagGroupId) {
|
|
88
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
89
|
+
const mutation = mutations_1.ADD_PRODUCT_TAG;
|
|
90
|
+
const variables = {
|
|
91
|
+
productId,
|
|
92
|
+
tagId,
|
|
93
|
+
createBy,
|
|
94
|
+
tagGroupId,
|
|
95
|
+
};
|
|
96
|
+
try {
|
|
97
|
+
const response = yield this.graphqlMutation(mutation, variables);
|
|
98
|
+
return response.addProductTag;
|
|
99
|
+
}
|
|
100
|
+
catch (error) {
|
|
101
|
+
throw error;
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
exports.MarketPlaceService = MarketPlaceService;
|
package/package.json
CHANGED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CONFIRM_DEPOSIT_WALLET = exports.DEPOSIT_WALLET = void 0;
|
|
4
|
-
const graphql_tag_1 = require("graphql-tag");
|
|
5
|
-
exports.DEPOSIT_WALLET = (0, graphql_tag_1.gql) `
|
|
6
|
-
mutation DepositWallet(
|
|
7
|
-
$partnerId: String!
|
|
8
|
-
$storeId: String!
|
|
9
|
-
$partyId: String!
|
|
10
|
-
$storeName: String
|
|
11
|
-
$amountDeposit: BigDecimal!
|
|
12
|
-
$amountPromotion: BigDecimal
|
|
13
|
-
$orderNote: String
|
|
14
|
-
$paymentMethodCode: String
|
|
15
|
-
$sourcePayment: String
|
|
16
|
-
$returnUrl: String
|
|
17
|
-
$createBy: String
|
|
18
|
-
) {
|
|
19
|
-
depositWallet(
|
|
20
|
-
partnerId: $partnerId
|
|
21
|
-
partyId: $partyId
|
|
22
|
-
storeId: $storeId
|
|
23
|
-
storeName: $storeName
|
|
24
|
-
amountDeposit: $amountDeposit
|
|
25
|
-
amountPromotion: $amountPromotion
|
|
26
|
-
orderNote: $orderNote
|
|
27
|
-
paymentMethodCode: $paymentMethodCode
|
|
28
|
-
sourcePayment: $sourcePayment
|
|
29
|
-
returnUrl: $returnUrl
|
|
30
|
-
createBy: $createBy
|
|
31
|
-
) {
|
|
32
|
-
order {
|
|
33
|
-
orderId
|
|
34
|
-
}
|
|
35
|
-
payment {
|
|
36
|
-
code
|
|
37
|
-
message
|
|
38
|
-
data
|
|
39
|
-
qrCodeUrl
|
|
40
|
-
deeplink
|
|
41
|
-
deeplinkMiniApp
|
|
42
|
-
invoiceId
|
|
43
|
-
orderId
|
|
44
|
-
paymentId
|
|
45
|
-
}
|
|
46
|
-
financialOrder {
|
|
47
|
-
partnerId
|
|
48
|
-
name
|
|
49
|
-
userId
|
|
50
|
-
totalAmount
|
|
51
|
-
type
|
|
52
|
-
transactionId
|
|
53
|
-
status
|
|
54
|
-
accountNumber
|
|
55
|
-
method
|
|
56
|
-
gateway
|
|
57
|
-
extOrderId
|
|
58
|
-
extTransactionId
|
|
59
|
-
transactionTime
|
|
60
|
-
description
|
|
61
|
-
source
|
|
62
|
-
level
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
`;
|
|
67
|
-
exports.CONFIRM_DEPOSIT_WALLET = (0, graphql_tag_1.gql) `
|
|
68
|
-
mutation ConfirmDepositWallet(
|
|
69
|
-
$partnerId: String!
|
|
70
|
-
$orderId: String!
|
|
71
|
-
$transactionId: String
|
|
72
|
-
$transactionTime: Long!
|
|
73
|
-
$createBy: String
|
|
74
|
-
) {
|
|
75
|
-
confirmDepositWallet(
|
|
76
|
-
partnerId: $partnerId
|
|
77
|
-
orderId: $orderId
|
|
78
|
-
transactionId: $transactionId
|
|
79
|
-
transactionTime: $transactionTime
|
|
80
|
-
createBy: $createBy
|
|
81
|
-
) {
|
|
82
|
-
partnerId
|
|
83
|
-
name
|
|
84
|
-
userId
|
|
85
|
-
totalAmount
|
|
86
|
-
type
|
|
87
|
-
transactionId
|
|
88
|
-
status
|
|
89
|
-
accountNumber
|
|
90
|
-
method
|
|
91
|
-
gateway
|
|
92
|
-
extOrderId
|
|
93
|
-
extTransactionId
|
|
94
|
-
transactionTime
|
|
95
|
-
description
|
|
96
|
-
source
|
|
97
|
-
level
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
`;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const FINANCIAL_ACCOUNT_WALLET_INFO: import("graphql").DocumentNode;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FINANCIAL_ACCOUNT_WALLET_INFO = void 0;
|
|
4
|
-
const graphql_tag_1 = require("graphql-tag");
|
|
5
|
-
exports.FINANCIAL_ACCOUNT_WALLET_INFO = (0, graphql_tag_1.gql) `
|
|
6
|
-
query FinancialAccountWalletInfo(
|
|
7
|
-
$partnerId: String!
|
|
8
|
-
$partyId: String
|
|
9
|
-
$showTransaction: Boolean!
|
|
10
|
-
) {
|
|
11
|
-
financialAccountWalletInfo(
|
|
12
|
-
partnerId: $partnerId
|
|
13
|
-
partyId: $partyId
|
|
14
|
-
showTransaction: $showTransaction
|
|
15
|
-
) {
|
|
16
|
-
financialAccount {
|
|
17
|
-
id
|
|
18
|
-
partyId
|
|
19
|
-
partnerId
|
|
20
|
-
type
|
|
21
|
-
description
|
|
22
|
-
glAccountNumber
|
|
23
|
-
created
|
|
24
|
-
updated
|
|
25
|
-
}
|
|
26
|
-
glAccount {
|
|
27
|
-
partnerId
|
|
28
|
-
accountNumber
|
|
29
|
-
owner
|
|
30
|
-
debit
|
|
31
|
-
credit
|
|
32
|
-
balance
|
|
33
|
-
type
|
|
34
|
-
parent
|
|
35
|
-
level
|
|
36
|
-
description
|
|
37
|
-
created
|
|
38
|
-
updated
|
|
39
|
-
deleteAble
|
|
40
|
-
}
|
|
41
|
-
transactions {
|
|
42
|
-
partnerId
|
|
43
|
-
name
|
|
44
|
-
userId
|
|
45
|
-
totalAmount
|
|
46
|
-
type
|
|
47
|
-
transactionId
|
|
48
|
-
status
|
|
49
|
-
accountNumber
|
|
50
|
-
method
|
|
51
|
-
gateway
|
|
52
|
-
extOrderId
|
|
53
|
-
extTransactionId
|
|
54
|
-
transactionTime
|
|
55
|
-
description
|
|
56
|
-
source
|
|
57
|
-
level
|
|
58
|
-
createdStamp
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
`;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GET_ARTICLE_RELATED_TO_PRODUCT = void 0;
|
|
4
|
-
const graphql_tag_1 = require("graphql-tag");
|
|
5
|
-
const GET_ARTICLE_RELATED_TO_PRODUCT = (fields = []) => {
|
|
6
|
-
const fieldStr = fields.join("\n ");
|
|
7
|
-
const hasFields = fields.length > 0;
|
|
8
|
-
return (0, graphql_tag_1.gql) `
|
|
9
|
-
query getArticleRelatedToProduct(
|
|
10
|
-
$partnerId: String!
|
|
11
|
-
$productId: String!
|
|
12
|
-
) {
|
|
13
|
-
getArticleRelatedToProduct(
|
|
14
|
-
partnerId: $partnerId
|
|
15
|
-
productId: $productId
|
|
16
|
-
)
|
|
17
|
-
{
|
|
18
|
-
${hasFields ? `${fieldStr}` : ""}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
`;
|
|
22
|
-
};
|
|
23
|
-
exports.GET_ARTICLE_RELATED_TO_PRODUCT = GET_ARTICLE_RELATED_TO_PRODUCT;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const ADD_CUSTOMER_TO_VOUCHER: import("graphql").DocumentNode;
|