Skip to content

Commit 45dbf46

Browse files
[TASKSCLOUD-384] - Deployed new 20.6 version.
1 parent 749b61a commit 45dbf46

13 files changed

+704
-70
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@asposecloud/aspose-tasks-cloud",
3-
"version": "19.12.0",
3+
"version": "20.6.1",
44
"description": "Aspose.Tasks Cloud SDK for Node.js",
55
"homepage": "https://products.aspose.cloud/tasks",
66
"readmeFilename": "README.md",

src/api.ts

Lines changed: 305 additions & 32 deletions
Large diffs are not rendered by default.

src/internal/requestHelper.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,24 +94,31 @@ async function invokeApiMethodInternal(requestOptions: request.Options, confgura
9494
sa.type('application/octet-stream');
9595
sa.set("Content-Length", postData.length);
9696
sa.send(postData);
97-
} else if (requestOptions.body) {
97+
} else {
9898
sa.type('application/json');
99-
sa.send(requestOptions.body);
99+
if (requestOptions.body) {
100+
sa.send(requestOptions.body);
101+
}
100102
}
101103
// query params
102104
sa.query(requestOptions.qs);
103105

104106
//headers
105107
sa.set("User-Agent", "tasks nodejs sdk");
106108
sa.set("x-aspose-client", "nodejs sdk");
107-
sa.set("x-aspose-client-version", "19.12");
109+
sa.set("x-aspose-client-version", "20.6");
108110

109111
if (!requestOptions.headers) {
110112
requestOptions.headers = {};
111113
}
112114

113-
if (!notApplyAuthToRequest && requestOptions.headers.Authorization) {
114-
sa.set("Authorization", requestOptions.headers.Authorization);
115+
if (!notApplyAuthToRequest) {
116+
117+
for (let [propName, propValue] of Object.entries(requestOptions.headers)) {
118+
if(propValue != undefined && propValue != null) {
119+
sa.set(propName, propValue);
120+
}
121+
}
115122
}
116123

117124
if (requestOptions.json){

src/model/model.ts

Lines changed: 214 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2201,6 +2201,69 @@ export class ProjectRecalculationResult {
22012201
}
22022202
}
22032203

2204+
/**
2205+
* Allows to specify additional options when project is saved to Project Server or Project Online.
2206+
*/
2207+
export class ProjectServerSaveOptionsDTO {
2208+
2209+
/**
2210+
* Attribute type map
2211+
*/
2212+
public static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
2213+
{
2214+
name: "projectName",
2215+
baseName: "projectName",
2216+
type: "string",
2217+
},
2218+
{
2219+
name: "projectGuid",
2220+
baseName: "projectGuid",
2221+
type: "string",
2222+
},
2223+
{
2224+
name: "timeout",
2225+
baseName: "timeout",
2226+
type: "string",
2227+
},
2228+
{
2229+
name: "pollingInterval",
2230+
baseName: "pollingInterval",
2231+
type: "string",
2232+
} ];
2233+
2234+
/**
2235+
* Returns attribute type map
2236+
*/
2237+
public static getAttributeTypeMap() {
2238+
return ProjectServerSaveOptionsDTO.attributeTypeMap;
2239+
}
2240+
2241+
/**
2242+
* Gets or sets name of a project which is displayed in Project Server \\ Project Online projects list. Should be unique within Project Server \\ Project Online instance. Is the value is omitted, the value of Prj.Name property will be used instead.
2243+
*/
2244+
public projectName: string;
2245+
2246+
/**
2247+
* Gets or sets unique identifier of a project. Should be unique within Project Server \\ Project Online instance.
2248+
*/
2249+
public projectGuid: string;
2250+
2251+
/**
2252+
* Gets or sets timeout used when waiting for processing of save project request by a Project Server's queue processing service. The default value for this property is 1 minute. The processing time may be longer for large projects or in case when Project Server instance is too busy responding to other requests.
2253+
*/
2254+
public timeout: string;
2255+
2256+
/**
2257+
* Gets or sets interval between queue job status requests. The default value is 2 seconds.
2258+
*/
2259+
public pollingInterval: string;
2260+
2261+
public constructor(init?: Partial<ProjectServerSaveOptionsDTO>) {
2262+
2263+
Object.assign(this, init);
2264+
}
2265+
}
2266+
22042267
/**
22052268
* Specifies the state of the project's validation
22062269
*/
@@ -3306,6 +3369,11 @@ export class ResourceAssignment {
33063369
baseName: "resourceUid",
33073370
type: "number",
33083371
},
3372+
{
3373+
name: "guid",
3374+
baseName: "guid",
3375+
type: "string",
3376+
},
33093377
{
33103378
name: "uid",
33113379
baseName: "uid",
@@ -3634,6 +3702,11 @@ export class ResourceAssignment {
36343702
*/
36353703
public resourceUid: number;
36363704

3705+
/**
3706+
* Returns or sets the global unique identifier of an assignment.
3707+
*/
3708+
public guid: string;
3709+
36373710
/**
36383711
* Returns or sets the unique identifier of an assignment.
36393712
*/
@@ -4697,6 +4770,11 @@ export class Task {
46974770
name: "outlineCodes",
46984771
baseName: "outlineCodes",
46994772
type: "Array<OutlineCode>",
4773+
},
4774+
{
4775+
name: "warning",
4776+
baseName: "warning",
4777+
type: "boolean",
47004778
} ];
47014779

47024780
/**
@@ -5239,6 +5317,11 @@ export class Task {
52395317
*/
52405318
public outlineCodes: Array<OutlineCode>;
52415319

5320+
/**
5321+
* Represents the flag which indicates that task has schedule discrepancies.
5322+
*/
5323+
public warning: boolean;
5324+
52425325
public constructor(init?: Partial<Task>) {
52435326

52445327
Object.assign(this, init);
@@ -7764,6 +7847,7 @@ const typeMap = {
77647847
OutlineValue,
77657848
ProjectInfo,
77667849
ProjectRecalculationResult,
7850+
ProjectServerSaveOptionsDTO,
77677851
RecurringInfo,
77687852
Resource,
77697853
ResourceAssignment,
@@ -8315,10 +8399,15 @@ public taskUid: number;
83158399
public resourceUid: number;
83168400

83178401
/**
8318-
* The units for the new assignment. Default value is 1.
8402+
* The units for the new assignment. If not specified, 'cost' value is used.
83198403
*/
83208404
public units: number;
83218405

8406+
/**
8407+
* The cost for a new assignment. If not specified, default value is used.
8408+
*/
8409+
public cost: number;
8410+
83228411
/**
83238412
* The name of the project document to save changes to. If this parameter is omitted then the changes will be saved to the source project document.
83248413
*/
@@ -8986,19 +9075,19 @@ export class PutImportProjectFromProjectOnlineRequest {
89869075
public name: string;
89879076

89889077
/**
8989-
* The url of sharepoint site. For example, \"https://your_company_name.sharepoint.com\"
9078+
* Guid of the project to import.
89909079
*/
8991-
public siteUrl: string;
9080+
public guid: string;
89929081

89939082
/**
8994-
* Guid of the project to import.
9083+
* The url of sharepoint site. For example, \"https://your_company_name.sharepoint.com\"
89959084
*/
8996-
public guid: string;
9085+
public siteUrl: string;
89979086

89989087
/**
8999-
* Authorization token for the SharePoint. For example, in c# it can be retrieved using SharePointOnlineCredentials class from Microsoft.SharePoint.Client.Runtime assembly
9088+
* The user name for the sharepoint site.
90009089
*/
9001-
public xProjectOnlineToken: string;
9090+
public userName: string;
90029091

90039092
/**
90049093
* Format of the resulting file.
@@ -9014,6 +9103,16 @@ public folder: string;
90149103
* The document storage.
90159104
*/
90169105
public storage: string;
9106+
9107+
/**
9108+
* Authorization token for the SharePoint. For example, in c# it can be retrieved using SharePointOnlineCredentials class from Microsoft.SharePoint.Client.Runtime assembly
9109+
*/
9110+
public xProjectOnlineToken: string;
9111+
9112+
/**
9113+
* The password for the SharePoint site.
9114+
*/
9115+
public xSharepointPassword: string;
90179116

90189117
public constructor(init?: Partial<PutImportProjectFromProjectOnlineRequest>) {
90199118
Object.assign(this, init);
@@ -9349,6 +9448,55 @@ public folder: string;
93499448
}
93509449
}
93519450

9451+
/**
9452+
* Request model for createNewProject operation.
9453+
*/
9454+
export class CreateNewProjectRequest {
9455+
/**
9456+
* The name of the file.
9457+
*/
9458+
public name: string;
9459+
9460+
/**
9461+
* The url of sharepoint site. For example, \"https://your_company_name.sharepoint.com\"
9462+
*/
9463+
public siteUrl: string;
9464+
9465+
/**
9466+
* The user name for the sharepoint site.
9467+
*/
9468+
public userName: string;
9469+
9470+
/**
9471+
* Dispensable save options for Project Server\\Project Online.
9472+
*/
9473+
public saveOptions: ProjectServerSaveOptionsDTO;
9474+
9475+
/**
9476+
* The document folder.
9477+
*/
9478+
public folder: string;
9479+
9480+
/**
9481+
* The document storage.
9482+
*/
9483+
public storage: string;
9484+
9485+
/**
9486+
* Authorization token for the SharePoint. For example, in c# it can be retrieved using SharePointOnlineCredentials class from Microsoft.SharePoint.Client.Runtime assembly
9487+
*/
9488+
public xProjectOnlineToken: string;
9489+
9490+
/**
9491+
* The password for the SharePoint site.
9492+
*/
9493+
public xSharepointPassword: string;
9494+
9495+
public constructor(init?: Partial<CreateNewProjectRequest>) {
9496+
Object.assign(this, init);
9497+
}
9498+
}
9499+
93529500
/**
93539501
* Request model for getProjectList operation.
93549502
*/
@@ -9358,16 +9506,75 @@ export class GetProjectListRequest {
93589506
*/
93599507
public siteUrl: string;
93609508

9509+
/**
9510+
* The user name for the sharepoint site.
9511+
*/
9512+
public userName: string;
9513+
93619514
/**
93629515
* Authorization token for the SharePoint. For example, in c# it can be retrieved using SharePointOnlineCredentials class from Microsoft.SharePoint.Client.Runtime assembly
93639516
*/
93649517
public xProjectOnlineToken: string;
9518+
9519+
/**
9520+
* The password for the SharePoint site.
9521+
*/
9522+
public xSharepointPassword: string;
93659523

93669524
public constructor(init?: Partial<GetProjectListRequest>) {
93679525
Object.assign(this, init);
93689526
}
93699527
}
93709528

9529+
/**
9530+
* Request model for updateProject operation.
9531+
*/
9532+
export class UpdateProjectRequest {
9533+
/**
9534+
* The name of the file.
9535+
*/
9536+
public name: string;
9537+
9538+
/**
9539+
* The url of sharepoint site. For example, \"https://your_company_name.sharepoint.com\"
9540+
*/
9541+
public siteUrl: string;
9542+
9543+
/**
9544+
* The user name for the sharepoint site.
9545+
*/
9546+
public userName: string;
9547+
9548+
/**
9549+
* Dispensable save options for Project Server\\Project Online.
9550+
*/
9551+
public saveOptions: ProjectServerSaveOptionsDTO;
9552+
9553+
/**
9554+
* The document folder.
9555+
*/
9556+
public folder: string;
9557+
9558+
/**
9559+
* The document storage.
9560+
*/
9561+
public storage: string;
9562+
9563+
/**
9564+
* Authorization token for the SharePoint. For example, in c# it can be retrieved using SharePointOnlineCredentials class from Microsoft.SharePoint.Client.Runtime assembly
9565+
*/
9566+
public xProjectOnlineToken: string;
9567+
9568+
/**
9569+
* The password for the SharePoint site.
9570+
*/
9571+
public xSharepointPassword: string;
9572+
9573+
public constructor(init?: Partial<UpdateProjectRequest>) {
9574+
Object.assign(this, init);
9575+
}
9576+
}
9577+
93719578
/**
93729579
* Request model for putRecalculateProject operation.
93739580
*/

0 commit comments

Comments
 (0)