@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.
- package/dist/cjs/AIAgent.d.ts +115 -0
- package/dist/cjs/AIAgent.d.ts.map +1 -1
- package/dist/cjs/AIAgent.js +243 -0
- package/dist/cjs/AIAgent.js.map +1 -1
- package/dist/cjs/Carriers.d.ts +586 -1
- package/dist/cjs/Carriers.d.ts.map +1 -1
- package/dist/cjs/ContactAgent.d.ts +33 -2
- package/dist/cjs/ContactAgent.d.ts.map +1 -1
- package/dist/cjs/ContactAgent.js +67 -0
- package/dist/cjs/ContactAgent.js.map +1 -1
- package/dist/cjs/Converters.d.ts +33 -0
- package/dist/cjs/Converters.d.ts.map +1 -1
- package/dist/cjs/Converters.js +477 -24
- package/dist/cjs/Converters.js.map +1 -1
- package/dist/cjs/DiagnosticsAgent.d.ts +7 -0
- package/dist/cjs/DiagnosticsAgent.d.ts.map +1 -1
- package/dist/cjs/DiagnosticsAgent.js +24 -0
- package/dist/cjs/DiagnosticsAgent.js.map +1 -1
- package/dist/cjs/Enums.d.ts +156 -8
- package/dist/cjs/Enums.d.ts.map +1 -1
- package/dist/cjs/Enums.js +159 -7
- package/dist/cjs/Enums.js.map +1 -1
- package/dist/cjs/ListAgent.d.ts +24 -0
- package/dist/cjs/ListAgent.d.ts.map +1 -1
- package/dist/cjs/ListAgent.js +66 -0
- package/dist/cjs/ListAgent.js.map +1 -1
- package/dist/cjs/PersonAgent.d.ts +15 -0
- package/dist/cjs/PersonAgent.d.ts.map +1 -1
- package/dist/cjs/PersonAgent.js +33 -0
- package/dist/cjs/PersonAgent.js.map +1 -1
- package/dist/cjs/PersonRestApi.d.ts.map +1 -1
- package/dist/cjs/PersonRestApi.js.map +1 -1
- package/dist/cjs/ProjectAgent.d.ts +16 -0
- package/dist/cjs/ProjectAgent.d.ts.map +1 -1
- package/dist/cjs/ProjectAgent.js +34 -0
- package/dist/cjs/ProjectAgent.js.map +1 -1
- package/dist/cjs/SelectionAgent.d.ts +76 -0
- package/dist/cjs/SelectionAgent.d.ts.map +1 -1
- package/dist/cjs/SelectionAgent.js +166 -0
- package/dist/cjs/SelectionAgent.js.map +1 -1
- package/dist/esm/AIAgent.d.ts +115 -0
- package/dist/esm/AIAgent.d.ts.map +1 -1
- package/dist/esm/AIAgent.js +243 -0
- package/dist/esm/AIAgent.js.map +1 -1
- package/dist/esm/Carriers.d.ts +586 -1
- package/dist/esm/Carriers.d.ts.map +1 -1
- package/dist/esm/ContactAgent.d.ts +33 -2
- package/dist/esm/ContactAgent.d.ts.map +1 -1
- package/dist/esm/ContactAgent.js +67 -0
- package/dist/esm/ContactAgent.js.map +1 -1
- package/dist/esm/Converters.d.ts +33 -0
- package/dist/esm/Converters.d.ts.map +1 -1
- package/dist/esm/Converters.js +419 -0
- package/dist/esm/Converters.js.map +1 -1
- package/dist/esm/DiagnosticsAgent.d.ts +7 -0
- package/dist/esm/DiagnosticsAgent.d.ts.map +1 -1
- package/dist/esm/DiagnosticsAgent.js +24 -0
- package/dist/esm/DiagnosticsAgent.js.map +1 -1
- package/dist/esm/Enums.d.ts +156 -8
- package/dist/esm/Enums.d.ts.map +1 -1
- package/dist/esm/Enums.js +156 -4
- package/dist/esm/Enums.js.map +1 -1
- package/dist/esm/ListAgent.d.ts +24 -0
- package/dist/esm/ListAgent.d.ts.map +1 -1
- package/dist/esm/ListAgent.js +66 -0
- package/dist/esm/ListAgent.js.map +1 -1
- package/dist/esm/PersonAgent.d.ts +15 -0
- package/dist/esm/PersonAgent.d.ts.map +1 -1
- package/dist/esm/PersonAgent.js +33 -0
- package/dist/esm/PersonAgent.js.map +1 -1
- package/dist/esm/PersonRestApi.d.ts.map +1 -1
- package/dist/esm/PersonRestApi.js.map +1 -1
- package/dist/esm/ProjectAgent.d.ts +16 -0
- package/dist/esm/ProjectAgent.d.ts.map +1 -1
- package/dist/esm/ProjectAgent.js +34 -0
- package/dist/esm/ProjectAgent.js.map +1 -1
- package/dist/esm/SelectionAgent.d.ts +76 -0
- package/dist/esm/SelectionAgent.d.ts.map +1 -1
- package/dist/esm/SelectionAgent.js +166 -0
- package/dist/esm/SelectionAgent.js.map +1 -1
- package/package.json +3 -3
- package/src/AIAgent.ts +413 -0
- package/src/Carriers.ts +816 -1
- package/src/ContactAgent.ts +116 -2
- package/src/Converters.ts +505 -0
- package/src/DiagnosticsAgent.ts +30 -0
- package/src/Enums.ts +160 -4
- package/src/ListAgent.ts +71 -0
- package/src/PersonAgent.ts +56 -0
- package/src/PersonRestApi.ts +2 -0
- package/src/ProjectAgent.ts +58 -0
- 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
|
-
*
|
|
6460
|
+
* 2048: Contact assignment
|
|
6461
|
+
*/
|
|
6462
|
+
ContactAssignment = 2048,
|
|
6463
|
+
/**
|
|
6464
|
+
* 4095: Notify all
|
|
6358
6465
|
*/
|
|
6359
|
-
NotifyAll =
|
|
6466
|
+
NotifyAll = 4095,
|
|
6360
6467
|
/**
|
|
6361
|
-
*
|
|
6468
|
+
* 4096: Undefined and generated value 4096
|
|
6362
6469
|
*/
|
|
6363
|
-
|
|
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.
|
package/src/PersonAgent.ts
CHANGED
|
@@ -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.
|
package/src/PersonRestApi.ts
CHANGED
package/src/ProjectAgent.ts
CHANGED
|
@@ -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.
|