@longvansoftware/storefront-js-client 2.9.4 → 2.9.5
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/README.md +186 -93
- package/dist/src/graphql/auth/mutations.js +130 -130
- package/dist/src/graphql/auth/queries.js +55 -55
- package/dist/src/graphql/campaign/mutations.js +26 -26
- package/dist/src/graphql/campaign/queries.js +375 -375
- package/dist/src/graphql/cloud/mutations.js +103 -103
- package/dist/src/graphql/cloud/queries.js +112 -112
- package/dist/src/graphql/computing/mutations.js +96 -96
- package/dist/src/graphql/computing/queries.js +41 -41
- package/dist/src/graphql/crm/mutations.js +813 -813
- package/dist/src/graphql/crm/queries.js +661 -661
- package/dist/src/graphql/payment/mutations.js +146 -146
- package/dist/src/graphql/payment/queries.js +116 -116
- package/dist/src/graphql/paymentV2/mutations.js +47 -47
- package/dist/src/graphql/paymentV2/queries.js +176 -176
- package/dist/src/graphql/product/mutations.js +94 -94
- package/dist/src/graphql/product/queries.js +468 -468
- package/dist/src/graphql/service/mutations.js +304 -304
- package/dist/src/graphql/service/queries.js +131 -131
- package/dist/src/graphql/user/mutations.js +142 -142
- package/dist/src/graphql/user/queries.js +298 -298
- package/dist/src/lib/order/index.d.ts +10 -3
- package/dist/src/lib/order/index.js +25 -4
- package/dist/src/lib/serviceSDK.js +12 -12
- package/dist/src/types/order.d.ts +6 -0
- package/package.json +44 -43
- package/dist/src/lib/shareZalo/index.d.ts +0 -5
- package/dist/src/lib/shareZalo/index.js +0 -32
|
@@ -57,8 +57,8 @@ class Service {
|
|
|
57
57
|
return __awaiter(this, void 0, void 0, function* () {
|
|
58
58
|
try {
|
|
59
59
|
const { data, errors } = yield this.client.query({
|
|
60
|
-
query: (0, client_1.gql) `
|
|
61
|
-
${query}
|
|
60
|
+
query: (0, client_1.gql) `
|
|
61
|
+
${query}
|
|
62
62
|
`,
|
|
63
63
|
variables,
|
|
64
64
|
context: {
|
|
@@ -84,8 +84,8 @@ class Service {
|
|
|
84
84
|
return __awaiter(this, void 0, void 0, function* () {
|
|
85
85
|
try {
|
|
86
86
|
const { data, errors } = yield this.client.mutate({
|
|
87
|
-
mutation: (0, client_1.gql) `
|
|
88
|
-
${mutation}
|
|
87
|
+
mutation: (0, client_1.gql) `
|
|
88
|
+
${mutation}
|
|
89
89
|
`,
|
|
90
90
|
variables,
|
|
91
91
|
context: {
|
|
@@ -169,8 +169,8 @@ class Service {
|
|
|
169
169
|
return __awaiter(this, void 0, void 0, function* () {
|
|
170
170
|
try {
|
|
171
171
|
const { data, errors } = yield this.client.query({
|
|
172
|
-
query: (0, client_1.gql) `
|
|
173
|
-
${query}
|
|
172
|
+
query: (0, client_1.gql) `
|
|
173
|
+
${query}
|
|
174
174
|
`,
|
|
175
175
|
variables,
|
|
176
176
|
context: {
|
|
@@ -197,8 +197,8 @@ class Service {
|
|
|
197
197
|
return __awaiter(this, void 0, void 0, function* () {
|
|
198
198
|
try {
|
|
199
199
|
const { data, errors } = yield this.client.mutate({
|
|
200
|
-
mutation: (0, client_1.gql) `
|
|
201
|
-
${mutation}
|
|
200
|
+
mutation: (0, client_1.gql) `
|
|
201
|
+
${mutation}
|
|
202
202
|
`,
|
|
203
203
|
variables,
|
|
204
204
|
context: {
|
|
@@ -224,8 +224,8 @@ class Service {
|
|
|
224
224
|
return __awaiter(this, void 0, void 0, function* () {
|
|
225
225
|
try {
|
|
226
226
|
const { data, errors } = yield this.client.query({
|
|
227
|
-
query: (0, client_1.gql) `
|
|
228
|
-
${query}
|
|
227
|
+
query: (0, client_1.gql) `
|
|
228
|
+
${query}
|
|
229
229
|
`,
|
|
230
230
|
variables,
|
|
231
231
|
context: {
|
|
@@ -252,8 +252,8 @@ class Service {
|
|
|
252
252
|
return __awaiter(this, void 0, void 0, function* () {
|
|
253
253
|
try {
|
|
254
254
|
const { data, errors } = yield this.client.mutate({
|
|
255
|
-
mutation: (0, client_1.gql) `
|
|
256
|
-
${mutation}
|
|
255
|
+
mutation: (0, client_1.gql) `
|
|
256
|
+
${mutation}
|
|
257
257
|
`,
|
|
258
258
|
variables,
|
|
259
259
|
context: {
|
package/package.json
CHANGED
|
@@ -1,43 +1,44 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@longvansoftware/storefront-js-client",
|
|
3
|
-
"version": "2.9.
|
|
4
|
-
"main": "dist/src/index.js",
|
|
5
|
-
"types": "dist/src/index.d.ts",
|
|
6
|
-
"files": [
|
|
7
|
-
"dist/**/*.d.ts",
|
|
8
|
-
"dist/**/*.js"
|
|
9
|
-
],
|
|
10
|
-
"directories": {
|
|
11
|
-
"test": "jest"
|
|
12
|
-
},
|
|
13
|
-
"scripts": {
|
|
14
|
-
"test": "jest",
|
|
15
|
-
"build": "tsc",
|
|
16
|
-
"publish": "npm run build && npm publish"
|
|
17
|
-
},
|
|
18
|
-
"keywords": [],
|
|
19
|
-
"author": "",
|
|
20
|
-
"license": "ISC",
|
|
21
|
-
"dependencies": {
|
|
22
|
-
"@apollo/client": "3.9.11",
|
|
23
|
-
"apollo-boost": "^0.4.9",
|
|
24
|
-
"axios": "^1.6.8",
|
|
25
|
-
"cross-fetch": "^4.0.0",
|
|
26
|
-
"crypto-js": "^4.2.0",
|
|
27
|
-
"graphql": "^15.8.0",
|
|
28
|
-
"graphql-request": "^6.1.0",
|
|
29
|
-
"graphql-tag": "^2.12.6",
|
|
30
|
-
"react": "^18.2.0",
|
|
31
|
-
"ts-node": "^10.9.2"
|
|
32
|
-
},
|
|
33
|
-
"devDependencies": {
|
|
34
|
-
"@types/axios": "^0.14.0",
|
|
35
|
-
"@types/crypto-js": "^4.2.2",
|
|
36
|
-
"@types/jest": "^29.5.12",
|
|
37
|
-
"@types/node": "^20.12.7",
|
|
38
|
-
"jest": "^29.7.0",
|
|
39
|
-
"ts-jest": "^29.1.2",
|
|
40
|
-
"typescript": "^5.4.5"
|
|
41
|
-
},
|
|
42
|
-
"description": ""
|
|
43
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@longvansoftware/storefront-js-client",
|
|
3
|
+
"version": "2.9.5",
|
|
4
|
+
"main": "dist/src/index.js",
|
|
5
|
+
"types": "dist/src/index.d.ts",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist/**/*.d.ts",
|
|
8
|
+
"dist/**/*.js"
|
|
9
|
+
],
|
|
10
|
+
"directories": {
|
|
11
|
+
"test": "jest"
|
|
12
|
+
},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"test": "jest",
|
|
15
|
+
"build": "tsc",
|
|
16
|
+
"publish": "npm run build && npm publish"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [],
|
|
19
|
+
"author": "",
|
|
20
|
+
"license": "ISC",
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@apollo/client": "3.9.11",
|
|
23
|
+
"apollo-boost": "^0.4.9",
|
|
24
|
+
"axios": "^1.6.8",
|
|
25
|
+
"cross-fetch": "^4.0.0",
|
|
26
|
+
"crypto-js": "^4.2.0",
|
|
27
|
+
"graphql": "^15.8.0",
|
|
28
|
+
"graphql-request": "^6.1.0",
|
|
29
|
+
"graphql-tag": "^2.12.6",
|
|
30
|
+
"react": "^18.2.0",
|
|
31
|
+
"ts-node": "^10.9.2"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@types/axios": "^0.14.0",
|
|
35
|
+
"@types/crypto-js": "^4.2.2",
|
|
36
|
+
"@types/jest": "^29.5.12",
|
|
37
|
+
"@types/node": "^20.12.7",
|
|
38
|
+
"jest": "^29.7.0",
|
|
39
|
+
"ts-jest": "^29.1.2",
|
|
40
|
+
"typescript": "^5.4.5"
|
|
41
|
+
},
|
|
42
|
+
"description": "",
|
|
43
|
+
"packageManager": "yarn@4.7.0+sha512.5a0afa1d4c1d844b3447ee3319633797bcd6385d9a44be07993ae52ff4facabccafb4af5dcd1c2f9a94ac113e5e9ff56f6130431905884414229e284e37bb7c9"
|
|
44
|
+
}
|
|
@@ -1,32 +0,0 @@
|
|
|
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.ShareZaloService = void 0;
|
|
13
|
-
const serviceSDK_1 = require("../serviceSDK");
|
|
14
|
-
class ShareZaloService extends serviceSDK_1.Service {
|
|
15
|
-
constructor(endpoint, orgId, storeId) {
|
|
16
|
-
super(endpoint, orgId, storeId);
|
|
17
|
-
}
|
|
18
|
-
shareOrder(dataRequet) {
|
|
19
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
20
|
-
const endpoint = ``;
|
|
21
|
-
const method = "POST";
|
|
22
|
-
try {
|
|
23
|
-
const response = yield this.restApiCallWithNoHeader(endpoint, method, dataRequet);
|
|
24
|
-
return response;
|
|
25
|
-
}
|
|
26
|
-
catch (error) {
|
|
27
|
-
throw error;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
exports.ShareZaloService = ShareZaloService;
|