@asposecloud/aspose-tasks-cloud 25.8.0 → 25.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/src/api.d.ts +495 -496
- package/dist/src/api.js +3545 -3544
- package/dist/src/api.js.map +1 -1
- package/dist/src/index.d.ts +6 -6
- package/dist/src/index.js +22 -11
- package/dist/src/index.js.map +1 -1
- package/dist/src/internal/auth.d.ts +30 -30
- package/dist/src/internal/auth.js +106 -90
- package/dist/src/internal/auth.js.map +1 -1
- package/dist/src/internal/configuration.d.ts +35 -35
- package/dist/src/internal/configuration.js +62 -61
- package/dist/src/internal/configuration.js.map +1 -1
- package/dist/src/internal/objectSerializer.d.ts +15 -15
- package/dist/src/internal/objectSerializer.js +178 -177
- package/dist/src/internal/objectSerializer.js.map +1 -1
- package/dist/src/internal/requestHelper.d.ts +36 -38
- package/dist/src/internal/requestHelper.js +294 -168
- package/dist/src/internal/requestHelper.js.map +1 -1
- package/dist/src/model/model.d.ts +9180 -9149
- package/dist/src/model/model.js +8326 -8283
- package/dist/src/model/model.js.map +1 -1
- package/dist/test/apiCoverageTest.d.ts +1 -1
- package/dist/test/apiCoverageTest.js +82 -82
- package/dist/test/apiCoverageTest.js.map +1 -1
- package/dist/test/assignmentsTests.d.ts +1 -1
- package/dist/test/assignmentsTests.js +292 -292
- package/dist/test/assignmentsTests.js.map +1 -1
- package/dist/test/baseTest.d.ts +32 -32
- package/dist/test/baseTest.js +116 -113
- package/dist/test/baseTest.js.map +1 -1
- package/dist/test/calendarExceptionsTests.d.ts +1 -1
- package/dist/test/calendarExceptionsTests.js +197 -197
- package/dist/test/calendarExceptionsTests.js.map +1 -1
- package/dist/test/calendarWorkWeeksTests.d.ts +1 -1
- package/dist/test/calendarWorkWeeksTests.js +88 -88
- package/dist/test/calendarWorkWeeksTests.js.map +1 -1
- package/dist/test/calendarsTests.d.ts +1 -1
- package/dist/test/calendarsTests.js +240 -240
- package/dist/test/calendarsTests.js.map +1 -1
- package/dist/test/documentPropertiesTests.d.ts +1 -1
- package/dist/test/documentPropertiesTests.js +171 -171
- package/dist/test/documentPropertiesTests.js.map +1 -1
- package/dist/test/extendedAttributesTests.d.ts +1 -1
- package/dist/test/extendedAttributesTests.js +200 -200
- package/dist/test/extendedAttributesTests.js.map +1 -1
- package/dist/test/getPageCountTests.d.ts +1 -1
- package/dist/test/getPageCountTests.js +74 -74
- package/dist/test/getPageCountTests.js.map +1 -1
- package/dist/test/importProjectTests.d.ts +1 -1
- package/dist/test/importProjectTests.js +125 -125
- package/dist/test/importProjectTests.js.map +1 -1
- package/dist/test/outlineCodesTests.d.ts +1 -1
- package/dist/test/outlineCodesTests.js +97 -97
- package/dist/test/outlineCodesTests.js.map +1 -1
- package/dist/test/projectOnlineTests.d.ts +1 -1
- package/dist/test/projectOnlineTests.js +117 -117
- package/dist/test/projectOnlineTests.js.map +1 -1
- package/dist/test/readProjectTests.d.ts +1 -1
- package/dist/test/readProjectTests.js +71 -71
- package/dist/test/readProjectTests.js.map +1 -1
- package/dist/test/recalculationTests.d.ts +1 -1
- package/dist/test/recalculationTests.js +131 -131
- package/dist/test/recalculationTests.js.map +1 -1
- package/dist/test/recurringInfoTests.d.ts +1 -1
- package/dist/test/recurringInfoTests.js +139 -139
- package/dist/test/recurringInfoTests.js.map +1 -1
- package/dist/test/reportTests.d.ts +1 -1
- package/dist/test/reportTests.js +97 -97
- package/dist/test/reportTests.js.map +1 -1
- package/dist/test/resourceLevelTests.d.ts +1 -1
- package/dist/test/resourceLevelTests.js +102 -102
- package/dist/test/resourceLevelTests.js.map +1 -1
- package/dist/test/resourcesTests.d.ts +1 -1
- package/dist/test/resourcesTests.js +156 -156
- package/dist/test/resourcesTests.js.map +1 -1
- package/dist/test/storage/fileTests.d.ts +1 -1
- package/dist/test/storage/fileTests.js +165 -165
- package/dist/test/storage/fileTests.js.map +1 -1
- package/dist/test/storage/folderTests.d.ts +1 -1
- package/dist/test/storage/folderTests.js +159 -159
- package/dist/test/storage/folderTests.js.map +1 -1
- package/dist/test/storage/storageTests.d.ts +1 -1
- package/dist/test/storage/storageTests.js +84 -84
- package/dist/test/storage/storageTests.js.map +1 -1
- package/dist/test/taskDocumentFormatTests.d.ts +1 -1
- package/dist/test/taskDocumentFormatTests.js +101 -101
- package/dist/test/taskDocumentFormatTests.js.map +1 -1
- package/dist/test/taskLinksTests.d.ts +1 -1
- package/dist/test/taskLinksTests.js +131 -131
- package/dist/test/taskLinksTests.js.map +1 -1
- package/dist/test/tasksExtendedAttributesTests.d.ts +1 -1
- package/dist/test/tasksExtendedAttributesTests.js +361 -361
- package/dist/test/tasksExtendedAttributesTests.js.map +1 -1
- package/dist/test/tasksPrimaveraPropertiesTests.d.ts +1 -1
- package/dist/test/tasksPrimaveraPropertiesTests.js +69 -69
- package/dist/test/tasksPrimaveraPropertiesTests.js.map +1 -1
- package/dist/test/tasksTests.d.ts +1 -1
- package/dist/test/tasksTests.js +295 -295
- package/dist/test/tasksTests.js.map +1 -1
- package/dist/test/timephasedDataTests.d.ts +1 -1
- package/dist/test/timephasedDataTests.js +107 -107
- package/dist/test/timephasedDataTests.js.map +1 -1
- package/dist/test/vbaTests.d.ts +1 -1
- package/dist/test/vbaTests.js +58 -58
- package/dist/test/vbaTests.js.map +1 -1
- package/dist/test/viewsTests.d.ts +1 -1
- package/dist/test/viewsTests.js +191 -191
- package/dist/test/viewsTests.js.map +1 -1
- package/dist/test/wbsTest.d.ts +1 -1
- package/dist/test/wbsTest.js +71 -71
- package/dist/test/wbsTest.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +4 -4
|
@@ -1,102 +1,102 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* MIT License
|
|
4
|
-
|
|
5
|
-
* Copyright (c) 2019 Aspose Pty Ltd
|
|
6
|
-
|
|
7
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
-
* in the Software without restriction, including without limitation the rights
|
|
10
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
-
* furnished to do so, subject to the following conditions:
|
|
13
|
-
|
|
14
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
15
|
-
* copies or substantial portions of the Software.
|
|
16
|
-
|
|
17
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
-
* SOFTWARE.
|
|
24
|
-
*/
|
|
25
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
const chai_1 = require("chai");
|
|
36
|
-
require("mocha");
|
|
37
|
-
const model_1 = require("../src/model/model");
|
|
38
|
-
const BaseTest = require("./baseTest");
|
|
39
|
-
describe("getTaskDocumentWithFormat function", () => {
|
|
40
|
-
it("should return response with code 200 and correct data", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
41
|
-
const tasksApi = BaseTest.initializeTasksApi();
|
|
42
|
-
const fileName = "Home_move_plan.mpp";
|
|
43
|
-
const localPath = BaseTest.localBaseTestDataFolder + fileName;
|
|
44
|
-
const remotePath = BaseTest.remoteBaseTestDataFolder;
|
|
45
|
-
const remoteFullPath = remotePath + "/" + fileName;
|
|
46
|
-
yield tasksApi.uploadFileToStorage(remoteFullPath, localPath);
|
|
47
|
-
const request = new model_1.GetTaskDocumentWithFormatRequest();
|
|
48
|
-
request.name = fileName;
|
|
49
|
-
request.folder = remotePath;
|
|
50
|
-
request.format = model_1.ProjectFileFormat.Csv;
|
|
51
|
-
const result = yield tasksApi.getTaskDocumentWithFormat(request);
|
|
52
|
-
chai_1.expect(result.response.statusCode).to.equal(200);
|
|
53
|
-
chai_1.expect(result.body.buffer).is.not.undefined.and.not.null;
|
|
54
|
-
const strings = BaseTest.convertArrayBufferToStrings(result.body.buffer);
|
|
55
|
-
chai_1.expect(strings[0]).to.equal("ID;Task_Name;Outline_Level;Duration;Start_Date;Finish_Date;Percent_Comp;Cost;Work");
|
|
56
|
-
chai_1.expect(strings[1]).to.equal("1;Five to Eight Weeks Before Moving;1;16 days;Thu 01.01.04 08:00;Thu 22.01.04 17:00;0%;$0;0 hrs");
|
|
57
|
-
}));
|
|
58
|
-
it("should return response with code 200 and correct data as zipped html", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
59
|
-
const tasksApi = BaseTest.initializeTasksApi();
|
|
60
|
-
const fileName = "Home_move_plan.mpp";
|
|
61
|
-
const localPath = BaseTest.localBaseTestDataFolder + fileName;
|
|
62
|
-
const remotePath = BaseTest.remoteBaseTestDataFolder;
|
|
63
|
-
const remoteFullPath = remotePath + "/" + fileName;
|
|
64
|
-
yield tasksApi.uploadFileToStorage(remoteFullPath, localPath);
|
|
65
|
-
const request = new model_1.GetTaskDocumentWithFormatRequest();
|
|
66
|
-
request.name = fileName;
|
|
67
|
-
request.folder = remotePath;
|
|
68
|
-
request.format = model_1.ProjectFileFormat.Html;
|
|
69
|
-
request.returnAsZipArchive = true;
|
|
70
|
-
const result = yield tasksApi.getTaskDocumentWithFormat(request);
|
|
71
|
-
chai_1.expect(result.response.statusCode).to.equal(200);
|
|
72
|
-
chai_1.expect(result.body.buffer).is.not.undefined.and.not.null;
|
|
73
|
-
chai_1.expect(result.body.length).to.be.at.least(1);
|
|
74
|
-
}));
|
|
75
|
-
});
|
|
76
|
-
describe("postTaskDocumentWithFormat function", () => {
|
|
77
|
-
it("should return response with code 200 and correct data", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
78
|
-
const tasksApi = BaseTest.initializeTasksApi();
|
|
79
|
-
const fileName = "Home_move_plan.mpp";
|
|
80
|
-
const localPath = BaseTest.localBaseTestDataFolder + fileName;
|
|
81
|
-
const remotePath = BaseTest.remoteBaseTestDataFolder;
|
|
82
|
-
const remoteFullPath = remotePath + "/" + fileName;
|
|
83
|
-
yield tasksApi.uploadFileToStorage(remoteFullPath, localPath);
|
|
84
|
-
// SaveOptions parameters is a json-serialized representation of
|
|
85
|
-
// Aspose.Tasks's SaveOptions class or its format-specific inheritors (Like CsvOptions, etc):
|
|
86
|
-
// See Aspose.Tasks reference: https://apireference.aspose.com/net/tasks/aspose.tasks.saving/saveoptions
|
|
87
|
-
const saveOptionsSerialized = "{ \"TextDelimiter\":\"Comma\", \"IncludeHeaders\":false,\"NonExistingTestProperty\":false," +
|
|
88
|
-
"\"View\":{ \"Columns\":[{\"Type\":\"GanttChartColumn\",\"Name\":\"TestColumn1\",\"Property\":\"Name\",\"Width\":120}," +
|
|
89
|
-
"{\"Type\":\"GanttChartColumn\",\"Name\":\"TestColumn2\",\"Property\":\"Duration\",\"Width\":120}]}}";
|
|
90
|
-
const request = new model_1.PostTaskDocumentWithFormatRequest();
|
|
91
|
-
request.name = fileName;
|
|
92
|
-
request.folder = remotePath;
|
|
93
|
-
request.format = model_1.ProjectFileFormat.Csv;
|
|
94
|
-
request.saveOptions = JSON.parse(saveOptionsSerialized);
|
|
95
|
-
const result = yield tasksApi.postTaskDocumentWithFormat(request);
|
|
96
|
-
chai_1.expect(result.response.statusCode).to.equal(200);
|
|
97
|
-
chai_1.expect(result.body.buffer).is.not.undefined.and.not.null;
|
|
98
|
-
const strings = BaseTest.convertArrayBufferToStrings(result.body.buffer);
|
|
99
|
-
chai_1.expect(strings[0]).to.equal("Five to Eight Weeks Before Moving,16 days");
|
|
100
|
-
}));
|
|
101
|
-
});
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* MIT License
|
|
4
|
+
|
|
5
|
+
* Copyright (c) 2019 Aspose Pty Ltd
|
|
6
|
+
|
|
7
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
* in the Software without restriction, including without limitation the rights
|
|
10
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
* furnished to do so, subject to the following conditions:
|
|
13
|
+
|
|
14
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
15
|
+
* copies or substantial portions of the Software.
|
|
16
|
+
|
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
* SOFTWARE.
|
|
24
|
+
*/
|
|
25
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
+
const chai_1 = require("chai");
|
|
36
|
+
require("mocha");
|
|
37
|
+
const model_1 = require("../src/model/model");
|
|
38
|
+
const BaseTest = require("./baseTest");
|
|
39
|
+
describe("getTaskDocumentWithFormat function", () => {
|
|
40
|
+
it("should return response with code 200 and correct data", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
41
|
+
const tasksApi = BaseTest.initializeTasksApi();
|
|
42
|
+
const fileName = "Home_move_plan.mpp";
|
|
43
|
+
const localPath = BaseTest.localBaseTestDataFolder + fileName;
|
|
44
|
+
const remotePath = BaseTest.remoteBaseTestDataFolder;
|
|
45
|
+
const remoteFullPath = remotePath + "/" + fileName;
|
|
46
|
+
yield tasksApi.uploadFileToStorage(remoteFullPath, localPath);
|
|
47
|
+
const request = new model_1.GetTaskDocumentWithFormatRequest();
|
|
48
|
+
request.name = fileName;
|
|
49
|
+
request.folder = remotePath;
|
|
50
|
+
request.format = model_1.ProjectFileFormat.Csv;
|
|
51
|
+
const result = yield tasksApi.getTaskDocumentWithFormat(request);
|
|
52
|
+
(0, chai_1.expect)(result.response.statusCode).to.equal(200);
|
|
53
|
+
(0, chai_1.expect)(result.body.buffer).is.not.undefined.and.not.null;
|
|
54
|
+
const strings = BaseTest.convertArrayBufferToStrings(result.body.buffer);
|
|
55
|
+
(0, chai_1.expect)(strings[0]).to.equal("ID;Task_Name;Outline_Level;Duration;Start_Date;Finish_Date;Percent_Comp;Cost;Work");
|
|
56
|
+
(0, chai_1.expect)(strings[1]).to.equal("1;Five to Eight Weeks Before Moving;1;16 days;Thu 01.01.04 08:00;Thu 22.01.04 17:00;0%;$0;0 hrs");
|
|
57
|
+
}));
|
|
58
|
+
it("should return response with code 200 and correct data as zipped html", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
59
|
+
const tasksApi = BaseTest.initializeTasksApi();
|
|
60
|
+
const fileName = "Home_move_plan.mpp";
|
|
61
|
+
const localPath = BaseTest.localBaseTestDataFolder + fileName;
|
|
62
|
+
const remotePath = BaseTest.remoteBaseTestDataFolder;
|
|
63
|
+
const remoteFullPath = remotePath + "/" + fileName;
|
|
64
|
+
yield tasksApi.uploadFileToStorage(remoteFullPath, localPath);
|
|
65
|
+
const request = new model_1.GetTaskDocumentWithFormatRequest();
|
|
66
|
+
request.name = fileName;
|
|
67
|
+
request.folder = remotePath;
|
|
68
|
+
request.format = model_1.ProjectFileFormat.Html;
|
|
69
|
+
request.returnAsZipArchive = true;
|
|
70
|
+
const result = yield tasksApi.getTaskDocumentWithFormat(request);
|
|
71
|
+
(0, chai_1.expect)(result.response.statusCode).to.equal(200);
|
|
72
|
+
(0, chai_1.expect)(result.body.buffer).is.not.undefined.and.not.null;
|
|
73
|
+
(0, chai_1.expect)(result.body.length).to.be.at.least(1);
|
|
74
|
+
}));
|
|
75
|
+
});
|
|
76
|
+
describe("postTaskDocumentWithFormat function", () => {
|
|
77
|
+
it("should return response with code 200 and correct data", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
78
|
+
const tasksApi = BaseTest.initializeTasksApi();
|
|
79
|
+
const fileName = "Home_move_plan.mpp";
|
|
80
|
+
const localPath = BaseTest.localBaseTestDataFolder + fileName;
|
|
81
|
+
const remotePath = BaseTest.remoteBaseTestDataFolder;
|
|
82
|
+
const remoteFullPath = remotePath + "/" + fileName;
|
|
83
|
+
yield tasksApi.uploadFileToStorage(remoteFullPath, localPath);
|
|
84
|
+
// SaveOptions parameters is a json-serialized representation of
|
|
85
|
+
// Aspose.Tasks's SaveOptions class or its format-specific inheritors (Like CsvOptions, etc):
|
|
86
|
+
// See Aspose.Tasks reference: https://apireference.aspose.com/net/tasks/aspose.tasks.saving/saveoptions
|
|
87
|
+
const saveOptionsSerialized = "{ \"TextDelimiter\":\"Comma\", \"IncludeHeaders\":false,\"NonExistingTestProperty\":false," +
|
|
88
|
+
"\"View\":{ \"Columns\":[{\"Type\":\"GanttChartColumn\",\"Name\":\"TestColumn1\",\"Property\":\"Name\",\"Width\":120}," +
|
|
89
|
+
"{\"Type\":\"GanttChartColumn\",\"Name\":\"TestColumn2\",\"Property\":\"Duration\",\"Width\":120}]}}";
|
|
90
|
+
const request = new model_1.PostTaskDocumentWithFormatRequest();
|
|
91
|
+
request.name = fileName;
|
|
92
|
+
request.folder = remotePath;
|
|
93
|
+
request.format = model_1.ProjectFileFormat.Csv;
|
|
94
|
+
request.saveOptions = JSON.parse(saveOptionsSerialized);
|
|
95
|
+
const result = yield tasksApi.postTaskDocumentWithFormat(request);
|
|
96
|
+
(0, chai_1.expect)(result.response.statusCode).to.equal(200);
|
|
97
|
+
(0, chai_1.expect)(result.body.buffer).is.not.undefined.and.not.null;
|
|
98
|
+
const strings = BaseTest.convertArrayBufferToStrings(result.body.buffer);
|
|
99
|
+
(0, chai_1.expect)(strings[0]).to.equal("Five to Eight Weeks Before Moving,16 days");
|
|
100
|
+
}));
|
|
101
|
+
});
|
|
102
102
|
//# sourceMappingURL=taskDocumentFormatTests.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taskDocumentFormatTests.js","sourceRoot":"","sources":["../../test/taskDocumentFormatTests.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE;;;;;;;;;;;AAEF,+BAA8B;AAC9B,iBAAe;AAEf,8CAA4H;AAC5H,uCAAuC;AAEvC,QAAQ,CAAC,oCAAoC,EAAE,GAAG,EAAE;IAChD,EAAE,CAAC,uDAAuD,EAAE,GAAS,EAAE;QAEnE,MAAM,QAAQ,GAAG,QAAQ,CAAC,kBAAkB,EAAE,CAAC;QAC/C,MAAM,QAAQ,GAAG,oBAAoB,CAAC;QACtC,MAAM,SAAS,GAAG,QAAQ,CAAC,uBAAuB,GAAG,QAAQ,CAAC;QAC9D,MAAM,UAAU,GAAG,QAAQ,CAAC,wBAAwB,CAAC;QACrD,MAAM,cAAc,GAAG,UAAU,GAAG,GAAG,GAAG,QAAQ,CAAC;QAEnD,MAAM,QAAQ,CAAC,mBAAmB,CAAC,cAAc,EAAE,SAAS,CAAC,CAAC;QAE9D,MAAM,OAAO,GAAG,IAAI,wCAAgC,EAAE,CAAC;QACvD,OAAO,CAAC,IAAI,GAAG,QAAQ,CAAC;QACxB,OAAO,CAAC,MAAM,GAAG,UAAU,CAAC;QAC5B,OAAO,CAAC,MAAM,GAAG,yBAAiB,CAAC,GAAG,CAAC;QAEvC,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,yBAAyB,CAAC,OAAO,CAAC,CAAC;QAEjE,aAAM,
|
|
1
|
+
{"version":3,"file":"taskDocumentFormatTests.js","sourceRoot":"","sources":["../../test/taskDocumentFormatTests.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE;;;;;;;;;;;AAEF,+BAA8B;AAC9B,iBAAe;AAEf,8CAA4H;AAC5H,uCAAuC;AAEvC,QAAQ,CAAC,oCAAoC,EAAE,GAAG,EAAE;IAChD,EAAE,CAAC,uDAAuD,EAAE,GAAS,EAAE;QAEnE,MAAM,QA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AC,CAAA,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import "mocha";
|
|
1
|
+
import "mocha";
|
|
@@ -1,132 +1,132 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* MIT License
|
|
4
|
-
|
|
5
|
-
* Copyright (c) 2019 Aspose Pty Ltd
|
|
6
|
-
|
|
7
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
-
* in the Software without restriction, including without limitation the rights
|
|
10
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
-
* furnished to do so, subject to the following conditions:
|
|
13
|
-
|
|
14
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
15
|
-
* copies or substantial portions of the Software.
|
|
16
|
-
|
|
17
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
-
* SOFTWARE.
|
|
24
|
-
*/
|
|
25
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
const chai_1 = require("chai");
|
|
36
|
-
require("mocha");
|
|
37
|
-
const model_1 = require("../src/model/model");
|
|
38
|
-
const BaseTest = require("./baseTest");
|
|
39
|
-
describe("getTaskLinks function", () => {
|
|
40
|
-
it("should return response with code 200 and correct data", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
41
|
-
const tasksApi = BaseTest.initializeTasksApi();
|
|
42
|
-
const fileName = "NewProductDev.mpp";
|
|
43
|
-
const localPath = BaseTest.localBaseTestDataFolder + fileName;
|
|
44
|
-
const remotePath = BaseTest.remoteBaseTestDataFolder;
|
|
45
|
-
const remoteFullPath = remotePath + "/" + fileName;
|
|
46
|
-
yield tasksApi.uploadFileToStorage(remoteFullPath, localPath);
|
|
47
|
-
const request = new model_1.GetTaskLinksRequest();
|
|
48
|
-
request.name = fileName;
|
|
49
|
-
request.folder = remotePath;
|
|
50
|
-
const result = yield tasksApi.getTaskLinks(request);
|
|
51
|
-
chai_1.expect(result.response.statusCode).to.equal(200);
|
|
52
|
-
chai_1.expect(result.body.taskLinks).is.not.undefined.and.not.null;
|
|
53
|
-
chai_1.expect(result.body.taskLinks.length).to.equal(24);
|
|
54
|
-
}));
|
|
55
|
-
});
|
|
56
|
-
describe("postTaskLink function", () => {
|
|
57
|
-
it("should return response with code 200", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
58
|
-
const tasksApi = BaseTest.initializeTasksApi();
|
|
59
|
-
const fileName = "NewProductDev.mpp";
|
|
60
|
-
const localPath = BaseTest.localBaseTestDataFolder + fileName;
|
|
61
|
-
const remotePath = BaseTest.remoteBaseTestDataFolder;
|
|
62
|
-
const remoteFullPath = remotePath + "/" + fileName;
|
|
63
|
-
yield tasksApi.uploadFileToStorage(remoteFullPath, localPath);
|
|
64
|
-
const taskLink = new model_1.TaskLink();
|
|
65
|
-
taskLink.predecessorUid = 28;
|
|
66
|
-
taskLink.successorUid = 30;
|
|
67
|
-
taskLink.linkType = model_1.TaskLinkType.StartToStart;
|
|
68
|
-
taskLink.lag = 9600;
|
|
69
|
-
taskLink.lagFormat = model_1.TimeUnitType.Day;
|
|
70
|
-
const request = new model_1.PostTaskLinkRequest();
|
|
71
|
-
request.name = fileName;
|
|
72
|
-
request.folder = remotePath;
|
|
73
|
-
request.taskLink = taskLink;
|
|
74
|
-
const result = yield tasksApi.postTaskLink(request);
|
|
75
|
-
chai_1.expect(result.response.statusCode).to.equal(200);
|
|
76
|
-
}));
|
|
77
|
-
});
|
|
78
|
-
describe("putTaskLinks function", () => {
|
|
79
|
-
it("should return response with code 200 and correct data", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
80
|
-
const tasksApi = BaseTest.initializeTasksApi();
|
|
81
|
-
const fileName = "NewProductDev.mpp";
|
|
82
|
-
const localPath = BaseTest.localBaseTestDataFolder + fileName;
|
|
83
|
-
const remotePath = BaseTest.remoteBaseTestDataFolder;
|
|
84
|
-
const remoteFullPath = remotePath + "/" + fileName;
|
|
85
|
-
yield tasksApi.uploadFileToStorage(remoteFullPath, localPath);
|
|
86
|
-
const getRequest = new model_1.GetTaskLinksRequest();
|
|
87
|
-
getRequest.name = fileName;
|
|
88
|
-
getRequest.folder = remotePath;
|
|
89
|
-
let getResult = yield tasksApi.getTaskLinks(getRequest);
|
|
90
|
-
const taskLinkToEdit = getResult.body.taskLinks[0];
|
|
91
|
-
// Modification of PredecessorUid and SuccessorUid fields is not supported.
|
|
92
|
-
taskLinkToEdit.linkType = model_1.TaskLinkType.StartToFinish;
|
|
93
|
-
taskLinkToEdit.lag = 9600;
|
|
94
|
-
taskLinkToEdit.lagFormat = model_1.TimeUnitType.Day;
|
|
95
|
-
const putRequest = new model_1.PutTaskLinkRequest();
|
|
96
|
-
putRequest.name = fileName;
|
|
97
|
-
putRequest.folder = remotePath;
|
|
98
|
-
putRequest.index = 1;
|
|
99
|
-
putRequest.taskLink = taskLinkToEdit;
|
|
100
|
-
const putResult = yield tasksApi.putTaskLink(putRequest);
|
|
101
|
-
chai_1.expect(putResult.response.statusCode).to.equal(200);
|
|
102
|
-
getResult = yield tasksApi.getTaskLinks(getRequest);
|
|
103
|
-
chai_1.expect(getResult.body.taskLinks[0].linkType).to.equal(model_1.TaskLinkType.StartToFinish);
|
|
104
|
-
chai_1.expect(getResult.body.taskLinks[0].lag).to.equal(9600);
|
|
105
|
-
chai_1.expect(getResult.body.taskLinks[0].lagFormat).to.equal(model_1.TimeUnitType.Day);
|
|
106
|
-
chai_1.expect(getResult.body.taskLinks[0].linkLagTimeSpan).to.equal("16:00:00");
|
|
107
|
-
}));
|
|
108
|
-
});
|
|
109
|
-
describe("deleteTaskLink function", () => {
|
|
110
|
-
it("should return response with code 200 and correct data", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
111
|
-
const tasksApi = BaseTest.initializeTasksApi();
|
|
112
|
-
const fileName = "NewProductDev.mpp";
|
|
113
|
-
const localPath = BaseTest.localBaseTestDataFolder + fileName;
|
|
114
|
-
const remotePath = BaseTest.remoteBaseTestDataFolder;
|
|
115
|
-
const remoteFullPath = remotePath + "/" + fileName;
|
|
116
|
-
yield tasksApi.uploadFileToStorage(remoteFullPath, localPath);
|
|
117
|
-
const deleteRequest = new model_1.DeleteTaskLinkRequest();
|
|
118
|
-
deleteRequest.name = fileName;
|
|
119
|
-
deleteRequest.folder = remotePath;
|
|
120
|
-
deleteRequest.index = 1;
|
|
121
|
-
const deleteResult = yield tasksApi.deleteTaskLink(deleteRequest);
|
|
122
|
-
chai_1.expect(deleteResult.response.statusCode).to.equal(200);
|
|
123
|
-
const getRequest = new model_1.GetTaskLinksRequest();
|
|
124
|
-
getRequest.name = fileName;
|
|
125
|
-
getRequest.folder = remotePath;
|
|
126
|
-
const getResult = yield tasksApi.getTaskLinks(getRequest);
|
|
127
|
-
chai_1.expect(getResult.response.statusCode).to.equal(200);
|
|
128
|
-
chai_1.expect(getResult.body.taskLinks).is.not.undefined.and.not.null;
|
|
129
|
-
chai_1.expect(getResult.body.taskLinks.length).to.equal(23);
|
|
130
|
-
}));
|
|
131
|
-
});
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* MIT License
|
|
4
|
+
|
|
5
|
+
* Copyright (c) 2019 Aspose Pty Ltd
|
|
6
|
+
|
|
7
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
* in the Software without restriction, including without limitation the rights
|
|
10
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
* furnished to do so, subject to the following conditions:
|
|
13
|
+
|
|
14
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
15
|
+
* copies or substantial portions of the Software.
|
|
16
|
+
|
|
17
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
* SOFTWARE.
|
|
24
|
+
*/
|
|
25
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
+
const chai_1 = require("chai");
|
|
36
|
+
require("mocha");
|
|
37
|
+
const model_1 = require("../src/model/model");
|
|
38
|
+
const BaseTest = require("./baseTest");
|
|
39
|
+
describe("getTaskLinks function", () => {
|
|
40
|
+
it("should return response with code 200 and correct data", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
41
|
+
const tasksApi = BaseTest.initializeTasksApi();
|
|
42
|
+
const fileName = "NewProductDev.mpp";
|
|
43
|
+
const localPath = BaseTest.localBaseTestDataFolder + fileName;
|
|
44
|
+
const remotePath = BaseTest.remoteBaseTestDataFolder;
|
|
45
|
+
const remoteFullPath = remotePath + "/" + fileName;
|
|
46
|
+
yield tasksApi.uploadFileToStorage(remoteFullPath, localPath);
|
|
47
|
+
const request = new model_1.GetTaskLinksRequest();
|
|
48
|
+
request.name = fileName;
|
|
49
|
+
request.folder = remotePath;
|
|
50
|
+
const result = yield tasksApi.getTaskLinks(request);
|
|
51
|
+
(0, chai_1.expect)(result.response.statusCode).to.equal(200);
|
|
52
|
+
(0, chai_1.expect)(result.body.taskLinks).is.not.undefined.and.not.null;
|
|
53
|
+
(0, chai_1.expect)(result.body.taskLinks.length).to.equal(24);
|
|
54
|
+
}));
|
|
55
|
+
});
|
|
56
|
+
describe("postTaskLink function", () => {
|
|
57
|
+
it("should return response with code 200", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
58
|
+
const tasksApi = BaseTest.initializeTasksApi();
|
|
59
|
+
const fileName = "NewProductDev.mpp";
|
|
60
|
+
const localPath = BaseTest.localBaseTestDataFolder + fileName;
|
|
61
|
+
const remotePath = BaseTest.remoteBaseTestDataFolder;
|
|
62
|
+
const remoteFullPath = remotePath + "/" + fileName;
|
|
63
|
+
yield tasksApi.uploadFileToStorage(remoteFullPath, localPath);
|
|
64
|
+
const taskLink = new model_1.TaskLink();
|
|
65
|
+
taskLink.predecessorUid = 28;
|
|
66
|
+
taskLink.successorUid = 30;
|
|
67
|
+
taskLink.linkType = model_1.TaskLinkType.StartToStart;
|
|
68
|
+
taskLink.lag = 9600;
|
|
69
|
+
taskLink.lagFormat = model_1.TimeUnitType.Day;
|
|
70
|
+
const request = new model_1.PostTaskLinkRequest();
|
|
71
|
+
request.name = fileName;
|
|
72
|
+
request.folder = remotePath;
|
|
73
|
+
request.taskLink = taskLink;
|
|
74
|
+
const result = yield tasksApi.postTaskLink(request);
|
|
75
|
+
(0, chai_1.expect)(result.response.statusCode).to.equal(200);
|
|
76
|
+
}));
|
|
77
|
+
});
|
|
78
|
+
describe("putTaskLinks function", () => {
|
|
79
|
+
it("should return response with code 200 and correct data", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
80
|
+
const tasksApi = BaseTest.initializeTasksApi();
|
|
81
|
+
const fileName = "NewProductDev.mpp";
|
|
82
|
+
const localPath = BaseTest.localBaseTestDataFolder + fileName;
|
|
83
|
+
const remotePath = BaseTest.remoteBaseTestDataFolder;
|
|
84
|
+
const remoteFullPath = remotePath + "/" + fileName;
|
|
85
|
+
yield tasksApi.uploadFileToStorage(remoteFullPath, localPath);
|
|
86
|
+
const getRequest = new model_1.GetTaskLinksRequest();
|
|
87
|
+
getRequest.name = fileName;
|
|
88
|
+
getRequest.folder = remotePath;
|
|
89
|
+
let getResult = yield tasksApi.getTaskLinks(getRequest);
|
|
90
|
+
const taskLinkToEdit = getResult.body.taskLinks[0];
|
|
91
|
+
// Modification of PredecessorUid and SuccessorUid fields is not supported.
|
|
92
|
+
taskLinkToEdit.linkType = model_1.TaskLinkType.StartToFinish;
|
|
93
|
+
taskLinkToEdit.lag = 9600;
|
|
94
|
+
taskLinkToEdit.lagFormat = model_1.TimeUnitType.Day;
|
|
95
|
+
const putRequest = new model_1.PutTaskLinkRequest();
|
|
96
|
+
putRequest.name = fileName;
|
|
97
|
+
putRequest.folder = remotePath;
|
|
98
|
+
putRequest.index = 1;
|
|
99
|
+
putRequest.taskLink = taskLinkToEdit;
|
|
100
|
+
const putResult = yield tasksApi.putTaskLink(putRequest);
|
|
101
|
+
(0, chai_1.expect)(putResult.response.statusCode).to.equal(200);
|
|
102
|
+
getResult = yield tasksApi.getTaskLinks(getRequest);
|
|
103
|
+
(0, chai_1.expect)(getResult.body.taskLinks[0].linkType).to.equal(model_1.TaskLinkType.StartToFinish);
|
|
104
|
+
(0, chai_1.expect)(getResult.body.taskLinks[0].lag).to.equal(9600);
|
|
105
|
+
(0, chai_1.expect)(getResult.body.taskLinks[0].lagFormat).to.equal(model_1.TimeUnitType.Day);
|
|
106
|
+
(0, chai_1.expect)(getResult.body.taskLinks[0].linkLagTimeSpan).to.equal("16:00:00");
|
|
107
|
+
}));
|
|
108
|
+
});
|
|
109
|
+
describe("deleteTaskLink function", () => {
|
|
110
|
+
it("should return response with code 200 and correct data", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
111
|
+
const tasksApi = BaseTest.initializeTasksApi();
|
|
112
|
+
const fileName = "NewProductDev.mpp";
|
|
113
|
+
const localPath = BaseTest.localBaseTestDataFolder + fileName;
|
|
114
|
+
const remotePath = BaseTest.remoteBaseTestDataFolder;
|
|
115
|
+
const remoteFullPath = remotePath + "/" + fileName;
|
|
116
|
+
yield tasksApi.uploadFileToStorage(remoteFullPath, localPath);
|
|
117
|
+
const deleteRequest = new model_1.DeleteTaskLinkRequest();
|
|
118
|
+
deleteRequest.name = fileName;
|
|
119
|
+
deleteRequest.folder = remotePath;
|
|
120
|
+
deleteRequest.index = 1;
|
|
121
|
+
const deleteResult = yield tasksApi.deleteTaskLink(deleteRequest);
|
|
122
|
+
(0, chai_1.expect)(deleteResult.response.statusCode).to.equal(200);
|
|
123
|
+
const getRequest = new model_1.GetTaskLinksRequest();
|
|
124
|
+
getRequest.name = fileName;
|
|
125
|
+
getRequest.folder = remotePath;
|
|
126
|
+
const getResult = yield tasksApi.getTaskLinks(getRequest);
|
|
127
|
+
(0, chai_1.expect)(getResult.response.statusCode).to.equal(200);
|
|
128
|
+
(0, chai_1.expect)(getResult.body.taskLinks).is.not.undefined.and.not.null;
|
|
129
|
+
(0, chai_1.expect)(getResult.body.taskLinks.length).to.equal(23);
|
|
130
|
+
}));
|
|
131
|
+
});
|
|
132
132
|
//# sourceMappingURL=taskLinksTests.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taskLinksTests.js","sourceRoot":"","sources":["../../test/taskLinksTests.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;EAsBE;;;;;;;;;;;AAEF,+BAA8B;AAC9B,iBAAe;AAEf,8CAA+J;AAC/J,uCAAuC;AAEvC,QAAQ,CAAC,uBAAuB,EAAE,GAAG,EAAE;IACnC,EAAE,CAAC,uDAAuD,EAAE,GAAS,EAAE;QAEnE,MAAM,QAAQ,GAAG,QAAQ,CAAC,kBAAkB,EAAE,CAAC;QAC/C,MAAM,QAAQ,GAAG,mBAAmB,CAAC;QACrC,MAAM,SAAS,GAAG,QAAQ,CAAC,uBAAuB,GAAG,QAAQ,CAAC;QAC9D,MAAM,UAAU,GAAG,QAAQ,CAAC,wBAAwB,CAAC;QACrD,MAAM,cAAc,GAAG,UAAU,GAAG,GAAG,GAAG,QAAQ,CAAC;QAEnD,MAAM,QAAQ,CAAC,mBAAmB,CAAC,cAAc,EAAE,SAAS,CAAC,CAAC;Q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