@newskit-render/api 1.8.0-alpha.0 → 1.8.0-alpha.2
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/cjs/commentingAdminService/confirmUsertype.d.ts +1 -0
- package/dist/cjs/commentingAdminService/confirmUsertype.js +15 -0
- package/dist/cjs/commentingAdminService/confirmUsertype.js.map +1 -0
- package/dist/cjs/commentingAdminService/getCommentingData.d.ts +1 -0
- package/dist/cjs/commentingAdminService/getCommentingData.js +76 -0
- package/dist/cjs/commentingAdminService/getCommentingData.js.map +1 -0
- package/dist/cjs/commentingAdminService/index.d.ts +2 -0
- package/dist/cjs/commentingAdminService/index.js +19 -0
- package/dist/cjs/commentingAdminService/index.js.map +1 -0
- package/dist/cjs/commentingAdminService/types.d.ts +21 -0
- package/dist/cjs/commentingAdminService/types.js +3 -0
- package/dist/cjs/commentingAdminService/types.js.map +1 -0
- package/dist/cjs/commentingAdminService/updateCommentingData.d.ts +2 -0
- package/dist/cjs/commentingAdminService/updateCommentingData.js +88 -0
- package/dist/cjs/commentingAdminService/updateCommentingData.js.map +1 -0
- package/dist/cjs/config/index.d.ts +1 -1
- package/dist/cjs/config/index.js +3 -2
- package/dist/cjs/config/index.js.map +1 -1
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/commentingAdminService/confirmUsertype.d.ts +1 -0
- package/dist/esm/commentingAdminService/confirmUsertype.js +8 -0
- package/dist/esm/commentingAdminService/confirmUsertype.js.map +1 -0
- package/dist/esm/commentingAdminService/getCommentingData.d.ts +1 -0
- package/dist/esm/commentingAdminService/getCommentingData.js +69 -0
- package/dist/esm/commentingAdminService/getCommentingData.js.map +1 -0
- package/dist/esm/commentingAdminService/index.d.ts +2 -0
- package/dist/esm/commentingAdminService/index.js +3 -0
- package/dist/esm/commentingAdminService/index.js.map +1 -0
- package/dist/esm/commentingAdminService/types.d.ts +21 -0
- package/dist/esm/commentingAdminService/types.js +2 -0
- package/dist/esm/commentingAdminService/types.js.map +1 -0
- package/dist/esm/commentingAdminService/updateCommentingData.d.ts +2 -0
- package/dist/esm/commentingAdminService/updateCommentingData.js +81 -0
- package/dist/esm/commentingAdminService/updateCommentingData.js.map +1 -0
- package/dist/esm/config/index.d.ts +1 -1
- package/dist/esm/config/index.js +2 -1
- package/dist/esm/config/index.js.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const confirmUserType: (cookieSession: string) => void;
|
|
@@ -0,0 +1,15 @@
|
|
|
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.confirmUserType = void 0;
|
|
7
|
+
var cookie_1 = __importDefault(require("cookie"));
|
|
8
|
+
var confirmUserType = function (cookieSession) {
|
|
9
|
+
var cookies = cookie_1.default.parse(cookieSession);
|
|
10
|
+
if (!cookies['acs_tnl']) {
|
|
11
|
+
throw new Error('Must be a tnl user account');
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
exports.confirmUserType = confirmUserType;
|
|
15
|
+
//# sourceMappingURL=confirmUsertype.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confirmUsertype.js","sourceRoot":"","sources":["../../../src/commentingAdminService/confirmUsertype.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA2B;AAEpB,IAAM,eAAe,GAAG,UAAC,aAAqB;IACnD,IAAM,OAAO,GAAG,gBAAM,CAAC,KAAK,CAAC,aAAa,CAAC,CAAA;IAC3C,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;QACvB,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAA;KAC9C;AACH,CAAC,CAAA;AALY,QAAA,eAAe,mBAK3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getCommentingData: (cpn: string, cookieSession: string) => Promise<any>;
|
|
@@ -0,0 +1,76 @@
|
|
|
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
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
+
};
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
exports.getCommentingData = void 0;
|
|
43
|
+
var cross_fetch_1 = __importDefault(require("cross-fetch"));
|
|
44
|
+
var config_1 = require("../config");
|
|
45
|
+
var confirmUsertype_1 = require("./confirmUsertype");
|
|
46
|
+
var getCommentingData = function (cpn, cookieSession) { return __awaiter(void 0, void 0, void 0, function () {
|
|
47
|
+
var response, data, err_1;
|
|
48
|
+
return __generator(this, function (_a) {
|
|
49
|
+
switch (_a.label) {
|
|
50
|
+
case 0:
|
|
51
|
+
_a.trys.push([0, 3, , 4]);
|
|
52
|
+
(0, confirmUsertype_1.confirmUserType)(cookieSession);
|
|
53
|
+
return [4 /*yield*/, (0, cross_fetch_1.default)("".concat(config_1.commentingAdminServiceUrl).concat(cpn, "?brand=tnl"), {
|
|
54
|
+
method: 'GET',
|
|
55
|
+
headers: {
|
|
56
|
+
cookie: cookieSession,
|
|
57
|
+
},
|
|
58
|
+
})];
|
|
59
|
+
case 1:
|
|
60
|
+
response = _a.sent();
|
|
61
|
+
return [4 /*yield*/, response.json()];
|
|
62
|
+
case 2:
|
|
63
|
+
data = _a.sent();
|
|
64
|
+
return [2 /*return*/, data];
|
|
65
|
+
case 3:
|
|
66
|
+
err_1 = _a.sent();
|
|
67
|
+
console.error('Error: unable to get commenting data', err_1);
|
|
68
|
+
return [2 /*return*/, {
|
|
69
|
+
user: {},
|
|
70
|
+
}];
|
|
71
|
+
case 4: return [2 /*return*/];
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}); };
|
|
75
|
+
exports.getCommentingData = getCommentingData;
|
|
76
|
+
//# sourceMappingURL=getCommentingData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getCommentingData.js","sourceRoot":"","sources":["../../../src/commentingAdminService/getCommentingData.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4DAA+B;AAC/B,oCAAqD;AACrD,qDAAmD;AAE5C,IAAM,iBAAiB,GAAG,UAAO,GAAW,EAAE,aAAqB;;;;;;gBAEtE,IAAA,iCAAe,EAAC,aAAa,CAAC,CAAA;gBAEb,qBAAM,IAAA,qBAAK,EAC1B,UAAG,kCAAyB,SAAG,GAAG,eAAY,EAC9C;wBACE,MAAM,EAAE,KAAK;wBACb,OAAO,EAAE;4BACP,MAAM,EAAE,aAAa;yBACtB;qBACF,CACF,EAAA;;gBARK,QAAQ,GAAG,SAQhB;gBACY,qBAAM,QAAQ,CAAC,IAAI,EAAE,EAAA;;gBAA5B,IAAI,GAAG,SAAqB;gBAElC,sBAAO,IAAI,EAAA;;;gBAEX,OAAO,CAAC,KAAK,CAAC,sCAAsC,EAAE,KAAG,CAAC,CAAA;gBAC1D,sBAAO;wBACL,IAAI,EAAE,EAAE;qBACT,EAAA;;;;KAEJ,CAAA;AAtBY,QAAA,iBAAiB,qBAsB7B"}
|
|
@@ -0,0 +1,19 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./getCommentingData"), exports);
|
|
18
|
+
__exportStar(require("./updateCommentingData"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commentingAdminService/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAmC;AACnC,yDAAsC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface UpdateCommentingDataObject {
|
|
2
|
+
cpn: string;
|
|
3
|
+
displayName: string;
|
|
4
|
+
email: string;
|
|
5
|
+
likes?: string;
|
|
6
|
+
mentions?: string;
|
|
7
|
+
replies?: string;
|
|
8
|
+
username: string;
|
|
9
|
+
}
|
|
10
|
+
export interface UpdateCommentingBodyObject {
|
|
11
|
+
brand: 'tnl';
|
|
12
|
+
cpn: string;
|
|
13
|
+
displayName: string;
|
|
14
|
+
email: string;
|
|
15
|
+
preferences: {
|
|
16
|
+
likes: string;
|
|
17
|
+
mentions: string;
|
|
18
|
+
replies: string;
|
|
19
|
+
};
|
|
20
|
+
username: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/commentingAdminService/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,88 @@
|
|
|
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
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
+
};
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
exports.updateCommentingData = void 0;
|
|
43
|
+
var cross_fetch_1 = __importDefault(require("cross-fetch"));
|
|
44
|
+
var config_1 = require("../config");
|
|
45
|
+
var confirmUsertype_1 = require("./confirmUsertype");
|
|
46
|
+
var updateCommentingData = function (inputData, cookieSession) { return __awaiter(void 0, void 0, void 0, function () {
|
|
47
|
+
var body, response, data, err_1;
|
|
48
|
+
return __generator(this, function (_a) {
|
|
49
|
+
switch (_a.label) {
|
|
50
|
+
case 0:
|
|
51
|
+
_a.trys.push([0, 3, , 4]);
|
|
52
|
+
(0, confirmUsertype_1.confirmUserType)(cookieSession);
|
|
53
|
+
body = {
|
|
54
|
+
brand: 'tnl',
|
|
55
|
+
cpn: inputData.cpn,
|
|
56
|
+
displayName: inputData.displayName,
|
|
57
|
+
email: inputData.email,
|
|
58
|
+
preferences: {
|
|
59
|
+
likes: inputData.likes || 'never',
|
|
60
|
+
mentions: inputData.mentions || 'never',
|
|
61
|
+
replies: inputData.replies || 'never',
|
|
62
|
+
},
|
|
63
|
+
username: inputData.username,
|
|
64
|
+
};
|
|
65
|
+
return [4 /*yield*/, (0, cross_fetch_1.default)("".concat(config_1.commentingAdminServiceUrl).concat(body.cpn), {
|
|
66
|
+
method: 'PUT',
|
|
67
|
+
body: JSON.stringify(body),
|
|
68
|
+
headers: {
|
|
69
|
+
'Content-Type': 'application/json',
|
|
70
|
+
cookie: cookieSession,
|
|
71
|
+
},
|
|
72
|
+
})];
|
|
73
|
+
case 1:
|
|
74
|
+
response = _a.sent();
|
|
75
|
+
return [4 /*yield*/, response.json()];
|
|
76
|
+
case 2:
|
|
77
|
+
data = _a.sent();
|
|
78
|
+
return [2 /*return*/, data];
|
|
79
|
+
case 3:
|
|
80
|
+
err_1 = _a.sent();
|
|
81
|
+
console.error('Error: unable to update commenting data', err_1);
|
|
82
|
+
return [2 /*return*/, Promise.reject('Error: unable to update commenting data')];
|
|
83
|
+
case 4: return [2 /*return*/];
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
}); };
|
|
87
|
+
exports.updateCommentingData = updateCommentingData;
|
|
88
|
+
//# sourceMappingURL=updateCommentingData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateCommentingData.js","sourceRoot":"","sources":["../../../src/commentingAdminService/updateCommentingData.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4DAA+B;AAC/B,oCAAqD;AAErD,qDAAmD;AAE5C,IAAM,oBAAoB,GAAG,UAClC,SAAqC,EACrC,aAAqB;;;;;;gBAGnB,IAAA,iCAAe,EAAC,aAAa,CAAC,CAAA;gBAExB,IAAI,GAA+B;oBACvC,KAAK,EAAE,KAAK;oBACZ,GAAG,EAAE,SAAS,CAAC,GAAG;oBAClB,WAAW,EAAE,SAAS,CAAC,WAAW;oBAClC,KAAK,EAAE,SAAS,CAAC,KAAK;oBACtB,WAAW,EAAE;wBACX,KAAK,EAAE,SAAS,CAAC,KAAK,IAAI,OAAO;wBACjC,QAAQ,EAAE,SAAS,CAAC,QAAQ,IAAI,OAAO;wBACvC,OAAO,EAAE,SAAS,CAAC,OAAO,IAAI,OAAO;qBACtC;oBACD,QAAQ,EAAE,SAAS,CAAC,QAAQ;iBAC7B,CAAA;gBAEgB,qBAAM,IAAA,qBAAK,EAAC,UAAG,kCAAyB,SAAG,IAAI,CAAC,GAAG,CAAE,EAAE;wBACtE,MAAM,EAAE,KAAK;wBACb,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;wBAC1B,OAAO,EAAE;4BACP,cAAc,EAAE,kBAAkB;4BAClC,MAAM,EAAE,aAAa;yBACtB;qBACF,CAAC,EAAA;;gBAPI,QAAQ,GAAG,SAOf;gBACW,qBAAM,QAAQ,CAAC,IAAI,EAAE,EAAA;;gBAA5B,IAAI,GAAG,SAAqB;gBAClC,sBAAO,IAAI,EAAA;;;gBAEX,OAAO,CAAC,KAAK,CAAC,yCAAyC,EAAE,KAAG,CAAC,CAAA;gBAC7D,sBAAO,OAAO,CAAC,MAAM,CAAC,yCAAyC,CAAC,EAAA;;;;KAEnE,CAAA;AAlCY,QAAA,oBAAoB,wBAkChC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const acsTestPassword: string, acsTestAccount: string, newskitApiXApiKey: string, newskitApiEnvUrl: string, mainGraphqlUrl: string, accountProviderGraphqlUrl: string, acsSessionUrl: string;
|
|
1
|
+
export declare const acsTestPassword: string, acsTestAccount: string, newskitApiXApiKey: string, newskitApiEnvUrl: string, mainGraphqlUrl: string, accountProviderGraphqlUrl: string, acsSessionUrl: string, commentingAdminServiceUrl: string;
|
package/dist/cjs/config/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.acsSessionUrl = exports.accountProviderGraphqlUrl = exports.mainGraphqlUrl = exports.newskitApiEnvUrl = exports.newskitApiXApiKey = exports.acsTestAccount = exports.acsTestPassword = void 0;
|
|
3
|
+
exports.commentingAdminServiceUrl = exports.acsSessionUrl = exports.accountProviderGraphqlUrl = exports.mainGraphqlUrl = exports.newskitApiEnvUrl = exports.newskitApiXApiKey = exports.acsTestAccount = exports.acsTestPassword = void 0;
|
|
4
4
|
var config = {
|
|
5
5
|
acsTestPassword: process.env.ACS_TEST_PASSWORD,
|
|
6
6
|
acsTestAccount: process.env.ACS_TEST_ACCOUNT,
|
|
@@ -9,6 +9,7 @@ var config = {
|
|
|
9
9
|
mainGraphqlUrl: process.env.MAIN_GRAPHQL_URL,
|
|
10
10
|
accountProviderGraphqlUrl: process.env.ACCOUNT_PROVIDER_GRAPHQL_URL,
|
|
11
11
|
acsSessionUrl: process.env.ACS_SESSION_URL,
|
|
12
|
+
commentingAdminServiceUrl: process.env.COMMENTING_ADMIN_SERVICE_URL,
|
|
12
13
|
};
|
|
13
|
-
exports.acsTestPassword = config.acsTestPassword, exports.acsTestAccount = config.acsTestAccount, exports.newskitApiXApiKey = config.newskitApiXApiKey, exports.newskitApiEnvUrl = config.newskitApiEnvUrl, exports.mainGraphqlUrl = config.mainGraphqlUrl, exports.accountProviderGraphqlUrl = config.accountProviderGraphqlUrl, exports.acsSessionUrl = config.acsSessionUrl;
|
|
14
|
+
exports.acsTestPassword = config.acsTestPassword, exports.acsTestAccount = config.acsTestAccount, exports.newskitApiXApiKey = config.newskitApiXApiKey, exports.newskitApiEnvUrl = config.newskitApiEnvUrl, exports.mainGraphqlUrl = config.mainGraphqlUrl, exports.accountProviderGraphqlUrl = config.accountProviderGraphqlUrl, exports.acsSessionUrl = config.acsSessionUrl, exports.commentingAdminServiceUrl = config.commentingAdminServiceUrl;
|
|
14
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":";;;AAAA,IAAM,MAAM,GAAG;IACb,eAAe,EAAE,OAAO,CAAC,GAAG,CAAC,iBAA2B;IACxD,cAAc,EAAE,OAAO,CAAC,GAAG,CAAC,gBAA0B;IACtD,iBAAiB,EAAE,OAAO,CAAC,GAAG,CAAC,qBAA+B;IAC9D,gBAAgB,EAAE,OAAO,CAAC,GAAG,CAAC,mBAA6B;IAC3D,cAAc,EAAE,OAAO,CAAC,GAAG,CAAC,gBAA0B;IACtD,yBAAyB,EAAE,OAAO,CAAC,GAAG,CAAC,4BAAsC;IAC7E,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,eAAyB;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":";;;AAAA,IAAM,MAAM,GAAG;IACb,eAAe,EAAE,OAAO,CAAC,GAAG,CAAC,iBAA2B;IACxD,cAAc,EAAE,OAAO,CAAC,GAAG,CAAC,gBAA0B;IACtD,iBAAiB,EAAE,OAAO,CAAC,GAAG,CAAC,qBAA+B;IAC9D,gBAAgB,EAAE,OAAO,CAAC,GAAG,CAAC,mBAA6B;IAC3D,cAAc,EAAE,OAAO,CAAC,GAAG,CAAC,gBAA0B;IACtD,yBAAyB,EAAE,OAAO,CAAC,GAAG,CAAC,4BAAsC;IAC7E,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,eAAyB;IACpD,yBAAyB,EAAE,OAAO,CAAC,GAAG,CAAC,4BAAsC;CAC9E,CAAA;AAGC,QAAA,eAAe,GAQb,MAAM,kBAPR,QAAA,cAAc,GAOZ,MAAM,iBANR,QAAA,iBAAiB,GAMf,MAAM,oBALR,QAAA,gBAAgB,GAKd,MAAM,mBAJR,QAAA,cAAc,GAIZ,MAAM,iBAHR,QAAA,yBAAyB,GAGvB,MAAM,4BAFR,QAAA,aAAa,GAEX,MAAM,gBADR,QAAA,yBAAyB,GACvB,MAAM,2BAAA"}
|
package/dist/cjs/index.d.ts
CHANGED
package/dist/cjs/index.js
CHANGED
|
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./apolloClient"), exports);
|
|
18
18
|
__exportStar(require("./helpers"), exports);
|
|
19
19
|
__exportStar(require("./fetchSessionCookie"), exports);
|
|
20
|
+
__exportStar(require("./commentingAdminService"), exports);
|
|
20
21
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA8B;AAC9B,4CAAyB;AACzB,uDAAoC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA8B;AAC9B,4CAAyB;AACzB,uDAAoC;AACpC,2DAAwC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const confirmUserType: (cookieSession: string) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confirmUsertype.js","sourceRoot":"","sources":["../../../src/commentingAdminService/confirmUsertype.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,QAAQ,CAAA;AAE3B,MAAM,CAAC,IAAM,eAAe,GAAG,UAAC,aAAqB;IACnD,IAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,CAAA;IAC3C,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;QACvB,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAA;KAC9C;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getCommentingData: (cpn: string, cookieSession: string) => Promise<any>;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
12
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
import fetch from 'cross-fetch';
|
|
38
|
+
import { commentingAdminServiceUrl } from '../config';
|
|
39
|
+
import { confirmUserType } from './confirmUsertype';
|
|
40
|
+
export var getCommentingData = function (cpn, cookieSession) { return __awaiter(void 0, void 0, void 0, function () {
|
|
41
|
+
var response, data, err_1;
|
|
42
|
+
return __generator(this, function (_a) {
|
|
43
|
+
switch (_a.label) {
|
|
44
|
+
case 0:
|
|
45
|
+
_a.trys.push([0, 3, , 4]);
|
|
46
|
+
confirmUserType(cookieSession);
|
|
47
|
+
return [4 /*yield*/, fetch("".concat(commentingAdminServiceUrl).concat(cpn, "?brand=tnl"), {
|
|
48
|
+
method: 'GET',
|
|
49
|
+
headers: {
|
|
50
|
+
cookie: cookieSession,
|
|
51
|
+
},
|
|
52
|
+
})];
|
|
53
|
+
case 1:
|
|
54
|
+
response = _a.sent();
|
|
55
|
+
return [4 /*yield*/, response.json()];
|
|
56
|
+
case 2:
|
|
57
|
+
data = _a.sent();
|
|
58
|
+
return [2 /*return*/, data];
|
|
59
|
+
case 3:
|
|
60
|
+
err_1 = _a.sent();
|
|
61
|
+
console.error('Error: unable to get commenting data', err_1);
|
|
62
|
+
return [2 /*return*/, {
|
|
63
|
+
user: {},
|
|
64
|
+
}];
|
|
65
|
+
case 4: return [2 /*return*/];
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}); };
|
|
69
|
+
//# sourceMappingURL=getCommentingData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getCommentingData.js","sourceRoot":"","sources":["../../../src/commentingAdminService/getCommentingData.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,aAAa,CAAA;AAC/B,OAAO,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAA;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAEnD,MAAM,CAAC,IAAM,iBAAiB,GAAG,UAAO,GAAW,EAAE,aAAqB;;;;;;gBAEtE,eAAe,CAAC,aAAa,CAAC,CAAA;gBAEb,qBAAM,KAAK,CAC1B,UAAG,yBAAyB,SAAG,GAAG,eAAY,EAC9C;wBACE,MAAM,EAAE,KAAK;wBACb,OAAO,EAAE;4BACP,MAAM,EAAE,aAAa;yBACtB;qBACF,CACF,EAAA;;gBARK,QAAQ,GAAG,SAQhB;gBACY,qBAAM,QAAQ,CAAC,IAAI,EAAE,EAAA;;gBAA5B,IAAI,GAAG,SAAqB;gBAElC,sBAAO,IAAI,EAAA;;;gBAEX,OAAO,CAAC,KAAK,CAAC,sCAAsC,EAAE,KAAG,CAAC,CAAA;gBAC1D,sBAAO;wBACL,IAAI,EAAE,EAAE;qBACT,EAAA;;;;KAEJ,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commentingAdminService/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,wBAAwB,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface UpdateCommentingDataObject {
|
|
2
|
+
cpn: string;
|
|
3
|
+
displayName: string;
|
|
4
|
+
email: string;
|
|
5
|
+
likes?: string;
|
|
6
|
+
mentions?: string;
|
|
7
|
+
replies?: string;
|
|
8
|
+
username: string;
|
|
9
|
+
}
|
|
10
|
+
export interface UpdateCommentingBodyObject {
|
|
11
|
+
brand: 'tnl';
|
|
12
|
+
cpn: string;
|
|
13
|
+
displayName: string;
|
|
14
|
+
email: string;
|
|
15
|
+
preferences: {
|
|
16
|
+
likes: string;
|
|
17
|
+
mentions: string;
|
|
18
|
+
replies: string;
|
|
19
|
+
};
|
|
20
|
+
username: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/commentingAdminService/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
12
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
import fetch from 'cross-fetch';
|
|
38
|
+
import { commentingAdminServiceUrl } from '../config';
|
|
39
|
+
import { confirmUserType } from './confirmUsertype';
|
|
40
|
+
export var updateCommentingData = function (inputData, cookieSession) { return __awaiter(void 0, void 0, void 0, function () {
|
|
41
|
+
var body, response, data, err_1;
|
|
42
|
+
return __generator(this, function (_a) {
|
|
43
|
+
switch (_a.label) {
|
|
44
|
+
case 0:
|
|
45
|
+
_a.trys.push([0, 3, , 4]);
|
|
46
|
+
confirmUserType(cookieSession);
|
|
47
|
+
body = {
|
|
48
|
+
brand: 'tnl',
|
|
49
|
+
cpn: inputData.cpn,
|
|
50
|
+
displayName: inputData.displayName,
|
|
51
|
+
email: inputData.email,
|
|
52
|
+
preferences: {
|
|
53
|
+
likes: inputData.likes || 'never',
|
|
54
|
+
mentions: inputData.mentions || 'never',
|
|
55
|
+
replies: inputData.replies || 'never',
|
|
56
|
+
},
|
|
57
|
+
username: inputData.username,
|
|
58
|
+
};
|
|
59
|
+
return [4 /*yield*/, fetch("".concat(commentingAdminServiceUrl).concat(body.cpn), {
|
|
60
|
+
method: 'PUT',
|
|
61
|
+
body: JSON.stringify(body),
|
|
62
|
+
headers: {
|
|
63
|
+
'Content-Type': 'application/json',
|
|
64
|
+
cookie: cookieSession,
|
|
65
|
+
},
|
|
66
|
+
})];
|
|
67
|
+
case 1:
|
|
68
|
+
response = _a.sent();
|
|
69
|
+
return [4 /*yield*/, response.json()];
|
|
70
|
+
case 2:
|
|
71
|
+
data = _a.sent();
|
|
72
|
+
return [2 /*return*/, data];
|
|
73
|
+
case 3:
|
|
74
|
+
err_1 = _a.sent();
|
|
75
|
+
console.error('Error: unable to update commenting data', err_1);
|
|
76
|
+
return [2 /*return*/, Promise.reject('Error: unable to update commenting data')];
|
|
77
|
+
case 4: return [2 /*return*/];
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}); };
|
|
81
|
+
//# sourceMappingURL=updateCommentingData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateCommentingData.js","sourceRoot":"","sources":["../../../src/commentingAdminService/updateCommentingData.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,aAAa,CAAA;AAC/B,OAAO,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAA;AAErD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAEnD,MAAM,CAAC,IAAM,oBAAoB,GAAG,UAClC,SAAqC,EACrC,aAAqB;;;;;;gBAGnB,eAAe,CAAC,aAAa,CAAC,CAAA;gBAExB,IAAI,GAA+B;oBACvC,KAAK,EAAE,KAAK;oBACZ,GAAG,EAAE,SAAS,CAAC,GAAG;oBAClB,WAAW,EAAE,SAAS,CAAC,WAAW;oBAClC,KAAK,EAAE,SAAS,CAAC,KAAK;oBACtB,WAAW,EAAE;wBACX,KAAK,EAAE,SAAS,CAAC,KAAK,IAAI,OAAO;wBACjC,QAAQ,EAAE,SAAS,CAAC,QAAQ,IAAI,OAAO;wBACvC,OAAO,EAAE,SAAS,CAAC,OAAO,IAAI,OAAO;qBACtC;oBACD,QAAQ,EAAE,SAAS,CAAC,QAAQ;iBAC7B,CAAA;gBAEgB,qBAAM,KAAK,CAAC,UAAG,yBAAyB,SAAG,IAAI,CAAC,GAAG,CAAE,EAAE;wBACtE,MAAM,EAAE,KAAK;wBACb,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;wBAC1B,OAAO,EAAE;4BACP,cAAc,EAAE,kBAAkB;4BAClC,MAAM,EAAE,aAAa;yBACtB;qBACF,CAAC,EAAA;;gBAPI,QAAQ,GAAG,SAOf;gBACW,qBAAM,QAAQ,CAAC,IAAI,EAAE,EAAA;;gBAA5B,IAAI,GAAG,SAAqB;gBAClC,sBAAO,IAAI,EAAA;;;gBAEX,OAAO,CAAC,KAAK,CAAC,yCAAyC,EAAE,KAAG,CAAC,CAAA;gBAC7D,sBAAO,OAAO,CAAC,MAAM,CAAC,yCAAyC,CAAC,EAAA;;;;KAEnE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const acsTestPassword: string, acsTestAccount: string, newskitApiXApiKey: string, newskitApiEnvUrl: string, mainGraphqlUrl: string, accountProviderGraphqlUrl: string, acsSessionUrl: string;
|
|
1
|
+
export declare const acsTestPassword: string, acsTestAccount: string, newskitApiXApiKey: string, newskitApiEnvUrl: string, mainGraphqlUrl: string, accountProviderGraphqlUrl: string, acsSessionUrl: string, commentingAdminServiceUrl: string;
|
package/dist/esm/config/index.js
CHANGED
|
@@ -6,6 +6,7 @@ var config = {
|
|
|
6
6
|
mainGraphqlUrl: process.env.MAIN_GRAPHQL_URL,
|
|
7
7
|
accountProviderGraphqlUrl: process.env.ACCOUNT_PROVIDER_GRAPHQL_URL,
|
|
8
8
|
acsSessionUrl: process.env.ACS_SESSION_URL,
|
|
9
|
+
commentingAdminServiceUrl: process.env.COMMENTING_ADMIN_SERVICE_URL,
|
|
9
10
|
};
|
|
10
|
-
export var acsTestPassword = config.acsTestPassword, acsTestAccount = config.acsTestAccount, newskitApiXApiKey = config.newskitApiXApiKey, newskitApiEnvUrl = config.newskitApiEnvUrl, mainGraphqlUrl = config.mainGraphqlUrl, accountProviderGraphqlUrl = config.accountProviderGraphqlUrl, acsSessionUrl = config.acsSessionUrl;
|
|
11
|
+
export var acsTestPassword = config.acsTestPassword, acsTestAccount = config.acsTestAccount, newskitApiXApiKey = config.newskitApiXApiKey, newskitApiEnvUrl = config.newskitApiEnvUrl, mainGraphqlUrl = config.mainGraphqlUrl, accountProviderGraphqlUrl = config.accountProviderGraphqlUrl, acsSessionUrl = config.acsSessionUrl, commentingAdminServiceUrl = config.commentingAdminServiceUrl;
|
|
11
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":"AAAA,IAAM,MAAM,GAAG;IACb,eAAe,EAAE,OAAO,CAAC,GAAG,CAAC,iBAA2B;IACxD,cAAc,EAAE,OAAO,CAAC,GAAG,CAAC,gBAA0B;IACtD,iBAAiB,EAAE,OAAO,CAAC,GAAG,CAAC,qBAA+B;IAC9D,gBAAgB,EAAE,OAAO,CAAC,GAAG,CAAC,mBAA6B;IAC3D,cAAc,EAAE,OAAO,CAAC,GAAG,CAAC,gBAA0B;IACtD,yBAAyB,EAAE,OAAO,CAAC,GAAG,CAAC,4BAAsC;IAC7E,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,eAAyB;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/config/index.ts"],"names":[],"mappings":"AAAA,IAAM,MAAM,GAAG;IACb,eAAe,EAAE,OAAO,CAAC,GAAG,CAAC,iBAA2B;IACxD,cAAc,EAAE,OAAO,CAAC,GAAG,CAAC,gBAA0B;IACtD,iBAAiB,EAAE,OAAO,CAAC,GAAG,CAAC,qBAA+B;IAC9D,gBAAgB,EAAE,OAAO,CAAC,GAAG,CAAC,mBAA6B;IAC3D,cAAc,EAAE,OAAO,CAAC,GAAG,CAAC,gBAA0B;IACtD,yBAAyB,EAAE,OAAO,CAAC,GAAG,CAAC,4BAAsC;IAC7E,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,eAAyB;IACpD,yBAAyB,EAAE,OAAO,CAAC,GAAG,CAAC,4BAAsC;CAC9E,CAAA;AAED,MAAM,CACJ,IAAA,eAAe,GAQb,MAAM,gBARO,EACf,cAAc,GAOZ,MAAM,eAPM,EACd,iBAAiB,GAMf,MAAM,kBANS,EACjB,gBAAgB,GAKd,MAAM,iBALQ,EAChB,cAAc,GAIZ,MAAM,eAJM,EACd,yBAAyB,GAGvB,MAAM,0BAHiB,EACzB,aAAa,GAEX,MAAM,cAFK,EACb,yBAAyB,GACvB,MAAM,0BADiB,CACjB"}
|
package/dist/esm/index.d.ts
CHANGED
package/dist/esm/index.js
CHANGED
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AACzB,cAAc,sBAAsB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,WAAW,CAAA;AACzB,cAAc,sBAAsB,CAAA;AACpC,cAAc,0BAA0B,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newskit-render/api",
|
|
3
|
-
"version": "1.8.0-alpha.
|
|
3
|
+
"version": "1.8.0-alpha.2",
|
|
4
4
|
"description": "helper package for accessing MAIN and NK API data",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"dist"
|
|
14
14
|
],
|
|
15
15
|
"engines": {
|
|
16
|
-
"node": ">=16.
|
|
16
|
+
"node": ">=16.13"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
19
|
"build": "rm -rf dist && tsc -b tsconfig.build.json && tsc -p tsconfig.build.json --module CommonJS --outDir './dist/cjs'",
|