@superoffice/webapi 11.7.727 → 11.8.788
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/LICENSE.md +15 -15
- package/README.md +184 -184
- package/__tests__/Appointment63-notz.json +1925 -1925
- package/__tests__/Appointment63-utctz.json +1925 -1925
- package/__tests__/Appointment63.json +1925 -1925
- package/__tests__/AppointmentTzTest.ts +115 -115
- package/__tests__/AxiosNockTest.ts +28 -28
- package/__tests__/ContactDefault.json +699 -699
- package/__tests__/ContactEntity.json +272 -272
- package/__tests__/ContactRestTest.ts +144 -144
- package/__tests__/ContactTest.ts +395 -395
- package/__tests__/ConvertersTest.ts +97 -97
- package/__tests__/DocumentTest.ts +101 -101
- package/__tests__/Person210-notz.json +1932 -1932
- package/__tests__/Person210-utctz.json +1932 -1932
- package/__tests__/Person210.json +1932 -1932
- package/__tests__/PersonImageData.nock +22 -22
- package/__tests__/PersonTest.ts +41 -41
- package/__tests__/PersonTzTest.ts +113 -113
- package/__tests__/RecurrenceInfo.json +55 -55
- package/__tests__/ResponseCallbackTest.ts +23 -23
- package/__tests__/TableRights.json +441 -441
- package/__tests__/WebapiTest.ts +264 -264
- package/__tests__/Webhook.json +16 -16
- package/__tests__/WebhookTest.ts +209 -209
- package/dist/cjs/Carriers.d.ts +367 -4
- package/dist/cjs/Carriers.d.ts.map +1 -1
- package/dist/cjs/Converters.d.ts +9 -0
- package/dist/cjs/Converters.d.ts.map +1 -1
- package/dist/cjs/Converters.js +185 -17
- package/dist/cjs/Converters.js.map +1 -1
- package/dist/cjs/DiagnosticsAgent.d.ts +38 -0
- package/dist/cjs/DiagnosticsAgent.d.ts.map +1 -1
- package/dist/cjs/DiagnosticsAgent.js +91 -0
- package/dist/cjs/DiagnosticsAgent.js.map +1 -1
- package/dist/cjs/Enums.d.ts +18 -0
- package/dist/cjs/Enums.d.ts.map +1 -1
- package/dist/cjs/Enums.js +20 -1
- package/dist/cjs/Enums.js.map +1 -1
- package/dist/cjs/ListAgent.d.ts +71 -6
- package/dist/cjs/ListAgent.d.ts.map +1 -1
- package/dist/cjs/ListAgent.js +157 -0
- package/dist/cjs/ListAgent.js.map +1 -1
- package/dist/cjs/TicketAgent.d.ts +23 -0
- package/dist/cjs/TicketAgent.d.ts.map +1 -1
- package/dist/cjs/TicketAgent.js +65 -0
- package/dist/cjs/TicketAgent.js.map +1 -1
- package/dist/esm/Carriers.d.ts +367 -4
- package/dist/esm/Carriers.d.ts.map +1 -1
- package/dist/esm/Converters.d.ts +9 -0
- package/dist/esm/Converters.d.ts.map +1 -1
- package/dist/esm/Converters.js +159 -0
- package/dist/esm/Converters.js.map +1 -1
- package/dist/esm/DiagnosticsAgent.d.ts +38 -0
- package/dist/esm/DiagnosticsAgent.d.ts.map +1 -1
- package/dist/esm/DiagnosticsAgent.js +91 -0
- package/dist/esm/DiagnosticsAgent.js.map +1 -1
- package/dist/esm/Enums.d.ts +18 -0
- package/dist/esm/Enums.d.ts.map +1 -1
- package/dist/esm/Enums.js +19 -0
- package/dist/esm/Enums.js.map +1 -1
- package/dist/esm/ListAgent.d.ts +71 -6
- package/dist/esm/ListAgent.d.ts.map +1 -1
- package/dist/esm/ListAgent.js +157 -0
- package/dist/esm/ListAgent.js.map +1 -1
- package/dist/esm/TicketAgent.d.ts +23 -0
- package/dist/esm/TicketAgent.d.ts.map +1 -1
- package/dist/esm/TicketAgent.js +65 -0
- package/dist/esm/TicketAgent.js.map +1 -1
- package/examples-js/hello.js +12 -12
- package/examples-ts/hello.ts +8 -8
- package/package.json +93 -93
- package/scripts/postbuild.js +22 -22
- package/scripts/setVersion.js +44 -44
- package/src/AIAgent.ts +1992 -1992
- package/src/AppointmentAgent.ts +6263 -6263
- package/src/AppointmentRestApi.ts +225 -225
- package/src/ArchiveAgent.ts +1950 -1950
- package/src/AssociateAgent.ts +422 -422
- package/src/AxiosCacheHandler.ts +74 -74
- package/src/BLOBAgent.ts +2100 -2100
- package/src/Base64.ts +285 -285
- package/src/BatchAgent.ts +910 -910
- package/src/BulkUpdateAgent.ts +504 -504
- package/src/CRMScriptAgent.ts +1390 -1390
- package/src/Carriers.ts +52750 -52274
- package/src/ChatAgent.ts +1422 -1422
- package/src/ConfigurationAgent.ts +2228 -2228
- package/src/ContactAgent.ts +1756 -1756
- package/src/ContactRestApi.ts +237 -237
- package/src/Converters.ts +23271 -23090
- package/src/CustomerServiceAgent.ts +1799 -1799
- package/src/DashAgent.ts +1674 -1674
- package/src/DatabaseAgent.ts +120 -120
- package/src/DatabaseTableAgent.ts +534 -534
- package/src/Day_js.ts +41 -41
- package/src/DiagnosticsAgent.ts +1384 -1240
- package/src/DocumentAgent.ts +5079 -5079
- package/src/DocumentMigrationAgent.ts +524 -524
- package/src/DocumentRestApi.ts +259 -259
- package/src/EMailAgent.ts +5328 -5328
- package/src/Enums.ts +6936 -6916
- package/src/ErpSyncAgent.ts +2658 -2658
- package/src/FavouriteAgent.ts +720 -720
- package/src/FindAgent.ts +2330 -2330
- package/src/ForeignSystemAgent.ts +1710 -1710
- package/src/FreeTextAgent.ts +372 -372
- package/src/ImportAgent.ts +304 -304
- package/src/LicenseAgent.ts +1230 -1230
- package/src/ListAgent.ts +11451 -11237
- package/src/MDOAgent.ts +748 -748
- package/src/MarketingAgent.ts +890 -890
- package/src/MessagingAgent.ts +384 -384
- package/src/NavigatorAgent.ts +140 -140
- package/src/NumberAllocationAgent.ts +296 -296
- package/src/PersonAgent.ts +3287 -3287
- package/src/PersonRestApi.ts +241 -241
- package/src/PhoneListAgent.ts +458 -458
- package/src/PocketAgent.ts +780 -780
- package/src/PreferenceAgent.ts +1900 -1900
- package/src/PreviewsAgent.ts +116 -116
- package/src/ProjectAgent.ts +2391 -2391
- package/src/ProjectRestApi.ts +239 -239
- package/src/QuoteAgent.ts +5159 -5159
- package/src/RelationAgent.ts +220 -220
- package/src/ReportAgent.ts +154 -154
- package/src/ResourceAgent.ts +358 -358
- package/src/SaintAgent.ts +601 -601
- package/src/SaleAgent.ts +2034 -2034
- package/src/SaleRestApi.ts +233 -233
- package/src/SelectionAgent.ts +3195 -3195
- package/src/SentryAgent.ts +462 -462
- package/src/SoApiConstants.ts +8 -8
- package/src/TargetsAgent.ts +1104 -1104
- package/src/TicketAgent.ts +3708 -3638
- package/src/TimeZoneAgent.ts +528 -528
- package/src/TooltipsAgent.ts +116 -116
- package/src/UserAgent.ts +4856 -4856
- package/src/UserDefinedFieldInfoAgent.ts +1764 -1764
- package/src/ViewStateAgent.ts +858 -858
- package/src/WebApi.ts +872 -872
- package/src/WebApiBase.ts +565 -565
- package/src/WebhookAgent.ts +388 -388
- package/src/WorkflowAgent.ts +1338 -1338
- package/tsconfig.esm.json +8 -8
- package/tsconfig.jest.json +8 -8
- package/tsconfig.json +34 -34
package/src/ProjectAgent.ts
CHANGED
|
@@ -1,2391 +1,2391 @@
|
|
|
1
|
-
// <auto-generated>
|
|
2
|
-
// SuperOffice Code Generator
|
|
3
|
-
// modelling\templates\servicestswebapi\tswebapiagents.tt
|
|
4
|
-
// </auto-generated>
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
/* tslint:disable */
|
|
8
|
-
//----------------------------------------------------------------------------
|
|
9
|
-
// G E N E R A T E D F I L E ! D O N O T E D I T !
|
|
10
|
-
//----------------------------------------------------------------------------
|
|
11
|
-
//
|
|
12
|
-
// File: WebApi/ProjectAgent.ts
|
|
13
|
-
//
|
|
14
|
-
//----------------------------------------------------------------------------
|
|
15
|
-
// Copyright (C) SuperOffice AS
|
|
16
|
-
//----------------------------------------------------------------------------
|
|
17
|
-
|
|
18
|
-
import { AxiosRequestConfig } from 'axios';
|
|
19
|
-
import { Duration } from 'dayjs/plugin/duration';
|
|
20
|
-
import * as enums from './Enums';
|
|
21
|
-
import * as base from './WebApiBase';
|
|
22
|
-
import * as carriers from './Carriers';
|
|
23
|
-
import * as converters from './Converters';
|
|
24
|
-
import { FromBase64ToString, ToBase64 } from './Base64';
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Collection of all services that works with Project data.
|
|
28
|
-
*/
|
|
29
|
-
export interface IProjectAgent {
|
|
30
|
-
createDefaultProjectEntityAsync(): Promise< carriers.ProjectEntity >;
|
|
31
|
-
saveProjectEntityAsync(entity: carriers.ProjectEntity) : Promise< carriers.ProjectEntity >;
|
|
32
|
-
deleteProjectEntityAsync(ProjectEntityId: number) : Promise<void>;
|
|
33
|
-
createDefaultProjectEventEntityAsync(): Promise< carriers.ProjectEventEntity >;
|
|
34
|
-
saveProjectEventEntityAsync(entity: carriers.ProjectEventEntity) : Promise< carriers.ProjectEventEntity >;
|
|
35
|
-
deleteProjectEventEntityAsync(ProjectEventEntityId: number) : Promise<void>;
|
|
36
|
-
createDefaultProjectMemberAsync(): Promise< carriers.ProjectMember >;
|
|
37
|
-
saveProjectMemberAsync(entity: carriers.ProjectMember) : Promise< carriers.ProjectMember >;
|
|
38
|
-
deleteProjectMemberAsync(ProjectMemberId: number) : Promise<void>;
|
|
39
|
-
getProjectAsync(projectId: number) : Promise< carriers.Project >;
|
|
40
|
-
getProjectEntityAsync(projectEntityId: number) : Promise< carriers.ProjectEntity >;
|
|
41
|
-
addProjectMembersAsync(request: carriers.Project_AddProjectMembersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
42
|
-
addProjectMembersAsync(projectEntityId: number, projectMembers: carriers.ProjectMember[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
43
|
-
deleteProjectMembersAsync(request: carriers.Project_DeleteProjectMembersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
44
|
-
deleteProjectMembersAsync(projectEntityId: number, memberIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
45
|
-
getProjectImageAsync(request: carriers.Project_GetProjectImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
|
|
46
|
-
getProjectImageAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
|
|
47
|
-
setProjectImageAsync(request: carriers.Project_SetProjectImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
48
|
-
setProjectImageAsync(projectId: number, image: ArrayBuffer|string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
49
|
-
deleteProjectMemberByIdsAsync(request: carriers.Project_DeleteProjectMemberByIdsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
50
|
-
deleteProjectMemberByIdsAsync(projectMemberIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
51
|
-
getDuplicatesAsync(request: carriers.Project_GetDuplicatesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DuplicateEntry[] >;
|
|
52
|
-
getDuplicatesAsync(name: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DuplicateEntry[] >;
|
|
53
|
-
createNewEntryAsync(request: carriers.Project_CreateNewEntryRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
54
|
-
createNewEntryAsync(duplicate: carriers.DuplicateEntry, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
55
|
-
setDuplicateRulesStatusAsync(request: carriers.Project_SetDuplicateRulesStatusRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
56
|
-
setDuplicateRulesStatusAsync(rules: carriers.DuplicateRule[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
57
|
-
getDuplicateRulesAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DuplicateRule[] >;
|
|
58
|
-
mergeAsync(request: carriers.Project_MergeRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
59
|
-
mergeAsync(sourceProjectId: number, destinationProjectId: number, replaceEmptyFieldsOnDestination: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
60
|
-
isNumberValidAsync(request: carriers.Project_IsNumberValidRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
61
|
-
isNumberValidAsync(contactId: number, number: string, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
62
|
-
hasGuideAsync(request: carriers.Project_HasGuideRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
63
|
-
hasGuideAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
64
|
-
getNextMilestoneAsync(request: carriers.Project_GetNextMilestoneRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Appointment >;
|
|
65
|
-
getNextMilestoneAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Appointment >;
|
|
66
|
-
offerAutoNextStatusOnApppointmentCompletedAsync(request: carriers.Project_OfferAutoNextStatusOnApppointmentCompletedRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
67
|
-
offerAutoNextStatusOnApppointmentCompletedAsync(appointmentId: number, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
68
|
-
getNextProjectStatusAsync(request: carriers.Project_GetNextProjectStatusRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
69
|
-
getNextProjectStatusAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
70
|
-
hasGuideActivitiesAsync(request: carriers.Project_HasGuideActivitiesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
71
|
-
hasGuideActivitiesAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
72
|
-
validateProjectEntityAsync(request: carriers.Project_ValidateProjectEntityRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary >;
|
|
73
|
-
validateProjectEntityAsync(projectEntity: carriers.ProjectEntity, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary >;
|
|
74
|
-
setCompletedAsync(request: carriers.Project_SetCompletedRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
75
|
-
setCompletedAsync(projectId: number, isCompleted: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
76
|
-
getProjectEventAsync(projectEventId: number) : Promise< carriers.ProjectEvent >;
|
|
77
|
-
getProjectEventOnPersonAsync(request: carriers.Project_GetProjectEventOnPersonRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEvent >;
|
|
78
|
-
getProjectEventOnPersonAsync(projectId: number, personId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEvent >;
|
|
79
|
-
getProjectEventEntityAsync(projectEventEntityId: number) : Promise< carriers.ProjectEventEntity >;
|
|
80
|
-
getProjectEventEntityFromProjectIdAsync(request: carriers.Project_GetProjectEventEntityFromProjectIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEventEntity >;
|
|
81
|
-
getProjectEventEntityFromProjectIdAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEventEntity >;
|
|
82
|
-
deleteProjectEventEntityFromProjectIdAsync(request: carriers.Project_DeleteProjectEventEntityFromProjectIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
83
|
-
deleteProjectEventEntityFromProjectIdAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
84
|
-
getProjectEventListAsync(projectEventIds: number[]) : Promise< carriers.ProjectEvent[] >;
|
|
85
|
-
getMyProjectEventsAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEvent[] >;
|
|
86
|
-
getProjectEventsOnPersonAsync(request: carriers.Project_GetProjectEventsOnPersonRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEvent[] >;
|
|
87
|
-
getProjectEventsOnPersonAsync(personId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEvent[] >;
|
|
88
|
-
getProjectListAsync(projectIds: number[]) : Promise< carriers.Project[] >;
|
|
89
|
-
getMyProjectsAsync(request: carriers.Project_GetMyProjectsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
90
|
-
getMyProjectsAsync(includeMemberProjects: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
91
|
-
getMyMemberProjectsAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
92
|
-
getProjectsFromPersonAsync(request: carriers.Project_GetProjectsFromPersonRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
93
|
-
getProjectsFromPersonAsync(personId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
94
|
-
getProjectsFromContactAsync(request: carriers.Project_GetProjectsFromContactRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
95
|
-
getProjectsFromContactAsync(contactId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
96
|
-
getPublishedProjectAsync(request: carriers.Project_GetPublishedProjectRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project >;
|
|
97
|
-
getPublishedProjectAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project >;
|
|
98
|
-
getPublishedProjectsAsync(request: carriers.Project_GetPublishedProjectsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
99
|
-
getPublishedProjectsAsync(projectIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
100
|
-
getMyPublishedProjectsAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
101
|
-
getPublishedProjectsOnPersonIdAsync(request: carriers.Project_GetPublishedProjectsOnPersonIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
102
|
-
getPublishedProjectsOnPersonIdAsync(personId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
103
|
-
getProjectMemberAsync(projectMemberId: number) : Promise< carriers.ProjectMember >;
|
|
104
|
-
updateProjectMembersAsync(request: carriers.Project_UpdateProjectMembersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
105
|
-
updateProjectMembersAsync(projectId: number, projectMembers: carriers.ProjectMember[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
106
|
-
getProjectMembersAsync(request: carriers.Project_GetProjectMembersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember[] >;
|
|
107
|
-
getProjectMembersAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember[] >;
|
|
108
|
-
updateProjectMemberAsync(request: carriers.Project_UpdateProjectMemberRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember >;
|
|
109
|
-
updateProjectMemberAsync(projectMember: carriers.ProjectMember, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember >;
|
|
110
|
-
getProjectMembersByIdAsync(request: carriers.Project_GetProjectMembersByIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember[] >;
|
|
111
|
-
getProjectMembersByIdAsync(projectMemberIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember[] >;
|
|
112
|
-
saveProjectMembersFunctionAndCommentAsync(request: carriers.Project_SaveProjectMembersFunctionAndCommentRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
113
|
-
saveProjectMembersFunctionAndCommentAsync(projectMemberIds: number[], roleId: number, comment: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
114
|
-
} // interface IProjectAgent
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* Collection of all services that works with Project data.
|
|
121
|
-
*/
|
|
122
|
-
export class ProjectAgent extends base.WebApiBase implements IProjectAgent {
|
|
123
|
-
constructor(baseUrl?: string, languageCode?:string, cultureCode?: string);
|
|
124
|
-
constructor(baseUrl?: string, resourceParsing?: base.ResourceParsing);
|
|
125
|
-
constructor(baseUrl: string, resourceManager:any);
|
|
126
|
-
constructor(baseUrl: string, config:AxiosRequestConfig, resourceManager:any);
|
|
127
|
-
constructor(baseUrl: string, config:AxiosRequestConfig, resourceParsing?: base.ResourceParsing);
|
|
128
|
-
constructor(baseUrl: string, config:AxiosRequestConfig, languageCode?:string, cultureCode?: string);
|
|
129
|
-
constructor(options: base.WebApiOptions);
|
|
130
|
-
|
|
131
|
-
constructor(baseUrlOrOptions: string|base.WebApiOptions|undefined,
|
|
132
|
-
langOrconfigOrRM?: string|base.ResourceParsing|AxiosRequestConfig|any,
|
|
133
|
-
langOrResourceOrRM?:string|base.ResourceParsing|any,
|
|
134
|
-
cultureCode?: string,
|
|
135
|
-
) {
|
|
136
|
-
const options = base.WebApiBase.FigureOutOptions(baseUrlOrOptions, langOrconfigOrRM, langOrResourceOrRM, cultureCode);
|
|
137
|
-
options.basePath = "v1/Agents/Project/";
|
|
138
|
-
super(options);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* Set default values into a new ProjectEntity.
|
|
145
|
-
* NetServer calculates default values on the entity, which is required when creating/storing a new instance
|
|
146
|
-
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
147
|
-
* @returns A blank entity.
|
|
148
|
-
*/
|
|
149
|
-
public async createDefaultProjectEntityAsync(options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEntity > {
|
|
150
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
151
|
-
base.WebApiBase.SetPending(options);
|
|
152
|
-
return new Promise< carriers.ProjectEntity >(async (resolve, reject) => {
|
|
153
|
-
try {
|
|
154
|
-
const response = await this._axios.post("CreateDefaultProjectEntity", null, config);
|
|
155
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
156
|
-
const res : carriers.ProjectEntity = converters.Create_ProjectEntity_From( response.data );
|
|
157
|
-
resolve(res);
|
|
158
|
-
}
|
|
159
|
-
catch( err ) {
|
|
160
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
161
|
-
reject(err);
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* Replace the existing ProjectEntity or creates a new ProjectEntity if the id parameter is empty
|
|
167
|
-
* @param entity - The ProjectEntity to be saved.
|
|
168
|
-
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
169
|
-
* @returns New or updated ProjectEntity
|
|
170
|
-
*/
|
|
171
|
-
public async saveProjectEntityAsync(entity: carriers.ProjectEntity, options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEntity > {
|
|
172
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
173
|
-
base.WebApiBase.SetPending(options);
|
|
174
|
-
return new Promise< carriers.ProjectEntity >(async (resolve, reject) => {
|
|
175
|
-
try {
|
|
176
|
-
const response = await this._axios.post("SaveProjectEntity", entity, config);
|
|
177
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
178
|
-
const res : carriers.ProjectEntity = converters.Create_ProjectEntity_From( response.data );
|
|
179
|
-
resolve(res);
|
|
180
|
-
}
|
|
181
|
-
catch( err ) {
|
|
182
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
183
|
-
reject(err);
|
|
184
|
-
}
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
/**
|
|
189
|
-
* Deletes the ProjectEntity
|
|
190
|
-
* @param ProjectEntityId - The id of the ProjectEntity to be deleted.
|
|
191
|
-
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
192
|
-
*/
|
|
193
|
-
public async deleteProjectEntityAsync(ProjectEntityId: number, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
194
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
195
|
-
base.WebApiBase.SetPending(options);
|
|
196
|
-
return new Promise< void >(async (resolve, reject) => {
|
|
197
|
-
try {
|
|
198
|
-
const response = await this._axios.post("DeleteProjectEntity?ProjectEntityId=" + ProjectEntityId, null, config );
|
|
199
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
200
|
-
const res = response.data;
|
|
201
|
-
resolve(res);
|
|
202
|
-
}
|
|
203
|
-
catch( err ) {
|
|
204
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
205
|
-
reject(err);
|
|
206
|
-
}
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* Set default values into a new ProjectEventEntity.
|
|
212
|
-
* NetServer calculates default values on the entity, which is required when creating/storing a new instance
|
|
213
|
-
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
214
|
-
* @returns A blank entity.
|
|
215
|
-
*/
|
|
216
|
-
public async createDefaultProjectEventEntityAsync(options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEventEntity > {
|
|
217
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
218
|
-
base.WebApiBase.SetPending(options);
|
|
219
|
-
return new Promise< carriers.ProjectEventEntity >(async (resolve, reject) => {
|
|
220
|
-
try {
|
|
221
|
-
const response = await this._axios.post("CreateDefaultProjectEventEntity", null, config);
|
|
222
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
223
|
-
const res : carriers.ProjectEventEntity = converters.Create_ProjectEventEntity_From( response.data );
|
|
224
|
-
resolve(res);
|
|
225
|
-
}
|
|
226
|
-
catch( err ) {
|
|
227
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
228
|
-
reject(err);
|
|
229
|
-
}
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
/**
|
|
233
|
-
* Replace the existing ProjectEventEntity or creates a new ProjectEventEntity if the id parameter is empty
|
|
234
|
-
* @param entity - The ProjectEventEntity to be saved.
|
|
235
|
-
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
236
|
-
* @returns New or updated ProjectEventEntity
|
|
237
|
-
*/
|
|
238
|
-
public async saveProjectEventEntityAsync(entity: carriers.ProjectEventEntity, options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEventEntity > {
|
|
239
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
240
|
-
base.WebApiBase.SetPending(options);
|
|
241
|
-
return new Promise< carriers.ProjectEventEntity >(async (resolve, reject) => {
|
|
242
|
-
try {
|
|
243
|
-
const response = await this._axios.post("SaveProjectEventEntity", entity, config);
|
|
244
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
245
|
-
const res : carriers.ProjectEventEntity = converters.Create_ProjectEventEntity_From( response.data );
|
|
246
|
-
resolve(res);
|
|
247
|
-
}
|
|
248
|
-
catch( err ) {
|
|
249
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
250
|
-
reject(err);
|
|
251
|
-
}
|
|
252
|
-
});
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
/**
|
|
256
|
-
* Deletes the ProjectEventEntity
|
|
257
|
-
* @param ProjectEventEntityId - The id of the ProjectEventEntity to be deleted.
|
|
258
|
-
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
259
|
-
*/
|
|
260
|
-
public async deleteProjectEventEntityAsync(ProjectEventEntityId: number, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
261
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
262
|
-
base.WebApiBase.SetPending(options);
|
|
263
|
-
return new Promise< void >(async (resolve, reject) => {
|
|
264
|
-
try {
|
|
265
|
-
const response = await this._axios.post("DeleteProjectEventEntity?ProjectEventEntityId=" + ProjectEventEntityId, null, config );
|
|
266
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
267
|
-
const res = response.data;
|
|
268
|
-
resolve(res);
|
|
269
|
-
}
|
|
270
|
-
catch( err ) {
|
|
271
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
272
|
-
reject(err);
|
|
273
|
-
}
|
|
274
|
-
});
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
/**
|
|
278
|
-
* Set default values into a new ProjectMember.
|
|
279
|
-
* NetServer calculates default values on the entity, which is required when creating/storing a new instance
|
|
280
|
-
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
281
|
-
* @returns A blank entity.
|
|
282
|
-
*/
|
|
283
|
-
public async createDefaultProjectMemberAsync(options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember > {
|
|
284
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
285
|
-
base.WebApiBase.SetPending(options);
|
|
286
|
-
return new Promise< carriers.ProjectMember >(async (resolve, reject) => {
|
|
287
|
-
try {
|
|
288
|
-
const response = await this._axios.post("CreateDefaultProjectMember", null, config);
|
|
289
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
290
|
-
const res : carriers.ProjectMember = converters.Create_ProjectMember_From( response.data );
|
|
291
|
-
resolve(res);
|
|
292
|
-
}
|
|
293
|
-
catch( err ) {
|
|
294
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
295
|
-
reject(err);
|
|
296
|
-
}
|
|
297
|
-
});
|
|
298
|
-
}
|
|
299
|
-
/**
|
|
300
|
-
* Replace the existing ProjectMember or creates a new ProjectMember if the id parameter is empty
|
|
301
|
-
* @param entity - The ProjectMember to be saved.
|
|
302
|
-
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
303
|
-
* @returns New or updated ProjectMember
|
|
304
|
-
*/
|
|
305
|
-
public async saveProjectMemberAsync(entity: carriers.ProjectMember, options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember > {
|
|
306
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
307
|
-
base.WebApiBase.SetPending(options);
|
|
308
|
-
return new Promise< carriers.ProjectMember >(async (resolve, reject) => {
|
|
309
|
-
try {
|
|
310
|
-
const response = await this._axios.post("SaveProjectMember", entity, config);
|
|
311
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
312
|
-
const res : carriers.ProjectMember = converters.Create_ProjectMember_From( response.data );
|
|
313
|
-
resolve(res);
|
|
314
|
-
}
|
|
315
|
-
catch( err ) {
|
|
316
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
317
|
-
reject(err);
|
|
318
|
-
}
|
|
319
|
-
});
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
/**
|
|
323
|
-
* Deletes the ProjectMember
|
|
324
|
-
* @param ProjectMemberId - The id of the ProjectMember to be deleted.
|
|
325
|
-
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
326
|
-
*/
|
|
327
|
-
public async deleteProjectMemberAsync(ProjectMemberId: number, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
328
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
329
|
-
base.WebApiBase.SetPending(options);
|
|
330
|
-
return new Promise< void >(async (resolve, reject) => {
|
|
331
|
-
try {
|
|
332
|
-
const response = await this._axios.post("DeleteProjectMember?ProjectMemberId=" + ProjectMemberId, null, config );
|
|
333
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
334
|
-
const res = response.data;
|
|
335
|
-
resolve(res);
|
|
336
|
-
}
|
|
337
|
-
catch( err ) {
|
|
338
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
339
|
-
reject(err);
|
|
340
|
-
}
|
|
341
|
-
});
|
|
342
|
-
}
|
|
343
|
-
/**
|
|
344
|
-
* Gets a Project object.
|
|
345
|
-
* @param projectId - The primary key.
|
|
346
|
-
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
347
|
-
* @returns A single Project
|
|
348
|
-
*/
|
|
349
|
-
public async getProjectAsync(projectId: number, options?:base.WebApiRequestOptions) : Promise< carriers.Project > {
|
|
350
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
351
|
-
base.WebApiBase.SetPending(options);
|
|
352
|
-
return new Promise< carriers.Project >(async (resolve, reject) => {
|
|
353
|
-
try {
|
|
354
|
-
const response = await this._axios.post("GetProject?projectId=" + projectId, null, config);
|
|
355
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
356
|
-
const res = converters.Create_Project_From( response.data );
|
|
357
|
-
resolve(res);
|
|
358
|
-
}
|
|
359
|
-
catch( err ) {
|
|
360
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
361
|
-
reject(err);
|
|
362
|
-
}
|
|
363
|
-
});
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
/**
|
|
367
|
-
* Gets a ProjectEntity object.
|
|
368
|
-
* @param projectEntityId - The primary key.
|
|
369
|
-
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
370
|
-
* @returns A single ProjectEntity
|
|
371
|
-
*/
|
|
372
|
-
public async getProjectEntityAsync(projectEntityId: number, options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEntity > {
|
|
373
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
374
|
-
base.WebApiBase.SetPending(options);
|
|
375
|
-
return new Promise< carriers.ProjectEntity >(async (resolve, reject) => {
|
|
376
|
-
try {
|
|
377
|
-
const response = await this._axios.post("GetProjectEntity?projectEntityId=" + projectEntityId, null, config);
|
|
378
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
379
|
-
const res = converters.Create_ProjectEntity_From( response.data );
|
|
380
|
-
resolve(res);
|
|
381
|
-
}
|
|
382
|
-
catch( err ) {
|
|
383
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
384
|
-
reject(err);
|
|
385
|
-
}
|
|
386
|
-
});
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
private async _addProjectMembersAsync(request: carriers.Project_AddProjectMembersRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
391
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
392
|
-
base.WebApiBase.SetPending(options);
|
|
393
|
-
return new Promise< void >(async (resolve, reject) => {
|
|
394
|
-
try {
|
|
395
|
-
config.baseURL = this._options.baseUrl;
|
|
396
|
-
const response = await this._axios.post("AddProjectMembers", request , config);
|
|
397
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
398
|
-
const res = response.data;
|
|
399
|
-
resolve(res);
|
|
400
|
-
}
|
|
401
|
-
catch( err ) {
|
|
402
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
403
|
-
reject(err);
|
|
404
|
-
}
|
|
405
|
-
});
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
/**
|
|
411
|
-
* Add multiple project members to a project
|
|
412
|
-
* @param request - ProjectEntityId, ProjectMembers
|
|
413
|
-
* @returns
|
|
414
|
-
*/
|
|
415
|
-
public async addProjectMembersAsync(request: carriers.Project_AddProjectMembersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
416
|
-
|
|
417
|
-
/**
|
|
418
|
-
* Add multiple project members to a project
|
|
419
|
-
* @param projectEntityId - Project to add members to
|
|
420
|
-
* @param projectMembers - Project members to add
|
|
421
|
-
* @returns
|
|
422
|
-
*/
|
|
423
|
-
public async addProjectMembersAsync(projectEntityId: number, projectMembers: carriers.ProjectMember[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
424
|
-
|
|
425
|
-
public async addProjectMembersAsync(projectEntityId:number|carriers.Project_AddProjectMembersRequest, projectMembers?:carriers.ProjectMember[]|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
426
|
-
let _request : carriers.Project_AddProjectMembersRequest = null;
|
|
427
|
-
let _options : base.WebApiRequestOptions = null;
|
|
428
|
-
const first : any = projectEntityId;
|
|
429
|
-
if( typeof( first ) === "object" && first && ( typeof(first.projectEntityId)!='undefined' || typeof(first.projectMembers)!='undefined' ) )
|
|
430
|
-
{
|
|
431
|
-
_request = projectEntityId as carriers.Project_AddProjectMembersRequest;
|
|
432
|
-
_options = projectMembers as base.WebApiRequestOptions;
|
|
433
|
-
}
|
|
434
|
-
else
|
|
435
|
-
{
|
|
436
|
-
_request = {
|
|
437
|
-
projectEntityId: projectEntityId as number,
|
|
438
|
-
projectMembers: projectMembers as carriers.ProjectMember[],
|
|
439
|
-
};
|
|
440
|
-
_options = webapi_options;
|
|
441
|
-
}
|
|
442
|
-
return this._addProjectMembersAsync( _request, _options );
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
private async _deleteProjectMembersAsync(request: carriers.Project_DeleteProjectMembersRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
447
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
448
|
-
base.WebApiBase.SetPending(options);
|
|
449
|
-
return new Promise< void >(async (resolve, reject) => {
|
|
450
|
-
try {
|
|
451
|
-
config.baseURL = this._options.baseUrl;
|
|
452
|
-
const response = await this._axios.post("DeleteProjectMembers", request , config);
|
|
453
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
454
|
-
const res = response.data;
|
|
455
|
-
resolve(res);
|
|
456
|
-
}
|
|
457
|
-
catch( err ) {
|
|
458
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
459
|
-
reject(err);
|
|
460
|
-
}
|
|
461
|
-
});
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
/**
|
|
467
|
-
* Delete the given project members from a project
|
|
468
|
-
* @param request - ProjectEntityId, MemberIds
|
|
469
|
-
* @returns
|
|
470
|
-
*/
|
|
471
|
-
public async deleteProjectMembersAsync(request: carriers.Project_DeleteProjectMembersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
472
|
-
|
|
473
|
-
/**
|
|
474
|
-
* Delete the given project members from a project
|
|
475
|
-
* @param projectEntityId - Project to remove members from
|
|
476
|
-
* @param memberIds - Project member ids
|
|
477
|
-
* @returns
|
|
478
|
-
*/
|
|
479
|
-
public async deleteProjectMembersAsync(projectEntityId: number, memberIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
480
|
-
|
|
481
|
-
public async deleteProjectMembersAsync(projectEntityId:number|carriers.Project_DeleteProjectMembersRequest, memberIds?:number[]|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
482
|
-
let _request : carriers.Project_DeleteProjectMembersRequest = null;
|
|
483
|
-
let _options : base.WebApiRequestOptions = null;
|
|
484
|
-
const first : any = projectEntityId;
|
|
485
|
-
if( typeof( first ) === "object" && first && ( typeof(first.projectEntityId)!='undefined' || typeof(first.memberIds)!='undefined' ) )
|
|
486
|
-
{
|
|
487
|
-
_request = projectEntityId as carriers.Project_DeleteProjectMembersRequest;
|
|
488
|
-
_options = memberIds as base.WebApiRequestOptions;
|
|
489
|
-
}
|
|
490
|
-
else
|
|
491
|
-
{
|
|
492
|
-
_request = {
|
|
493
|
-
projectEntityId: projectEntityId as number,
|
|
494
|
-
memberIds: memberIds as number[],
|
|
495
|
-
};
|
|
496
|
-
_options = webapi_options;
|
|
497
|
-
}
|
|
498
|
-
return this._deleteProjectMembersAsync( _request, _options );
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
private async _getProjectImageAsync(request: carriers.Project_GetProjectImageRequest, options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string > {
|
|
503
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
|
|
504
|
-
base.WebApiBase.SetPending(options);
|
|
505
|
-
return new Promise< ArrayBuffer|string >(async (resolve, reject) => {
|
|
506
|
-
try {
|
|
507
|
-
if( ! options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer ) {
|
|
508
|
-
config.responseType = "arraybuffer";
|
|
509
|
-
config.headers = config.headers || {};
|
|
510
|
-
config.headers["Accept"] = "application/octet-stream";
|
|
511
|
-
}
|
|
512
|
-
config.baseURL = this._options.baseUrl;
|
|
513
|
-
const response = await this._axios.post("GetProjectImage", request , config);
|
|
514
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
515
|
-
let res : ArrayBuffer | string = null;
|
|
516
|
-
if( options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer )
|
|
517
|
-
{
|
|
518
|
-
res = response.data as string;
|
|
519
|
-
if( options.returnBlobAs == base.ReturnBlobType.AsString )
|
|
520
|
-
{
|
|
521
|
-
res = FromBase64ToString(res);
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
else
|
|
525
|
-
{
|
|
526
|
-
res = response.data as ArrayBuffer;
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
resolve(res);
|
|
530
|
-
}
|
|
531
|
-
catch( err ) {
|
|
532
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
533
|
-
reject(err);
|
|
534
|
-
}
|
|
535
|
-
});
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
/**
|
|
541
|
-
* Returns the project image that is displayed in the CRM application.
|
|
542
|
-
* @param request - ProjectId
|
|
543
|
-
* @returns The image as a System.Drawing.Image. (If the the image is returned over webservices, the stream is returned as a Base64 encoded string.)
|
|
544
|
-
*/
|
|
545
|
-
public async getProjectImageAsync(request: carriers.Project_GetProjectImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
|
|
546
|
-
|
|
547
|
-
/**
|
|
548
|
-
* Returns the project image that is displayed in the CRM application.
|
|
549
|
-
* @param projectId - The project id of the project the image belongs to.
|
|
550
|
-
* @returns The image as a System.Drawing.Image. (If the the image is returned over webservices, the stream is returned as a Base64 encoded string.)
|
|
551
|
-
*/
|
|
552
|
-
public async getProjectImageAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
|
|
553
|
-
|
|
554
|
-
public async getProjectImageAsync(projectId:number|carriers.Project_GetProjectImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string > {
|
|
555
|
-
let _request : carriers.Project_GetProjectImageRequest = null;
|
|
556
|
-
let _options : base.WebApiRequestOptions = null;
|
|
557
|
-
const first : any = projectId;
|
|
558
|
-
if( typeof( first ) === "object" && first && ( typeof(first.projectId)!='undefined' ) )
|
|
559
|
-
{
|
|
560
|
-
_request = projectId as carriers.Project_GetProjectImageRequest;
|
|
561
|
-
_options = webapi_options as base.WebApiRequestOptions;
|
|
562
|
-
}
|
|
563
|
-
else
|
|
564
|
-
{
|
|
565
|
-
_request = {
|
|
566
|
-
projectId: projectId as number,
|
|
567
|
-
};
|
|
568
|
-
_options = webapi_options;
|
|
569
|
-
}
|
|
570
|
-
return this._getProjectImageAsync( _request, _options );
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
private async _setProjectImageAsync(request: carriers.Project_SetProjectImageRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
575
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
576
|
-
base.WebApiBase.SetPending(options);
|
|
577
|
-
return new Promise< void >(async (resolve, reject) => {
|
|
578
|
-
try {
|
|
579
|
-
config.baseURL = this._options.baseUrl;
|
|
580
|
-
const response = await this._axios.post("SetProjectImage", request , config);
|
|
581
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
582
|
-
const res = response.data;
|
|
583
|
-
resolve(res);
|
|
584
|
-
}
|
|
585
|
-
catch( err ) {
|
|
586
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
587
|
-
reject(err);
|
|
588
|
-
}
|
|
589
|
-
});
|
|
590
|
-
}
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
/**
|
|
595
|
-
* Stores the project image that is displayed in the CRM application.
|
|
596
|
-
* @param request - ProjectId, Image
|
|
597
|
-
* @returns
|
|
598
|
-
*/
|
|
599
|
-
public async setProjectImageAsync(request: carriers.Project_SetProjectImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
600
|
-
|
|
601
|
-
/**
|
|
602
|
-
* Stores the project image that is displayed in the CRM application.
|
|
603
|
-
* @param projectId - The project id of the project the image belongs to.
|
|
604
|
-
* @param image - The image that is stored on the project (System.Drawing.Image)
|
|
605
|
-
* @returns
|
|
606
|
-
*/
|
|
607
|
-
public async setProjectImageAsync(projectId: number, image: ArrayBuffer|string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
608
|
-
|
|
609
|
-
public async setProjectImageAsync(projectId:number|carriers.Project_SetProjectImageRequest, image?:ArrayBuffer|string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
610
|
-
let _request : carriers.Project_SetProjectImageRequest = null;
|
|
611
|
-
let _options : base.WebApiRequestOptions = null;
|
|
612
|
-
const first : any = projectId;
|
|
613
|
-
if( typeof( first ) === "object" && first && ( typeof(first.projectId)!='undefined' || typeof(first.image)!='undefined' ) )
|
|
614
|
-
{
|
|
615
|
-
_request = projectId as carriers.Project_SetProjectImageRequest;
|
|
616
|
-
_options = image as base.WebApiRequestOptions;
|
|
617
|
-
}
|
|
618
|
-
else
|
|
619
|
-
{
|
|
620
|
-
_request = {
|
|
621
|
-
projectId: projectId as number,
|
|
622
|
-
image: image as ArrayBuffer|string,
|
|
623
|
-
};
|
|
624
|
-
_options = webapi_options;
|
|
625
|
-
}
|
|
626
|
-
_request.image = ToBase64(_request.image);
|
|
627
|
-
return this._setProjectImageAsync( _request, _options );
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
private async _deleteProjectMemberByIdsAsync(request: carriers.Project_DeleteProjectMemberByIdsRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
632
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
633
|
-
base.WebApiBase.SetPending(options);
|
|
634
|
-
return new Promise< void >(async (resolve, reject) => {
|
|
635
|
-
try {
|
|
636
|
-
config.baseURL = this._options.baseUrl;
|
|
637
|
-
const response = await this._axios.post("DeleteProjectMemberByIds", request , config);
|
|
638
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
639
|
-
const res = response.data;
|
|
640
|
-
resolve(res);
|
|
641
|
-
}
|
|
642
|
-
catch( err ) {
|
|
643
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
644
|
-
reject(err);
|
|
645
|
-
}
|
|
646
|
-
});
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
/**
|
|
652
|
-
* Deletes projectmembers rows.
|
|
653
|
-
* @param request - ProjectMemberIds
|
|
654
|
-
* @returns
|
|
655
|
-
*/
|
|
656
|
-
public async deleteProjectMemberByIdsAsync(request: carriers.Project_DeleteProjectMemberByIdsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
657
|
-
|
|
658
|
-
/**
|
|
659
|
-
* Deletes projectmembers rows.
|
|
660
|
-
* @param projectMemberIds - An Array of projectmember ids.
|
|
661
|
-
* @returns
|
|
662
|
-
*/
|
|
663
|
-
public async deleteProjectMemberByIdsAsync(projectMemberIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
664
|
-
|
|
665
|
-
public async deleteProjectMemberByIdsAsync(projectMemberIds:number[]|carriers.Project_DeleteProjectMemberByIdsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
666
|
-
let _request : carriers.Project_DeleteProjectMemberByIdsRequest = null;
|
|
667
|
-
let _options : base.WebApiRequestOptions = null;
|
|
668
|
-
const first : any = projectMemberIds;
|
|
669
|
-
if( typeof( first ) === "object" && first && ( typeof(first.projectMemberIds)!='undefined' ) )
|
|
670
|
-
{
|
|
671
|
-
_request = projectMemberIds as carriers.Project_DeleteProjectMemberByIdsRequest;
|
|
672
|
-
_options = webapi_options as base.WebApiRequestOptions;
|
|
673
|
-
}
|
|
674
|
-
else
|
|
675
|
-
{
|
|
676
|
-
_request = {
|
|
677
|
-
projectMemberIds: projectMemberIds as number[],
|
|
678
|
-
};
|
|
679
|
-
_options = webapi_options;
|
|
680
|
-
}
|
|
681
|
-
return this._deleteProjectMemberByIdsAsync( _request, _options );
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
private async _getDuplicatesAsync(request: carriers.Project_GetDuplicatesRequest, options?:base.WebApiRequestOptions) : Promise< carriers.DuplicateEntry[] > {
|
|
686
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
687
|
-
base.WebApiBase.SetPending(options);
|
|
688
|
-
return new Promise< carriers.DuplicateEntry[] >(async (resolve, reject) => {
|
|
689
|
-
try {
|
|
690
|
-
config.baseURL = this._options.baseUrl;
|
|
691
|
-
const response = await this._axios.post("GetDuplicates", request , config);
|
|
692
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
693
|
-
const res : carriers.DuplicateEntry[] = converters.Create_DuplicateEntryArray_From( response.data );
|
|
694
|
-
resolve(res);
|
|
695
|
-
}
|
|
696
|
-
catch( err ) {
|
|
697
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
698
|
-
reject(err);
|
|
699
|
-
}
|
|
700
|
-
});
|
|
701
|
-
}
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
/**
|
|
706
|
-
* Get duplicates(exact or similar in the database) based on the name
|
|
707
|
-
* @param request - Name
|
|
708
|
-
* @returns Any records matching the specified name
|
|
709
|
-
*/
|
|
710
|
-
public async getDuplicatesAsync(request: carriers.Project_GetDuplicatesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DuplicateEntry[] >;
|
|
711
|
-
|
|
712
|
-
/**
|
|
713
|
-
* Get duplicates(exact or similar in the database) based on the name
|
|
714
|
-
* @param name - Name used for lookup
|
|
715
|
-
* @returns Any records matching the specified name
|
|
716
|
-
*/
|
|
717
|
-
public async getDuplicatesAsync(name: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DuplicateEntry[] >;
|
|
718
|
-
|
|
719
|
-
public async getDuplicatesAsync(name:string|carriers.Project_GetDuplicatesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DuplicateEntry[] > {
|
|
720
|
-
let _request : carriers.Project_GetDuplicatesRequest = null;
|
|
721
|
-
let _options : base.WebApiRequestOptions = null;
|
|
722
|
-
const first : any = name;
|
|
723
|
-
if( typeof( first ) === "object" && first && ( typeof(first.name)!='undefined' ) )
|
|
724
|
-
{
|
|
725
|
-
_request = name as carriers.Project_GetDuplicatesRequest;
|
|
726
|
-
_options = webapi_options as base.WebApiRequestOptions;
|
|
727
|
-
}
|
|
728
|
-
else
|
|
729
|
-
{
|
|
730
|
-
_request = {
|
|
731
|
-
name: name as string,
|
|
732
|
-
};
|
|
733
|
-
_options = webapi_options;
|
|
734
|
-
}
|
|
735
|
-
return this._getDuplicatesAsync( _request, _options );
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
private async _createNewEntryAsync(request: carriers.Project_CreateNewEntryRequest, options?:base.WebApiRequestOptions) : Promise< number > {
|
|
740
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
741
|
-
base.WebApiBase.SetPending(options);
|
|
742
|
-
return new Promise< number >(async (resolve, reject) => {
|
|
743
|
-
try {
|
|
744
|
-
config.baseURL = this._options.baseUrl;
|
|
745
|
-
const response = await this._axios.post("CreateNewEntry", request , config);
|
|
746
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
747
|
-
const res : number = response.data as number;
|
|
748
|
-
resolve(res);
|
|
749
|
-
}
|
|
750
|
-
catch( err ) {
|
|
751
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
752
|
-
reject(err);
|
|
753
|
-
}
|
|
754
|
-
});
|
|
755
|
-
}
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
/**
|
|
760
|
-
* Creates a new project based on external duplicate
|
|
761
|
-
* @param request - Duplicate
|
|
762
|
-
* @returns The database identity of the newly created entry
|
|
763
|
-
*/
|
|
764
|
-
public async createNewEntryAsync(request: carriers.Project_CreateNewEntryRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
765
|
-
|
|
766
|
-
/**
|
|
767
|
-
* Creates a new project based on external duplicate
|
|
768
|
-
* @param duplicate - The duplicate to create a new entry based upon
|
|
769
|
-
* @returns The database identity of the newly created entry
|
|
770
|
-
*/
|
|
771
|
-
public async createNewEntryAsync(duplicate: carriers.DuplicateEntry, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
772
|
-
|
|
773
|
-
public async createNewEntryAsync(duplicate:carriers.DuplicateEntry|carriers.Project_CreateNewEntryRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number > {
|
|
774
|
-
let _request : carriers.Project_CreateNewEntryRequest = null;
|
|
775
|
-
let _options : base.WebApiRequestOptions = null;
|
|
776
|
-
const first : any = duplicate;
|
|
777
|
-
if( typeof( first ) === "object" && first && ( typeof(first.duplicate)!='undefined' ) )
|
|
778
|
-
{
|
|
779
|
-
_request = duplicate as carriers.Project_CreateNewEntryRequest;
|
|
780
|
-
_options = webapi_options as base.WebApiRequestOptions;
|
|
781
|
-
}
|
|
782
|
-
else
|
|
783
|
-
{
|
|
784
|
-
_request = {
|
|
785
|
-
duplicate: duplicate as carriers.DuplicateEntry,
|
|
786
|
-
};
|
|
787
|
-
_options = webapi_options;
|
|
788
|
-
}
|
|
789
|
-
return this._createNewEntryAsync( _request, _options );
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
private async _setDuplicateRulesStatusAsync(request: carriers.Project_SetDuplicateRulesStatusRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
794
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
795
|
-
base.WebApiBase.SetPending(options);
|
|
796
|
-
return new Promise< void >(async (resolve, reject) => {
|
|
797
|
-
try {
|
|
798
|
-
config.baseURL = this._options.baseUrl;
|
|
799
|
-
const response = await this._axios.post("SetDuplicateRulesStatus", request , config);
|
|
800
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
801
|
-
const res = response.data;
|
|
802
|
-
resolve(res);
|
|
803
|
-
}
|
|
804
|
-
catch( err ) {
|
|
805
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
806
|
-
reject(err);
|
|
807
|
-
}
|
|
808
|
-
});
|
|
809
|
-
}
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
/**
|
|
814
|
-
* Set which duplicate rules should be active or not
|
|
815
|
-
* @param request - Rules
|
|
816
|
-
* @returns
|
|
817
|
-
*/
|
|
818
|
-
public async setDuplicateRulesStatusAsync(request: carriers.Project_SetDuplicateRulesStatusRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
819
|
-
|
|
820
|
-
/**
|
|
821
|
-
* Set which duplicate rules should be active or not
|
|
822
|
-
* @param rules - Duplicate rules to update active status for
|
|
823
|
-
* @returns
|
|
824
|
-
*/
|
|
825
|
-
public async setDuplicateRulesStatusAsync(rules: carriers.DuplicateRule[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
826
|
-
|
|
827
|
-
public async setDuplicateRulesStatusAsync(rules:carriers.DuplicateRule[]|carriers.Project_SetDuplicateRulesStatusRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
828
|
-
let _request : carriers.Project_SetDuplicateRulesStatusRequest = null;
|
|
829
|
-
let _options : base.WebApiRequestOptions = null;
|
|
830
|
-
const first : any = rules;
|
|
831
|
-
if( typeof( first ) === "object" && first && ( typeof(first.rules)!='undefined' ) )
|
|
832
|
-
{
|
|
833
|
-
_request = rules as carriers.Project_SetDuplicateRulesStatusRequest;
|
|
834
|
-
_options = webapi_options as base.WebApiRequestOptions;
|
|
835
|
-
}
|
|
836
|
-
else
|
|
837
|
-
{
|
|
838
|
-
_request = {
|
|
839
|
-
rules: rules as carriers.DuplicateRule[],
|
|
840
|
-
};
|
|
841
|
-
_options = webapi_options;
|
|
842
|
-
}
|
|
843
|
-
return this._setDuplicateRulesStatusAsync( _request, _options );
|
|
844
|
-
}
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
private async _getDuplicateRulesAsync( options?:base.WebApiRequestOptions) : Promise< carriers.DuplicateRule[] > {
|
|
848
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
849
|
-
base.WebApiBase.SetPending(options);
|
|
850
|
-
return new Promise< carriers.DuplicateRule[] >(async (resolve, reject) => {
|
|
851
|
-
try {
|
|
852
|
-
config.baseURL = this._options.baseUrl;
|
|
853
|
-
const response = await this._axios.post("GetDuplicateRules", undefined , config);
|
|
854
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
855
|
-
const res : carriers.DuplicateRule[] = converters.Create_DuplicateRuleArray_From( response.data );
|
|
856
|
-
resolve(res);
|
|
857
|
-
}
|
|
858
|
-
catch( err ) {
|
|
859
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
860
|
-
reject(err);
|
|
861
|
-
}
|
|
862
|
-
});
|
|
863
|
-
}
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
/**
|
|
867
|
-
* Retrieve all available duplicate rules for project
|
|
868
|
-
* @returns All available duplicate rules
|
|
869
|
-
*/
|
|
870
|
-
public async getDuplicateRulesAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DuplicateRule[] >
|
|
871
|
-
{
|
|
872
|
-
return this._getDuplicateRulesAsync(webapi_options);
|
|
873
|
-
}
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
private async _mergeAsync(request: carriers.Project_MergeRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
877
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
878
|
-
base.WebApiBase.SetPending(options);
|
|
879
|
-
return new Promise< void >(async (resolve, reject) => {
|
|
880
|
-
try {
|
|
881
|
-
config.baseURL = this._options.baseUrl;
|
|
882
|
-
const response = await this._axios.post("Merge", request , config);
|
|
883
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
884
|
-
const res = response.data;
|
|
885
|
-
resolve(res);
|
|
886
|
-
}
|
|
887
|
-
catch( err ) {
|
|
888
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
889
|
-
reject(err);
|
|
890
|
-
}
|
|
891
|
-
});
|
|
892
|
-
}
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
/**
|
|
897
|
-
* Merge two projects into one, removing the source project in the process
|
|
898
|
-
* @param request - SourceProjectId, DestinationProjectId, ReplaceEmptyFieldsOnDestination
|
|
899
|
-
* @returns
|
|
900
|
-
*/
|
|
901
|
-
public async mergeAsync(request: carriers.Project_MergeRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
902
|
-
|
|
903
|
-
/**
|
|
904
|
-
* Merge two projects into one, removing the source project in the process
|
|
905
|
-
* @param sourceProjectId - Id of source project for merge. This project is removed after the merge is completed.
|
|
906
|
-
* @param destinationProjectId - Id of destination project to merge to. This project is updated with info from the source.
|
|
907
|
-
* @param replaceEmptyFieldsOnDestination - Fill in empty fields on destination from source?
|
|
908
|
-
* @returns
|
|
909
|
-
*/
|
|
910
|
-
public async mergeAsync(sourceProjectId: number, destinationProjectId: number, replaceEmptyFieldsOnDestination: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
911
|
-
|
|
912
|
-
public async mergeAsync(sourceProjectId:number|carriers.Project_MergeRequest, destinationProjectId?:number|base.WebApiRequestOptions, replaceEmptyFieldsOnDestination?:boolean, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
913
|
-
let _request : carriers.Project_MergeRequest = null;
|
|
914
|
-
let _options : base.WebApiRequestOptions = null;
|
|
915
|
-
const first : any = sourceProjectId;
|
|
916
|
-
if( typeof( first ) === "object" && first && ( typeof(first.sourceProjectId)!='undefined' || typeof(first.destinationProjectId)!='undefined' || typeof(first.replaceEmptyFieldsOnDestination)!='undefined' ) )
|
|
917
|
-
{
|
|
918
|
-
_request = sourceProjectId as carriers.Project_MergeRequest;
|
|
919
|
-
_options = destinationProjectId as base.WebApiRequestOptions;
|
|
920
|
-
}
|
|
921
|
-
else
|
|
922
|
-
{
|
|
923
|
-
_request = {
|
|
924
|
-
sourceProjectId: sourceProjectId as number,
|
|
925
|
-
destinationProjectId: destinationProjectId as number,
|
|
926
|
-
replaceEmptyFieldsOnDestination: replaceEmptyFieldsOnDestination as boolean,
|
|
927
|
-
};
|
|
928
|
-
_options = webapi_options;
|
|
929
|
-
}
|
|
930
|
-
return this._mergeAsync( _request, _options );
|
|
931
|
-
}
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
private async _isNumberValidAsync(request: carriers.Project_IsNumberValidRequest, options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
935
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
936
|
-
base.WebApiBase.SetPending(options);
|
|
937
|
-
return new Promise< boolean >(async (resolve, reject) => {
|
|
938
|
-
try {
|
|
939
|
-
config.baseURL = this._options.baseUrl;
|
|
940
|
-
const response = await this._axios.post("IsNumberValid", request , config);
|
|
941
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
942
|
-
const res : boolean = response.data as boolean;
|
|
943
|
-
resolve(res);
|
|
944
|
-
}
|
|
945
|
-
catch( err ) {
|
|
946
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
947
|
-
reject(err);
|
|
948
|
-
}
|
|
949
|
-
});
|
|
950
|
-
}
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
/**
|
|
955
|
-
* Checks if the number is unique or required. The setting is configured from admin under system options.
|
|
956
|
-
* @param request - ContactId, Number
|
|
957
|
-
* @returns True if the number is valid
|
|
958
|
-
*/
|
|
959
|
-
public async isNumberValidAsync(request: carriers.Project_IsNumberValidRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
960
|
-
|
|
961
|
-
/**
|
|
962
|
-
* Checks if the number is unique or required. The setting is configured from admin under system options.
|
|
963
|
-
* @param contactId - The Project id
|
|
964
|
-
* @param number - The number to check for uniqueness and validity
|
|
965
|
-
* @returns True if the number is valid
|
|
966
|
-
*/
|
|
967
|
-
public async isNumberValidAsync(contactId: number, number: string, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
968
|
-
|
|
969
|
-
public async isNumberValidAsync(contactId:number|carriers.Project_IsNumberValidRequest, number?:string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
970
|
-
let _request : carriers.Project_IsNumberValidRequest = null;
|
|
971
|
-
let _options : base.WebApiRequestOptions = null;
|
|
972
|
-
const first : any = contactId;
|
|
973
|
-
if( typeof( first ) === "object" && first && ( typeof(first.contactId)!='undefined' || typeof(first.number)!='undefined' ) )
|
|
974
|
-
{
|
|
975
|
-
_request = contactId as carriers.Project_IsNumberValidRequest;
|
|
976
|
-
_options = number as base.WebApiRequestOptions;
|
|
977
|
-
}
|
|
978
|
-
else
|
|
979
|
-
{
|
|
980
|
-
_request = {
|
|
981
|
-
contactId: contactId as number,
|
|
982
|
-
number: number as string,
|
|
983
|
-
};
|
|
984
|
-
_options = webapi_options;
|
|
985
|
-
}
|
|
986
|
-
return this._isNumberValidAsync( _request, _options );
|
|
987
|
-
}
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
private async _hasGuideAsync(request: carriers.Project_HasGuideRequest, options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
991
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
992
|
-
base.WebApiBase.SetPending(options);
|
|
993
|
-
return new Promise< boolean >(async (resolve, reject) => {
|
|
994
|
-
try {
|
|
995
|
-
config.baseURL = this._options.baseUrl;
|
|
996
|
-
const response = await this._axios.post("HasGuide", request , config);
|
|
997
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
998
|
-
const res : boolean = response.data as boolean;
|
|
999
|
-
resolve(res);
|
|
1000
|
-
}
|
|
1001
|
-
catch( err ) {
|
|
1002
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1003
|
-
reject(err);
|
|
1004
|
-
}
|
|
1005
|
-
});
|
|
1006
|
-
}
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
/**
|
|
1011
|
-
* Does this project have a guide associated with its project type?
|
|
1012
|
-
* @param request - ProjectId
|
|
1013
|
-
* @returns True if the project has a guide
|
|
1014
|
-
*/
|
|
1015
|
-
public async hasGuideAsync(request: carriers.Project_HasGuideRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
1016
|
-
|
|
1017
|
-
/**
|
|
1018
|
-
* Does this project have a guide associated with its project type?
|
|
1019
|
-
* @param projectId - Project id
|
|
1020
|
-
* @returns True if the project has a guide
|
|
1021
|
-
*/
|
|
1022
|
-
public async hasGuideAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
1023
|
-
|
|
1024
|
-
public async hasGuideAsync(projectId:number|carriers.Project_HasGuideRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
1025
|
-
let _request : carriers.Project_HasGuideRequest = null;
|
|
1026
|
-
let _options : base.WebApiRequestOptions = null;
|
|
1027
|
-
const first : any = projectId;
|
|
1028
|
-
if( typeof( first ) === "object" && first && ( typeof(first.projectId)!='undefined' ) )
|
|
1029
|
-
{
|
|
1030
|
-
_request = projectId as carriers.Project_HasGuideRequest;
|
|
1031
|
-
_options = webapi_options as base.WebApiRequestOptions;
|
|
1032
|
-
}
|
|
1033
|
-
else
|
|
1034
|
-
{
|
|
1035
|
-
_request = {
|
|
1036
|
-
projectId: projectId as number,
|
|
1037
|
-
};
|
|
1038
|
-
_options = webapi_options;
|
|
1039
|
-
}
|
|
1040
|
-
return this._hasGuideAsync( _request, _options );
|
|
1041
|
-
}
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
private async _getNextMilestoneAsync(request: carriers.Project_GetNextMilestoneRequest, options?:base.WebApiRequestOptions) : Promise< carriers.Appointment > {
|
|
1045
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1046
|
-
base.WebApiBase.SetPending(options);
|
|
1047
|
-
return new Promise< carriers.Appointment >(async (resolve, reject) => {
|
|
1048
|
-
try {
|
|
1049
|
-
config.baseURL = this._options.baseUrl;
|
|
1050
|
-
const response = await this._axios.post("GetNextMilestone", request , config);
|
|
1051
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
1052
|
-
const res : carriers.Appointment = converters.Create_Appointment_From( response.data );
|
|
1053
|
-
resolve(res);
|
|
1054
|
-
}
|
|
1055
|
-
catch( err ) {
|
|
1056
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1057
|
-
reject(err);
|
|
1058
|
-
}
|
|
1059
|
-
});
|
|
1060
|
-
}
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
/**
|
|
1065
|
-
* Next upcoming milestone appointment
|
|
1066
|
-
* @param request - ProjectId
|
|
1067
|
-
* @returns Upcoming milestone appointment
|
|
1068
|
-
*/
|
|
1069
|
-
public async getNextMilestoneAsync(request: carriers.Project_GetNextMilestoneRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Appointment >;
|
|
1070
|
-
|
|
1071
|
-
/**
|
|
1072
|
-
* Next upcoming milestone appointment
|
|
1073
|
-
* @param projectId - Project id - primary key
|
|
1074
|
-
* @returns Upcoming milestone appointment
|
|
1075
|
-
*/
|
|
1076
|
-
public async getNextMilestoneAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Appointment >;
|
|
1077
|
-
|
|
1078
|
-
public async getNextMilestoneAsync(projectId:number|carriers.Project_GetNextMilestoneRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Appointment > {
|
|
1079
|
-
let _request : carriers.Project_GetNextMilestoneRequest = null;
|
|
1080
|
-
let _options : base.WebApiRequestOptions = null;
|
|
1081
|
-
const first : any = projectId;
|
|
1082
|
-
if( typeof( first ) === "object" && first && ( typeof(first.projectId)!='undefined' ) )
|
|
1083
|
-
{
|
|
1084
|
-
_request = projectId as carriers.Project_GetNextMilestoneRequest;
|
|
1085
|
-
_options = webapi_options as base.WebApiRequestOptions;
|
|
1086
|
-
}
|
|
1087
|
-
else
|
|
1088
|
-
{
|
|
1089
|
-
_request = {
|
|
1090
|
-
projectId: projectId as number,
|
|
1091
|
-
};
|
|
1092
|
-
_options = webapi_options;
|
|
1093
|
-
}
|
|
1094
|
-
return this._getNextMilestoneAsync( _request, _options );
|
|
1095
|
-
}
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
private async _offerAutoNextStatusOnApppointmentCompletedAsync(request: carriers.Project_OfferAutoNextStatusOnApppointmentCompletedRequest, options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
1099
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1100
|
-
base.WebApiBase.SetPending(options);
|
|
1101
|
-
return new Promise< boolean >(async (resolve, reject) => {
|
|
1102
|
-
try {
|
|
1103
|
-
config.baseURL = this._options.baseUrl;
|
|
1104
|
-
const response = await this._axios.post("OfferAutoNextStatusOnApppointmentCompleted", request , config);
|
|
1105
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
1106
|
-
const res : boolean = response.data as boolean;
|
|
1107
|
-
resolve(res);
|
|
1108
|
-
}
|
|
1109
|
-
catch( err ) {
|
|
1110
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1111
|
-
reject(err);
|
|
1112
|
-
}
|
|
1113
|
-
});
|
|
1114
|
-
}
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
/**
|
|
1119
|
-
*
|
|
1120
|
-
* @param request - AppointmentId
|
|
1121
|
-
* @returns
|
|
1122
|
-
*/
|
|
1123
|
-
public async offerAutoNextStatusOnApppointmentCompletedAsync(request: carriers.Project_OfferAutoNextStatusOnApppointmentCompletedRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
1124
|
-
|
|
1125
|
-
/**
|
|
1126
|
-
*
|
|
1127
|
-
* @param appointmentId -
|
|
1128
|
-
* @returns
|
|
1129
|
-
*/
|
|
1130
|
-
public async offerAutoNextStatusOnApppointmentCompletedAsync(appointmentId: number, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
1131
|
-
|
|
1132
|
-
public async offerAutoNextStatusOnApppointmentCompletedAsync(appointmentId:number|carriers.Project_OfferAutoNextStatusOnApppointmentCompletedRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
1133
|
-
let _request : carriers.Project_OfferAutoNextStatusOnApppointmentCompletedRequest = null;
|
|
1134
|
-
let _options : base.WebApiRequestOptions = null;
|
|
1135
|
-
const first : any = appointmentId;
|
|
1136
|
-
if( typeof( first ) === "object" && first && ( typeof(first.appointmentId)!='undefined' ) )
|
|
1137
|
-
{
|
|
1138
|
-
_request = appointmentId as carriers.Project_OfferAutoNextStatusOnApppointmentCompletedRequest;
|
|
1139
|
-
_options = webapi_options as base.WebApiRequestOptions;
|
|
1140
|
-
}
|
|
1141
|
-
else
|
|
1142
|
-
{
|
|
1143
|
-
_request = {
|
|
1144
|
-
appointmentId: appointmentId as number,
|
|
1145
|
-
};
|
|
1146
|
-
_options = webapi_options;
|
|
1147
|
-
}
|
|
1148
|
-
return this._offerAutoNextStatusOnApppointmentCompletedAsync( _request, _options );
|
|
1149
|
-
}
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
private async _getNextProjectStatusAsync(request: carriers.Project_GetNextProjectStatusRequest, options?:base.WebApiRequestOptions) : Promise< number > {
|
|
1153
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1154
|
-
base.WebApiBase.SetPending(options);
|
|
1155
|
-
return new Promise< number >(async (resolve, reject) => {
|
|
1156
|
-
try {
|
|
1157
|
-
config.baseURL = this._options.baseUrl;
|
|
1158
|
-
const response = await this._axios.post("GetNextProjectStatus", request , config);
|
|
1159
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
1160
|
-
const res : number = response.data as number;
|
|
1161
|
-
resolve(res);
|
|
1162
|
-
}
|
|
1163
|
-
catch( err ) {
|
|
1164
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1165
|
-
reject(err);
|
|
1166
|
-
}
|
|
1167
|
-
});
|
|
1168
|
-
}
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
/**
|
|
1173
|
-
*
|
|
1174
|
-
* @param request - ProjectId
|
|
1175
|
-
* @returns
|
|
1176
|
-
*/
|
|
1177
|
-
public async getNextProjectStatusAsync(request: carriers.Project_GetNextProjectStatusRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
1178
|
-
|
|
1179
|
-
/**
|
|
1180
|
-
*
|
|
1181
|
-
* @param projectId -
|
|
1182
|
-
* @returns
|
|
1183
|
-
*/
|
|
1184
|
-
public async getNextProjectStatusAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
1185
|
-
|
|
1186
|
-
public async getNextProjectStatusAsync(projectId:number|carriers.Project_GetNextProjectStatusRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number > {
|
|
1187
|
-
let _request : carriers.Project_GetNextProjectStatusRequest = null;
|
|
1188
|
-
let _options : base.WebApiRequestOptions = null;
|
|
1189
|
-
const first : any = projectId;
|
|
1190
|
-
if( typeof( first ) === "object" && first && ( typeof(first.projectId)!='undefined' ) )
|
|
1191
|
-
{
|
|
1192
|
-
_request = projectId as carriers.Project_GetNextProjectStatusRequest;
|
|
1193
|
-
_options = webapi_options as base.WebApiRequestOptions;
|
|
1194
|
-
}
|
|
1195
|
-
else
|
|
1196
|
-
{
|
|
1197
|
-
_request = {
|
|
1198
|
-
projectId: projectId as number,
|
|
1199
|
-
};
|
|
1200
|
-
_options = webapi_options;
|
|
1201
|
-
}
|
|
1202
|
-
return this._getNextProjectStatusAsync( _request, _options );
|
|
1203
|
-
}
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
private async _hasGuideActivitiesAsync(request: carriers.Project_HasGuideActivitiesRequest, options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
1207
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1208
|
-
base.WebApiBase.SetPending(options);
|
|
1209
|
-
return new Promise< boolean >(async (resolve, reject) => {
|
|
1210
|
-
try {
|
|
1211
|
-
config.baseURL = this._options.baseUrl;
|
|
1212
|
-
const response = await this._axios.post("HasGuideActivities", request , config);
|
|
1213
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
1214
|
-
const res : boolean = response.data as boolean;
|
|
1215
|
-
resolve(res);
|
|
1216
|
-
}
|
|
1217
|
-
catch( err ) {
|
|
1218
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1219
|
-
reject(err);
|
|
1220
|
-
}
|
|
1221
|
-
});
|
|
1222
|
-
}
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
/**
|
|
1227
|
-
*
|
|
1228
|
-
* @param request - ProjectId
|
|
1229
|
-
* @returns
|
|
1230
|
-
*/
|
|
1231
|
-
public async hasGuideActivitiesAsync(request: carriers.Project_HasGuideActivitiesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
1232
|
-
|
|
1233
|
-
/**
|
|
1234
|
-
*
|
|
1235
|
-
* @param projectId -
|
|
1236
|
-
* @returns
|
|
1237
|
-
*/
|
|
1238
|
-
public async hasGuideActivitiesAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
1239
|
-
|
|
1240
|
-
public async hasGuideActivitiesAsync(projectId:number|carriers.Project_HasGuideActivitiesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
1241
|
-
let _request : carriers.Project_HasGuideActivitiesRequest = null;
|
|
1242
|
-
let _options : base.WebApiRequestOptions = null;
|
|
1243
|
-
const first : any = projectId;
|
|
1244
|
-
if( typeof( first ) === "object" && first && ( typeof(first.projectId)!='undefined' ) )
|
|
1245
|
-
{
|
|
1246
|
-
_request = projectId as carriers.Project_HasGuideActivitiesRequest;
|
|
1247
|
-
_options = webapi_options as base.WebApiRequestOptions;
|
|
1248
|
-
}
|
|
1249
|
-
else
|
|
1250
|
-
{
|
|
1251
|
-
_request = {
|
|
1252
|
-
projectId: projectId as number,
|
|
1253
|
-
};
|
|
1254
|
-
_options = webapi_options;
|
|
1255
|
-
}
|
|
1256
|
-
return this._hasGuideActivitiesAsync( _request, _options );
|
|
1257
|
-
}
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
private async _validateProjectEntityAsync(request: carriers.Project_ValidateProjectEntityRequest, options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary > {
|
|
1261
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1262
|
-
base.WebApiBase.SetPending(options);
|
|
1263
|
-
return new Promise< carriers.StringDictionary >(async (resolve, reject) => {
|
|
1264
|
-
try {
|
|
1265
|
-
config.baseURL = this._options.baseUrl;
|
|
1266
|
-
const response = await this._axios.post("ValidateProjectEntity", request , config);
|
|
1267
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
1268
|
-
const res : carriers.StringDictionary = converters.Create_StringDictionary_From( response.data );
|
|
1269
|
-
resolve(res);
|
|
1270
|
-
}
|
|
1271
|
-
catch( err ) {
|
|
1272
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1273
|
-
reject(err);
|
|
1274
|
-
}
|
|
1275
|
-
});
|
|
1276
|
-
}
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
/**
|
|
1281
|
-
* Check that entity is ready for saving, return error messages by field.
|
|
1282
|
-
* @param request - ProjectEntity
|
|
1283
|
-
* @returns Error messages tagged by field.
|
|
1284
|
-
*/
|
|
1285
|
-
public async validateProjectEntityAsync(request: carriers.Project_ValidateProjectEntityRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary >;
|
|
1286
|
-
|
|
1287
|
-
/**
|
|
1288
|
-
* Check that entity is ready for saving, return error messages by field.
|
|
1289
|
-
* @param projectEntity - Entity to be checked for errors.
|
|
1290
|
-
* @returns Error messages tagged by field.
|
|
1291
|
-
*/
|
|
1292
|
-
public async validateProjectEntityAsync(projectEntity: carriers.ProjectEntity, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary >;
|
|
1293
|
-
|
|
1294
|
-
public async validateProjectEntityAsync(projectEntity:carriers.ProjectEntity|carriers.Project_ValidateProjectEntityRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary > {
|
|
1295
|
-
let _request : carriers.Project_ValidateProjectEntityRequest = null;
|
|
1296
|
-
let _options : base.WebApiRequestOptions = null;
|
|
1297
|
-
const first : any = projectEntity;
|
|
1298
|
-
if( typeof( first ) === "object" && first && ( typeof(first.projectEntity)!='undefined' ) )
|
|
1299
|
-
{
|
|
1300
|
-
_request = projectEntity as carriers.Project_ValidateProjectEntityRequest;
|
|
1301
|
-
_options = webapi_options as base.WebApiRequestOptions;
|
|
1302
|
-
}
|
|
1303
|
-
else
|
|
1304
|
-
{
|
|
1305
|
-
_request = {
|
|
1306
|
-
projectEntity: projectEntity as carriers.ProjectEntity,
|
|
1307
|
-
};
|
|
1308
|
-
_options = webapi_options;
|
|
1309
|
-
}
|
|
1310
|
-
return this._validateProjectEntityAsync( _request, _options );
|
|
1311
|
-
}
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
private async _setCompletedAsync(request: carriers.Project_SetCompletedRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1315
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1316
|
-
base.WebApiBase.SetPending(options);
|
|
1317
|
-
return new Promise< void >(async (resolve, reject) => {
|
|
1318
|
-
try {
|
|
1319
|
-
config.baseURL = this._options.baseUrl;
|
|
1320
|
-
const response = await this._axios.post("SetCompleted", request , config);
|
|
1321
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
1322
|
-
const res = response.data;
|
|
1323
|
-
resolve(res);
|
|
1324
|
-
}
|
|
1325
|
-
catch( err ) {
|
|
1326
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1327
|
-
reject(err);
|
|
1328
|
-
}
|
|
1329
|
-
});
|
|
1330
|
-
}
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
/**
|
|
1335
|
-
* Set the completed flag on the project
|
|
1336
|
-
* @param request - ProjectId, IsCompleted
|
|
1337
|
-
* @returns This method has no return value
|
|
1338
|
-
*/
|
|
1339
|
-
public async setCompletedAsync(request: carriers.Project_SetCompletedRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1340
|
-
|
|
1341
|
-
/**
|
|
1342
|
-
* Set the completed flag on the project
|
|
1343
|
-
* @param projectId -
|
|
1344
|
-
* @param isCompleted - True if the project is completed, false if it is not
|
|
1345
|
-
* @returns This method has no return value
|
|
1346
|
-
*/
|
|
1347
|
-
public async setCompletedAsync(projectId: number, isCompleted: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1348
|
-
|
|
1349
|
-
public async setCompletedAsync(projectId:number|carriers.Project_SetCompletedRequest, isCompleted?:boolean|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1350
|
-
let _request : carriers.Project_SetCompletedRequest = null;
|
|
1351
|
-
let _options : base.WebApiRequestOptions = null;
|
|
1352
|
-
const first : any = projectId;
|
|
1353
|
-
if( typeof( first ) === "object" && first && ( typeof(first.projectId)!='undefined' || typeof(first.isCompleted)!='undefined' ) )
|
|
1354
|
-
{
|
|
1355
|
-
_request = projectId as carriers.Project_SetCompletedRequest;
|
|
1356
|
-
_options = isCompleted as base.WebApiRequestOptions;
|
|
1357
|
-
}
|
|
1358
|
-
else
|
|
1359
|
-
{
|
|
1360
|
-
_request = {
|
|
1361
|
-
projectId: projectId as number,
|
|
1362
|
-
isCompleted: isCompleted as boolean,
|
|
1363
|
-
};
|
|
1364
|
-
_options = webapi_options;
|
|
1365
|
-
}
|
|
1366
|
-
return this._setCompletedAsync( _request, _options );
|
|
1367
|
-
}
|
|
1368
|
-
|
|
1369
|
-
/**
|
|
1370
|
-
* Gets a ProjectEvent object.
|
|
1371
|
-
* @param projectEventId - The primary key.
|
|
1372
|
-
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
1373
|
-
* @returns A single ProjectEvent
|
|
1374
|
-
*/
|
|
1375
|
-
public async getProjectEventAsync(projectEventId: number, options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEvent > {
|
|
1376
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1377
|
-
base.WebApiBase.SetPending(options);
|
|
1378
|
-
return new Promise< carriers.ProjectEvent >(async (resolve, reject) => {
|
|
1379
|
-
try {
|
|
1380
|
-
const response = await this._axios.post("GetProjectEvent?projectEventId=" + projectEventId, null, config);
|
|
1381
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
1382
|
-
const res = converters.Create_ProjectEvent_From( response.data );
|
|
1383
|
-
resolve(res);
|
|
1384
|
-
}
|
|
1385
|
-
catch( err ) {
|
|
1386
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1387
|
-
reject(err);
|
|
1388
|
-
}
|
|
1389
|
-
});
|
|
1390
|
-
}
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
private async _getProjectEventOnPersonAsync(request: carriers.Project_GetProjectEventOnPersonRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEvent > {
|
|
1394
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1395
|
-
base.WebApiBase.SetPending(options);
|
|
1396
|
-
return new Promise< carriers.ProjectEvent >(async (resolve, reject) => {
|
|
1397
|
-
try {
|
|
1398
|
-
config.baseURL = this._options.baseUrl;
|
|
1399
|
-
const response = await this._axios.post("GetProjectEventOnPerson", request , config);
|
|
1400
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
1401
|
-
const res : carriers.ProjectEvent = converters.Create_ProjectEvent_From( response.data );
|
|
1402
|
-
resolve(res);
|
|
1403
|
-
}
|
|
1404
|
-
catch( err ) {
|
|
1405
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1406
|
-
reject(err);
|
|
1407
|
-
}
|
|
1408
|
-
});
|
|
1409
|
-
}
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
/**
|
|
1414
|
-
* Gets a ProjectEvent object from a project and a person.
|
|
1415
|
-
* @param request - ProjectId, PersonId
|
|
1416
|
-
* @returns
|
|
1417
|
-
*/
|
|
1418
|
-
public async getProjectEventOnPersonAsync(request: carriers.Project_GetProjectEventOnPersonRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEvent >;
|
|
1419
|
-
|
|
1420
|
-
/**
|
|
1421
|
-
* Gets a ProjectEvent object from a project and a person.
|
|
1422
|
-
* @param projectId - The project Id
|
|
1423
|
-
* @param personId - Id of the person the project events belong to.
|
|
1424
|
-
* @returns
|
|
1425
|
-
*/
|
|
1426
|
-
public async getProjectEventOnPersonAsync(projectId: number, personId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEvent >;
|
|
1427
|
-
|
|
1428
|
-
public async getProjectEventOnPersonAsync(projectId:number|carriers.Project_GetProjectEventOnPersonRequest, personId?:number|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEvent > {
|
|
1429
|
-
let _request : carriers.Project_GetProjectEventOnPersonRequest = null;
|
|
1430
|
-
let _options : base.WebApiRequestOptions = null;
|
|
1431
|
-
const first : any = projectId;
|
|
1432
|
-
if( typeof( first ) === "object" && first && ( typeof(first.projectId)!='undefined' || typeof(first.personId)!='undefined' ) )
|
|
1433
|
-
{
|
|
1434
|
-
_request = projectId as carriers.Project_GetProjectEventOnPersonRequest;
|
|
1435
|
-
_options = personId as base.WebApiRequestOptions;
|
|
1436
|
-
}
|
|
1437
|
-
else
|
|
1438
|
-
{
|
|
1439
|
-
_request = {
|
|
1440
|
-
projectId: projectId as number,
|
|
1441
|
-
personId: personId as number,
|
|
1442
|
-
};
|
|
1443
|
-
_options = webapi_options;
|
|
1444
|
-
}
|
|
1445
|
-
return this._getProjectEventOnPersonAsync( _request, _options );
|
|
1446
|
-
}
|
|
1447
|
-
|
|
1448
|
-
/**
|
|
1449
|
-
* Gets a ProjectEventEntity object.
|
|
1450
|
-
* @param projectEventEntityId - The primary key.
|
|
1451
|
-
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
1452
|
-
* @returns A single ProjectEventEntity
|
|
1453
|
-
*/
|
|
1454
|
-
public async getProjectEventEntityAsync(projectEventEntityId: number, options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEventEntity > {
|
|
1455
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1456
|
-
base.WebApiBase.SetPending(options);
|
|
1457
|
-
return new Promise< carriers.ProjectEventEntity >(async (resolve, reject) => {
|
|
1458
|
-
try {
|
|
1459
|
-
const response = await this._axios.post("GetProjectEventEntity?projectEventEntityId=" + projectEventEntityId, null, config);
|
|
1460
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
1461
|
-
const res = converters.Create_ProjectEventEntity_From( response.data );
|
|
1462
|
-
resolve(res);
|
|
1463
|
-
}
|
|
1464
|
-
catch( err ) {
|
|
1465
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1466
|
-
reject(err);
|
|
1467
|
-
}
|
|
1468
|
-
});
|
|
1469
|
-
}
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
private async _getProjectEventEntityFromProjectIdAsync(request: carriers.Project_GetProjectEventEntityFromProjectIdRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEventEntity > {
|
|
1473
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1474
|
-
base.WebApiBase.SetPending(options);
|
|
1475
|
-
return new Promise< carriers.ProjectEventEntity >(async (resolve, reject) => {
|
|
1476
|
-
try {
|
|
1477
|
-
config.baseURL = this._options.baseUrl;
|
|
1478
|
-
const response = await this._axios.post("GetProjectEventEntityFromProjectId", request , config);
|
|
1479
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
1480
|
-
const res : carriers.ProjectEventEntity = converters.Create_ProjectEventEntity_From( response.data );
|
|
1481
|
-
resolve(res);
|
|
1482
|
-
}
|
|
1483
|
-
catch( err ) {
|
|
1484
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1485
|
-
reject(err);
|
|
1486
|
-
}
|
|
1487
|
-
});
|
|
1488
|
-
}
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
/**
|
|
1493
|
-
* Get a ProjectEventEntity based on a projectId.
|
|
1494
|
-
* @param request - ProjectId
|
|
1495
|
-
* @returns ProjectEventEntity
|
|
1496
|
-
*/
|
|
1497
|
-
public async getProjectEventEntityFromProjectIdAsync(request: carriers.Project_GetProjectEventEntityFromProjectIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEventEntity >;
|
|
1498
|
-
|
|
1499
|
-
/**
|
|
1500
|
-
* Get a ProjectEventEntity based on a projectId.
|
|
1501
|
-
* @param projectId - The projectId to get a ProjectEventEntity for
|
|
1502
|
-
* @returns ProjectEventEntity
|
|
1503
|
-
*/
|
|
1504
|
-
public async getProjectEventEntityFromProjectIdAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEventEntity >;
|
|
1505
|
-
|
|
1506
|
-
public async getProjectEventEntityFromProjectIdAsync(projectId:number|carriers.Project_GetProjectEventEntityFromProjectIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEventEntity > {
|
|
1507
|
-
let _request : carriers.Project_GetProjectEventEntityFromProjectIdRequest = null;
|
|
1508
|
-
let _options : base.WebApiRequestOptions = null;
|
|
1509
|
-
const first : any = projectId;
|
|
1510
|
-
if( typeof( first ) === "object" && first && ( typeof(first.projectId)!='undefined' ) )
|
|
1511
|
-
{
|
|
1512
|
-
_request = projectId as carriers.Project_GetProjectEventEntityFromProjectIdRequest;
|
|
1513
|
-
_options = webapi_options as base.WebApiRequestOptions;
|
|
1514
|
-
}
|
|
1515
|
-
else
|
|
1516
|
-
{
|
|
1517
|
-
_request = {
|
|
1518
|
-
projectId: projectId as number,
|
|
1519
|
-
};
|
|
1520
|
-
_options = webapi_options;
|
|
1521
|
-
}
|
|
1522
|
-
return this._getProjectEventEntityFromProjectIdAsync( _request, _options );
|
|
1523
|
-
}
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
private async _deleteProjectEventEntityFromProjectIdAsync(request: carriers.Project_DeleteProjectEventEntityFromProjectIdRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1527
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1528
|
-
base.WebApiBase.SetPending(options);
|
|
1529
|
-
return new Promise< void >(async (resolve, reject) => {
|
|
1530
|
-
try {
|
|
1531
|
-
config.baseURL = this._options.baseUrl;
|
|
1532
|
-
const response = await this._axios.post("DeleteProjectEventEntityFromProjectId", request , config);
|
|
1533
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
1534
|
-
const res = response.data;
|
|
1535
|
-
resolve(res);
|
|
1536
|
-
}
|
|
1537
|
-
catch( err ) {
|
|
1538
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1539
|
-
reject(err);
|
|
1540
|
-
}
|
|
1541
|
-
});
|
|
1542
|
-
}
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
/**
|
|
1547
|
-
* Delete a project event based on a project id. Does not delete the project, but does delete the published and ExternalEvent and AudienceVisibility records.
|
|
1548
|
-
* @param request - ProjectId
|
|
1549
|
-
* @returns Nothing
|
|
1550
|
-
*/
|
|
1551
|
-
public async deleteProjectEventEntityFromProjectIdAsync(request: carriers.Project_DeleteProjectEventEntityFromProjectIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1552
|
-
|
|
1553
|
-
/**
|
|
1554
|
-
* Delete a project event based on a project id. Does not delete the project, but does delete the published and ExternalEvent and AudienceVisibility records.
|
|
1555
|
-
* @param projectId - The project id of the external event to delete.
|
|
1556
|
-
* @returns Nothing
|
|
1557
|
-
*/
|
|
1558
|
-
public async deleteProjectEventEntityFromProjectIdAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1559
|
-
|
|
1560
|
-
public async deleteProjectEventEntityFromProjectIdAsync(projectId:number|carriers.Project_DeleteProjectEventEntityFromProjectIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1561
|
-
let _request : carriers.Project_DeleteProjectEventEntityFromProjectIdRequest = null;
|
|
1562
|
-
let _options : base.WebApiRequestOptions = null;
|
|
1563
|
-
const first : any = projectId;
|
|
1564
|
-
if( typeof( first ) === "object" && first && ( typeof(first.projectId)!='undefined' ) )
|
|
1565
|
-
{
|
|
1566
|
-
_request = projectId as carriers.Project_DeleteProjectEventEntityFromProjectIdRequest;
|
|
1567
|
-
_options = webapi_options as base.WebApiRequestOptions;
|
|
1568
|
-
}
|
|
1569
|
-
else
|
|
1570
|
-
{
|
|
1571
|
-
_request = {
|
|
1572
|
-
projectId: projectId as number,
|
|
1573
|
-
};
|
|
1574
|
-
_options = webapi_options;
|
|
1575
|
-
}
|
|
1576
|
-
return this._deleteProjectEventEntityFromProjectIdAsync( _request, _options );
|
|
1577
|
-
}
|
|
1578
|
-
|
|
1579
|
-
/**
|
|
1580
|
-
* Gets an array of ProjectEvent objects.
|
|
1581
|
-
* @param projectEventIds - The primary keys.
|
|
1582
|
-
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
1583
|
-
* @returns An array of ProjectEvent
|
|
1584
|
-
*/
|
|
1585
|
-
public async getProjectEventListAsync(projectEventIds: number[], options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEvent[] > {
|
|
1586
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1587
|
-
base.WebApiBase.SetPending(options);
|
|
1588
|
-
return new Promise< carriers.ProjectEvent[] >(async (resolve, reject) => {
|
|
1589
|
-
try {
|
|
1590
|
-
const response = await this._axios.post("GetProjectEventList", projectEventIds, config);
|
|
1591
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
1592
|
-
const res = converters.Create_ProjectEventArray_From( response.data );
|
|
1593
|
-
resolve(res);
|
|
1594
|
-
}
|
|
1595
|
-
catch( err ) {
|
|
1596
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1597
|
-
reject(err);
|
|
1598
|
-
}
|
|
1599
|
-
});
|
|
1600
|
-
}
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
private async _getMyProjectEventsAsync( options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEvent[] > {
|
|
1604
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1605
|
-
base.WebApiBase.SetPending(options);
|
|
1606
|
-
return new Promise< carriers.ProjectEvent[] >(async (resolve, reject) => {
|
|
1607
|
-
try {
|
|
1608
|
-
config.baseURL = this._options.baseUrl;
|
|
1609
|
-
const response = await this._axios.post("GetMyProjectEvents", undefined , config);
|
|
1610
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
1611
|
-
const res : carriers.ProjectEvent[] = converters.Create_ProjectEventArray_From( response.data );
|
|
1612
|
-
resolve(res);
|
|
1613
|
-
}
|
|
1614
|
-
catch( err ) {
|
|
1615
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1616
|
-
reject(err);
|
|
1617
|
-
}
|
|
1618
|
-
});
|
|
1619
|
-
}
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
/**
|
|
1623
|
-
* Gets all project events that belongs to the currently logged on user. The list of events are filtered by the Audience Visibility restrictions set when the project event is created.
|
|
1624
|
-
* @returns Array of project events
|
|
1625
|
-
*/
|
|
1626
|
-
public async getMyProjectEventsAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEvent[] >
|
|
1627
|
-
{
|
|
1628
|
-
return this._getMyProjectEventsAsync(webapi_options);
|
|
1629
|
-
}
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
private async _getProjectEventsOnPersonAsync(request: carriers.Project_GetProjectEventsOnPersonRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEvent[] > {
|
|
1633
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1634
|
-
base.WebApiBase.SetPending(options);
|
|
1635
|
-
return new Promise< carriers.ProjectEvent[] >(async (resolve, reject) => {
|
|
1636
|
-
try {
|
|
1637
|
-
config.baseURL = this._options.baseUrl;
|
|
1638
|
-
const response = await this._axios.post("GetProjectEventsOnPerson", request , config);
|
|
1639
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
1640
|
-
const res : carriers.ProjectEvent[] = converters.Create_ProjectEventArray_From( response.data );
|
|
1641
|
-
resolve(res);
|
|
1642
|
-
}
|
|
1643
|
-
catch( err ) {
|
|
1644
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1645
|
-
reject(err);
|
|
1646
|
-
}
|
|
1647
|
-
});
|
|
1648
|
-
}
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
/**
|
|
1653
|
-
* Gets all project events that belongs to the person specified. The list of events are filtered by the Audience Visibility restrictions set when the project event is created.
|
|
1654
|
-
* @param request - PersonId
|
|
1655
|
-
* @returns Array of project events
|
|
1656
|
-
*/
|
|
1657
|
-
public async getProjectEventsOnPersonAsync(request: carriers.Project_GetProjectEventsOnPersonRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEvent[] >;
|
|
1658
|
-
|
|
1659
|
-
/**
|
|
1660
|
-
* Gets all project events that belongs to the person specified. The list of events are filtered by the Audience Visibility restrictions set when the project event is created.
|
|
1661
|
-
* @param personId - Id of the person the project events belong to.
|
|
1662
|
-
* @returns Array of project events
|
|
1663
|
-
*/
|
|
1664
|
-
public async getProjectEventsOnPersonAsync(personId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEvent[] >;
|
|
1665
|
-
|
|
1666
|
-
public async getProjectEventsOnPersonAsync(personId:number|carriers.Project_GetProjectEventsOnPersonRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEvent[] > {
|
|
1667
|
-
let _request : carriers.Project_GetProjectEventsOnPersonRequest = null;
|
|
1668
|
-
let _options : base.WebApiRequestOptions = null;
|
|
1669
|
-
const first : any = personId;
|
|
1670
|
-
if( typeof( first ) === "object" && first && ( typeof(first.personId)!='undefined' ) )
|
|
1671
|
-
{
|
|
1672
|
-
_request = personId as carriers.Project_GetProjectEventsOnPersonRequest;
|
|
1673
|
-
_options = webapi_options as base.WebApiRequestOptions;
|
|
1674
|
-
}
|
|
1675
|
-
else
|
|
1676
|
-
{
|
|
1677
|
-
_request = {
|
|
1678
|
-
personId: personId as number,
|
|
1679
|
-
};
|
|
1680
|
-
_options = webapi_options;
|
|
1681
|
-
}
|
|
1682
|
-
return this._getProjectEventsOnPersonAsync( _request, _options );
|
|
1683
|
-
}
|
|
1684
|
-
|
|
1685
|
-
/**
|
|
1686
|
-
* Gets an array of Project objects.
|
|
1687
|
-
* @param projectIds - The primary keys.
|
|
1688
|
-
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
1689
|
-
* @returns An array of Project
|
|
1690
|
-
*/
|
|
1691
|
-
public async getProjectListAsync(projectIds: number[], options?:base.WebApiRequestOptions) : Promise< carriers.Project[] > {
|
|
1692
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1693
|
-
base.WebApiBase.SetPending(options);
|
|
1694
|
-
return new Promise< carriers.Project[] >(async (resolve, reject) => {
|
|
1695
|
-
try {
|
|
1696
|
-
const response = await this._axios.post("GetProjectList", projectIds, config);
|
|
1697
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
1698
|
-
const res = converters.Create_ProjectArray_From( response.data );
|
|
1699
|
-
resolve(res);
|
|
1700
|
-
}
|
|
1701
|
-
catch( err ) {
|
|
1702
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1703
|
-
reject(err);
|
|
1704
|
-
}
|
|
1705
|
-
});
|
|
1706
|
-
}
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
private async _getMyProjectsAsync(request: carriers.Project_GetMyProjectsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.Project[] > {
|
|
1710
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1711
|
-
base.WebApiBase.SetPending(options);
|
|
1712
|
-
return new Promise< carriers.Project[] >(async (resolve, reject) => {
|
|
1713
|
-
try {
|
|
1714
|
-
config.baseURL = this._options.baseUrl;
|
|
1715
|
-
const response = await this._axios.post("GetMyProjects", request , config);
|
|
1716
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
1717
|
-
const res : carriers.Project[] = converters.Create_ProjectArray_From( response.data );
|
|
1718
|
-
resolve(res);
|
|
1719
|
-
}
|
|
1720
|
-
catch( err ) {
|
|
1721
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1722
|
-
reject(err);
|
|
1723
|
-
}
|
|
1724
|
-
});
|
|
1725
|
-
}
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
/**
|
|
1730
|
-
* Returning the projects belonging to an associate. If memberProjects is false only the projects where the associate is project responsible is returned, otherwise both the projects where the associate is project responsible and project member is returned.
|
|
1731
|
-
* @param request - IncludeMemberProjects
|
|
1732
|
-
* @returns The list of projects
|
|
1733
|
-
*/
|
|
1734
|
-
public async getMyProjectsAsync(request: carriers.Project_GetMyProjectsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
1735
|
-
|
|
1736
|
-
/**
|
|
1737
|
-
* Returning the projects belonging to an associate. If memberProjects is false only the projects where the associate is project responsible is returned, otherwise both the projects where the associate is project responsible and project member is returned.
|
|
1738
|
-
* @param includeMemberProjects - True to include projects where the user is project member.
|
|
1739
|
-
* @returns The list of projects
|
|
1740
|
-
*/
|
|
1741
|
-
public async getMyProjectsAsync(includeMemberProjects: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
1742
|
-
|
|
1743
|
-
public async getMyProjectsAsync(includeMemberProjects:boolean|carriers.Project_GetMyProjectsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] > {
|
|
1744
|
-
let _request : carriers.Project_GetMyProjectsRequest = null;
|
|
1745
|
-
let _options : base.WebApiRequestOptions = null;
|
|
1746
|
-
const first : any = includeMemberProjects;
|
|
1747
|
-
if( typeof( first ) === "object" && first && ( typeof(first.includeMemberProjects)!='undefined' ) )
|
|
1748
|
-
{
|
|
1749
|
-
_request = includeMemberProjects as carriers.Project_GetMyProjectsRequest;
|
|
1750
|
-
_options = webapi_options as base.WebApiRequestOptions;
|
|
1751
|
-
}
|
|
1752
|
-
else
|
|
1753
|
-
{
|
|
1754
|
-
_request = {
|
|
1755
|
-
includeMemberProjects: includeMemberProjects as boolean,
|
|
1756
|
-
};
|
|
1757
|
-
_options = webapi_options;
|
|
1758
|
-
}
|
|
1759
|
-
return this._getMyProjectsAsync( _request, _options );
|
|
1760
|
-
}
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
private async _getMyMemberProjectsAsync( options?:base.WebApiRequestOptions) : Promise< carriers.Project[] > {
|
|
1764
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1765
|
-
base.WebApiBase.SetPending(options);
|
|
1766
|
-
return new Promise< carriers.Project[] >(async (resolve, reject) => {
|
|
1767
|
-
try {
|
|
1768
|
-
config.baseURL = this._options.baseUrl;
|
|
1769
|
-
const response = await this._axios.post("GetMyMemberProjects", undefined , config);
|
|
1770
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
1771
|
-
const res : carriers.Project[] = converters.Create_ProjectArray_From( response.data );
|
|
1772
|
-
resolve(res);
|
|
1773
|
-
}
|
|
1774
|
-
catch( err ) {
|
|
1775
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1776
|
-
reject(err);
|
|
1777
|
-
}
|
|
1778
|
-
});
|
|
1779
|
-
}
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
/**
|
|
1783
|
-
* Returning the projects where an user is project member.
|
|
1784
|
-
* @returns The list of projects.
|
|
1785
|
-
*/
|
|
1786
|
-
public async getMyMemberProjectsAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >
|
|
1787
|
-
{
|
|
1788
|
-
return this._getMyMemberProjectsAsync(webapi_options);
|
|
1789
|
-
}
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
private async _getProjectsFromPersonAsync(request: carriers.Project_GetProjectsFromPersonRequest, options?:base.WebApiRequestOptions) : Promise< carriers.Project[] > {
|
|
1793
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1794
|
-
base.WebApiBase.SetPending(options);
|
|
1795
|
-
return new Promise< carriers.Project[] >(async (resolve, reject) => {
|
|
1796
|
-
try {
|
|
1797
|
-
config.baseURL = this._options.baseUrl;
|
|
1798
|
-
const response = await this._axios.post("GetProjectsFromPerson", request , config);
|
|
1799
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
1800
|
-
const res : carriers.Project[] = converters.Create_ProjectArray_From( response.data );
|
|
1801
|
-
resolve(res);
|
|
1802
|
-
}
|
|
1803
|
-
catch( err ) {
|
|
1804
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1805
|
-
reject(err);
|
|
1806
|
-
}
|
|
1807
|
-
});
|
|
1808
|
-
}
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
/**
|
|
1813
|
-
* Return all projects where the person is project member.
|
|
1814
|
-
* @param request - PersonId
|
|
1815
|
-
* @returns ProjectListEntity
|
|
1816
|
-
*/
|
|
1817
|
-
public async getProjectsFromPersonAsync(request: carriers.Project_GetProjectsFromPersonRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
1818
|
-
|
|
1819
|
-
/**
|
|
1820
|
-
* Return all projects where the person is project member.
|
|
1821
|
-
* @param personId - The person id
|
|
1822
|
-
* @returns ProjectListEntity
|
|
1823
|
-
*/
|
|
1824
|
-
public async getProjectsFromPersonAsync(personId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
1825
|
-
|
|
1826
|
-
public async getProjectsFromPersonAsync(personId:number|carriers.Project_GetProjectsFromPersonRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] > {
|
|
1827
|
-
let _request : carriers.Project_GetProjectsFromPersonRequest = null;
|
|
1828
|
-
let _options : base.WebApiRequestOptions = null;
|
|
1829
|
-
const first : any = personId;
|
|
1830
|
-
if( typeof( first ) === "object" && first && ( typeof(first.personId)!='undefined' ) )
|
|
1831
|
-
{
|
|
1832
|
-
_request = personId as carriers.Project_GetProjectsFromPersonRequest;
|
|
1833
|
-
_options = webapi_options as base.WebApiRequestOptions;
|
|
1834
|
-
}
|
|
1835
|
-
else
|
|
1836
|
-
{
|
|
1837
|
-
_request = {
|
|
1838
|
-
personId: personId as number,
|
|
1839
|
-
};
|
|
1840
|
-
_options = webapi_options;
|
|
1841
|
-
}
|
|
1842
|
-
return this._getProjectsFromPersonAsync( _request, _options );
|
|
1843
|
-
}
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
private async _getProjectsFromContactAsync(request: carriers.Project_GetProjectsFromContactRequest, options?:base.WebApiRequestOptions) : Promise< carriers.Project[] > {
|
|
1847
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1848
|
-
base.WebApiBase.SetPending(options);
|
|
1849
|
-
return new Promise< carriers.Project[] >(async (resolve, reject) => {
|
|
1850
|
-
try {
|
|
1851
|
-
config.baseURL = this._options.baseUrl;
|
|
1852
|
-
const response = await this._axios.post("GetProjectsFromContact", request , config);
|
|
1853
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
1854
|
-
const res : carriers.Project[] = converters.Create_ProjectArray_From( response.data );
|
|
1855
|
-
resolve(res);
|
|
1856
|
-
}
|
|
1857
|
-
catch( err ) {
|
|
1858
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1859
|
-
reject(err);
|
|
1860
|
-
}
|
|
1861
|
-
});
|
|
1862
|
-
}
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
/**
|
|
1867
|
-
* Returns all projects where the given contact has projectmembers.
|
|
1868
|
-
* @param request - ContactId
|
|
1869
|
-
* @returns ProjectListEntity
|
|
1870
|
-
*/
|
|
1871
|
-
public async getProjectsFromContactAsync(request: carriers.Project_GetProjectsFromContactRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
1872
|
-
|
|
1873
|
-
/**
|
|
1874
|
-
* Returns all projects where the given contact has projectmembers.
|
|
1875
|
-
* @param contactId - The contact id
|
|
1876
|
-
* @returns ProjectListEntity
|
|
1877
|
-
*/
|
|
1878
|
-
public async getProjectsFromContactAsync(contactId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
1879
|
-
|
|
1880
|
-
public async getProjectsFromContactAsync(contactId:number|carriers.Project_GetProjectsFromContactRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] > {
|
|
1881
|
-
let _request : carriers.Project_GetProjectsFromContactRequest = null;
|
|
1882
|
-
let _options : base.WebApiRequestOptions = null;
|
|
1883
|
-
const first : any = contactId;
|
|
1884
|
-
if( typeof( first ) === "object" && first && ( typeof(first.contactId)!='undefined' ) )
|
|
1885
|
-
{
|
|
1886
|
-
_request = contactId as carriers.Project_GetProjectsFromContactRequest;
|
|
1887
|
-
_options = webapi_options as base.WebApiRequestOptions;
|
|
1888
|
-
}
|
|
1889
|
-
else
|
|
1890
|
-
{
|
|
1891
|
-
_request = {
|
|
1892
|
-
contactId: contactId as number,
|
|
1893
|
-
};
|
|
1894
|
-
_options = webapi_options;
|
|
1895
|
-
}
|
|
1896
|
-
return this._getProjectsFromContactAsync( _request, _options );
|
|
1897
|
-
}
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
private async _getPublishedProjectAsync(request: carriers.Project_GetPublishedProjectRequest, options?:base.WebApiRequestOptions) : Promise< carriers.Project > {
|
|
1901
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1902
|
-
base.WebApiBase.SetPending(options);
|
|
1903
|
-
return new Promise< carriers.Project >(async (resolve, reject) => {
|
|
1904
|
-
try {
|
|
1905
|
-
config.baseURL = this._options.baseUrl;
|
|
1906
|
-
const response = await this._axios.post("GetPublishedProject", request , config);
|
|
1907
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
1908
|
-
const res : carriers.Project = converters.Create_Project_From( response.data );
|
|
1909
|
-
resolve(res);
|
|
1910
|
-
}
|
|
1911
|
-
catch( err ) {
|
|
1912
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1913
|
-
reject(err);
|
|
1914
|
-
}
|
|
1915
|
-
});
|
|
1916
|
-
}
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
/**
|
|
1921
|
-
* Get published project by project id.
|
|
1922
|
-
* @param request - ProjectId
|
|
1923
|
-
* @returns Project
|
|
1924
|
-
*/
|
|
1925
|
-
public async getPublishedProjectAsync(request: carriers.Project_GetPublishedProjectRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project >;
|
|
1926
|
-
|
|
1927
|
-
/**
|
|
1928
|
-
* Get published project by project id.
|
|
1929
|
-
* @param projectId - The project id.
|
|
1930
|
-
* @returns Project
|
|
1931
|
-
*/
|
|
1932
|
-
public async getPublishedProjectAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project >;
|
|
1933
|
-
|
|
1934
|
-
public async getPublishedProjectAsync(projectId:number|carriers.Project_GetPublishedProjectRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project > {
|
|
1935
|
-
let _request : carriers.Project_GetPublishedProjectRequest = null;
|
|
1936
|
-
let _options : base.WebApiRequestOptions = null;
|
|
1937
|
-
const first : any = projectId;
|
|
1938
|
-
if( typeof( first ) === "object" && first && ( typeof(first.projectId)!='undefined' ) )
|
|
1939
|
-
{
|
|
1940
|
-
_request = projectId as carriers.Project_GetPublishedProjectRequest;
|
|
1941
|
-
_options = webapi_options as base.WebApiRequestOptions;
|
|
1942
|
-
}
|
|
1943
|
-
else
|
|
1944
|
-
{
|
|
1945
|
-
_request = {
|
|
1946
|
-
projectId: projectId as number,
|
|
1947
|
-
};
|
|
1948
|
-
_options = webapi_options;
|
|
1949
|
-
}
|
|
1950
|
-
return this._getPublishedProjectAsync( _request, _options );
|
|
1951
|
-
}
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
private async _getPublishedProjectsAsync(request: carriers.Project_GetPublishedProjectsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.Project[] > {
|
|
1955
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1956
|
-
base.WebApiBase.SetPending(options);
|
|
1957
|
-
return new Promise< carriers.Project[] >(async (resolve, reject) => {
|
|
1958
|
-
try {
|
|
1959
|
-
config.baseURL = this._options.baseUrl;
|
|
1960
|
-
const response = await this._axios.post("GetPublishedProjects", request , config);
|
|
1961
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
1962
|
-
const res : carriers.Project[] = converters.Create_ProjectArray_From( response.data );
|
|
1963
|
-
resolve(res);
|
|
1964
|
-
}
|
|
1965
|
-
catch( err ) {
|
|
1966
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1967
|
-
reject(err);
|
|
1968
|
-
}
|
|
1969
|
-
});
|
|
1970
|
-
}
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
/**
|
|
1975
|
-
* Get published projects by project ids.
|
|
1976
|
-
* @param request - ProjectIds
|
|
1977
|
-
* @returns Projects
|
|
1978
|
-
*/
|
|
1979
|
-
public async getPublishedProjectsAsync(request: carriers.Project_GetPublishedProjectsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
1980
|
-
|
|
1981
|
-
/**
|
|
1982
|
-
* Get published projects by project ids.
|
|
1983
|
-
* @param projectIds - The array of project ids
|
|
1984
|
-
* @returns Projects
|
|
1985
|
-
*/
|
|
1986
|
-
public async getPublishedProjectsAsync(projectIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
1987
|
-
|
|
1988
|
-
public async getPublishedProjectsAsync(projectIds:number[]|carriers.Project_GetPublishedProjectsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] > {
|
|
1989
|
-
let _request : carriers.Project_GetPublishedProjectsRequest = null;
|
|
1990
|
-
let _options : base.WebApiRequestOptions = null;
|
|
1991
|
-
const first : any = projectIds;
|
|
1992
|
-
if( typeof( first ) === "object" && first && ( typeof(first.projectIds)!='undefined' ) )
|
|
1993
|
-
{
|
|
1994
|
-
_request = projectIds as carriers.Project_GetPublishedProjectsRequest;
|
|
1995
|
-
_options = webapi_options as base.WebApiRequestOptions;
|
|
1996
|
-
}
|
|
1997
|
-
else
|
|
1998
|
-
{
|
|
1999
|
-
_request = {
|
|
2000
|
-
projectIds: projectIds as number[],
|
|
2001
|
-
};
|
|
2002
|
-
_options = webapi_options;
|
|
2003
|
-
}
|
|
2004
|
-
return this._getPublishedProjectsAsync( _request, _options );
|
|
2005
|
-
}
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
private async _getMyPublishedProjectsAsync( options?:base.WebApiRequestOptions) : Promise< carriers.Project[] > {
|
|
2009
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2010
|
-
base.WebApiBase.SetPending(options);
|
|
2011
|
-
return new Promise< carriers.Project[] >(async (resolve, reject) => {
|
|
2012
|
-
try {
|
|
2013
|
-
config.baseURL = this._options.baseUrl;
|
|
2014
|
-
const response = await this._axios.post("GetMyPublishedProjects", undefined , config);
|
|
2015
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
2016
|
-
const res : carriers.Project[] = converters.Create_ProjectArray_From( response.data );
|
|
2017
|
-
resolve(res);
|
|
2018
|
-
}
|
|
2019
|
-
catch( err ) {
|
|
2020
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
2021
|
-
reject(err);
|
|
2022
|
-
}
|
|
2023
|
-
});
|
|
2024
|
-
}
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
/**
|
|
2028
|
-
* Get published projects from the logged in user.
|
|
2029
|
-
* @returns Projects
|
|
2030
|
-
*/
|
|
2031
|
-
public async getMyPublishedProjectsAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >
|
|
2032
|
-
{
|
|
2033
|
-
return this._getMyPublishedProjectsAsync(webapi_options);
|
|
2034
|
-
}
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
private async _getPublishedProjectsOnPersonIdAsync(request: carriers.Project_GetPublishedProjectsOnPersonIdRequest, options?:base.WebApiRequestOptions) : Promise< carriers.Project[] > {
|
|
2038
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2039
|
-
base.WebApiBase.SetPending(options);
|
|
2040
|
-
return new Promise< carriers.Project[] >(async (resolve, reject) => {
|
|
2041
|
-
try {
|
|
2042
|
-
config.baseURL = this._options.baseUrl;
|
|
2043
|
-
const response = await this._axios.post("GetPublishedProjectsOnPersonId", request , config);
|
|
2044
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
2045
|
-
const res : carriers.Project[] = converters.Create_ProjectArray_From( response.data );
|
|
2046
|
-
resolve(res);
|
|
2047
|
-
}
|
|
2048
|
-
catch( err ) {
|
|
2049
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
2050
|
-
reject(err);
|
|
2051
|
-
}
|
|
2052
|
-
});
|
|
2053
|
-
}
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
/**
|
|
2058
|
-
* Get published projects where person is a member
|
|
2059
|
-
* @param request - PersonId
|
|
2060
|
-
* @returns Array of project
|
|
2061
|
-
*/
|
|
2062
|
-
public async getPublishedProjectsOnPersonIdAsync(request: carriers.Project_GetPublishedProjectsOnPersonIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
2063
|
-
|
|
2064
|
-
/**
|
|
2065
|
-
* Get published projects where person is a member
|
|
2066
|
-
* @param personId - The person id
|
|
2067
|
-
* @returns Array of project
|
|
2068
|
-
*/
|
|
2069
|
-
public async getPublishedProjectsOnPersonIdAsync(personId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
2070
|
-
|
|
2071
|
-
public async getPublishedProjectsOnPersonIdAsync(personId:number|carriers.Project_GetPublishedProjectsOnPersonIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] > {
|
|
2072
|
-
let _request : carriers.Project_GetPublishedProjectsOnPersonIdRequest = null;
|
|
2073
|
-
let _options : base.WebApiRequestOptions = null;
|
|
2074
|
-
const first : any = personId;
|
|
2075
|
-
if( typeof( first ) === "object" && first && ( typeof(first.personId)!='undefined' ) )
|
|
2076
|
-
{
|
|
2077
|
-
_request = personId as carriers.Project_GetPublishedProjectsOnPersonIdRequest;
|
|
2078
|
-
_options = webapi_options as base.WebApiRequestOptions;
|
|
2079
|
-
}
|
|
2080
|
-
else
|
|
2081
|
-
{
|
|
2082
|
-
_request = {
|
|
2083
|
-
personId: personId as number,
|
|
2084
|
-
};
|
|
2085
|
-
_options = webapi_options;
|
|
2086
|
-
}
|
|
2087
|
-
return this._getPublishedProjectsOnPersonIdAsync( _request, _options );
|
|
2088
|
-
}
|
|
2089
|
-
|
|
2090
|
-
/**
|
|
2091
|
-
* Gets a ProjectMember object.
|
|
2092
|
-
* @param projectMemberId - The primary key.
|
|
2093
|
-
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
2094
|
-
* @returns A single ProjectMember
|
|
2095
|
-
*/
|
|
2096
|
-
public async getProjectMemberAsync(projectMemberId: number, options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember > {
|
|
2097
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2098
|
-
base.WebApiBase.SetPending(options);
|
|
2099
|
-
return new Promise< carriers.ProjectMember >(async (resolve, reject) => {
|
|
2100
|
-
try {
|
|
2101
|
-
const response = await this._axios.post("GetProjectMember?projectMemberId=" + projectMemberId, null, config);
|
|
2102
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
2103
|
-
const res = converters.Create_ProjectMember_From( response.data );
|
|
2104
|
-
resolve(res);
|
|
2105
|
-
}
|
|
2106
|
-
catch( err ) {
|
|
2107
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
2108
|
-
reject(err);
|
|
2109
|
-
}
|
|
2110
|
-
});
|
|
2111
|
-
}
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
private async _updateProjectMembersAsync(request: carriers.Project_UpdateProjectMembersRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
2115
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2116
|
-
base.WebApiBase.SetPending(options);
|
|
2117
|
-
return new Promise< void >(async (resolve, reject) => {
|
|
2118
|
-
try {
|
|
2119
|
-
config.baseURL = this._options.baseUrl;
|
|
2120
|
-
const response = await this._axios.post("UpdateProjectMembers", request , config);
|
|
2121
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
2122
|
-
const res = response.data;
|
|
2123
|
-
resolve(res);
|
|
2124
|
-
}
|
|
2125
|
-
catch( err ) {
|
|
2126
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
2127
|
-
reject(err);
|
|
2128
|
-
}
|
|
2129
|
-
});
|
|
2130
|
-
}
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
/**
|
|
2135
|
-
* Update existing project members. Not creating new (only projectmember_id > 0 accepted)
|
|
2136
|
-
* @param request - ProjectId, ProjectMembers
|
|
2137
|
-
* @returns This method has no return value
|
|
2138
|
-
*/
|
|
2139
|
-
public async updateProjectMembersAsync(request: carriers.Project_UpdateProjectMembersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
2140
|
-
|
|
2141
|
-
/**
|
|
2142
|
-
* Update existing project members. Not creating new (only projectmember_id > 0 accepted)
|
|
2143
|
-
* @param projectId - Project of which members will be updated
|
|
2144
|
-
* @param projectMembers - Project members to update
|
|
2145
|
-
* @returns This method has no return value
|
|
2146
|
-
*/
|
|
2147
|
-
public async updateProjectMembersAsync(projectId: number, projectMembers: carriers.ProjectMember[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
2148
|
-
|
|
2149
|
-
public async updateProjectMembersAsync(projectId:number|carriers.Project_UpdateProjectMembersRequest, projectMembers?:carriers.ProjectMember[]|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
2150
|
-
let _request : carriers.Project_UpdateProjectMembersRequest = null;
|
|
2151
|
-
let _options : base.WebApiRequestOptions = null;
|
|
2152
|
-
const first : any = projectId;
|
|
2153
|
-
if( typeof( first ) === "object" && first && ( typeof(first.projectId)!='undefined' || typeof(first.projectMembers)!='undefined' ) )
|
|
2154
|
-
{
|
|
2155
|
-
_request = projectId as carriers.Project_UpdateProjectMembersRequest;
|
|
2156
|
-
_options = projectMembers as base.WebApiRequestOptions;
|
|
2157
|
-
}
|
|
2158
|
-
else
|
|
2159
|
-
{
|
|
2160
|
-
_request = {
|
|
2161
|
-
projectId: projectId as number,
|
|
2162
|
-
projectMembers: projectMembers as carriers.ProjectMember[],
|
|
2163
|
-
};
|
|
2164
|
-
_options = webapi_options;
|
|
2165
|
-
}
|
|
2166
|
-
return this._updateProjectMembersAsync( _request, _options );
|
|
2167
|
-
}
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
private async _getProjectMembersAsync(request: carriers.Project_GetProjectMembersRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember[] > {
|
|
2171
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2172
|
-
base.WebApiBase.SetPending(options);
|
|
2173
|
-
return new Promise< carriers.ProjectMember[] >(async (resolve, reject) => {
|
|
2174
|
-
try {
|
|
2175
|
-
config.baseURL = this._options.baseUrl;
|
|
2176
|
-
const response = await this._axios.post("GetProjectMembers", request , config);
|
|
2177
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
2178
|
-
const res : carriers.ProjectMember[] = converters.Create_ProjectMemberArray_From( response.data );
|
|
2179
|
-
resolve(res);
|
|
2180
|
-
}
|
|
2181
|
-
catch( err ) {
|
|
2182
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
2183
|
-
reject(err);
|
|
2184
|
-
}
|
|
2185
|
-
});
|
|
2186
|
-
}
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
/**
|
|
2191
|
-
* Returns an array of project members
|
|
2192
|
-
* @param request - ProjectId
|
|
2193
|
-
* @returns An array of project members
|
|
2194
|
-
*/
|
|
2195
|
-
public async getProjectMembersAsync(request: carriers.Project_GetProjectMembersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember[] >;
|
|
2196
|
-
|
|
2197
|
-
/**
|
|
2198
|
-
* Returns an array of project members
|
|
2199
|
-
* @param projectId - The project id
|
|
2200
|
-
* @returns An array of project members
|
|
2201
|
-
*/
|
|
2202
|
-
public async getProjectMembersAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember[] >;
|
|
2203
|
-
|
|
2204
|
-
public async getProjectMembersAsync(projectId:number|carriers.Project_GetProjectMembersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember[] > {
|
|
2205
|
-
let _request : carriers.Project_GetProjectMembersRequest = null;
|
|
2206
|
-
let _options : base.WebApiRequestOptions = null;
|
|
2207
|
-
const first : any = projectId;
|
|
2208
|
-
if( typeof( first ) === "object" && first && ( typeof(first.projectId)!='undefined' ) )
|
|
2209
|
-
{
|
|
2210
|
-
_request = projectId as carriers.Project_GetProjectMembersRequest;
|
|
2211
|
-
_options = webapi_options as base.WebApiRequestOptions;
|
|
2212
|
-
}
|
|
2213
|
-
else
|
|
2214
|
-
{
|
|
2215
|
-
_request = {
|
|
2216
|
-
projectId: projectId as number,
|
|
2217
|
-
};
|
|
2218
|
-
_options = webapi_options;
|
|
2219
|
-
}
|
|
2220
|
-
return this._getProjectMembersAsync( _request, _options );
|
|
2221
|
-
}
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
private async _updateProjectMemberAsync(request: carriers.Project_UpdateProjectMemberRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember > {
|
|
2225
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2226
|
-
base.WebApiBase.SetPending(options);
|
|
2227
|
-
return new Promise< carriers.ProjectMember >(async (resolve, reject) => {
|
|
2228
|
-
try {
|
|
2229
|
-
config.baseURL = this._options.baseUrl;
|
|
2230
|
-
const response = await this._axios.post("UpdateProjectMember", request , config);
|
|
2231
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
2232
|
-
const res : carriers.ProjectMember = converters.Create_ProjectMember_From( response.data );
|
|
2233
|
-
resolve(res);
|
|
2234
|
-
}
|
|
2235
|
-
catch( err ) {
|
|
2236
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
2237
|
-
reject(err);
|
|
2238
|
-
}
|
|
2239
|
-
});
|
|
2240
|
-
}
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
/**
|
|
2245
|
-
* Updates a ProjectMember row.
|
|
2246
|
-
* @param request - ProjectMember
|
|
2247
|
-
* @returns The Updated ProjectMember
|
|
2248
|
-
*/
|
|
2249
|
-
public async updateProjectMemberAsync(request: carriers.Project_UpdateProjectMemberRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember >;
|
|
2250
|
-
|
|
2251
|
-
/**
|
|
2252
|
-
* Updates a ProjectMember row.
|
|
2253
|
-
* @param projectMember - ProjectMember to update
|
|
2254
|
-
* @returns The Updated ProjectMember
|
|
2255
|
-
*/
|
|
2256
|
-
public async updateProjectMemberAsync(projectMember: carriers.ProjectMember, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember >;
|
|
2257
|
-
|
|
2258
|
-
public async updateProjectMemberAsync(projectMember:carriers.ProjectMember|carriers.Project_UpdateProjectMemberRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember > {
|
|
2259
|
-
let _request : carriers.Project_UpdateProjectMemberRequest = null;
|
|
2260
|
-
let _options : base.WebApiRequestOptions = null;
|
|
2261
|
-
const first : any = projectMember;
|
|
2262
|
-
if( typeof( first ) === "object" && first && ( typeof(first.projectMember)!='undefined' ) )
|
|
2263
|
-
{
|
|
2264
|
-
_request = projectMember as carriers.Project_UpdateProjectMemberRequest;
|
|
2265
|
-
_options = webapi_options as base.WebApiRequestOptions;
|
|
2266
|
-
}
|
|
2267
|
-
else
|
|
2268
|
-
{
|
|
2269
|
-
_request = {
|
|
2270
|
-
projectMember: projectMember as carriers.ProjectMember,
|
|
2271
|
-
};
|
|
2272
|
-
_options = webapi_options;
|
|
2273
|
-
}
|
|
2274
|
-
return this._updateProjectMemberAsync( _request, _options );
|
|
2275
|
-
}
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
private async _getProjectMembersByIdAsync(request: carriers.Project_GetProjectMembersByIdRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember[] > {
|
|
2279
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2280
|
-
base.WebApiBase.SetPending(options);
|
|
2281
|
-
return new Promise< carriers.ProjectMember[] >(async (resolve, reject) => {
|
|
2282
|
-
try {
|
|
2283
|
-
config.baseURL = this._options.baseUrl;
|
|
2284
|
-
const response = await this._axios.post("GetProjectMembersById", request , config);
|
|
2285
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
2286
|
-
const res : carriers.ProjectMember[] = converters.Create_ProjectMemberArray_From( response.data );
|
|
2287
|
-
resolve(res);
|
|
2288
|
-
}
|
|
2289
|
-
catch( err ) {
|
|
2290
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
2291
|
-
reject(err);
|
|
2292
|
-
}
|
|
2293
|
-
});
|
|
2294
|
-
}
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
/**
|
|
2299
|
-
* Returns an array of project members
|
|
2300
|
-
* @param request - ProjectMemberIds
|
|
2301
|
-
* @returns An array of project members
|
|
2302
|
-
*/
|
|
2303
|
-
public async getProjectMembersByIdAsync(request: carriers.Project_GetProjectMembersByIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember[] >;
|
|
2304
|
-
|
|
2305
|
-
/**
|
|
2306
|
-
* Returns an array of project members
|
|
2307
|
-
* @param projectMemberIds -
|
|
2308
|
-
* @returns An array of project members
|
|
2309
|
-
*/
|
|
2310
|
-
public async getProjectMembersByIdAsync(projectMemberIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember[] >;
|
|
2311
|
-
|
|
2312
|
-
public async getProjectMembersByIdAsync(projectMemberIds:number[]|carriers.Project_GetProjectMembersByIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember[] > {
|
|
2313
|
-
let _request : carriers.Project_GetProjectMembersByIdRequest = null;
|
|
2314
|
-
let _options : base.WebApiRequestOptions = null;
|
|
2315
|
-
const first : any = projectMemberIds;
|
|
2316
|
-
if( typeof( first ) === "object" && first && ( typeof(first.projectMemberIds)!='undefined' ) )
|
|
2317
|
-
{
|
|
2318
|
-
_request = projectMemberIds as carriers.Project_GetProjectMembersByIdRequest;
|
|
2319
|
-
_options = webapi_options as base.WebApiRequestOptions;
|
|
2320
|
-
}
|
|
2321
|
-
else
|
|
2322
|
-
{
|
|
2323
|
-
_request = {
|
|
2324
|
-
projectMemberIds: projectMemberIds as number[],
|
|
2325
|
-
};
|
|
2326
|
-
_options = webapi_options;
|
|
2327
|
-
}
|
|
2328
|
-
return this._getProjectMembersByIdAsync( _request, _options );
|
|
2329
|
-
}
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
private async _saveProjectMembersFunctionAndCommentAsync(request: carriers.Project_SaveProjectMembersFunctionAndCommentRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
2333
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2334
|
-
base.WebApiBase.SetPending(options);
|
|
2335
|
-
return new Promise< void >(async (resolve, reject) => {
|
|
2336
|
-
try {
|
|
2337
|
-
config.baseURL = this._options.baseUrl;
|
|
2338
|
-
const response = await this._axios.post("SaveProjectMembersFunctionAndComment", request , config);
|
|
2339
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
2340
|
-
const res = response.data;
|
|
2341
|
-
resolve(res);
|
|
2342
|
-
}
|
|
2343
|
-
catch( err ) {
|
|
2344
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
2345
|
-
reject(err);
|
|
2346
|
-
}
|
|
2347
|
-
});
|
|
2348
|
-
}
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
/**
|
|
2353
|
-
* Saves role and comment on an array of projectmembers represented by ids
|
|
2354
|
-
* @param request - ProjectMemberIds, RoleId, Comment
|
|
2355
|
-
* @returns
|
|
2356
|
-
*/
|
|
2357
|
-
public async saveProjectMembersFunctionAndCommentAsync(request: carriers.Project_SaveProjectMembersFunctionAndCommentRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
2358
|
-
|
|
2359
|
-
/**
|
|
2360
|
-
* Saves role and comment on an array of projectmembers represented by ids
|
|
2361
|
-
* @param projectMemberIds -
|
|
2362
|
-
* @param roleId -
|
|
2363
|
-
* @param comment -
|
|
2364
|
-
* @returns
|
|
2365
|
-
*/
|
|
2366
|
-
public async saveProjectMembersFunctionAndCommentAsync(projectMemberIds: number[], roleId: number, comment: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
2367
|
-
|
|
2368
|
-
public async saveProjectMembersFunctionAndCommentAsync(projectMemberIds:number[]|carriers.Project_SaveProjectMembersFunctionAndCommentRequest, roleId?:number|base.WebApiRequestOptions, comment?:string, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
2369
|
-
let _request : carriers.Project_SaveProjectMembersFunctionAndCommentRequest = null;
|
|
2370
|
-
let _options : base.WebApiRequestOptions = null;
|
|
2371
|
-
const first : any = projectMemberIds;
|
|
2372
|
-
if( typeof( first ) === "object" && first && ( typeof(first.projectMemberIds)!='undefined' || typeof(first.roleId)!='undefined' || typeof(first.comment)!='undefined' ) )
|
|
2373
|
-
{
|
|
2374
|
-
_request = projectMemberIds as carriers.Project_SaveProjectMembersFunctionAndCommentRequest;
|
|
2375
|
-
_options = roleId as base.WebApiRequestOptions;
|
|
2376
|
-
}
|
|
2377
|
-
else
|
|
2378
|
-
{
|
|
2379
|
-
_request = {
|
|
2380
|
-
projectMemberIds: projectMemberIds as number[],
|
|
2381
|
-
roleId: roleId as number,
|
|
2382
|
-
comment: comment as string,
|
|
2383
|
-
};
|
|
2384
|
-
_options = webapi_options;
|
|
2385
|
-
}
|
|
2386
|
-
return this._saveProjectMembersFunctionAndCommentAsync( _request, _options );
|
|
2387
|
-
}
|
|
2388
|
-
|
|
2389
|
-
} // class v1ProjectAgentController
|
|
2390
|
-
|
|
2391
|
-
|
|
1
|
+
// <auto-generated>
|
|
2
|
+
// SuperOffice Code Generator
|
|
3
|
+
// modelling\templates\servicestswebapi\tswebapiagents.tt
|
|
4
|
+
// </auto-generated>
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
/* tslint:disable */
|
|
8
|
+
//----------------------------------------------------------------------------
|
|
9
|
+
// G E N E R A T E D F I L E ! D O N O T E D I T !
|
|
10
|
+
//----------------------------------------------------------------------------
|
|
11
|
+
//
|
|
12
|
+
// File: WebApi/ProjectAgent.ts
|
|
13
|
+
//
|
|
14
|
+
//----------------------------------------------------------------------------
|
|
15
|
+
// Copyright (C) SuperOffice AS
|
|
16
|
+
//----------------------------------------------------------------------------
|
|
17
|
+
|
|
18
|
+
import { AxiosRequestConfig } from 'axios';
|
|
19
|
+
import { Duration } from 'dayjs/plugin/duration';
|
|
20
|
+
import * as enums from './Enums';
|
|
21
|
+
import * as base from './WebApiBase';
|
|
22
|
+
import * as carriers from './Carriers';
|
|
23
|
+
import * as converters from './Converters';
|
|
24
|
+
import { FromBase64ToString, ToBase64 } from './Base64';
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Collection of all services that works with Project data.
|
|
28
|
+
*/
|
|
29
|
+
export interface IProjectAgent {
|
|
30
|
+
createDefaultProjectEntityAsync(): Promise< carriers.ProjectEntity >;
|
|
31
|
+
saveProjectEntityAsync(entity: carriers.ProjectEntity) : Promise< carriers.ProjectEntity >;
|
|
32
|
+
deleteProjectEntityAsync(ProjectEntityId: number) : Promise<void>;
|
|
33
|
+
createDefaultProjectEventEntityAsync(): Promise< carriers.ProjectEventEntity >;
|
|
34
|
+
saveProjectEventEntityAsync(entity: carriers.ProjectEventEntity) : Promise< carriers.ProjectEventEntity >;
|
|
35
|
+
deleteProjectEventEntityAsync(ProjectEventEntityId: number) : Promise<void>;
|
|
36
|
+
createDefaultProjectMemberAsync(): Promise< carriers.ProjectMember >;
|
|
37
|
+
saveProjectMemberAsync(entity: carriers.ProjectMember) : Promise< carriers.ProjectMember >;
|
|
38
|
+
deleteProjectMemberAsync(ProjectMemberId: number) : Promise<void>;
|
|
39
|
+
getProjectAsync(projectId: number) : Promise< carriers.Project >;
|
|
40
|
+
getProjectEntityAsync(projectEntityId: number) : Promise< carriers.ProjectEntity >;
|
|
41
|
+
addProjectMembersAsync(request: carriers.Project_AddProjectMembersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
42
|
+
addProjectMembersAsync(projectEntityId: number, projectMembers: carriers.ProjectMember[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
43
|
+
deleteProjectMembersAsync(request: carriers.Project_DeleteProjectMembersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
44
|
+
deleteProjectMembersAsync(projectEntityId: number, memberIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
45
|
+
getProjectImageAsync(request: carriers.Project_GetProjectImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
|
|
46
|
+
getProjectImageAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
|
|
47
|
+
setProjectImageAsync(request: carriers.Project_SetProjectImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
48
|
+
setProjectImageAsync(projectId: number, image: ArrayBuffer|string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
49
|
+
deleteProjectMemberByIdsAsync(request: carriers.Project_DeleteProjectMemberByIdsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
50
|
+
deleteProjectMemberByIdsAsync(projectMemberIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
51
|
+
getDuplicatesAsync(request: carriers.Project_GetDuplicatesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DuplicateEntry[] >;
|
|
52
|
+
getDuplicatesAsync(name: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DuplicateEntry[] >;
|
|
53
|
+
createNewEntryAsync(request: carriers.Project_CreateNewEntryRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
54
|
+
createNewEntryAsync(duplicate: carriers.DuplicateEntry, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
55
|
+
setDuplicateRulesStatusAsync(request: carriers.Project_SetDuplicateRulesStatusRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
56
|
+
setDuplicateRulesStatusAsync(rules: carriers.DuplicateRule[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
57
|
+
getDuplicateRulesAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DuplicateRule[] >;
|
|
58
|
+
mergeAsync(request: carriers.Project_MergeRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
59
|
+
mergeAsync(sourceProjectId: number, destinationProjectId: number, replaceEmptyFieldsOnDestination: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
60
|
+
isNumberValidAsync(request: carriers.Project_IsNumberValidRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
61
|
+
isNumberValidAsync(contactId: number, number: string, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
62
|
+
hasGuideAsync(request: carriers.Project_HasGuideRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
63
|
+
hasGuideAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
64
|
+
getNextMilestoneAsync(request: carriers.Project_GetNextMilestoneRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Appointment >;
|
|
65
|
+
getNextMilestoneAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Appointment >;
|
|
66
|
+
offerAutoNextStatusOnApppointmentCompletedAsync(request: carriers.Project_OfferAutoNextStatusOnApppointmentCompletedRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
67
|
+
offerAutoNextStatusOnApppointmentCompletedAsync(appointmentId: number, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
68
|
+
getNextProjectStatusAsync(request: carriers.Project_GetNextProjectStatusRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
69
|
+
getNextProjectStatusAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
70
|
+
hasGuideActivitiesAsync(request: carriers.Project_HasGuideActivitiesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
71
|
+
hasGuideActivitiesAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
72
|
+
validateProjectEntityAsync(request: carriers.Project_ValidateProjectEntityRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary >;
|
|
73
|
+
validateProjectEntityAsync(projectEntity: carriers.ProjectEntity, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary >;
|
|
74
|
+
setCompletedAsync(request: carriers.Project_SetCompletedRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
75
|
+
setCompletedAsync(projectId: number, isCompleted: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
76
|
+
getProjectEventAsync(projectEventId: number) : Promise< carriers.ProjectEvent >;
|
|
77
|
+
getProjectEventOnPersonAsync(request: carriers.Project_GetProjectEventOnPersonRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEvent >;
|
|
78
|
+
getProjectEventOnPersonAsync(projectId: number, personId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEvent >;
|
|
79
|
+
getProjectEventEntityAsync(projectEventEntityId: number) : Promise< carriers.ProjectEventEntity >;
|
|
80
|
+
getProjectEventEntityFromProjectIdAsync(request: carriers.Project_GetProjectEventEntityFromProjectIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEventEntity >;
|
|
81
|
+
getProjectEventEntityFromProjectIdAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEventEntity >;
|
|
82
|
+
deleteProjectEventEntityFromProjectIdAsync(request: carriers.Project_DeleteProjectEventEntityFromProjectIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
83
|
+
deleteProjectEventEntityFromProjectIdAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
84
|
+
getProjectEventListAsync(projectEventIds: number[]) : Promise< carriers.ProjectEvent[] >;
|
|
85
|
+
getMyProjectEventsAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEvent[] >;
|
|
86
|
+
getProjectEventsOnPersonAsync(request: carriers.Project_GetProjectEventsOnPersonRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEvent[] >;
|
|
87
|
+
getProjectEventsOnPersonAsync(personId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEvent[] >;
|
|
88
|
+
getProjectListAsync(projectIds: number[]) : Promise< carriers.Project[] >;
|
|
89
|
+
getMyProjectsAsync(request: carriers.Project_GetMyProjectsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
90
|
+
getMyProjectsAsync(includeMemberProjects: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
91
|
+
getMyMemberProjectsAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
92
|
+
getProjectsFromPersonAsync(request: carriers.Project_GetProjectsFromPersonRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
93
|
+
getProjectsFromPersonAsync(personId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
94
|
+
getProjectsFromContactAsync(request: carriers.Project_GetProjectsFromContactRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
95
|
+
getProjectsFromContactAsync(contactId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
96
|
+
getPublishedProjectAsync(request: carriers.Project_GetPublishedProjectRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project >;
|
|
97
|
+
getPublishedProjectAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project >;
|
|
98
|
+
getPublishedProjectsAsync(request: carriers.Project_GetPublishedProjectsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
99
|
+
getPublishedProjectsAsync(projectIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
100
|
+
getMyPublishedProjectsAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
101
|
+
getPublishedProjectsOnPersonIdAsync(request: carriers.Project_GetPublishedProjectsOnPersonIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
102
|
+
getPublishedProjectsOnPersonIdAsync(personId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
103
|
+
getProjectMemberAsync(projectMemberId: number) : Promise< carriers.ProjectMember >;
|
|
104
|
+
updateProjectMembersAsync(request: carriers.Project_UpdateProjectMembersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
105
|
+
updateProjectMembersAsync(projectId: number, projectMembers: carriers.ProjectMember[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
106
|
+
getProjectMembersAsync(request: carriers.Project_GetProjectMembersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember[] >;
|
|
107
|
+
getProjectMembersAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember[] >;
|
|
108
|
+
updateProjectMemberAsync(request: carriers.Project_UpdateProjectMemberRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember >;
|
|
109
|
+
updateProjectMemberAsync(projectMember: carriers.ProjectMember, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember >;
|
|
110
|
+
getProjectMembersByIdAsync(request: carriers.Project_GetProjectMembersByIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember[] >;
|
|
111
|
+
getProjectMembersByIdAsync(projectMemberIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember[] >;
|
|
112
|
+
saveProjectMembersFunctionAndCommentAsync(request: carriers.Project_SaveProjectMembersFunctionAndCommentRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
113
|
+
saveProjectMembersFunctionAndCommentAsync(projectMemberIds: number[], roleId: number, comment: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
114
|
+
} // interface IProjectAgent
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Collection of all services that works with Project data.
|
|
121
|
+
*/
|
|
122
|
+
export class ProjectAgent extends base.WebApiBase implements IProjectAgent {
|
|
123
|
+
constructor(baseUrl?: string, languageCode?:string, cultureCode?: string);
|
|
124
|
+
constructor(baseUrl?: string, resourceParsing?: base.ResourceParsing);
|
|
125
|
+
constructor(baseUrl: string, resourceManager:any);
|
|
126
|
+
constructor(baseUrl: string, config:AxiosRequestConfig, resourceManager:any);
|
|
127
|
+
constructor(baseUrl: string, config:AxiosRequestConfig, resourceParsing?: base.ResourceParsing);
|
|
128
|
+
constructor(baseUrl: string, config:AxiosRequestConfig, languageCode?:string, cultureCode?: string);
|
|
129
|
+
constructor(options: base.WebApiOptions);
|
|
130
|
+
|
|
131
|
+
constructor(baseUrlOrOptions: string|base.WebApiOptions|undefined,
|
|
132
|
+
langOrconfigOrRM?: string|base.ResourceParsing|AxiosRequestConfig|any,
|
|
133
|
+
langOrResourceOrRM?:string|base.ResourceParsing|any,
|
|
134
|
+
cultureCode?: string,
|
|
135
|
+
) {
|
|
136
|
+
const options = base.WebApiBase.FigureOutOptions(baseUrlOrOptions, langOrconfigOrRM, langOrResourceOrRM, cultureCode);
|
|
137
|
+
options.basePath = "v1/Agents/Project/";
|
|
138
|
+
super(options);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Set default values into a new ProjectEntity.
|
|
145
|
+
* NetServer calculates default values on the entity, which is required when creating/storing a new instance
|
|
146
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
147
|
+
* @returns A blank entity.
|
|
148
|
+
*/
|
|
149
|
+
public async createDefaultProjectEntityAsync(options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEntity > {
|
|
150
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
151
|
+
base.WebApiBase.SetPending(options);
|
|
152
|
+
return new Promise< carriers.ProjectEntity >(async (resolve, reject) => {
|
|
153
|
+
try {
|
|
154
|
+
const response = await this._axios.post("CreateDefaultProjectEntity", null, config);
|
|
155
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
156
|
+
const res : carriers.ProjectEntity = converters.Create_ProjectEntity_From( response.data );
|
|
157
|
+
resolve(res);
|
|
158
|
+
}
|
|
159
|
+
catch( err ) {
|
|
160
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
161
|
+
reject(err);
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Replace the existing ProjectEntity or creates a new ProjectEntity if the id parameter is empty
|
|
167
|
+
* @param entity - The ProjectEntity to be saved.
|
|
168
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
169
|
+
* @returns New or updated ProjectEntity
|
|
170
|
+
*/
|
|
171
|
+
public async saveProjectEntityAsync(entity: carriers.ProjectEntity, options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEntity > {
|
|
172
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
173
|
+
base.WebApiBase.SetPending(options);
|
|
174
|
+
return new Promise< carriers.ProjectEntity >(async (resolve, reject) => {
|
|
175
|
+
try {
|
|
176
|
+
const response = await this._axios.post("SaveProjectEntity", entity, config);
|
|
177
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
178
|
+
const res : carriers.ProjectEntity = converters.Create_ProjectEntity_From( response.data );
|
|
179
|
+
resolve(res);
|
|
180
|
+
}
|
|
181
|
+
catch( err ) {
|
|
182
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
183
|
+
reject(err);
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Deletes the ProjectEntity
|
|
190
|
+
* @param ProjectEntityId - The id of the ProjectEntity to be deleted.
|
|
191
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
192
|
+
*/
|
|
193
|
+
public async deleteProjectEntityAsync(ProjectEntityId: number, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
194
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
195
|
+
base.WebApiBase.SetPending(options);
|
|
196
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
197
|
+
try {
|
|
198
|
+
const response = await this._axios.post("DeleteProjectEntity?ProjectEntityId=" + ProjectEntityId, null, config );
|
|
199
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
200
|
+
const res = response.data;
|
|
201
|
+
resolve(res);
|
|
202
|
+
}
|
|
203
|
+
catch( err ) {
|
|
204
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
205
|
+
reject(err);
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Set default values into a new ProjectEventEntity.
|
|
212
|
+
* NetServer calculates default values on the entity, which is required when creating/storing a new instance
|
|
213
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
214
|
+
* @returns A blank entity.
|
|
215
|
+
*/
|
|
216
|
+
public async createDefaultProjectEventEntityAsync(options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEventEntity > {
|
|
217
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
218
|
+
base.WebApiBase.SetPending(options);
|
|
219
|
+
return new Promise< carriers.ProjectEventEntity >(async (resolve, reject) => {
|
|
220
|
+
try {
|
|
221
|
+
const response = await this._axios.post("CreateDefaultProjectEventEntity", null, config);
|
|
222
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
223
|
+
const res : carriers.ProjectEventEntity = converters.Create_ProjectEventEntity_From( response.data );
|
|
224
|
+
resolve(res);
|
|
225
|
+
}
|
|
226
|
+
catch( err ) {
|
|
227
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
228
|
+
reject(err);
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Replace the existing ProjectEventEntity or creates a new ProjectEventEntity if the id parameter is empty
|
|
234
|
+
* @param entity - The ProjectEventEntity to be saved.
|
|
235
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
236
|
+
* @returns New or updated ProjectEventEntity
|
|
237
|
+
*/
|
|
238
|
+
public async saveProjectEventEntityAsync(entity: carriers.ProjectEventEntity, options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEventEntity > {
|
|
239
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
240
|
+
base.WebApiBase.SetPending(options);
|
|
241
|
+
return new Promise< carriers.ProjectEventEntity >(async (resolve, reject) => {
|
|
242
|
+
try {
|
|
243
|
+
const response = await this._axios.post("SaveProjectEventEntity", entity, config);
|
|
244
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
245
|
+
const res : carriers.ProjectEventEntity = converters.Create_ProjectEventEntity_From( response.data );
|
|
246
|
+
resolve(res);
|
|
247
|
+
}
|
|
248
|
+
catch( err ) {
|
|
249
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
250
|
+
reject(err);
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Deletes the ProjectEventEntity
|
|
257
|
+
* @param ProjectEventEntityId - The id of the ProjectEventEntity to be deleted.
|
|
258
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
259
|
+
*/
|
|
260
|
+
public async deleteProjectEventEntityAsync(ProjectEventEntityId: number, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
261
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
262
|
+
base.WebApiBase.SetPending(options);
|
|
263
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
264
|
+
try {
|
|
265
|
+
const response = await this._axios.post("DeleteProjectEventEntity?ProjectEventEntityId=" + ProjectEventEntityId, null, config );
|
|
266
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
267
|
+
const res = response.data;
|
|
268
|
+
resolve(res);
|
|
269
|
+
}
|
|
270
|
+
catch( err ) {
|
|
271
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
272
|
+
reject(err);
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Set default values into a new ProjectMember.
|
|
279
|
+
* NetServer calculates default values on the entity, which is required when creating/storing a new instance
|
|
280
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
281
|
+
* @returns A blank entity.
|
|
282
|
+
*/
|
|
283
|
+
public async createDefaultProjectMemberAsync(options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember > {
|
|
284
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
285
|
+
base.WebApiBase.SetPending(options);
|
|
286
|
+
return new Promise< carriers.ProjectMember >(async (resolve, reject) => {
|
|
287
|
+
try {
|
|
288
|
+
const response = await this._axios.post("CreateDefaultProjectMember", null, config);
|
|
289
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
290
|
+
const res : carriers.ProjectMember = converters.Create_ProjectMember_From( response.data );
|
|
291
|
+
resolve(res);
|
|
292
|
+
}
|
|
293
|
+
catch( err ) {
|
|
294
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
295
|
+
reject(err);
|
|
296
|
+
}
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Replace the existing ProjectMember or creates a new ProjectMember if the id parameter is empty
|
|
301
|
+
* @param entity - The ProjectMember to be saved.
|
|
302
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
303
|
+
* @returns New or updated ProjectMember
|
|
304
|
+
*/
|
|
305
|
+
public async saveProjectMemberAsync(entity: carriers.ProjectMember, options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember > {
|
|
306
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
307
|
+
base.WebApiBase.SetPending(options);
|
|
308
|
+
return new Promise< carriers.ProjectMember >(async (resolve, reject) => {
|
|
309
|
+
try {
|
|
310
|
+
const response = await this._axios.post("SaveProjectMember", entity, config);
|
|
311
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
312
|
+
const res : carriers.ProjectMember = converters.Create_ProjectMember_From( response.data );
|
|
313
|
+
resolve(res);
|
|
314
|
+
}
|
|
315
|
+
catch( err ) {
|
|
316
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
317
|
+
reject(err);
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* Deletes the ProjectMember
|
|
324
|
+
* @param ProjectMemberId - The id of the ProjectMember to be deleted.
|
|
325
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
326
|
+
*/
|
|
327
|
+
public async deleteProjectMemberAsync(ProjectMemberId: number, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
328
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
329
|
+
base.WebApiBase.SetPending(options);
|
|
330
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
331
|
+
try {
|
|
332
|
+
const response = await this._axios.post("DeleteProjectMember?ProjectMemberId=" + ProjectMemberId, null, config );
|
|
333
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
334
|
+
const res = response.data;
|
|
335
|
+
resolve(res);
|
|
336
|
+
}
|
|
337
|
+
catch( err ) {
|
|
338
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
339
|
+
reject(err);
|
|
340
|
+
}
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* Gets a Project object.
|
|
345
|
+
* @param projectId - The primary key.
|
|
346
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
347
|
+
* @returns A single Project
|
|
348
|
+
*/
|
|
349
|
+
public async getProjectAsync(projectId: number, options?:base.WebApiRequestOptions) : Promise< carriers.Project > {
|
|
350
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
351
|
+
base.WebApiBase.SetPending(options);
|
|
352
|
+
return new Promise< carriers.Project >(async (resolve, reject) => {
|
|
353
|
+
try {
|
|
354
|
+
const response = await this._axios.post("GetProject?projectId=" + projectId, null, config);
|
|
355
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
356
|
+
const res = converters.Create_Project_From( response.data );
|
|
357
|
+
resolve(res);
|
|
358
|
+
}
|
|
359
|
+
catch( err ) {
|
|
360
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
361
|
+
reject(err);
|
|
362
|
+
}
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* Gets a ProjectEntity object.
|
|
368
|
+
* @param projectEntityId - The primary key.
|
|
369
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
370
|
+
* @returns A single ProjectEntity
|
|
371
|
+
*/
|
|
372
|
+
public async getProjectEntityAsync(projectEntityId: number, options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEntity > {
|
|
373
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
374
|
+
base.WebApiBase.SetPending(options);
|
|
375
|
+
return new Promise< carriers.ProjectEntity >(async (resolve, reject) => {
|
|
376
|
+
try {
|
|
377
|
+
const response = await this._axios.post("GetProjectEntity?projectEntityId=" + projectEntityId, null, config);
|
|
378
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
379
|
+
const res = converters.Create_ProjectEntity_From( response.data );
|
|
380
|
+
resolve(res);
|
|
381
|
+
}
|
|
382
|
+
catch( err ) {
|
|
383
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
384
|
+
reject(err);
|
|
385
|
+
}
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
private async _addProjectMembersAsync(request: carriers.Project_AddProjectMembersRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
391
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
392
|
+
base.WebApiBase.SetPending(options);
|
|
393
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
394
|
+
try {
|
|
395
|
+
config.baseURL = this._options.baseUrl;
|
|
396
|
+
const response = await this._axios.post("AddProjectMembers", request , config);
|
|
397
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
398
|
+
const res = response.data;
|
|
399
|
+
resolve(res);
|
|
400
|
+
}
|
|
401
|
+
catch( err ) {
|
|
402
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
403
|
+
reject(err);
|
|
404
|
+
}
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* Add multiple project members to a project
|
|
412
|
+
* @param request - ProjectEntityId, ProjectMembers
|
|
413
|
+
* @returns
|
|
414
|
+
*/
|
|
415
|
+
public async addProjectMembersAsync(request: carriers.Project_AddProjectMembersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* Add multiple project members to a project
|
|
419
|
+
* @param projectEntityId - Project to add members to
|
|
420
|
+
* @param projectMembers - Project members to add
|
|
421
|
+
* @returns
|
|
422
|
+
*/
|
|
423
|
+
public async addProjectMembersAsync(projectEntityId: number, projectMembers: carriers.ProjectMember[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
424
|
+
|
|
425
|
+
public async addProjectMembersAsync(projectEntityId:number|carriers.Project_AddProjectMembersRequest, projectMembers?:carriers.ProjectMember[]|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
426
|
+
let _request : carriers.Project_AddProjectMembersRequest = null;
|
|
427
|
+
let _options : base.WebApiRequestOptions = null;
|
|
428
|
+
const first : any = projectEntityId;
|
|
429
|
+
if( typeof( first ) === "object" && first && ( typeof(first.projectEntityId)!='undefined' || typeof(first.projectMembers)!='undefined' ) )
|
|
430
|
+
{
|
|
431
|
+
_request = projectEntityId as carriers.Project_AddProjectMembersRequest;
|
|
432
|
+
_options = projectMembers as base.WebApiRequestOptions;
|
|
433
|
+
}
|
|
434
|
+
else
|
|
435
|
+
{
|
|
436
|
+
_request = {
|
|
437
|
+
projectEntityId: projectEntityId as number,
|
|
438
|
+
projectMembers: projectMembers as carriers.ProjectMember[],
|
|
439
|
+
};
|
|
440
|
+
_options = webapi_options;
|
|
441
|
+
}
|
|
442
|
+
return this._addProjectMembersAsync( _request, _options );
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
private async _deleteProjectMembersAsync(request: carriers.Project_DeleteProjectMembersRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
447
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
448
|
+
base.WebApiBase.SetPending(options);
|
|
449
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
450
|
+
try {
|
|
451
|
+
config.baseURL = this._options.baseUrl;
|
|
452
|
+
const response = await this._axios.post("DeleteProjectMembers", request , config);
|
|
453
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
454
|
+
const res = response.data;
|
|
455
|
+
resolve(res);
|
|
456
|
+
}
|
|
457
|
+
catch( err ) {
|
|
458
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
459
|
+
reject(err);
|
|
460
|
+
}
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* Delete the given project members from a project
|
|
468
|
+
* @param request - ProjectEntityId, MemberIds
|
|
469
|
+
* @returns
|
|
470
|
+
*/
|
|
471
|
+
public async deleteProjectMembersAsync(request: carriers.Project_DeleteProjectMembersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* Delete the given project members from a project
|
|
475
|
+
* @param projectEntityId - Project to remove members from
|
|
476
|
+
* @param memberIds - Project member ids
|
|
477
|
+
* @returns
|
|
478
|
+
*/
|
|
479
|
+
public async deleteProjectMembersAsync(projectEntityId: number, memberIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
480
|
+
|
|
481
|
+
public async deleteProjectMembersAsync(projectEntityId:number|carriers.Project_DeleteProjectMembersRequest, memberIds?:number[]|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
482
|
+
let _request : carriers.Project_DeleteProjectMembersRequest = null;
|
|
483
|
+
let _options : base.WebApiRequestOptions = null;
|
|
484
|
+
const first : any = projectEntityId;
|
|
485
|
+
if( typeof( first ) === "object" && first && ( typeof(first.projectEntityId)!='undefined' || typeof(first.memberIds)!='undefined' ) )
|
|
486
|
+
{
|
|
487
|
+
_request = projectEntityId as carriers.Project_DeleteProjectMembersRequest;
|
|
488
|
+
_options = memberIds as base.WebApiRequestOptions;
|
|
489
|
+
}
|
|
490
|
+
else
|
|
491
|
+
{
|
|
492
|
+
_request = {
|
|
493
|
+
projectEntityId: projectEntityId as number,
|
|
494
|
+
memberIds: memberIds as number[],
|
|
495
|
+
};
|
|
496
|
+
_options = webapi_options;
|
|
497
|
+
}
|
|
498
|
+
return this._deleteProjectMembersAsync( _request, _options );
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
private async _getProjectImageAsync(request: carriers.Project_GetProjectImageRequest, options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string > {
|
|
503
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options) || {};
|
|
504
|
+
base.WebApiBase.SetPending(options);
|
|
505
|
+
return new Promise< ArrayBuffer|string >(async (resolve, reject) => {
|
|
506
|
+
try {
|
|
507
|
+
if( ! options || options.returnBlobAs == base.ReturnBlobType.AsArrayBuffer ) {
|
|
508
|
+
config.responseType = "arraybuffer";
|
|
509
|
+
config.headers = config.headers || {};
|
|
510
|
+
config.headers["Accept"] = "application/octet-stream";
|
|
511
|
+
}
|
|
512
|
+
config.baseURL = this._options.baseUrl;
|
|
513
|
+
const response = await this._axios.post("GetProjectImage", request , config);
|
|
514
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
515
|
+
let res : ArrayBuffer | string = null;
|
|
516
|
+
if( options && options.returnBlobAs != base.ReturnBlobType.AsArrayBuffer )
|
|
517
|
+
{
|
|
518
|
+
res = response.data as string;
|
|
519
|
+
if( options.returnBlobAs == base.ReturnBlobType.AsString )
|
|
520
|
+
{
|
|
521
|
+
res = FromBase64ToString(res);
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
else
|
|
525
|
+
{
|
|
526
|
+
res = response.data as ArrayBuffer;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
resolve(res);
|
|
530
|
+
}
|
|
531
|
+
catch( err ) {
|
|
532
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
533
|
+
reject(err);
|
|
534
|
+
}
|
|
535
|
+
});
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
|
|
540
|
+
/**
|
|
541
|
+
* Returns the project image that is displayed in the CRM application.
|
|
542
|
+
* @param request - ProjectId
|
|
543
|
+
* @returns The image as a System.Drawing.Image. (If the the image is returned over webservices, the stream is returned as a Base64 encoded string.)
|
|
544
|
+
*/
|
|
545
|
+
public async getProjectImageAsync(request: carriers.Project_GetProjectImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* Returns the project image that is displayed in the CRM application.
|
|
549
|
+
* @param projectId - The project id of the project the image belongs to.
|
|
550
|
+
* @returns The image as a System.Drawing.Image. (If the the image is returned over webservices, the stream is returned as a Base64 encoded string.)
|
|
551
|
+
*/
|
|
552
|
+
public async getProjectImageAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string >;
|
|
553
|
+
|
|
554
|
+
public async getProjectImageAsync(projectId:number|carriers.Project_GetProjectImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< ArrayBuffer|string > {
|
|
555
|
+
let _request : carriers.Project_GetProjectImageRequest = null;
|
|
556
|
+
let _options : base.WebApiRequestOptions = null;
|
|
557
|
+
const first : any = projectId;
|
|
558
|
+
if( typeof( first ) === "object" && first && ( typeof(first.projectId)!='undefined' ) )
|
|
559
|
+
{
|
|
560
|
+
_request = projectId as carriers.Project_GetProjectImageRequest;
|
|
561
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
562
|
+
}
|
|
563
|
+
else
|
|
564
|
+
{
|
|
565
|
+
_request = {
|
|
566
|
+
projectId: projectId as number,
|
|
567
|
+
};
|
|
568
|
+
_options = webapi_options;
|
|
569
|
+
}
|
|
570
|
+
return this._getProjectImageAsync( _request, _options );
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
|
|
574
|
+
private async _setProjectImageAsync(request: carriers.Project_SetProjectImageRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
575
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
576
|
+
base.WebApiBase.SetPending(options);
|
|
577
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
578
|
+
try {
|
|
579
|
+
config.baseURL = this._options.baseUrl;
|
|
580
|
+
const response = await this._axios.post("SetProjectImage", request , config);
|
|
581
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
582
|
+
const res = response.data;
|
|
583
|
+
resolve(res);
|
|
584
|
+
}
|
|
585
|
+
catch( err ) {
|
|
586
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
587
|
+
reject(err);
|
|
588
|
+
}
|
|
589
|
+
});
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
/**
|
|
595
|
+
* Stores the project image that is displayed in the CRM application.
|
|
596
|
+
* @param request - ProjectId, Image
|
|
597
|
+
* @returns
|
|
598
|
+
*/
|
|
599
|
+
public async setProjectImageAsync(request: carriers.Project_SetProjectImageRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* Stores the project image that is displayed in the CRM application.
|
|
603
|
+
* @param projectId - The project id of the project the image belongs to.
|
|
604
|
+
* @param image - The image that is stored on the project (System.Drawing.Image)
|
|
605
|
+
* @returns
|
|
606
|
+
*/
|
|
607
|
+
public async setProjectImageAsync(projectId: number, image: ArrayBuffer|string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
608
|
+
|
|
609
|
+
public async setProjectImageAsync(projectId:number|carriers.Project_SetProjectImageRequest, image?:ArrayBuffer|string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
610
|
+
let _request : carriers.Project_SetProjectImageRequest = null;
|
|
611
|
+
let _options : base.WebApiRequestOptions = null;
|
|
612
|
+
const first : any = projectId;
|
|
613
|
+
if( typeof( first ) === "object" && first && ( typeof(first.projectId)!='undefined' || typeof(first.image)!='undefined' ) )
|
|
614
|
+
{
|
|
615
|
+
_request = projectId as carriers.Project_SetProjectImageRequest;
|
|
616
|
+
_options = image as base.WebApiRequestOptions;
|
|
617
|
+
}
|
|
618
|
+
else
|
|
619
|
+
{
|
|
620
|
+
_request = {
|
|
621
|
+
projectId: projectId as number,
|
|
622
|
+
image: image as ArrayBuffer|string,
|
|
623
|
+
};
|
|
624
|
+
_options = webapi_options;
|
|
625
|
+
}
|
|
626
|
+
_request.image = ToBase64(_request.image);
|
|
627
|
+
return this._setProjectImageAsync( _request, _options );
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
|
|
631
|
+
private async _deleteProjectMemberByIdsAsync(request: carriers.Project_DeleteProjectMemberByIdsRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
632
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
633
|
+
base.WebApiBase.SetPending(options);
|
|
634
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
635
|
+
try {
|
|
636
|
+
config.baseURL = this._options.baseUrl;
|
|
637
|
+
const response = await this._axios.post("DeleteProjectMemberByIds", request , config);
|
|
638
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
639
|
+
const res = response.data;
|
|
640
|
+
resolve(res);
|
|
641
|
+
}
|
|
642
|
+
catch( err ) {
|
|
643
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
644
|
+
reject(err);
|
|
645
|
+
}
|
|
646
|
+
});
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
|
|
650
|
+
|
|
651
|
+
/**
|
|
652
|
+
* Deletes projectmembers rows.
|
|
653
|
+
* @param request - ProjectMemberIds
|
|
654
|
+
* @returns
|
|
655
|
+
*/
|
|
656
|
+
public async deleteProjectMemberByIdsAsync(request: carriers.Project_DeleteProjectMemberByIdsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
657
|
+
|
|
658
|
+
/**
|
|
659
|
+
* Deletes projectmembers rows.
|
|
660
|
+
* @param projectMemberIds - An Array of projectmember ids.
|
|
661
|
+
* @returns
|
|
662
|
+
*/
|
|
663
|
+
public async deleteProjectMemberByIdsAsync(projectMemberIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
664
|
+
|
|
665
|
+
public async deleteProjectMemberByIdsAsync(projectMemberIds:number[]|carriers.Project_DeleteProjectMemberByIdsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
666
|
+
let _request : carriers.Project_DeleteProjectMemberByIdsRequest = null;
|
|
667
|
+
let _options : base.WebApiRequestOptions = null;
|
|
668
|
+
const first : any = projectMemberIds;
|
|
669
|
+
if( typeof( first ) === "object" && first && ( typeof(first.projectMemberIds)!='undefined' ) )
|
|
670
|
+
{
|
|
671
|
+
_request = projectMemberIds as carriers.Project_DeleteProjectMemberByIdsRequest;
|
|
672
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
673
|
+
}
|
|
674
|
+
else
|
|
675
|
+
{
|
|
676
|
+
_request = {
|
|
677
|
+
projectMemberIds: projectMemberIds as number[],
|
|
678
|
+
};
|
|
679
|
+
_options = webapi_options;
|
|
680
|
+
}
|
|
681
|
+
return this._deleteProjectMemberByIdsAsync( _request, _options );
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
|
|
685
|
+
private async _getDuplicatesAsync(request: carriers.Project_GetDuplicatesRequest, options?:base.WebApiRequestOptions) : Promise< carriers.DuplicateEntry[] > {
|
|
686
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
687
|
+
base.WebApiBase.SetPending(options);
|
|
688
|
+
return new Promise< carriers.DuplicateEntry[] >(async (resolve, reject) => {
|
|
689
|
+
try {
|
|
690
|
+
config.baseURL = this._options.baseUrl;
|
|
691
|
+
const response = await this._axios.post("GetDuplicates", request , config);
|
|
692
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
693
|
+
const res : carriers.DuplicateEntry[] = converters.Create_DuplicateEntryArray_From( response.data );
|
|
694
|
+
resolve(res);
|
|
695
|
+
}
|
|
696
|
+
catch( err ) {
|
|
697
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
698
|
+
reject(err);
|
|
699
|
+
}
|
|
700
|
+
});
|
|
701
|
+
}
|
|
702
|
+
|
|
703
|
+
|
|
704
|
+
|
|
705
|
+
/**
|
|
706
|
+
* Get duplicates(exact or similar in the database) based on the name
|
|
707
|
+
* @param request - Name
|
|
708
|
+
* @returns Any records matching the specified name
|
|
709
|
+
*/
|
|
710
|
+
public async getDuplicatesAsync(request: carriers.Project_GetDuplicatesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DuplicateEntry[] >;
|
|
711
|
+
|
|
712
|
+
/**
|
|
713
|
+
* Get duplicates(exact or similar in the database) based on the name
|
|
714
|
+
* @param name - Name used for lookup
|
|
715
|
+
* @returns Any records matching the specified name
|
|
716
|
+
*/
|
|
717
|
+
public async getDuplicatesAsync(name: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DuplicateEntry[] >;
|
|
718
|
+
|
|
719
|
+
public async getDuplicatesAsync(name:string|carriers.Project_GetDuplicatesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DuplicateEntry[] > {
|
|
720
|
+
let _request : carriers.Project_GetDuplicatesRequest = null;
|
|
721
|
+
let _options : base.WebApiRequestOptions = null;
|
|
722
|
+
const first : any = name;
|
|
723
|
+
if( typeof( first ) === "object" && first && ( typeof(first.name)!='undefined' ) )
|
|
724
|
+
{
|
|
725
|
+
_request = name as carriers.Project_GetDuplicatesRequest;
|
|
726
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
727
|
+
}
|
|
728
|
+
else
|
|
729
|
+
{
|
|
730
|
+
_request = {
|
|
731
|
+
name: name as string,
|
|
732
|
+
};
|
|
733
|
+
_options = webapi_options;
|
|
734
|
+
}
|
|
735
|
+
return this._getDuplicatesAsync( _request, _options );
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
|
|
739
|
+
private async _createNewEntryAsync(request: carriers.Project_CreateNewEntryRequest, options?:base.WebApiRequestOptions) : Promise< number > {
|
|
740
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
741
|
+
base.WebApiBase.SetPending(options);
|
|
742
|
+
return new Promise< number >(async (resolve, reject) => {
|
|
743
|
+
try {
|
|
744
|
+
config.baseURL = this._options.baseUrl;
|
|
745
|
+
const response = await this._axios.post("CreateNewEntry", request , config);
|
|
746
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
747
|
+
const res : number = response.data as number;
|
|
748
|
+
resolve(res);
|
|
749
|
+
}
|
|
750
|
+
catch( err ) {
|
|
751
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
752
|
+
reject(err);
|
|
753
|
+
}
|
|
754
|
+
});
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
|
|
758
|
+
|
|
759
|
+
/**
|
|
760
|
+
* Creates a new project based on external duplicate
|
|
761
|
+
* @param request - Duplicate
|
|
762
|
+
* @returns The database identity of the newly created entry
|
|
763
|
+
*/
|
|
764
|
+
public async createNewEntryAsync(request: carriers.Project_CreateNewEntryRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
765
|
+
|
|
766
|
+
/**
|
|
767
|
+
* Creates a new project based on external duplicate
|
|
768
|
+
* @param duplicate - The duplicate to create a new entry based upon
|
|
769
|
+
* @returns The database identity of the newly created entry
|
|
770
|
+
*/
|
|
771
|
+
public async createNewEntryAsync(duplicate: carriers.DuplicateEntry, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
772
|
+
|
|
773
|
+
public async createNewEntryAsync(duplicate:carriers.DuplicateEntry|carriers.Project_CreateNewEntryRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number > {
|
|
774
|
+
let _request : carriers.Project_CreateNewEntryRequest = null;
|
|
775
|
+
let _options : base.WebApiRequestOptions = null;
|
|
776
|
+
const first : any = duplicate;
|
|
777
|
+
if( typeof( first ) === "object" && first && ( typeof(first.duplicate)!='undefined' ) )
|
|
778
|
+
{
|
|
779
|
+
_request = duplicate as carriers.Project_CreateNewEntryRequest;
|
|
780
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
781
|
+
}
|
|
782
|
+
else
|
|
783
|
+
{
|
|
784
|
+
_request = {
|
|
785
|
+
duplicate: duplicate as carriers.DuplicateEntry,
|
|
786
|
+
};
|
|
787
|
+
_options = webapi_options;
|
|
788
|
+
}
|
|
789
|
+
return this._createNewEntryAsync( _request, _options );
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
|
|
793
|
+
private async _setDuplicateRulesStatusAsync(request: carriers.Project_SetDuplicateRulesStatusRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
794
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
795
|
+
base.WebApiBase.SetPending(options);
|
|
796
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
797
|
+
try {
|
|
798
|
+
config.baseURL = this._options.baseUrl;
|
|
799
|
+
const response = await this._axios.post("SetDuplicateRulesStatus", request , config);
|
|
800
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
801
|
+
const res = response.data;
|
|
802
|
+
resolve(res);
|
|
803
|
+
}
|
|
804
|
+
catch( err ) {
|
|
805
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
806
|
+
reject(err);
|
|
807
|
+
}
|
|
808
|
+
});
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
|
|
812
|
+
|
|
813
|
+
/**
|
|
814
|
+
* Set which duplicate rules should be active or not
|
|
815
|
+
* @param request - Rules
|
|
816
|
+
* @returns
|
|
817
|
+
*/
|
|
818
|
+
public async setDuplicateRulesStatusAsync(request: carriers.Project_SetDuplicateRulesStatusRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
819
|
+
|
|
820
|
+
/**
|
|
821
|
+
* Set which duplicate rules should be active or not
|
|
822
|
+
* @param rules - Duplicate rules to update active status for
|
|
823
|
+
* @returns
|
|
824
|
+
*/
|
|
825
|
+
public async setDuplicateRulesStatusAsync(rules: carriers.DuplicateRule[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
826
|
+
|
|
827
|
+
public async setDuplicateRulesStatusAsync(rules:carriers.DuplicateRule[]|carriers.Project_SetDuplicateRulesStatusRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
828
|
+
let _request : carriers.Project_SetDuplicateRulesStatusRequest = null;
|
|
829
|
+
let _options : base.WebApiRequestOptions = null;
|
|
830
|
+
const first : any = rules;
|
|
831
|
+
if( typeof( first ) === "object" && first && ( typeof(first.rules)!='undefined' ) )
|
|
832
|
+
{
|
|
833
|
+
_request = rules as carriers.Project_SetDuplicateRulesStatusRequest;
|
|
834
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
835
|
+
}
|
|
836
|
+
else
|
|
837
|
+
{
|
|
838
|
+
_request = {
|
|
839
|
+
rules: rules as carriers.DuplicateRule[],
|
|
840
|
+
};
|
|
841
|
+
_options = webapi_options;
|
|
842
|
+
}
|
|
843
|
+
return this._setDuplicateRulesStatusAsync( _request, _options );
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
|
|
847
|
+
private async _getDuplicateRulesAsync( options?:base.WebApiRequestOptions) : Promise< carriers.DuplicateRule[] > {
|
|
848
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
849
|
+
base.WebApiBase.SetPending(options);
|
|
850
|
+
return new Promise< carriers.DuplicateRule[] >(async (resolve, reject) => {
|
|
851
|
+
try {
|
|
852
|
+
config.baseURL = this._options.baseUrl;
|
|
853
|
+
const response = await this._axios.post("GetDuplicateRules", undefined , config);
|
|
854
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
855
|
+
const res : carriers.DuplicateRule[] = converters.Create_DuplicateRuleArray_From( response.data );
|
|
856
|
+
resolve(res);
|
|
857
|
+
}
|
|
858
|
+
catch( err ) {
|
|
859
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
860
|
+
reject(err);
|
|
861
|
+
}
|
|
862
|
+
});
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
|
|
866
|
+
/**
|
|
867
|
+
* Retrieve all available duplicate rules for project
|
|
868
|
+
* @returns All available duplicate rules
|
|
869
|
+
*/
|
|
870
|
+
public async getDuplicateRulesAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.DuplicateRule[] >
|
|
871
|
+
{
|
|
872
|
+
return this._getDuplicateRulesAsync(webapi_options);
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
|
|
876
|
+
private async _mergeAsync(request: carriers.Project_MergeRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
877
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
878
|
+
base.WebApiBase.SetPending(options);
|
|
879
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
880
|
+
try {
|
|
881
|
+
config.baseURL = this._options.baseUrl;
|
|
882
|
+
const response = await this._axios.post("Merge", request , config);
|
|
883
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
884
|
+
const res = response.data;
|
|
885
|
+
resolve(res);
|
|
886
|
+
}
|
|
887
|
+
catch( err ) {
|
|
888
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
889
|
+
reject(err);
|
|
890
|
+
}
|
|
891
|
+
});
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
|
|
895
|
+
|
|
896
|
+
/**
|
|
897
|
+
* Merge two projects into one, removing the source project in the process
|
|
898
|
+
* @param request - SourceProjectId, DestinationProjectId, ReplaceEmptyFieldsOnDestination
|
|
899
|
+
* @returns
|
|
900
|
+
*/
|
|
901
|
+
public async mergeAsync(request: carriers.Project_MergeRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
902
|
+
|
|
903
|
+
/**
|
|
904
|
+
* Merge two projects into one, removing the source project in the process
|
|
905
|
+
* @param sourceProjectId - Id of source project for merge. This project is removed after the merge is completed.
|
|
906
|
+
* @param destinationProjectId - Id of destination project to merge to. This project is updated with info from the source.
|
|
907
|
+
* @param replaceEmptyFieldsOnDestination - Fill in empty fields on destination from source?
|
|
908
|
+
* @returns
|
|
909
|
+
*/
|
|
910
|
+
public async mergeAsync(sourceProjectId: number, destinationProjectId: number, replaceEmptyFieldsOnDestination: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
911
|
+
|
|
912
|
+
public async mergeAsync(sourceProjectId:number|carriers.Project_MergeRequest, destinationProjectId?:number|base.WebApiRequestOptions, replaceEmptyFieldsOnDestination?:boolean, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
913
|
+
let _request : carriers.Project_MergeRequest = null;
|
|
914
|
+
let _options : base.WebApiRequestOptions = null;
|
|
915
|
+
const first : any = sourceProjectId;
|
|
916
|
+
if( typeof( first ) === "object" && first && ( typeof(first.sourceProjectId)!='undefined' || typeof(first.destinationProjectId)!='undefined' || typeof(first.replaceEmptyFieldsOnDestination)!='undefined' ) )
|
|
917
|
+
{
|
|
918
|
+
_request = sourceProjectId as carriers.Project_MergeRequest;
|
|
919
|
+
_options = destinationProjectId as base.WebApiRequestOptions;
|
|
920
|
+
}
|
|
921
|
+
else
|
|
922
|
+
{
|
|
923
|
+
_request = {
|
|
924
|
+
sourceProjectId: sourceProjectId as number,
|
|
925
|
+
destinationProjectId: destinationProjectId as number,
|
|
926
|
+
replaceEmptyFieldsOnDestination: replaceEmptyFieldsOnDestination as boolean,
|
|
927
|
+
};
|
|
928
|
+
_options = webapi_options;
|
|
929
|
+
}
|
|
930
|
+
return this._mergeAsync( _request, _options );
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
|
|
934
|
+
private async _isNumberValidAsync(request: carriers.Project_IsNumberValidRequest, options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
935
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
936
|
+
base.WebApiBase.SetPending(options);
|
|
937
|
+
return new Promise< boolean >(async (resolve, reject) => {
|
|
938
|
+
try {
|
|
939
|
+
config.baseURL = this._options.baseUrl;
|
|
940
|
+
const response = await this._axios.post("IsNumberValid", request , config);
|
|
941
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
942
|
+
const res : boolean = response.data as boolean;
|
|
943
|
+
resolve(res);
|
|
944
|
+
}
|
|
945
|
+
catch( err ) {
|
|
946
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
947
|
+
reject(err);
|
|
948
|
+
}
|
|
949
|
+
});
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
|
|
953
|
+
|
|
954
|
+
/**
|
|
955
|
+
* Checks if the number is unique or required. The setting is configured from admin under system options.
|
|
956
|
+
* @param request - ContactId, Number
|
|
957
|
+
* @returns True if the number is valid
|
|
958
|
+
*/
|
|
959
|
+
public async isNumberValidAsync(request: carriers.Project_IsNumberValidRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
960
|
+
|
|
961
|
+
/**
|
|
962
|
+
* Checks if the number is unique or required. The setting is configured from admin under system options.
|
|
963
|
+
* @param contactId - The Project id
|
|
964
|
+
* @param number - The number to check for uniqueness and validity
|
|
965
|
+
* @returns True if the number is valid
|
|
966
|
+
*/
|
|
967
|
+
public async isNumberValidAsync(contactId: number, number: string, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
968
|
+
|
|
969
|
+
public async isNumberValidAsync(contactId:number|carriers.Project_IsNumberValidRequest, number?:string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
970
|
+
let _request : carriers.Project_IsNumberValidRequest = null;
|
|
971
|
+
let _options : base.WebApiRequestOptions = null;
|
|
972
|
+
const first : any = contactId;
|
|
973
|
+
if( typeof( first ) === "object" && first && ( typeof(first.contactId)!='undefined' || typeof(first.number)!='undefined' ) )
|
|
974
|
+
{
|
|
975
|
+
_request = contactId as carriers.Project_IsNumberValidRequest;
|
|
976
|
+
_options = number as base.WebApiRequestOptions;
|
|
977
|
+
}
|
|
978
|
+
else
|
|
979
|
+
{
|
|
980
|
+
_request = {
|
|
981
|
+
contactId: contactId as number,
|
|
982
|
+
number: number as string,
|
|
983
|
+
};
|
|
984
|
+
_options = webapi_options;
|
|
985
|
+
}
|
|
986
|
+
return this._isNumberValidAsync( _request, _options );
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
|
|
990
|
+
private async _hasGuideAsync(request: carriers.Project_HasGuideRequest, options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
991
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
992
|
+
base.WebApiBase.SetPending(options);
|
|
993
|
+
return new Promise< boolean >(async (resolve, reject) => {
|
|
994
|
+
try {
|
|
995
|
+
config.baseURL = this._options.baseUrl;
|
|
996
|
+
const response = await this._axios.post("HasGuide", request , config);
|
|
997
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
998
|
+
const res : boolean = response.data as boolean;
|
|
999
|
+
resolve(res);
|
|
1000
|
+
}
|
|
1001
|
+
catch( err ) {
|
|
1002
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1003
|
+
reject(err);
|
|
1004
|
+
}
|
|
1005
|
+
});
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
|
|
1009
|
+
|
|
1010
|
+
/**
|
|
1011
|
+
* Does this project have a guide associated with its project type?
|
|
1012
|
+
* @param request - ProjectId
|
|
1013
|
+
* @returns True if the project has a guide
|
|
1014
|
+
*/
|
|
1015
|
+
public async hasGuideAsync(request: carriers.Project_HasGuideRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
1016
|
+
|
|
1017
|
+
/**
|
|
1018
|
+
* Does this project have a guide associated with its project type?
|
|
1019
|
+
* @param projectId - Project id
|
|
1020
|
+
* @returns True if the project has a guide
|
|
1021
|
+
*/
|
|
1022
|
+
public async hasGuideAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
1023
|
+
|
|
1024
|
+
public async hasGuideAsync(projectId:number|carriers.Project_HasGuideRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
1025
|
+
let _request : carriers.Project_HasGuideRequest = null;
|
|
1026
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1027
|
+
const first : any = projectId;
|
|
1028
|
+
if( typeof( first ) === "object" && first && ( typeof(first.projectId)!='undefined' ) )
|
|
1029
|
+
{
|
|
1030
|
+
_request = projectId as carriers.Project_HasGuideRequest;
|
|
1031
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1032
|
+
}
|
|
1033
|
+
else
|
|
1034
|
+
{
|
|
1035
|
+
_request = {
|
|
1036
|
+
projectId: projectId as number,
|
|
1037
|
+
};
|
|
1038
|
+
_options = webapi_options;
|
|
1039
|
+
}
|
|
1040
|
+
return this._hasGuideAsync( _request, _options );
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
|
|
1044
|
+
private async _getNextMilestoneAsync(request: carriers.Project_GetNextMilestoneRequest, options?:base.WebApiRequestOptions) : Promise< carriers.Appointment > {
|
|
1045
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1046
|
+
base.WebApiBase.SetPending(options);
|
|
1047
|
+
return new Promise< carriers.Appointment >(async (resolve, reject) => {
|
|
1048
|
+
try {
|
|
1049
|
+
config.baseURL = this._options.baseUrl;
|
|
1050
|
+
const response = await this._axios.post("GetNextMilestone", request , config);
|
|
1051
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1052
|
+
const res : carriers.Appointment = converters.Create_Appointment_From( response.data );
|
|
1053
|
+
resolve(res);
|
|
1054
|
+
}
|
|
1055
|
+
catch( err ) {
|
|
1056
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1057
|
+
reject(err);
|
|
1058
|
+
}
|
|
1059
|
+
});
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
|
|
1063
|
+
|
|
1064
|
+
/**
|
|
1065
|
+
* Next upcoming milestone appointment
|
|
1066
|
+
* @param request - ProjectId
|
|
1067
|
+
* @returns Upcoming milestone appointment
|
|
1068
|
+
*/
|
|
1069
|
+
public async getNextMilestoneAsync(request: carriers.Project_GetNextMilestoneRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Appointment >;
|
|
1070
|
+
|
|
1071
|
+
/**
|
|
1072
|
+
* Next upcoming milestone appointment
|
|
1073
|
+
* @param projectId - Project id - primary key
|
|
1074
|
+
* @returns Upcoming milestone appointment
|
|
1075
|
+
*/
|
|
1076
|
+
public async getNextMilestoneAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Appointment >;
|
|
1077
|
+
|
|
1078
|
+
public async getNextMilestoneAsync(projectId:number|carriers.Project_GetNextMilestoneRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Appointment > {
|
|
1079
|
+
let _request : carriers.Project_GetNextMilestoneRequest = null;
|
|
1080
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1081
|
+
const first : any = projectId;
|
|
1082
|
+
if( typeof( first ) === "object" && first && ( typeof(first.projectId)!='undefined' ) )
|
|
1083
|
+
{
|
|
1084
|
+
_request = projectId as carriers.Project_GetNextMilestoneRequest;
|
|
1085
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1086
|
+
}
|
|
1087
|
+
else
|
|
1088
|
+
{
|
|
1089
|
+
_request = {
|
|
1090
|
+
projectId: projectId as number,
|
|
1091
|
+
};
|
|
1092
|
+
_options = webapi_options;
|
|
1093
|
+
}
|
|
1094
|
+
return this._getNextMilestoneAsync( _request, _options );
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
|
|
1098
|
+
private async _offerAutoNextStatusOnApppointmentCompletedAsync(request: carriers.Project_OfferAutoNextStatusOnApppointmentCompletedRequest, options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
1099
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1100
|
+
base.WebApiBase.SetPending(options);
|
|
1101
|
+
return new Promise< boolean >(async (resolve, reject) => {
|
|
1102
|
+
try {
|
|
1103
|
+
config.baseURL = this._options.baseUrl;
|
|
1104
|
+
const response = await this._axios.post("OfferAutoNextStatusOnApppointmentCompleted", request , config);
|
|
1105
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1106
|
+
const res : boolean = response.data as boolean;
|
|
1107
|
+
resolve(res);
|
|
1108
|
+
}
|
|
1109
|
+
catch( err ) {
|
|
1110
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1111
|
+
reject(err);
|
|
1112
|
+
}
|
|
1113
|
+
});
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
|
|
1117
|
+
|
|
1118
|
+
/**
|
|
1119
|
+
*
|
|
1120
|
+
* @param request - AppointmentId
|
|
1121
|
+
* @returns
|
|
1122
|
+
*/
|
|
1123
|
+
public async offerAutoNextStatusOnApppointmentCompletedAsync(request: carriers.Project_OfferAutoNextStatusOnApppointmentCompletedRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
1124
|
+
|
|
1125
|
+
/**
|
|
1126
|
+
*
|
|
1127
|
+
* @param appointmentId -
|
|
1128
|
+
* @returns
|
|
1129
|
+
*/
|
|
1130
|
+
public async offerAutoNextStatusOnApppointmentCompletedAsync(appointmentId: number, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
1131
|
+
|
|
1132
|
+
public async offerAutoNextStatusOnApppointmentCompletedAsync(appointmentId:number|carriers.Project_OfferAutoNextStatusOnApppointmentCompletedRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
1133
|
+
let _request : carriers.Project_OfferAutoNextStatusOnApppointmentCompletedRequest = null;
|
|
1134
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1135
|
+
const first : any = appointmentId;
|
|
1136
|
+
if( typeof( first ) === "object" && first && ( typeof(first.appointmentId)!='undefined' ) )
|
|
1137
|
+
{
|
|
1138
|
+
_request = appointmentId as carriers.Project_OfferAutoNextStatusOnApppointmentCompletedRequest;
|
|
1139
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1140
|
+
}
|
|
1141
|
+
else
|
|
1142
|
+
{
|
|
1143
|
+
_request = {
|
|
1144
|
+
appointmentId: appointmentId as number,
|
|
1145
|
+
};
|
|
1146
|
+
_options = webapi_options;
|
|
1147
|
+
}
|
|
1148
|
+
return this._offerAutoNextStatusOnApppointmentCompletedAsync( _request, _options );
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
|
|
1152
|
+
private async _getNextProjectStatusAsync(request: carriers.Project_GetNextProjectStatusRequest, options?:base.WebApiRequestOptions) : Promise< number > {
|
|
1153
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1154
|
+
base.WebApiBase.SetPending(options);
|
|
1155
|
+
return new Promise< number >(async (resolve, reject) => {
|
|
1156
|
+
try {
|
|
1157
|
+
config.baseURL = this._options.baseUrl;
|
|
1158
|
+
const response = await this._axios.post("GetNextProjectStatus", request , config);
|
|
1159
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1160
|
+
const res : number = response.data as number;
|
|
1161
|
+
resolve(res);
|
|
1162
|
+
}
|
|
1163
|
+
catch( err ) {
|
|
1164
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1165
|
+
reject(err);
|
|
1166
|
+
}
|
|
1167
|
+
});
|
|
1168
|
+
}
|
|
1169
|
+
|
|
1170
|
+
|
|
1171
|
+
|
|
1172
|
+
/**
|
|
1173
|
+
*
|
|
1174
|
+
* @param request - ProjectId
|
|
1175
|
+
* @returns
|
|
1176
|
+
*/
|
|
1177
|
+
public async getNextProjectStatusAsync(request: carriers.Project_GetNextProjectStatusRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
1178
|
+
|
|
1179
|
+
/**
|
|
1180
|
+
*
|
|
1181
|
+
* @param projectId -
|
|
1182
|
+
* @returns
|
|
1183
|
+
*/
|
|
1184
|
+
public async getNextProjectStatusAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< number >;
|
|
1185
|
+
|
|
1186
|
+
public async getNextProjectStatusAsync(projectId:number|carriers.Project_GetNextProjectStatusRequest, webapi_options?:base.WebApiRequestOptions) : Promise< number > {
|
|
1187
|
+
let _request : carriers.Project_GetNextProjectStatusRequest = null;
|
|
1188
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1189
|
+
const first : any = projectId;
|
|
1190
|
+
if( typeof( first ) === "object" && first && ( typeof(first.projectId)!='undefined' ) )
|
|
1191
|
+
{
|
|
1192
|
+
_request = projectId as carriers.Project_GetNextProjectStatusRequest;
|
|
1193
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1194
|
+
}
|
|
1195
|
+
else
|
|
1196
|
+
{
|
|
1197
|
+
_request = {
|
|
1198
|
+
projectId: projectId as number,
|
|
1199
|
+
};
|
|
1200
|
+
_options = webapi_options;
|
|
1201
|
+
}
|
|
1202
|
+
return this._getNextProjectStatusAsync( _request, _options );
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
|
|
1206
|
+
private async _hasGuideActivitiesAsync(request: carriers.Project_HasGuideActivitiesRequest, options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
1207
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1208
|
+
base.WebApiBase.SetPending(options);
|
|
1209
|
+
return new Promise< boolean >(async (resolve, reject) => {
|
|
1210
|
+
try {
|
|
1211
|
+
config.baseURL = this._options.baseUrl;
|
|
1212
|
+
const response = await this._axios.post("HasGuideActivities", request , config);
|
|
1213
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1214
|
+
const res : boolean = response.data as boolean;
|
|
1215
|
+
resolve(res);
|
|
1216
|
+
}
|
|
1217
|
+
catch( err ) {
|
|
1218
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1219
|
+
reject(err);
|
|
1220
|
+
}
|
|
1221
|
+
});
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
|
|
1225
|
+
|
|
1226
|
+
/**
|
|
1227
|
+
*
|
|
1228
|
+
* @param request - ProjectId
|
|
1229
|
+
* @returns
|
|
1230
|
+
*/
|
|
1231
|
+
public async hasGuideActivitiesAsync(request: carriers.Project_HasGuideActivitiesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
1232
|
+
|
|
1233
|
+
/**
|
|
1234
|
+
*
|
|
1235
|
+
* @param projectId -
|
|
1236
|
+
* @returns
|
|
1237
|
+
*/
|
|
1238
|
+
public async hasGuideActivitiesAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
|
|
1239
|
+
|
|
1240
|
+
public async hasGuideActivitiesAsync(projectId:number|carriers.Project_HasGuideActivitiesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< boolean > {
|
|
1241
|
+
let _request : carriers.Project_HasGuideActivitiesRequest = null;
|
|
1242
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1243
|
+
const first : any = projectId;
|
|
1244
|
+
if( typeof( first ) === "object" && first && ( typeof(first.projectId)!='undefined' ) )
|
|
1245
|
+
{
|
|
1246
|
+
_request = projectId as carriers.Project_HasGuideActivitiesRequest;
|
|
1247
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1248
|
+
}
|
|
1249
|
+
else
|
|
1250
|
+
{
|
|
1251
|
+
_request = {
|
|
1252
|
+
projectId: projectId as number,
|
|
1253
|
+
};
|
|
1254
|
+
_options = webapi_options;
|
|
1255
|
+
}
|
|
1256
|
+
return this._hasGuideActivitiesAsync( _request, _options );
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
|
|
1260
|
+
private async _validateProjectEntityAsync(request: carriers.Project_ValidateProjectEntityRequest, options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary > {
|
|
1261
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1262
|
+
base.WebApiBase.SetPending(options);
|
|
1263
|
+
return new Promise< carriers.StringDictionary >(async (resolve, reject) => {
|
|
1264
|
+
try {
|
|
1265
|
+
config.baseURL = this._options.baseUrl;
|
|
1266
|
+
const response = await this._axios.post("ValidateProjectEntity", request , config);
|
|
1267
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1268
|
+
const res : carriers.StringDictionary = converters.Create_StringDictionary_From( response.data );
|
|
1269
|
+
resolve(res);
|
|
1270
|
+
}
|
|
1271
|
+
catch( err ) {
|
|
1272
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1273
|
+
reject(err);
|
|
1274
|
+
}
|
|
1275
|
+
});
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
|
|
1279
|
+
|
|
1280
|
+
/**
|
|
1281
|
+
* Check that entity is ready for saving, return error messages by field.
|
|
1282
|
+
* @param request - ProjectEntity
|
|
1283
|
+
* @returns Error messages tagged by field.
|
|
1284
|
+
*/
|
|
1285
|
+
public async validateProjectEntityAsync(request: carriers.Project_ValidateProjectEntityRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary >;
|
|
1286
|
+
|
|
1287
|
+
/**
|
|
1288
|
+
* Check that entity is ready for saving, return error messages by field.
|
|
1289
|
+
* @param projectEntity - Entity to be checked for errors.
|
|
1290
|
+
* @returns Error messages tagged by field.
|
|
1291
|
+
*/
|
|
1292
|
+
public async validateProjectEntityAsync(projectEntity: carriers.ProjectEntity, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary >;
|
|
1293
|
+
|
|
1294
|
+
public async validateProjectEntityAsync(projectEntity:carriers.ProjectEntity|carriers.Project_ValidateProjectEntityRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary > {
|
|
1295
|
+
let _request : carriers.Project_ValidateProjectEntityRequest = null;
|
|
1296
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1297
|
+
const first : any = projectEntity;
|
|
1298
|
+
if( typeof( first ) === "object" && first && ( typeof(first.projectEntity)!='undefined' ) )
|
|
1299
|
+
{
|
|
1300
|
+
_request = projectEntity as carriers.Project_ValidateProjectEntityRequest;
|
|
1301
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1302
|
+
}
|
|
1303
|
+
else
|
|
1304
|
+
{
|
|
1305
|
+
_request = {
|
|
1306
|
+
projectEntity: projectEntity as carriers.ProjectEntity,
|
|
1307
|
+
};
|
|
1308
|
+
_options = webapi_options;
|
|
1309
|
+
}
|
|
1310
|
+
return this._validateProjectEntityAsync( _request, _options );
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
|
|
1314
|
+
private async _setCompletedAsync(request: carriers.Project_SetCompletedRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1315
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1316
|
+
base.WebApiBase.SetPending(options);
|
|
1317
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
1318
|
+
try {
|
|
1319
|
+
config.baseURL = this._options.baseUrl;
|
|
1320
|
+
const response = await this._axios.post("SetCompleted", request , config);
|
|
1321
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1322
|
+
const res = response.data;
|
|
1323
|
+
resolve(res);
|
|
1324
|
+
}
|
|
1325
|
+
catch( err ) {
|
|
1326
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1327
|
+
reject(err);
|
|
1328
|
+
}
|
|
1329
|
+
});
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
|
|
1333
|
+
|
|
1334
|
+
/**
|
|
1335
|
+
* Set the completed flag on the project
|
|
1336
|
+
* @param request - ProjectId, IsCompleted
|
|
1337
|
+
* @returns This method has no return value
|
|
1338
|
+
*/
|
|
1339
|
+
public async setCompletedAsync(request: carriers.Project_SetCompletedRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1340
|
+
|
|
1341
|
+
/**
|
|
1342
|
+
* Set the completed flag on the project
|
|
1343
|
+
* @param projectId -
|
|
1344
|
+
* @param isCompleted - True if the project is completed, false if it is not
|
|
1345
|
+
* @returns This method has no return value
|
|
1346
|
+
*/
|
|
1347
|
+
public async setCompletedAsync(projectId: number, isCompleted: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1348
|
+
|
|
1349
|
+
public async setCompletedAsync(projectId:number|carriers.Project_SetCompletedRequest, isCompleted?:boolean|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1350
|
+
let _request : carriers.Project_SetCompletedRequest = null;
|
|
1351
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1352
|
+
const first : any = projectId;
|
|
1353
|
+
if( typeof( first ) === "object" && first && ( typeof(first.projectId)!='undefined' || typeof(first.isCompleted)!='undefined' ) )
|
|
1354
|
+
{
|
|
1355
|
+
_request = projectId as carriers.Project_SetCompletedRequest;
|
|
1356
|
+
_options = isCompleted as base.WebApiRequestOptions;
|
|
1357
|
+
}
|
|
1358
|
+
else
|
|
1359
|
+
{
|
|
1360
|
+
_request = {
|
|
1361
|
+
projectId: projectId as number,
|
|
1362
|
+
isCompleted: isCompleted as boolean,
|
|
1363
|
+
};
|
|
1364
|
+
_options = webapi_options;
|
|
1365
|
+
}
|
|
1366
|
+
return this._setCompletedAsync( _request, _options );
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1369
|
+
/**
|
|
1370
|
+
* Gets a ProjectEvent object.
|
|
1371
|
+
* @param projectEventId - The primary key.
|
|
1372
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
1373
|
+
* @returns A single ProjectEvent
|
|
1374
|
+
*/
|
|
1375
|
+
public async getProjectEventAsync(projectEventId: number, options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEvent > {
|
|
1376
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1377
|
+
base.WebApiBase.SetPending(options);
|
|
1378
|
+
return new Promise< carriers.ProjectEvent >(async (resolve, reject) => {
|
|
1379
|
+
try {
|
|
1380
|
+
const response = await this._axios.post("GetProjectEvent?projectEventId=" + projectEventId, null, config);
|
|
1381
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1382
|
+
const res = converters.Create_ProjectEvent_From( response.data );
|
|
1383
|
+
resolve(res);
|
|
1384
|
+
}
|
|
1385
|
+
catch( err ) {
|
|
1386
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1387
|
+
reject(err);
|
|
1388
|
+
}
|
|
1389
|
+
});
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
|
|
1393
|
+
private async _getProjectEventOnPersonAsync(request: carriers.Project_GetProjectEventOnPersonRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEvent > {
|
|
1394
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1395
|
+
base.WebApiBase.SetPending(options);
|
|
1396
|
+
return new Promise< carriers.ProjectEvent >(async (resolve, reject) => {
|
|
1397
|
+
try {
|
|
1398
|
+
config.baseURL = this._options.baseUrl;
|
|
1399
|
+
const response = await this._axios.post("GetProjectEventOnPerson", request , config);
|
|
1400
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1401
|
+
const res : carriers.ProjectEvent = converters.Create_ProjectEvent_From( response.data );
|
|
1402
|
+
resolve(res);
|
|
1403
|
+
}
|
|
1404
|
+
catch( err ) {
|
|
1405
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1406
|
+
reject(err);
|
|
1407
|
+
}
|
|
1408
|
+
});
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
|
|
1412
|
+
|
|
1413
|
+
/**
|
|
1414
|
+
* Gets a ProjectEvent object from a project and a person.
|
|
1415
|
+
* @param request - ProjectId, PersonId
|
|
1416
|
+
* @returns
|
|
1417
|
+
*/
|
|
1418
|
+
public async getProjectEventOnPersonAsync(request: carriers.Project_GetProjectEventOnPersonRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEvent >;
|
|
1419
|
+
|
|
1420
|
+
/**
|
|
1421
|
+
* Gets a ProjectEvent object from a project and a person.
|
|
1422
|
+
* @param projectId - The project Id
|
|
1423
|
+
* @param personId - Id of the person the project events belong to.
|
|
1424
|
+
* @returns
|
|
1425
|
+
*/
|
|
1426
|
+
public async getProjectEventOnPersonAsync(projectId: number, personId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEvent >;
|
|
1427
|
+
|
|
1428
|
+
public async getProjectEventOnPersonAsync(projectId:number|carriers.Project_GetProjectEventOnPersonRequest, personId?:number|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEvent > {
|
|
1429
|
+
let _request : carriers.Project_GetProjectEventOnPersonRequest = null;
|
|
1430
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1431
|
+
const first : any = projectId;
|
|
1432
|
+
if( typeof( first ) === "object" && first && ( typeof(first.projectId)!='undefined' || typeof(first.personId)!='undefined' ) )
|
|
1433
|
+
{
|
|
1434
|
+
_request = projectId as carriers.Project_GetProjectEventOnPersonRequest;
|
|
1435
|
+
_options = personId as base.WebApiRequestOptions;
|
|
1436
|
+
}
|
|
1437
|
+
else
|
|
1438
|
+
{
|
|
1439
|
+
_request = {
|
|
1440
|
+
projectId: projectId as number,
|
|
1441
|
+
personId: personId as number,
|
|
1442
|
+
};
|
|
1443
|
+
_options = webapi_options;
|
|
1444
|
+
}
|
|
1445
|
+
return this._getProjectEventOnPersonAsync( _request, _options );
|
|
1446
|
+
}
|
|
1447
|
+
|
|
1448
|
+
/**
|
|
1449
|
+
* Gets a ProjectEventEntity object.
|
|
1450
|
+
* @param projectEventEntityId - The primary key.
|
|
1451
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
1452
|
+
* @returns A single ProjectEventEntity
|
|
1453
|
+
*/
|
|
1454
|
+
public async getProjectEventEntityAsync(projectEventEntityId: number, options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEventEntity > {
|
|
1455
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1456
|
+
base.WebApiBase.SetPending(options);
|
|
1457
|
+
return new Promise< carriers.ProjectEventEntity >(async (resolve, reject) => {
|
|
1458
|
+
try {
|
|
1459
|
+
const response = await this._axios.post("GetProjectEventEntity?projectEventEntityId=" + projectEventEntityId, null, config);
|
|
1460
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1461
|
+
const res = converters.Create_ProjectEventEntity_From( response.data );
|
|
1462
|
+
resolve(res);
|
|
1463
|
+
}
|
|
1464
|
+
catch( err ) {
|
|
1465
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1466
|
+
reject(err);
|
|
1467
|
+
}
|
|
1468
|
+
});
|
|
1469
|
+
}
|
|
1470
|
+
|
|
1471
|
+
|
|
1472
|
+
private async _getProjectEventEntityFromProjectIdAsync(request: carriers.Project_GetProjectEventEntityFromProjectIdRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEventEntity > {
|
|
1473
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1474
|
+
base.WebApiBase.SetPending(options);
|
|
1475
|
+
return new Promise< carriers.ProjectEventEntity >(async (resolve, reject) => {
|
|
1476
|
+
try {
|
|
1477
|
+
config.baseURL = this._options.baseUrl;
|
|
1478
|
+
const response = await this._axios.post("GetProjectEventEntityFromProjectId", request , config);
|
|
1479
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1480
|
+
const res : carriers.ProjectEventEntity = converters.Create_ProjectEventEntity_From( response.data );
|
|
1481
|
+
resolve(res);
|
|
1482
|
+
}
|
|
1483
|
+
catch( err ) {
|
|
1484
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1485
|
+
reject(err);
|
|
1486
|
+
}
|
|
1487
|
+
});
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1490
|
+
|
|
1491
|
+
|
|
1492
|
+
/**
|
|
1493
|
+
* Get a ProjectEventEntity based on a projectId.
|
|
1494
|
+
* @param request - ProjectId
|
|
1495
|
+
* @returns ProjectEventEntity
|
|
1496
|
+
*/
|
|
1497
|
+
public async getProjectEventEntityFromProjectIdAsync(request: carriers.Project_GetProjectEventEntityFromProjectIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEventEntity >;
|
|
1498
|
+
|
|
1499
|
+
/**
|
|
1500
|
+
* Get a ProjectEventEntity based on a projectId.
|
|
1501
|
+
* @param projectId - The projectId to get a ProjectEventEntity for
|
|
1502
|
+
* @returns ProjectEventEntity
|
|
1503
|
+
*/
|
|
1504
|
+
public async getProjectEventEntityFromProjectIdAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEventEntity >;
|
|
1505
|
+
|
|
1506
|
+
public async getProjectEventEntityFromProjectIdAsync(projectId:number|carriers.Project_GetProjectEventEntityFromProjectIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEventEntity > {
|
|
1507
|
+
let _request : carriers.Project_GetProjectEventEntityFromProjectIdRequest = null;
|
|
1508
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1509
|
+
const first : any = projectId;
|
|
1510
|
+
if( typeof( first ) === "object" && first && ( typeof(first.projectId)!='undefined' ) )
|
|
1511
|
+
{
|
|
1512
|
+
_request = projectId as carriers.Project_GetProjectEventEntityFromProjectIdRequest;
|
|
1513
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1514
|
+
}
|
|
1515
|
+
else
|
|
1516
|
+
{
|
|
1517
|
+
_request = {
|
|
1518
|
+
projectId: projectId as number,
|
|
1519
|
+
};
|
|
1520
|
+
_options = webapi_options;
|
|
1521
|
+
}
|
|
1522
|
+
return this._getProjectEventEntityFromProjectIdAsync( _request, _options );
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1525
|
+
|
|
1526
|
+
private async _deleteProjectEventEntityFromProjectIdAsync(request: carriers.Project_DeleteProjectEventEntityFromProjectIdRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1527
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1528
|
+
base.WebApiBase.SetPending(options);
|
|
1529
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
1530
|
+
try {
|
|
1531
|
+
config.baseURL = this._options.baseUrl;
|
|
1532
|
+
const response = await this._axios.post("DeleteProjectEventEntityFromProjectId", request , config);
|
|
1533
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1534
|
+
const res = response.data;
|
|
1535
|
+
resolve(res);
|
|
1536
|
+
}
|
|
1537
|
+
catch( err ) {
|
|
1538
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1539
|
+
reject(err);
|
|
1540
|
+
}
|
|
1541
|
+
});
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1544
|
+
|
|
1545
|
+
|
|
1546
|
+
/**
|
|
1547
|
+
* Delete a project event based on a project id. Does not delete the project, but does delete the published and ExternalEvent and AudienceVisibility records.
|
|
1548
|
+
* @param request - ProjectId
|
|
1549
|
+
* @returns Nothing
|
|
1550
|
+
*/
|
|
1551
|
+
public async deleteProjectEventEntityFromProjectIdAsync(request: carriers.Project_DeleteProjectEventEntityFromProjectIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1552
|
+
|
|
1553
|
+
/**
|
|
1554
|
+
* Delete a project event based on a project id. Does not delete the project, but does delete the published and ExternalEvent and AudienceVisibility records.
|
|
1555
|
+
* @param projectId - The project id of the external event to delete.
|
|
1556
|
+
* @returns Nothing
|
|
1557
|
+
*/
|
|
1558
|
+
public async deleteProjectEventEntityFromProjectIdAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1559
|
+
|
|
1560
|
+
public async deleteProjectEventEntityFromProjectIdAsync(projectId:number|carriers.Project_DeleteProjectEventEntityFromProjectIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1561
|
+
let _request : carriers.Project_DeleteProjectEventEntityFromProjectIdRequest = null;
|
|
1562
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1563
|
+
const first : any = projectId;
|
|
1564
|
+
if( typeof( first ) === "object" && first && ( typeof(first.projectId)!='undefined' ) )
|
|
1565
|
+
{
|
|
1566
|
+
_request = projectId as carriers.Project_DeleteProjectEventEntityFromProjectIdRequest;
|
|
1567
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1568
|
+
}
|
|
1569
|
+
else
|
|
1570
|
+
{
|
|
1571
|
+
_request = {
|
|
1572
|
+
projectId: projectId as number,
|
|
1573
|
+
};
|
|
1574
|
+
_options = webapi_options;
|
|
1575
|
+
}
|
|
1576
|
+
return this._deleteProjectEventEntityFromProjectIdAsync( _request, _options );
|
|
1577
|
+
}
|
|
1578
|
+
|
|
1579
|
+
/**
|
|
1580
|
+
* Gets an array of ProjectEvent objects.
|
|
1581
|
+
* @param projectEventIds - The primary keys.
|
|
1582
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
1583
|
+
* @returns An array of ProjectEvent
|
|
1584
|
+
*/
|
|
1585
|
+
public async getProjectEventListAsync(projectEventIds: number[], options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEvent[] > {
|
|
1586
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1587
|
+
base.WebApiBase.SetPending(options);
|
|
1588
|
+
return new Promise< carriers.ProjectEvent[] >(async (resolve, reject) => {
|
|
1589
|
+
try {
|
|
1590
|
+
const response = await this._axios.post("GetProjectEventList", projectEventIds, config);
|
|
1591
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1592
|
+
const res = converters.Create_ProjectEventArray_From( response.data );
|
|
1593
|
+
resolve(res);
|
|
1594
|
+
}
|
|
1595
|
+
catch( err ) {
|
|
1596
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1597
|
+
reject(err);
|
|
1598
|
+
}
|
|
1599
|
+
});
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1602
|
+
|
|
1603
|
+
private async _getMyProjectEventsAsync( options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEvent[] > {
|
|
1604
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1605
|
+
base.WebApiBase.SetPending(options);
|
|
1606
|
+
return new Promise< carriers.ProjectEvent[] >(async (resolve, reject) => {
|
|
1607
|
+
try {
|
|
1608
|
+
config.baseURL = this._options.baseUrl;
|
|
1609
|
+
const response = await this._axios.post("GetMyProjectEvents", undefined , config);
|
|
1610
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1611
|
+
const res : carriers.ProjectEvent[] = converters.Create_ProjectEventArray_From( response.data );
|
|
1612
|
+
resolve(res);
|
|
1613
|
+
}
|
|
1614
|
+
catch( err ) {
|
|
1615
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1616
|
+
reject(err);
|
|
1617
|
+
}
|
|
1618
|
+
});
|
|
1619
|
+
}
|
|
1620
|
+
|
|
1621
|
+
|
|
1622
|
+
/**
|
|
1623
|
+
* Gets all project events that belongs to the currently logged on user. The list of events are filtered by the Audience Visibility restrictions set when the project event is created.
|
|
1624
|
+
* @returns Array of project events
|
|
1625
|
+
*/
|
|
1626
|
+
public async getMyProjectEventsAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEvent[] >
|
|
1627
|
+
{
|
|
1628
|
+
return this._getMyProjectEventsAsync(webapi_options);
|
|
1629
|
+
}
|
|
1630
|
+
|
|
1631
|
+
|
|
1632
|
+
private async _getProjectEventsOnPersonAsync(request: carriers.Project_GetProjectEventsOnPersonRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEvent[] > {
|
|
1633
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1634
|
+
base.WebApiBase.SetPending(options);
|
|
1635
|
+
return new Promise< carriers.ProjectEvent[] >(async (resolve, reject) => {
|
|
1636
|
+
try {
|
|
1637
|
+
config.baseURL = this._options.baseUrl;
|
|
1638
|
+
const response = await this._axios.post("GetProjectEventsOnPerson", request , config);
|
|
1639
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1640
|
+
const res : carriers.ProjectEvent[] = converters.Create_ProjectEventArray_From( response.data );
|
|
1641
|
+
resolve(res);
|
|
1642
|
+
}
|
|
1643
|
+
catch( err ) {
|
|
1644
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1645
|
+
reject(err);
|
|
1646
|
+
}
|
|
1647
|
+
});
|
|
1648
|
+
}
|
|
1649
|
+
|
|
1650
|
+
|
|
1651
|
+
|
|
1652
|
+
/**
|
|
1653
|
+
* Gets all project events that belongs to the person specified. The list of events are filtered by the Audience Visibility restrictions set when the project event is created.
|
|
1654
|
+
* @param request - PersonId
|
|
1655
|
+
* @returns Array of project events
|
|
1656
|
+
*/
|
|
1657
|
+
public async getProjectEventsOnPersonAsync(request: carriers.Project_GetProjectEventsOnPersonRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEvent[] >;
|
|
1658
|
+
|
|
1659
|
+
/**
|
|
1660
|
+
* Gets all project events that belongs to the person specified. The list of events are filtered by the Audience Visibility restrictions set when the project event is created.
|
|
1661
|
+
* @param personId - Id of the person the project events belong to.
|
|
1662
|
+
* @returns Array of project events
|
|
1663
|
+
*/
|
|
1664
|
+
public async getProjectEventsOnPersonAsync(personId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEvent[] >;
|
|
1665
|
+
|
|
1666
|
+
public async getProjectEventsOnPersonAsync(personId:number|carriers.Project_GetProjectEventsOnPersonRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEvent[] > {
|
|
1667
|
+
let _request : carriers.Project_GetProjectEventsOnPersonRequest = null;
|
|
1668
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1669
|
+
const first : any = personId;
|
|
1670
|
+
if( typeof( first ) === "object" && first && ( typeof(first.personId)!='undefined' ) )
|
|
1671
|
+
{
|
|
1672
|
+
_request = personId as carriers.Project_GetProjectEventsOnPersonRequest;
|
|
1673
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1674
|
+
}
|
|
1675
|
+
else
|
|
1676
|
+
{
|
|
1677
|
+
_request = {
|
|
1678
|
+
personId: personId as number,
|
|
1679
|
+
};
|
|
1680
|
+
_options = webapi_options;
|
|
1681
|
+
}
|
|
1682
|
+
return this._getProjectEventsOnPersonAsync( _request, _options );
|
|
1683
|
+
}
|
|
1684
|
+
|
|
1685
|
+
/**
|
|
1686
|
+
* Gets an array of Project objects.
|
|
1687
|
+
* @param projectIds - The primary keys.
|
|
1688
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
1689
|
+
* @returns An array of Project
|
|
1690
|
+
*/
|
|
1691
|
+
public async getProjectListAsync(projectIds: number[], options?:base.WebApiRequestOptions) : Promise< carriers.Project[] > {
|
|
1692
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1693
|
+
base.WebApiBase.SetPending(options);
|
|
1694
|
+
return new Promise< carriers.Project[] >(async (resolve, reject) => {
|
|
1695
|
+
try {
|
|
1696
|
+
const response = await this._axios.post("GetProjectList", projectIds, config);
|
|
1697
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1698
|
+
const res = converters.Create_ProjectArray_From( response.data );
|
|
1699
|
+
resolve(res);
|
|
1700
|
+
}
|
|
1701
|
+
catch( err ) {
|
|
1702
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1703
|
+
reject(err);
|
|
1704
|
+
}
|
|
1705
|
+
});
|
|
1706
|
+
}
|
|
1707
|
+
|
|
1708
|
+
|
|
1709
|
+
private async _getMyProjectsAsync(request: carriers.Project_GetMyProjectsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.Project[] > {
|
|
1710
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1711
|
+
base.WebApiBase.SetPending(options);
|
|
1712
|
+
return new Promise< carriers.Project[] >(async (resolve, reject) => {
|
|
1713
|
+
try {
|
|
1714
|
+
config.baseURL = this._options.baseUrl;
|
|
1715
|
+
const response = await this._axios.post("GetMyProjects", request , config);
|
|
1716
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1717
|
+
const res : carriers.Project[] = converters.Create_ProjectArray_From( response.data );
|
|
1718
|
+
resolve(res);
|
|
1719
|
+
}
|
|
1720
|
+
catch( err ) {
|
|
1721
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1722
|
+
reject(err);
|
|
1723
|
+
}
|
|
1724
|
+
});
|
|
1725
|
+
}
|
|
1726
|
+
|
|
1727
|
+
|
|
1728
|
+
|
|
1729
|
+
/**
|
|
1730
|
+
* Returning the projects belonging to an associate. If memberProjects is false only the projects where the associate is project responsible is returned, otherwise both the projects where the associate is project responsible and project member is returned.
|
|
1731
|
+
* @param request - IncludeMemberProjects
|
|
1732
|
+
* @returns The list of projects
|
|
1733
|
+
*/
|
|
1734
|
+
public async getMyProjectsAsync(request: carriers.Project_GetMyProjectsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
1735
|
+
|
|
1736
|
+
/**
|
|
1737
|
+
* Returning the projects belonging to an associate. If memberProjects is false only the projects where the associate is project responsible is returned, otherwise both the projects where the associate is project responsible and project member is returned.
|
|
1738
|
+
* @param includeMemberProjects - True to include projects where the user is project member.
|
|
1739
|
+
* @returns The list of projects
|
|
1740
|
+
*/
|
|
1741
|
+
public async getMyProjectsAsync(includeMemberProjects: boolean, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
1742
|
+
|
|
1743
|
+
public async getMyProjectsAsync(includeMemberProjects:boolean|carriers.Project_GetMyProjectsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] > {
|
|
1744
|
+
let _request : carriers.Project_GetMyProjectsRequest = null;
|
|
1745
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1746
|
+
const first : any = includeMemberProjects;
|
|
1747
|
+
if( typeof( first ) === "object" && first && ( typeof(first.includeMemberProjects)!='undefined' ) )
|
|
1748
|
+
{
|
|
1749
|
+
_request = includeMemberProjects as carriers.Project_GetMyProjectsRequest;
|
|
1750
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1751
|
+
}
|
|
1752
|
+
else
|
|
1753
|
+
{
|
|
1754
|
+
_request = {
|
|
1755
|
+
includeMemberProjects: includeMemberProjects as boolean,
|
|
1756
|
+
};
|
|
1757
|
+
_options = webapi_options;
|
|
1758
|
+
}
|
|
1759
|
+
return this._getMyProjectsAsync( _request, _options );
|
|
1760
|
+
}
|
|
1761
|
+
|
|
1762
|
+
|
|
1763
|
+
private async _getMyMemberProjectsAsync( options?:base.WebApiRequestOptions) : Promise< carriers.Project[] > {
|
|
1764
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1765
|
+
base.WebApiBase.SetPending(options);
|
|
1766
|
+
return new Promise< carriers.Project[] >(async (resolve, reject) => {
|
|
1767
|
+
try {
|
|
1768
|
+
config.baseURL = this._options.baseUrl;
|
|
1769
|
+
const response = await this._axios.post("GetMyMemberProjects", undefined , config);
|
|
1770
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1771
|
+
const res : carriers.Project[] = converters.Create_ProjectArray_From( response.data );
|
|
1772
|
+
resolve(res);
|
|
1773
|
+
}
|
|
1774
|
+
catch( err ) {
|
|
1775
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1776
|
+
reject(err);
|
|
1777
|
+
}
|
|
1778
|
+
});
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
|
|
1782
|
+
/**
|
|
1783
|
+
* Returning the projects where an user is project member.
|
|
1784
|
+
* @returns The list of projects.
|
|
1785
|
+
*/
|
|
1786
|
+
public async getMyMemberProjectsAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >
|
|
1787
|
+
{
|
|
1788
|
+
return this._getMyMemberProjectsAsync(webapi_options);
|
|
1789
|
+
}
|
|
1790
|
+
|
|
1791
|
+
|
|
1792
|
+
private async _getProjectsFromPersonAsync(request: carriers.Project_GetProjectsFromPersonRequest, options?:base.WebApiRequestOptions) : Promise< carriers.Project[] > {
|
|
1793
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1794
|
+
base.WebApiBase.SetPending(options);
|
|
1795
|
+
return new Promise< carriers.Project[] >(async (resolve, reject) => {
|
|
1796
|
+
try {
|
|
1797
|
+
config.baseURL = this._options.baseUrl;
|
|
1798
|
+
const response = await this._axios.post("GetProjectsFromPerson", request , config);
|
|
1799
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1800
|
+
const res : carriers.Project[] = converters.Create_ProjectArray_From( response.data );
|
|
1801
|
+
resolve(res);
|
|
1802
|
+
}
|
|
1803
|
+
catch( err ) {
|
|
1804
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1805
|
+
reject(err);
|
|
1806
|
+
}
|
|
1807
|
+
});
|
|
1808
|
+
}
|
|
1809
|
+
|
|
1810
|
+
|
|
1811
|
+
|
|
1812
|
+
/**
|
|
1813
|
+
* Return all projects where the person is project member.
|
|
1814
|
+
* @param request - PersonId
|
|
1815
|
+
* @returns ProjectListEntity
|
|
1816
|
+
*/
|
|
1817
|
+
public async getProjectsFromPersonAsync(request: carriers.Project_GetProjectsFromPersonRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
1818
|
+
|
|
1819
|
+
/**
|
|
1820
|
+
* Return all projects where the person is project member.
|
|
1821
|
+
* @param personId - The person id
|
|
1822
|
+
* @returns ProjectListEntity
|
|
1823
|
+
*/
|
|
1824
|
+
public async getProjectsFromPersonAsync(personId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
1825
|
+
|
|
1826
|
+
public async getProjectsFromPersonAsync(personId:number|carriers.Project_GetProjectsFromPersonRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] > {
|
|
1827
|
+
let _request : carriers.Project_GetProjectsFromPersonRequest = null;
|
|
1828
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1829
|
+
const first : any = personId;
|
|
1830
|
+
if( typeof( first ) === "object" && first && ( typeof(first.personId)!='undefined' ) )
|
|
1831
|
+
{
|
|
1832
|
+
_request = personId as carriers.Project_GetProjectsFromPersonRequest;
|
|
1833
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1834
|
+
}
|
|
1835
|
+
else
|
|
1836
|
+
{
|
|
1837
|
+
_request = {
|
|
1838
|
+
personId: personId as number,
|
|
1839
|
+
};
|
|
1840
|
+
_options = webapi_options;
|
|
1841
|
+
}
|
|
1842
|
+
return this._getProjectsFromPersonAsync( _request, _options );
|
|
1843
|
+
}
|
|
1844
|
+
|
|
1845
|
+
|
|
1846
|
+
private async _getProjectsFromContactAsync(request: carriers.Project_GetProjectsFromContactRequest, options?:base.WebApiRequestOptions) : Promise< carriers.Project[] > {
|
|
1847
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1848
|
+
base.WebApiBase.SetPending(options);
|
|
1849
|
+
return new Promise< carriers.Project[] >(async (resolve, reject) => {
|
|
1850
|
+
try {
|
|
1851
|
+
config.baseURL = this._options.baseUrl;
|
|
1852
|
+
const response = await this._axios.post("GetProjectsFromContact", request , config);
|
|
1853
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1854
|
+
const res : carriers.Project[] = converters.Create_ProjectArray_From( response.data );
|
|
1855
|
+
resolve(res);
|
|
1856
|
+
}
|
|
1857
|
+
catch( err ) {
|
|
1858
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1859
|
+
reject(err);
|
|
1860
|
+
}
|
|
1861
|
+
});
|
|
1862
|
+
}
|
|
1863
|
+
|
|
1864
|
+
|
|
1865
|
+
|
|
1866
|
+
/**
|
|
1867
|
+
* Returns all projects where the given contact has projectmembers.
|
|
1868
|
+
* @param request - ContactId
|
|
1869
|
+
* @returns ProjectListEntity
|
|
1870
|
+
*/
|
|
1871
|
+
public async getProjectsFromContactAsync(request: carriers.Project_GetProjectsFromContactRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
1872
|
+
|
|
1873
|
+
/**
|
|
1874
|
+
* Returns all projects where the given contact has projectmembers.
|
|
1875
|
+
* @param contactId - The contact id
|
|
1876
|
+
* @returns ProjectListEntity
|
|
1877
|
+
*/
|
|
1878
|
+
public async getProjectsFromContactAsync(contactId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
1879
|
+
|
|
1880
|
+
public async getProjectsFromContactAsync(contactId:number|carriers.Project_GetProjectsFromContactRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] > {
|
|
1881
|
+
let _request : carriers.Project_GetProjectsFromContactRequest = null;
|
|
1882
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1883
|
+
const first : any = contactId;
|
|
1884
|
+
if( typeof( first ) === "object" && first && ( typeof(first.contactId)!='undefined' ) )
|
|
1885
|
+
{
|
|
1886
|
+
_request = contactId as carriers.Project_GetProjectsFromContactRequest;
|
|
1887
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1888
|
+
}
|
|
1889
|
+
else
|
|
1890
|
+
{
|
|
1891
|
+
_request = {
|
|
1892
|
+
contactId: contactId as number,
|
|
1893
|
+
};
|
|
1894
|
+
_options = webapi_options;
|
|
1895
|
+
}
|
|
1896
|
+
return this._getProjectsFromContactAsync( _request, _options );
|
|
1897
|
+
}
|
|
1898
|
+
|
|
1899
|
+
|
|
1900
|
+
private async _getPublishedProjectAsync(request: carriers.Project_GetPublishedProjectRequest, options?:base.WebApiRequestOptions) : Promise< carriers.Project > {
|
|
1901
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1902
|
+
base.WebApiBase.SetPending(options);
|
|
1903
|
+
return new Promise< carriers.Project >(async (resolve, reject) => {
|
|
1904
|
+
try {
|
|
1905
|
+
config.baseURL = this._options.baseUrl;
|
|
1906
|
+
const response = await this._axios.post("GetPublishedProject", request , config);
|
|
1907
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1908
|
+
const res : carriers.Project = converters.Create_Project_From( response.data );
|
|
1909
|
+
resolve(res);
|
|
1910
|
+
}
|
|
1911
|
+
catch( err ) {
|
|
1912
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1913
|
+
reject(err);
|
|
1914
|
+
}
|
|
1915
|
+
});
|
|
1916
|
+
}
|
|
1917
|
+
|
|
1918
|
+
|
|
1919
|
+
|
|
1920
|
+
/**
|
|
1921
|
+
* Get published project by project id.
|
|
1922
|
+
* @param request - ProjectId
|
|
1923
|
+
* @returns Project
|
|
1924
|
+
*/
|
|
1925
|
+
public async getPublishedProjectAsync(request: carriers.Project_GetPublishedProjectRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project >;
|
|
1926
|
+
|
|
1927
|
+
/**
|
|
1928
|
+
* Get published project by project id.
|
|
1929
|
+
* @param projectId - The project id.
|
|
1930
|
+
* @returns Project
|
|
1931
|
+
*/
|
|
1932
|
+
public async getPublishedProjectAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project >;
|
|
1933
|
+
|
|
1934
|
+
public async getPublishedProjectAsync(projectId:number|carriers.Project_GetPublishedProjectRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project > {
|
|
1935
|
+
let _request : carriers.Project_GetPublishedProjectRequest = null;
|
|
1936
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1937
|
+
const first : any = projectId;
|
|
1938
|
+
if( typeof( first ) === "object" && first && ( typeof(first.projectId)!='undefined' ) )
|
|
1939
|
+
{
|
|
1940
|
+
_request = projectId as carriers.Project_GetPublishedProjectRequest;
|
|
1941
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1942
|
+
}
|
|
1943
|
+
else
|
|
1944
|
+
{
|
|
1945
|
+
_request = {
|
|
1946
|
+
projectId: projectId as number,
|
|
1947
|
+
};
|
|
1948
|
+
_options = webapi_options;
|
|
1949
|
+
}
|
|
1950
|
+
return this._getPublishedProjectAsync( _request, _options );
|
|
1951
|
+
}
|
|
1952
|
+
|
|
1953
|
+
|
|
1954
|
+
private async _getPublishedProjectsAsync(request: carriers.Project_GetPublishedProjectsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.Project[] > {
|
|
1955
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1956
|
+
base.WebApiBase.SetPending(options);
|
|
1957
|
+
return new Promise< carriers.Project[] >(async (resolve, reject) => {
|
|
1958
|
+
try {
|
|
1959
|
+
config.baseURL = this._options.baseUrl;
|
|
1960
|
+
const response = await this._axios.post("GetPublishedProjects", request , config);
|
|
1961
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1962
|
+
const res : carriers.Project[] = converters.Create_ProjectArray_From( response.data );
|
|
1963
|
+
resolve(res);
|
|
1964
|
+
}
|
|
1965
|
+
catch( err ) {
|
|
1966
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1967
|
+
reject(err);
|
|
1968
|
+
}
|
|
1969
|
+
});
|
|
1970
|
+
}
|
|
1971
|
+
|
|
1972
|
+
|
|
1973
|
+
|
|
1974
|
+
/**
|
|
1975
|
+
* Get published projects by project ids.
|
|
1976
|
+
* @param request - ProjectIds
|
|
1977
|
+
* @returns Projects
|
|
1978
|
+
*/
|
|
1979
|
+
public async getPublishedProjectsAsync(request: carriers.Project_GetPublishedProjectsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
1980
|
+
|
|
1981
|
+
/**
|
|
1982
|
+
* Get published projects by project ids.
|
|
1983
|
+
* @param projectIds - The array of project ids
|
|
1984
|
+
* @returns Projects
|
|
1985
|
+
*/
|
|
1986
|
+
public async getPublishedProjectsAsync(projectIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
1987
|
+
|
|
1988
|
+
public async getPublishedProjectsAsync(projectIds:number[]|carriers.Project_GetPublishedProjectsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] > {
|
|
1989
|
+
let _request : carriers.Project_GetPublishedProjectsRequest = null;
|
|
1990
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1991
|
+
const first : any = projectIds;
|
|
1992
|
+
if( typeof( first ) === "object" && first && ( typeof(first.projectIds)!='undefined' ) )
|
|
1993
|
+
{
|
|
1994
|
+
_request = projectIds as carriers.Project_GetPublishedProjectsRequest;
|
|
1995
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1996
|
+
}
|
|
1997
|
+
else
|
|
1998
|
+
{
|
|
1999
|
+
_request = {
|
|
2000
|
+
projectIds: projectIds as number[],
|
|
2001
|
+
};
|
|
2002
|
+
_options = webapi_options;
|
|
2003
|
+
}
|
|
2004
|
+
return this._getPublishedProjectsAsync( _request, _options );
|
|
2005
|
+
}
|
|
2006
|
+
|
|
2007
|
+
|
|
2008
|
+
private async _getMyPublishedProjectsAsync( options?:base.WebApiRequestOptions) : Promise< carriers.Project[] > {
|
|
2009
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2010
|
+
base.WebApiBase.SetPending(options);
|
|
2011
|
+
return new Promise< carriers.Project[] >(async (resolve, reject) => {
|
|
2012
|
+
try {
|
|
2013
|
+
config.baseURL = this._options.baseUrl;
|
|
2014
|
+
const response = await this._axios.post("GetMyPublishedProjects", undefined , config);
|
|
2015
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
2016
|
+
const res : carriers.Project[] = converters.Create_ProjectArray_From( response.data );
|
|
2017
|
+
resolve(res);
|
|
2018
|
+
}
|
|
2019
|
+
catch( err ) {
|
|
2020
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2021
|
+
reject(err);
|
|
2022
|
+
}
|
|
2023
|
+
});
|
|
2024
|
+
}
|
|
2025
|
+
|
|
2026
|
+
|
|
2027
|
+
/**
|
|
2028
|
+
* Get published projects from the logged in user.
|
|
2029
|
+
* @returns Projects
|
|
2030
|
+
*/
|
|
2031
|
+
public async getMyPublishedProjectsAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >
|
|
2032
|
+
{
|
|
2033
|
+
return this._getMyPublishedProjectsAsync(webapi_options);
|
|
2034
|
+
}
|
|
2035
|
+
|
|
2036
|
+
|
|
2037
|
+
private async _getPublishedProjectsOnPersonIdAsync(request: carriers.Project_GetPublishedProjectsOnPersonIdRequest, options?:base.WebApiRequestOptions) : Promise< carriers.Project[] > {
|
|
2038
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2039
|
+
base.WebApiBase.SetPending(options);
|
|
2040
|
+
return new Promise< carriers.Project[] >(async (resolve, reject) => {
|
|
2041
|
+
try {
|
|
2042
|
+
config.baseURL = this._options.baseUrl;
|
|
2043
|
+
const response = await this._axios.post("GetPublishedProjectsOnPersonId", request , config);
|
|
2044
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
2045
|
+
const res : carriers.Project[] = converters.Create_ProjectArray_From( response.data );
|
|
2046
|
+
resolve(res);
|
|
2047
|
+
}
|
|
2048
|
+
catch( err ) {
|
|
2049
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2050
|
+
reject(err);
|
|
2051
|
+
}
|
|
2052
|
+
});
|
|
2053
|
+
}
|
|
2054
|
+
|
|
2055
|
+
|
|
2056
|
+
|
|
2057
|
+
/**
|
|
2058
|
+
* Get published projects where person is a member
|
|
2059
|
+
* @param request - PersonId
|
|
2060
|
+
* @returns Array of project
|
|
2061
|
+
*/
|
|
2062
|
+
public async getPublishedProjectsOnPersonIdAsync(request: carriers.Project_GetPublishedProjectsOnPersonIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
2063
|
+
|
|
2064
|
+
/**
|
|
2065
|
+
* Get published projects where person is a member
|
|
2066
|
+
* @param personId - The person id
|
|
2067
|
+
* @returns Array of project
|
|
2068
|
+
*/
|
|
2069
|
+
public async getPublishedProjectsOnPersonIdAsync(personId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] >;
|
|
2070
|
+
|
|
2071
|
+
public async getPublishedProjectsOnPersonIdAsync(personId:number|carriers.Project_GetPublishedProjectsOnPersonIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Project[] > {
|
|
2072
|
+
let _request : carriers.Project_GetPublishedProjectsOnPersonIdRequest = null;
|
|
2073
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2074
|
+
const first : any = personId;
|
|
2075
|
+
if( typeof( first ) === "object" && first && ( typeof(first.personId)!='undefined' ) )
|
|
2076
|
+
{
|
|
2077
|
+
_request = personId as carriers.Project_GetPublishedProjectsOnPersonIdRequest;
|
|
2078
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
2079
|
+
}
|
|
2080
|
+
else
|
|
2081
|
+
{
|
|
2082
|
+
_request = {
|
|
2083
|
+
personId: personId as number,
|
|
2084
|
+
};
|
|
2085
|
+
_options = webapi_options;
|
|
2086
|
+
}
|
|
2087
|
+
return this._getPublishedProjectsOnPersonIdAsync( _request, _options );
|
|
2088
|
+
}
|
|
2089
|
+
|
|
2090
|
+
/**
|
|
2091
|
+
* Gets a ProjectMember object.
|
|
2092
|
+
* @param projectMemberId - The primary key.
|
|
2093
|
+
* @param options - Override language/culture codes on this request. Provide cancellation and request status values.
|
|
2094
|
+
* @returns A single ProjectMember
|
|
2095
|
+
*/
|
|
2096
|
+
public async getProjectMemberAsync(projectMemberId: number, options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember > {
|
|
2097
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2098
|
+
base.WebApiBase.SetPending(options);
|
|
2099
|
+
return new Promise< carriers.ProjectMember >(async (resolve, reject) => {
|
|
2100
|
+
try {
|
|
2101
|
+
const response = await this._axios.post("GetProjectMember?projectMemberId=" + projectMemberId, null, config);
|
|
2102
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
2103
|
+
const res = converters.Create_ProjectMember_From( response.data );
|
|
2104
|
+
resolve(res);
|
|
2105
|
+
}
|
|
2106
|
+
catch( err ) {
|
|
2107
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2108
|
+
reject(err);
|
|
2109
|
+
}
|
|
2110
|
+
});
|
|
2111
|
+
}
|
|
2112
|
+
|
|
2113
|
+
|
|
2114
|
+
private async _updateProjectMembersAsync(request: carriers.Project_UpdateProjectMembersRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
2115
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2116
|
+
base.WebApiBase.SetPending(options);
|
|
2117
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
2118
|
+
try {
|
|
2119
|
+
config.baseURL = this._options.baseUrl;
|
|
2120
|
+
const response = await this._axios.post("UpdateProjectMembers", request , config);
|
|
2121
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
2122
|
+
const res = response.data;
|
|
2123
|
+
resolve(res);
|
|
2124
|
+
}
|
|
2125
|
+
catch( err ) {
|
|
2126
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2127
|
+
reject(err);
|
|
2128
|
+
}
|
|
2129
|
+
});
|
|
2130
|
+
}
|
|
2131
|
+
|
|
2132
|
+
|
|
2133
|
+
|
|
2134
|
+
/**
|
|
2135
|
+
* Update existing project members. Not creating new (only projectmember_id > 0 accepted)
|
|
2136
|
+
* @param request - ProjectId, ProjectMembers
|
|
2137
|
+
* @returns This method has no return value
|
|
2138
|
+
*/
|
|
2139
|
+
public async updateProjectMembersAsync(request: carriers.Project_UpdateProjectMembersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
2140
|
+
|
|
2141
|
+
/**
|
|
2142
|
+
* Update existing project members. Not creating new (only projectmember_id > 0 accepted)
|
|
2143
|
+
* @param projectId - Project of which members will be updated
|
|
2144
|
+
* @param projectMembers - Project members to update
|
|
2145
|
+
* @returns This method has no return value
|
|
2146
|
+
*/
|
|
2147
|
+
public async updateProjectMembersAsync(projectId: number, projectMembers: carriers.ProjectMember[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
2148
|
+
|
|
2149
|
+
public async updateProjectMembersAsync(projectId:number|carriers.Project_UpdateProjectMembersRequest, projectMembers?:carriers.ProjectMember[]|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
2150
|
+
let _request : carriers.Project_UpdateProjectMembersRequest = null;
|
|
2151
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2152
|
+
const first : any = projectId;
|
|
2153
|
+
if( typeof( first ) === "object" && first && ( typeof(first.projectId)!='undefined' || typeof(first.projectMembers)!='undefined' ) )
|
|
2154
|
+
{
|
|
2155
|
+
_request = projectId as carriers.Project_UpdateProjectMembersRequest;
|
|
2156
|
+
_options = projectMembers as base.WebApiRequestOptions;
|
|
2157
|
+
}
|
|
2158
|
+
else
|
|
2159
|
+
{
|
|
2160
|
+
_request = {
|
|
2161
|
+
projectId: projectId as number,
|
|
2162
|
+
projectMembers: projectMembers as carriers.ProjectMember[],
|
|
2163
|
+
};
|
|
2164
|
+
_options = webapi_options;
|
|
2165
|
+
}
|
|
2166
|
+
return this._updateProjectMembersAsync( _request, _options );
|
|
2167
|
+
}
|
|
2168
|
+
|
|
2169
|
+
|
|
2170
|
+
private async _getProjectMembersAsync(request: carriers.Project_GetProjectMembersRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember[] > {
|
|
2171
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2172
|
+
base.WebApiBase.SetPending(options);
|
|
2173
|
+
return new Promise< carriers.ProjectMember[] >(async (resolve, reject) => {
|
|
2174
|
+
try {
|
|
2175
|
+
config.baseURL = this._options.baseUrl;
|
|
2176
|
+
const response = await this._axios.post("GetProjectMembers", request , config);
|
|
2177
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
2178
|
+
const res : carriers.ProjectMember[] = converters.Create_ProjectMemberArray_From( response.data );
|
|
2179
|
+
resolve(res);
|
|
2180
|
+
}
|
|
2181
|
+
catch( err ) {
|
|
2182
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2183
|
+
reject(err);
|
|
2184
|
+
}
|
|
2185
|
+
});
|
|
2186
|
+
}
|
|
2187
|
+
|
|
2188
|
+
|
|
2189
|
+
|
|
2190
|
+
/**
|
|
2191
|
+
* Returns an array of project members
|
|
2192
|
+
* @param request - ProjectId
|
|
2193
|
+
* @returns An array of project members
|
|
2194
|
+
*/
|
|
2195
|
+
public async getProjectMembersAsync(request: carriers.Project_GetProjectMembersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember[] >;
|
|
2196
|
+
|
|
2197
|
+
/**
|
|
2198
|
+
* Returns an array of project members
|
|
2199
|
+
* @param projectId - The project id
|
|
2200
|
+
* @returns An array of project members
|
|
2201
|
+
*/
|
|
2202
|
+
public async getProjectMembersAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember[] >;
|
|
2203
|
+
|
|
2204
|
+
public async getProjectMembersAsync(projectId:number|carriers.Project_GetProjectMembersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember[] > {
|
|
2205
|
+
let _request : carriers.Project_GetProjectMembersRequest = null;
|
|
2206
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2207
|
+
const first : any = projectId;
|
|
2208
|
+
if( typeof( first ) === "object" && first && ( typeof(first.projectId)!='undefined' ) )
|
|
2209
|
+
{
|
|
2210
|
+
_request = projectId as carriers.Project_GetProjectMembersRequest;
|
|
2211
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
2212
|
+
}
|
|
2213
|
+
else
|
|
2214
|
+
{
|
|
2215
|
+
_request = {
|
|
2216
|
+
projectId: projectId as number,
|
|
2217
|
+
};
|
|
2218
|
+
_options = webapi_options;
|
|
2219
|
+
}
|
|
2220
|
+
return this._getProjectMembersAsync( _request, _options );
|
|
2221
|
+
}
|
|
2222
|
+
|
|
2223
|
+
|
|
2224
|
+
private async _updateProjectMemberAsync(request: carriers.Project_UpdateProjectMemberRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember > {
|
|
2225
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2226
|
+
base.WebApiBase.SetPending(options);
|
|
2227
|
+
return new Promise< carriers.ProjectMember >(async (resolve, reject) => {
|
|
2228
|
+
try {
|
|
2229
|
+
config.baseURL = this._options.baseUrl;
|
|
2230
|
+
const response = await this._axios.post("UpdateProjectMember", request , config);
|
|
2231
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
2232
|
+
const res : carriers.ProjectMember = converters.Create_ProjectMember_From( response.data );
|
|
2233
|
+
resolve(res);
|
|
2234
|
+
}
|
|
2235
|
+
catch( err ) {
|
|
2236
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2237
|
+
reject(err);
|
|
2238
|
+
}
|
|
2239
|
+
});
|
|
2240
|
+
}
|
|
2241
|
+
|
|
2242
|
+
|
|
2243
|
+
|
|
2244
|
+
/**
|
|
2245
|
+
* Updates a ProjectMember row.
|
|
2246
|
+
* @param request - ProjectMember
|
|
2247
|
+
* @returns The Updated ProjectMember
|
|
2248
|
+
*/
|
|
2249
|
+
public async updateProjectMemberAsync(request: carriers.Project_UpdateProjectMemberRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember >;
|
|
2250
|
+
|
|
2251
|
+
/**
|
|
2252
|
+
* Updates a ProjectMember row.
|
|
2253
|
+
* @param projectMember - ProjectMember to update
|
|
2254
|
+
* @returns The Updated ProjectMember
|
|
2255
|
+
*/
|
|
2256
|
+
public async updateProjectMemberAsync(projectMember: carriers.ProjectMember, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember >;
|
|
2257
|
+
|
|
2258
|
+
public async updateProjectMemberAsync(projectMember:carriers.ProjectMember|carriers.Project_UpdateProjectMemberRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember > {
|
|
2259
|
+
let _request : carriers.Project_UpdateProjectMemberRequest = null;
|
|
2260
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2261
|
+
const first : any = projectMember;
|
|
2262
|
+
if( typeof( first ) === "object" && first && ( typeof(first.projectMember)!='undefined' ) )
|
|
2263
|
+
{
|
|
2264
|
+
_request = projectMember as carriers.Project_UpdateProjectMemberRequest;
|
|
2265
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
2266
|
+
}
|
|
2267
|
+
else
|
|
2268
|
+
{
|
|
2269
|
+
_request = {
|
|
2270
|
+
projectMember: projectMember as carriers.ProjectMember,
|
|
2271
|
+
};
|
|
2272
|
+
_options = webapi_options;
|
|
2273
|
+
}
|
|
2274
|
+
return this._updateProjectMemberAsync( _request, _options );
|
|
2275
|
+
}
|
|
2276
|
+
|
|
2277
|
+
|
|
2278
|
+
private async _getProjectMembersByIdAsync(request: carriers.Project_GetProjectMembersByIdRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember[] > {
|
|
2279
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2280
|
+
base.WebApiBase.SetPending(options);
|
|
2281
|
+
return new Promise< carriers.ProjectMember[] >(async (resolve, reject) => {
|
|
2282
|
+
try {
|
|
2283
|
+
config.baseURL = this._options.baseUrl;
|
|
2284
|
+
const response = await this._axios.post("GetProjectMembersById", request , config);
|
|
2285
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
2286
|
+
const res : carriers.ProjectMember[] = converters.Create_ProjectMemberArray_From( response.data );
|
|
2287
|
+
resolve(res);
|
|
2288
|
+
}
|
|
2289
|
+
catch( err ) {
|
|
2290
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2291
|
+
reject(err);
|
|
2292
|
+
}
|
|
2293
|
+
});
|
|
2294
|
+
}
|
|
2295
|
+
|
|
2296
|
+
|
|
2297
|
+
|
|
2298
|
+
/**
|
|
2299
|
+
* Returns an array of project members
|
|
2300
|
+
* @param request - ProjectMemberIds
|
|
2301
|
+
* @returns An array of project members
|
|
2302
|
+
*/
|
|
2303
|
+
public async getProjectMembersByIdAsync(request: carriers.Project_GetProjectMembersByIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember[] >;
|
|
2304
|
+
|
|
2305
|
+
/**
|
|
2306
|
+
* Returns an array of project members
|
|
2307
|
+
* @param projectMemberIds -
|
|
2308
|
+
* @returns An array of project members
|
|
2309
|
+
*/
|
|
2310
|
+
public async getProjectMembersByIdAsync(projectMemberIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember[] >;
|
|
2311
|
+
|
|
2312
|
+
public async getProjectMembersByIdAsync(projectMemberIds:number[]|carriers.Project_GetProjectMembersByIdRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectMember[] > {
|
|
2313
|
+
let _request : carriers.Project_GetProjectMembersByIdRequest = null;
|
|
2314
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2315
|
+
const first : any = projectMemberIds;
|
|
2316
|
+
if( typeof( first ) === "object" && first && ( typeof(first.projectMemberIds)!='undefined' ) )
|
|
2317
|
+
{
|
|
2318
|
+
_request = projectMemberIds as carriers.Project_GetProjectMembersByIdRequest;
|
|
2319
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
2320
|
+
}
|
|
2321
|
+
else
|
|
2322
|
+
{
|
|
2323
|
+
_request = {
|
|
2324
|
+
projectMemberIds: projectMemberIds as number[],
|
|
2325
|
+
};
|
|
2326
|
+
_options = webapi_options;
|
|
2327
|
+
}
|
|
2328
|
+
return this._getProjectMembersByIdAsync( _request, _options );
|
|
2329
|
+
}
|
|
2330
|
+
|
|
2331
|
+
|
|
2332
|
+
private async _saveProjectMembersFunctionAndCommentAsync(request: carriers.Project_SaveProjectMembersFunctionAndCommentRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
2333
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2334
|
+
base.WebApiBase.SetPending(options);
|
|
2335
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
2336
|
+
try {
|
|
2337
|
+
config.baseURL = this._options.baseUrl;
|
|
2338
|
+
const response = await this._axios.post("SaveProjectMembersFunctionAndComment", request , config);
|
|
2339
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
2340
|
+
const res = response.data;
|
|
2341
|
+
resolve(res);
|
|
2342
|
+
}
|
|
2343
|
+
catch( err ) {
|
|
2344
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2345
|
+
reject(err);
|
|
2346
|
+
}
|
|
2347
|
+
});
|
|
2348
|
+
}
|
|
2349
|
+
|
|
2350
|
+
|
|
2351
|
+
|
|
2352
|
+
/**
|
|
2353
|
+
* Saves role and comment on an array of projectmembers represented by ids
|
|
2354
|
+
* @param request - ProjectMemberIds, RoleId, Comment
|
|
2355
|
+
* @returns
|
|
2356
|
+
*/
|
|
2357
|
+
public async saveProjectMembersFunctionAndCommentAsync(request: carriers.Project_SaveProjectMembersFunctionAndCommentRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
2358
|
+
|
|
2359
|
+
/**
|
|
2360
|
+
* Saves role and comment on an array of projectmembers represented by ids
|
|
2361
|
+
* @param projectMemberIds -
|
|
2362
|
+
* @param roleId -
|
|
2363
|
+
* @param comment -
|
|
2364
|
+
* @returns
|
|
2365
|
+
*/
|
|
2366
|
+
public async saveProjectMembersFunctionAndCommentAsync(projectMemberIds: number[], roleId: number, comment: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
2367
|
+
|
|
2368
|
+
public async saveProjectMembersFunctionAndCommentAsync(projectMemberIds:number[]|carriers.Project_SaveProjectMembersFunctionAndCommentRequest, roleId?:number|base.WebApiRequestOptions, comment?:string, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
2369
|
+
let _request : carriers.Project_SaveProjectMembersFunctionAndCommentRequest = null;
|
|
2370
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2371
|
+
const first : any = projectMemberIds;
|
|
2372
|
+
if( typeof( first ) === "object" && first && ( typeof(first.projectMemberIds)!='undefined' || typeof(first.roleId)!='undefined' || typeof(first.comment)!='undefined' ) )
|
|
2373
|
+
{
|
|
2374
|
+
_request = projectMemberIds as carriers.Project_SaveProjectMembersFunctionAndCommentRequest;
|
|
2375
|
+
_options = roleId as base.WebApiRequestOptions;
|
|
2376
|
+
}
|
|
2377
|
+
else
|
|
2378
|
+
{
|
|
2379
|
+
_request = {
|
|
2380
|
+
projectMemberIds: projectMemberIds as number[],
|
|
2381
|
+
roleId: roleId as number,
|
|
2382
|
+
comment: comment as string,
|
|
2383
|
+
};
|
|
2384
|
+
_options = webapi_options;
|
|
2385
|
+
}
|
|
2386
|
+
return this._saveProjectMembersFunctionAndCommentAsync( _request, _options );
|
|
2387
|
+
}
|
|
2388
|
+
|
|
2389
|
+
} // class v1ProjectAgentController
|
|
2390
|
+
|
|
2391
|
+
|