@longvansoftware/service-js-client 1.19.7 → 1.19.8
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 +0 -4
- package/dist/config/config.js +0 -6
- package/dist/src/graphql/accounting_service/mutations.js +2 -0
- package/dist/src/graphql/crm_camping/queries.d.ts +0 -1
- package/dist/src/graphql/crm_camping/queries.js +1 -25
- package/dist/src/lib/SDK.d.ts +0 -6
- package/dist/src/lib/SDK.js +0 -8
- package/dist/src/lib/crm_camping/index.d.ts +0 -1
- package/dist/src/lib/crm_camping/index.js +0 -17
- package/package.json +1 -1
package/dist/config/config.d.ts
CHANGED
|
@@ -19,8 +19,6 @@ export declare const environmentEndpoints: {
|
|
|
19
19
|
cloud_rest: string;
|
|
20
20
|
accounting_service: string;
|
|
21
21
|
quicklab_service: string;
|
|
22
|
-
remote_access_service: string;
|
|
23
|
-
storage_s3: string;
|
|
24
22
|
};
|
|
25
23
|
live: {
|
|
26
24
|
product: string;
|
|
@@ -42,7 +40,5 @@ export declare const environmentEndpoints: {
|
|
|
42
40
|
cloud_rest: string;
|
|
43
41
|
accounting_service: string;
|
|
44
42
|
quicklab_service: string;
|
|
45
|
-
remote_access_service: string;
|
|
46
|
-
storage_s3: string;
|
|
47
43
|
};
|
|
48
44
|
};
|
package/dist/config/config.js
CHANGED
|
@@ -22,9 +22,6 @@ exports.environmentEndpoints = {
|
|
|
22
22
|
cloud_rest: "https://api-gateway.dev.longvan.vn/cloud-service-api/v1",
|
|
23
23
|
accounting_service: "https://api-gateway.dev.longvan.vn/accounting-service/graphql/",
|
|
24
24
|
quicklab_service: "https://portal.dev.longvan.vn/quicklab-api/graphql",
|
|
25
|
-
remote_access_service: "https://api-gateway.dev.longvan.vn/remote-access-service/graphql",
|
|
26
|
-
// storage_s3: "https://portal.dev.longvan.vn/storage-s3-api/graphql",
|
|
27
|
-
storage_s3: "https://storage-s3-api.dev.longvan.vn/storage-s3-api/graphql",
|
|
28
25
|
},
|
|
29
26
|
live: {
|
|
30
27
|
product: "https://product-service.longvan.vn/product-service/graphql",
|
|
@@ -46,8 +43,5 @@ exports.environmentEndpoints = {
|
|
|
46
43
|
cloud_rest: "https://api-gateway.longvan.vn/cloud-service-api/v1",
|
|
47
44
|
accounting_service: "https://api-gateway.longvan.vn/accounting-service/graphql/",
|
|
48
45
|
quicklab_service: "https://portal.longvan.vn/quicklab-api/graphql",
|
|
49
|
-
remote_access_service: "https://api-gateway.longvan.vn/remote-access-service/graphql",
|
|
50
|
-
// storage_s3: "https://portal.longvan.vn/storage-s3-api/graphql",
|
|
51
|
-
storage_s3: "https://storage-s3-api.longvan.vn/storage-s3-api/graphql",
|
|
52
46
|
},
|
|
53
47
|
};
|
|
@@ -13,6 +13,7 @@ exports.DEPOSIT_WALLET = (0, graphql_tag_1.gql) `
|
|
|
13
13
|
$orderNote: String
|
|
14
14
|
$paymentMethodCode: String
|
|
15
15
|
$sourcePayment: String
|
|
16
|
+
$paymentType: String
|
|
16
17
|
$returnUrl: String
|
|
17
18
|
$createBy: String
|
|
18
19
|
) {
|
|
@@ -26,6 +27,7 @@ exports.DEPOSIT_WALLET = (0, graphql_tag_1.gql) `
|
|
|
26
27
|
orderNote: $orderNote
|
|
27
28
|
paymentMethodCode: $paymentMethodCode
|
|
28
29
|
sourcePayment: $sourcePayment
|
|
30
|
+
paymentType: $paymentType
|
|
29
31
|
returnUrl: $returnUrl
|
|
30
32
|
createBy: $createBy
|
|
31
33
|
) {
|
|
@@ -8,4 +8,3 @@ export declare const GET_NUMBER_OF_TICKET_EVALUATION: import("graphql").Document
|
|
|
8
8
|
export declare const SEARCH_PRODUCT_GIFT_PROMOTION_RESPONSE: import("graphql").DocumentNode;
|
|
9
9
|
export declare const GET_VOUCHERS_V2: import("graphql").DocumentNode;
|
|
10
10
|
export declare const SEARCH_CAMPAIGN: import("graphql").DocumentNode;
|
|
11
|
-
export declare const GET_CONDITION_BY_ORGID_CAMPAIGN_ACTIONIDS: import("graphql").DocumentNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.SEARCH_CAMPAIGN = exports.GET_VOUCHERS_V2 = exports.SEARCH_PRODUCT_GIFT_PROMOTION_RESPONSE = exports.GET_NUMBER_OF_TICKET_EVALUATION = exports.GET_URL_EVALUATION = exports.GET_AVERAGE_RATING = exports.GET_VOUCHERS = exports.SUGGEST_VOUCHER = exports.GET_CAMPAIGN_ACTION_BY_ID = exports.SEARCH_PRODUCT_QUANTITY_PROMOTION_ACTION = void 0;
|
|
4
4
|
const graphql_tag_1 = require("graphql-tag");
|
|
5
5
|
exports.SEARCH_PRODUCT_QUANTITY_PROMOTION_ACTION = (0, graphql_tag_1.gql) `
|
|
6
6
|
query SearchProductQuantityPromotionAction(
|
|
@@ -361,27 +361,3 @@ exports.SEARCH_CAMPAIGN = (0, graphql_tag_1.gql) `
|
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
363
|
`;
|
|
364
|
-
exports.GET_CONDITION_BY_ORGID_CAMPAIGN_ACTIONIDS = (0, graphql_tag_1.gql) `
|
|
365
|
-
query GetConditionByOrgIdCampaignActionIds(
|
|
366
|
-
$orgId: String!
|
|
367
|
-
$campaignActionIds: [String]!
|
|
368
|
-
) {
|
|
369
|
-
getConditionByOrgIdCampaignActionIds(
|
|
370
|
-
orgId: $orgId
|
|
371
|
-
campaignActionIds: $campaignActionIds
|
|
372
|
-
) {
|
|
373
|
-
partyId
|
|
374
|
-
campaignActionId
|
|
375
|
-
type
|
|
376
|
-
minimumSpend
|
|
377
|
-
maximumSpend
|
|
378
|
-
description
|
|
379
|
-
newCustomer
|
|
380
|
-
id
|
|
381
|
-
createdStamp
|
|
382
|
-
updatedStamp
|
|
383
|
-
updatedBy
|
|
384
|
-
createdBy
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
`;
|
package/dist/src/lib/SDK.d.ts
CHANGED
|
@@ -17,8 +17,6 @@ import { CloudRestService } from "./cloud_rest";
|
|
|
17
17
|
import { OrderCloudRestService } from "./order_cloud_rest";
|
|
18
18
|
import { AccountingService } from "./accounting_service";
|
|
19
19
|
import { QuicklabService } from "./quicklab_service";
|
|
20
|
-
import { RemoteAccessService } from "./remote_access_service";
|
|
21
|
-
import { StorageS3Service } from "./storage_s3";
|
|
22
20
|
export interface Endpoints {
|
|
23
21
|
product: string;
|
|
24
22
|
crm: string;
|
|
@@ -39,8 +37,6 @@ export interface Endpoints {
|
|
|
39
37
|
order_cloud_rest: string;
|
|
40
38
|
accounting_service: string;
|
|
41
39
|
quicklab_service: string;
|
|
42
|
-
remote_access_service: string;
|
|
43
|
-
storage_s3: string;
|
|
44
40
|
}
|
|
45
41
|
export declare class SDK {
|
|
46
42
|
orgId: string;
|
|
@@ -66,8 +62,6 @@ export declare class SDK {
|
|
|
66
62
|
order_cloud_rest: OrderCloudRestService;
|
|
67
63
|
accounting_service: AccountingService;
|
|
68
64
|
quicklab_service: QuicklabService;
|
|
69
|
-
remote_access_service: RemoteAccessService;
|
|
70
|
-
storage_s3: StorageS3Service;
|
|
71
65
|
token: string | null;
|
|
72
66
|
private endpoints;
|
|
73
67
|
constructor(orgId: string, storeId: string, storefrontAccessToken: string, environment: string);
|
package/dist/src/lib/SDK.js
CHANGED
|
@@ -23,8 +23,6 @@ const cloud_rest_1 = require("./cloud_rest");
|
|
|
23
23
|
const order_cloud_rest_1 = require("./order_cloud_rest");
|
|
24
24
|
const accounting_service_1 = require("./accounting_service");
|
|
25
25
|
const quicklab_service_1 = require("./quicklab_service");
|
|
26
|
-
const remote_access_service_1 = require("./remote_access_service");
|
|
27
|
-
const storage_s3_1 = require("./storage_s3");
|
|
28
26
|
class SDK {
|
|
29
27
|
constructor(orgId, storeId, storefrontAccessToken, environment) {
|
|
30
28
|
this.orgId = orgId;
|
|
@@ -58,8 +56,6 @@ class SDK {
|
|
|
58
56
|
this.order_cloud_rest = new order_cloud_rest_1.OrderCloudRestService(this.endpoints.order_cloud_rest, orgId, storeId);
|
|
59
57
|
this.accounting_service = new accounting_service_1.AccountingService(this.endpoints.accounting_service, orgId, storeId);
|
|
60
58
|
this.quicklab_service = new quicklab_service_1.QuicklabService(this.endpoints.quicklab_service, orgId, storeId);
|
|
61
|
-
this.remote_access_service = new remote_access_service_1.RemoteAccessService(this.endpoints.remote_access_service, orgId, storeId);
|
|
62
|
-
this.storage_s3 = new storage_s3_1.StorageS3Service(this.endpoints.storage_s3, orgId, storeId);
|
|
63
59
|
// Initialize other services here
|
|
64
60
|
}
|
|
65
61
|
setToken(token) {
|
|
@@ -84,8 +80,6 @@ class SDK {
|
|
|
84
80
|
this.order_cloud_rest.setToken(token);
|
|
85
81
|
this.accounting_service.setToken(token);
|
|
86
82
|
this.quicklab_service.setToken(token);
|
|
87
|
-
this.remote_access_service.setToken(token);
|
|
88
|
-
this.storage_s3.setToken(token);
|
|
89
83
|
// Set token for other services here
|
|
90
84
|
}
|
|
91
85
|
// các module export từ serviceSDK.ts set storeId vào serviceSDK.ts
|
|
@@ -112,8 +106,6 @@ class SDK {
|
|
|
112
106
|
this.order_cloud_rest = new order_cloud_rest_1.OrderCloudRestService(this.endpoints.order_cloud_rest, this.orgId, storeId);
|
|
113
107
|
this.accounting_service = new accounting_service_1.AccountingService(this.endpoints.accounting_service, this.orgId, storeId);
|
|
114
108
|
this.quicklab_service = new quicklab_service_1.QuicklabService(this.endpoints.quicklab_service, this.orgId, storeId);
|
|
115
|
-
this.remote_access_service = new remote_access_service_1.RemoteAccessService(this.endpoints.remote_access_service, this.orgId, storeId);
|
|
116
|
-
this.storage_s3 = new storage_s3_1.StorageS3Service(this.endpoints.storage_s3, this.orgId, storeId);
|
|
117
109
|
}
|
|
118
110
|
}
|
|
119
111
|
exports.SDK = SDK;
|
|
@@ -15,5 +15,4 @@ export declare class CrmCampingService extends Service {
|
|
|
15
15
|
addProductGiftPromotion(orderId: string, updatedBy: string, addData: any): Promise<any>;
|
|
16
16
|
searchVouchersV2(searchVoucherRequest: any): Promise<any>;
|
|
17
17
|
searchCampaign(searchCampaignRequest: any): Promise<any>;
|
|
18
|
-
getConditionByOrgIdCampaignActionIds(campaignActionIds: [string]): Promise<any>;
|
|
19
18
|
}
|
|
@@ -258,22 +258,5 @@ class CrmCampingService extends serviceSDK_1.Service {
|
|
|
258
258
|
}
|
|
259
259
|
});
|
|
260
260
|
}
|
|
261
|
-
getConditionByOrgIdCampaignActionIds(campaignActionIds) {
|
|
262
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
263
|
-
const query = queries_1.GET_CONDITION_BY_ORGID_CAMPAIGN_ACTIONIDS;
|
|
264
|
-
const variables = {
|
|
265
|
-
orgId: this.orgId,
|
|
266
|
-
campaignActionIds,
|
|
267
|
-
};
|
|
268
|
-
try {
|
|
269
|
-
const response = yield this.graphqlQuery(query, variables);
|
|
270
|
-
return response.getConditionByOrgIdCampaignActionIds;
|
|
271
|
-
}
|
|
272
|
-
catch (error) {
|
|
273
|
-
console.log(`Error fetching getConditionByOrgIdCampaignActionIds: ${error}`);
|
|
274
|
-
throw error;
|
|
275
|
-
}
|
|
276
|
-
});
|
|
277
|
-
}
|
|
278
261
|
}
|
|
279
262
|
exports.CrmCampingService = CrmCampingService;
|