@things-factory/integration-pos 4.3.660 → 4.3.671
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/package.json +14 -14
- package/dist-server/controllers/index.js +0 -19
- package/dist-server/controllers/index.js.map +0 -1
- package/dist-server/controllers/pos-api/decorators.js +0 -32
- package/dist-server/controllers/pos-api/decorators.js.map +0 -1
- package/dist-server/controllers/pos-api/index.js +0 -56
- package/dist-server/controllers/pos-api/index.js.map +0 -1
- package/dist-server/controllers/xilnex/apis/get-outlet.js +0 -17
- package/dist-server/controllers/xilnex/apis/get-outlet.js.map +0 -1
- package/dist-server/controllers/xilnex/apis/get-outlets.js +0 -23
- package/dist-server/controllers/xilnex/apis/get-outlets.js.map +0 -1
- package/dist-server/controllers/xilnex/apis/index.js +0 -18
- package/dist-server/controllers/xilnex/apis/index.js.map +0 -1
- package/dist-server/controllers/xilnex/index.js +0 -34
- package/dist-server/controllers/xilnex/index.js.map +0 -1
- package/dist-server/controllers/xilnex/platform-action.js +0 -37
- package/dist-server/controllers/xilnex/platform-action.js.map +0 -1
- package/dist-server/controllers/xilnex/xilnex.js +0 -91
- package/dist-server/controllers/xilnex/xilnex.js.map +0 -1
- package/dist-server/engine/connector/index.js +0 -4
- package/dist-server/engine/connector/index.js.map +0 -1
- package/dist-server/engine/connector/pos-connector.js +0 -28
- package/dist-server/engine/connector/pos-connector.js.map +0 -1
- package/dist-server/engine/index.js +0 -5
- package/dist-server/engine/index.js.map +0 -1
- package/dist-server/engine/task/index.js +0 -4
- package/dist-server/engine/task/index.js.map +0 -1
- package/dist-server/engine/task/pos-api.js +0 -54
- package/dist-server/engine/task/pos-api.js.map +0 -1
- package/dist-server/entities/index.js +0 -7
- package/dist-server/entities/index.js.map +0 -1
- package/dist-server/entities/pos-store.js +0 -106
- package/dist-server/entities/pos-store.js.map +0 -1
- package/dist-server/graphql/index.js +0 -33
- package/dist-server/graphql/index.js.map +0 -1
- package/dist-server/graphql/resolvers/index.js +0 -37
- package/dist-server/graphql/resolvers/index.js.map +0 -1
- package/dist-server/graphql/resolvers/pos/create-pos-store.js +0 -12
- package/dist-server/graphql/resolvers/pos/create-pos-store.js.map +0 -1
- package/dist-server/graphql/resolvers/pos/delete-pos-store.js +0 -16
- package/dist-server/graphql/resolvers/pos/delete-pos-store.js.map +0 -1
- package/dist-server/graphql/resolvers/pos/delete-pos-stores.js +0 -19
- package/dist-server/graphql/resolvers/pos/delete-pos-stores.js.map +0 -1
- package/dist-server/graphql/resolvers/pos/index.js +0 -37
- package/dist-server/graphql/resolvers/pos/index.js.map +0 -1
- package/dist-server/graphql/resolvers/pos/pos-store.js +0 -15
- package/dist-server/graphql/resolvers/pos/pos-store.js.map +0 -1
- package/dist-server/graphql/resolvers/pos/pos-stores.js +0 -14
- package/dist-server/graphql/resolvers/pos/pos-stores.js.map +0 -1
- package/dist-server/graphql/resolvers/pos/update-multiple-pos-stores.js +0 -30
- package/dist-server/graphql/resolvers/pos/update-multiple-pos-stores.js.map +0 -1
- package/dist-server/graphql/resolvers/pos/update-pos-store.js +0 -15
- package/dist-server/graphql/resolvers/pos/update-pos-store.js.map +0 -1
- package/dist-server/graphql/resolvers/pos/xilnex/deactivate-xilnex-store.js +0 -24
- package/dist-server/graphql/resolvers/pos/xilnex/deactivate-xilnex-store.js.map +0 -1
- package/dist-server/graphql/resolvers/pos/xilnex/generate-xilnex-access-token.js +0 -25
- package/dist-server/graphql/resolvers/pos/xilnex/generate-xilnex-access-token.js.map +0 -1
- package/dist-server/graphql/resolvers/pos/xilnex/index.js +0 -8
- package/dist-server/graphql/resolvers/pos/xilnex/index.js.map +0 -1
- package/dist-server/graphql/resolvers/pos-api/index.js +0 -7
- package/dist-server/graphql/resolvers/pos-api/index.js.map +0 -1
- package/dist-server/graphql/resolvers/pos-api/pos-outlet.js +0 -23
- package/dist-server/graphql/resolvers/pos-api/pos-outlet.js.map +0 -1
- package/dist-server/graphql/types/index.js +0 -42
- package/dist-server/graphql/types/index.js.map +0 -1
- package/dist-server/graphql/types/pos/index.js +0 -45
- package/dist-server/graphql/types/pos/index.js.map +0 -1
- package/dist-server/graphql/types/pos/new-pos-store.js +0 -17
- package/dist-server/graphql/types/pos/new-pos-store.js.map +0 -1
- package/dist-server/graphql/types/pos/pos-store-list.js +0 -14
- package/dist-server/graphql/types/pos/pos-store-list.js.map +0 -1
- package/dist-server/graphql/types/pos/pos-store-patch.js +0 -19
- package/dist-server/graphql/types/pos/pos-store-patch.js.map +0 -1
- package/dist-server/graphql/types/pos/pos-store.js +0 -26
- package/dist-server/graphql/types/pos/pos-store.js.map +0 -1
- package/dist-server/graphql/types/pos-api/pos-outlet.js +0 -44
- package/dist-server/graphql/types/pos-api/pos-outlet.js.map +0 -1
- package/dist-server/index.js +0 -24
- package/dist-server/index.js.map +0 -1
- package/dist-server/migrations/index.js +0 -12
- package/dist-server/migrations/index.js.map +0 -1
- package/dist-server/routes.js +0 -8
- package/dist-server/routes.js.map +0 -1
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var _a, _b, _c;
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.PosStore = void 0;
|
|
14
|
-
const auth_base_1 = require("@things-factory/auth-base");
|
|
15
|
-
const shell_1 = require("@things-factory/shell");
|
|
16
|
-
const typeorm_1 = require("typeorm");
|
|
17
|
-
let PosStore = class PosStore {
|
|
18
|
-
};
|
|
19
|
-
__decorate([
|
|
20
|
-
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
21
|
-
__metadata("design:type", String)
|
|
22
|
-
], PosStore.prototype, "id", void 0);
|
|
23
|
-
__decorate([
|
|
24
|
-
(0, typeorm_1.ManyToOne)(type => shell_1.Domain),
|
|
25
|
-
__metadata("design:type", typeof (_a = typeof shell_1.Domain !== "undefined" && shell_1.Domain) === "function" ? _a : Object)
|
|
26
|
-
], PosStore.prototype, "domain", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, typeorm_1.Column)(),
|
|
29
|
-
__metadata("design:type", String)
|
|
30
|
-
], PosStore.prototype, "platform", void 0);
|
|
31
|
-
__decorate([
|
|
32
|
-
(0, typeorm_1.Column)({
|
|
33
|
-
nullable: true
|
|
34
|
-
}),
|
|
35
|
-
__metadata("design:type", String)
|
|
36
|
-
], PosStore.prototype, "storeId", void 0);
|
|
37
|
-
__decorate([
|
|
38
|
-
(0, typeorm_1.Column)(),
|
|
39
|
-
__metadata("design:type", String)
|
|
40
|
-
], PosStore.prototype, "countryCode", void 0);
|
|
41
|
-
__decorate([
|
|
42
|
-
(0, typeorm_1.Column)({
|
|
43
|
-
nullable: true
|
|
44
|
-
}),
|
|
45
|
-
__metadata("design:type", String)
|
|
46
|
-
], PosStore.prototype, "status", void 0);
|
|
47
|
-
__decorate([
|
|
48
|
-
(0, typeorm_1.Column)(),
|
|
49
|
-
__metadata("design:type", String)
|
|
50
|
-
], PosStore.prototype, "name", void 0);
|
|
51
|
-
__decorate([
|
|
52
|
-
(0, typeorm_1.Column)({
|
|
53
|
-
nullable: true
|
|
54
|
-
}),
|
|
55
|
-
__metadata("design:type", String)
|
|
56
|
-
], PosStore.prototype, "accessInfo", void 0);
|
|
57
|
-
__decorate([
|
|
58
|
-
(0, typeorm_1.Column)({
|
|
59
|
-
nullable: true
|
|
60
|
-
}),
|
|
61
|
-
__metadata("design:type", String)
|
|
62
|
-
], PosStore.prototype, "accessToken", void 0);
|
|
63
|
-
__decorate([
|
|
64
|
-
(0, typeorm_1.Column)({
|
|
65
|
-
nullable: true
|
|
66
|
-
}),
|
|
67
|
-
__metadata("design:type", String)
|
|
68
|
-
], PosStore.prototype, "refreshToken", void 0);
|
|
69
|
-
__decorate([
|
|
70
|
-
(0, typeorm_1.Column)({
|
|
71
|
-
nullable: true
|
|
72
|
-
}),
|
|
73
|
-
__metadata("design:type", String)
|
|
74
|
-
], PosStore.prototype, "store", void 0);
|
|
75
|
-
__decorate([
|
|
76
|
-
(0, typeorm_1.Column)({
|
|
77
|
-
nullable: true
|
|
78
|
-
}),
|
|
79
|
-
__metadata("design:type", String)
|
|
80
|
-
], PosStore.prototype, "description", void 0);
|
|
81
|
-
__decorate([
|
|
82
|
-
(0, typeorm_1.CreateDateColumn)(),
|
|
83
|
-
__metadata("design:type", Date)
|
|
84
|
-
], PosStore.prototype, "createdAt", void 0);
|
|
85
|
-
__decorate([
|
|
86
|
-
(0, typeorm_1.UpdateDateColumn)(),
|
|
87
|
-
__metadata("design:type", Date)
|
|
88
|
-
], PosStore.prototype, "updatedAt", void 0);
|
|
89
|
-
__decorate([
|
|
90
|
-
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
|
|
91
|
-
nullable: true
|
|
92
|
-
}),
|
|
93
|
-
__metadata("design:type", typeof (_b = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _b : Object)
|
|
94
|
-
], PosStore.prototype, "creator", void 0);
|
|
95
|
-
__decorate([
|
|
96
|
-
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
|
|
97
|
-
nullable: true
|
|
98
|
-
}),
|
|
99
|
-
__metadata("design:type", typeof (_c = typeof auth_base_1.User !== "undefined" && auth_base_1.User) === "function" ? _c : Object)
|
|
100
|
-
], PosStore.prototype, "updater", void 0);
|
|
101
|
-
PosStore = __decorate([
|
|
102
|
-
(0, typeorm_1.Entity)(),
|
|
103
|
-
(0, typeorm_1.Index)('ix_pos-store_0', (store) => [store.domain, store.name], { unique: true })
|
|
104
|
-
], PosStore);
|
|
105
|
-
exports.PosStore = PosStore;
|
|
106
|
-
//# sourceMappingURL=pos-store.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pos-store.js","sourceRoot":"","sources":["../../server/entities/pos-store.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,yDAAgD;AAChD,iDAA8C;AAC9C,qCAAsH;AAO/G,IAAM,QAAQ,GAAd,MAAM,QAAQ;CAkEpB,CAAA;AAjEC;IAAC,IAAA,gCAAsB,EAAC,MAAM,CAAC;;oCACrB;AAEV;IAAC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;kDAClB,cAAM,oBAAN,cAAM;wCAAA;AAEd;IAAC,IAAA,gBAAM,GAAE;;0CACO;AAEhB;IAAC,IAAA,gBAAM,EAAC;QACN,QAAQ,EAAE,IAAI;KACf,CAAC;;yCACa;AAEf;IAAC,IAAA,gBAAM,GAAE;;6CACU;AAEnB;IAAC,IAAA,gBAAM,EAAC;QACN,QAAQ,EAAE,IAAI;KACf,CAAC;;wCACY;AAEd;IAAC,IAAA,gBAAM,GAAE;;sCACG;AAEZ;IAAC,IAAA,gBAAM,EAAC;QACN,QAAQ,EAAE,IAAI;KACf,CAAC;;4CACgB;AAElB;IAAC,IAAA,gBAAM,EAAC;QACN,QAAQ,EAAE,IAAI;KACf,CAAC;;6CACiB;AAEnB;IAAC,IAAA,gBAAM,EAAC;QACN,QAAQ,EAAE,IAAI;KACf,CAAC;;8CACkB;AAEpB;IAAC,IAAA,gBAAM,EAAC;QACN,QAAQ,EAAE,IAAI;KACf,CAAC;;uCACW;AAEb;IAAC,IAAA,gBAAM,EAAC;QACN,QAAQ,EAAE,IAAI;KACf,CAAC;;6CACiB;AAEnB;IAAC,IAAA,0BAAgB,GAAE;8BACR,IAAI;2CAAA;AAEf;IAAC,IAAA,0BAAgB,GAAE;8BACR,IAAI;2CAAA;AAEf;IAAC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE;QACvB,QAAQ,EAAE,IAAI;KACf,CAAC;kDACO,gBAAI,oBAAJ,gBAAI;yCAAA;AAEb;IAAC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE;QACvB,QAAQ,EAAE,IAAI;KACf,CAAC;kDACO,gBAAI,oBAAJ,gBAAI;yCAAA;AAjEF,QAAQ;IALpB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EACJ,gBAAgB,EAChB,CAAC,KAAe,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAClE;GACY,QAAQ,CAkEpB;AAlEY,4BAAQ"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.schema = void 0;
|
|
27
|
-
const typeDefs = __importStar(require("./types"));
|
|
28
|
-
const resolvers = __importStar(require("./resolvers"));
|
|
29
|
-
exports.schema = {
|
|
30
|
-
typeDefs,
|
|
31
|
-
resolvers
|
|
32
|
-
};
|
|
33
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/graphql/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAmC;AACnC,uDAAwC;AAE3B,QAAA,MAAM,GAAG;IACpB,QAAQ;IACR,SAAS;CACV,CAAA"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.mutations = exports.queries = void 0;
|
|
27
|
-
const POS = __importStar(require("./pos"));
|
|
28
|
-
const POSAPI = __importStar(require("./pos-api"));
|
|
29
|
-
exports.queries = [
|
|
30
|
-
POS.Query,
|
|
31
|
-
POSAPI.Query
|
|
32
|
-
];
|
|
33
|
-
exports.mutations = [
|
|
34
|
-
POS.Mutation,
|
|
35
|
-
POSAPI.Mutation
|
|
36
|
-
];
|
|
37
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/graphql/resolvers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4B;AAC5B,kDAAmC;AAEtB,QAAA,OAAO,GAAG;IACrB,GAAG,CAAC,KAAK;IACT,MAAM,CAAC,KAAK;CACb,CAAA;AAEY,QAAA,SAAS,GAAG;IACvB,GAAG,CAAC,QAAQ;IACZ,MAAM,CAAC,QAAQ;CAChB,CAAA"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createPosStore = void 0;
|
|
4
|
-
const typeorm_1 = require("typeorm");
|
|
5
|
-
const entities_1 = require("../../../entities");
|
|
6
|
-
const controllers_1 = require("../../../controllers");
|
|
7
|
-
exports.createPosStore = {
|
|
8
|
-
async createPosStore(_, { store }, context) {
|
|
9
|
-
return await (0, typeorm_1.getRepository)(entities_1.PosStore).save(Object.assign(Object.assign({ status: controllers_1.POS_STORE_STATUS.INACTIVE }, store), { domain: context.state.domain, creator: context.state.user, updater: context.state.user }));
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=create-pos-store.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-pos-store.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/pos/create-pos-store.ts"],"names":[],"mappings":";;;AAAA,qCAAuC;AACvC,gDAA4C;AAC5C,sDAAuD;AAE1C,QAAA,cAAc,GAAG;IAC5B,KAAK,CAAC,cAAc,CAAC,CAAM,EAAE,EAAE,KAAK,EAAE,EAAE,OAAY;QAClD,OAAO,MAAM,IAAA,uBAAa,EAAC,mBAAQ,CAAC,CAAC,IAAI,+BACvC,MAAM,EAAE,8BAAgB,CAAC,QAAQ,IAC9B,KAAK,KACR,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM,EAC5B,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,EAC3B,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,IAC3B,CAAA;IACJ,CAAC;CACF,CAAA"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deletePosStore = void 0;
|
|
4
|
-
const typeorm_1 = require("typeorm");
|
|
5
|
-
const entities_1 = require("../../../entities");
|
|
6
|
-
const controllers_1 = require("../../../controllers");
|
|
7
|
-
exports.deletePosStore = {
|
|
8
|
-
async deletePosStore(_, { name }, context) {
|
|
9
|
-
const foundStore = await (0, typeorm_1.getRepository)(entities_1.PosStore).findOne({
|
|
10
|
-
where: { domain: context.state.domain, name }
|
|
11
|
-
});
|
|
12
|
-
await (0, typeorm_1.getRepository)(entities_1.PosStore).save(Object.assign(Object.assign({}, foundStore), { status: controllers_1.POS_STORE_STATUS.TERMINATED, updater: context.state.user }));
|
|
13
|
-
return true;
|
|
14
|
-
}
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=delete-pos-store.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delete-pos-store.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/pos/delete-pos-store.ts"],"names":[],"mappings":";;;AAAA,qCAAuC;AACvC,gDAA4C;AAC5C,sDAAuD;AAE1C,QAAA,cAAc,GAAG;IAC5B,KAAK,CAAC,cAAc,CAAC,CAAM,EAAE,EAAE,IAAI,EAAE,EAAE,OAAY;QACjD,MAAM,UAAU,GAAa,MAAM,IAAA,uBAAa,EAAC,mBAAQ,CAAC,CAAC,OAAO,CAAC;YACjE,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE;SAC9C,CAAC,CAAA;QAEF,MAAM,IAAA,uBAAa,EAAC,mBAAQ,CAAC,CAAC,IAAI,iCAC7B,UAAU,KACb,MAAM,EAAE,8BAAgB,CAAC,UAAU,EACnC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,IAC3B,CAAA;QAEF,OAAO,IAAI,CAAA;IACb,CAAC;CACF,CAAA"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deletePosStores = void 0;
|
|
4
|
-
const typeorm_1 = require("typeorm");
|
|
5
|
-
const entities_1 = require("../../../entities");
|
|
6
|
-
const controllers_1 = require("../../../controllers");
|
|
7
|
-
exports.deletePosStores = {
|
|
8
|
-
async deletePosStores(_, { names }, context) {
|
|
9
|
-
let foundStores = await (0, typeorm_1.getRepository)(entities_1.PosStore).find({
|
|
10
|
-
where: { domain: context.state.domain, name: (0, typeorm_1.In)(names) }
|
|
11
|
-
});
|
|
12
|
-
const updatedPosStore = foundStores.map((store) => {
|
|
13
|
-
return Object.assign(Object.assign({}, store), { status: controllers_1.POS_STORE_STATUS.TERMINATED, updater: context.state.user });
|
|
14
|
-
});
|
|
15
|
-
await (0, typeorm_1.getRepository)(entities_1.PosStore).save(updatedPosStore);
|
|
16
|
-
return true;
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=delete-pos-stores.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delete-pos-stores.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/pos/delete-pos-stores.ts"],"names":[],"mappings":";;;AAAA,qCAA2C;AAC3C,gDAA4C;AAC5C,sDAAuD;AAE1C,QAAA,eAAe,GAAG;IAC7B,KAAK,CAAC,eAAe,CAAC,CAAM,EAAE,EAAE,KAAK,EAAE,EAAE,OAAY;QACnD,IAAI,WAAW,GAAe,MAAM,IAAA,uBAAa,EAAC,mBAAQ,CAAC,CAAC,IAAI,CAAC;YAC/D,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE,IAAA,YAAE,EAAC,KAAK,CAAC,EAAE;SACzD,CAAC,CAAA;QAEF,MAAM,eAAe,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,KAAe,EAAE,EAAE;YAC1D,uCACK,KAAK,KACR,MAAM,EAAE,8BAAgB,CAAC,UAAU,EACnC,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,IAC5B;QACH,CAAC,CAAC,CAAA;QAEF,MAAM,IAAA,uBAAa,EAAC,mBAAQ,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAA;QACnD,OAAO,IAAI,CAAA;IACb,CAAC;CACF,CAAA"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.Mutation = exports.Query = void 0;
|
|
27
|
-
const pos_store_1 = require("./pos-store");
|
|
28
|
-
const pos_stores_1 = require("./pos-stores");
|
|
29
|
-
const update_multiple_pos_stores_1 = require("./update-multiple-pos-stores");
|
|
30
|
-
const update_pos_store_1 = require("./update-pos-store");
|
|
31
|
-
const create_pos_store_1 = require("./create-pos-store");
|
|
32
|
-
const delete_pos_store_1 = require("./delete-pos-store");
|
|
33
|
-
const delete_pos_stores_1 = require("./delete-pos-stores");
|
|
34
|
-
const Xilnex = __importStar(require("./xilnex"));
|
|
35
|
-
exports.Query = Object.assign(Object.assign(Object.assign({}, pos_stores_1.posStoresResolver), pos_store_1.posStoreResolver), Xilnex.Query);
|
|
36
|
-
exports.Mutation = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, update_pos_store_1.updatePosStore), update_multiple_pos_stores_1.updateMultiplePosStore), create_pos_store_1.createPosStore), delete_pos_store_1.deletePosStore), delete_pos_stores_1.deletePosStores), Xilnex.Mutation);
|
|
37
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/pos/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA8C;AAC9C,6CAAgD;AAEhD,6EAAqE;AACrE,yDAAmD;AACnD,yDAAmD;AACnD,yDAAmD;AACnD,2DAAqD;AAErD,iDAAkC;AAErB,QAAA,KAAK,iDACb,8BAAiB,GACjB,4BAAgB,GAChB,MAAM,CAAC,KAAK,EAChB;AAEY,QAAA,QAAQ,2FAChB,iCAAc,GACd,mDAAsB,GACtB,iCAAc,GACd,iCAAc,GACd,mCAAe,GACf,MAAM,CAAC,QAAQ,EACnB"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.posStoreResolver = void 0;
|
|
4
|
-
const typeorm_1 = require("typeorm");
|
|
5
|
-
const entities_1 = require("../../../entities");
|
|
6
|
-
exports.posStoreResolver = {
|
|
7
|
-
async posStore(_, { id }, context) {
|
|
8
|
-
const repository = (0, typeorm_1.getRepository)(entities_1.PosStore);
|
|
9
|
-
return await (0, typeorm_1.getRepository)(entities_1.PosStore).findOne({
|
|
10
|
-
where: { domain: context.state.domain, id },
|
|
11
|
-
relations: ['domain', 'creator', 'updater']
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=pos-store.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pos-store.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/pos/pos-store.ts"],"names":[],"mappings":";;;AAAA,qCAAuC;AACvC,gDAA4C;AAE/B,QAAA,gBAAgB,GAAG;IAC9B,KAAK,CAAC,QAAQ,CAAC,CAAM,EAAE,EAAE,EAAE,EAAE,EAAE,OAAY;QACzC,MAAM,UAAU,GAAG,IAAA,uBAAa,EAAC,mBAAQ,CAAC,CAAA;QAE1C,OAAO,MAAM,IAAA,uBAAa,EAAC,mBAAQ,CAAC,CAAC,OAAO,CAAC;YAC3C,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,EAAE;YAC3C,SAAS,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAC;SAC5C,CAAC,CAAA;IACJ,CAAC;CACF,CAAA"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.posStoresResolver = void 0;
|
|
4
|
-
const shell_1 = require("@things-factory/shell");
|
|
5
|
-
const typeorm_1 = require("typeorm");
|
|
6
|
-
const entities_1 = require("../../../entities");
|
|
7
|
-
exports.posStoresResolver = {
|
|
8
|
-
async posStores(_, params, context) {
|
|
9
|
-
const convertedParams = (0, shell_1.convertListParams)(params, context.state.domain.id);
|
|
10
|
-
const [items, total] = await (0, typeorm_1.getRepository)(entities_1.PosStore).findAndCount(Object.assign(Object.assign({}, convertedParams), { relations: ['domain', 'creator', 'updater'] }));
|
|
11
|
-
return { items, total };
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=pos-stores.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pos-stores.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/pos/pos-stores.ts"],"names":[],"mappings":";;;AAAA,iDAAoE;AACpE,qCAAuC;AACvC,gDAA4C;AAE/B,QAAA,iBAAiB,GAAG;IAC/B,KAAK,CAAC,SAAS,CAAC,CAAM,EAAE,MAAiB,EAAE,OAAY;QACrD,MAAM,eAAe,GAAG,IAAA,yBAAiB,EAAC,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;QAC1E,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM,IAAA,uBAAa,EAAC,mBAAQ,CAAC,CAAC,YAAY,iCAC5D,eAAe,KAClB,SAAS,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAC,IAC3C,CAAA;QACF,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;IACzB,CAAC;CACF,CAAA"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateMultiplePosStore = void 0;
|
|
4
|
-
const typeorm_1 = require("typeorm");
|
|
5
|
-
const entities_1 = require("../../../entities");
|
|
6
|
-
exports.updateMultiplePosStore = {
|
|
7
|
-
async updateMultiplePosStore(_, { patches }, context) {
|
|
8
|
-
let results = [];
|
|
9
|
-
const _createRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === '+');
|
|
10
|
-
const _updateRecords = patches.filter((patch) => patch.cuFlag.toUpperCase() === 'M');
|
|
11
|
-
const posStoreRepo = (0, typeorm_1.getRepository)(entities_1.PosStore);
|
|
12
|
-
if (_createRecords.length > 0) {
|
|
13
|
-
for (let i = 0; i < _createRecords.length; i++) {
|
|
14
|
-
const newRecord = _createRecords[i];
|
|
15
|
-
const result = await posStoreRepo.save(Object.assign(Object.assign({}, newRecord), { domain: context.state.domain, creator: context.state.user, updater: context.state.user }));
|
|
16
|
-
results.push(Object.assign(Object.assign({}, result), { cuFlag: '+' }));
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
if (_updateRecords.length > 0) {
|
|
20
|
-
for (let i = 0; i < _updateRecords.length; i++) {
|
|
21
|
-
const newRecord = _updateRecords[i];
|
|
22
|
-
const store = await posStoreRepo.findOne(newRecord.id);
|
|
23
|
-
const result = await posStoreRepo.save(Object.assign(Object.assign(Object.assign({}, store), newRecord), { updater: context.state.user }));
|
|
24
|
-
results.push(Object.assign(Object.assign({}, result), { cuFlag: 'M' }));
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
return results;
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=update-multiple-pos-stores.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-multiple-pos-stores.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/pos/update-multiple-pos-stores.ts"],"names":[],"mappings":";;;AAAA,qCAAuC;AACvC,gDAA4C;AAE/B,QAAA,sBAAsB,GAAG;IACpC,KAAK,CAAC,sBAAsB,CAAC,CAAM,EAAE,EAAE,OAAO,EAAE,EAAE,OAAY;QAC5D,IAAI,OAAO,GAAG,EAAE,CAAA;QAChB,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE,KAAK,GAAG,CAAC,CAAA;QACzF,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,EAAE,KAAK,GAAG,CAAC,CAAA;QACzF,MAAM,YAAY,GAAG,IAAA,uBAAa,EAAC,mBAAQ,CAAC,CAAA;QAE5C,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE;YAC7B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBAC9C,MAAM,SAAS,GAAG,cAAc,CAAC,CAAC,CAAC,CAAA;gBAEnC,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,IAAI,iCACjC,SAAS,KACZ,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM,EAC5B,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,EAC3B,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,IAC3B,CAAA;gBAEF,OAAO,CAAC,IAAI,iCAAM,MAAM,KAAE,MAAM,EAAE,GAAG,IAAG,CAAA;aACzC;SACF;QAED,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE;YAC7B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBAC9C,MAAM,SAAS,GAAG,cAAc,CAAC,CAAC,CAAC,CAAA;gBACnC,MAAM,KAAK,GAAa,MAAM,YAAY,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,CAAA;gBAEhE,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,IAAI,+CACjC,KAAK,GACL,SAAS,KACZ,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,IAC3B,CAAA;gBAEF,OAAO,CAAC,IAAI,iCAAM,MAAM,KAAE,MAAM,EAAE,GAAG,IAAG,CAAA;aACzC;SACF;QAED,OAAO,OAAO,CAAA;IAChB,CAAC;CACF,CAAA"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updatePosStore = void 0;
|
|
4
|
-
const typeorm_1 = require("typeorm");
|
|
5
|
-
const entities_1 = require("../../../entities");
|
|
6
|
-
exports.updatePosStore = {
|
|
7
|
-
async updatePosStore(_, { name, patch }, context) {
|
|
8
|
-
const repository = (0, typeorm_1.getRepository)(entities_1.PosStore);
|
|
9
|
-
const store = await repository.findOne({
|
|
10
|
-
where: { domain: context.state.domain, name }
|
|
11
|
-
});
|
|
12
|
-
return await repository.save(Object.assign(Object.assign(Object.assign({}, store), patch), { updater: context.state.user }));
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=update-pos-store.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-pos-store.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/pos/update-pos-store.ts"],"names":[],"mappings":";;;AAAA,qCAAuC;AACvC,gDAA4C;AAE/B,QAAA,cAAc,GAAG;IAC5B,KAAK,CAAC,cAAc,CAAC,CAAM,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,OAAY;QACxD,MAAM,UAAU,GAAG,IAAA,uBAAa,EAAC,mBAAQ,CAAC,CAAA;QAC1C,MAAM,KAAK,GAAQ,MAAM,UAAU,CAAC,OAAO,CAAC;YAC1C,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE;SAC9C,CAAC,CAAA;QAEF,OAAO,MAAM,UAAU,CAAC,IAAI,+CACvB,KAAK,GACL,KAAK,KACR,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,IAC3B,CAAA;IACJ,CAAC;CACF,CAAA"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deactivateXilnexPosStore = void 0;
|
|
4
|
-
const typeorm_1 = require("typeorm");
|
|
5
|
-
const entities_1 = require("../../../../entities");
|
|
6
|
-
const controllers_1 = require("../../../../controllers");
|
|
7
|
-
exports.deactivateXilnexPosStore = {
|
|
8
|
-
async deactivateXilnexPosStore(_, { id }, context) {
|
|
9
|
-
const repository = (0, typeorm_1.getRepository)(entities_1.PosStore);
|
|
10
|
-
const store = await repository.findOne({
|
|
11
|
-
where: { domain: context.state.domain, id }
|
|
12
|
-
});
|
|
13
|
-
var patch = {
|
|
14
|
-
storeId: '',
|
|
15
|
-
accessToken: '',
|
|
16
|
-
refreshToken: '',
|
|
17
|
-
accessInfo: '',
|
|
18
|
-
countryCode: '',
|
|
19
|
-
status: controllers_1.POS_STORE_STATUS.INACTIVE
|
|
20
|
-
};
|
|
21
|
-
return await repository.save(Object.assign(Object.assign(Object.assign({}, store), patch), { updater: context.state.user }));
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=deactivate-xilnex-store.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deactivate-xilnex-store.js","sourceRoot":"","sources":["../../../../../server/graphql/resolvers/pos/xilnex/deactivate-xilnex-store.ts"],"names":[],"mappings":";;;AAAA,qCAAuC;AACvC,mDAA+C;AAC/C,yDAA0D;AAE7C,QAAA,wBAAwB,GAAG;IACtC,KAAK,CAAC,wBAAwB,CAAC,CAAM,EAAE,EAAE,EAAE,EAAE,EAAE,OAAY;QACzD,MAAM,UAAU,GAAG,IAAA,uBAAa,EAAC,mBAAQ,CAAC,CAAA;QAC1C,MAAM,KAAK,GAAQ,MAAM,UAAU,CAAC,OAAO,CAAC;YAC1C,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,EAAE;SAC5C,CAAC,CAAA;QAEF,IAAI,KAAK,GAAG;YACV,OAAO,EAAE,EAAE;YACX,WAAW,EAAE,EAAE;YACf,YAAY,EAAE,EAAE;YAChB,UAAU,EAAE,EAAE;YACd,WAAW,EAAE,EAAE;YACf,MAAM,EAAE,8BAAgB,CAAC,QAAQ;SAClC,CAAA;QAED,OAAO,MAAM,UAAU,CAAC,IAAI,+CACvB,KAAK,GACL,KAAK,KACR,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,IAC3B,CAAA;IACJ,CAAC;CACF,CAAA"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.generateXilnexAccessToken = void 0;
|
|
4
|
-
const typeorm_1 = require("typeorm");
|
|
5
|
-
const entities_1 = require("../../../../entities");
|
|
6
|
-
const controllers_1 = require("../../../../controllers");
|
|
7
|
-
const env_1 = require("@things-factory/env");
|
|
8
|
-
const xilnexConfig = env_1.config.get('posIntegrationXilnex', {});
|
|
9
|
-
const { apiKey, apiSecret } = xilnexConfig;
|
|
10
|
-
exports.generateXilnexAccessToken = {
|
|
11
|
-
async generateXilnexAccessToken(_, { id, appid, token }, context) {
|
|
12
|
-
const repository = (0, typeorm_1.getRepository)(entities_1.PosStore);
|
|
13
|
-
const store = await repository.findOne({
|
|
14
|
-
where: { domain: context.state.domain, id }
|
|
15
|
-
});
|
|
16
|
-
var patch = {
|
|
17
|
-
accessToken: token,
|
|
18
|
-
refreshToken: '',
|
|
19
|
-
storeId: appid,
|
|
20
|
-
status: controllers_1.POS_STORE_STATUS.ACTIVE
|
|
21
|
-
};
|
|
22
|
-
return await repository.save(Object.assign(Object.assign(Object.assign({}, store), patch), { updater: context.state.user }));
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
//# sourceMappingURL=generate-xilnex-access-token.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generate-xilnex-access-token.js","sourceRoot":"","sources":["../../../../../server/graphql/resolvers/pos/xilnex/generate-xilnex-access-token.ts"],"names":[],"mappings":";;;AACA,qCAAuC;AACvC,mDAA+C;AAC/C,yDAA0D;AAE1D,6CAA4C;AAC5C,MAAM,YAAY,GAAG,YAAM,CAAC,GAAG,CAAC,sBAAsB,EAAE,EAAE,CAAC,CAAA;AAC3D,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,YAAY,CAAA;AAE7B,QAAA,yBAAyB,GAAG;IACvC,KAAK,CAAC,yBAAyB,CAAC,CAAM,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,OAAY;QACxE,MAAM,UAAU,GAAG,IAAA,uBAAa,EAAC,mBAAQ,CAAC,CAAA;QAC1C,MAAM,KAAK,GAAQ,MAAM,UAAU,CAAC,OAAO,CAAC;YAC1C,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,EAAE;SAC5C,CAAC,CAAA;QAEF,IAAI,KAAK,GAAG;YACV,WAAW,EAAE,KAAK;YAClB,YAAY,EAAE,EAAE;YAChB,OAAO,EAAE,KAAK;YACd,MAAM,EAAE,8BAAgB,CAAC,MAAM;SAChC,CAAA;QAED,OAAO,MAAM,UAAU,CAAC,IAAI,+CACvB,KAAK,GACL,KAAK,KACR,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,IAC3B,CAAA;IACJ,CAAC;CACF,CAAA"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Mutation = exports.Query = void 0;
|
|
4
|
-
const deactivate_xilnex_store_1 = require("./deactivate-xilnex-store");
|
|
5
|
-
const generate_xilnex_access_token_1 = require("./generate-xilnex-access-token");
|
|
6
|
-
exports.Query = {};
|
|
7
|
-
exports.Mutation = Object.assign(Object.assign({}, generate_xilnex_access_token_1.generateXilnexAccessToken), deactivate_xilnex_store_1.deactivateXilnexPosStore);
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../server/graphql/resolvers/pos/xilnex/index.ts"],"names":[],"mappings":";;;AAAA,uEAAoE;AACpE,iFAA0E;AAE7D,QAAA,KAAK,GAAG,EAAE,CAAA;AAEV,QAAA,QAAQ,mCAChB,wDAAyB,GACzB,kDAAwB,EAC5B"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Mutation = exports.Query = void 0;
|
|
4
|
-
const pos_outlet_1 = require("./pos-outlet");
|
|
5
|
-
exports.Query = Object.assign({}, pos_outlet_1.queryPosOutlet);
|
|
6
|
-
exports.Mutation = {};
|
|
7
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/pos-api/index.ts"],"names":[],"mappings":";;;AAAA,6CAA6C;AAEhC,QAAA,KAAK,qBACb,2BAAc,EAClB;AAEY,QAAA,QAAQ,GAAG,EACvB,CAAA"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mutatePosOutlet = exports.queryPosOutlet = void 0;
|
|
4
|
-
const pos_api_1 = require("../../../controllers/pos-api");
|
|
5
|
-
exports.queryPosOutlet = {
|
|
6
|
-
async getPosOutlets(_, { posId, params: ListParam }, context) {
|
|
7
|
-
var pos = await pos_api_1.POSAPI.getPosStore(posId);
|
|
8
|
-
return await pos_api_1.POSAPI.getOutlets(pos, {
|
|
9
|
-
pagination: {
|
|
10
|
-
page: 0,
|
|
11
|
-
limit: 100
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
},
|
|
15
|
-
async getPosOutlet(_, { posId, outletNo }, context) {
|
|
16
|
-
var pos = await pos_api_1.POSAPI.getPosStore(posId);
|
|
17
|
-
return await pos_api_1.POSAPI.getOutlet(pos, {
|
|
18
|
-
outletNo
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
exports.mutatePosOutlet = {};
|
|
23
|
-
//# sourceMappingURL=pos-outlet.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pos-outlet.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/pos-api/pos-outlet.ts"],"names":[],"mappings":";;;AAAA,0DAAqD;AAExC,QAAA,cAAc,GAAG;IAC5B,KAAK,CAAC,aAAa,CAAC,CAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAG,EAAE,OAAY;QACrE,IAAI,GAAG,GAAG,MAAM,gBAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAA;QAEzC,OAAO,MAAM,gBAAM,CAAC,UAAU,CAAC,GAAG,EAAE;YAClC,UAAU,EAAE;gBACV,IAAI,EAAE,CAAC;gBACP,KAAK,EAAE,GAAG;aACX;SACF,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,CAAM,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,OAAY;QAC1D,IAAI,GAAG,GAAG,MAAM,gBAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAA;QAEzC,OAAO,MAAM,gBAAM,CAAC,SAAS,CAAC,GAAG,EAAE;YACjC,QAAQ;SACT,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAEY,QAAA,eAAe,GAAG,EAAE,CAAA"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.types = exports.subscriptions = exports.mutations = exports.queries = void 0;
|
|
27
|
-
const POS = __importStar(require("./pos"));
|
|
28
|
-
const Outlet = __importStar(require("./pos-api/pos-outlet"));
|
|
29
|
-
exports.queries = [
|
|
30
|
-
POS.Query,
|
|
31
|
-
Outlet.Query
|
|
32
|
-
];
|
|
33
|
-
exports.mutations = [
|
|
34
|
-
POS.Mutation,
|
|
35
|
-
Outlet.Mutation
|
|
36
|
-
];
|
|
37
|
-
exports.subscriptions = [];
|
|
38
|
-
exports.types = [
|
|
39
|
-
...POS.Types,
|
|
40
|
-
...Outlet.Types
|
|
41
|
-
];
|
|
42
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/graphql/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4B;AAC5B,6DAA8C;AAEjC,QAAA,OAAO,GAAG;IACrB,GAAG,CAAC,KAAK;IACT,MAAM,CAAC,KAAK;CACb,CAAA;AAEY,QAAA,SAAS,GAAG;IACvB,GAAG,CAAC,QAAQ;IACZ,MAAM,CAAC,QAAQ;CAChB,CAAA;AAEY,QAAA,aAAa,GAAG,EAAE,CAAA;AAElB,QAAA,KAAK,GAAG;IACnB,GAAG,GAAG,CAAC,KAAK;IACZ,GAAG,MAAM,CAAC,KAAK;CAChB,CAAA"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Types = exports.Query = exports.Mutation = void 0;
|
|
4
|
-
const pos_store_1 = require("./pos-store");
|
|
5
|
-
const new_pos_store_1 = require("./new-pos-store");
|
|
6
|
-
const pos_store_patch_1 = require("./pos-store-patch");
|
|
7
|
-
const pos_store_list_1 = require("./pos-store-list");
|
|
8
|
-
exports.Mutation = `
|
|
9
|
-
createPosStore (
|
|
10
|
-
store: NewPosStore!
|
|
11
|
-
): PosStore
|
|
12
|
-
|
|
13
|
-
updatePosStore (
|
|
14
|
-
name: String!
|
|
15
|
-
patch: PosStorePatch!
|
|
16
|
-
): PosStore
|
|
17
|
-
|
|
18
|
-
updateMultiplePosStore (
|
|
19
|
-
patches: [PosStorePatch]!
|
|
20
|
-
): [PosStore]
|
|
21
|
-
|
|
22
|
-
deletePosStore (
|
|
23
|
-
name: String!
|
|
24
|
-
): Boolean
|
|
25
|
-
|
|
26
|
-
deletePosStores (
|
|
27
|
-
names: [String]!
|
|
28
|
-
): Boolean
|
|
29
|
-
|
|
30
|
-
generateXilnexAccessToken (
|
|
31
|
-
id: String!
|
|
32
|
-
appid: String!
|
|
33
|
-
token: String!
|
|
34
|
-
): PosStore
|
|
35
|
-
|
|
36
|
-
deactivateXilnexPosStore (
|
|
37
|
-
name: String!
|
|
38
|
-
): PosStore
|
|
39
|
-
`;
|
|
40
|
-
exports.Query = `
|
|
41
|
-
posStores(filters: [Filter], pagination: Pagination, sortings: [Sorting]): PosStoreList
|
|
42
|
-
posStore(id: String!): PosStore
|
|
43
|
-
`;
|
|
44
|
-
exports.Types = [pos_store_1.PosStore, new_pos_store_1.NewPosStore, pos_store_patch_1.PosStorePatch, pos_store_list_1.PosStoreList];
|
|
45
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../server/graphql/types/pos/index.ts"],"names":[],"mappings":";;;AAAA,2CAAsC;AACtC,mDAA6C;AAC7C,uDAAiD;AACjD,qDAA+C;AAElC,QAAA,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BvB,CAAA;AAEY,QAAA,KAAK,GAAG;;;CAGpB,CAAA;AAEY,QAAA,KAAK,GAAG,CAAC,oBAAQ,EAAE,2BAAW,EAAE,+BAAa,EAAE,6BAAY,CAAC,CAAA"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.NewPosStore = void 0;
|
|
7
|
-
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
8
|
-
exports.NewPosStore = (0, graphql_tag_1.default) `
|
|
9
|
-
input NewPosStore {
|
|
10
|
-
name: String!
|
|
11
|
-
description: String
|
|
12
|
-
platform: String!
|
|
13
|
-
storeId: String
|
|
14
|
-
countryCode: String
|
|
15
|
-
}
|
|
16
|
-
`;
|
|
17
|
-
//# sourceMappingURL=new-pos-store.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"new-pos-store.js","sourceRoot":"","sources":["../../../../server/graphql/types/pos/new-pos-store.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA6B;AAEhB,QAAA,WAAW,GAAG,IAAA,qBAAG,EAAA;;;;;;;;CAQ7B,CAAA"}
|