@tellescope/sdk 1.68.7 → 1.68.9
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/lib/cjs/enduser.d.ts +20 -0
- package/lib/cjs/enduser.d.ts.map +1 -1
- package/lib/cjs/sdk.d.ts +42 -0
- package/lib/cjs/sdk.d.ts.map +1 -1
- package/lib/cjs/sdk.js +1 -0
- package/lib/cjs/sdk.js.map +1 -1
- package/lib/cjs/tests/tests.d.ts.map +1 -1
- package/lib/cjs/tests/tests.js +232 -74
- package/lib/cjs/tests/tests.js.map +1 -1
- package/lib/esm/enduser.d.ts +20 -0
- package/lib/esm/enduser.d.ts.map +1 -1
- package/lib/esm/sdk.d.ts +42 -0
- package/lib/esm/sdk.d.ts.map +1 -1
- package/lib/esm/sdk.js +1 -0
- package/lib/esm/sdk.js.map +1 -1
- package/lib/esm/tests/tests.d.ts.map +1 -1
- package/lib/esm/tests/tests.js +222 -64
- package/lib/esm/tests/tests.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -8
- package/src/sdk.ts +1 -0
- package/src/tests/tests.ts +171 -1
- package/test_generated.pdf +0 -0
package/lib/cjs/tests/tests.js
CHANGED
|
@@ -89,10 +89,11 @@ var crypto_1 = __importDefault(require("crypto"));
|
|
|
89
89
|
var buffer = __importStar(require("buffer")); // only node >=15.7.0
|
|
90
90
|
var validation_1 = require("@tellescope/validation");
|
|
91
91
|
var sdk_1 = require("../sdk");
|
|
92
|
+
var utilities_1 = require("@tellescope/utilities");
|
|
92
93
|
var constants_1 = require("@tellescope/constants");
|
|
93
94
|
var schema_1 = require("@tellescope/schema");
|
|
94
95
|
var testing_1 = require("@tellescope/testing");
|
|
95
|
-
var
|
|
96
|
+
var utilities_2 = require("@tellescope/utilities");
|
|
96
97
|
var fs_1 = __importDefault(require("fs"));
|
|
97
98
|
var UniquenessViolationMessage = 'Uniqueness Violation';
|
|
98
99
|
var host = process.env.TEST_URL || 'http://localhost:8080';
|
|
@@ -887,7 +888,7 @@ var run_generated_tests = function (_a) {
|
|
|
887
888
|
if (updates.enduserId)
|
|
888
889
|
updates.enduserId = defaultEnduser.id;
|
|
889
890
|
_id = '';
|
|
890
|
-
safeName = (0,
|
|
891
|
+
safeName = (0, utilities_2.url_safe_path)(name);
|
|
891
892
|
singularName = safeName.substring(0, safeName.length - 1);
|
|
892
893
|
return [4 /*yield*/, verify_missing_defaults({ queries: queries, model: model, name: name, returns: returns })
|
|
893
894
|
// only validate id for general objects, for now
|
|
@@ -930,7 +931,7 @@ var run_generated_tests = function (_a) {
|
|
|
930
931
|
return false;
|
|
931
932
|
for (var k in instance) {
|
|
932
933
|
// @ts-ignore
|
|
933
|
-
if (!(0,
|
|
934
|
+
if (!(0, utilities_2.objects_equivalent)(instance[k], d[k]))
|
|
934
935
|
return false;
|
|
935
936
|
}
|
|
936
937
|
return true;
|
|
@@ -945,7 +946,7 @@ var run_generated_tests = function (_a) {
|
|
|
945
946
|
return false;
|
|
946
947
|
for (var k in instance) {
|
|
947
948
|
// @ts-ignore
|
|
948
|
-
if (!(0,
|
|
949
|
+
if (!(0, utilities_2.objects_equivalent)(instance[k], d[k]))
|
|
949
950
|
return false;
|
|
950
951
|
}
|
|
951
952
|
return true;
|
|
@@ -1053,7 +1054,7 @@ var enduser_tests = function (queries) {
|
|
|
1053
1054
|
return [4 /*yield*/, (0, testing_1.async_test)("update-enduser test replaceObjectFields true unset", function () { var _a; return queries.updateOne((_a = e1.id) !== null && _a !== void 0 ? _a : '', { fields: {} }, { replaceObjectFields: true }); }, passOnVoid)];
|
|
1054
1055
|
case 15:
|
|
1055
1056
|
_a.sent();
|
|
1056
|
-
return [4 /*yield*/, (0, testing_1.async_test)("get-enduser test replaceObjectFields verify true unset", function () { var _a; return queries.getOne((_a = e1.id) !== null && _a !== void 0 ? _a : ''); }, { onResult: function (e) { return (0,
|
|
1057
|
+
return [4 /*yield*/, (0, testing_1.async_test)("get-enduser test replaceObjectFields verify true unset", function () { var _a; return queries.getOne((_a = e1.id) !== null && _a !== void 0 ? _a : ''); }, { onResult: function (e) { return (0, utilities_2.objects_equivalent)(e.fields, {}); } })];
|
|
1057
1058
|
case 16:
|
|
1058
1059
|
_a.sent();
|
|
1059
1060
|
eToDup1 = { email: 'dup1@tellescope.com' };
|
|
@@ -1208,7 +1209,7 @@ var journey_tests = function (queries) {
|
|
|
1208
1209
|
return [4 /*yield*/, queries.updateOne(journey.id, { states: [{ name: 'First', priority: "N/A" }, { name: 'Added', priority: "N/A" }] }, { replaceObjectFields: true })];
|
|
1209
1210
|
case 26:
|
|
1210
1211
|
_g.sent();
|
|
1211
|
-
return [4 /*yield*/, (0, testing_1.async_test)("journey-update - insert new state at front", function () { return queries.getOne(journey.id); }, { onResult: function (j) { return (0,
|
|
1212
|
+
return [4 /*yield*/, (0, testing_1.async_test)("journey-update - insert new state at front", function () { return queries.getOne(journey.id); }, { onResult: function (j) { return (0, utilities_2.objects_equivalent)(j.states, [{ name: 'First', priority: "N/A" }, { name: 'Added', priority: "N/A" }]); } })
|
|
1212
1213
|
// removed
|
|
1213
1214
|
// await async_test(
|
|
1214
1215
|
// `journey-updateState`,
|
|
@@ -1269,12 +1270,12 @@ var journey_tests = function (queries) {
|
|
|
1269
1270
|
return [4 /*yield*/, (0, testing_1.wait)(undefined, 25)]; // wait for side effects to update endusers
|
|
1270
1271
|
case 29:
|
|
1271
1272
|
_g.sent(); // wait for side effects to update endusers
|
|
1272
|
-
return [4 /*yield*/, (0, testing_1.async_test)("journey-delete - corresponding enduser journeys are unset 1", function () { return sdk.api.endusers.getOne(e1.id); }, { onResult: function (e) { return (0,
|
|
1273
|
+
return [4 /*yield*/, (0, testing_1.async_test)("journey-delete - corresponding enduser journeys are unset 1", function () { return sdk.api.endusers.getOne(e1.id); }, { onResult: function (e) { return (0, utilities_2.objects_equivalent)(e.journeys, {}); } })];
|
|
1273
1274
|
case 30:
|
|
1274
1275
|
_g.sent();
|
|
1275
1276
|
return [4 /*yield*/, (0, testing_1.async_test)("journey-delete - corresponding enduser journeys are unset, others left", function () { return sdk.api.endusers.getOne(e2.id); }, { onResult: function (e) {
|
|
1276
1277
|
var _a;
|
|
1277
|
-
return (0,
|
|
1278
|
+
return (0, utilities_2.objects_equivalent)(e.journeys, (_a = {}, _a[journey2.id] = 'New', _a));
|
|
1278
1279
|
} })];
|
|
1279
1280
|
case 31:
|
|
1280
1281
|
_g.sent();
|
|
@@ -1822,7 +1823,7 @@ var enduserAccessTests = function () { return __awaiter(void 0, void 0, void 0,
|
|
|
1822
1823
|
return __generator(this, function (_l) {
|
|
1823
1824
|
switch (_l.label) {
|
|
1824
1825
|
case 0:
|
|
1825
|
-
endpoint = (0,
|
|
1826
|
+
endpoint = (0, utilities_2.url_safe_path)(n);
|
|
1826
1827
|
model = schema_1.schema[n];
|
|
1827
1828
|
if (n === 'webhooks')
|
|
1828
1829
|
return [2 /*return*/, "continue"]; // no default endpoints implemented
|
|
@@ -2347,7 +2348,7 @@ var formEventTests = function () { return __awaiter(void 0, void 0, void 0, func
|
|
|
2347
2348
|
return [4 /*yield*/, sdk.api.form_responses.submit_form_response({ accessCode: acNoStep, responses: [testResponse] })];
|
|
2348
2349
|
case 9:
|
|
2349
2350
|
formResponse = (_a.sent()).formResponse;
|
|
2350
|
-
(0, testing_1.assert)((0,
|
|
2351
|
+
(0, testing_1.assert)((0, utilities_2.objects_equivalent)(formResponse.responses, [testResponse]), 'bad form resonse returned', 'form response returned correctly');
|
|
2351
2352
|
return [4 /*yield*/, sdk.api.form_responses.submit_form_response({ accessCode: acStep, automationStepId: triggerStep.id, responses: [testResponse] })];
|
|
2352
2353
|
case 10:
|
|
2353
2354
|
_a.sent();
|
|
@@ -6802,10 +6803,12 @@ var tests = {
|
|
|
6802
6803
|
ticket_threads: NO_TEST,
|
|
6803
6804
|
ticket_thread_comments: NO_TEST,
|
|
6804
6805
|
configurations: NO_TEST,
|
|
6806
|
+
group_mms_conversations: NO_TEST,
|
|
6805
6807
|
};
|
|
6806
6808
|
var TRACK_OPEN_IMAGE = Buffer.from("iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=", 'base64');
|
|
6807
6809
|
var validate_schema = function () {
|
|
6808
6810
|
var _a;
|
|
6811
|
+
(0, testing_1.log_header)("Validate Schema");
|
|
6809
6812
|
var endpoints = new Set([]);
|
|
6810
6813
|
var modelName = undefined;
|
|
6811
6814
|
for (modelName in schema_1.schema) {
|
|
@@ -6827,6 +6830,158 @@ var validate_schema = function () {
|
|
|
6827
6830
|
}
|
|
6828
6831
|
}
|
|
6829
6832
|
};
|
|
6833
|
+
var test_weighted_round_robin = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
6834
|
+
var testUsers, userIds, testAssignments, run_assignment_simulation;
|
|
6835
|
+
return __generator(this, function (_a) {
|
|
6836
|
+
switch (_a.label) {
|
|
6837
|
+
case 0:
|
|
6838
|
+
(0, testing_1.log_header)("Test validate_weighted_round_robin");
|
|
6839
|
+
testUsers = [
|
|
6840
|
+
{ id: '0', ticketAssignmentPriority: undefined },
|
|
6841
|
+
{ id: '1', ticketAssignmentPriority: 1 },
|
|
6842
|
+
{ id: '2', ticketAssignmentPriority: 2 },
|
|
6843
|
+
{ id: '3', ticketAssignmentPriority: 3 },
|
|
6844
|
+
];
|
|
6845
|
+
userIds = testUsers.map(function (u) { return u.id; });
|
|
6846
|
+
testAssignments = testUsers.map(function (u, i) { return ({
|
|
6847
|
+
id: i.toString(),
|
|
6848
|
+
key: 'test',
|
|
6849
|
+
timestamp: Date.now() - 1000,
|
|
6850
|
+
userId: u.id,
|
|
6851
|
+
}); });
|
|
6852
|
+
return [4 /*yield*/, (0, testing_1.async_test)("Both empty", function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
6853
|
+
return [2 /*return*/, (0, utilities_1.weighted_round_robin)({ assignments: [], users: [] })];
|
|
6854
|
+
}); }); }, { onResult: function (r) { return r.selected === undefined; } })];
|
|
6855
|
+
case 1:
|
|
6856
|
+
_a.sent();
|
|
6857
|
+
return [4 /*yield*/, (0, testing_1.async_test)("Single user, empty assignment", function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
6858
|
+
return [2 /*return*/, (0, utilities_1.weighted_round_robin)({ assignments: [], users: [testUsers[0]] })];
|
|
6859
|
+
}); }); }, { onResult: function (r) { return r.selected === testUsers[0].id; } })];
|
|
6860
|
+
case 2:
|
|
6861
|
+
_a.sent();
|
|
6862
|
+
return [4 /*yield*/, (0, testing_1.async_test)("Both singletons", function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
6863
|
+
return [2 /*return*/, (0, utilities_1.weighted_round_robin)({ assignments: [testAssignments[0]], users: [testUsers[0]] })];
|
|
6864
|
+
}); }); }, { onResult: function (r) { return r.selected === testUsers[0].id; } })];
|
|
6865
|
+
case 3:
|
|
6866
|
+
_a.sent();
|
|
6867
|
+
run_assignment_simulation = function (_a) {
|
|
6868
|
+
var iterations = _a.iterations, expectedSelections = _a.expectedSelections, _b = _a.users, users = _b === void 0 ? testUsers : _b, _c = _a.title, title = _c === void 0 ? "Simulation ".concat(iterations) : _c;
|
|
6869
|
+
var assignments = [];
|
|
6870
|
+
var selections = [];
|
|
6871
|
+
for (var i = 0; i < iterations; i++) {
|
|
6872
|
+
if (assignments.length !== i) {
|
|
6873
|
+
throw new Error("Invariant Violation: assignment not saved in history");
|
|
6874
|
+
}
|
|
6875
|
+
var selected = (0, utilities_1.weighted_round_robin)({ assignments: assignments, users: users }).selected;
|
|
6876
|
+
selections.push(selected);
|
|
6877
|
+
var assignment = {
|
|
6878
|
+
id: i.toString(),
|
|
6879
|
+
userId: selected || '',
|
|
6880
|
+
key: 'test',
|
|
6881
|
+
timestamp: i, // simply ensures increasing timestamps per assignment
|
|
6882
|
+
};
|
|
6883
|
+
// ensure that assignment order doesn't matter (e.g. weighted_round_robin sorts internally)
|
|
6884
|
+
if (i % 2 === 0) {
|
|
6885
|
+
assignments.push(assignment); // add to back
|
|
6886
|
+
}
|
|
6887
|
+
else {
|
|
6888
|
+
assignments.unshift(assignment); // add to front
|
|
6889
|
+
}
|
|
6890
|
+
}
|
|
6891
|
+
(0, testing_1.assert)((0, utilities_2.objects_equivalent)(selections, expectedSelections), title + '\n' + JSON.stringify({ expected: expectedSelections, got: selections }, null, 2), title);
|
|
6892
|
+
};
|
|
6893
|
+
run_assignment_simulation({ expectedSelections: [], iterations: 0 });
|
|
6894
|
+
run_assignment_simulation({ expectedSelections: [userIds[0]], iterations: 1 });
|
|
6895
|
+
run_assignment_simulation({ expectedSelections: [userIds[0], userIds[1]], iterations: 2 });
|
|
6896
|
+
run_assignment_simulation({ expectedSelections: [userIds[0], userIds[1], userIds[2]], iterations: 3 });
|
|
6897
|
+
run_assignment_simulation({ expectedSelections: [userIds[0], userIds[1], userIds[2], userIds[3]], iterations: 4 });
|
|
6898
|
+
run_assignment_simulation({ iterations: 5,
|
|
6899
|
+
expectedSelections: [
|
|
6900
|
+
userIds[0], userIds[1], userIds[2], userIds[3],
|
|
6901
|
+
userIds[0],
|
|
6902
|
+
],
|
|
6903
|
+
});
|
|
6904
|
+
run_assignment_simulation({ iterations: 6, expectedSelections: [
|
|
6905
|
+
userIds[0], userIds[1], userIds[2], userIds[3],
|
|
6906
|
+
userIds[0], userIds[2],
|
|
6907
|
+
] });
|
|
6908
|
+
run_assignment_simulation({ iterations: 7, expectedSelections: [
|
|
6909
|
+
userIds[0], userIds[1], userIds[2], userIds[3],
|
|
6910
|
+
userIds[0], userIds[2], userIds[3],
|
|
6911
|
+
] });
|
|
6912
|
+
run_assignment_simulation({ iterations: 8, expectedSelections: [
|
|
6913
|
+
userIds[0], userIds[1], userIds[2], userIds[3],
|
|
6914
|
+
userIds[0], userIds[2], userIds[3],
|
|
6915
|
+
userIds[0],
|
|
6916
|
+
] });
|
|
6917
|
+
run_assignment_simulation({ iterations: 9,
|
|
6918
|
+
expectedSelections: [
|
|
6919
|
+
userIds[0], userIds[1], userIds[2], userIds[3],
|
|
6920
|
+
userIds[0], userIds[2], userIds[3],
|
|
6921
|
+
userIds[0], userIds[3],
|
|
6922
|
+
],
|
|
6923
|
+
});
|
|
6924
|
+
run_assignment_simulation({ iterations: 10,
|
|
6925
|
+
expectedSelections: [
|
|
6926
|
+
userIds[0], userIds[1], userIds[2], userIds[3],
|
|
6927
|
+
userIds[0], userIds[2], userIds[3],
|
|
6928
|
+
userIds[0], userIds[3],
|
|
6929
|
+
userIds[0],
|
|
6930
|
+
],
|
|
6931
|
+
});
|
|
6932
|
+
run_assignment_simulation({ iterations: 11,
|
|
6933
|
+
expectedSelections: [
|
|
6934
|
+
userIds[0], userIds[1], userIds[2], userIds[3],
|
|
6935
|
+
userIds[0], userIds[2], userIds[3],
|
|
6936
|
+
userIds[0], userIds[3],
|
|
6937
|
+
userIds[0],
|
|
6938
|
+
userIds[0],
|
|
6939
|
+
],
|
|
6940
|
+
});
|
|
6941
|
+
run_assignment_simulation({ iterations: 12,
|
|
6942
|
+
expectedSelections: [
|
|
6943
|
+
userIds[0], userIds[1], userIds[2], userIds[3],
|
|
6944
|
+
userIds[0], userIds[2], userIds[3],
|
|
6945
|
+
userIds[0], userIds[3],
|
|
6946
|
+
userIds[0],
|
|
6947
|
+
userIds[0],
|
|
6948
|
+
userIds[0],
|
|
6949
|
+
],
|
|
6950
|
+
});
|
|
6951
|
+
run_assignment_simulation({ iterations: 13,
|
|
6952
|
+
expectedSelections: [
|
|
6953
|
+
userIds[0], userIds[1], userIds[2], userIds[3],
|
|
6954
|
+
userIds[0], userIds[2], userIds[3],
|
|
6955
|
+
userIds[0], userIds[3],
|
|
6956
|
+
userIds[0],
|
|
6957
|
+
userIds[0],
|
|
6958
|
+
userIds[0], userIds[1],
|
|
6959
|
+
],
|
|
6960
|
+
});
|
|
6961
|
+
run_assignment_simulation({ iterations: 14,
|
|
6962
|
+
expectedSelections: [
|
|
6963
|
+
userIds[0], userIds[1], userIds[2], userIds[3],
|
|
6964
|
+
userIds[0], userIds[2], userIds[3],
|
|
6965
|
+
userIds[0], userIds[3],
|
|
6966
|
+
userIds[0],
|
|
6967
|
+
userIds[0],
|
|
6968
|
+
userIds[0], userIds[1], userIds[2],
|
|
6969
|
+
],
|
|
6970
|
+
});
|
|
6971
|
+
run_assignment_simulation({ iterations: 15,
|
|
6972
|
+
expectedSelections: [
|
|
6973
|
+
userIds[0], userIds[1], userIds[2], userIds[3],
|
|
6974
|
+
userIds[0], userIds[2], userIds[3],
|
|
6975
|
+
userIds[0], userIds[3],
|
|
6976
|
+
userIds[0],
|
|
6977
|
+
userIds[0],
|
|
6978
|
+
userIds[0], userIds[1], userIds[2], userIds[3],
|
|
6979
|
+
],
|
|
6980
|
+
});
|
|
6981
|
+
return [2 /*return*/];
|
|
6982
|
+
}
|
|
6983
|
+
});
|
|
6984
|
+
}); };
|
|
6830
6985
|
(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
6831
6986
|
var err_1, n, _a, _b, _c, _i, returnValidation, t, _d, _e, _f, _g, err_2;
|
|
6832
6987
|
var _h, _j;
|
|
@@ -6839,9 +6994,12 @@ var validate_schema = function () {
|
|
|
6839
6994
|
_k.sent();
|
|
6840
6995
|
_k.label = 2;
|
|
6841
6996
|
case 2:
|
|
6842
|
-
_k.trys.push([2,
|
|
6843
|
-
return [4 /*yield*/,
|
|
6997
|
+
_k.trys.push([2, 40, , 41]);
|
|
6998
|
+
return [4 /*yield*/, test_weighted_round_robin()];
|
|
6844
6999
|
case 3:
|
|
7000
|
+
_k.sent();
|
|
7001
|
+
return [4 /*yield*/, validate_schema()];
|
|
7002
|
+
case 4:
|
|
6845
7003
|
_k.sent();
|
|
6846
7004
|
return [4 /*yield*/, Promise.all([
|
|
6847
7005
|
sdk.authenticate(email, password),
|
|
@@ -6852,116 +7010,116 @@ var validate_schema = function () {
|
|
|
6852
7010
|
])
|
|
6853
7011
|
// console.log(JSON.stringify(await sdk.bulk_load({ load: [{ model: 'users' }]}), null, 2))
|
|
6854
7012
|
];
|
|
6855
|
-
case
|
|
7013
|
+
case 5:
|
|
6856
7014
|
_k.sent();
|
|
6857
7015
|
// console.log(JSON.stringify(await sdk.bulk_load({ load: [{ model: 'users' }]}), null, 2))
|
|
6858
7016
|
return [4 /*yield*/, (0, testing_1.async_test)("count exists",
|
|
6859
7017
|
// @ts-ignore
|
|
6860
7018
|
function () { return sdk.api.endusers.getSome({ returnCount: true }); }, { onResult: function (result) { return typeof result.count === 'number'; } })];
|
|
6861
|
-
case
|
|
7019
|
+
case 6:
|
|
6862
7020
|
// console.log(JSON.stringify(await sdk.bulk_load({ load: [{ model: 'users' }]}), null, 2))
|
|
6863
7021
|
_k.sent();
|
|
6864
7022
|
return [4 /*yield*/, (0, testing_1.async_test)("push_to_EHR allows missing addedResponses", function () { return sdk.api.form_responses.push_to_EHR({ id: constants_1.PLACEHOLDER_ID }); }, { shouldError: true, onError: function (e) { return (e === null || e === void 0 ? void 0 : e.message) === 'Could not find a record for the given id'; } })];
|
|
6865
|
-
case
|
|
7023
|
+
case 7:
|
|
6866
7024
|
_k.sent();
|
|
6867
7025
|
return [4 /*yield*/, mfa_tests()];
|
|
6868
|
-
case
|
|
7026
|
+
case 8:
|
|
6869
7027
|
_k.sent();
|
|
6870
7028
|
return [4 /*yield*/, setup_tests()];
|
|
6871
|
-
case
|
|
7029
|
+
case 9:
|
|
6872
7030
|
_k.sent();
|
|
6873
7031
|
return [4 /*yield*/, multi_tenant_tests()]; // should come right after setup tests
|
|
6874
|
-
case
|
|
7032
|
+
case 10:
|
|
6875
7033
|
_k.sent(); // should come right after setup tests
|
|
6876
7034
|
return [4 /*yield*/, (0, exports.alternate_phones_tests)()];
|
|
6877
|
-
case 10:
|
|
6878
|
-
_k.sent();
|
|
6879
|
-
return [4 /*yield*/, (0, exports.ticket_queue_tests)()];
|
|
6880
7035
|
case 11:
|
|
6881
7036
|
_k.sent();
|
|
6882
|
-
return [4 /*yield*/, (0, exports.
|
|
7037
|
+
return [4 /*yield*/, (0, exports.ticket_queue_tests)()];
|
|
6883
7038
|
case 12:
|
|
6884
7039
|
_k.sent();
|
|
6885
|
-
return [4 /*yield*/,
|
|
7040
|
+
return [4 /*yield*/, (0, exports.no_chained_triggers_tests)()];
|
|
6886
7041
|
case 13:
|
|
6887
7042
|
_k.sent();
|
|
6888
|
-
return [4 /*yield*/,
|
|
7043
|
+
return [4 /*yield*/, field_equals_trigger_tests()];
|
|
6889
7044
|
case 14:
|
|
6890
7045
|
_k.sent();
|
|
6891
|
-
return [4 /*yield*/,
|
|
7046
|
+
return [4 /*yield*/, test_ticket_automation_assignment_and_optimization()];
|
|
6892
7047
|
case 15:
|
|
6893
7048
|
_k.sent();
|
|
6894
|
-
return [4 /*yield*/,
|
|
7049
|
+
return [4 /*yield*/, role_based_access_tests()];
|
|
6895
7050
|
case 16:
|
|
6896
7051
|
_k.sent();
|
|
6897
|
-
return [4 /*yield*/,
|
|
7052
|
+
return [4 /*yield*/, automation_trigger_tests()];
|
|
6898
7053
|
case 17:
|
|
6899
7054
|
_k.sent();
|
|
6900
|
-
return [4 /*yield*/,
|
|
7055
|
+
return [4 /*yield*/, enduser_session_tests()];
|
|
6901
7056
|
case 18:
|
|
6902
7057
|
_k.sent();
|
|
6903
|
-
return [4 /*yield*/,
|
|
7058
|
+
return [4 /*yield*/, nextReminderInMS_tests()];
|
|
6904
7059
|
case 19:
|
|
6905
7060
|
_k.sent();
|
|
6906
|
-
return [4 /*yield*/,
|
|
7061
|
+
return [4 /*yield*/, search_tests()];
|
|
6907
7062
|
case 20:
|
|
6908
7063
|
_k.sent();
|
|
6909
|
-
return [4 /*yield*/,
|
|
7064
|
+
return [4 /*yield*/, wait_for_trigger_tests()];
|
|
6910
7065
|
case 21:
|
|
6911
7066
|
_k.sent();
|
|
6912
|
-
return [4 /*yield*/,
|
|
7067
|
+
return [4 /*yield*/, pdf_generation()];
|
|
6913
7068
|
case 22:
|
|
6914
7069
|
_k.sent();
|
|
6915
|
-
return [4 /*yield*/,
|
|
7070
|
+
return [4 /*yield*/, remove_from_journey_on_incoming_comms_tests()];
|
|
6916
7071
|
case 23:
|
|
6917
7072
|
_k.sent();
|
|
6918
|
-
return [4 /*yield*/,
|
|
7073
|
+
return [4 /*yield*/, rate_limit_tests()];
|
|
6919
7074
|
case 24:
|
|
6920
7075
|
_k.sent();
|
|
6921
|
-
return [4 /*yield*/, (
|
|
7076
|
+
return [4 /*yield*/, merge_enduser_tests()];
|
|
6922
7077
|
case 25:
|
|
6923
7078
|
_k.sent();
|
|
6924
|
-
return [4 /*yield*/,
|
|
7079
|
+
return [4 /*yield*/, (0, exports.self_serve_appointment_booking_tests)()];
|
|
6925
7080
|
case 26:
|
|
6926
7081
|
_k.sent();
|
|
6927
|
-
return [4 /*yield*/,
|
|
7082
|
+
return [4 /*yield*/, auto_reply_tests()];
|
|
6928
7083
|
case 27:
|
|
6929
7084
|
_k.sent();
|
|
6930
|
-
return [4 /*yield*/,
|
|
7085
|
+
return [4 /*yield*/, sub_organization_enduser_tests()];
|
|
6931
7086
|
case 28:
|
|
6932
7087
|
_k.sent();
|
|
6933
|
-
return [4 /*yield*/, (
|
|
7088
|
+
return [4 /*yield*/, sub_organization_tests()];
|
|
6934
7089
|
case 29:
|
|
6935
7090
|
_k.sent();
|
|
6936
|
-
return [4 /*yield*/,
|
|
7091
|
+
return [4 /*yield*/, (0, exports.filter_by_date_tests)()];
|
|
6937
7092
|
case 30:
|
|
6938
7093
|
_k.sent();
|
|
6939
|
-
return [4 /*yield*/,
|
|
7094
|
+
return [4 /*yield*/, generate_user_auth_tests()];
|
|
6940
7095
|
case 31:
|
|
6941
7096
|
_k.sent();
|
|
6942
|
-
return [4 /*yield*/,
|
|
7097
|
+
return [4 /*yield*/, generateEnduserAuthTests()];
|
|
6943
7098
|
case 32:
|
|
6944
7099
|
_k.sent();
|
|
6945
|
-
return [4 /*yield*/,
|
|
7100
|
+
return [4 /*yield*/, public_form_tests()];
|
|
6946
7101
|
case 33:
|
|
6947
7102
|
_k.sent();
|
|
6948
|
-
return [4 /*yield*/,
|
|
7103
|
+
return [4 /*yield*/, badInputTests()];
|
|
6949
7104
|
case 34:
|
|
6950
7105
|
_k.sent();
|
|
6951
|
-
return [4 /*yield*/,
|
|
7106
|
+
return [4 /*yield*/, filterTests()];
|
|
6952
7107
|
case 35:
|
|
6953
7108
|
_k.sent();
|
|
6954
|
-
return [4 /*yield*/,
|
|
7109
|
+
return [4 /*yield*/, updatesTests()];
|
|
6955
7110
|
case 36:
|
|
6956
7111
|
_k.sent();
|
|
6957
|
-
return [4 /*yield*/,
|
|
7112
|
+
return [4 /*yield*/, threadKeyTests()];
|
|
6958
7113
|
case 37:
|
|
6959
7114
|
_k.sent();
|
|
6960
|
-
return [4 /*yield*/,
|
|
7115
|
+
return [4 /*yield*/, enduserAccessTests()];
|
|
6961
7116
|
case 38:
|
|
6962
7117
|
_k.sent();
|
|
6963
|
-
return [
|
|
7118
|
+
return [4 /*yield*/, enduser_redaction_tests()];
|
|
6964
7119
|
case 39:
|
|
7120
|
+
_k.sent();
|
|
7121
|
+
return [3 /*break*/, 41];
|
|
7122
|
+
case 40:
|
|
6965
7123
|
err_1 = _k.sent();
|
|
6966
7124
|
console.error("Failed during custom test");
|
|
6967
7125
|
if (err_1.message && err_1.info) {
|
|
@@ -6971,18 +7129,18 @@ var validate_schema = function () {
|
|
|
6971
7129
|
console.error(err_1);
|
|
6972
7130
|
}
|
|
6973
7131
|
process.exit(1);
|
|
6974
|
-
return [3 /*break*/,
|
|
6975
|
-
case
|
|
7132
|
+
return [3 /*break*/, 41];
|
|
7133
|
+
case 41:
|
|
6976
7134
|
_a = schema_1.schema;
|
|
6977
7135
|
_b = [];
|
|
6978
7136
|
for (_c in _a)
|
|
6979
7137
|
_b.push(_c);
|
|
6980
7138
|
_i = 0;
|
|
6981
|
-
_k.label =
|
|
6982
|
-
case
|
|
6983
|
-
if (!(_i < _b.length)) return [3 /*break*/,
|
|
7139
|
+
_k.label = 42;
|
|
7140
|
+
case 42:
|
|
7141
|
+
if (!(_i < _b.length)) return [3 /*break*/, 45];
|
|
6984
7142
|
_c = _b[_i];
|
|
6985
|
-
if (!(_c in _a)) return [3 /*break*/,
|
|
7143
|
+
if (!(_c in _a)) return [3 /*break*/, 44];
|
|
6986
7144
|
n = _c;
|
|
6987
7145
|
returnValidation = (_j = (_h = schema_1.schema[n].customActions) === null || _h === void 0 ? void 0 : _h.create) === null || _j === void 0 ? void 0 : _j.returns;
|
|
6988
7146
|
return [4 /*yield*/, run_generated_tests({
|
|
@@ -6993,41 +7151,41 @@ var validate_schema = function () {
|
|
|
6993
7151
|
create: returnValidation // ModelFields<ClientModel>,
|
|
6994
7152
|
}
|
|
6995
7153
|
})];
|
|
6996
|
-
case 42:
|
|
6997
|
-
_k.sent();
|
|
6998
|
-
_k.label = 43;
|
|
6999
7154
|
case 43:
|
|
7000
|
-
|
|
7001
|
-
|
|
7155
|
+
_k.sent();
|
|
7156
|
+
_k.label = 44;
|
|
7002
7157
|
case 44:
|
|
7158
|
+
_i++;
|
|
7159
|
+
return [3 /*break*/, 42];
|
|
7160
|
+
case 45:
|
|
7003
7161
|
_d = tests;
|
|
7004
7162
|
_e = [];
|
|
7005
7163
|
for (_f in _d)
|
|
7006
7164
|
_e.push(_f);
|
|
7007
7165
|
_g = 0;
|
|
7008
|
-
_k.label = 45;
|
|
7009
|
-
case 45:
|
|
7010
|
-
if (!(_g < _e.length)) return [3 /*break*/, 50];
|
|
7011
|
-
_f = _e[_g];
|
|
7012
|
-
if (!(_f in _d)) return [3 /*break*/, 49];
|
|
7013
|
-
t = _f;
|
|
7014
7166
|
_k.label = 46;
|
|
7015
7167
|
case 46:
|
|
7016
|
-
|
|
7017
|
-
|
|
7168
|
+
if (!(_g < _e.length)) return [3 /*break*/, 51];
|
|
7169
|
+
_f = _e[_g];
|
|
7170
|
+
if (!(_f in _d)) return [3 /*break*/, 50];
|
|
7171
|
+
t = _f;
|
|
7172
|
+
_k.label = 47;
|
|
7018
7173
|
case 47:
|
|
7019
|
-
_k.
|
|
7020
|
-
return [
|
|
7174
|
+
_k.trys.push([47, 49, , 50]);
|
|
7175
|
+
return [4 /*yield*/, tests[t]()];
|
|
7021
7176
|
case 48:
|
|
7177
|
+
_k.sent();
|
|
7178
|
+
return [3 /*break*/, 50];
|
|
7179
|
+
case 49:
|
|
7022
7180
|
err_2 = _k.sent();
|
|
7023
7181
|
console.error("Error running test:");
|
|
7024
7182
|
console.error(err_2);
|
|
7025
7183
|
process.exit(1);
|
|
7026
|
-
return [3 /*break*/,
|
|
7027
|
-
case 49:
|
|
7028
|
-
_g++;
|
|
7029
|
-
return [3 /*break*/, 45];
|
|
7184
|
+
return [3 /*break*/, 50];
|
|
7030
7185
|
case 50:
|
|
7186
|
+
_g++;
|
|
7187
|
+
return [3 /*break*/, 46];
|
|
7188
|
+
case 51:
|
|
7031
7189
|
process.exit();
|
|
7032
7190
|
return [2 /*return*/];
|
|
7033
7191
|
}
|