@superoffice/webapi 11.1.447 → 11.3.1349

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.
Files changed (92) hide show
  1. package/dist/cjs/AIAgent.d.ts +115 -0
  2. package/dist/cjs/AIAgent.d.ts.map +1 -1
  3. package/dist/cjs/AIAgent.js +243 -0
  4. package/dist/cjs/AIAgent.js.map +1 -1
  5. package/dist/cjs/Carriers.d.ts +586 -1
  6. package/dist/cjs/Carriers.d.ts.map +1 -1
  7. package/dist/cjs/ContactAgent.d.ts +33 -2
  8. package/dist/cjs/ContactAgent.d.ts.map +1 -1
  9. package/dist/cjs/ContactAgent.js +67 -0
  10. package/dist/cjs/ContactAgent.js.map +1 -1
  11. package/dist/cjs/Converters.d.ts +33 -0
  12. package/dist/cjs/Converters.d.ts.map +1 -1
  13. package/dist/cjs/Converters.js +477 -24
  14. package/dist/cjs/Converters.js.map +1 -1
  15. package/dist/cjs/DiagnosticsAgent.d.ts +7 -0
  16. package/dist/cjs/DiagnosticsAgent.d.ts.map +1 -1
  17. package/dist/cjs/DiagnosticsAgent.js +24 -0
  18. package/dist/cjs/DiagnosticsAgent.js.map +1 -1
  19. package/dist/cjs/Enums.d.ts +156 -8
  20. package/dist/cjs/Enums.d.ts.map +1 -1
  21. package/dist/cjs/Enums.js +159 -7
  22. package/dist/cjs/Enums.js.map +1 -1
  23. package/dist/cjs/ListAgent.d.ts +24 -0
  24. package/dist/cjs/ListAgent.d.ts.map +1 -1
  25. package/dist/cjs/ListAgent.js +66 -0
  26. package/dist/cjs/ListAgent.js.map +1 -1
  27. package/dist/cjs/PersonAgent.d.ts +15 -0
  28. package/dist/cjs/PersonAgent.d.ts.map +1 -1
  29. package/dist/cjs/PersonAgent.js +33 -0
  30. package/dist/cjs/PersonAgent.js.map +1 -1
  31. package/dist/cjs/PersonRestApi.d.ts.map +1 -1
  32. package/dist/cjs/PersonRestApi.js.map +1 -1
  33. package/dist/cjs/ProjectAgent.d.ts +16 -0
  34. package/dist/cjs/ProjectAgent.d.ts.map +1 -1
  35. package/dist/cjs/ProjectAgent.js +34 -0
  36. package/dist/cjs/ProjectAgent.js.map +1 -1
  37. package/dist/cjs/SelectionAgent.d.ts +76 -0
  38. package/dist/cjs/SelectionAgent.d.ts.map +1 -1
  39. package/dist/cjs/SelectionAgent.js +166 -0
  40. package/dist/cjs/SelectionAgent.js.map +1 -1
  41. package/dist/esm/AIAgent.d.ts +115 -0
  42. package/dist/esm/AIAgent.d.ts.map +1 -1
  43. package/dist/esm/AIAgent.js +243 -0
  44. package/dist/esm/AIAgent.js.map +1 -1
  45. package/dist/esm/Carriers.d.ts +586 -1
  46. package/dist/esm/Carriers.d.ts.map +1 -1
  47. package/dist/esm/ContactAgent.d.ts +33 -2
  48. package/dist/esm/ContactAgent.d.ts.map +1 -1
  49. package/dist/esm/ContactAgent.js +67 -0
  50. package/dist/esm/ContactAgent.js.map +1 -1
  51. package/dist/esm/Converters.d.ts +33 -0
  52. package/dist/esm/Converters.d.ts.map +1 -1
  53. package/dist/esm/Converters.js +419 -0
  54. package/dist/esm/Converters.js.map +1 -1
  55. package/dist/esm/DiagnosticsAgent.d.ts +7 -0
  56. package/dist/esm/DiagnosticsAgent.d.ts.map +1 -1
  57. package/dist/esm/DiagnosticsAgent.js +24 -0
  58. package/dist/esm/DiagnosticsAgent.js.map +1 -1
  59. package/dist/esm/Enums.d.ts +156 -8
  60. package/dist/esm/Enums.d.ts.map +1 -1
  61. package/dist/esm/Enums.js +156 -4
  62. package/dist/esm/Enums.js.map +1 -1
  63. package/dist/esm/ListAgent.d.ts +24 -0
  64. package/dist/esm/ListAgent.d.ts.map +1 -1
  65. package/dist/esm/ListAgent.js +66 -0
  66. package/dist/esm/ListAgent.js.map +1 -1
  67. package/dist/esm/PersonAgent.d.ts +15 -0
  68. package/dist/esm/PersonAgent.d.ts.map +1 -1
  69. package/dist/esm/PersonAgent.js +33 -0
  70. package/dist/esm/PersonAgent.js.map +1 -1
  71. package/dist/esm/PersonRestApi.d.ts.map +1 -1
  72. package/dist/esm/PersonRestApi.js.map +1 -1
  73. package/dist/esm/ProjectAgent.d.ts +16 -0
  74. package/dist/esm/ProjectAgent.d.ts.map +1 -1
  75. package/dist/esm/ProjectAgent.js +34 -0
  76. package/dist/esm/ProjectAgent.js.map +1 -1
  77. package/dist/esm/SelectionAgent.d.ts +76 -0
  78. package/dist/esm/SelectionAgent.d.ts.map +1 -1
  79. package/dist/esm/SelectionAgent.js +166 -0
  80. package/dist/esm/SelectionAgent.js.map +1 -1
  81. package/package.json +3 -3
  82. package/src/AIAgent.ts +413 -0
  83. package/src/Carriers.ts +816 -1
  84. package/src/ContactAgent.ts +116 -2
  85. package/src/Converters.ts +505 -0
  86. package/src/DiagnosticsAgent.ts +30 -0
  87. package/src/Enums.ts +160 -4
  88. package/src/ListAgent.ts +71 -0
  89. package/src/PersonAgent.ts +56 -0
  90. package/src/PersonRestApi.ts +2 -0
  91. package/src/ProjectAgent.ts +58 -0
  92. package/src/SelectionAgent.ts +282 -0
package/src/Enums.ts CHANGED
@@ -2579,6 +2579,10 @@
2579
2579
  * 12: Gauge
2580
2580
  */
2581
2581
  Gauge = "Gauge",
2582
+ /**
2583
+ * 13: Funnel
2584
+ */
2585
+ Funnel = "Funnel",
2582
2586
  }
2583
2587
 
2584
2588
 
@@ -3175,6 +3179,26 @@
3175
3179
  }
3176
3180
 
3177
3181
 
3182
+ /**
3183
+ * Board view entity type
3184
+ * This Enum is used by: board_view_settings.entity_type
3185
+ */
3186
+ export enum BoardViewEntityType {
3187
+ /**
3188
+ * 0: None
3189
+ */
3190
+ None = "None",
3191
+ /**
3192
+ * 1: Sale
3193
+ */
3194
+ Sale = "Sale",
3195
+ /**
3196
+ * 2: Project
3197
+ */
3198
+ Project = "Project",
3199
+ }
3200
+
3201
+
3178
3202
  /**
3179
3203
  * Workflow Goal Type
3180
3204
  * This Enum is used by: workflow_goal.goal_type
@@ -3292,6 +3316,10 @@
3292
3316
  * 14: RunScript
3293
3317
  */
3294
3318
  RunScript = "RunScript",
3319
+ /**
3320
+ * 15: DistributeToOwner
3321
+ */
3322
+ DistributeToOwner = "DistributeToOwner",
3295
3323
  }
3296
3324
 
3297
3325
 
@@ -4029,6 +4057,10 @@
4029
4057
  * 7: Data owned by users on the same project
4030
4058
  */
4031
4059
  SameProject = "SameProject",
4060
+ /**
4061
+ * 10: Custom objects
4062
+ */
4063
+ CustomObjects = "CustomObjects",
4032
4064
  }
4033
4065
 
4034
4066
 
@@ -5301,6 +5333,37 @@
5301
5333
  }
5302
5334
 
5303
5335
 
5336
+ /**
5337
+ * AI RAG Content types
5338
+ */
5339
+ export enum RagType {
5340
+ /**
5341
+ * 0: None - unknown type
5342
+ */
5343
+ None = "None",
5344
+ /**
5345
+ * 1: Ticket - request messages
5346
+ */
5347
+ Ticket = "Ticket",
5348
+ /**
5349
+ * 2: Webpage - one or more web pages
5350
+ */
5351
+ Webpage = "Webpage",
5352
+ /**
5353
+ * 3: Document - Docx/pptx/rtf/txt documents
5354
+ */
5355
+ Document = "Document",
5356
+ /**
5357
+ * 4: FAQ - Knowledge base entries
5358
+ */
5359
+ FAQ = "FAQ",
5360
+ /**
5361
+ * 5: Product - product info from pricelists
5362
+ */
5363
+ Product = "Product",
5364
+ }
5365
+
5366
+
5304
5367
  /**
5305
5368
  * HTML sanitizer options
5306
5369
  * This Enum consists of flag values that can be combined.
@@ -5369,6 +5432,38 @@
5369
5432
  }
5370
5433
 
5371
5434
 
5435
+ /**
5436
+ * 5 different type a category can be grouped as
5437
+ * This Enum is used by: Category.category_group
5438
+ */
5439
+ export enum CategoryGroup {
5440
+ /**
5441
+ * 0: Unknown category group
5442
+ */
5443
+ Unknown = "Unknown",
5444
+ /**
5445
+ * 1: Customer
5446
+ */
5447
+ Customer = "Customer",
5448
+ /**
5449
+ * 2: Potential customer
5450
+ */
5451
+ PotentialCustomer = "PotentialCustomer",
5452
+ /**
5453
+ * 3: Partner
5454
+ */
5455
+ Partner = "Partner",
5456
+ /**
5457
+ * 4: Lost
5458
+ */
5459
+ Lost = "Lost",
5460
+ /**
5461
+ * 5: Other
5462
+ */
5463
+ Other = "Other",
5464
+ }
5465
+
5466
+
5372
5467
  /**
5373
5468
  * CrmScript Event triggers - when CRMScript is run based on user or system actions.
5374
5469
  */
@@ -5801,6 +5896,14 @@
5801
5896
  * 1019: SalesSplitTicket
5802
5897
  */
5803
5898
  SalesSplitTicket = "SalesSplitTicket",
5899
+ /**
5900
+ * 1020: SalesLoadTicket
5901
+ */
5902
+ SalesLoadTicket = "SalesLoadTicket",
5903
+ /**
5904
+ * 1021: SalesLoadTicketMessage
5905
+ */
5906
+ SalesLoadTicketMessage = "SalesLoadTicketMessage",
5804
5907
  }
5805
5908
 
5806
5909
 
@@ -6354,13 +6457,17 @@
6354
6457
  */
6355
6458
  Custom = 1024,
6356
6459
  /**
6357
- * 2047: Notify all
6460
+ * 2048: Contact assignment
6461
+ */
6462
+ ContactAssignment = 2048,
6463
+ /**
6464
+ * 4095: Notify all
6358
6465
  */
6359
- NotifyAll = 2047,
6466
+ NotifyAll = 4095,
6360
6467
  /**
6361
- * 2048: Undefined and generated value 2048
6468
+ * 4096: Undefined and generated value 4096
6362
6469
  */
6363
- UndefinedValue2048 = 2048,
6470
+ UndefinedValue4096 = 4096,
6364
6471
  }
6365
6472
 
6366
6473
 
@@ -6384,6 +6491,55 @@
6384
6491
  }
6385
6492
 
6386
6493
 
6494
+ /**
6495
+ * Flag values for field 'blocked_verbs' in table 'ejscript'.
6496
+ * This Enum is used by: ejscript.blocked_verbs
6497
+ * This Enum consists of flag values that can be combined.
6498
+ */
6499
+ export enum EjScriptVerb {
6500
+ /**
6501
+ * 1: Block GET access
6502
+ */
6503
+ BlockGET = 1,
6504
+ /**
6505
+ * 2: Block POST access
6506
+ */
6507
+ BlockPOST = 2,
6508
+ /**
6509
+ * 4: Block PUT access
6510
+ */
6511
+ BlockPUT = 4,
6512
+ /**
6513
+ * 8: Block DELETE access
6514
+ */
6515
+ BlockDELETE = 8,
6516
+ /**
6517
+ * 16: Block PATCH access
6518
+ */
6519
+ BlockPATCH = 16,
6520
+ /**
6521
+ * 32: Block OPTIONS access
6522
+ */
6523
+ BlockOPTIONS = 32,
6524
+ /**
6525
+ * 64: Block HEAD access
6526
+ */
6527
+ BlockHEAD = 64,
6528
+ /**
6529
+ * 128: Block TRACE access
6530
+ */
6531
+ BlockTRACE = 128,
6532
+ /**
6533
+ * 256: Block CONNECT access
6534
+ */
6535
+ BlockCONNECT = 256,
6536
+ /**
6537
+ * 512: Block OTHER, can be used for custom verbs
6538
+ */
6539
+ BlockOTHER = 512,
6540
+ }
6541
+
6542
+
6387
6543
  /**
6388
6544
  * Chat Topic widget_theme: classic(0) or modern(1).
6389
6545
  * This Enum is used by: chat_topic.widget_theme
package/src/ListAgent.ts CHANGED
@@ -29,6 +29,8 @@ import { FromBase64ToString, ToBase64 } from './Base64.js';
29
29
  export interface IListAgent {
30
30
  createDefaultAmountClassEntityAsync(): Promise< carriers.AmountClassEntity >;
31
31
  saveAmountClassEntityAsync(entity: carriers.AmountClassEntity) : Promise< carriers.AmountClassEntity >;
32
+ createDefaultCategoryEntityAsync(): Promise< carriers.CategoryEntity >;
33
+ saveCategoryEntityAsync(entity: carriers.CategoryEntity) : Promise< carriers.CategoryEntity >;
32
34
  createDefaultTaskMenuAsync(): Promise< carriers.TaskMenu >;
33
35
  saveTaskMenuAsync(entity: carriers.TaskMenu) : Promise< carriers.TaskMenu >;
34
36
  deleteTaskMenuAsync(TaskMenuId: number) : Promise<void>;
@@ -77,6 +79,7 @@ export interface IListAgent {
77
79
  getBusinessListAsync(businessIds: number[]) : Promise< carriers.Business[] >;
78
80
  getBusinessesAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Business[] >;
79
81
  getCategoryAsync(categoryId: number) : Promise< carriers.Category >;
82
+ getCategoryEntityAsync(categoryEntityId: number) : Promise< carriers.CategoryEntity >;
80
83
  getCategoryListAsync(categoryIds: number[]) : Promise< carriers.Category[] >;
81
84
  getCategoriesAsync(webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Category[] >;
82
85
  getCompetitorAsync(competitorId: number) : Promise< carriers.Competitor >;
@@ -499,6 +502,51 @@ export class ListAgent extends base.WebApiBase implements IListAgent {
499
502
  });
500
503
  }
501
504
 
505
+ /**
506
+ * Set default values into a new CategoryEntity.
507
+ * NetServer calculates default values on the entity, which is required when creating/storing a new instance
508
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
509
+ * @returns A blank entity.
510
+ */
511
+ public async createDefaultCategoryEntityAsync(options?:base.WebApiRequestOptions) : Promise< carriers.CategoryEntity > {
512
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
513
+ base.WebApiBase.SetPending(options);
514
+ return new Promise< carriers.CategoryEntity >(async (resolve, reject) => {
515
+ try {
516
+ const response = await this._axios.post("CreateDefaultCategoryEntity", null, config);
517
+ base.WebApiBase.SetCompleted(options);
518
+ const res : carriers.CategoryEntity = converters.Create_CategoryEntity_From( response.data );
519
+ resolve(res);
520
+ }
521
+ catch( err ) {
522
+ base.WebApiBase.HandleError(options, config, err);
523
+ reject(err);
524
+ }
525
+ });
526
+ }
527
+ /**
528
+ * Replace the existing CategoryEntity or creates a new CategoryEntity if the id parameter is empty
529
+ * @param entity - The CategoryEntity to be saved.
530
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
531
+ * @returns New or updated CategoryEntity
532
+ */
533
+ public async saveCategoryEntityAsync(entity: carriers.CategoryEntity, options?:base.WebApiRequestOptions) : Promise< carriers.CategoryEntity > {
534
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
535
+ base.WebApiBase.SetPending(options);
536
+ return new Promise< carriers.CategoryEntity >(async (resolve, reject) => {
537
+ try {
538
+ const response = await this._axios.post("SaveCategoryEntity", entity, config);
539
+ base.WebApiBase.SetCompleted(options);
540
+ const res : carriers.CategoryEntity = converters.Create_CategoryEntity_From( response.data );
541
+ resolve(res);
542
+ }
543
+ catch( err ) {
544
+ base.WebApiBase.HandleError(options, config, err);
545
+ reject(err);
546
+ }
547
+ });
548
+ }
549
+
502
550
  /**
503
551
  * Set default values into a new TaskMenu.
504
552
  * NetServer calculates default values on the entity, which is required when creating/storing a new instance
@@ -1583,6 +1631,29 @@ export class ListAgent extends base.WebApiBase implements IListAgent {
1583
1631
  });
1584
1632
  }
1585
1633
 
1634
+ /**
1635
+ * Gets a CategoryEntity object.
1636
+ * @param categoryEntityId - The primary key.
1637
+ * @param options - Override language/culture codes on this request. Provide cancellation and request status values.
1638
+ * @returns A single CategoryEntity
1639
+ */
1640
+ public async getCategoryEntityAsync(categoryEntityId: number, options?:base.WebApiRequestOptions) : Promise< carriers.CategoryEntity > {
1641
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
1642
+ base.WebApiBase.SetPending(options);
1643
+ return new Promise< carriers.CategoryEntity >(async (resolve, reject) => {
1644
+ try {
1645
+ const response = await this._axios.post("GetCategoryEntity?categoryEntityId=" + categoryEntityId, null, config);
1646
+ base.WebApiBase.SetCompleted(options);
1647
+ const res = converters.Create_CategoryEntity_From( response.data );
1648
+ resolve(res);
1649
+ }
1650
+ catch( err ) {
1651
+ base.WebApiBase.HandleError(options, config, err);
1652
+ reject(err);
1653
+ }
1654
+ });
1655
+ }
1656
+
1586
1657
  /**
1587
1658
  * Gets an array of Category objects.
1588
1659
  * @param categoryIds - The primary keys.
@@ -115,6 +115,8 @@ export interface IPersonAgent {
115
115
  sendEmailAsync(from: string, to: string, subject: string, plainBody: string, htmlBody: string, attachmentIds: number[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
116
116
  sendEmailWithEventNameAsync(request: carriers.Person_SendEmailWithEventNameRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
117
117
  sendEmailWithEventNameAsync(from: string, to: string, subject: string, plainBody: string, htmlBody: string, attachmentIds: number[], eventName: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
118
+ getUtmParametersAsync(request: carriers.Person_GetUtmParametersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UtmParameters >;
119
+ getUtmParametersAsync(personId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UtmParameters >;
118
120
  getPersonListAsync(personIds: number[]) : Promise< carriers.Person[] >;
119
121
  getPersonsFromContactAsync(request: carriers.Person_GetPersonsFromContactRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Person[] >;
120
122
  getPersonsFromContactAsync(contactId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.Person[] >;
@@ -2647,6 +2649,60 @@ export class PersonAgent extends base.WebApiBase implements IPersonAgent {
2647
2649
  return this._sendEmailWithEventNameAsync( _request, _options );
2648
2650
  }
2649
2651
 
2652
+
2653
+ private async _getUtmParametersAsync(request: carriers.Person_GetUtmParametersRequest, options?:base.WebApiRequestOptions) : Promise< carriers.UtmParameters > {
2654
+ const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
2655
+ base.WebApiBase.SetPending(options);
2656
+ return new Promise< carriers.UtmParameters >(async (resolve, reject) => {
2657
+ try {
2658
+ config.baseURL = this._options.baseUrl;
2659
+ const response = await this._axios.post("GetUtmParameters", request , config);
2660
+ base.WebApiBase.SetCompleted(options);
2661
+ const res : carriers.UtmParameters = converters.Create_UtmParameters_From( response.data );
2662
+ resolve(res);
2663
+ }
2664
+ catch( err ) {
2665
+ base.WebApiBase.HandleError(options, config, err);
2666
+ reject(err);
2667
+ }
2668
+ });
2669
+ }
2670
+
2671
+
2672
+
2673
+ /**
2674
+ * Get all UTM parameters for a given person.
2675
+ * @param request - PersonId
2676
+ * @returns UTM parameters recorded on this person
2677
+ */
2678
+ public async getUtmParametersAsync(request: carriers.Person_GetUtmParametersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UtmParameters >;
2679
+
2680
+ /**
2681
+ * Get all UTM parameters for a given person.
2682
+ * @param personId - The person id to get UTM parameters for
2683
+ * @returns UTM parameters recorded on this person
2684
+ */
2685
+ public async getUtmParametersAsync(personId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UtmParameters >;
2686
+
2687
+ public async getUtmParametersAsync(personId:number|carriers.Person_GetUtmParametersRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.UtmParameters > {
2688
+ let _request : carriers.Person_GetUtmParametersRequest = null;
2689
+ let _options : base.WebApiRequestOptions = null;
2690
+ const first : any = personId;
2691
+ if( typeof( first ) === "object" && first && ( typeof(first.personId)!='undefined' ) )
2692
+ {
2693
+ _request = personId as carriers.Person_GetUtmParametersRequest;
2694
+ _options = webapi_options as base.WebApiRequestOptions;
2695
+ }
2696
+ else
2697
+ {
2698
+ _request = {
2699
+ personId: personId as number,
2700
+ };
2701
+ _options = webapi_options;
2702
+ }
2703
+ return this._getUtmParametersAsync( _request, _options );
2704
+ }
2705
+
2650
2706
  /**
2651
2707
  * Gets an array of Person objects.
2652
2708
  * @param personIds - The primary keys.
@@ -53,6 +53,8 @@ export interface IPersonRestApi {
53
53
 
54
54
  // POST Validate Async( personEntity ) = validatePersonEntity
55
55
 
56
+ // GET {personId}/UtmParameters Async( personId ) = getUtmParameters
57
+
56
58
 
57
59
  } // interface IPersonRestApi
58
60
 
@@ -71,6 +71,8 @@ export interface IProjectAgent {
71
71
  hasGuideActivitiesAsync(projectId: number, webapi_options?:base.WebApiRequestOptions) : Promise< boolean >;
72
72
  validateProjectEntityAsync(request: carriers.Project_ValidateProjectEntityRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.StringDictionary >;
73
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 >;
74
76
  getProjectEventAsync(projectEventId: number) : Promise< carriers.ProjectEvent >;
75
77
  getProjectEventOnPersonAsync(request: carriers.Project_GetProjectEventOnPersonRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEvent >;
76
78
  getProjectEventOnPersonAsync(projectId: number, personId: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ProjectEvent >;
@@ -1308,6 +1310,62 @@ export class ProjectAgent extends base.WebApiBase implements IProjectAgent {
1308
1310
  return this._validateProjectEntityAsync( _request, _options );
1309
1311
  }
1310
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);
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
+
1311
1369
  /**
1312
1370
  * Gets a ProjectEvent object.
1313
1371
  * @param projectEventId - The primary key.