@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/FindAgent.ts
CHANGED
|
@@ -1,2330 +1,2330 @@
|
|
|
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/FindAgent.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
|
-
* Find functions
|
|
28
|
-
*/
|
|
29
|
-
export interface IFindAgent {
|
|
30
|
-
getCriteriaInformationAsync(request: carriers.Find_GetCriteriaInformationRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
31
|
-
getCriteriaInformationAsync(storageType: string, providerName: string, storageKey: string, staticColumns: string[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
32
|
-
getCriteriaInformationWithContextAsync(request: carriers.Find_GetCriteriaInformationWithContextRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
33
|
-
getCriteriaInformationWithContextAsync(storageType: string, providerName: string, storageKey: string, staticColumns: string[], context: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
34
|
-
saveRestrictionsAsync(request: carriers.Find_SaveRestrictionsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
35
|
-
saveRestrictionsAsync(storageType: string, providerName: string, storageKey: string, restrictions: carriers.ArchiveRestrictionInfo[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
36
|
-
saveRestrictionsWithContextAsync(request: carriers.Find_SaveRestrictionsWithContextRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
37
|
-
saveRestrictionsWithContextAsync(storageType: string, providerName: string, storageKey: string, restrictions: carriers.ArchiveRestrictionInfo[], context: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
38
|
-
saveRestrictionGroupAsync(request: carriers.Find_SaveRestrictionGroupRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
39
|
-
saveRestrictionGroupAsync(storageType: string, providerName: string, storageKey: string, restrictionGroup: carriers.ArchiveRestrictionGroup, context: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
40
|
-
saveRestrictionGroupsAsync(request: carriers.Find_SaveRestrictionGroupsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup[] >;
|
|
41
|
-
saveRestrictionGroupsAsync(storageType: string, providerName: string, storageKey: string, restrictionGroups: carriers.ArchiveRestrictionGroup[], context: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup[] >;
|
|
42
|
-
getRestrictionGroupsAsync(request: carriers.Find_GetRestrictionGroupsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup[] >;
|
|
43
|
-
getRestrictionGroupsAsync(storageType: string, providerName: string, storageKey: string, context: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup[] >;
|
|
44
|
-
getRestrictionGroupAsync(request: carriers.Find_GetRestrictionGroupRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup >;
|
|
45
|
-
getRestrictionGroupAsync(storageType: string, providerName: string, storageKey: string, rank: number, context: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup >;
|
|
46
|
-
createRestrictionGroupAsync(request: carriers.Find_CreateRestrictionGroupRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup >;
|
|
47
|
-
createRestrictionGroupAsync(storageType: string, providerName: string, storageKey: string, context: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup >;
|
|
48
|
-
deleteRestrictionGroupAsync(request: carriers.Find_DeleteRestrictionGroupRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
49
|
-
deleteRestrictionGroupAsync(storageType: string, providerName: string, storageKey: string, rank: number, context: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
50
|
-
saveRestrictionsAndGetCriteriaInformationAsync(request: carriers.Find_SaveRestrictionsAndGetCriteriaInformationRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
51
|
-
saveRestrictionsAndGetCriteriaInformationAsync(storageType: string, providerName: string, storageKey: string, restrictions: carriers.ArchiveRestrictionInfo[], staticColumns: string[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
52
|
-
findAsync(request: carriers.Find_FindRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
53
|
-
findAsync(storageType: string, providerName: string, storageKey: string, pageSize: number, pageNumber: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
54
|
-
findFromRestrictionsAsync(request: carriers.Find_FindFromRestrictionsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
55
|
-
findFromRestrictionsAsync(restrictions: carriers.ArchiveRestrictionInfo[], providerName: string, pageSize: number, pageNumber: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
56
|
-
findFromRestrictionsColumnsAsync(request: carriers.Find_FindFromRestrictionsColumnsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
57
|
-
findFromRestrictionsColumnsAsync(restrictions: carriers.ArchiveRestrictionInfo[], providerName: string, desiredColumns: string[], pageSize: number, pageNumber: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
58
|
-
getAvailableRestrictionColumnsAsync(request: carriers.Find_GetAvailableRestrictionColumnsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string[] >;
|
|
59
|
-
getAvailableRestrictionColumnsAsync(storageType: string, providerName: string, webapi_options?:base.WebApiRequestOptions) : Promise< string[] >;
|
|
60
|
-
getSpecifiedCriteriaInformationWithDefaultsAsync(request: carriers.Find_GetSpecifiedCriteriaInformationWithDefaultsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
61
|
-
getSpecifiedCriteriaInformationWithDefaultsAsync(storageType: string, providerName: string, storageKey: string, desiredColumnNames: string[], staticColumns: string[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
62
|
-
getSpecifiedCriteriaInformationWithDefaultsWithContextAsync(request: carriers.Find_GetSpecifiedCriteriaInformationWithDefaultsWithContextRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
63
|
-
getSpecifiedCriteriaInformationWithDefaultsWithContextAsync(storageType: string, providerName: string, storageKey: string, desiredColumnNames: string[], staticColumns: string[], context: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
64
|
-
findFromRestrictionsColumnsOrderByAsync(request: carriers.Find_FindFromRestrictionsColumnsOrderByRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
65
|
-
findFromRestrictionsColumnsOrderByAsync(restrictions: carriers.ArchiveRestrictionInfo[], providerName: string, desiredColumns: string[], orderBy: carriers.ArchiveOrderByInfo[], pageSize: number, pageNumber: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
66
|
-
getDefaultDesiredColumnsAsync(request: carriers.Find_GetDefaultDesiredColumnsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveColumnInfo[] >;
|
|
67
|
-
getDefaultDesiredColumnsAsync(storageType: string, providerName: string, storageKey: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveColumnInfo[] >;
|
|
68
|
-
getDefaultOrderByAsync(request: carriers.Find_GetDefaultOrderByRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveOrderByInfo[] >;
|
|
69
|
-
getDefaultOrderByAsync(storageType: string, providerName: string, storageKey: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveOrderByInfo[] >;
|
|
70
|
-
populateRestrictionsAsync(request: carriers.Find_PopulateRestrictionsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionInfo[] >;
|
|
71
|
-
populateRestrictionsAsync(providerName: string, restrictions: carriers.ArchiveRestrictionInfo[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionInfo[] >;
|
|
72
|
-
populateRestrictionValuesAsync(request: carriers.Find_PopulateRestrictionValuesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionInfo[] >;
|
|
73
|
-
populateRestrictionValuesAsync(restrictions: carriers.ArchiveRestrictionInfo[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionInfo[] >;
|
|
74
|
-
getDefaultDesiredColumnsFromRestrictionsAsync(request: carriers.Find_GetDefaultDesiredColumnsFromRestrictionsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveColumnInfo[] >;
|
|
75
|
-
getDefaultDesiredColumnsFromRestrictionsAsync(providerName: string, restrictions: carriers.ArchiveRestrictionInfo[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveColumnInfo[] >;
|
|
76
|
-
getDefaultOrderByFromDesiredColumnsAsync(request: carriers.Find_GetDefaultOrderByFromDesiredColumnsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveOrderByInfo[] >;
|
|
77
|
-
getDefaultOrderByFromDesiredColumnsAsync(providerName: string, desiredColumns: string[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveOrderByInfo[] >;
|
|
78
|
-
findOrderByAsync(request: carriers.Find_FindOrderByRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
79
|
-
findOrderByAsync(storageType: string, providerName: string, storageKey: string, pageSize: number, pageNumber: number, orderBy: carriers.ArchiveOrderByInfo[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
80
|
-
findWithExtraRestrictionsAsync(request: carriers.Find_FindWithExtraRestrictionsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
81
|
-
findWithExtraRestrictionsAsync(storageType: string, providerName: string, storageKey: string, extraRestrictions: carriers.ArchiveRestrictionInfo[], orderBy: carriers.ArchiveOrderByInfo[], desiredColumns: string[], pageSize: number, pageNumber: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
82
|
-
findWithColumnsAsync(request: carriers.Find_FindWithColumnsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
83
|
-
findWithColumnsAsync(storageType: string, providerName: string, storageKey: string, desiredColumns: string[], pageSize: number, pageNumber: number, orderBy: carriers.ArchiveOrderByInfo[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
84
|
-
saveRestrictions2Async(request: carriers.Find_SaveRestrictions2Request, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
85
|
-
saveRestrictions2Async(storageType: string, providerName: string, storageKey: string, restrictions: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
86
|
-
saveRestrictionsWithContext2Async(request: carriers.Find_SaveRestrictionsWithContext2Request, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
87
|
-
saveRestrictionsWithContext2Async(storageType: string, providerName: string, storageKey: string, restrictions: string, context: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
88
|
-
saveRestrictionsAndGetCriteriaInformation2Async(request: carriers.Find_SaveRestrictionsAndGetCriteriaInformation2Request, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
89
|
-
saveRestrictionsAndGetCriteriaInformation2Async(storageType: string, providerName: string, storageKey: string, restrictions: string, staticColumns: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
90
|
-
findFromRestrictions2Async(request: carriers.Find_FindFromRestrictions2Request, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
91
|
-
findFromRestrictions2Async(restrictions: string, providerName: string, pageSize: number, pageNumber: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
92
|
-
findFromRestrictionsColumns2Async(request: carriers.Find_FindFromRestrictionsColumns2Request, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
93
|
-
findFromRestrictionsColumns2Async(restrictions: string, providerName: string, desiredColumns: string, pageSize: number, pageNumber: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
94
|
-
findFromRestrictionsColumnsOrderBy2Async(request: carriers.Find_FindFromRestrictionsColumnsOrderBy2Request, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
95
|
-
findFromRestrictionsColumnsOrderBy2Async(restrictions: string, providerName: string, desiredColumns: string, orderBy: string, pageSize: number, pageNumber: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
96
|
-
getDefaultDesiredColumnsFromRestrictions2Async(request: carriers.Find_GetDefaultDesiredColumnsFromRestrictions2Request, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveColumnInfo[] >;
|
|
97
|
-
getDefaultDesiredColumnsFromRestrictions2Async(providerName: string, restrictions: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveColumnInfo[] >;
|
|
98
|
-
findOrderBy2Async(request: carriers.Find_FindOrderBy2Request, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
99
|
-
findOrderBy2Async(storageType: string, providerName: string, storageKey: string, pageSize: number, pageNumber: number, orderBy: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
100
|
-
findWithExtraRestrictions2Async(request: carriers.Find_FindWithExtraRestrictions2Request, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
101
|
-
findWithExtraRestrictions2Async(storageType: string, providerName: string, storageKey: string, extraRestrictions: string, orderBy: string, desiredColumns: string, pageSize: number, pageNumber: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
102
|
-
} // interface IFindAgent
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* Find functions
|
|
109
|
-
*/
|
|
110
|
-
export class FindAgent extends base.WebApiBase implements IFindAgent {
|
|
111
|
-
constructor(baseUrl?: string, languageCode?:string, cultureCode?: string);
|
|
112
|
-
constructor(baseUrl?: string, resourceParsing?: base.ResourceParsing);
|
|
113
|
-
constructor(baseUrl: string, resourceManager:any);
|
|
114
|
-
constructor(baseUrl: string, config:AxiosRequestConfig, resourceManager:any);
|
|
115
|
-
constructor(baseUrl: string, config:AxiosRequestConfig, resourceParsing?: base.ResourceParsing);
|
|
116
|
-
constructor(baseUrl: string, config:AxiosRequestConfig, languageCode?:string, cultureCode?: string);
|
|
117
|
-
constructor(options: base.WebApiOptions);
|
|
118
|
-
|
|
119
|
-
constructor(baseUrlOrOptions: string|base.WebApiOptions|undefined,
|
|
120
|
-
langOrconfigOrRM?: string|base.ResourceParsing|AxiosRequestConfig|any,
|
|
121
|
-
langOrResourceOrRM?:string|base.ResourceParsing|any,
|
|
122
|
-
cultureCode?: string,
|
|
123
|
-
) {
|
|
124
|
-
const options = base.WebApiBase.FigureOutOptions(baseUrlOrOptions, langOrconfigOrRM, langOrResourceOrRM, cultureCode);
|
|
125
|
-
options.basePath = "v1/Agents/Find/";
|
|
126
|
-
super(options);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
private async _getCriteriaInformationAsync(request: carriers.Find_GetCriteriaInformationRequest, options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation > {
|
|
132
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
133
|
-
base.WebApiBase.SetPending(options);
|
|
134
|
-
return new Promise< carriers.CriteriaInformation >(async (resolve, reject) => {
|
|
135
|
-
try {
|
|
136
|
-
config.baseURL = this._options.baseUrl;
|
|
137
|
-
const response = await this._axios.post("GetCriteriaInformation", request , config);
|
|
138
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
139
|
-
const res : carriers.CriteriaInformation = converters.Create_CriteriaInformation_From( response.data );
|
|
140
|
-
resolve(res);
|
|
141
|
-
}
|
|
142
|
-
catch( err ) {
|
|
143
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
144
|
-
reject(err);
|
|
145
|
-
}
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* Get criteria information from a set of saved criteria. The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control
|
|
153
|
-
* @param request - StorageType, ProviderName, StorageKey, StaticColumns
|
|
154
|
-
* @returns The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control
|
|
155
|
-
*/
|
|
156
|
-
public async getCriteriaInformationAsync(request: carriers.Find_GetCriteriaInformationRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* Get criteria information from a set of saved criteria. The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control
|
|
160
|
-
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
161
|
-
* @param providerName - Name of archive provider that is the intended consumer of the restrictions
|
|
162
|
-
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search
|
|
163
|
-
* @param staticColumns - Optional array of restrictions that are to be EXCLUDED from the CriteriaArchiveRows part of the result. In the Find dialogs, that corresponds to the 'static' fields, to avoid duplicating them in the 'Match also' criteria list. This array can be null, indicating that all restrictions should be included in the criteria list.
|
|
164
|
-
* @returns The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control
|
|
165
|
-
*/
|
|
166
|
-
public async getCriteriaInformationAsync(storageType: string, providerName: string, storageKey: string, staticColumns: string[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
167
|
-
|
|
168
|
-
public async getCriteriaInformationAsync(storageType:string|carriers.Find_GetCriteriaInformationRequest, providerName?:string|base.WebApiRequestOptions, storageKey?:string, staticColumns?:string[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation > {
|
|
169
|
-
let _request : carriers.Find_GetCriteriaInformationRequest = null;
|
|
170
|
-
let _options : base.WebApiRequestOptions = null;
|
|
171
|
-
const first : any = storageType;
|
|
172
|
-
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.staticColumns)!='undefined' ) )
|
|
173
|
-
{
|
|
174
|
-
_request = storageType as carriers.Find_GetCriteriaInformationRequest;
|
|
175
|
-
_options = providerName as base.WebApiRequestOptions;
|
|
176
|
-
}
|
|
177
|
-
else
|
|
178
|
-
{
|
|
179
|
-
_request = {
|
|
180
|
-
storageType: storageType as string,
|
|
181
|
-
providerName: providerName as string,
|
|
182
|
-
storageKey: storageKey as string,
|
|
183
|
-
staticColumns: staticColumns as string[],
|
|
184
|
-
};
|
|
185
|
-
_options = webapi_options;
|
|
186
|
-
}
|
|
187
|
-
return this._getCriteriaInformationAsync( _request, _options );
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
private async _getCriteriaInformationWithContextAsync(request: carriers.Find_GetCriteriaInformationWithContextRequest, options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation > {
|
|
192
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
193
|
-
base.WebApiBase.SetPending(options);
|
|
194
|
-
return new Promise< carriers.CriteriaInformation >(async (resolve, reject) => {
|
|
195
|
-
try {
|
|
196
|
-
config.baseURL = this._options.baseUrl;
|
|
197
|
-
const response = await this._axios.post("GetCriteriaInformationWithContext", request , config);
|
|
198
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
199
|
-
const res : carriers.CriteriaInformation = converters.Create_CriteriaInformation_From( response.data );
|
|
200
|
-
resolve(res);
|
|
201
|
-
}
|
|
202
|
-
catch( err ) {
|
|
203
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
204
|
-
reject(err);
|
|
205
|
-
}
|
|
206
|
-
});
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
/**
|
|
212
|
-
* Get criteria information from a set of saved criteria. The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control
|
|
213
|
-
* @param request - StorageType, ProviderName, StorageKey, StaticColumns, Context
|
|
214
|
-
* @returns The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control
|
|
215
|
-
*/
|
|
216
|
-
public async getCriteriaInformationWithContextAsync(request: carriers.Find_GetCriteriaInformationWithContextRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
* Get criteria information from a set of saved criteria. The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control
|
|
220
|
-
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
221
|
-
* @param providerName - Name of archive provider that is the intended consumer of the restrictions
|
|
222
|
-
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search
|
|
223
|
-
* @param staticColumns - Optional array of restrictions that are to be EXCLUDED from the CriteriaArchiveRows part of the result. In the Find dialogs, that corresponds to the 'static' fields, to avoid duplicating them in the 'Match also' criteria list. This array can be null, indicating that all restrictions should be included in the criteria list.
|
|
224
|
-
* @param context - Optional context that can be used by FindProvider
|
|
225
|
-
* @returns The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control
|
|
226
|
-
*/
|
|
227
|
-
public async getCriteriaInformationWithContextAsync(storageType: string, providerName: string, storageKey: string, staticColumns: string[], context: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
228
|
-
|
|
229
|
-
public async getCriteriaInformationWithContextAsync(storageType:string|carriers.Find_GetCriteriaInformationWithContextRequest, providerName?:string|base.WebApiRequestOptions, storageKey?:string, staticColumns?:string[], context?:string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation > {
|
|
230
|
-
let _request : carriers.Find_GetCriteriaInformationWithContextRequest = null;
|
|
231
|
-
let _options : base.WebApiRequestOptions = null;
|
|
232
|
-
const first : any = storageType;
|
|
233
|
-
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.staticColumns)!='undefined' || typeof(first.context)!='undefined' ) )
|
|
234
|
-
{
|
|
235
|
-
_request = storageType as carriers.Find_GetCriteriaInformationWithContextRequest;
|
|
236
|
-
_options = providerName as base.WebApiRequestOptions;
|
|
237
|
-
}
|
|
238
|
-
else
|
|
239
|
-
{
|
|
240
|
-
_request = {
|
|
241
|
-
storageType: storageType as string,
|
|
242
|
-
providerName: providerName as string,
|
|
243
|
-
storageKey: storageKey as string,
|
|
244
|
-
staticColumns: staticColumns as string[],
|
|
245
|
-
context: context as string,
|
|
246
|
-
};
|
|
247
|
-
_options = webapi_options;
|
|
248
|
-
}
|
|
249
|
-
return this._getCriteriaInformationWithContextAsync( _request, _options );
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
private async _saveRestrictionsAsync(request: carriers.Find_SaveRestrictionsRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
254
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
255
|
-
base.WebApiBase.SetPending(options);
|
|
256
|
-
return new Promise< void >(async (resolve, reject) => {
|
|
257
|
-
try {
|
|
258
|
-
config.baseURL = this._options.baseUrl;
|
|
259
|
-
const response = await this._axios.post("SaveRestrictions", request , config);
|
|
260
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
261
|
-
const res = response.data;
|
|
262
|
-
resolve(res);
|
|
263
|
-
}
|
|
264
|
-
catch( err ) {
|
|
265
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
266
|
-
reject(err);
|
|
267
|
-
}
|
|
268
|
-
});
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
/**
|
|
274
|
-
* Save an array of restrictions for later use as search criteria (including as dynamic selection and Find).
|
|
275
|
-
* @param request - StorageType, ProviderName, StorageKey, Restrictions
|
|
276
|
-
* @returns This service call just saves the restrictions. See SaveRestrictionsAndGetCriteriaInformation if you would like the restrictions returned as criteria immediately, in one roundtrip
|
|
277
|
-
*/
|
|
278
|
-
public async saveRestrictionsAsync(request: carriers.Find_SaveRestrictionsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
279
|
-
|
|
280
|
-
/**
|
|
281
|
-
* Save an array of restrictions for later use as search criteria (including as dynamic selection and Find).
|
|
282
|
-
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
283
|
-
* @param providerName - Name of archive provider that is the intended consumer of the restrictions
|
|
284
|
-
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it saves the restrictions as criteria
|
|
285
|
-
* @param restrictions - Array of restrictions. The ColumnInfo member and the DisplayValues members need NOT be populated; it is enough to provide a name, operator and any values the operator may need. The IsActive is also saved. Values should be encoded using the CultureDataFormatter to ensure compatibility across cultures.
|
|
286
|
-
* @returns This service call just saves the restrictions. See SaveRestrictionsAndGetCriteriaInformation if you would like the restrictions returned as criteria immediately, in one roundtrip
|
|
287
|
-
*/
|
|
288
|
-
public async saveRestrictionsAsync(storageType: string, providerName: string, storageKey: string, restrictions: carriers.ArchiveRestrictionInfo[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
289
|
-
|
|
290
|
-
public async saveRestrictionsAsync(storageType:string|carriers.Find_SaveRestrictionsRequest, providerName?:string|base.WebApiRequestOptions, storageKey?:string, restrictions?:carriers.ArchiveRestrictionInfo[], webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
291
|
-
let _request : carriers.Find_SaveRestrictionsRequest = null;
|
|
292
|
-
let _options : base.WebApiRequestOptions = null;
|
|
293
|
-
const first : any = storageType;
|
|
294
|
-
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.restrictions)!='undefined' ) )
|
|
295
|
-
{
|
|
296
|
-
_request = storageType as carriers.Find_SaveRestrictionsRequest;
|
|
297
|
-
_options = providerName as base.WebApiRequestOptions;
|
|
298
|
-
}
|
|
299
|
-
else
|
|
300
|
-
{
|
|
301
|
-
_request = {
|
|
302
|
-
storageType: storageType as string,
|
|
303
|
-
providerName: providerName as string,
|
|
304
|
-
storageKey: storageKey as string,
|
|
305
|
-
restrictions: restrictions as carriers.ArchiveRestrictionInfo[],
|
|
306
|
-
};
|
|
307
|
-
_options = webapi_options;
|
|
308
|
-
}
|
|
309
|
-
return this._saveRestrictionsAsync( _request, _options );
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
private async _saveRestrictionsWithContextAsync(request: carriers.Find_SaveRestrictionsWithContextRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
314
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
315
|
-
base.WebApiBase.SetPending(options);
|
|
316
|
-
return new Promise< void >(async (resolve, reject) => {
|
|
317
|
-
try {
|
|
318
|
-
config.baseURL = this._options.baseUrl;
|
|
319
|
-
const response = await this._axios.post("SaveRestrictionsWithContext", request , config);
|
|
320
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
321
|
-
const res = response.data;
|
|
322
|
-
resolve(res);
|
|
323
|
-
}
|
|
324
|
-
catch( err ) {
|
|
325
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
326
|
-
reject(err);
|
|
327
|
-
}
|
|
328
|
-
});
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
/**
|
|
334
|
-
* Save an array of restrictions for later use as search criteria (including as dynamic selection and Find).
|
|
335
|
-
* @param request - StorageType, ProviderName, StorageKey, Restrictions, Context
|
|
336
|
-
* @returns This service call just saves the restrictions. See SaveRestrictionsAndGetCriteriaInformation if you would like the restrictions returned as criteria immediately, in one roundtrip
|
|
337
|
-
*/
|
|
338
|
-
public async saveRestrictionsWithContextAsync(request: carriers.Find_SaveRestrictionsWithContextRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
339
|
-
|
|
340
|
-
/**
|
|
341
|
-
* Save an array of restrictions for later use as search criteria (including as dynamic selection and Find).
|
|
342
|
-
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
343
|
-
* @param providerName - Name of archive provider that is the intended consumer of the restrictions
|
|
344
|
-
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it saves the restrictions as criteria
|
|
345
|
-
* @param restrictions - Array of restrictions. The ColumnInfo member and the DisplayValues members need NOT be populated; it is enough to provide a name, operator and any values the operator may need. The IsActive is also saved. Values should be encoded using the CultureDataFormatter to ensure compatibility across cultures.
|
|
346
|
-
* @param context - Optional context that can be used by FindProvider
|
|
347
|
-
* @returns This service call just saves the restrictions. See SaveRestrictionsAndGetCriteriaInformation if you would like the restrictions returned as criteria immediately, in one roundtrip
|
|
348
|
-
*/
|
|
349
|
-
public async saveRestrictionsWithContextAsync(storageType: string, providerName: string, storageKey: string, restrictions: carriers.ArchiveRestrictionInfo[], context: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
350
|
-
|
|
351
|
-
public async saveRestrictionsWithContextAsync(storageType:string|carriers.Find_SaveRestrictionsWithContextRequest, providerName?:string|base.WebApiRequestOptions, storageKey?:string, restrictions?:carriers.ArchiveRestrictionInfo[], context?:string, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
352
|
-
let _request : carriers.Find_SaveRestrictionsWithContextRequest = null;
|
|
353
|
-
let _options : base.WebApiRequestOptions = null;
|
|
354
|
-
const first : any = storageType;
|
|
355
|
-
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.restrictions)!='undefined' || typeof(first.context)!='undefined' ) )
|
|
356
|
-
{
|
|
357
|
-
_request = storageType as carriers.Find_SaveRestrictionsWithContextRequest;
|
|
358
|
-
_options = providerName as base.WebApiRequestOptions;
|
|
359
|
-
}
|
|
360
|
-
else
|
|
361
|
-
{
|
|
362
|
-
_request = {
|
|
363
|
-
storageType: storageType as string,
|
|
364
|
-
providerName: providerName as string,
|
|
365
|
-
storageKey: storageKey as string,
|
|
366
|
-
restrictions: restrictions as carriers.ArchiveRestrictionInfo[],
|
|
367
|
-
context: context as string,
|
|
368
|
-
};
|
|
369
|
-
_options = webapi_options;
|
|
370
|
-
}
|
|
371
|
-
return this._saveRestrictionsWithContextAsync( _request, _options );
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
private async _saveRestrictionGroupAsync(request: carriers.Find_SaveRestrictionGroupRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
376
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
377
|
-
base.WebApiBase.SetPending(options);
|
|
378
|
-
return new Promise< void >(async (resolve, reject) => {
|
|
379
|
-
try {
|
|
380
|
-
config.baseURL = this._options.baseUrl;
|
|
381
|
-
const response = await this._axios.post("SaveRestrictionGroup", request , config);
|
|
382
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
383
|
-
const res = response.data;
|
|
384
|
-
resolve(res);
|
|
385
|
-
}
|
|
386
|
-
catch( err ) {
|
|
387
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
388
|
-
reject(err);
|
|
389
|
-
}
|
|
390
|
-
});
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
/**
|
|
396
|
-
* Save an array of restrictions as a restriction group for later use as search criteria (including as dynamic selection and Find).
|
|
397
|
-
* @param request - StorageType, ProviderName, StorageKey, RestrictionGroup, Context
|
|
398
|
-
* @returns This service call just saves the restrictions.
|
|
399
|
-
*/
|
|
400
|
-
public async saveRestrictionGroupAsync(request: carriers.Find_SaveRestrictionGroupRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
401
|
-
|
|
402
|
-
/**
|
|
403
|
-
* Save an array of restrictions as a restriction group for later use as search criteria (including as dynamic selection and Find).
|
|
404
|
-
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
405
|
-
* @param providerName - Name of archive provider that is the intended consumer of the restrictions
|
|
406
|
-
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it saves the restrictions as criteria
|
|
407
|
-
* @param restrictionGroup - Information about a group of restrictions
|
|
408
|
-
* @param context - Optional context that can be used by FindProvider
|
|
409
|
-
* @returns This service call just saves the restrictions.
|
|
410
|
-
*/
|
|
411
|
-
public async saveRestrictionGroupAsync(storageType: string, providerName: string, storageKey: string, restrictionGroup: carriers.ArchiveRestrictionGroup, context: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
412
|
-
|
|
413
|
-
public async saveRestrictionGroupAsync(storageType:string|carriers.Find_SaveRestrictionGroupRequest, providerName?:string|base.WebApiRequestOptions, storageKey?:string, restrictionGroup?:carriers.ArchiveRestrictionGroup, context?:string, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
414
|
-
let _request : carriers.Find_SaveRestrictionGroupRequest = null;
|
|
415
|
-
let _options : base.WebApiRequestOptions = null;
|
|
416
|
-
const first : any = storageType;
|
|
417
|
-
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.restrictionGroup)!='undefined' || typeof(first.context)!='undefined' ) )
|
|
418
|
-
{
|
|
419
|
-
_request = storageType as carriers.Find_SaveRestrictionGroupRequest;
|
|
420
|
-
_options = providerName as base.WebApiRequestOptions;
|
|
421
|
-
}
|
|
422
|
-
else
|
|
423
|
-
{
|
|
424
|
-
_request = {
|
|
425
|
-
storageType: storageType as string,
|
|
426
|
-
providerName: providerName as string,
|
|
427
|
-
storageKey: storageKey as string,
|
|
428
|
-
restrictionGroup: restrictionGroup as carriers.ArchiveRestrictionGroup,
|
|
429
|
-
context: context as string,
|
|
430
|
-
};
|
|
431
|
-
_options = webapi_options;
|
|
432
|
-
}
|
|
433
|
-
return this._saveRestrictionGroupAsync( _request, _options );
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
private async _saveRestrictionGroupsAsync(request: carriers.Find_SaveRestrictionGroupsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup[] > {
|
|
438
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
439
|
-
base.WebApiBase.SetPending(options);
|
|
440
|
-
return new Promise< carriers.ArchiveRestrictionGroup[] >(async (resolve, reject) => {
|
|
441
|
-
try {
|
|
442
|
-
config.baseURL = this._options.baseUrl;
|
|
443
|
-
const response = await this._axios.post("SaveRestrictionGroups", request , config);
|
|
444
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
445
|
-
const res : carriers.ArchiveRestrictionGroup[] = converters.Create_ArchiveRestrictionGroupArray_From( response.data );
|
|
446
|
-
resolve(res);
|
|
447
|
-
}
|
|
448
|
-
catch( err ) {
|
|
449
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
450
|
-
reject(err);
|
|
451
|
-
}
|
|
452
|
-
});
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
/**
|
|
458
|
-
* Save and rerank an array of restriction groups, returning the possibly modified array.
|
|
459
|
-
* @param request - StorageType, ProviderName, StorageKey, RestrictionGroups, Context
|
|
460
|
-
* @returns The new restriction group.
|
|
461
|
-
*/
|
|
462
|
-
public async saveRestrictionGroupsAsync(request: carriers.Find_SaveRestrictionGroupsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup[] >;
|
|
463
|
-
|
|
464
|
-
/**
|
|
465
|
-
* Save and rerank an array of restriction groups, returning the possibly modified array.
|
|
466
|
-
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
467
|
-
* @param providerName - Name of archive provider that is the intended consumer of the restrictions
|
|
468
|
-
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it saves the restrictions as criteria
|
|
469
|
-
* @param restrictionGroups - Information about a group of restrictions
|
|
470
|
-
* @param context - Optional context that can be used by FindProvider
|
|
471
|
-
* @returns The new restriction group.
|
|
472
|
-
*/
|
|
473
|
-
public async saveRestrictionGroupsAsync(storageType: string, providerName: string, storageKey: string, restrictionGroups: carriers.ArchiveRestrictionGroup[], context: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup[] >;
|
|
474
|
-
|
|
475
|
-
public async saveRestrictionGroupsAsync(storageType:string|carriers.Find_SaveRestrictionGroupsRequest, providerName?:string|base.WebApiRequestOptions, storageKey?:string, restrictionGroups?:carriers.ArchiveRestrictionGroup[], context?:string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup[] > {
|
|
476
|
-
let _request : carriers.Find_SaveRestrictionGroupsRequest = null;
|
|
477
|
-
let _options : base.WebApiRequestOptions = null;
|
|
478
|
-
const first : any = storageType;
|
|
479
|
-
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.restrictionGroups)!='undefined' || typeof(first.context)!='undefined' ) )
|
|
480
|
-
{
|
|
481
|
-
_request = storageType as carriers.Find_SaveRestrictionGroupsRequest;
|
|
482
|
-
_options = providerName as base.WebApiRequestOptions;
|
|
483
|
-
}
|
|
484
|
-
else
|
|
485
|
-
{
|
|
486
|
-
_request = {
|
|
487
|
-
storageType: storageType as string,
|
|
488
|
-
providerName: providerName as string,
|
|
489
|
-
storageKey: storageKey as string,
|
|
490
|
-
restrictionGroups: restrictionGroups as carriers.ArchiveRestrictionGroup[],
|
|
491
|
-
context: context as string,
|
|
492
|
-
};
|
|
493
|
-
_options = webapi_options;
|
|
494
|
-
}
|
|
495
|
-
return this._saveRestrictionGroupsAsync( _request, _options );
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
private async _getRestrictionGroupsAsync(request: carriers.Find_GetRestrictionGroupsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup[] > {
|
|
500
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
501
|
-
base.WebApiBase.SetPending(options);
|
|
502
|
-
return new Promise< carriers.ArchiveRestrictionGroup[] >(async (resolve, reject) => {
|
|
503
|
-
try {
|
|
504
|
-
config.baseURL = this._options.baseUrl;
|
|
505
|
-
const response = await this._axios.post("GetRestrictionGroups", request , config);
|
|
506
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
507
|
-
const res : carriers.ArchiveRestrictionGroup[] = converters.Create_ArchiveRestrictionGroupArray_From( response.data );
|
|
508
|
-
resolve(res);
|
|
509
|
-
}
|
|
510
|
-
catch( err ) {
|
|
511
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
512
|
-
reject(err);
|
|
513
|
-
}
|
|
514
|
-
});
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
/**
|
|
520
|
-
* Return all the restriction groups.
|
|
521
|
-
* @param request - StorageType, ProviderName, StorageKey, Context
|
|
522
|
-
* @returns The restriction groups.
|
|
523
|
-
*/
|
|
524
|
-
public async getRestrictionGroupsAsync(request: carriers.Find_GetRestrictionGroupsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup[] >;
|
|
525
|
-
|
|
526
|
-
/**
|
|
527
|
-
* Return all the restriction groups.
|
|
528
|
-
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
529
|
-
* @param providerName - Name of archive provider that is the intended consumer of the restrictions
|
|
530
|
-
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it saves the restrictions as criteria
|
|
531
|
-
* @param context - Optional context that can be used by FindProvider
|
|
532
|
-
* @returns The restriction groups.
|
|
533
|
-
*/
|
|
534
|
-
public async getRestrictionGroupsAsync(storageType: string, providerName: string, storageKey: string, context: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup[] >;
|
|
535
|
-
|
|
536
|
-
public async getRestrictionGroupsAsync(storageType:string|carriers.Find_GetRestrictionGroupsRequest, providerName?:string|base.WebApiRequestOptions, storageKey?:string, context?:string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup[] > {
|
|
537
|
-
let _request : carriers.Find_GetRestrictionGroupsRequest = null;
|
|
538
|
-
let _options : base.WebApiRequestOptions = null;
|
|
539
|
-
const first : any = storageType;
|
|
540
|
-
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.context)!='undefined' ) )
|
|
541
|
-
{
|
|
542
|
-
_request = storageType as carriers.Find_GetRestrictionGroupsRequest;
|
|
543
|
-
_options = providerName as base.WebApiRequestOptions;
|
|
544
|
-
}
|
|
545
|
-
else
|
|
546
|
-
{
|
|
547
|
-
_request = {
|
|
548
|
-
storageType: storageType as string,
|
|
549
|
-
providerName: providerName as string,
|
|
550
|
-
storageKey: storageKey as string,
|
|
551
|
-
context: context as string,
|
|
552
|
-
};
|
|
553
|
-
_options = webapi_options;
|
|
554
|
-
}
|
|
555
|
-
return this._getRestrictionGroupsAsync( _request, _options );
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
private async _getRestrictionGroupAsync(request: carriers.Find_GetRestrictionGroupRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup > {
|
|
560
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
561
|
-
base.WebApiBase.SetPending(options);
|
|
562
|
-
return new Promise< carriers.ArchiveRestrictionGroup >(async (resolve, reject) => {
|
|
563
|
-
try {
|
|
564
|
-
config.baseURL = this._options.baseUrl;
|
|
565
|
-
const response = await this._axios.post("GetRestrictionGroup", request , config);
|
|
566
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
567
|
-
const res : carriers.ArchiveRestrictionGroup = converters.Create_ArchiveRestrictionGroup_From( response.data );
|
|
568
|
-
resolve(res);
|
|
569
|
-
}
|
|
570
|
-
catch( err ) {
|
|
571
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
572
|
-
reject(err);
|
|
573
|
-
}
|
|
574
|
-
});
|
|
575
|
-
}
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
/**
|
|
580
|
-
* Return the restriction group with given rank or a blank carrier.
|
|
581
|
-
* @param request - StorageType, ProviderName, StorageKey, Rank, Context
|
|
582
|
-
* @returns The new restriction group.
|
|
583
|
-
*/
|
|
584
|
-
public async getRestrictionGroupAsync(request: carriers.Find_GetRestrictionGroupRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup >;
|
|
585
|
-
|
|
586
|
-
/**
|
|
587
|
-
* Return the restriction group with given rank or a blank carrier.
|
|
588
|
-
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
589
|
-
* @param providerName - Name of archive provider that is the intended consumer of the restrictions
|
|
590
|
-
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it saves the restrictions as criteria
|
|
591
|
-
* @param rank - Rank of the group to be deleted.
|
|
592
|
-
* @param context - Optional context that can be used by FindProvider
|
|
593
|
-
* @returns The new restriction group.
|
|
594
|
-
*/
|
|
595
|
-
public async getRestrictionGroupAsync(storageType: string, providerName: string, storageKey: string, rank: number, context: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup >;
|
|
596
|
-
|
|
597
|
-
public async getRestrictionGroupAsync(storageType:string|carriers.Find_GetRestrictionGroupRequest, providerName?:string|base.WebApiRequestOptions, storageKey?:string, rank?:number, context?:string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup > {
|
|
598
|
-
let _request : carriers.Find_GetRestrictionGroupRequest = null;
|
|
599
|
-
let _options : base.WebApiRequestOptions = null;
|
|
600
|
-
const first : any = storageType;
|
|
601
|
-
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.rank)!='undefined' || typeof(first.context)!='undefined' ) )
|
|
602
|
-
{
|
|
603
|
-
_request = storageType as carriers.Find_GetRestrictionGroupRequest;
|
|
604
|
-
_options = providerName as base.WebApiRequestOptions;
|
|
605
|
-
}
|
|
606
|
-
else
|
|
607
|
-
{
|
|
608
|
-
_request = {
|
|
609
|
-
storageType: storageType as string,
|
|
610
|
-
providerName: providerName as string,
|
|
611
|
-
storageKey: storageKey as string,
|
|
612
|
-
rank: rank as number,
|
|
613
|
-
context: context as string,
|
|
614
|
-
};
|
|
615
|
-
_options = webapi_options;
|
|
616
|
-
}
|
|
617
|
-
return this._getRestrictionGroupAsync( _request, _options );
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
private async _createRestrictionGroupAsync(request: carriers.Find_CreateRestrictionGroupRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup > {
|
|
622
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
623
|
-
base.WebApiBase.SetPending(options);
|
|
624
|
-
return new Promise< carriers.ArchiveRestrictionGroup >(async (resolve, reject) => {
|
|
625
|
-
try {
|
|
626
|
-
config.baseURL = this._options.baseUrl;
|
|
627
|
-
const response = await this._axios.post("CreateRestrictionGroup", request , config);
|
|
628
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
629
|
-
const res : carriers.ArchiveRestrictionGroup = converters.Create_ArchiveRestrictionGroup_From( response.data );
|
|
630
|
-
resolve(res);
|
|
631
|
-
}
|
|
632
|
-
catch( err ) {
|
|
633
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
634
|
-
reject(err);
|
|
635
|
-
}
|
|
636
|
-
});
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
/**
|
|
642
|
-
* Create a restriction group, initialized with next rank etc.
|
|
643
|
-
* @param request - StorageType, ProviderName, StorageKey, Context
|
|
644
|
-
* @returns The new restriction group.
|
|
645
|
-
*/
|
|
646
|
-
public async createRestrictionGroupAsync(request: carriers.Find_CreateRestrictionGroupRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup >;
|
|
647
|
-
|
|
648
|
-
/**
|
|
649
|
-
* Create a restriction group, initialized with next rank etc.
|
|
650
|
-
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
651
|
-
* @param providerName - Name of archive provider that is the intended consumer of the restrictions
|
|
652
|
-
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it saves the restrictions as criteria
|
|
653
|
-
* @param context - Optional context that can be used by FindProvider
|
|
654
|
-
* @returns The new restriction group.
|
|
655
|
-
*/
|
|
656
|
-
public async createRestrictionGroupAsync(storageType: string, providerName: string, storageKey: string, context: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup >;
|
|
657
|
-
|
|
658
|
-
public async createRestrictionGroupAsync(storageType:string|carriers.Find_CreateRestrictionGroupRequest, providerName?:string|base.WebApiRequestOptions, storageKey?:string, context?:string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup > {
|
|
659
|
-
let _request : carriers.Find_CreateRestrictionGroupRequest = null;
|
|
660
|
-
let _options : base.WebApiRequestOptions = null;
|
|
661
|
-
const first : any = storageType;
|
|
662
|
-
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.context)!='undefined' ) )
|
|
663
|
-
{
|
|
664
|
-
_request = storageType as carriers.Find_CreateRestrictionGroupRequest;
|
|
665
|
-
_options = providerName as base.WebApiRequestOptions;
|
|
666
|
-
}
|
|
667
|
-
else
|
|
668
|
-
{
|
|
669
|
-
_request = {
|
|
670
|
-
storageType: storageType as string,
|
|
671
|
-
providerName: providerName as string,
|
|
672
|
-
storageKey: storageKey as string,
|
|
673
|
-
context: context as string,
|
|
674
|
-
};
|
|
675
|
-
_options = webapi_options;
|
|
676
|
-
}
|
|
677
|
-
return this._createRestrictionGroupAsync( _request, _options );
|
|
678
|
-
}
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
private async _deleteRestrictionGroupAsync(request: carriers.Find_DeleteRestrictionGroupRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
682
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
683
|
-
base.WebApiBase.SetPending(options);
|
|
684
|
-
return new Promise< void >(async (resolve, reject) => {
|
|
685
|
-
try {
|
|
686
|
-
config.baseURL = this._options.baseUrl;
|
|
687
|
-
const response = await this._axios.post("DeleteRestrictionGroup", request , config);
|
|
688
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
689
|
-
const res = response.data;
|
|
690
|
-
resolve(res);
|
|
691
|
-
}
|
|
692
|
-
catch( err ) {
|
|
693
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
694
|
-
reject(err);
|
|
695
|
-
}
|
|
696
|
-
});
|
|
697
|
-
}
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
/**
|
|
702
|
-
* Create a restriction group, initialized with next rank etc.
|
|
703
|
-
* @param request - StorageType, ProviderName, StorageKey, Rank, Context
|
|
704
|
-
* @returns This service call just saves the restrictions.
|
|
705
|
-
*/
|
|
706
|
-
public async deleteRestrictionGroupAsync(request: carriers.Find_DeleteRestrictionGroupRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
707
|
-
|
|
708
|
-
/**
|
|
709
|
-
* Create a restriction group, initialized with next rank etc.
|
|
710
|
-
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
711
|
-
* @param providerName - Name of archive provider that is the intended consumer of the restrictions
|
|
712
|
-
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it saves the restrictions as criteria
|
|
713
|
-
* @param rank - Rank of the group to be deleted.
|
|
714
|
-
* @param context - Optional context that can be used by FindProvider
|
|
715
|
-
* @returns This service call just saves the restrictions.
|
|
716
|
-
*/
|
|
717
|
-
public async deleteRestrictionGroupAsync(storageType: string, providerName: string, storageKey: string, rank: number, context: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
718
|
-
|
|
719
|
-
public async deleteRestrictionGroupAsync(storageType:string|carriers.Find_DeleteRestrictionGroupRequest, providerName?:string|base.WebApiRequestOptions, storageKey?:string, rank?:number, context?:string, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
720
|
-
let _request : carriers.Find_DeleteRestrictionGroupRequest = null;
|
|
721
|
-
let _options : base.WebApiRequestOptions = null;
|
|
722
|
-
const first : any = storageType;
|
|
723
|
-
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.rank)!='undefined' || typeof(first.context)!='undefined' ) )
|
|
724
|
-
{
|
|
725
|
-
_request = storageType as carriers.Find_DeleteRestrictionGroupRequest;
|
|
726
|
-
_options = providerName as base.WebApiRequestOptions;
|
|
727
|
-
}
|
|
728
|
-
else
|
|
729
|
-
{
|
|
730
|
-
_request = {
|
|
731
|
-
storageType: storageType as string,
|
|
732
|
-
providerName: providerName as string,
|
|
733
|
-
storageKey: storageKey as string,
|
|
734
|
-
rank: rank as number,
|
|
735
|
-
context: context as string,
|
|
736
|
-
};
|
|
737
|
-
_options = webapi_options;
|
|
738
|
-
}
|
|
739
|
-
return this._deleteRestrictionGroupAsync( _request, _options );
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
private async _saveRestrictionsAndGetCriteriaInformationAsync(request: carriers.Find_SaveRestrictionsAndGetCriteriaInformationRequest, options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation > {
|
|
744
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
745
|
-
base.WebApiBase.SetPending(options);
|
|
746
|
-
return new Promise< carriers.CriteriaInformation >(async (resolve, reject) => {
|
|
747
|
-
try {
|
|
748
|
-
config.baseURL = this._options.baseUrl;
|
|
749
|
-
const response = await this._axios.post("SaveRestrictionsAndGetCriteriaInformation", request , config);
|
|
750
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
751
|
-
const res : carriers.CriteriaInformation = converters.Create_CriteriaInformation_From( response.data );
|
|
752
|
-
resolve(res);
|
|
753
|
-
}
|
|
754
|
-
catch( err ) {
|
|
755
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
756
|
-
reject(err);
|
|
757
|
-
}
|
|
758
|
-
});
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
/**
|
|
764
|
-
* Save an array of restrictions for later use as search criteria (including as dynamic selection and Find). Then, return the same result as a call to GetCriteriaInformation would have done. The purpose is to encapsulate saving and updating of a GUI in one round trip.
|
|
765
|
-
* @param request - StorageType, ProviderName, StorageKey, Restrictions, StaticColumns
|
|
766
|
-
* @returns The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control
|
|
767
|
-
*/
|
|
768
|
-
public async saveRestrictionsAndGetCriteriaInformationAsync(request: carriers.Find_SaveRestrictionsAndGetCriteriaInformationRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
769
|
-
|
|
770
|
-
/**
|
|
771
|
-
* Save an array of restrictions for later use as search criteria (including as dynamic selection and Find). Then, return the same result as a call to GetCriteriaInformation would have done. The purpose is to encapsulate saving and updating of a GUI in one round trip.
|
|
772
|
-
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
773
|
-
* @param providerName - Name of archive provider that is the intended consumer of the restrictions
|
|
774
|
-
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it saves the restrictions as criteria
|
|
775
|
-
* @param restrictions - Array of restrictions. The ColumnInfo member and the DisplayValues members need NOT be populated; it is enough to provide a name, operator and any values the operator may need. The IsActive is also saved. Values should be encoded using the CultureDataFormatter to ensure compatibility across cultures.
|
|
776
|
-
* @param staticColumns - Optional array of restrictions that are to be EXCLUDED from the CriteriaArchiveRows part of the result. In the Find dialogs, that corresponds to the 'static' fields, to avoid duplicating them in the 'Match also' criteria list. This array can be null, indicating that all restrictions should be included in the criteria list.
|
|
777
|
-
* @returns The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control
|
|
778
|
-
*/
|
|
779
|
-
public async saveRestrictionsAndGetCriteriaInformationAsync(storageType: string, providerName: string, storageKey: string, restrictions: carriers.ArchiveRestrictionInfo[], staticColumns: string[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
780
|
-
|
|
781
|
-
public async saveRestrictionsAndGetCriteriaInformationAsync(storageType:string|carriers.Find_SaveRestrictionsAndGetCriteriaInformationRequest, providerName?:string|base.WebApiRequestOptions, storageKey?:string, restrictions?:carriers.ArchiveRestrictionInfo[], staticColumns?:string[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation > {
|
|
782
|
-
let _request : carriers.Find_SaveRestrictionsAndGetCriteriaInformationRequest = null;
|
|
783
|
-
let _options : base.WebApiRequestOptions = null;
|
|
784
|
-
const first : any = storageType;
|
|
785
|
-
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.restrictions)!='undefined' || typeof(first.staticColumns)!='undefined' ) )
|
|
786
|
-
{
|
|
787
|
-
_request = storageType as carriers.Find_SaveRestrictionsAndGetCriteriaInformationRequest;
|
|
788
|
-
_options = providerName as base.WebApiRequestOptions;
|
|
789
|
-
}
|
|
790
|
-
else
|
|
791
|
-
{
|
|
792
|
-
_request = {
|
|
793
|
-
storageType: storageType as string,
|
|
794
|
-
providerName: providerName as string,
|
|
795
|
-
storageKey: storageKey as string,
|
|
796
|
-
restrictions: restrictions as carriers.ArchiveRestrictionInfo[],
|
|
797
|
-
staticColumns: staticColumns as string[],
|
|
798
|
-
};
|
|
799
|
-
_options = webapi_options;
|
|
800
|
-
}
|
|
801
|
-
return this._saveRestrictionsAndGetCriteriaInformationAsync( _request, _options );
|
|
802
|
-
}
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
private async _findAsync(request: carriers.Find_FindRequest, options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
806
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
807
|
-
base.WebApiBase.SetPending(options);
|
|
808
|
-
return new Promise< carriers.FindResults >(async (resolve, reject) => {
|
|
809
|
-
try {
|
|
810
|
-
config.baseURL = this._options.baseUrl;
|
|
811
|
-
const response = await this._axios.post("Find", request , config);
|
|
812
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
813
|
-
const res : carriers.FindResults = converters.Create_FindResults_From( response.data );
|
|
814
|
-
resolve(res);
|
|
815
|
-
}
|
|
816
|
-
catch( err ) {
|
|
817
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
818
|
-
reject(err);
|
|
819
|
-
}
|
|
820
|
-
});
|
|
821
|
-
}
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
/**
|
|
826
|
-
* Execute a Find operation and return a page of results. The criteria for the Find are fetched from the restriction storage provider according to the given parameters. The columns of the result are calculated based on the restriction. The orderby columns are also calculated by the system.<para/>The other variants of the Find method allow you greater control over the individual aspects of the process.
|
|
827
|
-
* @param request - StorageType, ProviderName, StorageKey, PageSize, PageNumber
|
|
828
|
-
* @returns Results from search, containing column information and result rows.
|
|
829
|
-
*/
|
|
830
|
-
public async findAsync(request: carriers.Find_FindRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
831
|
-
|
|
832
|
-
/**
|
|
833
|
-
* Execute a Find operation and return a page of results. The criteria for the Find are fetched from the restriction storage provider according to the given parameters. The columns of the result are calculated based on the restriction. The orderby columns are also calculated by the system.<para/>The other variants of the Find method allow you greater control over the individual aspects of the process.
|
|
834
|
-
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
835
|
-
* @param providerName - Name of archive provider that is to execute the search and return the result columns/rows
|
|
836
|
-
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search
|
|
837
|
-
* @param pageSize - Size of result set pages
|
|
838
|
-
* @param pageNumber - Result set page to return, 0 is the first page. When a call returns no rows, no further pages are available. Negative page numbers are interpreted as number of rows to skip.
|
|
839
|
-
* @returns Results from search, containing column information and result rows.
|
|
840
|
-
*/
|
|
841
|
-
public async findAsync(storageType: string, providerName: string, storageKey: string, pageSize: number, pageNumber: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
842
|
-
|
|
843
|
-
public async findAsync(storageType:string|carriers.Find_FindRequest, providerName?:string|base.WebApiRequestOptions, storageKey?:string, pageSize?:number, pageNumber?:number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
844
|
-
let _request : carriers.Find_FindRequest = null;
|
|
845
|
-
let _options : base.WebApiRequestOptions = null;
|
|
846
|
-
const first : any = storageType;
|
|
847
|
-
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.pageSize)!='undefined' || typeof(first.pageNumber)!='undefined' ) )
|
|
848
|
-
{
|
|
849
|
-
_request = storageType as carriers.Find_FindRequest;
|
|
850
|
-
_options = providerName as base.WebApiRequestOptions;
|
|
851
|
-
}
|
|
852
|
-
else
|
|
853
|
-
{
|
|
854
|
-
_request = {
|
|
855
|
-
storageType: storageType as string,
|
|
856
|
-
providerName: providerName as string,
|
|
857
|
-
storageKey: storageKey as string,
|
|
858
|
-
pageSize: pageSize as number,
|
|
859
|
-
pageNumber: pageNumber as number,
|
|
860
|
-
};
|
|
861
|
-
_options = webapi_options;
|
|
862
|
-
}
|
|
863
|
-
return this._findAsync( _request, _options );
|
|
864
|
-
}
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
private async _findFromRestrictionsAsync(request: carriers.Find_FindFromRestrictionsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
868
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
869
|
-
base.WebApiBase.SetPending(options);
|
|
870
|
-
return new Promise< carriers.FindResults >(async (resolve, reject) => {
|
|
871
|
-
try {
|
|
872
|
-
config.baseURL = this._options.baseUrl;
|
|
873
|
-
const response = await this._axios.post("FindFromRestrictions", request , config);
|
|
874
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
875
|
-
const res : carriers.FindResults = converters.Create_FindResults_From( response.data );
|
|
876
|
-
resolve(res);
|
|
877
|
-
}
|
|
878
|
-
catch( err ) {
|
|
879
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
880
|
-
reject(err);
|
|
881
|
-
}
|
|
882
|
-
});
|
|
883
|
-
}
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
/**
|
|
888
|
-
* Execute a Find operation and return a page of results. The criteria for the Find are passed in directly, not fetched by a restriction storage provider. The columns of the result are calculated based on the restriction.
|
|
889
|
-
* @param request - Restrictions, ProviderName, PageSize, PageNumber
|
|
890
|
-
* @returns Results from search, containing column information and result rows.
|
|
891
|
-
*/
|
|
892
|
-
public async findFromRestrictionsAsync(request: carriers.Find_FindFromRestrictionsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
893
|
-
|
|
894
|
-
/**
|
|
895
|
-
* Execute a Find operation and return a page of results. The criteria for the Find are passed in directly, not fetched by a restriction storage provider. The columns of the result are calculated based on the restriction.
|
|
896
|
-
* @param restrictions - Array of restrictions specifying the search. Each restriction must match a column of the given archive provider, and that column must have its CanRestrictBy property set to true.
|
|
897
|
-
* @param providerName - Name of archive provider that is to execute the search and return the result columns/rows
|
|
898
|
-
* @param pageSize - Size of result set pages
|
|
899
|
-
* @param pageNumber - Result set page to return, 0 is the first page. When a call returns no rows, no further pages are available. Negative page numbers are interpreted as number of rows to skip.
|
|
900
|
-
* @returns Results from search, containing column information and result rows.
|
|
901
|
-
*/
|
|
902
|
-
public async findFromRestrictionsAsync(restrictions: carriers.ArchiveRestrictionInfo[], providerName: string, pageSize: number, pageNumber: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
903
|
-
|
|
904
|
-
public async findFromRestrictionsAsync(restrictions:carriers.ArchiveRestrictionInfo[]|carriers.Find_FindFromRestrictionsRequest, providerName?:string|base.WebApiRequestOptions, pageSize?:number, pageNumber?:number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
905
|
-
let _request : carriers.Find_FindFromRestrictionsRequest = null;
|
|
906
|
-
let _options : base.WebApiRequestOptions = null;
|
|
907
|
-
const first : any = restrictions;
|
|
908
|
-
if( typeof( first ) === "object" && first && ( typeof(first.restrictions)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.pageSize)!='undefined' || typeof(first.pageNumber)!='undefined' ) )
|
|
909
|
-
{
|
|
910
|
-
_request = restrictions as carriers.Find_FindFromRestrictionsRequest;
|
|
911
|
-
_options = providerName as base.WebApiRequestOptions;
|
|
912
|
-
}
|
|
913
|
-
else
|
|
914
|
-
{
|
|
915
|
-
_request = {
|
|
916
|
-
restrictions: restrictions as carriers.ArchiveRestrictionInfo[],
|
|
917
|
-
providerName: providerName as string,
|
|
918
|
-
pageSize: pageSize as number,
|
|
919
|
-
pageNumber: pageNumber as number,
|
|
920
|
-
};
|
|
921
|
-
_options = webapi_options;
|
|
922
|
-
}
|
|
923
|
-
return this._findFromRestrictionsAsync( _request, _options );
|
|
924
|
-
}
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
private async _findFromRestrictionsColumnsAsync(request: carriers.Find_FindFromRestrictionsColumnsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
928
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
929
|
-
base.WebApiBase.SetPending(options);
|
|
930
|
-
return new Promise< carriers.FindResults >(async (resolve, reject) => {
|
|
931
|
-
try {
|
|
932
|
-
config.baseURL = this._options.baseUrl;
|
|
933
|
-
const response = await this._axios.post("FindFromRestrictionsColumns", request , config);
|
|
934
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
935
|
-
const res : carriers.FindResults = converters.Create_FindResults_From( response.data );
|
|
936
|
-
resolve(res);
|
|
937
|
-
}
|
|
938
|
-
catch( err ) {
|
|
939
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
940
|
-
reject(err);
|
|
941
|
-
}
|
|
942
|
-
});
|
|
943
|
-
}
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
/**
|
|
948
|
-
* Execute a Find operation and return a page of results. <para/>The criteria for the Find are passed in directly, not fetched by a restriction storage provider. <para/>The desired columns of the result set are also passed in directly.<para/>The orderby information is calculated by the system.<para/>Use the GetCriteriaInformation and GetDefaultDesiredColumns service methods to let the system calculate these values, if you want to use or modify them.
|
|
949
|
-
* @param request - Restrictions, ProviderName, DesiredColumns, PageSize, PageNumber
|
|
950
|
-
* @returns Results from search, containing column information and result rows.
|
|
951
|
-
*/
|
|
952
|
-
public async findFromRestrictionsColumnsAsync(request: carriers.Find_FindFromRestrictionsColumnsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
953
|
-
|
|
954
|
-
/**
|
|
955
|
-
* Execute a Find operation and return a page of results. <para/>The criteria for the Find are passed in directly, not fetched by a restriction storage provider. <para/>The desired columns of the result set are also passed in directly.<para/>The orderby information is calculated by the system.<para/>Use the GetCriteriaInformation and GetDefaultDesiredColumns service methods to let the system calculate these values, if you want to use or modify them.
|
|
956
|
-
* @param restrictions - Array of restrictions specifying the search. Each restriction must match a column of the given archive provider, and that column must have its CanRestrictBy property set to true.
|
|
957
|
-
* @param providerName - Name of archive provider that is to execute the search and return the result columns/rows
|
|
958
|
-
* @param desiredColumns - Array of column names desired for the result. Each name must match a column offered by the given archive provider.
|
|
959
|
-
* @param pageSize - Size of result set pages
|
|
960
|
-
* @param pageNumber - Result set page to return, 0 is the first page. When a call returns no rows, no further pages are available. Negative page numbers are interpreted as number of rows to skip.
|
|
961
|
-
* @returns Results from search, containing column information and result rows.
|
|
962
|
-
*/
|
|
963
|
-
public async findFromRestrictionsColumnsAsync(restrictions: carriers.ArchiveRestrictionInfo[], providerName: string, desiredColumns: string[], pageSize: number, pageNumber: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
964
|
-
|
|
965
|
-
public async findFromRestrictionsColumnsAsync(restrictions:carriers.ArchiveRestrictionInfo[]|carriers.Find_FindFromRestrictionsColumnsRequest, providerName?:string|base.WebApiRequestOptions, desiredColumns?:string[], pageSize?:number, pageNumber?:number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
966
|
-
let _request : carriers.Find_FindFromRestrictionsColumnsRequest = null;
|
|
967
|
-
let _options : base.WebApiRequestOptions = null;
|
|
968
|
-
const first : any = restrictions;
|
|
969
|
-
if( typeof( first ) === "object" && first && ( typeof(first.restrictions)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.desiredColumns)!='undefined' || typeof(first.pageSize)!='undefined' || typeof(first.pageNumber)!='undefined' ) )
|
|
970
|
-
{
|
|
971
|
-
_request = restrictions as carriers.Find_FindFromRestrictionsColumnsRequest;
|
|
972
|
-
_options = providerName as base.WebApiRequestOptions;
|
|
973
|
-
}
|
|
974
|
-
else
|
|
975
|
-
{
|
|
976
|
-
_request = {
|
|
977
|
-
restrictions: restrictions as carriers.ArchiveRestrictionInfo[],
|
|
978
|
-
providerName: providerName as string,
|
|
979
|
-
desiredColumns: desiredColumns as string[],
|
|
980
|
-
pageSize: pageSize as number,
|
|
981
|
-
pageNumber: pageNumber as number,
|
|
982
|
-
};
|
|
983
|
-
_options = webapi_options;
|
|
984
|
-
}
|
|
985
|
-
return this._findFromRestrictionsColumnsAsync( _request, _options );
|
|
986
|
-
}
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
private async _getAvailableRestrictionColumnsAsync(request: carriers.Find_GetAvailableRestrictionColumnsRequest, options?:base.WebApiRequestOptions) : Promise< string[] > {
|
|
990
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
991
|
-
base.WebApiBase.SetPending(options);
|
|
992
|
-
return new Promise< string[] >(async (resolve, reject) => {
|
|
993
|
-
try {
|
|
994
|
-
config.baseURL = this._options.baseUrl;
|
|
995
|
-
const response = await this._axios.post("GetAvailableRestrictionColumns", request , config);
|
|
996
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
997
|
-
const res : string[] = response.data as string[];
|
|
998
|
-
resolve(res);
|
|
999
|
-
}
|
|
1000
|
-
catch( err ) {
|
|
1001
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1002
|
-
reject(err);
|
|
1003
|
-
}
|
|
1004
|
-
});
|
|
1005
|
-
}
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
/**
|
|
1010
|
-
* Get a list of the column names corresponding to available restrictions for a certain archive provider and restriction storage provider. Such columns have CanRestrict set to true, and are supported by the given restriction storage provider.
|
|
1011
|
-
* @param request - StorageType, ProviderName
|
|
1012
|
-
* @returns Array of column names, corresponding to support restrictions for the given archive and restriction storage providers.
|
|
1013
|
-
*/
|
|
1014
|
-
public async getAvailableRestrictionColumnsAsync(request: carriers.Find_GetAvailableRestrictionColumnsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string[] >;
|
|
1015
|
-
|
|
1016
|
-
/**
|
|
1017
|
-
* Get a list of the column names corresponding to available restrictions for a certain archive provider and restriction storage provider. Such columns have CanRestrict set to true, and are supported by the given restriction storage provider.
|
|
1018
|
-
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
1019
|
-
* @param providerName - Name of archive provider that is to execute the search and return the result columns/rows
|
|
1020
|
-
* @returns Array of column names, corresponding to support restrictions for the given archive and restriction storage providers.
|
|
1021
|
-
*/
|
|
1022
|
-
public async getAvailableRestrictionColumnsAsync(storageType: string, providerName: string, webapi_options?:base.WebApiRequestOptions) : Promise< string[] >;
|
|
1023
|
-
|
|
1024
|
-
public async getAvailableRestrictionColumnsAsync(storageType:string|carriers.Find_GetAvailableRestrictionColumnsRequest, providerName?:string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< string[] > {
|
|
1025
|
-
let _request : carriers.Find_GetAvailableRestrictionColumnsRequest = null;
|
|
1026
|
-
let _options : base.WebApiRequestOptions = null;
|
|
1027
|
-
const first : any = storageType;
|
|
1028
|
-
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' ) )
|
|
1029
|
-
{
|
|
1030
|
-
_request = storageType as carriers.Find_GetAvailableRestrictionColumnsRequest;
|
|
1031
|
-
_options = providerName as base.WebApiRequestOptions;
|
|
1032
|
-
}
|
|
1033
|
-
else
|
|
1034
|
-
{
|
|
1035
|
-
_request = {
|
|
1036
|
-
storageType: storageType as string,
|
|
1037
|
-
providerName: providerName as string,
|
|
1038
|
-
};
|
|
1039
|
-
_options = webapi_options;
|
|
1040
|
-
}
|
|
1041
|
-
return this._getAvailableRestrictionColumnsAsync( _request, _options );
|
|
1042
|
-
}
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
private async _getSpecifiedCriteriaInformationWithDefaultsAsync(request: carriers.Find_GetSpecifiedCriteriaInformationWithDefaultsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation > {
|
|
1046
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1047
|
-
base.WebApiBase.SetPending(options);
|
|
1048
|
-
return new Promise< carriers.CriteriaInformation >(async (resolve, reject) => {
|
|
1049
|
-
try {
|
|
1050
|
-
config.baseURL = this._options.baseUrl;
|
|
1051
|
-
const response = await this._axios.post("GetSpecifiedCriteriaInformationWithDefaults", request , config);
|
|
1052
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
1053
|
-
const res : carriers.CriteriaInformation = converters.Create_CriteriaInformation_From( response.data );
|
|
1054
|
-
resolve(res);
|
|
1055
|
-
}
|
|
1056
|
-
catch( err ) {
|
|
1057
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1058
|
-
reject(err);
|
|
1059
|
-
}
|
|
1060
|
-
});
|
|
1061
|
-
}
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
/**
|
|
1066
|
-
* Get criteria information from a set of saved criteria, for a specific set of columns. The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control. ALL columns specified in the call will be present in the results; those that do not have corresponding criteria set will have empty values and the default (first) operator, with the IsActive flag set to false.
|
|
1067
|
-
* @param request - StorageType, ProviderName, StorageKey, DesiredColumnNames, StaticColumns
|
|
1068
|
-
* @returns The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control. ALL columns specified in the call will be present in the results; those that do not have corresponding criteria set will have empty values and the default (first) operator, with the IsActive flag set to false.
|
|
1069
|
-
*/
|
|
1070
|
-
public async getSpecifiedCriteriaInformationWithDefaultsAsync(request: carriers.Find_GetSpecifiedCriteriaInformationWithDefaultsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
1071
|
-
|
|
1072
|
-
/**
|
|
1073
|
-
* Get criteria information from a set of saved criteria, for a specific set of columns. The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control. ALL columns specified in the call will be present in the results; those that do not have corresponding criteria set will have empty values and the default (first) operator, with the IsActive flag set to false.
|
|
1074
|
-
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
1075
|
-
* @param providerName - Name of archive provider that is the intended consumer of the restrictions
|
|
1076
|
-
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search
|
|
1077
|
-
* @param desiredColumnNames - Optional array of restrictions that are to be EXCLUDED from the CriteriaArchiveRows part of the result. In the Find dialogs, that corresponds to the 'static' fields, to avoid duplicating them in the 'Match also' criteria list. This array can be null, indicating that all restrictions should be included in the criteria list.
|
|
1078
|
-
* @param staticColumns - Optional array of restrictions that are to be EXCLUDED from the CriteriaArchiveRows part of the result. In the Find dialogs, that corresponds to the 'static' fields, to avoid duplicating them in the 'Match also' criteria list. This array can be null, indicating that all restrictions should be included in the criteria list.
|
|
1079
|
-
* @returns The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control. ALL columns specified in the call will be present in the results; those that do not have corresponding criteria set will have empty values and the default (first) operator, with the IsActive flag set to false.
|
|
1080
|
-
*/
|
|
1081
|
-
public async getSpecifiedCriteriaInformationWithDefaultsAsync(storageType: string, providerName: string, storageKey: string, desiredColumnNames: string[], staticColumns: string[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
1082
|
-
|
|
1083
|
-
public async getSpecifiedCriteriaInformationWithDefaultsAsync(storageType:string|carriers.Find_GetSpecifiedCriteriaInformationWithDefaultsRequest, providerName?:string|base.WebApiRequestOptions, storageKey?:string, desiredColumnNames?:string[], staticColumns?:string[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation > {
|
|
1084
|
-
let _request : carriers.Find_GetSpecifiedCriteriaInformationWithDefaultsRequest = null;
|
|
1085
|
-
let _options : base.WebApiRequestOptions = null;
|
|
1086
|
-
const first : any = storageType;
|
|
1087
|
-
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.desiredColumnNames)!='undefined' || typeof(first.staticColumns)!='undefined' ) )
|
|
1088
|
-
{
|
|
1089
|
-
_request = storageType as carriers.Find_GetSpecifiedCriteriaInformationWithDefaultsRequest;
|
|
1090
|
-
_options = providerName as base.WebApiRequestOptions;
|
|
1091
|
-
}
|
|
1092
|
-
else
|
|
1093
|
-
{
|
|
1094
|
-
_request = {
|
|
1095
|
-
storageType: storageType as string,
|
|
1096
|
-
providerName: providerName as string,
|
|
1097
|
-
storageKey: storageKey as string,
|
|
1098
|
-
desiredColumnNames: desiredColumnNames as string[],
|
|
1099
|
-
staticColumns: staticColumns as string[],
|
|
1100
|
-
};
|
|
1101
|
-
_options = webapi_options;
|
|
1102
|
-
}
|
|
1103
|
-
return this._getSpecifiedCriteriaInformationWithDefaultsAsync( _request, _options );
|
|
1104
|
-
}
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
private async _getSpecifiedCriteriaInformationWithDefaultsWithContextAsync(request: carriers.Find_GetSpecifiedCriteriaInformationWithDefaultsWithContextRequest, options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation > {
|
|
1108
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1109
|
-
base.WebApiBase.SetPending(options);
|
|
1110
|
-
return new Promise< carriers.CriteriaInformation >(async (resolve, reject) => {
|
|
1111
|
-
try {
|
|
1112
|
-
config.baseURL = this._options.baseUrl;
|
|
1113
|
-
const response = await this._axios.post("GetSpecifiedCriteriaInformationWithDefaultsWithContext", request , config);
|
|
1114
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
1115
|
-
const res : carriers.CriteriaInformation = converters.Create_CriteriaInformation_From( response.data );
|
|
1116
|
-
resolve(res);
|
|
1117
|
-
}
|
|
1118
|
-
catch( err ) {
|
|
1119
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1120
|
-
reject(err);
|
|
1121
|
-
}
|
|
1122
|
-
});
|
|
1123
|
-
}
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
/**
|
|
1128
|
-
* Get criteria information from a set of saved criteria, for a specific set of columns. The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control. ALL columns specified in the call will be present in the results; those that do not have corresponding criteria set will have empty values and the default (first) operator, with the IsActive flag set to false.
|
|
1129
|
-
* @param request - StorageType, ProviderName, StorageKey, DesiredColumnNames, StaticColumns, Context
|
|
1130
|
-
* @returns The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control. ALL columns specified in the call will be present in the results; those that do not have corresponding criteria set will have empty values and the default (first) operator, with the IsActive flag set to false.
|
|
1131
|
-
*/
|
|
1132
|
-
public async getSpecifiedCriteriaInformationWithDefaultsWithContextAsync(request: carriers.Find_GetSpecifiedCriteriaInformationWithDefaultsWithContextRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
1133
|
-
|
|
1134
|
-
/**
|
|
1135
|
-
* Get criteria information from a set of saved criteria, for a specific set of columns. The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control. ALL columns specified in the call will be present in the results; those that do not have corresponding criteria set will have empty values and the default (first) operator, with the IsActive flag set to false.
|
|
1136
|
-
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
1137
|
-
* @param providerName - Name of archive provider that is the intended consumer of the restrictions
|
|
1138
|
-
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search
|
|
1139
|
-
* @param desiredColumnNames - Optional array of restrictions that are to be EXCLUDED from the CriteriaArchiveRows part of the result. In the Find dialogs, that corresponds to the 'static' fields, to avoid duplicating them in the 'Match also' criteria list. This array can be null, indicating that all restrictions should be included in the criteria list.
|
|
1140
|
-
* @param staticColumns - Optional array of restrictions that are to be EXCLUDED from the CriteriaArchiveRows part of the result. In the Find dialogs, that corresponds to the 'static' fields, to avoid duplicating them in the 'Match also' criteria list. This array can be null, indicating that all restrictions should be included in the criteria list.
|
|
1141
|
-
* @param context - Optional context that can be used by FindProvider
|
|
1142
|
-
* @returns The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control. ALL columns specified in the call will be present in the results; those that do not have corresponding criteria set will have empty values and the default (first) operator, with the IsActive flag set to false.
|
|
1143
|
-
*/
|
|
1144
|
-
public async getSpecifiedCriteriaInformationWithDefaultsWithContextAsync(storageType: string, providerName: string, storageKey: string, desiredColumnNames: string[], staticColumns: string[], context: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
1145
|
-
|
|
1146
|
-
public async getSpecifiedCriteriaInformationWithDefaultsWithContextAsync(storageType:string|carriers.Find_GetSpecifiedCriteriaInformationWithDefaultsWithContextRequest, providerName?:string|base.WebApiRequestOptions, storageKey?:string, desiredColumnNames?:string[], staticColumns?:string[], context?:string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation > {
|
|
1147
|
-
let _request : carriers.Find_GetSpecifiedCriteriaInformationWithDefaultsWithContextRequest = null;
|
|
1148
|
-
let _options : base.WebApiRequestOptions = null;
|
|
1149
|
-
const first : any = storageType;
|
|
1150
|
-
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.desiredColumnNames)!='undefined' || typeof(first.staticColumns)!='undefined' || typeof(first.context)!='undefined' ) )
|
|
1151
|
-
{
|
|
1152
|
-
_request = storageType as carriers.Find_GetSpecifiedCriteriaInformationWithDefaultsWithContextRequest;
|
|
1153
|
-
_options = providerName as base.WebApiRequestOptions;
|
|
1154
|
-
}
|
|
1155
|
-
else
|
|
1156
|
-
{
|
|
1157
|
-
_request = {
|
|
1158
|
-
storageType: storageType as string,
|
|
1159
|
-
providerName: providerName as string,
|
|
1160
|
-
storageKey: storageKey as string,
|
|
1161
|
-
desiredColumnNames: desiredColumnNames as string[],
|
|
1162
|
-
staticColumns: staticColumns as string[],
|
|
1163
|
-
context: context as string,
|
|
1164
|
-
};
|
|
1165
|
-
_options = webapi_options;
|
|
1166
|
-
}
|
|
1167
|
-
return this._getSpecifiedCriteriaInformationWithDefaultsWithContextAsync( _request, _options );
|
|
1168
|
-
}
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
private async _findFromRestrictionsColumnsOrderByAsync(request: carriers.Find_FindFromRestrictionsColumnsOrderByRequest, options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
1172
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1173
|
-
base.WebApiBase.SetPending(options);
|
|
1174
|
-
return new Promise< carriers.FindResults >(async (resolve, reject) => {
|
|
1175
|
-
try {
|
|
1176
|
-
config.baseURL = this._options.baseUrl;
|
|
1177
|
-
const response = await this._axios.post("FindFromRestrictionsColumnsOrderBy", request , config);
|
|
1178
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
1179
|
-
const res : carriers.FindResults = converters.Create_FindResults_From( response.data );
|
|
1180
|
-
resolve(res);
|
|
1181
|
-
}
|
|
1182
|
-
catch( err ) {
|
|
1183
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1184
|
-
reject(err);
|
|
1185
|
-
}
|
|
1186
|
-
});
|
|
1187
|
-
}
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
/**
|
|
1192
|
-
* Execute a Find operation and return a page of results. <para/>The criteria for the Find are passed in directly, not fetched by a restriction storage provider. <para/>The desired columns of the result set are also passed in directly.<para/>The orderby information is also passed in directly.<para/>Use the GetCriteriaInformation, GetDefaultDesiredColumns and GetDefaultOrderBy service methods to let the system calculate these values, if you want to use or modify them.
|
|
1193
|
-
* @param request - Restrictions, ProviderName, DesiredColumns, OrderBy, PageSize, PageNumber
|
|
1194
|
-
* @returns Results from search, containing column information and result rows.
|
|
1195
|
-
*/
|
|
1196
|
-
public async findFromRestrictionsColumnsOrderByAsync(request: carriers.Find_FindFromRestrictionsColumnsOrderByRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
1197
|
-
|
|
1198
|
-
/**
|
|
1199
|
-
* Execute a Find operation and return a page of results. <para/>The criteria for the Find are passed in directly, not fetched by a restriction storage provider. <para/>The desired columns of the result set are also passed in directly.<para/>The orderby information is also passed in directly.<para/>Use the GetCriteriaInformation, GetDefaultDesiredColumns and GetDefaultOrderBy service methods to let the system calculate these values, if you want to use or modify them.
|
|
1200
|
-
* @param restrictions - Array of restrictions specifying the search. Each restriction must match a column of the given archive provider, and that column must have its CanRestrictBy property set to true.
|
|
1201
|
-
* @param providerName - Name of archive provider that is to execute the search and return the result columns/rows
|
|
1202
|
-
* @param desiredColumns - Array of column names desired for the result. Each name must match a column offered by the given archive provider.
|
|
1203
|
-
* @param orderBy - Array of order by specifications. If it is null or empty, the row order is unspecified, database dependent, and might not be the same from call to call, depending on query execution plans. The unspecified order willgenerally not vary within pages of the same query.
|
|
1204
|
-
* @param pageSize - Size of result set pages
|
|
1205
|
-
* @param pageNumber - Result set page to return, 0 is the first page. When a call returns no rows, no further pages are available. Negative page numbers are interpreted as number of rows to skip.
|
|
1206
|
-
* @returns Results from search, containing column information and result rows.
|
|
1207
|
-
*/
|
|
1208
|
-
public async findFromRestrictionsColumnsOrderByAsync(restrictions: carriers.ArchiveRestrictionInfo[], providerName: string, desiredColumns: string[], orderBy: carriers.ArchiveOrderByInfo[], pageSize: number, pageNumber: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
1209
|
-
|
|
1210
|
-
public async findFromRestrictionsColumnsOrderByAsync(restrictions:carriers.ArchiveRestrictionInfo[]|carriers.Find_FindFromRestrictionsColumnsOrderByRequest, providerName?:string|base.WebApiRequestOptions, desiredColumns?:string[], orderBy?:carriers.ArchiveOrderByInfo[], pageSize?:number, pageNumber?:number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
1211
|
-
let _request : carriers.Find_FindFromRestrictionsColumnsOrderByRequest = null;
|
|
1212
|
-
let _options : base.WebApiRequestOptions = null;
|
|
1213
|
-
const first : any = restrictions;
|
|
1214
|
-
if( typeof( first ) === "object" && first && ( typeof(first.restrictions)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.desiredColumns)!='undefined' || typeof(first.orderBy)!='undefined' || typeof(first.pageSize)!='undefined' || typeof(first.pageNumber)!='undefined' ) )
|
|
1215
|
-
{
|
|
1216
|
-
_request = restrictions as carriers.Find_FindFromRestrictionsColumnsOrderByRequest;
|
|
1217
|
-
_options = providerName as base.WebApiRequestOptions;
|
|
1218
|
-
}
|
|
1219
|
-
else
|
|
1220
|
-
{
|
|
1221
|
-
_request = {
|
|
1222
|
-
restrictions: restrictions as carriers.ArchiveRestrictionInfo[],
|
|
1223
|
-
providerName: providerName as string,
|
|
1224
|
-
desiredColumns: desiredColumns as string[],
|
|
1225
|
-
orderBy: orderBy as carriers.ArchiveOrderByInfo[],
|
|
1226
|
-
pageSize: pageSize as number,
|
|
1227
|
-
pageNumber: pageNumber as number,
|
|
1228
|
-
};
|
|
1229
|
-
_options = webapi_options;
|
|
1230
|
-
}
|
|
1231
|
-
return this._findFromRestrictionsColumnsOrderByAsync( _request, _options );
|
|
1232
|
-
}
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
private async _getDefaultDesiredColumnsAsync(request: carriers.Find_GetDefaultDesiredColumnsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveColumnInfo[] > {
|
|
1236
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1237
|
-
base.WebApiBase.SetPending(options);
|
|
1238
|
-
return new Promise< carriers.ArchiveColumnInfo[] >(async (resolve, reject) => {
|
|
1239
|
-
try {
|
|
1240
|
-
config.baseURL = this._options.baseUrl;
|
|
1241
|
-
const response = await this._axios.post("GetDefaultDesiredColumns", request , config);
|
|
1242
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
1243
|
-
const res : carriers.ArchiveColumnInfo[] = converters.Create_ArchiveColumnInfoArray_From( response.data );
|
|
1244
|
-
resolve(res);
|
|
1245
|
-
}
|
|
1246
|
-
catch( err ) {
|
|
1247
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1248
|
-
reject(err);
|
|
1249
|
-
}
|
|
1250
|
-
});
|
|
1251
|
-
}
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
/**
|
|
1256
|
-
* Calculate the default desired columns, i.e., the result columns for a given search. The search is defined by a storage type, provider name and storage key, which are used to fetch the corresponding restrictions from the database (in the same way as Find does). If you want to specify the restriction directly, use the GetDefaultDesiredColumnsFromRestrictions method instead. This is the algorithm that is used by the Find service method.
|
|
1257
|
-
* @param request - StorageType, ProviderName, StorageKey
|
|
1258
|
-
* @returns Column information for the default desired columns, fully populated. Percentage-specified column widths sum to exactly 100.
|
|
1259
|
-
*/
|
|
1260
|
-
public async getDefaultDesiredColumnsAsync(request: carriers.Find_GetDefaultDesiredColumnsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveColumnInfo[] >;
|
|
1261
|
-
|
|
1262
|
-
/**
|
|
1263
|
-
* Calculate the default desired columns, i.e., the result columns for a given search. The search is defined by a storage type, provider name and storage key, which are used to fetch the corresponding restrictions from the database (in the same way as Find does). If you want to specify the restriction directly, use the GetDefaultDesiredColumnsFromRestrictions method instead. This is the algorithm that is used by the Find service method.
|
|
1264
|
-
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
1265
|
-
* @param providerName - Name of the provider to calculate default desired columns for
|
|
1266
|
-
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search
|
|
1267
|
-
* @returns Column information for the default desired columns, fully populated. Percentage-specified column widths sum to exactly 100.
|
|
1268
|
-
*/
|
|
1269
|
-
public async getDefaultDesiredColumnsAsync(storageType: string, providerName: string, storageKey: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveColumnInfo[] >;
|
|
1270
|
-
|
|
1271
|
-
public async getDefaultDesiredColumnsAsync(storageType:string|carriers.Find_GetDefaultDesiredColumnsRequest, providerName?:string|base.WebApiRequestOptions, storageKey?:string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveColumnInfo[] > {
|
|
1272
|
-
let _request : carriers.Find_GetDefaultDesiredColumnsRequest = null;
|
|
1273
|
-
let _options : base.WebApiRequestOptions = null;
|
|
1274
|
-
const first : any = storageType;
|
|
1275
|
-
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' ) )
|
|
1276
|
-
{
|
|
1277
|
-
_request = storageType as carriers.Find_GetDefaultDesiredColumnsRequest;
|
|
1278
|
-
_options = providerName as base.WebApiRequestOptions;
|
|
1279
|
-
}
|
|
1280
|
-
else
|
|
1281
|
-
{
|
|
1282
|
-
_request = {
|
|
1283
|
-
storageType: storageType as string,
|
|
1284
|
-
providerName: providerName as string,
|
|
1285
|
-
storageKey: storageKey as string,
|
|
1286
|
-
};
|
|
1287
|
-
_options = webapi_options;
|
|
1288
|
-
}
|
|
1289
|
-
return this._getDefaultDesiredColumnsAsync( _request, _options );
|
|
1290
|
-
}
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
private async _getDefaultOrderByAsync(request: carriers.Find_GetDefaultOrderByRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveOrderByInfo[] > {
|
|
1294
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1295
|
-
base.WebApiBase.SetPending(options);
|
|
1296
|
-
return new Promise< carriers.ArchiveOrderByInfo[] >(async (resolve, reject) => {
|
|
1297
|
-
try {
|
|
1298
|
-
config.baseURL = this._options.baseUrl;
|
|
1299
|
-
const response = await this._axios.post("GetDefaultOrderBy", request , config);
|
|
1300
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
1301
|
-
const res : carriers.ArchiveOrderByInfo[] = converters.Create_ArchiveOrderByInfoArray_From( response.data );
|
|
1302
|
-
resolve(res);
|
|
1303
|
-
}
|
|
1304
|
-
catch( err ) {
|
|
1305
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1306
|
-
reject(err);
|
|
1307
|
-
}
|
|
1308
|
-
});
|
|
1309
|
-
}
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
/**
|
|
1314
|
-
* Calculate the default orderby columns for a given provider and a search. The search is specified by a storage type, provider name and storage key, and is fetched from the database. Default desired columns are then calculated for the search, and those columns are then used as the basis for calculating an order by. If you want to specify the desired columns directly, use the GetDefaultOrderByFromDesiredColumns method instead. This is the same algorithm that is used by the Find service method.
|
|
1315
|
-
* @param request - StorageType, ProviderName, StorageKey
|
|
1316
|
-
* @returns Orderby information
|
|
1317
|
-
*/
|
|
1318
|
-
public async getDefaultOrderByAsync(request: carriers.Find_GetDefaultOrderByRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveOrderByInfo[] >;
|
|
1319
|
-
|
|
1320
|
-
/**
|
|
1321
|
-
* Calculate the default orderby columns for a given provider and a search. The search is specified by a storage type, provider name and storage key, and is fetched from the database. Default desired columns are then calculated for the search, and those columns are then used as the basis for calculating an order by. If you want to specify the desired columns directly, use the GetDefaultOrderByFromDesiredColumns method instead. This is the same algorithm that is used by the Find service method.
|
|
1322
|
-
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
1323
|
-
* @param providerName - Provider name to calculate default orderby for
|
|
1324
|
-
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search
|
|
1325
|
-
* @returns Orderby information
|
|
1326
|
-
*/
|
|
1327
|
-
public async getDefaultOrderByAsync(storageType: string, providerName: string, storageKey: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveOrderByInfo[] >;
|
|
1328
|
-
|
|
1329
|
-
public async getDefaultOrderByAsync(storageType:string|carriers.Find_GetDefaultOrderByRequest, providerName?:string|base.WebApiRequestOptions, storageKey?:string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveOrderByInfo[] > {
|
|
1330
|
-
let _request : carriers.Find_GetDefaultOrderByRequest = null;
|
|
1331
|
-
let _options : base.WebApiRequestOptions = null;
|
|
1332
|
-
const first : any = storageType;
|
|
1333
|
-
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' ) )
|
|
1334
|
-
{
|
|
1335
|
-
_request = storageType as carriers.Find_GetDefaultOrderByRequest;
|
|
1336
|
-
_options = providerName as base.WebApiRequestOptions;
|
|
1337
|
-
}
|
|
1338
|
-
else
|
|
1339
|
-
{
|
|
1340
|
-
_request = {
|
|
1341
|
-
storageType: storageType as string,
|
|
1342
|
-
providerName: providerName as string,
|
|
1343
|
-
storageKey: storageKey as string,
|
|
1344
|
-
};
|
|
1345
|
-
_options = webapi_options;
|
|
1346
|
-
}
|
|
1347
|
-
return this._getDefaultOrderByAsync( _request, _options );
|
|
1348
|
-
}
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
private async _populateRestrictionsAsync(request: carriers.Find_PopulateRestrictionsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionInfo[] > {
|
|
1352
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1353
|
-
base.WebApiBase.SetPending(options);
|
|
1354
|
-
return new Promise< carriers.ArchiveRestrictionInfo[] >(async (resolve, reject) => {
|
|
1355
|
-
try {
|
|
1356
|
-
config.baseURL = this._options.baseUrl;
|
|
1357
|
-
const response = await this._axios.post("PopulateRestrictions", request , config);
|
|
1358
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
1359
|
-
const res : carriers.ArchiveRestrictionInfo[] = converters.Create_ArchiveRestrictionInfoArray_From( response.data );
|
|
1360
|
-
resolve(res);
|
|
1361
|
-
}
|
|
1362
|
-
catch( err ) {
|
|
1363
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1364
|
-
reject(err);
|
|
1365
|
-
}
|
|
1366
|
-
});
|
|
1367
|
-
}
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
/**
|
|
1372
|
-
* Take an incoming set of minimally populated restrictions (name + operator is required), and populate all the other parts of the ArchiveRestrictionInfo structure. This includes column information, display values (including list value lookup), and calculated/default values where the value hints specify read-only (R).
|
|
1373
|
-
* @param request - ProviderName, Restrictions
|
|
1374
|
-
* @returns Fully populated restrictions in the same order as the incoming restrictions.
|
|
1375
|
-
*/
|
|
1376
|
-
public async populateRestrictionsAsync(request: carriers.Find_PopulateRestrictionsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionInfo[] >;
|
|
1377
|
-
|
|
1378
|
-
/**
|
|
1379
|
-
* Take an incoming set of minimally populated restrictions (name + operator is required), and populate all the other parts of the ArchiveRestrictionInfo structure. This includes column information, display values (including list value lookup), and calculated/default values where the value hints specify read-only (R).
|
|
1380
|
-
* @param providerName - Provider name to use for populating column information
|
|
1381
|
-
* @param restrictions - Restrictions to populate. The Name and Operator fields have to have valid content, and Values should be set as appropriate. Other fields can be left blank or null. If a ColumnInfo is already set, it will not be overwritten.
|
|
1382
|
-
* @returns Fully populated restrictions in the same order as the incoming restrictions.
|
|
1383
|
-
*/
|
|
1384
|
-
public async populateRestrictionsAsync(providerName: string, restrictions: carriers.ArchiveRestrictionInfo[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionInfo[] >;
|
|
1385
|
-
|
|
1386
|
-
public async populateRestrictionsAsync(providerName:string|carriers.Find_PopulateRestrictionsRequest, restrictions?:carriers.ArchiveRestrictionInfo[]|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionInfo[] > {
|
|
1387
|
-
let _request : carriers.Find_PopulateRestrictionsRequest = null;
|
|
1388
|
-
let _options : base.WebApiRequestOptions = null;
|
|
1389
|
-
const first : any = providerName;
|
|
1390
|
-
if( typeof( first ) === "object" && first && ( typeof(first.providerName)!='undefined' || typeof(first.restrictions)!='undefined' ) )
|
|
1391
|
-
{
|
|
1392
|
-
_request = providerName as carriers.Find_PopulateRestrictionsRequest;
|
|
1393
|
-
_options = restrictions as base.WebApiRequestOptions;
|
|
1394
|
-
}
|
|
1395
|
-
else
|
|
1396
|
-
{
|
|
1397
|
-
_request = {
|
|
1398
|
-
providerName: providerName as string,
|
|
1399
|
-
restrictions: restrictions as carriers.ArchiveRestrictionInfo[],
|
|
1400
|
-
};
|
|
1401
|
-
_options = webapi_options;
|
|
1402
|
-
}
|
|
1403
|
-
return this._populateRestrictionsAsync( _request, _options );
|
|
1404
|
-
}
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
private async _populateRestrictionValuesAsync(request: carriers.Find_PopulateRestrictionValuesRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionInfo[] > {
|
|
1408
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1409
|
-
base.WebApiBase.SetPending(options);
|
|
1410
|
-
return new Promise< carriers.ArchiveRestrictionInfo[] >(async (resolve, reject) => {
|
|
1411
|
-
try {
|
|
1412
|
-
config.baseURL = this._options.baseUrl;
|
|
1413
|
-
const response = await this._axios.post("PopulateRestrictionValues", request , config);
|
|
1414
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
1415
|
-
const res : carriers.ArchiveRestrictionInfo[] = converters.Create_ArchiveRestrictionInfoArray_From( response.data );
|
|
1416
|
-
resolve(res);
|
|
1417
|
-
}
|
|
1418
|
-
catch( err ) {
|
|
1419
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1420
|
-
reject(err);
|
|
1421
|
-
}
|
|
1422
|
-
});
|
|
1423
|
-
}
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
/**
|
|
1428
|
-
* Take an incoming set of Restrictions (name + operator + any user-entered values), and populate/expand all values as specified by the operator's ValueHints, taking into account any values already there. Used for dynamic date periods; perhaps others in the future
|
|
1429
|
-
* @param request - Restrictions
|
|
1430
|
-
* @returns Restrictions in the same order as the incoming restrictions, with all values expanded.
|
|
1431
|
-
*/
|
|
1432
|
-
public async populateRestrictionValuesAsync(request: carriers.Find_PopulateRestrictionValuesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionInfo[] >;
|
|
1433
|
-
|
|
1434
|
-
/**
|
|
1435
|
-
* Take an incoming set of Restrictions (name + operator + any user-entered values), and populate/expand all values as specified by the operator's ValueHints, taking into account any values already there. Used for dynamic date periods; perhaps others in the future
|
|
1436
|
-
* @param restrictions - Restrictions to populate. The Name and Operator fields have to have valid content, and Values should be set as appropriate. Other fields can be left blank or null and will not be changed.
|
|
1437
|
-
* @returns Restrictions in the same order as the incoming restrictions, with all values expanded.
|
|
1438
|
-
*/
|
|
1439
|
-
public async populateRestrictionValuesAsync(restrictions: carriers.ArchiveRestrictionInfo[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionInfo[] >;
|
|
1440
|
-
|
|
1441
|
-
public async populateRestrictionValuesAsync(restrictions:carriers.ArchiveRestrictionInfo[]|carriers.Find_PopulateRestrictionValuesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionInfo[] > {
|
|
1442
|
-
let _request : carriers.Find_PopulateRestrictionValuesRequest = null;
|
|
1443
|
-
let _options : base.WebApiRequestOptions = null;
|
|
1444
|
-
const first : any = restrictions;
|
|
1445
|
-
if( typeof( first ) === "object" && first && ( typeof(first.restrictions)!='undefined' ) )
|
|
1446
|
-
{
|
|
1447
|
-
_request = restrictions as carriers.Find_PopulateRestrictionValuesRequest;
|
|
1448
|
-
_options = webapi_options as base.WebApiRequestOptions;
|
|
1449
|
-
}
|
|
1450
|
-
else
|
|
1451
|
-
{
|
|
1452
|
-
_request = {
|
|
1453
|
-
restrictions: restrictions as carriers.ArchiveRestrictionInfo[],
|
|
1454
|
-
};
|
|
1455
|
-
_options = webapi_options;
|
|
1456
|
-
}
|
|
1457
|
-
return this._populateRestrictionValuesAsync( _request, _options );
|
|
1458
|
-
}
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
private async _getDefaultDesiredColumnsFromRestrictionsAsync(request: carriers.Find_GetDefaultDesiredColumnsFromRestrictionsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveColumnInfo[] > {
|
|
1462
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1463
|
-
base.WebApiBase.SetPending(options);
|
|
1464
|
-
return new Promise< carriers.ArchiveColumnInfo[] >(async (resolve, reject) => {
|
|
1465
|
-
try {
|
|
1466
|
-
config.baseURL = this._options.baseUrl;
|
|
1467
|
-
const response = await this._axios.post("GetDefaultDesiredColumnsFromRestrictions", request , config);
|
|
1468
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
1469
|
-
const res : carriers.ArchiveColumnInfo[] = converters.Create_ArchiveColumnInfoArray_From( response.data );
|
|
1470
|
-
resolve(res);
|
|
1471
|
-
}
|
|
1472
|
-
catch( err ) {
|
|
1473
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1474
|
-
reject(err);
|
|
1475
|
-
}
|
|
1476
|
-
});
|
|
1477
|
-
}
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
/**
|
|
1482
|
-
* Calculate the default desired columns, i.e., the result columns for a given search. The search is defined by a provider name and a set of restrictions. This is the algorithm that is used by the Find service method.
|
|
1483
|
-
* @param request - ProviderName, Restrictions
|
|
1484
|
-
* @returns Column information for the default desired columns, fully populated. Percentage-specified column widths sum to exactly 100.
|
|
1485
|
-
*/
|
|
1486
|
-
public async getDefaultDesiredColumnsFromRestrictionsAsync(request: carriers.Find_GetDefaultDesiredColumnsFromRestrictionsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveColumnInfo[] >;
|
|
1487
|
-
|
|
1488
|
-
/**
|
|
1489
|
-
* Calculate the default desired columns, i.e., the result columns for a given search. The search is defined by a provider name and a set of restrictions. This is the algorithm that is used by the Find service method.
|
|
1490
|
-
* @param providerName - Name of the provider to calculate default desired columns for
|
|
1491
|
-
* @param restrictions - Restriction to use in the calculation of default desired columns
|
|
1492
|
-
* @returns Column information for the default desired columns, fully populated. Percentage-specified column widths sum to exactly 100.
|
|
1493
|
-
*/
|
|
1494
|
-
public async getDefaultDesiredColumnsFromRestrictionsAsync(providerName: string, restrictions: carriers.ArchiveRestrictionInfo[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveColumnInfo[] >;
|
|
1495
|
-
|
|
1496
|
-
public async getDefaultDesiredColumnsFromRestrictionsAsync(providerName:string|carriers.Find_GetDefaultDesiredColumnsFromRestrictionsRequest, restrictions?:carriers.ArchiveRestrictionInfo[]|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveColumnInfo[] > {
|
|
1497
|
-
let _request : carriers.Find_GetDefaultDesiredColumnsFromRestrictionsRequest = null;
|
|
1498
|
-
let _options : base.WebApiRequestOptions = null;
|
|
1499
|
-
const first : any = providerName;
|
|
1500
|
-
if( typeof( first ) === "object" && first && ( typeof(first.providerName)!='undefined' || typeof(first.restrictions)!='undefined' ) )
|
|
1501
|
-
{
|
|
1502
|
-
_request = providerName as carriers.Find_GetDefaultDesiredColumnsFromRestrictionsRequest;
|
|
1503
|
-
_options = restrictions as base.WebApiRequestOptions;
|
|
1504
|
-
}
|
|
1505
|
-
else
|
|
1506
|
-
{
|
|
1507
|
-
_request = {
|
|
1508
|
-
providerName: providerName as string,
|
|
1509
|
-
restrictions: restrictions as carriers.ArchiveRestrictionInfo[],
|
|
1510
|
-
};
|
|
1511
|
-
_options = webapi_options;
|
|
1512
|
-
}
|
|
1513
|
-
return this._getDefaultDesiredColumnsFromRestrictionsAsync( _request, _options );
|
|
1514
|
-
}
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
private async _getDefaultOrderByFromDesiredColumnsAsync(request: carriers.Find_GetDefaultOrderByFromDesiredColumnsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveOrderByInfo[] > {
|
|
1518
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1519
|
-
base.WebApiBase.SetPending(options);
|
|
1520
|
-
return new Promise< carriers.ArchiveOrderByInfo[] >(async (resolve, reject) => {
|
|
1521
|
-
try {
|
|
1522
|
-
config.baseURL = this._options.baseUrl;
|
|
1523
|
-
const response = await this._axios.post("GetDefaultOrderByFromDesiredColumns", request , config);
|
|
1524
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
1525
|
-
const res : carriers.ArchiveOrderByInfo[] = converters.Create_ArchiveOrderByInfoArray_From( response.data );
|
|
1526
|
-
resolve(res);
|
|
1527
|
-
}
|
|
1528
|
-
catch( err ) {
|
|
1529
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1530
|
-
reject(err);
|
|
1531
|
-
}
|
|
1532
|
-
});
|
|
1533
|
-
}
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
/**
|
|
1538
|
-
* Calculate the default orderby columns for a given provider and a set of desired columns. This is the same algorithm that is used by the Find service method.
|
|
1539
|
-
* @param request - ProviderName, DesiredColumns
|
|
1540
|
-
* @returns Orderby information
|
|
1541
|
-
*/
|
|
1542
|
-
public async getDefaultOrderByFromDesiredColumnsAsync(request: carriers.Find_GetDefaultOrderByFromDesiredColumnsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveOrderByInfo[] >;
|
|
1543
|
-
|
|
1544
|
-
/**
|
|
1545
|
-
* Calculate the default orderby columns for a given provider and a set of desired columns. This is the same algorithm that is used by the Find service method.
|
|
1546
|
-
* @param providerName - Provider name to calculate default orderby for
|
|
1547
|
-
* @param desiredColumns - Desired columns (return fields), used in the orderby calculation. You can generally only order by columns that have been set as 'desired'.
|
|
1548
|
-
* @returns Orderby information
|
|
1549
|
-
*/
|
|
1550
|
-
public async getDefaultOrderByFromDesiredColumnsAsync(providerName: string, desiredColumns: string[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveOrderByInfo[] >;
|
|
1551
|
-
|
|
1552
|
-
public async getDefaultOrderByFromDesiredColumnsAsync(providerName:string|carriers.Find_GetDefaultOrderByFromDesiredColumnsRequest, desiredColumns?:string[]|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveOrderByInfo[] > {
|
|
1553
|
-
let _request : carriers.Find_GetDefaultOrderByFromDesiredColumnsRequest = null;
|
|
1554
|
-
let _options : base.WebApiRequestOptions = null;
|
|
1555
|
-
const first : any = providerName;
|
|
1556
|
-
if( typeof( first ) === "object" && first && ( typeof(first.providerName)!='undefined' || typeof(first.desiredColumns)!='undefined' ) )
|
|
1557
|
-
{
|
|
1558
|
-
_request = providerName as carriers.Find_GetDefaultOrderByFromDesiredColumnsRequest;
|
|
1559
|
-
_options = desiredColumns as base.WebApiRequestOptions;
|
|
1560
|
-
}
|
|
1561
|
-
else
|
|
1562
|
-
{
|
|
1563
|
-
_request = {
|
|
1564
|
-
providerName: providerName as string,
|
|
1565
|
-
desiredColumns: desiredColumns as string[],
|
|
1566
|
-
};
|
|
1567
|
-
_options = webapi_options;
|
|
1568
|
-
}
|
|
1569
|
-
return this._getDefaultOrderByFromDesiredColumnsAsync( _request, _options );
|
|
1570
|
-
}
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
private async _findOrderByAsync(request: carriers.Find_FindOrderByRequest, options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
1574
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1575
|
-
base.WebApiBase.SetPending(options);
|
|
1576
|
-
return new Promise< carriers.FindResults >(async (resolve, reject) => {
|
|
1577
|
-
try {
|
|
1578
|
-
config.baseURL = this._options.baseUrl;
|
|
1579
|
-
const response = await this._axios.post("FindOrderBy", request , config);
|
|
1580
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
1581
|
-
const res : carriers.FindResults = converters.Create_FindResults_From( response.data );
|
|
1582
|
-
resolve(res);
|
|
1583
|
-
}
|
|
1584
|
-
catch( err ) {
|
|
1585
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1586
|
-
reject(err);
|
|
1587
|
-
}
|
|
1588
|
-
});
|
|
1589
|
-
}
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
/**
|
|
1594
|
-
* Execute a Find operation and return a page of results. The criteria for the Find are fetched from the restriction storage provider according to the given parameters. The columns of the result are calculated based on the restriction. The orderby parameter is used for sorting the results.<para/>The other variants of the Find method allow you greater control over the individual aspects of the process.
|
|
1595
|
-
* @param request - StorageType, ProviderName, StorageKey, PageSize, PageNumber, OrderBy
|
|
1596
|
-
* @returns Results from search, containing column information and result rows.
|
|
1597
|
-
*/
|
|
1598
|
-
public async findOrderByAsync(request: carriers.Find_FindOrderByRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
1599
|
-
|
|
1600
|
-
/**
|
|
1601
|
-
* Execute a Find operation and return a page of results. The criteria for the Find are fetched from the restriction storage provider according to the given parameters. The columns of the result are calculated based on the restriction. The orderby parameter is used for sorting the results.<para/>The other variants of the Find method allow you greater control over the individual aspects of the process.
|
|
1602
|
-
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
1603
|
-
* @param providerName - Name of archive provider that is to execute the search and return the result columns/rows
|
|
1604
|
-
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search
|
|
1605
|
-
* @param pageSize - Size of result set pages
|
|
1606
|
-
* @param pageNumber - Result set page to return, 0 is the first page. When a call returns no rows, no further pages are available. Negative page numbers are interpreted as number of rows to skip.
|
|
1607
|
-
* @param orderBy - Array of order by specifications. If it is null or empty, the row order is unspecified, database dependent, and might not be the same from call to call, depending on query execution plans. The unspecified order willgenerally not vary within pages of the same query.
|
|
1608
|
-
* @returns Results from search, containing column information and result rows.
|
|
1609
|
-
*/
|
|
1610
|
-
public async findOrderByAsync(storageType: string, providerName: string, storageKey: string, pageSize: number, pageNumber: number, orderBy: carriers.ArchiveOrderByInfo[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
1611
|
-
|
|
1612
|
-
public async findOrderByAsync(storageType:string|carriers.Find_FindOrderByRequest, providerName?:string|base.WebApiRequestOptions, storageKey?:string, pageSize?:number, pageNumber?:number, orderBy?:carriers.ArchiveOrderByInfo[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
1613
|
-
let _request : carriers.Find_FindOrderByRequest = null;
|
|
1614
|
-
let _options : base.WebApiRequestOptions = null;
|
|
1615
|
-
const first : any = storageType;
|
|
1616
|
-
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.pageSize)!='undefined' || typeof(first.pageNumber)!='undefined' || typeof(first.orderBy)!='undefined' ) )
|
|
1617
|
-
{
|
|
1618
|
-
_request = storageType as carriers.Find_FindOrderByRequest;
|
|
1619
|
-
_options = providerName as base.WebApiRequestOptions;
|
|
1620
|
-
}
|
|
1621
|
-
else
|
|
1622
|
-
{
|
|
1623
|
-
_request = {
|
|
1624
|
-
storageType: storageType as string,
|
|
1625
|
-
providerName: providerName as string,
|
|
1626
|
-
storageKey: storageKey as string,
|
|
1627
|
-
pageSize: pageSize as number,
|
|
1628
|
-
pageNumber: pageNumber as number,
|
|
1629
|
-
orderBy: orderBy as carriers.ArchiveOrderByInfo[],
|
|
1630
|
-
};
|
|
1631
|
-
_options = webapi_options;
|
|
1632
|
-
}
|
|
1633
|
-
return this._findOrderByAsync( _request, _options );
|
|
1634
|
-
}
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
private async _findWithExtraRestrictionsAsync(request: carriers.Find_FindWithExtraRestrictionsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
1638
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1639
|
-
base.WebApiBase.SetPending(options);
|
|
1640
|
-
return new Promise< carriers.FindResults >(async (resolve, reject) => {
|
|
1641
|
-
try {
|
|
1642
|
-
config.baseURL = this._options.baseUrl;
|
|
1643
|
-
const response = await this._axios.post("FindWithExtraRestrictions", request , config);
|
|
1644
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
1645
|
-
const res : carriers.FindResults = converters.Create_FindResults_From( response.data );
|
|
1646
|
-
resolve(res);
|
|
1647
|
-
}
|
|
1648
|
-
catch( err ) {
|
|
1649
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1650
|
-
reject(err);
|
|
1651
|
-
}
|
|
1652
|
-
});
|
|
1653
|
-
}
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
/**
|
|
1658
|
-
* Execute a Find operation and return a page of results. The criteria for the Find are fetched from the restriction storage provider according to the given parameters. In addition an extra set of restrictions can be added to the search. These restrictions will not be saved, they are only valid for the current search. Extra restrictions will override restrictions with the same key already stored on the storagekey.
|
|
1659
|
-
* @param request - StorageType, ProviderName, StorageKey, ExtraRestrictions, OrderBy, DesiredColumns, PageSize, PageNumber
|
|
1660
|
-
* @returns Results from search, containing column information and result rows.
|
|
1661
|
-
*/
|
|
1662
|
-
public async findWithExtraRestrictionsAsync(request: carriers.Find_FindWithExtraRestrictionsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
1663
|
-
|
|
1664
|
-
/**
|
|
1665
|
-
* Execute a Find operation and return a page of results. The criteria for the Find are fetched from the restriction storage provider according to the given parameters. In addition an extra set of restrictions can be added to the search. These restrictions will not be saved, they are only valid for the current search. Extra restrictions will override restrictions with the same key already stored on the storagekey.
|
|
1666
|
-
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
1667
|
-
* @param providerName - Name of archive provider that is to execute the search and return the result columns/rows
|
|
1668
|
-
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search
|
|
1669
|
-
* @param extraRestrictions - Extra restrictions to append to the the search. These will override saved restrictions with the same key.
|
|
1670
|
-
* @param orderBy - Array of order by specifications. If it is null or empty, the row order is unspecified, database dependent, and might not be the same from call to call, depending on query execution plans. The unspecified order willgenerally not vary within pages of the same query.
|
|
1671
|
-
* @param desiredColumns - Array of column names desired for the result. Each name must match a column offered by the given archive provider.
|
|
1672
|
-
* @param pageSize - Size of result set pages
|
|
1673
|
-
* @param pageNumber - Result set page to return, 0 is the first page. When a call returns no rows, no further pages are available. Negative page numbers are interpreted as number of rows to skip.
|
|
1674
|
-
* @returns Results from search, containing column information and result rows.
|
|
1675
|
-
*/
|
|
1676
|
-
public async findWithExtraRestrictionsAsync(storageType: string, providerName: string, storageKey: string, extraRestrictions: carriers.ArchiveRestrictionInfo[], orderBy: carriers.ArchiveOrderByInfo[], desiredColumns: string[], pageSize: number, pageNumber: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
1677
|
-
|
|
1678
|
-
public async findWithExtraRestrictionsAsync(storageType:string|carriers.Find_FindWithExtraRestrictionsRequest, providerName?:string|base.WebApiRequestOptions, storageKey?:string, extraRestrictions?:carriers.ArchiveRestrictionInfo[], orderBy?:carriers.ArchiveOrderByInfo[], desiredColumns?:string[], pageSize?:number, pageNumber?:number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
1679
|
-
let _request : carriers.Find_FindWithExtraRestrictionsRequest = null;
|
|
1680
|
-
let _options : base.WebApiRequestOptions = null;
|
|
1681
|
-
const first : any = storageType;
|
|
1682
|
-
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.extraRestrictions)!='undefined' || typeof(first.orderBy)!='undefined' || typeof(first.desiredColumns)!='undefined' || typeof(first.pageSize)!='undefined' || typeof(first.pageNumber)!='undefined' ) )
|
|
1683
|
-
{
|
|
1684
|
-
_request = storageType as carriers.Find_FindWithExtraRestrictionsRequest;
|
|
1685
|
-
_options = providerName as base.WebApiRequestOptions;
|
|
1686
|
-
}
|
|
1687
|
-
else
|
|
1688
|
-
{
|
|
1689
|
-
_request = {
|
|
1690
|
-
storageType: storageType as string,
|
|
1691
|
-
providerName: providerName as string,
|
|
1692
|
-
storageKey: storageKey as string,
|
|
1693
|
-
extraRestrictions: extraRestrictions as carriers.ArchiveRestrictionInfo[],
|
|
1694
|
-
orderBy: orderBy as carriers.ArchiveOrderByInfo[],
|
|
1695
|
-
desiredColumns: desiredColumns as string[],
|
|
1696
|
-
pageSize: pageSize as number,
|
|
1697
|
-
pageNumber: pageNumber as number,
|
|
1698
|
-
};
|
|
1699
|
-
_options = webapi_options;
|
|
1700
|
-
}
|
|
1701
|
-
return this._findWithExtraRestrictionsAsync( _request, _options );
|
|
1702
|
-
}
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
private async _findWithColumnsAsync(request: carriers.Find_FindWithColumnsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
1706
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1707
|
-
base.WebApiBase.SetPending(options);
|
|
1708
|
-
return new Promise< carriers.FindResults >(async (resolve, reject) => {
|
|
1709
|
-
try {
|
|
1710
|
-
config.baseURL = this._options.baseUrl;
|
|
1711
|
-
const response = await this._axios.post("FindWithColumns", request , config);
|
|
1712
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
1713
|
-
const res : carriers.FindResults = converters.Create_FindResults_From( response.data );
|
|
1714
|
-
resolve(res);
|
|
1715
|
-
}
|
|
1716
|
-
catch( err ) {
|
|
1717
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1718
|
-
reject(err);
|
|
1719
|
-
}
|
|
1720
|
-
});
|
|
1721
|
-
}
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
/**
|
|
1726
|
-
* Execute a Find operation and return a page of results. The criteria for the Find are fetched from the restriction storage provider according to the given parameters.
|
|
1727
|
-
* @param request - StorageType, ProviderName, StorageKey, DesiredColumns, PageSize, PageNumber, OrderBy
|
|
1728
|
-
* @returns Results from search, containing column information and result rows.
|
|
1729
|
-
*/
|
|
1730
|
-
public async findWithColumnsAsync(request: carriers.Find_FindWithColumnsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
1731
|
-
|
|
1732
|
-
/**
|
|
1733
|
-
* Execute a Find operation and return a page of results. The criteria for the Find are fetched from the restriction storage provider according to the given parameters.
|
|
1734
|
-
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
1735
|
-
* @param providerName - Name of archive provider that is to execute the search and return the result columns/rows
|
|
1736
|
-
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search
|
|
1737
|
-
* @param desiredColumns - Array of column names desired for the result. Each name must match a column offered by the given archive provider.
|
|
1738
|
-
* @param pageSize - Size of result set pages
|
|
1739
|
-
* @param pageNumber - Result set page to return, 0 is the first page. When a call returns no rows, no further pages are available. Negative page numbers are interpreted as number of rows to skip.
|
|
1740
|
-
* @param orderBy - Array of order by specifications. If it is null or empty, the row order is unspecified, database dependent, and might not be the same from call to call, depending on query execution plans. The unspecified order willgenerally not vary within pages of the same query.
|
|
1741
|
-
* @returns Results from search, containing column information and result rows.
|
|
1742
|
-
*/
|
|
1743
|
-
public async findWithColumnsAsync(storageType: string, providerName: string, storageKey: string, desiredColumns: string[], pageSize: number, pageNumber: number, orderBy: carriers.ArchiveOrderByInfo[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
1744
|
-
|
|
1745
|
-
public async findWithColumnsAsync(storageType:string|carriers.Find_FindWithColumnsRequest, providerName?:string|base.WebApiRequestOptions, storageKey?:string, desiredColumns?:string[], pageSize?:number, pageNumber?:number, orderBy?:carriers.ArchiveOrderByInfo[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
1746
|
-
let _request : carriers.Find_FindWithColumnsRequest = null;
|
|
1747
|
-
let _options : base.WebApiRequestOptions = null;
|
|
1748
|
-
const first : any = storageType;
|
|
1749
|
-
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.desiredColumns)!='undefined' || typeof(first.pageSize)!='undefined' || typeof(first.pageNumber)!='undefined' || typeof(first.orderBy)!='undefined' ) )
|
|
1750
|
-
{
|
|
1751
|
-
_request = storageType as carriers.Find_FindWithColumnsRequest;
|
|
1752
|
-
_options = providerName as base.WebApiRequestOptions;
|
|
1753
|
-
}
|
|
1754
|
-
else
|
|
1755
|
-
{
|
|
1756
|
-
_request = {
|
|
1757
|
-
storageType: storageType as string,
|
|
1758
|
-
providerName: providerName as string,
|
|
1759
|
-
storageKey: storageKey as string,
|
|
1760
|
-
desiredColumns: desiredColumns as string[],
|
|
1761
|
-
pageSize: pageSize as number,
|
|
1762
|
-
pageNumber: pageNumber as number,
|
|
1763
|
-
orderBy: orderBy as carriers.ArchiveOrderByInfo[],
|
|
1764
|
-
};
|
|
1765
|
-
_options = webapi_options;
|
|
1766
|
-
}
|
|
1767
|
-
return this._findWithColumnsAsync( _request, _options );
|
|
1768
|
-
}
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
private async _saveRestrictions2Async(request: carriers.Find_SaveRestrictions2Request, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1772
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1773
|
-
base.WebApiBase.SetPending(options);
|
|
1774
|
-
return new Promise< void >(async (resolve, reject) => {
|
|
1775
|
-
try {
|
|
1776
|
-
config.baseURL = this._options.baseUrl;
|
|
1777
|
-
const response = await this._axios.post("SaveRestrictions2", request , config);
|
|
1778
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
1779
|
-
const res = response.data;
|
|
1780
|
-
resolve(res);
|
|
1781
|
-
}
|
|
1782
|
-
catch( err ) {
|
|
1783
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1784
|
-
reject(err);
|
|
1785
|
-
}
|
|
1786
|
-
});
|
|
1787
|
-
}
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
/**
|
|
1792
|
-
* Save an array of restrictions for later use as search criteria (including as dynamic selection and Find).
|
|
1793
|
-
* @param request - StorageType, ProviderName, StorageKey, Restrictions
|
|
1794
|
-
* @returns This service call just saves the restrictions. See SaveRestrictionsAndGetCriteriaInformation if you would like the restrictions returned as criteria immediately, in one roundtrip
|
|
1795
|
-
*/
|
|
1796
|
-
public async saveRestrictions2Async(request: carriers.Find_SaveRestrictions2Request, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1797
|
-
|
|
1798
|
-
/**
|
|
1799
|
-
* Save an array of restrictions for later use as search criteria (including as dynamic selection and Find).
|
|
1800
|
-
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
1801
|
-
* @param providerName - Name of archive provider that is the intended consumer of the restrictions
|
|
1802
|
-
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it saves the restrictions as criteria
|
|
1803
|
-
* @param restrictions - String of restrictions. "name = 'SuperOffice'" The ColumnInfo member and the DisplayValues members need NOT be populated; it is enough to provide a name, operator and any values the operator may need. The IsActive is also saved. Values should be encoded using the CultureDataFormatter to ensure compatibility across cultures.
|
|
1804
|
-
* @returns This service call just saves the restrictions. See SaveRestrictionsAndGetCriteriaInformation if you would like the restrictions returned as criteria immediately, in one roundtrip
|
|
1805
|
-
*/
|
|
1806
|
-
public async saveRestrictions2Async(storageType: string, providerName: string, storageKey: string, restrictions: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1807
|
-
|
|
1808
|
-
public async saveRestrictions2Async(storageType:string|carriers.Find_SaveRestrictions2Request, providerName?:string|base.WebApiRequestOptions, storageKey?:string, restrictions?:string, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1809
|
-
let _request : carriers.Find_SaveRestrictions2Request = null;
|
|
1810
|
-
let _options : base.WebApiRequestOptions = null;
|
|
1811
|
-
const first : any = storageType;
|
|
1812
|
-
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.restrictions)!='undefined' ) )
|
|
1813
|
-
{
|
|
1814
|
-
_request = storageType as carriers.Find_SaveRestrictions2Request;
|
|
1815
|
-
_options = providerName as base.WebApiRequestOptions;
|
|
1816
|
-
}
|
|
1817
|
-
else
|
|
1818
|
-
{
|
|
1819
|
-
_request = {
|
|
1820
|
-
storageType: storageType as string,
|
|
1821
|
-
providerName: providerName as string,
|
|
1822
|
-
storageKey: storageKey as string,
|
|
1823
|
-
restrictions: restrictions as string,
|
|
1824
|
-
};
|
|
1825
|
-
_options = webapi_options;
|
|
1826
|
-
}
|
|
1827
|
-
return this._saveRestrictions2Async( _request, _options );
|
|
1828
|
-
}
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
private async _saveRestrictionsWithContext2Async(request: carriers.Find_SaveRestrictionsWithContext2Request, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1832
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1833
|
-
base.WebApiBase.SetPending(options);
|
|
1834
|
-
return new Promise< void >(async (resolve, reject) => {
|
|
1835
|
-
try {
|
|
1836
|
-
config.baseURL = this._options.baseUrl;
|
|
1837
|
-
const response = await this._axios.post("SaveRestrictionsWithContext2", request , config);
|
|
1838
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
1839
|
-
const res = response.data;
|
|
1840
|
-
resolve(res);
|
|
1841
|
-
}
|
|
1842
|
-
catch( err ) {
|
|
1843
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1844
|
-
reject(err);
|
|
1845
|
-
}
|
|
1846
|
-
});
|
|
1847
|
-
}
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
/**
|
|
1852
|
-
* Save an array of restrictions for later use as search criteria (including as dynamic selection and Find).
|
|
1853
|
-
* @param request - StorageType, ProviderName, StorageKey, Restrictions, Context
|
|
1854
|
-
* @returns This service call just saves the restrictions. See SaveRestrictionsAndGetCriteriaInformation if you would like the restrictions returned as criteria immediately, in one roundtrip
|
|
1855
|
-
*/
|
|
1856
|
-
public async saveRestrictionsWithContext2Async(request: carriers.Find_SaveRestrictionsWithContext2Request, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1857
|
-
|
|
1858
|
-
/**
|
|
1859
|
-
* Save an array of restrictions for later use as search criteria (including as dynamic selection and Find).
|
|
1860
|
-
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
1861
|
-
* @param providerName - Name of archive provider that is the intended consumer of the restrictions
|
|
1862
|
-
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it saves the restrictions as criteria
|
|
1863
|
-
* @param restrictions - String of restrictions. The ColumnInfo member and the DisplayValues members need NOT be populated; it is enough to provide a name, operator and any values the operator may need. The IsActive is also saved. Values should be encoded using the CultureDataFormatter to ensure compatibility across cultures.
|
|
1864
|
-
* @param context - Optional context that can be used by FindProvider
|
|
1865
|
-
* @returns This service call just saves the restrictions. See SaveRestrictionsAndGetCriteriaInformation if you would like the restrictions returned as criteria immediately, in one roundtrip
|
|
1866
|
-
*/
|
|
1867
|
-
public async saveRestrictionsWithContext2Async(storageType: string, providerName: string, storageKey: string, restrictions: string, context: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1868
|
-
|
|
1869
|
-
public async saveRestrictionsWithContext2Async(storageType:string|carriers.Find_SaveRestrictionsWithContext2Request, providerName?:string|base.WebApiRequestOptions, storageKey?:string, restrictions?:string, context?:string, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1870
|
-
let _request : carriers.Find_SaveRestrictionsWithContext2Request = null;
|
|
1871
|
-
let _options : base.WebApiRequestOptions = null;
|
|
1872
|
-
const first : any = storageType;
|
|
1873
|
-
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.restrictions)!='undefined' || typeof(first.context)!='undefined' ) )
|
|
1874
|
-
{
|
|
1875
|
-
_request = storageType as carriers.Find_SaveRestrictionsWithContext2Request;
|
|
1876
|
-
_options = providerName as base.WebApiRequestOptions;
|
|
1877
|
-
}
|
|
1878
|
-
else
|
|
1879
|
-
{
|
|
1880
|
-
_request = {
|
|
1881
|
-
storageType: storageType as string,
|
|
1882
|
-
providerName: providerName as string,
|
|
1883
|
-
storageKey: storageKey as string,
|
|
1884
|
-
restrictions: restrictions as string,
|
|
1885
|
-
context: context as string,
|
|
1886
|
-
};
|
|
1887
|
-
_options = webapi_options;
|
|
1888
|
-
}
|
|
1889
|
-
return this._saveRestrictionsWithContext2Async( _request, _options );
|
|
1890
|
-
}
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
private async _saveRestrictionsAndGetCriteriaInformation2Async(request: carriers.Find_SaveRestrictionsAndGetCriteriaInformation2Request, options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation > {
|
|
1894
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1895
|
-
base.WebApiBase.SetPending(options);
|
|
1896
|
-
return new Promise< carriers.CriteriaInformation >(async (resolve, reject) => {
|
|
1897
|
-
try {
|
|
1898
|
-
config.baseURL = this._options.baseUrl;
|
|
1899
|
-
const response = await this._axios.post("SaveRestrictionsAndGetCriteriaInformation2", request , config);
|
|
1900
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
1901
|
-
const res : carriers.CriteriaInformation = converters.Create_CriteriaInformation_From( response.data );
|
|
1902
|
-
resolve(res);
|
|
1903
|
-
}
|
|
1904
|
-
catch( err ) {
|
|
1905
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1906
|
-
reject(err);
|
|
1907
|
-
}
|
|
1908
|
-
});
|
|
1909
|
-
}
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
/**
|
|
1914
|
-
* Save an array of restrictions for later use as search criteria (including as dynamic selection and Find). Then, return the same result as a call to GetCriteriaInformation would have done. The purpose is to encapsulate saving and updating of a GUI in one round trip.
|
|
1915
|
-
* @param request - StorageType, ProviderName, StorageKey, Restrictions, StaticColumns
|
|
1916
|
-
* @returns The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control
|
|
1917
|
-
*/
|
|
1918
|
-
public async saveRestrictionsAndGetCriteriaInformation2Async(request: carriers.Find_SaveRestrictionsAndGetCriteriaInformation2Request, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
1919
|
-
|
|
1920
|
-
/**
|
|
1921
|
-
* Save an array of restrictions for later use as search criteria (including as dynamic selection and Find). Then, return the same result as a call to GetCriteriaInformation would have done. The purpose is to encapsulate saving and updating of a GUI in one round trip.
|
|
1922
|
-
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
1923
|
-
* @param providerName - Name of archive provider that is the intended consumer of the restrictions
|
|
1924
|
-
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it saves the restrictions as criteria
|
|
1925
|
-
* @param restrictions - String of restrictions. The ColumnInfo member and the DisplayValues members need NOT be populated; it is enough to provide a name, operator and any values the operator may need. The IsActive is also saved. Values should be encoded using the CultureDataFormatter to ensure compatibility across cultures.
|
|
1926
|
-
* @param staticColumns - Optional string of comma-separated columns that are to be EXCLUDED from the CriteriaArchiveRows part of the result. In the Find dialogs, that corresponds to the 'static' fields, to avoid duplicating them in the 'Match also' criteria list. This array can be null, indicating that all restrictions should be included in the criteria list.
|
|
1927
|
-
* @returns The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control
|
|
1928
|
-
*/
|
|
1929
|
-
public async saveRestrictionsAndGetCriteriaInformation2Async(storageType: string, providerName: string, storageKey: string, restrictions: string, staticColumns: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
1930
|
-
|
|
1931
|
-
public async saveRestrictionsAndGetCriteriaInformation2Async(storageType:string|carriers.Find_SaveRestrictionsAndGetCriteriaInformation2Request, providerName?:string|base.WebApiRequestOptions, storageKey?:string, restrictions?:string, staticColumns?:string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation > {
|
|
1932
|
-
let _request : carriers.Find_SaveRestrictionsAndGetCriteriaInformation2Request = null;
|
|
1933
|
-
let _options : base.WebApiRequestOptions = null;
|
|
1934
|
-
const first : any = storageType;
|
|
1935
|
-
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.restrictions)!='undefined' || typeof(first.staticColumns)!='undefined' ) )
|
|
1936
|
-
{
|
|
1937
|
-
_request = storageType as carriers.Find_SaveRestrictionsAndGetCriteriaInformation2Request;
|
|
1938
|
-
_options = providerName as base.WebApiRequestOptions;
|
|
1939
|
-
}
|
|
1940
|
-
else
|
|
1941
|
-
{
|
|
1942
|
-
_request = {
|
|
1943
|
-
storageType: storageType as string,
|
|
1944
|
-
providerName: providerName as string,
|
|
1945
|
-
storageKey: storageKey as string,
|
|
1946
|
-
restrictions: restrictions as string,
|
|
1947
|
-
staticColumns: staticColumns as string,
|
|
1948
|
-
};
|
|
1949
|
-
_options = webapi_options;
|
|
1950
|
-
}
|
|
1951
|
-
return this._saveRestrictionsAndGetCriteriaInformation2Async( _request, _options );
|
|
1952
|
-
}
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
private async _findFromRestrictions2Async(request: carriers.Find_FindFromRestrictions2Request, options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
1956
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1957
|
-
base.WebApiBase.SetPending(options);
|
|
1958
|
-
return new Promise< carriers.FindResults >(async (resolve, reject) => {
|
|
1959
|
-
try {
|
|
1960
|
-
config.baseURL = this._options.baseUrl;
|
|
1961
|
-
const response = await this._axios.post("FindFromRestrictions2", request , config);
|
|
1962
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
1963
|
-
const res : carriers.FindResults = converters.Create_FindResults_From( response.data );
|
|
1964
|
-
resolve(res);
|
|
1965
|
-
}
|
|
1966
|
-
catch( err ) {
|
|
1967
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
1968
|
-
reject(err);
|
|
1969
|
-
}
|
|
1970
|
-
});
|
|
1971
|
-
}
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
/**
|
|
1976
|
-
* Execute a Find operation and return a page of results. The criteria for the Find are passed in directly, not fetched by a restriction storage provider. The columns of the result are calculated based on the restriction.
|
|
1977
|
-
* @param request - Restrictions, ProviderName, PageSize, PageNumber
|
|
1978
|
-
* @returns Results from search, containing column information and result rows.
|
|
1979
|
-
*/
|
|
1980
|
-
public async findFromRestrictions2Async(request: carriers.Find_FindFromRestrictions2Request, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
1981
|
-
|
|
1982
|
-
/**
|
|
1983
|
-
* Execute a Find operation and return a page of results. The criteria for the Find are passed in directly, not fetched by a restriction storage provider. The columns of the result are calculated based on the restriction.
|
|
1984
|
-
* @param restrictions - String of restrictions specifying the search. e.g. "name='SuperOffice'" Each restriction must match a column of the given archive provider, and that column must have its CanRestrictBy property set to true.
|
|
1985
|
-
* @param providerName - Name of archive provider that is to execute the search and return the result columns/rows
|
|
1986
|
-
* @param pageSize - Size of result set pages
|
|
1987
|
-
* @param pageNumber - Result set page to return, 0 is the first page. When a call returns no rows, no further pages are available. Negative page numbers are interpreted as number of rows to skip.
|
|
1988
|
-
* @returns Results from search, containing column information and result rows.
|
|
1989
|
-
*/
|
|
1990
|
-
public async findFromRestrictions2Async(restrictions: string, providerName: string, pageSize: number, pageNumber: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
1991
|
-
|
|
1992
|
-
public async findFromRestrictions2Async(restrictions:string|carriers.Find_FindFromRestrictions2Request, providerName?:string|base.WebApiRequestOptions, pageSize?:number, pageNumber?:number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
1993
|
-
let _request : carriers.Find_FindFromRestrictions2Request = null;
|
|
1994
|
-
let _options : base.WebApiRequestOptions = null;
|
|
1995
|
-
const first : any = restrictions;
|
|
1996
|
-
if( typeof( first ) === "object" && first && ( typeof(first.restrictions)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.pageSize)!='undefined' || typeof(first.pageNumber)!='undefined' ) )
|
|
1997
|
-
{
|
|
1998
|
-
_request = restrictions as carriers.Find_FindFromRestrictions2Request;
|
|
1999
|
-
_options = providerName as base.WebApiRequestOptions;
|
|
2000
|
-
}
|
|
2001
|
-
else
|
|
2002
|
-
{
|
|
2003
|
-
_request = {
|
|
2004
|
-
restrictions: restrictions as string,
|
|
2005
|
-
providerName: providerName as string,
|
|
2006
|
-
pageSize: pageSize as number,
|
|
2007
|
-
pageNumber: pageNumber as number,
|
|
2008
|
-
};
|
|
2009
|
-
_options = webapi_options;
|
|
2010
|
-
}
|
|
2011
|
-
return this._findFromRestrictions2Async( _request, _options );
|
|
2012
|
-
}
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
private async _findFromRestrictionsColumns2Async(request: carriers.Find_FindFromRestrictionsColumns2Request, options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
2016
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2017
|
-
base.WebApiBase.SetPending(options);
|
|
2018
|
-
return new Promise< carriers.FindResults >(async (resolve, reject) => {
|
|
2019
|
-
try {
|
|
2020
|
-
config.baseURL = this._options.baseUrl;
|
|
2021
|
-
const response = await this._axios.post("FindFromRestrictionsColumns2", request , config);
|
|
2022
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
2023
|
-
const res : carriers.FindResults = converters.Create_FindResults_From( response.data );
|
|
2024
|
-
resolve(res);
|
|
2025
|
-
}
|
|
2026
|
-
catch( err ) {
|
|
2027
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
2028
|
-
reject(err);
|
|
2029
|
-
}
|
|
2030
|
-
});
|
|
2031
|
-
}
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
/**
|
|
2036
|
-
* Execute a Find operation and return a page of results. <para/>The criteria for the Find are passed in directly, not fetched by a restriction storage provider. <para/>The desired columns of the result set are also passed in directly.<para/>The orderby information is calculated by the system.<para/>Use the GetCriteriaInformation and GetDefaultDesiredColumns service methods to let the system calculate these values, if you want to use or modify them.
|
|
2037
|
-
* @param request - Restrictions, ProviderName, DesiredColumns, PageSize, PageNumber
|
|
2038
|
-
* @returns Results from search, containing column information and result rows.
|
|
2039
|
-
*/
|
|
2040
|
-
public async findFromRestrictionsColumns2Async(request: carriers.Find_FindFromRestrictionsColumns2Request, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
2041
|
-
|
|
2042
|
-
/**
|
|
2043
|
-
* Execute a Find operation and return a page of results. <para/>The criteria for the Find are passed in directly, not fetched by a restriction storage provider. <para/>The desired columns of the result set are also passed in directly.<para/>The orderby information is calculated by the system.<para/>Use the GetCriteriaInformation and GetDefaultDesiredColumns service methods to let the system calculate these values, if you want to use or modify them.
|
|
2044
|
-
* @param restrictions - String of restrictions specifying the search. e.g.:"name begins 'Super'". Each restriction must match a column of the given archive provider, and that column must have its CanRestrictBy property set to true.
|
|
2045
|
-
* @param providerName - Name of archive provider that is to execute the search and return the result columns/rows
|
|
2046
|
-
* @param desiredColumns - Array of column names desired for the result. Each name must match a column offered by the given archive provider.
|
|
2047
|
-
* @param pageSize - Size of result set pages
|
|
2048
|
-
* @param pageNumber - Result set page to return, 0 is the first page. When a call returns no rows, no further pages are available. Negative page numbers are interpreted as number of rows to skip.
|
|
2049
|
-
* @returns Results from search, containing column information and result rows.
|
|
2050
|
-
*/
|
|
2051
|
-
public async findFromRestrictionsColumns2Async(restrictions: string, providerName: string, desiredColumns: string, pageSize: number, pageNumber: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
2052
|
-
|
|
2053
|
-
public async findFromRestrictionsColumns2Async(restrictions:string|carriers.Find_FindFromRestrictionsColumns2Request, providerName?:string|base.WebApiRequestOptions, desiredColumns?:string, pageSize?:number, pageNumber?:number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
2054
|
-
let _request : carriers.Find_FindFromRestrictionsColumns2Request = null;
|
|
2055
|
-
let _options : base.WebApiRequestOptions = null;
|
|
2056
|
-
const first : any = restrictions;
|
|
2057
|
-
if( typeof( first ) === "object" && first && ( typeof(first.restrictions)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.desiredColumns)!='undefined' || typeof(first.pageSize)!='undefined' || typeof(first.pageNumber)!='undefined' ) )
|
|
2058
|
-
{
|
|
2059
|
-
_request = restrictions as carriers.Find_FindFromRestrictionsColumns2Request;
|
|
2060
|
-
_options = providerName as base.WebApiRequestOptions;
|
|
2061
|
-
}
|
|
2062
|
-
else
|
|
2063
|
-
{
|
|
2064
|
-
_request = {
|
|
2065
|
-
restrictions: restrictions as string,
|
|
2066
|
-
providerName: providerName as string,
|
|
2067
|
-
desiredColumns: desiredColumns as string,
|
|
2068
|
-
pageSize: pageSize as number,
|
|
2069
|
-
pageNumber: pageNumber as number,
|
|
2070
|
-
};
|
|
2071
|
-
_options = webapi_options;
|
|
2072
|
-
}
|
|
2073
|
-
return this._findFromRestrictionsColumns2Async( _request, _options );
|
|
2074
|
-
}
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
private async _findFromRestrictionsColumnsOrderBy2Async(request: carriers.Find_FindFromRestrictionsColumnsOrderBy2Request, options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
2078
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2079
|
-
base.WebApiBase.SetPending(options);
|
|
2080
|
-
return new Promise< carriers.FindResults >(async (resolve, reject) => {
|
|
2081
|
-
try {
|
|
2082
|
-
config.baseURL = this._options.baseUrl;
|
|
2083
|
-
const response = await this._axios.post("FindFromRestrictionsColumnsOrderBy2", request , config);
|
|
2084
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
2085
|
-
const res : carriers.FindResults = converters.Create_FindResults_From( response.data );
|
|
2086
|
-
resolve(res);
|
|
2087
|
-
}
|
|
2088
|
-
catch( err ) {
|
|
2089
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
2090
|
-
reject(err);
|
|
2091
|
-
}
|
|
2092
|
-
});
|
|
2093
|
-
}
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
/**
|
|
2098
|
-
* Execute a Find operation and return a page of results. <para/>The criteria for the Find are passed in directly, not fetched by a restriction storage provider. <para/>The desired columns of the result set are also passed in directly.<para/>The orderby information is also passed in directly.<para/>Use the GetCriteriaInformation, GetDefaultDesiredColumns and GetDefaultOrderBy service methods to let the system calculate these values, if you want to use or modify them.
|
|
2099
|
-
* @param request - Restrictions, ProviderName, DesiredColumns, OrderBy, PageSize, PageNumber
|
|
2100
|
-
* @returns Results from search, containing column information and result rows.
|
|
2101
|
-
*/
|
|
2102
|
-
public async findFromRestrictionsColumnsOrderBy2Async(request: carriers.Find_FindFromRestrictionsColumnsOrderBy2Request, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
2103
|
-
|
|
2104
|
-
/**
|
|
2105
|
-
* Execute a Find operation and return a page of results. <para/>The criteria for the Find are passed in directly, not fetched by a restriction storage provider. <para/>The desired columns of the result set are also passed in directly.<para/>The orderby information is also passed in directly.<para/>Use the GetCriteriaInformation, GetDefaultDesiredColumns and GetDefaultOrderBy service methods to let the system calculate these values, if you want to use or modify them.
|
|
2106
|
-
* @param restrictions - String of restrictions specifying the search. Each restriction must match a column of the given archive provider, and that column must have its CanRestrictBy property set to true.
|
|
2107
|
-
* @param providerName - Name of archive provider that is to execute the search and return the result columns/rows
|
|
2108
|
-
* @param desiredColumns - Comma separated list of column names desired for the result. Each name must match a column offered by the given archive provider.
|
|
2109
|
-
* @param orderBy - String of order by specifications. If it is null or empty, the row order is unspecified, database dependent, and might not be the same from call to call, depending on query execution plans. The unspecified order willgenerally not vary within pages of the same query.
|
|
2110
|
-
* @param pageSize - Size of result set pages
|
|
2111
|
-
* @param pageNumber - Result set page to return, 0 is the first page. When a call returns no rows, no further pages are available. Negative page numbers are interpreted as number of rows to skip.
|
|
2112
|
-
* @returns Results from search, containing column information and result rows.
|
|
2113
|
-
*/
|
|
2114
|
-
public async findFromRestrictionsColumnsOrderBy2Async(restrictions: string, providerName: string, desiredColumns: string, orderBy: string, pageSize: number, pageNumber: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
2115
|
-
|
|
2116
|
-
public async findFromRestrictionsColumnsOrderBy2Async(restrictions:string|carriers.Find_FindFromRestrictionsColumnsOrderBy2Request, providerName?:string|base.WebApiRequestOptions, desiredColumns?:string, orderBy?:string, pageSize?:number, pageNumber?:number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
2117
|
-
let _request : carriers.Find_FindFromRestrictionsColumnsOrderBy2Request = null;
|
|
2118
|
-
let _options : base.WebApiRequestOptions = null;
|
|
2119
|
-
const first : any = restrictions;
|
|
2120
|
-
if( typeof( first ) === "object" && first && ( typeof(first.restrictions)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.desiredColumns)!='undefined' || typeof(first.orderBy)!='undefined' || typeof(first.pageSize)!='undefined' || typeof(first.pageNumber)!='undefined' ) )
|
|
2121
|
-
{
|
|
2122
|
-
_request = restrictions as carriers.Find_FindFromRestrictionsColumnsOrderBy2Request;
|
|
2123
|
-
_options = providerName as base.WebApiRequestOptions;
|
|
2124
|
-
}
|
|
2125
|
-
else
|
|
2126
|
-
{
|
|
2127
|
-
_request = {
|
|
2128
|
-
restrictions: restrictions as string,
|
|
2129
|
-
providerName: providerName as string,
|
|
2130
|
-
desiredColumns: desiredColumns as string,
|
|
2131
|
-
orderBy: orderBy as string,
|
|
2132
|
-
pageSize: pageSize as number,
|
|
2133
|
-
pageNumber: pageNumber as number,
|
|
2134
|
-
};
|
|
2135
|
-
_options = webapi_options;
|
|
2136
|
-
}
|
|
2137
|
-
return this._findFromRestrictionsColumnsOrderBy2Async( _request, _options );
|
|
2138
|
-
}
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
private async _getDefaultDesiredColumnsFromRestrictions2Async(request: carriers.Find_GetDefaultDesiredColumnsFromRestrictions2Request, options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveColumnInfo[] > {
|
|
2142
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2143
|
-
base.WebApiBase.SetPending(options);
|
|
2144
|
-
return new Promise< carriers.ArchiveColumnInfo[] >(async (resolve, reject) => {
|
|
2145
|
-
try {
|
|
2146
|
-
config.baseURL = this._options.baseUrl;
|
|
2147
|
-
const response = await this._axios.post("GetDefaultDesiredColumnsFromRestrictions2", request , config);
|
|
2148
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
2149
|
-
const res : carriers.ArchiveColumnInfo[] = converters.Create_ArchiveColumnInfoArray_From( response.data );
|
|
2150
|
-
resolve(res);
|
|
2151
|
-
}
|
|
2152
|
-
catch( err ) {
|
|
2153
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
2154
|
-
reject(err);
|
|
2155
|
-
}
|
|
2156
|
-
});
|
|
2157
|
-
}
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
/**
|
|
2162
|
-
* Calculate the default desired columns, i.e., the result columns for a given search. The search is defined by a provider name and a set of restrictions. This is the algorithm that is used by the Find service method.
|
|
2163
|
-
* @param request - ProviderName, Restrictions
|
|
2164
|
-
* @returns Column information for the default desired columns, fully populated. Percentage-specified column widths sum to exactly 100.
|
|
2165
|
-
*/
|
|
2166
|
-
public async getDefaultDesiredColumnsFromRestrictions2Async(request: carriers.Find_GetDefaultDesiredColumnsFromRestrictions2Request, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveColumnInfo[] >;
|
|
2167
|
-
|
|
2168
|
-
/**
|
|
2169
|
-
* Calculate the default desired columns, i.e., the result columns for a given search. The search is defined by a provider name and a set of restrictions. This is the algorithm that is used by the Find service method.
|
|
2170
|
-
* @param providerName - Name of the provider to calculate default desired columns for
|
|
2171
|
-
* @param restrictions - Restriction to use in the calculation of default desired columns
|
|
2172
|
-
* @returns Column information for the default desired columns, fully populated. Percentage-specified column widths sum to exactly 100.
|
|
2173
|
-
*/
|
|
2174
|
-
public async getDefaultDesiredColumnsFromRestrictions2Async(providerName: string, restrictions: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveColumnInfo[] >;
|
|
2175
|
-
|
|
2176
|
-
public async getDefaultDesiredColumnsFromRestrictions2Async(providerName:string|carriers.Find_GetDefaultDesiredColumnsFromRestrictions2Request, restrictions?:string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveColumnInfo[] > {
|
|
2177
|
-
let _request : carriers.Find_GetDefaultDesiredColumnsFromRestrictions2Request = null;
|
|
2178
|
-
let _options : base.WebApiRequestOptions = null;
|
|
2179
|
-
const first : any = providerName;
|
|
2180
|
-
if( typeof( first ) === "object" && first && ( typeof(first.providerName)!='undefined' || typeof(first.restrictions)!='undefined' ) )
|
|
2181
|
-
{
|
|
2182
|
-
_request = providerName as carriers.Find_GetDefaultDesiredColumnsFromRestrictions2Request;
|
|
2183
|
-
_options = restrictions as base.WebApiRequestOptions;
|
|
2184
|
-
}
|
|
2185
|
-
else
|
|
2186
|
-
{
|
|
2187
|
-
_request = {
|
|
2188
|
-
providerName: providerName as string,
|
|
2189
|
-
restrictions: restrictions as string,
|
|
2190
|
-
};
|
|
2191
|
-
_options = webapi_options;
|
|
2192
|
-
}
|
|
2193
|
-
return this._getDefaultDesiredColumnsFromRestrictions2Async( _request, _options );
|
|
2194
|
-
}
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
private async _findOrderBy2Async(request: carriers.Find_FindOrderBy2Request, options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
2198
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2199
|
-
base.WebApiBase.SetPending(options);
|
|
2200
|
-
return new Promise< carriers.FindResults >(async (resolve, reject) => {
|
|
2201
|
-
try {
|
|
2202
|
-
config.baseURL = this._options.baseUrl;
|
|
2203
|
-
const response = await this._axios.post("FindOrderBy2", request , config);
|
|
2204
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
2205
|
-
const res : carriers.FindResults = converters.Create_FindResults_From( response.data );
|
|
2206
|
-
resolve(res);
|
|
2207
|
-
}
|
|
2208
|
-
catch( err ) {
|
|
2209
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
2210
|
-
reject(err);
|
|
2211
|
-
}
|
|
2212
|
-
});
|
|
2213
|
-
}
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
/**
|
|
2218
|
-
* Execute a Find operation and return a page of results. The criteria for the Find are fetched from the restriction storage provider according to the given parameters. The columns of the result are calculated based on the restriction. The orderby parameter is used for sorting the results.<para/>The other variants of the Find method allow you greater control over the individual aspects of the process.
|
|
2219
|
-
* @param request - StorageType, ProviderName, StorageKey, PageSize, PageNumber, OrderBy
|
|
2220
|
-
* @returns Results from search, containing column information and result rows.
|
|
2221
|
-
*/
|
|
2222
|
-
public async findOrderBy2Async(request: carriers.Find_FindOrderBy2Request, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
2223
|
-
|
|
2224
|
-
/**
|
|
2225
|
-
* Execute a Find operation and return a page of results. The criteria for the Find are fetched from the restriction storage provider according to the given parameters. The columns of the result are calculated based on the restriction. The orderby parameter is used for sorting the results.<para/>The other variants of the Find method allow you greater control over the individual aspects of the process.
|
|
2226
|
-
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
2227
|
-
* @param providerName - Name of archive provider that is to execute the search and return the result columns/rows
|
|
2228
|
-
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search
|
|
2229
|
-
* @param pageSize - Size of result set pages
|
|
2230
|
-
* @param pageNumber - Result set page to return, 0 is the first page. When a call returns no rows, no further pages are available. Negative page numbers are interpreted as number of rows to skip.
|
|
2231
|
-
* @param orderBy - Comma separated list of order by specifications. "name asc, dept desc" If it is null or empty, the row order is unspecified, database dependent, and might not be the same from call to call, depending on query execution plans. The unspecified order willgenerally not vary within pages of the same query.
|
|
2232
|
-
* @returns Results from search, containing column information and result rows.
|
|
2233
|
-
*/
|
|
2234
|
-
public async findOrderBy2Async(storageType: string, providerName: string, storageKey: string, pageSize: number, pageNumber: number, orderBy: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
2235
|
-
|
|
2236
|
-
public async findOrderBy2Async(storageType:string|carriers.Find_FindOrderBy2Request, providerName?:string|base.WebApiRequestOptions, storageKey?:string, pageSize?:number, pageNumber?:number, orderBy?:string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
2237
|
-
let _request : carriers.Find_FindOrderBy2Request = null;
|
|
2238
|
-
let _options : base.WebApiRequestOptions = null;
|
|
2239
|
-
const first : any = storageType;
|
|
2240
|
-
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.pageSize)!='undefined' || typeof(first.pageNumber)!='undefined' || typeof(first.orderBy)!='undefined' ) )
|
|
2241
|
-
{
|
|
2242
|
-
_request = storageType as carriers.Find_FindOrderBy2Request;
|
|
2243
|
-
_options = providerName as base.WebApiRequestOptions;
|
|
2244
|
-
}
|
|
2245
|
-
else
|
|
2246
|
-
{
|
|
2247
|
-
_request = {
|
|
2248
|
-
storageType: storageType as string,
|
|
2249
|
-
providerName: providerName as string,
|
|
2250
|
-
storageKey: storageKey as string,
|
|
2251
|
-
pageSize: pageSize as number,
|
|
2252
|
-
pageNumber: pageNumber as number,
|
|
2253
|
-
orderBy: orderBy as string,
|
|
2254
|
-
};
|
|
2255
|
-
_options = webapi_options;
|
|
2256
|
-
}
|
|
2257
|
-
return this._findOrderBy2Async( _request, _options );
|
|
2258
|
-
}
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
private async _findWithExtraRestrictions2Async(request: carriers.Find_FindWithExtraRestrictions2Request, options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
2262
|
-
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2263
|
-
base.WebApiBase.SetPending(options);
|
|
2264
|
-
return new Promise< carriers.FindResults >(async (resolve, reject) => {
|
|
2265
|
-
try {
|
|
2266
|
-
config.baseURL = this._options.baseUrl;
|
|
2267
|
-
const response = await this._axios.post("FindWithExtraRestrictions2", request , config);
|
|
2268
|
-
base.WebApiBase.SetCompleted(options, response);
|
|
2269
|
-
const res : carriers.FindResults = converters.Create_FindResults_From( response.data );
|
|
2270
|
-
resolve(res);
|
|
2271
|
-
}
|
|
2272
|
-
catch( err ) {
|
|
2273
|
-
base.WebApiBase.HandleError(options, config, err);
|
|
2274
|
-
reject(err);
|
|
2275
|
-
}
|
|
2276
|
-
});
|
|
2277
|
-
}
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
/**
|
|
2282
|
-
* Execute a Find operation and return a page of results. The criteria for the Find are fetched from the restriction storage provider according to the given parameters. In addition an extra set of restrictions can be added to the search. These restrictions will not be saved, they are only valid for the current search. Extra restrictions will override restrictions with the same key already stored on the storagekey.
|
|
2283
|
-
* @param request - StorageType, ProviderName, StorageKey, ExtraRestrictions, OrderBy, DesiredColumns, PageSize, PageNumber
|
|
2284
|
-
* @returns Results from search, containing column information and result rows.
|
|
2285
|
-
*/
|
|
2286
|
-
public async findWithExtraRestrictions2Async(request: carriers.Find_FindWithExtraRestrictions2Request, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
2287
|
-
|
|
2288
|
-
/**
|
|
2289
|
-
* Execute a Find operation and return a page of results. The criteria for the Find are fetched from the restriction storage provider according to the given parameters. In addition an extra set of restrictions can be added to the search. These restrictions will not be saved, they are only valid for the current search. Extra restrictions will override restrictions with the same key already stored on the storagekey.
|
|
2290
|
-
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
2291
|
-
* @param providerName - Name of archive provider that is to execute the search and return the result columns/rows
|
|
2292
|
-
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search
|
|
2293
|
-
* @param extraRestrictions - Extra restrictions to append to the the search. These will override saved restrictions with the same key.
|
|
2294
|
-
* @param orderBy - Comma separated list of order by specifications. If it is null or empty, the row order is unspecified, database dependent, and might not be the same from call to call, depending on query execution plans. The unspecified order willgenerally not vary within pages of the same query.
|
|
2295
|
-
* @param desiredColumns - Comma separated list of column names desired for the result. Each name must match a column offered by the given archive provider.
|
|
2296
|
-
* @param pageSize - Size of result set pages
|
|
2297
|
-
* @param pageNumber - Result set page to return, 0 is the first page. When a call returns no rows, no further pages are available. Negative page numbers are interpreted as number of rows to skip.
|
|
2298
|
-
* @returns Results from search, containing column information and result rows.
|
|
2299
|
-
*/
|
|
2300
|
-
public async findWithExtraRestrictions2Async(storageType: string, providerName: string, storageKey: string, extraRestrictions: string, orderBy: string, desiredColumns: string, pageSize: number, pageNumber: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
2301
|
-
|
|
2302
|
-
public async findWithExtraRestrictions2Async(storageType:string|carriers.Find_FindWithExtraRestrictions2Request, providerName?:string|base.WebApiRequestOptions, storageKey?:string, extraRestrictions?:string, orderBy?:string, desiredColumns?:string, pageSize?:number, pageNumber?:number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
2303
|
-
let _request : carriers.Find_FindWithExtraRestrictions2Request = null;
|
|
2304
|
-
let _options : base.WebApiRequestOptions = null;
|
|
2305
|
-
const first : any = storageType;
|
|
2306
|
-
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.extraRestrictions)!='undefined' || typeof(first.orderBy)!='undefined' || typeof(first.desiredColumns)!='undefined' || typeof(first.pageSize)!='undefined' || typeof(first.pageNumber)!='undefined' ) )
|
|
2307
|
-
{
|
|
2308
|
-
_request = storageType as carriers.Find_FindWithExtraRestrictions2Request;
|
|
2309
|
-
_options = providerName as base.WebApiRequestOptions;
|
|
2310
|
-
}
|
|
2311
|
-
else
|
|
2312
|
-
{
|
|
2313
|
-
_request = {
|
|
2314
|
-
storageType: storageType as string,
|
|
2315
|
-
providerName: providerName as string,
|
|
2316
|
-
storageKey: storageKey as string,
|
|
2317
|
-
extraRestrictions: extraRestrictions as string,
|
|
2318
|
-
orderBy: orderBy as string,
|
|
2319
|
-
desiredColumns: desiredColumns as string,
|
|
2320
|
-
pageSize: pageSize as number,
|
|
2321
|
-
pageNumber: pageNumber as number,
|
|
2322
|
-
};
|
|
2323
|
-
_options = webapi_options;
|
|
2324
|
-
}
|
|
2325
|
-
return this._findWithExtraRestrictions2Async( _request, _options );
|
|
2326
|
-
}
|
|
2327
|
-
|
|
2328
|
-
} // class v1FindAgentController
|
|
2329
|
-
|
|
2330
|
-
|
|
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/FindAgent.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
|
+
* Find functions
|
|
28
|
+
*/
|
|
29
|
+
export interface IFindAgent {
|
|
30
|
+
getCriteriaInformationAsync(request: carriers.Find_GetCriteriaInformationRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
31
|
+
getCriteriaInformationAsync(storageType: string, providerName: string, storageKey: string, staticColumns: string[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
32
|
+
getCriteriaInformationWithContextAsync(request: carriers.Find_GetCriteriaInformationWithContextRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
33
|
+
getCriteriaInformationWithContextAsync(storageType: string, providerName: string, storageKey: string, staticColumns: string[], context: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
34
|
+
saveRestrictionsAsync(request: carriers.Find_SaveRestrictionsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
35
|
+
saveRestrictionsAsync(storageType: string, providerName: string, storageKey: string, restrictions: carriers.ArchiveRestrictionInfo[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
36
|
+
saveRestrictionsWithContextAsync(request: carriers.Find_SaveRestrictionsWithContextRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
37
|
+
saveRestrictionsWithContextAsync(storageType: string, providerName: string, storageKey: string, restrictions: carriers.ArchiveRestrictionInfo[], context: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
38
|
+
saveRestrictionGroupAsync(request: carriers.Find_SaveRestrictionGroupRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
39
|
+
saveRestrictionGroupAsync(storageType: string, providerName: string, storageKey: string, restrictionGroup: carriers.ArchiveRestrictionGroup, context: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
40
|
+
saveRestrictionGroupsAsync(request: carriers.Find_SaveRestrictionGroupsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup[] >;
|
|
41
|
+
saveRestrictionGroupsAsync(storageType: string, providerName: string, storageKey: string, restrictionGroups: carriers.ArchiveRestrictionGroup[], context: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup[] >;
|
|
42
|
+
getRestrictionGroupsAsync(request: carriers.Find_GetRestrictionGroupsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup[] >;
|
|
43
|
+
getRestrictionGroupsAsync(storageType: string, providerName: string, storageKey: string, context: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup[] >;
|
|
44
|
+
getRestrictionGroupAsync(request: carriers.Find_GetRestrictionGroupRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup >;
|
|
45
|
+
getRestrictionGroupAsync(storageType: string, providerName: string, storageKey: string, rank: number, context: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup >;
|
|
46
|
+
createRestrictionGroupAsync(request: carriers.Find_CreateRestrictionGroupRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup >;
|
|
47
|
+
createRestrictionGroupAsync(storageType: string, providerName: string, storageKey: string, context: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup >;
|
|
48
|
+
deleteRestrictionGroupAsync(request: carriers.Find_DeleteRestrictionGroupRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
49
|
+
deleteRestrictionGroupAsync(storageType: string, providerName: string, storageKey: string, rank: number, context: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
50
|
+
saveRestrictionsAndGetCriteriaInformationAsync(request: carriers.Find_SaveRestrictionsAndGetCriteriaInformationRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
51
|
+
saveRestrictionsAndGetCriteriaInformationAsync(storageType: string, providerName: string, storageKey: string, restrictions: carriers.ArchiveRestrictionInfo[], staticColumns: string[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
52
|
+
findAsync(request: carriers.Find_FindRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
53
|
+
findAsync(storageType: string, providerName: string, storageKey: string, pageSize: number, pageNumber: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
54
|
+
findFromRestrictionsAsync(request: carriers.Find_FindFromRestrictionsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
55
|
+
findFromRestrictionsAsync(restrictions: carriers.ArchiveRestrictionInfo[], providerName: string, pageSize: number, pageNumber: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
56
|
+
findFromRestrictionsColumnsAsync(request: carriers.Find_FindFromRestrictionsColumnsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
57
|
+
findFromRestrictionsColumnsAsync(restrictions: carriers.ArchiveRestrictionInfo[], providerName: string, desiredColumns: string[], pageSize: number, pageNumber: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
58
|
+
getAvailableRestrictionColumnsAsync(request: carriers.Find_GetAvailableRestrictionColumnsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string[] >;
|
|
59
|
+
getAvailableRestrictionColumnsAsync(storageType: string, providerName: string, webapi_options?:base.WebApiRequestOptions) : Promise< string[] >;
|
|
60
|
+
getSpecifiedCriteriaInformationWithDefaultsAsync(request: carriers.Find_GetSpecifiedCriteriaInformationWithDefaultsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
61
|
+
getSpecifiedCriteriaInformationWithDefaultsAsync(storageType: string, providerName: string, storageKey: string, desiredColumnNames: string[], staticColumns: string[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
62
|
+
getSpecifiedCriteriaInformationWithDefaultsWithContextAsync(request: carriers.Find_GetSpecifiedCriteriaInformationWithDefaultsWithContextRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
63
|
+
getSpecifiedCriteriaInformationWithDefaultsWithContextAsync(storageType: string, providerName: string, storageKey: string, desiredColumnNames: string[], staticColumns: string[], context: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
64
|
+
findFromRestrictionsColumnsOrderByAsync(request: carriers.Find_FindFromRestrictionsColumnsOrderByRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
65
|
+
findFromRestrictionsColumnsOrderByAsync(restrictions: carriers.ArchiveRestrictionInfo[], providerName: string, desiredColumns: string[], orderBy: carriers.ArchiveOrderByInfo[], pageSize: number, pageNumber: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
66
|
+
getDefaultDesiredColumnsAsync(request: carriers.Find_GetDefaultDesiredColumnsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveColumnInfo[] >;
|
|
67
|
+
getDefaultDesiredColumnsAsync(storageType: string, providerName: string, storageKey: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveColumnInfo[] >;
|
|
68
|
+
getDefaultOrderByAsync(request: carriers.Find_GetDefaultOrderByRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveOrderByInfo[] >;
|
|
69
|
+
getDefaultOrderByAsync(storageType: string, providerName: string, storageKey: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveOrderByInfo[] >;
|
|
70
|
+
populateRestrictionsAsync(request: carriers.Find_PopulateRestrictionsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionInfo[] >;
|
|
71
|
+
populateRestrictionsAsync(providerName: string, restrictions: carriers.ArchiveRestrictionInfo[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionInfo[] >;
|
|
72
|
+
populateRestrictionValuesAsync(request: carriers.Find_PopulateRestrictionValuesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionInfo[] >;
|
|
73
|
+
populateRestrictionValuesAsync(restrictions: carriers.ArchiveRestrictionInfo[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionInfo[] >;
|
|
74
|
+
getDefaultDesiredColumnsFromRestrictionsAsync(request: carriers.Find_GetDefaultDesiredColumnsFromRestrictionsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveColumnInfo[] >;
|
|
75
|
+
getDefaultDesiredColumnsFromRestrictionsAsync(providerName: string, restrictions: carriers.ArchiveRestrictionInfo[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveColumnInfo[] >;
|
|
76
|
+
getDefaultOrderByFromDesiredColumnsAsync(request: carriers.Find_GetDefaultOrderByFromDesiredColumnsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveOrderByInfo[] >;
|
|
77
|
+
getDefaultOrderByFromDesiredColumnsAsync(providerName: string, desiredColumns: string[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveOrderByInfo[] >;
|
|
78
|
+
findOrderByAsync(request: carriers.Find_FindOrderByRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
79
|
+
findOrderByAsync(storageType: string, providerName: string, storageKey: string, pageSize: number, pageNumber: number, orderBy: carriers.ArchiveOrderByInfo[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
80
|
+
findWithExtraRestrictionsAsync(request: carriers.Find_FindWithExtraRestrictionsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
81
|
+
findWithExtraRestrictionsAsync(storageType: string, providerName: string, storageKey: string, extraRestrictions: carriers.ArchiveRestrictionInfo[], orderBy: carriers.ArchiveOrderByInfo[], desiredColumns: string[], pageSize: number, pageNumber: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
82
|
+
findWithColumnsAsync(request: carriers.Find_FindWithColumnsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
83
|
+
findWithColumnsAsync(storageType: string, providerName: string, storageKey: string, desiredColumns: string[], pageSize: number, pageNumber: number, orderBy: carriers.ArchiveOrderByInfo[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
84
|
+
saveRestrictions2Async(request: carriers.Find_SaveRestrictions2Request, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
85
|
+
saveRestrictions2Async(storageType: string, providerName: string, storageKey: string, restrictions: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
86
|
+
saveRestrictionsWithContext2Async(request: carriers.Find_SaveRestrictionsWithContext2Request, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
87
|
+
saveRestrictionsWithContext2Async(storageType: string, providerName: string, storageKey: string, restrictions: string, context: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
88
|
+
saveRestrictionsAndGetCriteriaInformation2Async(request: carriers.Find_SaveRestrictionsAndGetCriteriaInformation2Request, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
89
|
+
saveRestrictionsAndGetCriteriaInformation2Async(storageType: string, providerName: string, storageKey: string, restrictions: string, staticColumns: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
90
|
+
findFromRestrictions2Async(request: carriers.Find_FindFromRestrictions2Request, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
91
|
+
findFromRestrictions2Async(restrictions: string, providerName: string, pageSize: number, pageNumber: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
92
|
+
findFromRestrictionsColumns2Async(request: carriers.Find_FindFromRestrictionsColumns2Request, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
93
|
+
findFromRestrictionsColumns2Async(restrictions: string, providerName: string, desiredColumns: string, pageSize: number, pageNumber: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
94
|
+
findFromRestrictionsColumnsOrderBy2Async(request: carriers.Find_FindFromRestrictionsColumnsOrderBy2Request, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
95
|
+
findFromRestrictionsColumnsOrderBy2Async(restrictions: string, providerName: string, desiredColumns: string, orderBy: string, pageSize: number, pageNumber: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
96
|
+
getDefaultDesiredColumnsFromRestrictions2Async(request: carriers.Find_GetDefaultDesiredColumnsFromRestrictions2Request, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveColumnInfo[] >;
|
|
97
|
+
getDefaultDesiredColumnsFromRestrictions2Async(providerName: string, restrictions: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveColumnInfo[] >;
|
|
98
|
+
findOrderBy2Async(request: carriers.Find_FindOrderBy2Request, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
99
|
+
findOrderBy2Async(storageType: string, providerName: string, storageKey: string, pageSize: number, pageNumber: number, orderBy: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
100
|
+
findWithExtraRestrictions2Async(request: carriers.Find_FindWithExtraRestrictions2Request, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
101
|
+
findWithExtraRestrictions2Async(storageType: string, providerName: string, storageKey: string, extraRestrictions: string, orderBy: string, desiredColumns: string, pageSize: number, pageNumber: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
102
|
+
} // interface IFindAgent
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Find functions
|
|
109
|
+
*/
|
|
110
|
+
export class FindAgent extends base.WebApiBase implements IFindAgent {
|
|
111
|
+
constructor(baseUrl?: string, languageCode?:string, cultureCode?: string);
|
|
112
|
+
constructor(baseUrl?: string, resourceParsing?: base.ResourceParsing);
|
|
113
|
+
constructor(baseUrl: string, resourceManager:any);
|
|
114
|
+
constructor(baseUrl: string, config:AxiosRequestConfig, resourceManager:any);
|
|
115
|
+
constructor(baseUrl: string, config:AxiosRequestConfig, resourceParsing?: base.ResourceParsing);
|
|
116
|
+
constructor(baseUrl: string, config:AxiosRequestConfig, languageCode?:string, cultureCode?: string);
|
|
117
|
+
constructor(options: base.WebApiOptions);
|
|
118
|
+
|
|
119
|
+
constructor(baseUrlOrOptions: string|base.WebApiOptions|undefined,
|
|
120
|
+
langOrconfigOrRM?: string|base.ResourceParsing|AxiosRequestConfig|any,
|
|
121
|
+
langOrResourceOrRM?:string|base.ResourceParsing|any,
|
|
122
|
+
cultureCode?: string,
|
|
123
|
+
) {
|
|
124
|
+
const options = base.WebApiBase.FigureOutOptions(baseUrlOrOptions, langOrconfigOrRM, langOrResourceOrRM, cultureCode);
|
|
125
|
+
options.basePath = "v1/Agents/Find/";
|
|
126
|
+
super(options);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
private async _getCriteriaInformationAsync(request: carriers.Find_GetCriteriaInformationRequest, options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation > {
|
|
132
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
133
|
+
base.WebApiBase.SetPending(options);
|
|
134
|
+
return new Promise< carriers.CriteriaInformation >(async (resolve, reject) => {
|
|
135
|
+
try {
|
|
136
|
+
config.baseURL = this._options.baseUrl;
|
|
137
|
+
const response = await this._axios.post("GetCriteriaInformation", request , config);
|
|
138
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
139
|
+
const res : carriers.CriteriaInformation = converters.Create_CriteriaInformation_From( response.data );
|
|
140
|
+
resolve(res);
|
|
141
|
+
}
|
|
142
|
+
catch( err ) {
|
|
143
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
144
|
+
reject(err);
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Get criteria information from a set of saved criteria. The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control
|
|
153
|
+
* @param request - StorageType, ProviderName, StorageKey, StaticColumns
|
|
154
|
+
* @returns The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control
|
|
155
|
+
*/
|
|
156
|
+
public async getCriteriaInformationAsync(request: carriers.Find_GetCriteriaInformationRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Get criteria information from a set of saved criteria. The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control
|
|
160
|
+
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
161
|
+
* @param providerName - Name of archive provider that is the intended consumer of the restrictions
|
|
162
|
+
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search
|
|
163
|
+
* @param staticColumns - Optional array of restrictions that are to be EXCLUDED from the CriteriaArchiveRows part of the result. In the Find dialogs, that corresponds to the 'static' fields, to avoid duplicating them in the 'Match also' criteria list. This array can be null, indicating that all restrictions should be included in the criteria list.
|
|
164
|
+
* @returns The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control
|
|
165
|
+
*/
|
|
166
|
+
public async getCriteriaInformationAsync(storageType: string, providerName: string, storageKey: string, staticColumns: string[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
167
|
+
|
|
168
|
+
public async getCriteriaInformationAsync(storageType:string|carriers.Find_GetCriteriaInformationRequest, providerName?:string|base.WebApiRequestOptions, storageKey?:string, staticColumns?:string[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation > {
|
|
169
|
+
let _request : carriers.Find_GetCriteriaInformationRequest = null;
|
|
170
|
+
let _options : base.WebApiRequestOptions = null;
|
|
171
|
+
const first : any = storageType;
|
|
172
|
+
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.staticColumns)!='undefined' ) )
|
|
173
|
+
{
|
|
174
|
+
_request = storageType as carriers.Find_GetCriteriaInformationRequest;
|
|
175
|
+
_options = providerName as base.WebApiRequestOptions;
|
|
176
|
+
}
|
|
177
|
+
else
|
|
178
|
+
{
|
|
179
|
+
_request = {
|
|
180
|
+
storageType: storageType as string,
|
|
181
|
+
providerName: providerName as string,
|
|
182
|
+
storageKey: storageKey as string,
|
|
183
|
+
staticColumns: staticColumns as string[],
|
|
184
|
+
};
|
|
185
|
+
_options = webapi_options;
|
|
186
|
+
}
|
|
187
|
+
return this._getCriteriaInformationAsync( _request, _options );
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
private async _getCriteriaInformationWithContextAsync(request: carriers.Find_GetCriteriaInformationWithContextRequest, options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation > {
|
|
192
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
193
|
+
base.WebApiBase.SetPending(options);
|
|
194
|
+
return new Promise< carriers.CriteriaInformation >(async (resolve, reject) => {
|
|
195
|
+
try {
|
|
196
|
+
config.baseURL = this._options.baseUrl;
|
|
197
|
+
const response = await this._axios.post("GetCriteriaInformationWithContext", request , config);
|
|
198
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
199
|
+
const res : carriers.CriteriaInformation = converters.Create_CriteriaInformation_From( response.data );
|
|
200
|
+
resolve(res);
|
|
201
|
+
}
|
|
202
|
+
catch( err ) {
|
|
203
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
204
|
+
reject(err);
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Get criteria information from a set of saved criteria. The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control
|
|
213
|
+
* @param request - StorageType, ProviderName, StorageKey, StaticColumns, Context
|
|
214
|
+
* @returns The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control
|
|
215
|
+
*/
|
|
216
|
+
public async getCriteriaInformationWithContextAsync(request: carriers.Find_GetCriteriaInformationWithContextRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Get criteria information from a set of saved criteria. The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control
|
|
220
|
+
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
221
|
+
* @param providerName - Name of archive provider that is the intended consumer of the restrictions
|
|
222
|
+
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search
|
|
223
|
+
* @param staticColumns - Optional array of restrictions that are to be EXCLUDED from the CriteriaArchiveRows part of the result. In the Find dialogs, that corresponds to the 'static' fields, to avoid duplicating them in the 'Match also' criteria list. This array can be null, indicating that all restrictions should be included in the criteria list.
|
|
224
|
+
* @param context - Optional context that can be used by FindProvider
|
|
225
|
+
* @returns The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control
|
|
226
|
+
*/
|
|
227
|
+
public async getCriteriaInformationWithContextAsync(storageType: string, providerName: string, storageKey: string, staticColumns: string[], context: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
228
|
+
|
|
229
|
+
public async getCriteriaInformationWithContextAsync(storageType:string|carriers.Find_GetCriteriaInformationWithContextRequest, providerName?:string|base.WebApiRequestOptions, storageKey?:string, staticColumns?:string[], context?:string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation > {
|
|
230
|
+
let _request : carriers.Find_GetCriteriaInformationWithContextRequest = null;
|
|
231
|
+
let _options : base.WebApiRequestOptions = null;
|
|
232
|
+
const first : any = storageType;
|
|
233
|
+
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.staticColumns)!='undefined' || typeof(first.context)!='undefined' ) )
|
|
234
|
+
{
|
|
235
|
+
_request = storageType as carriers.Find_GetCriteriaInformationWithContextRequest;
|
|
236
|
+
_options = providerName as base.WebApiRequestOptions;
|
|
237
|
+
}
|
|
238
|
+
else
|
|
239
|
+
{
|
|
240
|
+
_request = {
|
|
241
|
+
storageType: storageType as string,
|
|
242
|
+
providerName: providerName as string,
|
|
243
|
+
storageKey: storageKey as string,
|
|
244
|
+
staticColumns: staticColumns as string[],
|
|
245
|
+
context: context as string,
|
|
246
|
+
};
|
|
247
|
+
_options = webapi_options;
|
|
248
|
+
}
|
|
249
|
+
return this._getCriteriaInformationWithContextAsync( _request, _options );
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
private async _saveRestrictionsAsync(request: carriers.Find_SaveRestrictionsRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
254
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
255
|
+
base.WebApiBase.SetPending(options);
|
|
256
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
257
|
+
try {
|
|
258
|
+
config.baseURL = this._options.baseUrl;
|
|
259
|
+
const response = await this._axios.post("SaveRestrictions", request , config);
|
|
260
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
261
|
+
const res = response.data;
|
|
262
|
+
resolve(res);
|
|
263
|
+
}
|
|
264
|
+
catch( err ) {
|
|
265
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
266
|
+
reject(err);
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Save an array of restrictions for later use as search criteria (including as dynamic selection and Find).
|
|
275
|
+
* @param request - StorageType, ProviderName, StorageKey, Restrictions
|
|
276
|
+
* @returns This service call just saves the restrictions. See SaveRestrictionsAndGetCriteriaInformation if you would like the restrictions returned as criteria immediately, in one roundtrip
|
|
277
|
+
*/
|
|
278
|
+
public async saveRestrictionsAsync(request: carriers.Find_SaveRestrictionsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Save an array of restrictions for later use as search criteria (including as dynamic selection and Find).
|
|
282
|
+
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
283
|
+
* @param providerName - Name of archive provider that is the intended consumer of the restrictions
|
|
284
|
+
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it saves the restrictions as criteria
|
|
285
|
+
* @param restrictions - Array of restrictions. The ColumnInfo member and the DisplayValues members need NOT be populated; it is enough to provide a name, operator and any values the operator may need. The IsActive is also saved. Values should be encoded using the CultureDataFormatter to ensure compatibility across cultures.
|
|
286
|
+
* @returns This service call just saves the restrictions. See SaveRestrictionsAndGetCriteriaInformation if you would like the restrictions returned as criteria immediately, in one roundtrip
|
|
287
|
+
*/
|
|
288
|
+
public async saveRestrictionsAsync(storageType: string, providerName: string, storageKey: string, restrictions: carriers.ArchiveRestrictionInfo[], webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
289
|
+
|
|
290
|
+
public async saveRestrictionsAsync(storageType:string|carriers.Find_SaveRestrictionsRequest, providerName?:string|base.WebApiRequestOptions, storageKey?:string, restrictions?:carriers.ArchiveRestrictionInfo[], webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
291
|
+
let _request : carriers.Find_SaveRestrictionsRequest = null;
|
|
292
|
+
let _options : base.WebApiRequestOptions = null;
|
|
293
|
+
const first : any = storageType;
|
|
294
|
+
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.restrictions)!='undefined' ) )
|
|
295
|
+
{
|
|
296
|
+
_request = storageType as carriers.Find_SaveRestrictionsRequest;
|
|
297
|
+
_options = providerName as base.WebApiRequestOptions;
|
|
298
|
+
}
|
|
299
|
+
else
|
|
300
|
+
{
|
|
301
|
+
_request = {
|
|
302
|
+
storageType: storageType as string,
|
|
303
|
+
providerName: providerName as string,
|
|
304
|
+
storageKey: storageKey as string,
|
|
305
|
+
restrictions: restrictions as carriers.ArchiveRestrictionInfo[],
|
|
306
|
+
};
|
|
307
|
+
_options = webapi_options;
|
|
308
|
+
}
|
|
309
|
+
return this._saveRestrictionsAsync( _request, _options );
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
private async _saveRestrictionsWithContextAsync(request: carriers.Find_SaveRestrictionsWithContextRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
314
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
315
|
+
base.WebApiBase.SetPending(options);
|
|
316
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
317
|
+
try {
|
|
318
|
+
config.baseURL = this._options.baseUrl;
|
|
319
|
+
const response = await this._axios.post("SaveRestrictionsWithContext", request , config);
|
|
320
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
321
|
+
const res = response.data;
|
|
322
|
+
resolve(res);
|
|
323
|
+
}
|
|
324
|
+
catch( err ) {
|
|
325
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
326
|
+
reject(err);
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* Save an array of restrictions for later use as search criteria (including as dynamic selection and Find).
|
|
335
|
+
* @param request - StorageType, ProviderName, StorageKey, Restrictions, Context
|
|
336
|
+
* @returns This service call just saves the restrictions. See SaveRestrictionsAndGetCriteriaInformation if you would like the restrictions returned as criteria immediately, in one roundtrip
|
|
337
|
+
*/
|
|
338
|
+
public async saveRestrictionsWithContextAsync(request: carriers.Find_SaveRestrictionsWithContextRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Save an array of restrictions for later use as search criteria (including as dynamic selection and Find).
|
|
342
|
+
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
343
|
+
* @param providerName - Name of archive provider that is the intended consumer of the restrictions
|
|
344
|
+
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it saves the restrictions as criteria
|
|
345
|
+
* @param restrictions - Array of restrictions. The ColumnInfo member and the DisplayValues members need NOT be populated; it is enough to provide a name, operator and any values the operator may need. The IsActive is also saved. Values should be encoded using the CultureDataFormatter to ensure compatibility across cultures.
|
|
346
|
+
* @param context - Optional context that can be used by FindProvider
|
|
347
|
+
* @returns This service call just saves the restrictions. See SaveRestrictionsAndGetCriteriaInformation if you would like the restrictions returned as criteria immediately, in one roundtrip
|
|
348
|
+
*/
|
|
349
|
+
public async saveRestrictionsWithContextAsync(storageType: string, providerName: string, storageKey: string, restrictions: carriers.ArchiveRestrictionInfo[], context: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
350
|
+
|
|
351
|
+
public async saveRestrictionsWithContextAsync(storageType:string|carriers.Find_SaveRestrictionsWithContextRequest, providerName?:string|base.WebApiRequestOptions, storageKey?:string, restrictions?:carriers.ArchiveRestrictionInfo[], context?:string, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
352
|
+
let _request : carriers.Find_SaveRestrictionsWithContextRequest = null;
|
|
353
|
+
let _options : base.WebApiRequestOptions = null;
|
|
354
|
+
const first : any = storageType;
|
|
355
|
+
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.restrictions)!='undefined' || typeof(first.context)!='undefined' ) )
|
|
356
|
+
{
|
|
357
|
+
_request = storageType as carriers.Find_SaveRestrictionsWithContextRequest;
|
|
358
|
+
_options = providerName as base.WebApiRequestOptions;
|
|
359
|
+
}
|
|
360
|
+
else
|
|
361
|
+
{
|
|
362
|
+
_request = {
|
|
363
|
+
storageType: storageType as string,
|
|
364
|
+
providerName: providerName as string,
|
|
365
|
+
storageKey: storageKey as string,
|
|
366
|
+
restrictions: restrictions as carriers.ArchiveRestrictionInfo[],
|
|
367
|
+
context: context as string,
|
|
368
|
+
};
|
|
369
|
+
_options = webapi_options;
|
|
370
|
+
}
|
|
371
|
+
return this._saveRestrictionsWithContextAsync( _request, _options );
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
private async _saveRestrictionGroupAsync(request: carriers.Find_SaveRestrictionGroupRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
376
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
377
|
+
base.WebApiBase.SetPending(options);
|
|
378
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
379
|
+
try {
|
|
380
|
+
config.baseURL = this._options.baseUrl;
|
|
381
|
+
const response = await this._axios.post("SaveRestrictionGroup", request , config);
|
|
382
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
383
|
+
const res = response.data;
|
|
384
|
+
resolve(res);
|
|
385
|
+
}
|
|
386
|
+
catch( err ) {
|
|
387
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
388
|
+
reject(err);
|
|
389
|
+
}
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* Save an array of restrictions as a restriction group for later use as search criteria (including as dynamic selection and Find).
|
|
397
|
+
* @param request - StorageType, ProviderName, StorageKey, RestrictionGroup, Context
|
|
398
|
+
* @returns This service call just saves the restrictions.
|
|
399
|
+
*/
|
|
400
|
+
public async saveRestrictionGroupAsync(request: carriers.Find_SaveRestrictionGroupRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* Save an array of restrictions as a restriction group for later use as search criteria (including as dynamic selection and Find).
|
|
404
|
+
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
405
|
+
* @param providerName - Name of archive provider that is the intended consumer of the restrictions
|
|
406
|
+
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it saves the restrictions as criteria
|
|
407
|
+
* @param restrictionGroup - Information about a group of restrictions
|
|
408
|
+
* @param context - Optional context that can be used by FindProvider
|
|
409
|
+
* @returns This service call just saves the restrictions.
|
|
410
|
+
*/
|
|
411
|
+
public async saveRestrictionGroupAsync(storageType: string, providerName: string, storageKey: string, restrictionGroup: carriers.ArchiveRestrictionGroup, context: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
412
|
+
|
|
413
|
+
public async saveRestrictionGroupAsync(storageType:string|carriers.Find_SaveRestrictionGroupRequest, providerName?:string|base.WebApiRequestOptions, storageKey?:string, restrictionGroup?:carriers.ArchiveRestrictionGroup, context?:string, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
414
|
+
let _request : carriers.Find_SaveRestrictionGroupRequest = null;
|
|
415
|
+
let _options : base.WebApiRequestOptions = null;
|
|
416
|
+
const first : any = storageType;
|
|
417
|
+
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.restrictionGroup)!='undefined' || typeof(first.context)!='undefined' ) )
|
|
418
|
+
{
|
|
419
|
+
_request = storageType as carriers.Find_SaveRestrictionGroupRequest;
|
|
420
|
+
_options = providerName as base.WebApiRequestOptions;
|
|
421
|
+
}
|
|
422
|
+
else
|
|
423
|
+
{
|
|
424
|
+
_request = {
|
|
425
|
+
storageType: storageType as string,
|
|
426
|
+
providerName: providerName as string,
|
|
427
|
+
storageKey: storageKey as string,
|
|
428
|
+
restrictionGroup: restrictionGroup as carriers.ArchiveRestrictionGroup,
|
|
429
|
+
context: context as string,
|
|
430
|
+
};
|
|
431
|
+
_options = webapi_options;
|
|
432
|
+
}
|
|
433
|
+
return this._saveRestrictionGroupAsync( _request, _options );
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
private async _saveRestrictionGroupsAsync(request: carriers.Find_SaveRestrictionGroupsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup[] > {
|
|
438
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
439
|
+
base.WebApiBase.SetPending(options);
|
|
440
|
+
return new Promise< carriers.ArchiveRestrictionGroup[] >(async (resolve, reject) => {
|
|
441
|
+
try {
|
|
442
|
+
config.baseURL = this._options.baseUrl;
|
|
443
|
+
const response = await this._axios.post("SaveRestrictionGroups", request , config);
|
|
444
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
445
|
+
const res : carriers.ArchiveRestrictionGroup[] = converters.Create_ArchiveRestrictionGroupArray_From( response.data );
|
|
446
|
+
resolve(res);
|
|
447
|
+
}
|
|
448
|
+
catch( err ) {
|
|
449
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
450
|
+
reject(err);
|
|
451
|
+
}
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* Save and rerank an array of restriction groups, returning the possibly modified array.
|
|
459
|
+
* @param request - StorageType, ProviderName, StorageKey, RestrictionGroups, Context
|
|
460
|
+
* @returns The new restriction group.
|
|
461
|
+
*/
|
|
462
|
+
public async saveRestrictionGroupsAsync(request: carriers.Find_SaveRestrictionGroupsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup[] >;
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* Save and rerank an array of restriction groups, returning the possibly modified array.
|
|
466
|
+
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
467
|
+
* @param providerName - Name of archive provider that is the intended consumer of the restrictions
|
|
468
|
+
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it saves the restrictions as criteria
|
|
469
|
+
* @param restrictionGroups - Information about a group of restrictions
|
|
470
|
+
* @param context - Optional context that can be used by FindProvider
|
|
471
|
+
* @returns The new restriction group.
|
|
472
|
+
*/
|
|
473
|
+
public async saveRestrictionGroupsAsync(storageType: string, providerName: string, storageKey: string, restrictionGroups: carriers.ArchiveRestrictionGroup[], context: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup[] >;
|
|
474
|
+
|
|
475
|
+
public async saveRestrictionGroupsAsync(storageType:string|carriers.Find_SaveRestrictionGroupsRequest, providerName?:string|base.WebApiRequestOptions, storageKey?:string, restrictionGroups?:carriers.ArchiveRestrictionGroup[], context?:string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup[] > {
|
|
476
|
+
let _request : carriers.Find_SaveRestrictionGroupsRequest = null;
|
|
477
|
+
let _options : base.WebApiRequestOptions = null;
|
|
478
|
+
const first : any = storageType;
|
|
479
|
+
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.restrictionGroups)!='undefined' || typeof(first.context)!='undefined' ) )
|
|
480
|
+
{
|
|
481
|
+
_request = storageType as carriers.Find_SaveRestrictionGroupsRequest;
|
|
482
|
+
_options = providerName as base.WebApiRequestOptions;
|
|
483
|
+
}
|
|
484
|
+
else
|
|
485
|
+
{
|
|
486
|
+
_request = {
|
|
487
|
+
storageType: storageType as string,
|
|
488
|
+
providerName: providerName as string,
|
|
489
|
+
storageKey: storageKey as string,
|
|
490
|
+
restrictionGroups: restrictionGroups as carriers.ArchiveRestrictionGroup[],
|
|
491
|
+
context: context as string,
|
|
492
|
+
};
|
|
493
|
+
_options = webapi_options;
|
|
494
|
+
}
|
|
495
|
+
return this._saveRestrictionGroupsAsync( _request, _options );
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+
private async _getRestrictionGroupsAsync(request: carriers.Find_GetRestrictionGroupsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup[] > {
|
|
500
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
501
|
+
base.WebApiBase.SetPending(options);
|
|
502
|
+
return new Promise< carriers.ArchiveRestrictionGroup[] >(async (resolve, reject) => {
|
|
503
|
+
try {
|
|
504
|
+
config.baseURL = this._options.baseUrl;
|
|
505
|
+
const response = await this._axios.post("GetRestrictionGroups", request , config);
|
|
506
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
507
|
+
const res : carriers.ArchiveRestrictionGroup[] = converters.Create_ArchiveRestrictionGroupArray_From( response.data );
|
|
508
|
+
resolve(res);
|
|
509
|
+
}
|
|
510
|
+
catch( err ) {
|
|
511
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
512
|
+
reject(err);
|
|
513
|
+
}
|
|
514
|
+
});
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* Return all the restriction groups.
|
|
521
|
+
* @param request - StorageType, ProviderName, StorageKey, Context
|
|
522
|
+
* @returns The restriction groups.
|
|
523
|
+
*/
|
|
524
|
+
public async getRestrictionGroupsAsync(request: carriers.Find_GetRestrictionGroupsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup[] >;
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* Return all the restriction groups.
|
|
528
|
+
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
529
|
+
* @param providerName - Name of archive provider that is the intended consumer of the restrictions
|
|
530
|
+
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it saves the restrictions as criteria
|
|
531
|
+
* @param context - Optional context that can be used by FindProvider
|
|
532
|
+
* @returns The restriction groups.
|
|
533
|
+
*/
|
|
534
|
+
public async getRestrictionGroupsAsync(storageType: string, providerName: string, storageKey: string, context: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup[] >;
|
|
535
|
+
|
|
536
|
+
public async getRestrictionGroupsAsync(storageType:string|carriers.Find_GetRestrictionGroupsRequest, providerName?:string|base.WebApiRequestOptions, storageKey?:string, context?:string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup[] > {
|
|
537
|
+
let _request : carriers.Find_GetRestrictionGroupsRequest = null;
|
|
538
|
+
let _options : base.WebApiRequestOptions = null;
|
|
539
|
+
const first : any = storageType;
|
|
540
|
+
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.context)!='undefined' ) )
|
|
541
|
+
{
|
|
542
|
+
_request = storageType as carriers.Find_GetRestrictionGroupsRequest;
|
|
543
|
+
_options = providerName as base.WebApiRequestOptions;
|
|
544
|
+
}
|
|
545
|
+
else
|
|
546
|
+
{
|
|
547
|
+
_request = {
|
|
548
|
+
storageType: storageType as string,
|
|
549
|
+
providerName: providerName as string,
|
|
550
|
+
storageKey: storageKey as string,
|
|
551
|
+
context: context as string,
|
|
552
|
+
};
|
|
553
|
+
_options = webapi_options;
|
|
554
|
+
}
|
|
555
|
+
return this._getRestrictionGroupsAsync( _request, _options );
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
|
|
559
|
+
private async _getRestrictionGroupAsync(request: carriers.Find_GetRestrictionGroupRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup > {
|
|
560
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
561
|
+
base.WebApiBase.SetPending(options);
|
|
562
|
+
return new Promise< carriers.ArchiveRestrictionGroup >(async (resolve, reject) => {
|
|
563
|
+
try {
|
|
564
|
+
config.baseURL = this._options.baseUrl;
|
|
565
|
+
const response = await this._axios.post("GetRestrictionGroup", request , config);
|
|
566
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
567
|
+
const res : carriers.ArchiveRestrictionGroup = converters.Create_ArchiveRestrictionGroup_From( response.data );
|
|
568
|
+
resolve(res);
|
|
569
|
+
}
|
|
570
|
+
catch( err ) {
|
|
571
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
572
|
+
reject(err);
|
|
573
|
+
}
|
|
574
|
+
});
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
/**
|
|
580
|
+
* Return the restriction group with given rank or a blank carrier.
|
|
581
|
+
* @param request - StorageType, ProviderName, StorageKey, Rank, Context
|
|
582
|
+
* @returns The new restriction group.
|
|
583
|
+
*/
|
|
584
|
+
public async getRestrictionGroupAsync(request: carriers.Find_GetRestrictionGroupRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup >;
|
|
585
|
+
|
|
586
|
+
/**
|
|
587
|
+
* Return the restriction group with given rank or a blank carrier.
|
|
588
|
+
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
589
|
+
* @param providerName - Name of archive provider that is the intended consumer of the restrictions
|
|
590
|
+
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it saves the restrictions as criteria
|
|
591
|
+
* @param rank - Rank of the group to be deleted.
|
|
592
|
+
* @param context - Optional context that can be used by FindProvider
|
|
593
|
+
* @returns The new restriction group.
|
|
594
|
+
*/
|
|
595
|
+
public async getRestrictionGroupAsync(storageType: string, providerName: string, storageKey: string, rank: number, context: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup >;
|
|
596
|
+
|
|
597
|
+
public async getRestrictionGroupAsync(storageType:string|carriers.Find_GetRestrictionGroupRequest, providerName?:string|base.WebApiRequestOptions, storageKey?:string, rank?:number, context?:string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup > {
|
|
598
|
+
let _request : carriers.Find_GetRestrictionGroupRequest = null;
|
|
599
|
+
let _options : base.WebApiRequestOptions = null;
|
|
600
|
+
const first : any = storageType;
|
|
601
|
+
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.rank)!='undefined' || typeof(first.context)!='undefined' ) )
|
|
602
|
+
{
|
|
603
|
+
_request = storageType as carriers.Find_GetRestrictionGroupRequest;
|
|
604
|
+
_options = providerName as base.WebApiRequestOptions;
|
|
605
|
+
}
|
|
606
|
+
else
|
|
607
|
+
{
|
|
608
|
+
_request = {
|
|
609
|
+
storageType: storageType as string,
|
|
610
|
+
providerName: providerName as string,
|
|
611
|
+
storageKey: storageKey as string,
|
|
612
|
+
rank: rank as number,
|
|
613
|
+
context: context as string,
|
|
614
|
+
};
|
|
615
|
+
_options = webapi_options;
|
|
616
|
+
}
|
|
617
|
+
return this._getRestrictionGroupAsync( _request, _options );
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
|
|
621
|
+
private async _createRestrictionGroupAsync(request: carriers.Find_CreateRestrictionGroupRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup > {
|
|
622
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
623
|
+
base.WebApiBase.SetPending(options);
|
|
624
|
+
return new Promise< carriers.ArchiveRestrictionGroup >(async (resolve, reject) => {
|
|
625
|
+
try {
|
|
626
|
+
config.baseURL = this._options.baseUrl;
|
|
627
|
+
const response = await this._axios.post("CreateRestrictionGroup", request , config);
|
|
628
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
629
|
+
const res : carriers.ArchiveRestrictionGroup = converters.Create_ArchiveRestrictionGroup_From( response.data );
|
|
630
|
+
resolve(res);
|
|
631
|
+
}
|
|
632
|
+
catch( err ) {
|
|
633
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
634
|
+
reject(err);
|
|
635
|
+
}
|
|
636
|
+
});
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
|
|
640
|
+
|
|
641
|
+
/**
|
|
642
|
+
* Create a restriction group, initialized with next rank etc.
|
|
643
|
+
* @param request - StorageType, ProviderName, StorageKey, Context
|
|
644
|
+
* @returns The new restriction group.
|
|
645
|
+
*/
|
|
646
|
+
public async createRestrictionGroupAsync(request: carriers.Find_CreateRestrictionGroupRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup >;
|
|
647
|
+
|
|
648
|
+
/**
|
|
649
|
+
* Create a restriction group, initialized with next rank etc.
|
|
650
|
+
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
651
|
+
* @param providerName - Name of archive provider that is the intended consumer of the restrictions
|
|
652
|
+
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it saves the restrictions as criteria
|
|
653
|
+
* @param context - Optional context that can be used by FindProvider
|
|
654
|
+
* @returns The new restriction group.
|
|
655
|
+
*/
|
|
656
|
+
public async createRestrictionGroupAsync(storageType: string, providerName: string, storageKey: string, context: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup >;
|
|
657
|
+
|
|
658
|
+
public async createRestrictionGroupAsync(storageType:string|carriers.Find_CreateRestrictionGroupRequest, providerName?:string|base.WebApiRequestOptions, storageKey?:string, context?:string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionGroup > {
|
|
659
|
+
let _request : carriers.Find_CreateRestrictionGroupRequest = null;
|
|
660
|
+
let _options : base.WebApiRequestOptions = null;
|
|
661
|
+
const first : any = storageType;
|
|
662
|
+
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.context)!='undefined' ) )
|
|
663
|
+
{
|
|
664
|
+
_request = storageType as carriers.Find_CreateRestrictionGroupRequest;
|
|
665
|
+
_options = providerName as base.WebApiRequestOptions;
|
|
666
|
+
}
|
|
667
|
+
else
|
|
668
|
+
{
|
|
669
|
+
_request = {
|
|
670
|
+
storageType: storageType as string,
|
|
671
|
+
providerName: providerName as string,
|
|
672
|
+
storageKey: storageKey as string,
|
|
673
|
+
context: context as string,
|
|
674
|
+
};
|
|
675
|
+
_options = webapi_options;
|
|
676
|
+
}
|
|
677
|
+
return this._createRestrictionGroupAsync( _request, _options );
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
private async _deleteRestrictionGroupAsync(request: carriers.Find_DeleteRestrictionGroupRequest, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
682
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
683
|
+
base.WebApiBase.SetPending(options);
|
|
684
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
685
|
+
try {
|
|
686
|
+
config.baseURL = this._options.baseUrl;
|
|
687
|
+
const response = await this._axios.post("DeleteRestrictionGroup", request , config);
|
|
688
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
689
|
+
const res = response.data;
|
|
690
|
+
resolve(res);
|
|
691
|
+
}
|
|
692
|
+
catch( err ) {
|
|
693
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
694
|
+
reject(err);
|
|
695
|
+
}
|
|
696
|
+
});
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
|
|
700
|
+
|
|
701
|
+
/**
|
|
702
|
+
* Create a restriction group, initialized with next rank etc.
|
|
703
|
+
* @param request - StorageType, ProviderName, StorageKey, Rank, Context
|
|
704
|
+
* @returns This service call just saves the restrictions.
|
|
705
|
+
*/
|
|
706
|
+
public async deleteRestrictionGroupAsync(request: carriers.Find_DeleteRestrictionGroupRequest, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
707
|
+
|
|
708
|
+
/**
|
|
709
|
+
* Create a restriction group, initialized with next rank etc.
|
|
710
|
+
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
711
|
+
* @param providerName - Name of archive provider that is the intended consumer of the restrictions
|
|
712
|
+
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it saves the restrictions as criteria
|
|
713
|
+
* @param rank - Rank of the group to be deleted.
|
|
714
|
+
* @param context - Optional context that can be used by FindProvider
|
|
715
|
+
* @returns This service call just saves the restrictions.
|
|
716
|
+
*/
|
|
717
|
+
public async deleteRestrictionGroupAsync(storageType: string, providerName: string, storageKey: string, rank: number, context: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
718
|
+
|
|
719
|
+
public async deleteRestrictionGroupAsync(storageType:string|carriers.Find_DeleteRestrictionGroupRequest, providerName?:string|base.WebApiRequestOptions, storageKey?:string, rank?:number, context?:string, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
720
|
+
let _request : carriers.Find_DeleteRestrictionGroupRequest = null;
|
|
721
|
+
let _options : base.WebApiRequestOptions = null;
|
|
722
|
+
const first : any = storageType;
|
|
723
|
+
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.rank)!='undefined' || typeof(first.context)!='undefined' ) )
|
|
724
|
+
{
|
|
725
|
+
_request = storageType as carriers.Find_DeleteRestrictionGroupRequest;
|
|
726
|
+
_options = providerName as base.WebApiRequestOptions;
|
|
727
|
+
}
|
|
728
|
+
else
|
|
729
|
+
{
|
|
730
|
+
_request = {
|
|
731
|
+
storageType: storageType as string,
|
|
732
|
+
providerName: providerName as string,
|
|
733
|
+
storageKey: storageKey as string,
|
|
734
|
+
rank: rank as number,
|
|
735
|
+
context: context as string,
|
|
736
|
+
};
|
|
737
|
+
_options = webapi_options;
|
|
738
|
+
}
|
|
739
|
+
return this._deleteRestrictionGroupAsync( _request, _options );
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
|
|
743
|
+
private async _saveRestrictionsAndGetCriteriaInformationAsync(request: carriers.Find_SaveRestrictionsAndGetCriteriaInformationRequest, options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation > {
|
|
744
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
745
|
+
base.WebApiBase.SetPending(options);
|
|
746
|
+
return new Promise< carriers.CriteriaInformation >(async (resolve, reject) => {
|
|
747
|
+
try {
|
|
748
|
+
config.baseURL = this._options.baseUrl;
|
|
749
|
+
const response = await this._axios.post("SaveRestrictionsAndGetCriteriaInformation", request , config);
|
|
750
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
751
|
+
const res : carriers.CriteriaInformation = converters.Create_CriteriaInformation_From( response.data );
|
|
752
|
+
resolve(res);
|
|
753
|
+
}
|
|
754
|
+
catch( err ) {
|
|
755
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
756
|
+
reject(err);
|
|
757
|
+
}
|
|
758
|
+
});
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
|
|
762
|
+
|
|
763
|
+
/**
|
|
764
|
+
* Save an array of restrictions for later use as search criteria (including as dynamic selection and Find). Then, return the same result as a call to GetCriteriaInformation would have done. The purpose is to encapsulate saving and updating of a GUI in one round trip.
|
|
765
|
+
* @param request - StorageType, ProviderName, StorageKey, Restrictions, StaticColumns
|
|
766
|
+
* @returns The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control
|
|
767
|
+
*/
|
|
768
|
+
public async saveRestrictionsAndGetCriteriaInformationAsync(request: carriers.Find_SaveRestrictionsAndGetCriteriaInformationRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
769
|
+
|
|
770
|
+
/**
|
|
771
|
+
* Save an array of restrictions for later use as search criteria (including as dynamic selection and Find). Then, return the same result as a call to GetCriteriaInformation would have done. The purpose is to encapsulate saving and updating of a GUI in one round trip.
|
|
772
|
+
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
773
|
+
* @param providerName - Name of archive provider that is the intended consumer of the restrictions
|
|
774
|
+
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it saves the restrictions as criteria
|
|
775
|
+
* @param restrictions - Array of restrictions. The ColumnInfo member and the DisplayValues members need NOT be populated; it is enough to provide a name, operator and any values the operator may need. The IsActive is also saved. Values should be encoded using the CultureDataFormatter to ensure compatibility across cultures.
|
|
776
|
+
* @param staticColumns - Optional array of restrictions that are to be EXCLUDED from the CriteriaArchiveRows part of the result. In the Find dialogs, that corresponds to the 'static' fields, to avoid duplicating them in the 'Match also' criteria list. This array can be null, indicating that all restrictions should be included in the criteria list.
|
|
777
|
+
* @returns The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control
|
|
778
|
+
*/
|
|
779
|
+
public async saveRestrictionsAndGetCriteriaInformationAsync(storageType: string, providerName: string, storageKey: string, restrictions: carriers.ArchiveRestrictionInfo[], staticColumns: string[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
780
|
+
|
|
781
|
+
public async saveRestrictionsAndGetCriteriaInformationAsync(storageType:string|carriers.Find_SaveRestrictionsAndGetCriteriaInformationRequest, providerName?:string|base.WebApiRequestOptions, storageKey?:string, restrictions?:carriers.ArchiveRestrictionInfo[], staticColumns?:string[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation > {
|
|
782
|
+
let _request : carriers.Find_SaveRestrictionsAndGetCriteriaInformationRequest = null;
|
|
783
|
+
let _options : base.WebApiRequestOptions = null;
|
|
784
|
+
const first : any = storageType;
|
|
785
|
+
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.restrictions)!='undefined' || typeof(first.staticColumns)!='undefined' ) )
|
|
786
|
+
{
|
|
787
|
+
_request = storageType as carriers.Find_SaveRestrictionsAndGetCriteriaInformationRequest;
|
|
788
|
+
_options = providerName as base.WebApiRequestOptions;
|
|
789
|
+
}
|
|
790
|
+
else
|
|
791
|
+
{
|
|
792
|
+
_request = {
|
|
793
|
+
storageType: storageType as string,
|
|
794
|
+
providerName: providerName as string,
|
|
795
|
+
storageKey: storageKey as string,
|
|
796
|
+
restrictions: restrictions as carriers.ArchiveRestrictionInfo[],
|
|
797
|
+
staticColumns: staticColumns as string[],
|
|
798
|
+
};
|
|
799
|
+
_options = webapi_options;
|
|
800
|
+
}
|
|
801
|
+
return this._saveRestrictionsAndGetCriteriaInformationAsync( _request, _options );
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
|
|
805
|
+
private async _findAsync(request: carriers.Find_FindRequest, options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
806
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
807
|
+
base.WebApiBase.SetPending(options);
|
|
808
|
+
return new Promise< carriers.FindResults >(async (resolve, reject) => {
|
|
809
|
+
try {
|
|
810
|
+
config.baseURL = this._options.baseUrl;
|
|
811
|
+
const response = await this._axios.post("Find", request , config);
|
|
812
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
813
|
+
const res : carriers.FindResults = converters.Create_FindResults_From( response.data );
|
|
814
|
+
resolve(res);
|
|
815
|
+
}
|
|
816
|
+
catch( err ) {
|
|
817
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
818
|
+
reject(err);
|
|
819
|
+
}
|
|
820
|
+
});
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
|
|
824
|
+
|
|
825
|
+
/**
|
|
826
|
+
* Execute a Find operation and return a page of results. The criteria for the Find are fetched from the restriction storage provider according to the given parameters. The columns of the result are calculated based on the restriction. The orderby columns are also calculated by the system.<para/>The other variants of the Find method allow you greater control over the individual aspects of the process.
|
|
827
|
+
* @param request - StorageType, ProviderName, StorageKey, PageSize, PageNumber
|
|
828
|
+
* @returns Results from search, containing column information and result rows.
|
|
829
|
+
*/
|
|
830
|
+
public async findAsync(request: carriers.Find_FindRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
831
|
+
|
|
832
|
+
/**
|
|
833
|
+
* Execute a Find operation and return a page of results. The criteria for the Find are fetched from the restriction storage provider according to the given parameters. The columns of the result are calculated based on the restriction. The orderby columns are also calculated by the system.<para/>The other variants of the Find method allow you greater control over the individual aspects of the process.
|
|
834
|
+
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
835
|
+
* @param providerName - Name of archive provider that is to execute the search and return the result columns/rows
|
|
836
|
+
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search
|
|
837
|
+
* @param pageSize - Size of result set pages
|
|
838
|
+
* @param pageNumber - Result set page to return, 0 is the first page. When a call returns no rows, no further pages are available. Negative page numbers are interpreted as number of rows to skip.
|
|
839
|
+
* @returns Results from search, containing column information and result rows.
|
|
840
|
+
*/
|
|
841
|
+
public async findAsync(storageType: string, providerName: string, storageKey: string, pageSize: number, pageNumber: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
842
|
+
|
|
843
|
+
public async findAsync(storageType:string|carriers.Find_FindRequest, providerName?:string|base.WebApiRequestOptions, storageKey?:string, pageSize?:number, pageNumber?:number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
844
|
+
let _request : carriers.Find_FindRequest = null;
|
|
845
|
+
let _options : base.WebApiRequestOptions = null;
|
|
846
|
+
const first : any = storageType;
|
|
847
|
+
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.pageSize)!='undefined' || typeof(first.pageNumber)!='undefined' ) )
|
|
848
|
+
{
|
|
849
|
+
_request = storageType as carriers.Find_FindRequest;
|
|
850
|
+
_options = providerName as base.WebApiRequestOptions;
|
|
851
|
+
}
|
|
852
|
+
else
|
|
853
|
+
{
|
|
854
|
+
_request = {
|
|
855
|
+
storageType: storageType as string,
|
|
856
|
+
providerName: providerName as string,
|
|
857
|
+
storageKey: storageKey as string,
|
|
858
|
+
pageSize: pageSize as number,
|
|
859
|
+
pageNumber: pageNumber as number,
|
|
860
|
+
};
|
|
861
|
+
_options = webapi_options;
|
|
862
|
+
}
|
|
863
|
+
return this._findAsync( _request, _options );
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
|
|
867
|
+
private async _findFromRestrictionsAsync(request: carriers.Find_FindFromRestrictionsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
868
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
869
|
+
base.WebApiBase.SetPending(options);
|
|
870
|
+
return new Promise< carriers.FindResults >(async (resolve, reject) => {
|
|
871
|
+
try {
|
|
872
|
+
config.baseURL = this._options.baseUrl;
|
|
873
|
+
const response = await this._axios.post("FindFromRestrictions", request , config);
|
|
874
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
875
|
+
const res : carriers.FindResults = converters.Create_FindResults_From( response.data );
|
|
876
|
+
resolve(res);
|
|
877
|
+
}
|
|
878
|
+
catch( err ) {
|
|
879
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
880
|
+
reject(err);
|
|
881
|
+
}
|
|
882
|
+
});
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
|
|
886
|
+
|
|
887
|
+
/**
|
|
888
|
+
* Execute a Find operation and return a page of results. The criteria for the Find are passed in directly, not fetched by a restriction storage provider. The columns of the result are calculated based on the restriction.
|
|
889
|
+
* @param request - Restrictions, ProviderName, PageSize, PageNumber
|
|
890
|
+
* @returns Results from search, containing column information and result rows.
|
|
891
|
+
*/
|
|
892
|
+
public async findFromRestrictionsAsync(request: carriers.Find_FindFromRestrictionsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
893
|
+
|
|
894
|
+
/**
|
|
895
|
+
* Execute a Find operation and return a page of results. The criteria for the Find are passed in directly, not fetched by a restriction storage provider. The columns of the result are calculated based on the restriction.
|
|
896
|
+
* @param restrictions - Array of restrictions specifying the search. Each restriction must match a column of the given archive provider, and that column must have its CanRestrictBy property set to true.
|
|
897
|
+
* @param providerName - Name of archive provider that is to execute the search and return the result columns/rows
|
|
898
|
+
* @param pageSize - Size of result set pages
|
|
899
|
+
* @param pageNumber - Result set page to return, 0 is the first page. When a call returns no rows, no further pages are available. Negative page numbers are interpreted as number of rows to skip.
|
|
900
|
+
* @returns Results from search, containing column information and result rows.
|
|
901
|
+
*/
|
|
902
|
+
public async findFromRestrictionsAsync(restrictions: carriers.ArchiveRestrictionInfo[], providerName: string, pageSize: number, pageNumber: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
903
|
+
|
|
904
|
+
public async findFromRestrictionsAsync(restrictions:carriers.ArchiveRestrictionInfo[]|carriers.Find_FindFromRestrictionsRequest, providerName?:string|base.WebApiRequestOptions, pageSize?:number, pageNumber?:number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
905
|
+
let _request : carriers.Find_FindFromRestrictionsRequest = null;
|
|
906
|
+
let _options : base.WebApiRequestOptions = null;
|
|
907
|
+
const first : any = restrictions;
|
|
908
|
+
if( typeof( first ) === "object" && first && ( typeof(first.restrictions)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.pageSize)!='undefined' || typeof(first.pageNumber)!='undefined' ) )
|
|
909
|
+
{
|
|
910
|
+
_request = restrictions as carriers.Find_FindFromRestrictionsRequest;
|
|
911
|
+
_options = providerName as base.WebApiRequestOptions;
|
|
912
|
+
}
|
|
913
|
+
else
|
|
914
|
+
{
|
|
915
|
+
_request = {
|
|
916
|
+
restrictions: restrictions as carriers.ArchiveRestrictionInfo[],
|
|
917
|
+
providerName: providerName as string,
|
|
918
|
+
pageSize: pageSize as number,
|
|
919
|
+
pageNumber: pageNumber as number,
|
|
920
|
+
};
|
|
921
|
+
_options = webapi_options;
|
|
922
|
+
}
|
|
923
|
+
return this._findFromRestrictionsAsync( _request, _options );
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
|
|
927
|
+
private async _findFromRestrictionsColumnsAsync(request: carriers.Find_FindFromRestrictionsColumnsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
928
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
929
|
+
base.WebApiBase.SetPending(options);
|
|
930
|
+
return new Promise< carriers.FindResults >(async (resolve, reject) => {
|
|
931
|
+
try {
|
|
932
|
+
config.baseURL = this._options.baseUrl;
|
|
933
|
+
const response = await this._axios.post("FindFromRestrictionsColumns", request , config);
|
|
934
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
935
|
+
const res : carriers.FindResults = converters.Create_FindResults_From( response.data );
|
|
936
|
+
resolve(res);
|
|
937
|
+
}
|
|
938
|
+
catch( err ) {
|
|
939
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
940
|
+
reject(err);
|
|
941
|
+
}
|
|
942
|
+
});
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
|
|
946
|
+
|
|
947
|
+
/**
|
|
948
|
+
* Execute a Find operation and return a page of results. <para/>The criteria for the Find are passed in directly, not fetched by a restriction storage provider. <para/>The desired columns of the result set are also passed in directly.<para/>The orderby information is calculated by the system.<para/>Use the GetCriteriaInformation and GetDefaultDesiredColumns service methods to let the system calculate these values, if you want to use or modify them.
|
|
949
|
+
* @param request - Restrictions, ProviderName, DesiredColumns, PageSize, PageNumber
|
|
950
|
+
* @returns Results from search, containing column information and result rows.
|
|
951
|
+
*/
|
|
952
|
+
public async findFromRestrictionsColumnsAsync(request: carriers.Find_FindFromRestrictionsColumnsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
953
|
+
|
|
954
|
+
/**
|
|
955
|
+
* Execute a Find operation and return a page of results. <para/>The criteria for the Find are passed in directly, not fetched by a restriction storage provider. <para/>The desired columns of the result set are also passed in directly.<para/>The orderby information is calculated by the system.<para/>Use the GetCriteriaInformation and GetDefaultDesiredColumns service methods to let the system calculate these values, if you want to use or modify them.
|
|
956
|
+
* @param restrictions - Array of restrictions specifying the search. Each restriction must match a column of the given archive provider, and that column must have its CanRestrictBy property set to true.
|
|
957
|
+
* @param providerName - Name of archive provider that is to execute the search and return the result columns/rows
|
|
958
|
+
* @param desiredColumns - Array of column names desired for the result. Each name must match a column offered by the given archive provider.
|
|
959
|
+
* @param pageSize - Size of result set pages
|
|
960
|
+
* @param pageNumber - Result set page to return, 0 is the first page. When a call returns no rows, no further pages are available. Negative page numbers are interpreted as number of rows to skip.
|
|
961
|
+
* @returns Results from search, containing column information and result rows.
|
|
962
|
+
*/
|
|
963
|
+
public async findFromRestrictionsColumnsAsync(restrictions: carriers.ArchiveRestrictionInfo[], providerName: string, desiredColumns: string[], pageSize: number, pageNumber: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
964
|
+
|
|
965
|
+
public async findFromRestrictionsColumnsAsync(restrictions:carriers.ArchiveRestrictionInfo[]|carriers.Find_FindFromRestrictionsColumnsRequest, providerName?:string|base.WebApiRequestOptions, desiredColumns?:string[], pageSize?:number, pageNumber?:number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
966
|
+
let _request : carriers.Find_FindFromRestrictionsColumnsRequest = null;
|
|
967
|
+
let _options : base.WebApiRequestOptions = null;
|
|
968
|
+
const first : any = restrictions;
|
|
969
|
+
if( typeof( first ) === "object" && first && ( typeof(first.restrictions)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.desiredColumns)!='undefined' || typeof(first.pageSize)!='undefined' || typeof(first.pageNumber)!='undefined' ) )
|
|
970
|
+
{
|
|
971
|
+
_request = restrictions as carriers.Find_FindFromRestrictionsColumnsRequest;
|
|
972
|
+
_options = providerName as base.WebApiRequestOptions;
|
|
973
|
+
}
|
|
974
|
+
else
|
|
975
|
+
{
|
|
976
|
+
_request = {
|
|
977
|
+
restrictions: restrictions as carriers.ArchiveRestrictionInfo[],
|
|
978
|
+
providerName: providerName as string,
|
|
979
|
+
desiredColumns: desiredColumns as string[],
|
|
980
|
+
pageSize: pageSize as number,
|
|
981
|
+
pageNumber: pageNumber as number,
|
|
982
|
+
};
|
|
983
|
+
_options = webapi_options;
|
|
984
|
+
}
|
|
985
|
+
return this._findFromRestrictionsColumnsAsync( _request, _options );
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
|
|
989
|
+
private async _getAvailableRestrictionColumnsAsync(request: carriers.Find_GetAvailableRestrictionColumnsRequest, options?:base.WebApiRequestOptions) : Promise< string[] > {
|
|
990
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
991
|
+
base.WebApiBase.SetPending(options);
|
|
992
|
+
return new Promise< string[] >(async (resolve, reject) => {
|
|
993
|
+
try {
|
|
994
|
+
config.baseURL = this._options.baseUrl;
|
|
995
|
+
const response = await this._axios.post("GetAvailableRestrictionColumns", request , config);
|
|
996
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
997
|
+
const res : string[] = response.data as string[];
|
|
998
|
+
resolve(res);
|
|
999
|
+
}
|
|
1000
|
+
catch( err ) {
|
|
1001
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1002
|
+
reject(err);
|
|
1003
|
+
}
|
|
1004
|
+
});
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
|
|
1008
|
+
|
|
1009
|
+
/**
|
|
1010
|
+
* Get a list of the column names corresponding to available restrictions for a certain archive provider and restriction storage provider. Such columns have CanRestrict set to true, and are supported by the given restriction storage provider.
|
|
1011
|
+
* @param request - StorageType, ProviderName
|
|
1012
|
+
* @returns Array of column names, corresponding to support restrictions for the given archive and restriction storage providers.
|
|
1013
|
+
*/
|
|
1014
|
+
public async getAvailableRestrictionColumnsAsync(request: carriers.Find_GetAvailableRestrictionColumnsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< string[] >;
|
|
1015
|
+
|
|
1016
|
+
/**
|
|
1017
|
+
* Get a list of the column names corresponding to available restrictions for a certain archive provider and restriction storage provider. Such columns have CanRestrict set to true, and are supported by the given restriction storage provider.
|
|
1018
|
+
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
1019
|
+
* @param providerName - Name of archive provider that is to execute the search and return the result columns/rows
|
|
1020
|
+
* @returns Array of column names, corresponding to support restrictions for the given archive and restriction storage providers.
|
|
1021
|
+
*/
|
|
1022
|
+
public async getAvailableRestrictionColumnsAsync(storageType: string, providerName: string, webapi_options?:base.WebApiRequestOptions) : Promise< string[] >;
|
|
1023
|
+
|
|
1024
|
+
public async getAvailableRestrictionColumnsAsync(storageType:string|carriers.Find_GetAvailableRestrictionColumnsRequest, providerName?:string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< string[] > {
|
|
1025
|
+
let _request : carriers.Find_GetAvailableRestrictionColumnsRequest = null;
|
|
1026
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1027
|
+
const first : any = storageType;
|
|
1028
|
+
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' ) )
|
|
1029
|
+
{
|
|
1030
|
+
_request = storageType as carriers.Find_GetAvailableRestrictionColumnsRequest;
|
|
1031
|
+
_options = providerName as base.WebApiRequestOptions;
|
|
1032
|
+
}
|
|
1033
|
+
else
|
|
1034
|
+
{
|
|
1035
|
+
_request = {
|
|
1036
|
+
storageType: storageType as string,
|
|
1037
|
+
providerName: providerName as string,
|
|
1038
|
+
};
|
|
1039
|
+
_options = webapi_options;
|
|
1040
|
+
}
|
|
1041
|
+
return this._getAvailableRestrictionColumnsAsync( _request, _options );
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
|
|
1045
|
+
private async _getSpecifiedCriteriaInformationWithDefaultsAsync(request: carriers.Find_GetSpecifiedCriteriaInformationWithDefaultsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation > {
|
|
1046
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1047
|
+
base.WebApiBase.SetPending(options);
|
|
1048
|
+
return new Promise< carriers.CriteriaInformation >(async (resolve, reject) => {
|
|
1049
|
+
try {
|
|
1050
|
+
config.baseURL = this._options.baseUrl;
|
|
1051
|
+
const response = await this._axios.post("GetSpecifiedCriteriaInformationWithDefaults", request , config);
|
|
1052
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1053
|
+
const res : carriers.CriteriaInformation = converters.Create_CriteriaInformation_From( response.data );
|
|
1054
|
+
resolve(res);
|
|
1055
|
+
}
|
|
1056
|
+
catch( err ) {
|
|
1057
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1058
|
+
reject(err);
|
|
1059
|
+
}
|
|
1060
|
+
});
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
|
|
1064
|
+
|
|
1065
|
+
/**
|
|
1066
|
+
* Get criteria information from a set of saved criteria, for a specific set of columns. The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control. ALL columns specified in the call will be present in the results; those that do not have corresponding criteria set will have empty values and the default (first) operator, with the IsActive flag set to false.
|
|
1067
|
+
* @param request - StorageType, ProviderName, StorageKey, DesiredColumnNames, StaticColumns
|
|
1068
|
+
* @returns The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control. ALL columns specified in the call will be present in the results; those that do not have corresponding criteria set will have empty values and the default (first) operator, with the IsActive flag set to false.
|
|
1069
|
+
*/
|
|
1070
|
+
public async getSpecifiedCriteriaInformationWithDefaultsAsync(request: carriers.Find_GetSpecifiedCriteriaInformationWithDefaultsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
1071
|
+
|
|
1072
|
+
/**
|
|
1073
|
+
* Get criteria information from a set of saved criteria, for a specific set of columns. The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control. ALL columns specified in the call will be present in the results; those that do not have corresponding criteria set will have empty values and the default (first) operator, with the IsActive flag set to false.
|
|
1074
|
+
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
1075
|
+
* @param providerName - Name of archive provider that is the intended consumer of the restrictions
|
|
1076
|
+
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search
|
|
1077
|
+
* @param desiredColumnNames - Optional array of restrictions that are to be EXCLUDED from the CriteriaArchiveRows part of the result. In the Find dialogs, that corresponds to the 'static' fields, to avoid duplicating them in the 'Match also' criteria list. This array can be null, indicating that all restrictions should be included in the criteria list.
|
|
1078
|
+
* @param staticColumns - Optional array of restrictions that are to be EXCLUDED from the CriteriaArchiveRows part of the result. In the Find dialogs, that corresponds to the 'static' fields, to avoid duplicating them in the 'Match also' criteria list. This array can be null, indicating that all restrictions should be included in the criteria list.
|
|
1079
|
+
* @returns The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control. ALL columns specified in the call will be present in the results; those that do not have corresponding criteria set will have empty values and the default (first) operator, with the IsActive flag set to false.
|
|
1080
|
+
*/
|
|
1081
|
+
public async getSpecifiedCriteriaInformationWithDefaultsAsync(storageType: string, providerName: string, storageKey: string, desiredColumnNames: string[], staticColumns: string[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
1082
|
+
|
|
1083
|
+
public async getSpecifiedCriteriaInformationWithDefaultsAsync(storageType:string|carriers.Find_GetSpecifiedCriteriaInformationWithDefaultsRequest, providerName?:string|base.WebApiRequestOptions, storageKey?:string, desiredColumnNames?:string[], staticColumns?:string[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation > {
|
|
1084
|
+
let _request : carriers.Find_GetSpecifiedCriteriaInformationWithDefaultsRequest = null;
|
|
1085
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1086
|
+
const first : any = storageType;
|
|
1087
|
+
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.desiredColumnNames)!='undefined' || typeof(first.staticColumns)!='undefined' ) )
|
|
1088
|
+
{
|
|
1089
|
+
_request = storageType as carriers.Find_GetSpecifiedCriteriaInformationWithDefaultsRequest;
|
|
1090
|
+
_options = providerName as base.WebApiRequestOptions;
|
|
1091
|
+
}
|
|
1092
|
+
else
|
|
1093
|
+
{
|
|
1094
|
+
_request = {
|
|
1095
|
+
storageType: storageType as string,
|
|
1096
|
+
providerName: providerName as string,
|
|
1097
|
+
storageKey: storageKey as string,
|
|
1098
|
+
desiredColumnNames: desiredColumnNames as string[],
|
|
1099
|
+
staticColumns: staticColumns as string[],
|
|
1100
|
+
};
|
|
1101
|
+
_options = webapi_options;
|
|
1102
|
+
}
|
|
1103
|
+
return this._getSpecifiedCriteriaInformationWithDefaultsAsync( _request, _options );
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
|
|
1107
|
+
private async _getSpecifiedCriteriaInformationWithDefaultsWithContextAsync(request: carriers.Find_GetSpecifiedCriteriaInformationWithDefaultsWithContextRequest, options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation > {
|
|
1108
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1109
|
+
base.WebApiBase.SetPending(options);
|
|
1110
|
+
return new Promise< carriers.CriteriaInformation >(async (resolve, reject) => {
|
|
1111
|
+
try {
|
|
1112
|
+
config.baseURL = this._options.baseUrl;
|
|
1113
|
+
const response = await this._axios.post("GetSpecifiedCriteriaInformationWithDefaultsWithContext", request , config);
|
|
1114
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1115
|
+
const res : carriers.CriteriaInformation = converters.Create_CriteriaInformation_From( response.data );
|
|
1116
|
+
resolve(res);
|
|
1117
|
+
}
|
|
1118
|
+
catch( err ) {
|
|
1119
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1120
|
+
reject(err);
|
|
1121
|
+
}
|
|
1122
|
+
});
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
|
|
1126
|
+
|
|
1127
|
+
/**
|
|
1128
|
+
* Get criteria information from a set of saved criteria, for a specific set of columns. The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control. ALL columns specified in the call will be present in the results; those that do not have corresponding criteria set will have empty values and the default (first) operator, with the IsActive flag set to false.
|
|
1129
|
+
* @param request - StorageType, ProviderName, StorageKey, DesiredColumnNames, StaticColumns, Context
|
|
1130
|
+
* @returns The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control. ALL columns specified in the call will be present in the results; those that do not have corresponding criteria set will have empty values and the default (first) operator, with the IsActive flag set to false.
|
|
1131
|
+
*/
|
|
1132
|
+
public async getSpecifiedCriteriaInformationWithDefaultsWithContextAsync(request: carriers.Find_GetSpecifiedCriteriaInformationWithDefaultsWithContextRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
1133
|
+
|
|
1134
|
+
/**
|
|
1135
|
+
* Get criteria information from a set of saved criteria, for a specific set of columns. The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control. ALL columns specified in the call will be present in the results; those that do not have corresponding criteria set will have empty values and the default (first) operator, with the IsActive flag set to false.
|
|
1136
|
+
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
1137
|
+
* @param providerName - Name of archive provider that is the intended consumer of the restrictions
|
|
1138
|
+
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search
|
|
1139
|
+
* @param desiredColumnNames - Optional array of restrictions that are to be EXCLUDED from the CriteriaArchiveRows part of the result. In the Find dialogs, that corresponds to the 'static' fields, to avoid duplicating them in the 'Match also' criteria list. This array can be null, indicating that all restrictions should be included in the criteria list.
|
|
1140
|
+
* @param staticColumns - Optional array of restrictions that are to be EXCLUDED from the CriteriaArchiveRows part of the result. In the Find dialogs, that corresponds to the 'static' fields, to avoid duplicating them in the 'Match also' criteria list. This array can be null, indicating that all restrictions should be included in the criteria list.
|
|
1141
|
+
* @param context - Optional context that can be used by FindProvider
|
|
1142
|
+
* @returns The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control. ALL columns specified in the call will be present in the results; those that do not have corresponding criteria set will have empty values and the default (first) operator, with the IsActive flag set to false.
|
|
1143
|
+
*/
|
|
1144
|
+
public async getSpecifiedCriteriaInformationWithDefaultsWithContextAsync(storageType: string, providerName: string, storageKey: string, desiredColumnNames: string[], staticColumns: string[], context: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
1145
|
+
|
|
1146
|
+
public async getSpecifiedCriteriaInformationWithDefaultsWithContextAsync(storageType:string|carriers.Find_GetSpecifiedCriteriaInformationWithDefaultsWithContextRequest, providerName?:string|base.WebApiRequestOptions, storageKey?:string, desiredColumnNames?:string[], staticColumns?:string[], context?:string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation > {
|
|
1147
|
+
let _request : carriers.Find_GetSpecifiedCriteriaInformationWithDefaultsWithContextRequest = null;
|
|
1148
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1149
|
+
const first : any = storageType;
|
|
1150
|
+
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.desiredColumnNames)!='undefined' || typeof(first.staticColumns)!='undefined' || typeof(first.context)!='undefined' ) )
|
|
1151
|
+
{
|
|
1152
|
+
_request = storageType as carriers.Find_GetSpecifiedCriteriaInformationWithDefaultsWithContextRequest;
|
|
1153
|
+
_options = providerName as base.WebApiRequestOptions;
|
|
1154
|
+
}
|
|
1155
|
+
else
|
|
1156
|
+
{
|
|
1157
|
+
_request = {
|
|
1158
|
+
storageType: storageType as string,
|
|
1159
|
+
providerName: providerName as string,
|
|
1160
|
+
storageKey: storageKey as string,
|
|
1161
|
+
desiredColumnNames: desiredColumnNames as string[],
|
|
1162
|
+
staticColumns: staticColumns as string[],
|
|
1163
|
+
context: context as string,
|
|
1164
|
+
};
|
|
1165
|
+
_options = webapi_options;
|
|
1166
|
+
}
|
|
1167
|
+
return this._getSpecifiedCriteriaInformationWithDefaultsWithContextAsync( _request, _options );
|
|
1168
|
+
}
|
|
1169
|
+
|
|
1170
|
+
|
|
1171
|
+
private async _findFromRestrictionsColumnsOrderByAsync(request: carriers.Find_FindFromRestrictionsColumnsOrderByRequest, options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
1172
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1173
|
+
base.WebApiBase.SetPending(options);
|
|
1174
|
+
return new Promise< carriers.FindResults >(async (resolve, reject) => {
|
|
1175
|
+
try {
|
|
1176
|
+
config.baseURL = this._options.baseUrl;
|
|
1177
|
+
const response = await this._axios.post("FindFromRestrictionsColumnsOrderBy", request , config);
|
|
1178
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1179
|
+
const res : carriers.FindResults = converters.Create_FindResults_From( response.data );
|
|
1180
|
+
resolve(res);
|
|
1181
|
+
}
|
|
1182
|
+
catch( err ) {
|
|
1183
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1184
|
+
reject(err);
|
|
1185
|
+
}
|
|
1186
|
+
});
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
|
|
1190
|
+
|
|
1191
|
+
/**
|
|
1192
|
+
* Execute a Find operation and return a page of results. <para/>The criteria for the Find are passed in directly, not fetched by a restriction storage provider. <para/>The desired columns of the result set are also passed in directly.<para/>The orderby information is also passed in directly.<para/>Use the GetCriteriaInformation, GetDefaultDesiredColumns and GetDefaultOrderBy service methods to let the system calculate these values, if you want to use or modify them.
|
|
1193
|
+
* @param request - Restrictions, ProviderName, DesiredColumns, OrderBy, PageSize, PageNumber
|
|
1194
|
+
* @returns Results from search, containing column information and result rows.
|
|
1195
|
+
*/
|
|
1196
|
+
public async findFromRestrictionsColumnsOrderByAsync(request: carriers.Find_FindFromRestrictionsColumnsOrderByRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
1197
|
+
|
|
1198
|
+
/**
|
|
1199
|
+
* Execute a Find operation and return a page of results. <para/>The criteria for the Find are passed in directly, not fetched by a restriction storage provider. <para/>The desired columns of the result set are also passed in directly.<para/>The orderby information is also passed in directly.<para/>Use the GetCriteriaInformation, GetDefaultDesiredColumns and GetDefaultOrderBy service methods to let the system calculate these values, if you want to use or modify them.
|
|
1200
|
+
* @param restrictions - Array of restrictions specifying the search. Each restriction must match a column of the given archive provider, and that column must have its CanRestrictBy property set to true.
|
|
1201
|
+
* @param providerName - Name of archive provider that is to execute the search and return the result columns/rows
|
|
1202
|
+
* @param desiredColumns - Array of column names desired for the result. Each name must match a column offered by the given archive provider.
|
|
1203
|
+
* @param orderBy - Array of order by specifications. If it is null or empty, the row order is unspecified, database dependent, and might not be the same from call to call, depending on query execution plans. The unspecified order willgenerally not vary within pages of the same query.
|
|
1204
|
+
* @param pageSize - Size of result set pages
|
|
1205
|
+
* @param pageNumber - Result set page to return, 0 is the first page. When a call returns no rows, no further pages are available. Negative page numbers are interpreted as number of rows to skip.
|
|
1206
|
+
* @returns Results from search, containing column information and result rows.
|
|
1207
|
+
*/
|
|
1208
|
+
public async findFromRestrictionsColumnsOrderByAsync(restrictions: carriers.ArchiveRestrictionInfo[], providerName: string, desiredColumns: string[], orderBy: carriers.ArchiveOrderByInfo[], pageSize: number, pageNumber: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
1209
|
+
|
|
1210
|
+
public async findFromRestrictionsColumnsOrderByAsync(restrictions:carriers.ArchiveRestrictionInfo[]|carriers.Find_FindFromRestrictionsColumnsOrderByRequest, providerName?:string|base.WebApiRequestOptions, desiredColumns?:string[], orderBy?:carriers.ArchiveOrderByInfo[], pageSize?:number, pageNumber?:number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
1211
|
+
let _request : carriers.Find_FindFromRestrictionsColumnsOrderByRequest = null;
|
|
1212
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1213
|
+
const first : any = restrictions;
|
|
1214
|
+
if( typeof( first ) === "object" && first && ( typeof(first.restrictions)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.desiredColumns)!='undefined' || typeof(first.orderBy)!='undefined' || typeof(first.pageSize)!='undefined' || typeof(first.pageNumber)!='undefined' ) )
|
|
1215
|
+
{
|
|
1216
|
+
_request = restrictions as carriers.Find_FindFromRestrictionsColumnsOrderByRequest;
|
|
1217
|
+
_options = providerName as base.WebApiRequestOptions;
|
|
1218
|
+
}
|
|
1219
|
+
else
|
|
1220
|
+
{
|
|
1221
|
+
_request = {
|
|
1222
|
+
restrictions: restrictions as carriers.ArchiveRestrictionInfo[],
|
|
1223
|
+
providerName: providerName as string,
|
|
1224
|
+
desiredColumns: desiredColumns as string[],
|
|
1225
|
+
orderBy: orderBy as carriers.ArchiveOrderByInfo[],
|
|
1226
|
+
pageSize: pageSize as number,
|
|
1227
|
+
pageNumber: pageNumber as number,
|
|
1228
|
+
};
|
|
1229
|
+
_options = webapi_options;
|
|
1230
|
+
}
|
|
1231
|
+
return this._findFromRestrictionsColumnsOrderByAsync( _request, _options );
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
|
|
1235
|
+
private async _getDefaultDesiredColumnsAsync(request: carriers.Find_GetDefaultDesiredColumnsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveColumnInfo[] > {
|
|
1236
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1237
|
+
base.WebApiBase.SetPending(options);
|
|
1238
|
+
return new Promise< carriers.ArchiveColumnInfo[] >(async (resolve, reject) => {
|
|
1239
|
+
try {
|
|
1240
|
+
config.baseURL = this._options.baseUrl;
|
|
1241
|
+
const response = await this._axios.post("GetDefaultDesiredColumns", request , config);
|
|
1242
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1243
|
+
const res : carriers.ArchiveColumnInfo[] = converters.Create_ArchiveColumnInfoArray_From( response.data );
|
|
1244
|
+
resolve(res);
|
|
1245
|
+
}
|
|
1246
|
+
catch( err ) {
|
|
1247
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1248
|
+
reject(err);
|
|
1249
|
+
}
|
|
1250
|
+
});
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
|
|
1254
|
+
|
|
1255
|
+
/**
|
|
1256
|
+
* Calculate the default desired columns, i.e., the result columns for a given search. The search is defined by a storage type, provider name and storage key, which are used to fetch the corresponding restrictions from the database (in the same way as Find does). If you want to specify the restriction directly, use the GetDefaultDesiredColumnsFromRestrictions method instead. This is the algorithm that is used by the Find service method.
|
|
1257
|
+
* @param request - StorageType, ProviderName, StorageKey
|
|
1258
|
+
* @returns Column information for the default desired columns, fully populated. Percentage-specified column widths sum to exactly 100.
|
|
1259
|
+
*/
|
|
1260
|
+
public async getDefaultDesiredColumnsAsync(request: carriers.Find_GetDefaultDesiredColumnsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveColumnInfo[] >;
|
|
1261
|
+
|
|
1262
|
+
/**
|
|
1263
|
+
* Calculate the default desired columns, i.e., the result columns for a given search. The search is defined by a storage type, provider name and storage key, which are used to fetch the corresponding restrictions from the database (in the same way as Find does). If you want to specify the restriction directly, use the GetDefaultDesiredColumnsFromRestrictions method instead. This is the algorithm that is used by the Find service method.
|
|
1264
|
+
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
1265
|
+
* @param providerName - Name of the provider to calculate default desired columns for
|
|
1266
|
+
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search
|
|
1267
|
+
* @returns Column information for the default desired columns, fully populated. Percentage-specified column widths sum to exactly 100.
|
|
1268
|
+
*/
|
|
1269
|
+
public async getDefaultDesiredColumnsAsync(storageType: string, providerName: string, storageKey: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveColumnInfo[] >;
|
|
1270
|
+
|
|
1271
|
+
public async getDefaultDesiredColumnsAsync(storageType:string|carriers.Find_GetDefaultDesiredColumnsRequest, providerName?:string|base.WebApiRequestOptions, storageKey?:string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveColumnInfo[] > {
|
|
1272
|
+
let _request : carriers.Find_GetDefaultDesiredColumnsRequest = null;
|
|
1273
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1274
|
+
const first : any = storageType;
|
|
1275
|
+
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' ) )
|
|
1276
|
+
{
|
|
1277
|
+
_request = storageType as carriers.Find_GetDefaultDesiredColumnsRequest;
|
|
1278
|
+
_options = providerName as base.WebApiRequestOptions;
|
|
1279
|
+
}
|
|
1280
|
+
else
|
|
1281
|
+
{
|
|
1282
|
+
_request = {
|
|
1283
|
+
storageType: storageType as string,
|
|
1284
|
+
providerName: providerName as string,
|
|
1285
|
+
storageKey: storageKey as string,
|
|
1286
|
+
};
|
|
1287
|
+
_options = webapi_options;
|
|
1288
|
+
}
|
|
1289
|
+
return this._getDefaultDesiredColumnsAsync( _request, _options );
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
|
|
1293
|
+
private async _getDefaultOrderByAsync(request: carriers.Find_GetDefaultOrderByRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveOrderByInfo[] > {
|
|
1294
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1295
|
+
base.WebApiBase.SetPending(options);
|
|
1296
|
+
return new Promise< carriers.ArchiveOrderByInfo[] >(async (resolve, reject) => {
|
|
1297
|
+
try {
|
|
1298
|
+
config.baseURL = this._options.baseUrl;
|
|
1299
|
+
const response = await this._axios.post("GetDefaultOrderBy", request , config);
|
|
1300
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1301
|
+
const res : carriers.ArchiveOrderByInfo[] = converters.Create_ArchiveOrderByInfoArray_From( response.data );
|
|
1302
|
+
resolve(res);
|
|
1303
|
+
}
|
|
1304
|
+
catch( err ) {
|
|
1305
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1306
|
+
reject(err);
|
|
1307
|
+
}
|
|
1308
|
+
});
|
|
1309
|
+
}
|
|
1310
|
+
|
|
1311
|
+
|
|
1312
|
+
|
|
1313
|
+
/**
|
|
1314
|
+
* Calculate the default orderby columns for a given provider and a search. The search is specified by a storage type, provider name and storage key, and is fetched from the database. Default desired columns are then calculated for the search, and those columns are then used as the basis for calculating an order by. If you want to specify the desired columns directly, use the GetDefaultOrderByFromDesiredColumns method instead. This is the same algorithm that is used by the Find service method.
|
|
1315
|
+
* @param request - StorageType, ProviderName, StorageKey
|
|
1316
|
+
* @returns Orderby information
|
|
1317
|
+
*/
|
|
1318
|
+
public async getDefaultOrderByAsync(request: carriers.Find_GetDefaultOrderByRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveOrderByInfo[] >;
|
|
1319
|
+
|
|
1320
|
+
/**
|
|
1321
|
+
* Calculate the default orderby columns for a given provider and a search. The search is specified by a storage type, provider name and storage key, and is fetched from the database. Default desired columns are then calculated for the search, and those columns are then used as the basis for calculating an order by. If you want to specify the desired columns directly, use the GetDefaultOrderByFromDesiredColumns method instead. This is the same algorithm that is used by the Find service method.
|
|
1322
|
+
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
1323
|
+
* @param providerName - Provider name to calculate default orderby for
|
|
1324
|
+
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search
|
|
1325
|
+
* @returns Orderby information
|
|
1326
|
+
*/
|
|
1327
|
+
public async getDefaultOrderByAsync(storageType: string, providerName: string, storageKey: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveOrderByInfo[] >;
|
|
1328
|
+
|
|
1329
|
+
public async getDefaultOrderByAsync(storageType:string|carriers.Find_GetDefaultOrderByRequest, providerName?:string|base.WebApiRequestOptions, storageKey?:string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveOrderByInfo[] > {
|
|
1330
|
+
let _request : carriers.Find_GetDefaultOrderByRequest = null;
|
|
1331
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1332
|
+
const first : any = storageType;
|
|
1333
|
+
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' ) )
|
|
1334
|
+
{
|
|
1335
|
+
_request = storageType as carriers.Find_GetDefaultOrderByRequest;
|
|
1336
|
+
_options = providerName as base.WebApiRequestOptions;
|
|
1337
|
+
}
|
|
1338
|
+
else
|
|
1339
|
+
{
|
|
1340
|
+
_request = {
|
|
1341
|
+
storageType: storageType as string,
|
|
1342
|
+
providerName: providerName as string,
|
|
1343
|
+
storageKey: storageKey as string,
|
|
1344
|
+
};
|
|
1345
|
+
_options = webapi_options;
|
|
1346
|
+
}
|
|
1347
|
+
return this._getDefaultOrderByAsync( _request, _options );
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1350
|
+
|
|
1351
|
+
private async _populateRestrictionsAsync(request: carriers.Find_PopulateRestrictionsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionInfo[] > {
|
|
1352
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1353
|
+
base.WebApiBase.SetPending(options);
|
|
1354
|
+
return new Promise< carriers.ArchiveRestrictionInfo[] >(async (resolve, reject) => {
|
|
1355
|
+
try {
|
|
1356
|
+
config.baseURL = this._options.baseUrl;
|
|
1357
|
+
const response = await this._axios.post("PopulateRestrictions", request , config);
|
|
1358
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1359
|
+
const res : carriers.ArchiveRestrictionInfo[] = converters.Create_ArchiveRestrictionInfoArray_From( response.data );
|
|
1360
|
+
resolve(res);
|
|
1361
|
+
}
|
|
1362
|
+
catch( err ) {
|
|
1363
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1364
|
+
reject(err);
|
|
1365
|
+
}
|
|
1366
|
+
});
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1369
|
+
|
|
1370
|
+
|
|
1371
|
+
/**
|
|
1372
|
+
* Take an incoming set of minimally populated restrictions (name + operator is required), and populate all the other parts of the ArchiveRestrictionInfo structure. This includes column information, display values (including list value lookup), and calculated/default values where the value hints specify read-only (R).
|
|
1373
|
+
* @param request - ProviderName, Restrictions
|
|
1374
|
+
* @returns Fully populated restrictions in the same order as the incoming restrictions.
|
|
1375
|
+
*/
|
|
1376
|
+
public async populateRestrictionsAsync(request: carriers.Find_PopulateRestrictionsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionInfo[] >;
|
|
1377
|
+
|
|
1378
|
+
/**
|
|
1379
|
+
* Take an incoming set of minimally populated restrictions (name + operator is required), and populate all the other parts of the ArchiveRestrictionInfo structure. This includes column information, display values (including list value lookup), and calculated/default values where the value hints specify read-only (R).
|
|
1380
|
+
* @param providerName - Provider name to use for populating column information
|
|
1381
|
+
* @param restrictions - Restrictions to populate. The Name and Operator fields have to have valid content, and Values should be set as appropriate. Other fields can be left blank or null. If a ColumnInfo is already set, it will not be overwritten.
|
|
1382
|
+
* @returns Fully populated restrictions in the same order as the incoming restrictions.
|
|
1383
|
+
*/
|
|
1384
|
+
public async populateRestrictionsAsync(providerName: string, restrictions: carriers.ArchiveRestrictionInfo[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionInfo[] >;
|
|
1385
|
+
|
|
1386
|
+
public async populateRestrictionsAsync(providerName:string|carriers.Find_PopulateRestrictionsRequest, restrictions?:carriers.ArchiveRestrictionInfo[]|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionInfo[] > {
|
|
1387
|
+
let _request : carriers.Find_PopulateRestrictionsRequest = null;
|
|
1388
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1389
|
+
const first : any = providerName;
|
|
1390
|
+
if( typeof( first ) === "object" && first && ( typeof(first.providerName)!='undefined' || typeof(first.restrictions)!='undefined' ) )
|
|
1391
|
+
{
|
|
1392
|
+
_request = providerName as carriers.Find_PopulateRestrictionsRequest;
|
|
1393
|
+
_options = restrictions as base.WebApiRequestOptions;
|
|
1394
|
+
}
|
|
1395
|
+
else
|
|
1396
|
+
{
|
|
1397
|
+
_request = {
|
|
1398
|
+
providerName: providerName as string,
|
|
1399
|
+
restrictions: restrictions as carriers.ArchiveRestrictionInfo[],
|
|
1400
|
+
};
|
|
1401
|
+
_options = webapi_options;
|
|
1402
|
+
}
|
|
1403
|
+
return this._populateRestrictionsAsync( _request, _options );
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
|
|
1407
|
+
private async _populateRestrictionValuesAsync(request: carriers.Find_PopulateRestrictionValuesRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionInfo[] > {
|
|
1408
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1409
|
+
base.WebApiBase.SetPending(options);
|
|
1410
|
+
return new Promise< carriers.ArchiveRestrictionInfo[] >(async (resolve, reject) => {
|
|
1411
|
+
try {
|
|
1412
|
+
config.baseURL = this._options.baseUrl;
|
|
1413
|
+
const response = await this._axios.post("PopulateRestrictionValues", request , config);
|
|
1414
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1415
|
+
const res : carriers.ArchiveRestrictionInfo[] = converters.Create_ArchiveRestrictionInfoArray_From( response.data );
|
|
1416
|
+
resolve(res);
|
|
1417
|
+
}
|
|
1418
|
+
catch( err ) {
|
|
1419
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1420
|
+
reject(err);
|
|
1421
|
+
}
|
|
1422
|
+
});
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
|
|
1426
|
+
|
|
1427
|
+
/**
|
|
1428
|
+
* Take an incoming set of Restrictions (name + operator + any user-entered values), and populate/expand all values as specified by the operator's ValueHints, taking into account any values already there. Used for dynamic date periods; perhaps others in the future
|
|
1429
|
+
* @param request - Restrictions
|
|
1430
|
+
* @returns Restrictions in the same order as the incoming restrictions, with all values expanded.
|
|
1431
|
+
*/
|
|
1432
|
+
public async populateRestrictionValuesAsync(request: carriers.Find_PopulateRestrictionValuesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionInfo[] >;
|
|
1433
|
+
|
|
1434
|
+
/**
|
|
1435
|
+
* Take an incoming set of Restrictions (name + operator + any user-entered values), and populate/expand all values as specified by the operator's ValueHints, taking into account any values already there. Used for dynamic date periods; perhaps others in the future
|
|
1436
|
+
* @param restrictions - Restrictions to populate. The Name and Operator fields have to have valid content, and Values should be set as appropriate. Other fields can be left blank or null and will not be changed.
|
|
1437
|
+
* @returns Restrictions in the same order as the incoming restrictions, with all values expanded.
|
|
1438
|
+
*/
|
|
1439
|
+
public async populateRestrictionValuesAsync(restrictions: carriers.ArchiveRestrictionInfo[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionInfo[] >;
|
|
1440
|
+
|
|
1441
|
+
public async populateRestrictionValuesAsync(restrictions:carriers.ArchiveRestrictionInfo[]|carriers.Find_PopulateRestrictionValuesRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveRestrictionInfo[] > {
|
|
1442
|
+
let _request : carriers.Find_PopulateRestrictionValuesRequest = null;
|
|
1443
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1444
|
+
const first : any = restrictions;
|
|
1445
|
+
if( typeof( first ) === "object" && first && ( typeof(first.restrictions)!='undefined' ) )
|
|
1446
|
+
{
|
|
1447
|
+
_request = restrictions as carriers.Find_PopulateRestrictionValuesRequest;
|
|
1448
|
+
_options = webapi_options as base.WebApiRequestOptions;
|
|
1449
|
+
}
|
|
1450
|
+
else
|
|
1451
|
+
{
|
|
1452
|
+
_request = {
|
|
1453
|
+
restrictions: restrictions as carriers.ArchiveRestrictionInfo[],
|
|
1454
|
+
};
|
|
1455
|
+
_options = webapi_options;
|
|
1456
|
+
}
|
|
1457
|
+
return this._populateRestrictionValuesAsync( _request, _options );
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1460
|
+
|
|
1461
|
+
private async _getDefaultDesiredColumnsFromRestrictionsAsync(request: carriers.Find_GetDefaultDesiredColumnsFromRestrictionsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveColumnInfo[] > {
|
|
1462
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1463
|
+
base.WebApiBase.SetPending(options);
|
|
1464
|
+
return new Promise< carriers.ArchiveColumnInfo[] >(async (resolve, reject) => {
|
|
1465
|
+
try {
|
|
1466
|
+
config.baseURL = this._options.baseUrl;
|
|
1467
|
+
const response = await this._axios.post("GetDefaultDesiredColumnsFromRestrictions", request , config);
|
|
1468
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1469
|
+
const res : carriers.ArchiveColumnInfo[] = converters.Create_ArchiveColumnInfoArray_From( response.data );
|
|
1470
|
+
resolve(res);
|
|
1471
|
+
}
|
|
1472
|
+
catch( err ) {
|
|
1473
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1474
|
+
reject(err);
|
|
1475
|
+
}
|
|
1476
|
+
});
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
|
|
1480
|
+
|
|
1481
|
+
/**
|
|
1482
|
+
* Calculate the default desired columns, i.e., the result columns for a given search. The search is defined by a provider name and a set of restrictions. This is the algorithm that is used by the Find service method.
|
|
1483
|
+
* @param request - ProviderName, Restrictions
|
|
1484
|
+
* @returns Column information for the default desired columns, fully populated. Percentage-specified column widths sum to exactly 100.
|
|
1485
|
+
*/
|
|
1486
|
+
public async getDefaultDesiredColumnsFromRestrictionsAsync(request: carriers.Find_GetDefaultDesiredColumnsFromRestrictionsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveColumnInfo[] >;
|
|
1487
|
+
|
|
1488
|
+
/**
|
|
1489
|
+
* Calculate the default desired columns, i.e., the result columns for a given search. The search is defined by a provider name and a set of restrictions. This is the algorithm that is used by the Find service method.
|
|
1490
|
+
* @param providerName - Name of the provider to calculate default desired columns for
|
|
1491
|
+
* @param restrictions - Restriction to use in the calculation of default desired columns
|
|
1492
|
+
* @returns Column information for the default desired columns, fully populated. Percentage-specified column widths sum to exactly 100.
|
|
1493
|
+
*/
|
|
1494
|
+
public async getDefaultDesiredColumnsFromRestrictionsAsync(providerName: string, restrictions: carriers.ArchiveRestrictionInfo[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveColumnInfo[] >;
|
|
1495
|
+
|
|
1496
|
+
public async getDefaultDesiredColumnsFromRestrictionsAsync(providerName:string|carriers.Find_GetDefaultDesiredColumnsFromRestrictionsRequest, restrictions?:carriers.ArchiveRestrictionInfo[]|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveColumnInfo[] > {
|
|
1497
|
+
let _request : carriers.Find_GetDefaultDesiredColumnsFromRestrictionsRequest = null;
|
|
1498
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1499
|
+
const first : any = providerName;
|
|
1500
|
+
if( typeof( first ) === "object" && first && ( typeof(first.providerName)!='undefined' || typeof(first.restrictions)!='undefined' ) )
|
|
1501
|
+
{
|
|
1502
|
+
_request = providerName as carriers.Find_GetDefaultDesiredColumnsFromRestrictionsRequest;
|
|
1503
|
+
_options = restrictions as base.WebApiRequestOptions;
|
|
1504
|
+
}
|
|
1505
|
+
else
|
|
1506
|
+
{
|
|
1507
|
+
_request = {
|
|
1508
|
+
providerName: providerName as string,
|
|
1509
|
+
restrictions: restrictions as carriers.ArchiveRestrictionInfo[],
|
|
1510
|
+
};
|
|
1511
|
+
_options = webapi_options;
|
|
1512
|
+
}
|
|
1513
|
+
return this._getDefaultDesiredColumnsFromRestrictionsAsync( _request, _options );
|
|
1514
|
+
}
|
|
1515
|
+
|
|
1516
|
+
|
|
1517
|
+
private async _getDefaultOrderByFromDesiredColumnsAsync(request: carriers.Find_GetDefaultOrderByFromDesiredColumnsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveOrderByInfo[] > {
|
|
1518
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1519
|
+
base.WebApiBase.SetPending(options);
|
|
1520
|
+
return new Promise< carriers.ArchiveOrderByInfo[] >(async (resolve, reject) => {
|
|
1521
|
+
try {
|
|
1522
|
+
config.baseURL = this._options.baseUrl;
|
|
1523
|
+
const response = await this._axios.post("GetDefaultOrderByFromDesiredColumns", request , config);
|
|
1524
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1525
|
+
const res : carriers.ArchiveOrderByInfo[] = converters.Create_ArchiveOrderByInfoArray_From( response.data );
|
|
1526
|
+
resolve(res);
|
|
1527
|
+
}
|
|
1528
|
+
catch( err ) {
|
|
1529
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1530
|
+
reject(err);
|
|
1531
|
+
}
|
|
1532
|
+
});
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1535
|
+
|
|
1536
|
+
|
|
1537
|
+
/**
|
|
1538
|
+
* Calculate the default orderby columns for a given provider and a set of desired columns. This is the same algorithm that is used by the Find service method.
|
|
1539
|
+
* @param request - ProviderName, DesiredColumns
|
|
1540
|
+
* @returns Orderby information
|
|
1541
|
+
*/
|
|
1542
|
+
public async getDefaultOrderByFromDesiredColumnsAsync(request: carriers.Find_GetDefaultOrderByFromDesiredColumnsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveOrderByInfo[] >;
|
|
1543
|
+
|
|
1544
|
+
/**
|
|
1545
|
+
* Calculate the default orderby columns for a given provider and a set of desired columns. This is the same algorithm that is used by the Find service method.
|
|
1546
|
+
* @param providerName - Provider name to calculate default orderby for
|
|
1547
|
+
* @param desiredColumns - Desired columns (return fields), used in the orderby calculation. You can generally only order by columns that have been set as 'desired'.
|
|
1548
|
+
* @returns Orderby information
|
|
1549
|
+
*/
|
|
1550
|
+
public async getDefaultOrderByFromDesiredColumnsAsync(providerName: string, desiredColumns: string[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveOrderByInfo[] >;
|
|
1551
|
+
|
|
1552
|
+
public async getDefaultOrderByFromDesiredColumnsAsync(providerName:string|carriers.Find_GetDefaultOrderByFromDesiredColumnsRequest, desiredColumns?:string[]|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveOrderByInfo[] > {
|
|
1553
|
+
let _request : carriers.Find_GetDefaultOrderByFromDesiredColumnsRequest = null;
|
|
1554
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1555
|
+
const first : any = providerName;
|
|
1556
|
+
if( typeof( first ) === "object" && first && ( typeof(first.providerName)!='undefined' || typeof(first.desiredColumns)!='undefined' ) )
|
|
1557
|
+
{
|
|
1558
|
+
_request = providerName as carriers.Find_GetDefaultOrderByFromDesiredColumnsRequest;
|
|
1559
|
+
_options = desiredColumns as base.WebApiRequestOptions;
|
|
1560
|
+
}
|
|
1561
|
+
else
|
|
1562
|
+
{
|
|
1563
|
+
_request = {
|
|
1564
|
+
providerName: providerName as string,
|
|
1565
|
+
desiredColumns: desiredColumns as string[],
|
|
1566
|
+
};
|
|
1567
|
+
_options = webapi_options;
|
|
1568
|
+
}
|
|
1569
|
+
return this._getDefaultOrderByFromDesiredColumnsAsync( _request, _options );
|
|
1570
|
+
}
|
|
1571
|
+
|
|
1572
|
+
|
|
1573
|
+
private async _findOrderByAsync(request: carriers.Find_FindOrderByRequest, options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
1574
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1575
|
+
base.WebApiBase.SetPending(options);
|
|
1576
|
+
return new Promise< carriers.FindResults >(async (resolve, reject) => {
|
|
1577
|
+
try {
|
|
1578
|
+
config.baseURL = this._options.baseUrl;
|
|
1579
|
+
const response = await this._axios.post("FindOrderBy", request , config);
|
|
1580
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1581
|
+
const res : carriers.FindResults = converters.Create_FindResults_From( response.data );
|
|
1582
|
+
resolve(res);
|
|
1583
|
+
}
|
|
1584
|
+
catch( err ) {
|
|
1585
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1586
|
+
reject(err);
|
|
1587
|
+
}
|
|
1588
|
+
});
|
|
1589
|
+
}
|
|
1590
|
+
|
|
1591
|
+
|
|
1592
|
+
|
|
1593
|
+
/**
|
|
1594
|
+
* Execute a Find operation and return a page of results. The criteria for the Find are fetched from the restriction storage provider according to the given parameters. The columns of the result are calculated based on the restriction. The orderby parameter is used for sorting the results.<para/>The other variants of the Find method allow you greater control over the individual aspects of the process.
|
|
1595
|
+
* @param request - StorageType, ProviderName, StorageKey, PageSize, PageNumber, OrderBy
|
|
1596
|
+
* @returns Results from search, containing column information and result rows.
|
|
1597
|
+
*/
|
|
1598
|
+
public async findOrderByAsync(request: carriers.Find_FindOrderByRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
1599
|
+
|
|
1600
|
+
/**
|
|
1601
|
+
* Execute a Find operation and return a page of results. The criteria for the Find are fetched from the restriction storage provider according to the given parameters. The columns of the result are calculated based on the restriction. The orderby parameter is used for sorting the results.<para/>The other variants of the Find method allow you greater control over the individual aspects of the process.
|
|
1602
|
+
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
1603
|
+
* @param providerName - Name of archive provider that is to execute the search and return the result columns/rows
|
|
1604
|
+
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search
|
|
1605
|
+
* @param pageSize - Size of result set pages
|
|
1606
|
+
* @param pageNumber - Result set page to return, 0 is the first page. When a call returns no rows, no further pages are available. Negative page numbers are interpreted as number of rows to skip.
|
|
1607
|
+
* @param orderBy - Array of order by specifications. If it is null or empty, the row order is unspecified, database dependent, and might not be the same from call to call, depending on query execution plans. The unspecified order willgenerally not vary within pages of the same query.
|
|
1608
|
+
* @returns Results from search, containing column information and result rows.
|
|
1609
|
+
*/
|
|
1610
|
+
public async findOrderByAsync(storageType: string, providerName: string, storageKey: string, pageSize: number, pageNumber: number, orderBy: carriers.ArchiveOrderByInfo[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
1611
|
+
|
|
1612
|
+
public async findOrderByAsync(storageType:string|carriers.Find_FindOrderByRequest, providerName?:string|base.WebApiRequestOptions, storageKey?:string, pageSize?:number, pageNumber?:number, orderBy?:carriers.ArchiveOrderByInfo[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
1613
|
+
let _request : carriers.Find_FindOrderByRequest = null;
|
|
1614
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1615
|
+
const first : any = storageType;
|
|
1616
|
+
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.pageSize)!='undefined' || typeof(first.pageNumber)!='undefined' || typeof(first.orderBy)!='undefined' ) )
|
|
1617
|
+
{
|
|
1618
|
+
_request = storageType as carriers.Find_FindOrderByRequest;
|
|
1619
|
+
_options = providerName as base.WebApiRequestOptions;
|
|
1620
|
+
}
|
|
1621
|
+
else
|
|
1622
|
+
{
|
|
1623
|
+
_request = {
|
|
1624
|
+
storageType: storageType as string,
|
|
1625
|
+
providerName: providerName as string,
|
|
1626
|
+
storageKey: storageKey as string,
|
|
1627
|
+
pageSize: pageSize as number,
|
|
1628
|
+
pageNumber: pageNumber as number,
|
|
1629
|
+
orderBy: orderBy as carriers.ArchiveOrderByInfo[],
|
|
1630
|
+
};
|
|
1631
|
+
_options = webapi_options;
|
|
1632
|
+
}
|
|
1633
|
+
return this._findOrderByAsync( _request, _options );
|
|
1634
|
+
}
|
|
1635
|
+
|
|
1636
|
+
|
|
1637
|
+
private async _findWithExtraRestrictionsAsync(request: carriers.Find_FindWithExtraRestrictionsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
1638
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1639
|
+
base.WebApiBase.SetPending(options);
|
|
1640
|
+
return new Promise< carriers.FindResults >(async (resolve, reject) => {
|
|
1641
|
+
try {
|
|
1642
|
+
config.baseURL = this._options.baseUrl;
|
|
1643
|
+
const response = await this._axios.post("FindWithExtraRestrictions", request , config);
|
|
1644
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1645
|
+
const res : carriers.FindResults = converters.Create_FindResults_From( response.data );
|
|
1646
|
+
resolve(res);
|
|
1647
|
+
}
|
|
1648
|
+
catch( err ) {
|
|
1649
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1650
|
+
reject(err);
|
|
1651
|
+
}
|
|
1652
|
+
});
|
|
1653
|
+
}
|
|
1654
|
+
|
|
1655
|
+
|
|
1656
|
+
|
|
1657
|
+
/**
|
|
1658
|
+
* Execute a Find operation and return a page of results. The criteria for the Find are fetched from the restriction storage provider according to the given parameters. In addition an extra set of restrictions can be added to the search. These restrictions will not be saved, they are only valid for the current search. Extra restrictions will override restrictions with the same key already stored on the storagekey.
|
|
1659
|
+
* @param request - StorageType, ProviderName, StorageKey, ExtraRestrictions, OrderBy, DesiredColumns, PageSize, PageNumber
|
|
1660
|
+
* @returns Results from search, containing column information and result rows.
|
|
1661
|
+
*/
|
|
1662
|
+
public async findWithExtraRestrictionsAsync(request: carriers.Find_FindWithExtraRestrictionsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
1663
|
+
|
|
1664
|
+
/**
|
|
1665
|
+
* Execute a Find operation and return a page of results. The criteria for the Find are fetched from the restriction storage provider according to the given parameters. In addition an extra set of restrictions can be added to the search. These restrictions will not be saved, they are only valid for the current search. Extra restrictions will override restrictions with the same key already stored on the storagekey.
|
|
1666
|
+
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
1667
|
+
* @param providerName - Name of archive provider that is to execute the search and return the result columns/rows
|
|
1668
|
+
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search
|
|
1669
|
+
* @param extraRestrictions - Extra restrictions to append to the the search. These will override saved restrictions with the same key.
|
|
1670
|
+
* @param orderBy - Array of order by specifications. If it is null or empty, the row order is unspecified, database dependent, and might not be the same from call to call, depending on query execution plans. The unspecified order willgenerally not vary within pages of the same query.
|
|
1671
|
+
* @param desiredColumns - Array of column names desired for the result. Each name must match a column offered by the given archive provider.
|
|
1672
|
+
* @param pageSize - Size of result set pages
|
|
1673
|
+
* @param pageNumber - Result set page to return, 0 is the first page. When a call returns no rows, no further pages are available. Negative page numbers are interpreted as number of rows to skip.
|
|
1674
|
+
* @returns Results from search, containing column information and result rows.
|
|
1675
|
+
*/
|
|
1676
|
+
public async findWithExtraRestrictionsAsync(storageType: string, providerName: string, storageKey: string, extraRestrictions: carriers.ArchiveRestrictionInfo[], orderBy: carriers.ArchiveOrderByInfo[], desiredColumns: string[], pageSize: number, pageNumber: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
1677
|
+
|
|
1678
|
+
public async findWithExtraRestrictionsAsync(storageType:string|carriers.Find_FindWithExtraRestrictionsRequest, providerName?:string|base.WebApiRequestOptions, storageKey?:string, extraRestrictions?:carriers.ArchiveRestrictionInfo[], orderBy?:carriers.ArchiveOrderByInfo[], desiredColumns?:string[], pageSize?:number, pageNumber?:number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
1679
|
+
let _request : carriers.Find_FindWithExtraRestrictionsRequest = null;
|
|
1680
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1681
|
+
const first : any = storageType;
|
|
1682
|
+
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.extraRestrictions)!='undefined' || typeof(first.orderBy)!='undefined' || typeof(first.desiredColumns)!='undefined' || typeof(first.pageSize)!='undefined' || typeof(first.pageNumber)!='undefined' ) )
|
|
1683
|
+
{
|
|
1684
|
+
_request = storageType as carriers.Find_FindWithExtraRestrictionsRequest;
|
|
1685
|
+
_options = providerName as base.WebApiRequestOptions;
|
|
1686
|
+
}
|
|
1687
|
+
else
|
|
1688
|
+
{
|
|
1689
|
+
_request = {
|
|
1690
|
+
storageType: storageType as string,
|
|
1691
|
+
providerName: providerName as string,
|
|
1692
|
+
storageKey: storageKey as string,
|
|
1693
|
+
extraRestrictions: extraRestrictions as carriers.ArchiveRestrictionInfo[],
|
|
1694
|
+
orderBy: orderBy as carriers.ArchiveOrderByInfo[],
|
|
1695
|
+
desiredColumns: desiredColumns as string[],
|
|
1696
|
+
pageSize: pageSize as number,
|
|
1697
|
+
pageNumber: pageNumber as number,
|
|
1698
|
+
};
|
|
1699
|
+
_options = webapi_options;
|
|
1700
|
+
}
|
|
1701
|
+
return this._findWithExtraRestrictionsAsync( _request, _options );
|
|
1702
|
+
}
|
|
1703
|
+
|
|
1704
|
+
|
|
1705
|
+
private async _findWithColumnsAsync(request: carriers.Find_FindWithColumnsRequest, options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
1706
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1707
|
+
base.WebApiBase.SetPending(options);
|
|
1708
|
+
return new Promise< carriers.FindResults >(async (resolve, reject) => {
|
|
1709
|
+
try {
|
|
1710
|
+
config.baseURL = this._options.baseUrl;
|
|
1711
|
+
const response = await this._axios.post("FindWithColumns", request , config);
|
|
1712
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1713
|
+
const res : carriers.FindResults = converters.Create_FindResults_From( response.data );
|
|
1714
|
+
resolve(res);
|
|
1715
|
+
}
|
|
1716
|
+
catch( err ) {
|
|
1717
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1718
|
+
reject(err);
|
|
1719
|
+
}
|
|
1720
|
+
});
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
|
|
1724
|
+
|
|
1725
|
+
/**
|
|
1726
|
+
* Execute a Find operation and return a page of results. The criteria for the Find are fetched from the restriction storage provider according to the given parameters.
|
|
1727
|
+
* @param request - StorageType, ProviderName, StorageKey, DesiredColumns, PageSize, PageNumber, OrderBy
|
|
1728
|
+
* @returns Results from search, containing column information and result rows.
|
|
1729
|
+
*/
|
|
1730
|
+
public async findWithColumnsAsync(request: carriers.Find_FindWithColumnsRequest, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
1731
|
+
|
|
1732
|
+
/**
|
|
1733
|
+
* Execute a Find operation and return a page of results. The criteria for the Find are fetched from the restriction storage provider according to the given parameters.
|
|
1734
|
+
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
1735
|
+
* @param providerName - Name of archive provider that is to execute the search and return the result columns/rows
|
|
1736
|
+
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search
|
|
1737
|
+
* @param desiredColumns - Array of column names desired for the result. Each name must match a column offered by the given archive provider.
|
|
1738
|
+
* @param pageSize - Size of result set pages
|
|
1739
|
+
* @param pageNumber - Result set page to return, 0 is the first page. When a call returns no rows, no further pages are available. Negative page numbers are interpreted as number of rows to skip.
|
|
1740
|
+
* @param orderBy - Array of order by specifications. If it is null or empty, the row order is unspecified, database dependent, and might not be the same from call to call, depending on query execution plans. The unspecified order willgenerally not vary within pages of the same query.
|
|
1741
|
+
* @returns Results from search, containing column information and result rows.
|
|
1742
|
+
*/
|
|
1743
|
+
public async findWithColumnsAsync(storageType: string, providerName: string, storageKey: string, desiredColumns: string[], pageSize: number, pageNumber: number, orderBy: carriers.ArchiveOrderByInfo[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
1744
|
+
|
|
1745
|
+
public async findWithColumnsAsync(storageType:string|carriers.Find_FindWithColumnsRequest, providerName?:string|base.WebApiRequestOptions, storageKey?:string, desiredColumns?:string[], pageSize?:number, pageNumber?:number, orderBy?:carriers.ArchiveOrderByInfo[], webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
1746
|
+
let _request : carriers.Find_FindWithColumnsRequest = null;
|
|
1747
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1748
|
+
const first : any = storageType;
|
|
1749
|
+
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.desiredColumns)!='undefined' || typeof(first.pageSize)!='undefined' || typeof(first.pageNumber)!='undefined' || typeof(first.orderBy)!='undefined' ) )
|
|
1750
|
+
{
|
|
1751
|
+
_request = storageType as carriers.Find_FindWithColumnsRequest;
|
|
1752
|
+
_options = providerName as base.WebApiRequestOptions;
|
|
1753
|
+
}
|
|
1754
|
+
else
|
|
1755
|
+
{
|
|
1756
|
+
_request = {
|
|
1757
|
+
storageType: storageType as string,
|
|
1758
|
+
providerName: providerName as string,
|
|
1759
|
+
storageKey: storageKey as string,
|
|
1760
|
+
desiredColumns: desiredColumns as string[],
|
|
1761
|
+
pageSize: pageSize as number,
|
|
1762
|
+
pageNumber: pageNumber as number,
|
|
1763
|
+
orderBy: orderBy as carriers.ArchiveOrderByInfo[],
|
|
1764
|
+
};
|
|
1765
|
+
_options = webapi_options;
|
|
1766
|
+
}
|
|
1767
|
+
return this._findWithColumnsAsync( _request, _options );
|
|
1768
|
+
}
|
|
1769
|
+
|
|
1770
|
+
|
|
1771
|
+
private async _saveRestrictions2Async(request: carriers.Find_SaveRestrictions2Request, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1772
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1773
|
+
base.WebApiBase.SetPending(options);
|
|
1774
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
1775
|
+
try {
|
|
1776
|
+
config.baseURL = this._options.baseUrl;
|
|
1777
|
+
const response = await this._axios.post("SaveRestrictions2", request , config);
|
|
1778
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1779
|
+
const res = response.data;
|
|
1780
|
+
resolve(res);
|
|
1781
|
+
}
|
|
1782
|
+
catch( err ) {
|
|
1783
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1784
|
+
reject(err);
|
|
1785
|
+
}
|
|
1786
|
+
});
|
|
1787
|
+
}
|
|
1788
|
+
|
|
1789
|
+
|
|
1790
|
+
|
|
1791
|
+
/**
|
|
1792
|
+
* Save an array of restrictions for later use as search criteria (including as dynamic selection and Find).
|
|
1793
|
+
* @param request - StorageType, ProviderName, StorageKey, Restrictions
|
|
1794
|
+
* @returns This service call just saves the restrictions. See SaveRestrictionsAndGetCriteriaInformation if you would like the restrictions returned as criteria immediately, in one roundtrip
|
|
1795
|
+
*/
|
|
1796
|
+
public async saveRestrictions2Async(request: carriers.Find_SaveRestrictions2Request, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1797
|
+
|
|
1798
|
+
/**
|
|
1799
|
+
* Save an array of restrictions for later use as search criteria (including as dynamic selection and Find).
|
|
1800
|
+
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
1801
|
+
* @param providerName - Name of archive provider that is the intended consumer of the restrictions
|
|
1802
|
+
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it saves the restrictions as criteria
|
|
1803
|
+
* @param restrictions - String of restrictions. "name = 'SuperOffice'" The ColumnInfo member and the DisplayValues members need NOT be populated; it is enough to provide a name, operator and any values the operator may need. The IsActive is also saved. Values should be encoded using the CultureDataFormatter to ensure compatibility across cultures.
|
|
1804
|
+
* @returns This service call just saves the restrictions. See SaveRestrictionsAndGetCriteriaInformation if you would like the restrictions returned as criteria immediately, in one roundtrip
|
|
1805
|
+
*/
|
|
1806
|
+
public async saveRestrictions2Async(storageType: string, providerName: string, storageKey: string, restrictions: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1807
|
+
|
|
1808
|
+
public async saveRestrictions2Async(storageType:string|carriers.Find_SaveRestrictions2Request, providerName?:string|base.WebApiRequestOptions, storageKey?:string, restrictions?:string, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1809
|
+
let _request : carriers.Find_SaveRestrictions2Request = null;
|
|
1810
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1811
|
+
const first : any = storageType;
|
|
1812
|
+
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.restrictions)!='undefined' ) )
|
|
1813
|
+
{
|
|
1814
|
+
_request = storageType as carriers.Find_SaveRestrictions2Request;
|
|
1815
|
+
_options = providerName as base.WebApiRequestOptions;
|
|
1816
|
+
}
|
|
1817
|
+
else
|
|
1818
|
+
{
|
|
1819
|
+
_request = {
|
|
1820
|
+
storageType: storageType as string,
|
|
1821
|
+
providerName: providerName as string,
|
|
1822
|
+
storageKey: storageKey as string,
|
|
1823
|
+
restrictions: restrictions as string,
|
|
1824
|
+
};
|
|
1825
|
+
_options = webapi_options;
|
|
1826
|
+
}
|
|
1827
|
+
return this._saveRestrictions2Async( _request, _options );
|
|
1828
|
+
}
|
|
1829
|
+
|
|
1830
|
+
|
|
1831
|
+
private async _saveRestrictionsWithContext2Async(request: carriers.Find_SaveRestrictionsWithContext2Request, options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1832
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1833
|
+
base.WebApiBase.SetPending(options);
|
|
1834
|
+
return new Promise< void >(async (resolve, reject) => {
|
|
1835
|
+
try {
|
|
1836
|
+
config.baseURL = this._options.baseUrl;
|
|
1837
|
+
const response = await this._axios.post("SaveRestrictionsWithContext2", request , config);
|
|
1838
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1839
|
+
const res = response.data;
|
|
1840
|
+
resolve(res);
|
|
1841
|
+
}
|
|
1842
|
+
catch( err ) {
|
|
1843
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1844
|
+
reject(err);
|
|
1845
|
+
}
|
|
1846
|
+
});
|
|
1847
|
+
}
|
|
1848
|
+
|
|
1849
|
+
|
|
1850
|
+
|
|
1851
|
+
/**
|
|
1852
|
+
* Save an array of restrictions for later use as search criteria (including as dynamic selection and Find).
|
|
1853
|
+
* @param request - StorageType, ProviderName, StorageKey, Restrictions, Context
|
|
1854
|
+
* @returns This service call just saves the restrictions. See SaveRestrictionsAndGetCriteriaInformation if you would like the restrictions returned as criteria immediately, in one roundtrip
|
|
1855
|
+
*/
|
|
1856
|
+
public async saveRestrictionsWithContext2Async(request: carriers.Find_SaveRestrictionsWithContext2Request, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1857
|
+
|
|
1858
|
+
/**
|
|
1859
|
+
* Save an array of restrictions for later use as search criteria (including as dynamic selection and Find).
|
|
1860
|
+
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
1861
|
+
* @param providerName - Name of archive provider that is the intended consumer of the restrictions
|
|
1862
|
+
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it saves the restrictions as criteria
|
|
1863
|
+
* @param restrictions - String of restrictions. The ColumnInfo member and the DisplayValues members need NOT be populated; it is enough to provide a name, operator and any values the operator may need. The IsActive is also saved. Values should be encoded using the CultureDataFormatter to ensure compatibility across cultures.
|
|
1864
|
+
* @param context - Optional context that can be used by FindProvider
|
|
1865
|
+
* @returns This service call just saves the restrictions. See SaveRestrictionsAndGetCriteriaInformation if you would like the restrictions returned as criteria immediately, in one roundtrip
|
|
1866
|
+
*/
|
|
1867
|
+
public async saveRestrictionsWithContext2Async(storageType: string, providerName: string, storageKey: string, restrictions: string, context: string, webapi_options?:base.WebApiRequestOptions) : Promise< void >;
|
|
1868
|
+
|
|
1869
|
+
public async saveRestrictionsWithContext2Async(storageType:string|carriers.Find_SaveRestrictionsWithContext2Request, providerName?:string|base.WebApiRequestOptions, storageKey?:string, restrictions?:string, context?:string, webapi_options?:base.WebApiRequestOptions) : Promise< void > {
|
|
1870
|
+
let _request : carriers.Find_SaveRestrictionsWithContext2Request = null;
|
|
1871
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1872
|
+
const first : any = storageType;
|
|
1873
|
+
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.restrictions)!='undefined' || typeof(first.context)!='undefined' ) )
|
|
1874
|
+
{
|
|
1875
|
+
_request = storageType as carriers.Find_SaveRestrictionsWithContext2Request;
|
|
1876
|
+
_options = providerName as base.WebApiRequestOptions;
|
|
1877
|
+
}
|
|
1878
|
+
else
|
|
1879
|
+
{
|
|
1880
|
+
_request = {
|
|
1881
|
+
storageType: storageType as string,
|
|
1882
|
+
providerName: providerName as string,
|
|
1883
|
+
storageKey: storageKey as string,
|
|
1884
|
+
restrictions: restrictions as string,
|
|
1885
|
+
context: context as string,
|
|
1886
|
+
};
|
|
1887
|
+
_options = webapi_options;
|
|
1888
|
+
}
|
|
1889
|
+
return this._saveRestrictionsWithContext2Async( _request, _options );
|
|
1890
|
+
}
|
|
1891
|
+
|
|
1892
|
+
|
|
1893
|
+
private async _saveRestrictionsAndGetCriteriaInformation2Async(request: carriers.Find_SaveRestrictionsAndGetCriteriaInformation2Request, options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation > {
|
|
1894
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1895
|
+
base.WebApiBase.SetPending(options);
|
|
1896
|
+
return new Promise< carriers.CriteriaInformation >(async (resolve, reject) => {
|
|
1897
|
+
try {
|
|
1898
|
+
config.baseURL = this._options.baseUrl;
|
|
1899
|
+
const response = await this._axios.post("SaveRestrictionsAndGetCriteriaInformation2", request , config);
|
|
1900
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1901
|
+
const res : carriers.CriteriaInformation = converters.Create_CriteriaInformation_From( response.data );
|
|
1902
|
+
resolve(res);
|
|
1903
|
+
}
|
|
1904
|
+
catch( err ) {
|
|
1905
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1906
|
+
reject(err);
|
|
1907
|
+
}
|
|
1908
|
+
});
|
|
1909
|
+
}
|
|
1910
|
+
|
|
1911
|
+
|
|
1912
|
+
|
|
1913
|
+
/**
|
|
1914
|
+
* Save an array of restrictions for later use as search criteria (including as dynamic selection and Find). Then, return the same result as a call to GetCriteriaInformation would have done. The purpose is to encapsulate saving and updating of a GUI in one round trip.
|
|
1915
|
+
* @param request - StorageType, ProviderName, StorageKey, Restrictions, StaticColumns
|
|
1916
|
+
* @returns The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control
|
|
1917
|
+
*/
|
|
1918
|
+
public async saveRestrictionsAndGetCriteriaInformation2Async(request: carriers.Find_SaveRestrictionsAndGetCriteriaInformation2Request, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
1919
|
+
|
|
1920
|
+
/**
|
|
1921
|
+
* Save an array of restrictions for later use as search criteria (including as dynamic selection and Find). Then, return the same result as a call to GetCriteriaInformation would have done. The purpose is to encapsulate saving and updating of a GUI in one round trip.
|
|
1922
|
+
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
1923
|
+
* @param providerName - Name of archive provider that is the intended consumer of the restrictions
|
|
1924
|
+
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it saves the restrictions as criteria
|
|
1925
|
+
* @param restrictions - String of restrictions. The ColumnInfo member and the DisplayValues members need NOT be populated; it is enough to provide a name, operator and any values the operator may need. The IsActive is also saved. Values should be encoded using the CultureDataFormatter to ensure compatibility across cultures.
|
|
1926
|
+
* @param staticColumns - Optional string of comma-separated columns that are to be EXCLUDED from the CriteriaArchiveRows part of the result. In the Find dialogs, that corresponds to the 'static' fields, to avoid duplicating them in the 'Match also' criteria list. This array can be null, indicating that all restrictions should be included in the criteria list.
|
|
1927
|
+
* @returns The result contains the restrictions in two forms: fully populated ArchiveRestrictionInfo objects, used to display details and for saving changes; and as a list suitable for an Archive control
|
|
1928
|
+
*/
|
|
1929
|
+
public async saveRestrictionsAndGetCriteriaInformation2Async(storageType: string, providerName: string, storageKey: string, restrictions: string, staticColumns: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation >;
|
|
1930
|
+
|
|
1931
|
+
public async saveRestrictionsAndGetCriteriaInformation2Async(storageType:string|carriers.Find_SaveRestrictionsAndGetCriteriaInformation2Request, providerName?:string|base.WebApiRequestOptions, storageKey?:string, restrictions?:string, staticColumns?:string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.CriteriaInformation > {
|
|
1932
|
+
let _request : carriers.Find_SaveRestrictionsAndGetCriteriaInformation2Request = null;
|
|
1933
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1934
|
+
const first : any = storageType;
|
|
1935
|
+
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.restrictions)!='undefined' || typeof(first.staticColumns)!='undefined' ) )
|
|
1936
|
+
{
|
|
1937
|
+
_request = storageType as carriers.Find_SaveRestrictionsAndGetCriteriaInformation2Request;
|
|
1938
|
+
_options = providerName as base.WebApiRequestOptions;
|
|
1939
|
+
}
|
|
1940
|
+
else
|
|
1941
|
+
{
|
|
1942
|
+
_request = {
|
|
1943
|
+
storageType: storageType as string,
|
|
1944
|
+
providerName: providerName as string,
|
|
1945
|
+
storageKey: storageKey as string,
|
|
1946
|
+
restrictions: restrictions as string,
|
|
1947
|
+
staticColumns: staticColumns as string,
|
|
1948
|
+
};
|
|
1949
|
+
_options = webapi_options;
|
|
1950
|
+
}
|
|
1951
|
+
return this._saveRestrictionsAndGetCriteriaInformation2Async( _request, _options );
|
|
1952
|
+
}
|
|
1953
|
+
|
|
1954
|
+
|
|
1955
|
+
private async _findFromRestrictions2Async(request: carriers.Find_FindFromRestrictions2Request, options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
1956
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
1957
|
+
base.WebApiBase.SetPending(options);
|
|
1958
|
+
return new Promise< carriers.FindResults >(async (resolve, reject) => {
|
|
1959
|
+
try {
|
|
1960
|
+
config.baseURL = this._options.baseUrl;
|
|
1961
|
+
const response = await this._axios.post("FindFromRestrictions2", request , config);
|
|
1962
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
1963
|
+
const res : carriers.FindResults = converters.Create_FindResults_From( response.data );
|
|
1964
|
+
resolve(res);
|
|
1965
|
+
}
|
|
1966
|
+
catch( err ) {
|
|
1967
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
1968
|
+
reject(err);
|
|
1969
|
+
}
|
|
1970
|
+
});
|
|
1971
|
+
}
|
|
1972
|
+
|
|
1973
|
+
|
|
1974
|
+
|
|
1975
|
+
/**
|
|
1976
|
+
* Execute a Find operation and return a page of results. The criteria for the Find are passed in directly, not fetched by a restriction storage provider. The columns of the result are calculated based on the restriction.
|
|
1977
|
+
* @param request - Restrictions, ProviderName, PageSize, PageNumber
|
|
1978
|
+
* @returns Results from search, containing column information and result rows.
|
|
1979
|
+
*/
|
|
1980
|
+
public async findFromRestrictions2Async(request: carriers.Find_FindFromRestrictions2Request, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
1981
|
+
|
|
1982
|
+
/**
|
|
1983
|
+
* Execute a Find operation and return a page of results. The criteria for the Find are passed in directly, not fetched by a restriction storage provider. The columns of the result are calculated based on the restriction.
|
|
1984
|
+
* @param restrictions - String of restrictions specifying the search. e.g. "name='SuperOffice'" Each restriction must match a column of the given archive provider, and that column must have its CanRestrictBy property set to true.
|
|
1985
|
+
* @param providerName - Name of archive provider that is to execute the search and return the result columns/rows
|
|
1986
|
+
* @param pageSize - Size of result set pages
|
|
1987
|
+
* @param pageNumber - Result set page to return, 0 is the first page. When a call returns no rows, no further pages are available. Negative page numbers are interpreted as number of rows to skip.
|
|
1988
|
+
* @returns Results from search, containing column information and result rows.
|
|
1989
|
+
*/
|
|
1990
|
+
public async findFromRestrictions2Async(restrictions: string, providerName: string, pageSize: number, pageNumber: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
1991
|
+
|
|
1992
|
+
public async findFromRestrictions2Async(restrictions:string|carriers.Find_FindFromRestrictions2Request, providerName?:string|base.WebApiRequestOptions, pageSize?:number, pageNumber?:number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
1993
|
+
let _request : carriers.Find_FindFromRestrictions2Request = null;
|
|
1994
|
+
let _options : base.WebApiRequestOptions = null;
|
|
1995
|
+
const first : any = restrictions;
|
|
1996
|
+
if( typeof( first ) === "object" && first && ( typeof(first.restrictions)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.pageSize)!='undefined' || typeof(first.pageNumber)!='undefined' ) )
|
|
1997
|
+
{
|
|
1998
|
+
_request = restrictions as carriers.Find_FindFromRestrictions2Request;
|
|
1999
|
+
_options = providerName as base.WebApiRequestOptions;
|
|
2000
|
+
}
|
|
2001
|
+
else
|
|
2002
|
+
{
|
|
2003
|
+
_request = {
|
|
2004
|
+
restrictions: restrictions as string,
|
|
2005
|
+
providerName: providerName as string,
|
|
2006
|
+
pageSize: pageSize as number,
|
|
2007
|
+
pageNumber: pageNumber as number,
|
|
2008
|
+
};
|
|
2009
|
+
_options = webapi_options;
|
|
2010
|
+
}
|
|
2011
|
+
return this._findFromRestrictions2Async( _request, _options );
|
|
2012
|
+
}
|
|
2013
|
+
|
|
2014
|
+
|
|
2015
|
+
private async _findFromRestrictionsColumns2Async(request: carriers.Find_FindFromRestrictionsColumns2Request, options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
2016
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2017
|
+
base.WebApiBase.SetPending(options);
|
|
2018
|
+
return new Promise< carriers.FindResults >(async (resolve, reject) => {
|
|
2019
|
+
try {
|
|
2020
|
+
config.baseURL = this._options.baseUrl;
|
|
2021
|
+
const response = await this._axios.post("FindFromRestrictionsColumns2", request , config);
|
|
2022
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
2023
|
+
const res : carriers.FindResults = converters.Create_FindResults_From( response.data );
|
|
2024
|
+
resolve(res);
|
|
2025
|
+
}
|
|
2026
|
+
catch( err ) {
|
|
2027
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2028
|
+
reject(err);
|
|
2029
|
+
}
|
|
2030
|
+
});
|
|
2031
|
+
}
|
|
2032
|
+
|
|
2033
|
+
|
|
2034
|
+
|
|
2035
|
+
/**
|
|
2036
|
+
* Execute a Find operation and return a page of results. <para/>The criteria for the Find are passed in directly, not fetched by a restriction storage provider. <para/>The desired columns of the result set are also passed in directly.<para/>The orderby information is calculated by the system.<para/>Use the GetCriteriaInformation and GetDefaultDesiredColumns service methods to let the system calculate these values, if you want to use or modify them.
|
|
2037
|
+
* @param request - Restrictions, ProviderName, DesiredColumns, PageSize, PageNumber
|
|
2038
|
+
* @returns Results from search, containing column information and result rows.
|
|
2039
|
+
*/
|
|
2040
|
+
public async findFromRestrictionsColumns2Async(request: carriers.Find_FindFromRestrictionsColumns2Request, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
2041
|
+
|
|
2042
|
+
/**
|
|
2043
|
+
* Execute a Find operation and return a page of results. <para/>The criteria for the Find are passed in directly, not fetched by a restriction storage provider. <para/>The desired columns of the result set are also passed in directly.<para/>The orderby information is calculated by the system.<para/>Use the GetCriteriaInformation and GetDefaultDesiredColumns service methods to let the system calculate these values, if you want to use or modify them.
|
|
2044
|
+
* @param restrictions - String of restrictions specifying the search. e.g.:"name begins 'Super'". Each restriction must match a column of the given archive provider, and that column must have its CanRestrictBy property set to true.
|
|
2045
|
+
* @param providerName - Name of archive provider that is to execute the search and return the result columns/rows
|
|
2046
|
+
* @param desiredColumns - Array of column names desired for the result. Each name must match a column offered by the given archive provider.
|
|
2047
|
+
* @param pageSize - Size of result set pages
|
|
2048
|
+
* @param pageNumber - Result set page to return, 0 is the first page. When a call returns no rows, no further pages are available. Negative page numbers are interpreted as number of rows to skip.
|
|
2049
|
+
* @returns Results from search, containing column information and result rows.
|
|
2050
|
+
*/
|
|
2051
|
+
public async findFromRestrictionsColumns2Async(restrictions: string, providerName: string, desiredColumns: string, pageSize: number, pageNumber: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
2052
|
+
|
|
2053
|
+
public async findFromRestrictionsColumns2Async(restrictions:string|carriers.Find_FindFromRestrictionsColumns2Request, providerName?:string|base.WebApiRequestOptions, desiredColumns?:string, pageSize?:number, pageNumber?:number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
2054
|
+
let _request : carriers.Find_FindFromRestrictionsColumns2Request = null;
|
|
2055
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2056
|
+
const first : any = restrictions;
|
|
2057
|
+
if( typeof( first ) === "object" && first && ( typeof(first.restrictions)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.desiredColumns)!='undefined' || typeof(first.pageSize)!='undefined' || typeof(first.pageNumber)!='undefined' ) )
|
|
2058
|
+
{
|
|
2059
|
+
_request = restrictions as carriers.Find_FindFromRestrictionsColumns2Request;
|
|
2060
|
+
_options = providerName as base.WebApiRequestOptions;
|
|
2061
|
+
}
|
|
2062
|
+
else
|
|
2063
|
+
{
|
|
2064
|
+
_request = {
|
|
2065
|
+
restrictions: restrictions as string,
|
|
2066
|
+
providerName: providerName as string,
|
|
2067
|
+
desiredColumns: desiredColumns as string,
|
|
2068
|
+
pageSize: pageSize as number,
|
|
2069
|
+
pageNumber: pageNumber as number,
|
|
2070
|
+
};
|
|
2071
|
+
_options = webapi_options;
|
|
2072
|
+
}
|
|
2073
|
+
return this._findFromRestrictionsColumns2Async( _request, _options );
|
|
2074
|
+
}
|
|
2075
|
+
|
|
2076
|
+
|
|
2077
|
+
private async _findFromRestrictionsColumnsOrderBy2Async(request: carriers.Find_FindFromRestrictionsColumnsOrderBy2Request, options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
2078
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2079
|
+
base.WebApiBase.SetPending(options);
|
|
2080
|
+
return new Promise< carriers.FindResults >(async (resolve, reject) => {
|
|
2081
|
+
try {
|
|
2082
|
+
config.baseURL = this._options.baseUrl;
|
|
2083
|
+
const response = await this._axios.post("FindFromRestrictionsColumnsOrderBy2", request , config);
|
|
2084
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
2085
|
+
const res : carriers.FindResults = converters.Create_FindResults_From( response.data );
|
|
2086
|
+
resolve(res);
|
|
2087
|
+
}
|
|
2088
|
+
catch( err ) {
|
|
2089
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2090
|
+
reject(err);
|
|
2091
|
+
}
|
|
2092
|
+
});
|
|
2093
|
+
}
|
|
2094
|
+
|
|
2095
|
+
|
|
2096
|
+
|
|
2097
|
+
/**
|
|
2098
|
+
* Execute a Find operation and return a page of results. <para/>The criteria for the Find are passed in directly, not fetched by a restriction storage provider. <para/>The desired columns of the result set are also passed in directly.<para/>The orderby information is also passed in directly.<para/>Use the GetCriteriaInformation, GetDefaultDesiredColumns and GetDefaultOrderBy service methods to let the system calculate these values, if you want to use or modify them.
|
|
2099
|
+
* @param request - Restrictions, ProviderName, DesiredColumns, OrderBy, PageSize, PageNumber
|
|
2100
|
+
* @returns Results from search, containing column information and result rows.
|
|
2101
|
+
*/
|
|
2102
|
+
public async findFromRestrictionsColumnsOrderBy2Async(request: carriers.Find_FindFromRestrictionsColumnsOrderBy2Request, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
2103
|
+
|
|
2104
|
+
/**
|
|
2105
|
+
* Execute a Find operation and return a page of results. <para/>The criteria for the Find are passed in directly, not fetched by a restriction storage provider. <para/>The desired columns of the result set are also passed in directly.<para/>The orderby information is also passed in directly.<para/>Use the GetCriteriaInformation, GetDefaultDesiredColumns and GetDefaultOrderBy service methods to let the system calculate these values, if you want to use or modify them.
|
|
2106
|
+
* @param restrictions - String of restrictions specifying the search. Each restriction must match a column of the given archive provider, and that column must have its CanRestrictBy property set to true.
|
|
2107
|
+
* @param providerName - Name of archive provider that is to execute the search and return the result columns/rows
|
|
2108
|
+
* @param desiredColumns - Comma separated list of column names desired for the result. Each name must match a column offered by the given archive provider.
|
|
2109
|
+
* @param orderBy - String of order by specifications. If it is null or empty, the row order is unspecified, database dependent, and might not be the same from call to call, depending on query execution plans. The unspecified order willgenerally not vary within pages of the same query.
|
|
2110
|
+
* @param pageSize - Size of result set pages
|
|
2111
|
+
* @param pageNumber - Result set page to return, 0 is the first page. When a call returns no rows, no further pages are available. Negative page numbers are interpreted as number of rows to skip.
|
|
2112
|
+
* @returns Results from search, containing column information and result rows.
|
|
2113
|
+
*/
|
|
2114
|
+
public async findFromRestrictionsColumnsOrderBy2Async(restrictions: string, providerName: string, desiredColumns: string, orderBy: string, pageSize: number, pageNumber: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
2115
|
+
|
|
2116
|
+
public async findFromRestrictionsColumnsOrderBy2Async(restrictions:string|carriers.Find_FindFromRestrictionsColumnsOrderBy2Request, providerName?:string|base.WebApiRequestOptions, desiredColumns?:string, orderBy?:string, pageSize?:number, pageNumber?:number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
2117
|
+
let _request : carriers.Find_FindFromRestrictionsColumnsOrderBy2Request = null;
|
|
2118
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2119
|
+
const first : any = restrictions;
|
|
2120
|
+
if( typeof( first ) === "object" && first && ( typeof(first.restrictions)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.desiredColumns)!='undefined' || typeof(first.orderBy)!='undefined' || typeof(first.pageSize)!='undefined' || typeof(first.pageNumber)!='undefined' ) )
|
|
2121
|
+
{
|
|
2122
|
+
_request = restrictions as carriers.Find_FindFromRestrictionsColumnsOrderBy2Request;
|
|
2123
|
+
_options = providerName as base.WebApiRequestOptions;
|
|
2124
|
+
}
|
|
2125
|
+
else
|
|
2126
|
+
{
|
|
2127
|
+
_request = {
|
|
2128
|
+
restrictions: restrictions as string,
|
|
2129
|
+
providerName: providerName as string,
|
|
2130
|
+
desiredColumns: desiredColumns as string,
|
|
2131
|
+
orderBy: orderBy as string,
|
|
2132
|
+
pageSize: pageSize as number,
|
|
2133
|
+
pageNumber: pageNumber as number,
|
|
2134
|
+
};
|
|
2135
|
+
_options = webapi_options;
|
|
2136
|
+
}
|
|
2137
|
+
return this._findFromRestrictionsColumnsOrderBy2Async( _request, _options );
|
|
2138
|
+
}
|
|
2139
|
+
|
|
2140
|
+
|
|
2141
|
+
private async _getDefaultDesiredColumnsFromRestrictions2Async(request: carriers.Find_GetDefaultDesiredColumnsFromRestrictions2Request, options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveColumnInfo[] > {
|
|
2142
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2143
|
+
base.WebApiBase.SetPending(options);
|
|
2144
|
+
return new Promise< carriers.ArchiveColumnInfo[] >(async (resolve, reject) => {
|
|
2145
|
+
try {
|
|
2146
|
+
config.baseURL = this._options.baseUrl;
|
|
2147
|
+
const response = await this._axios.post("GetDefaultDesiredColumnsFromRestrictions2", request , config);
|
|
2148
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
2149
|
+
const res : carriers.ArchiveColumnInfo[] = converters.Create_ArchiveColumnInfoArray_From( response.data );
|
|
2150
|
+
resolve(res);
|
|
2151
|
+
}
|
|
2152
|
+
catch( err ) {
|
|
2153
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2154
|
+
reject(err);
|
|
2155
|
+
}
|
|
2156
|
+
});
|
|
2157
|
+
}
|
|
2158
|
+
|
|
2159
|
+
|
|
2160
|
+
|
|
2161
|
+
/**
|
|
2162
|
+
* Calculate the default desired columns, i.e., the result columns for a given search. The search is defined by a provider name and a set of restrictions. This is the algorithm that is used by the Find service method.
|
|
2163
|
+
* @param request - ProviderName, Restrictions
|
|
2164
|
+
* @returns Column information for the default desired columns, fully populated. Percentage-specified column widths sum to exactly 100.
|
|
2165
|
+
*/
|
|
2166
|
+
public async getDefaultDesiredColumnsFromRestrictions2Async(request: carriers.Find_GetDefaultDesiredColumnsFromRestrictions2Request, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveColumnInfo[] >;
|
|
2167
|
+
|
|
2168
|
+
/**
|
|
2169
|
+
* Calculate the default desired columns, i.e., the result columns for a given search. The search is defined by a provider name and a set of restrictions. This is the algorithm that is used by the Find service method.
|
|
2170
|
+
* @param providerName - Name of the provider to calculate default desired columns for
|
|
2171
|
+
* @param restrictions - Restriction to use in the calculation of default desired columns
|
|
2172
|
+
* @returns Column information for the default desired columns, fully populated. Percentage-specified column widths sum to exactly 100.
|
|
2173
|
+
*/
|
|
2174
|
+
public async getDefaultDesiredColumnsFromRestrictions2Async(providerName: string, restrictions: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveColumnInfo[] >;
|
|
2175
|
+
|
|
2176
|
+
public async getDefaultDesiredColumnsFromRestrictions2Async(providerName:string|carriers.Find_GetDefaultDesiredColumnsFromRestrictions2Request, restrictions?:string|base.WebApiRequestOptions, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.ArchiveColumnInfo[] > {
|
|
2177
|
+
let _request : carriers.Find_GetDefaultDesiredColumnsFromRestrictions2Request = null;
|
|
2178
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2179
|
+
const first : any = providerName;
|
|
2180
|
+
if( typeof( first ) === "object" && first && ( typeof(first.providerName)!='undefined' || typeof(first.restrictions)!='undefined' ) )
|
|
2181
|
+
{
|
|
2182
|
+
_request = providerName as carriers.Find_GetDefaultDesiredColumnsFromRestrictions2Request;
|
|
2183
|
+
_options = restrictions as base.WebApiRequestOptions;
|
|
2184
|
+
}
|
|
2185
|
+
else
|
|
2186
|
+
{
|
|
2187
|
+
_request = {
|
|
2188
|
+
providerName: providerName as string,
|
|
2189
|
+
restrictions: restrictions as string,
|
|
2190
|
+
};
|
|
2191
|
+
_options = webapi_options;
|
|
2192
|
+
}
|
|
2193
|
+
return this._getDefaultDesiredColumnsFromRestrictions2Async( _request, _options );
|
|
2194
|
+
}
|
|
2195
|
+
|
|
2196
|
+
|
|
2197
|
+
private async _findOrderBy2Async(request: carriers.Find_FindOrderBy2Request, options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
2198
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2199
|
+
base.WebApiBase.SetPending(options);
|
|
2200
|
+
return new Promise< carriers.FindResults >(async (resolve, reject) => {
|
|
2201
|
+
try {
|
|
2202
|
+
config.baseURL = this._options.baseUrl;
|
|
2203
|
+
const response = await this._axios.post("FindOrderBy2", request , config);
|
|
2204
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
2205
|
+
const res : carriers.FindResults = converters.Create_FindResults_From( response.data );
|
|
2206
|
+
resolve(res);
|
|
2207
|
+
}
|
|
2208
|
+
catch( err ) {
|
|
2209
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2210
|
+
reject(err);
|
|
2211
|
+
}
|
|
2212
|
+
});
|
|
2213
|
+
}
|
|
2214
|
+
|
|
2215
|
+
|
|
2216
|
+
|
|
2217
|
+
/**
|
|
2218
|
+
* Execute a Find operation and return a page of results. The criteria for the Find are fetched from the restriction storage provider according to the given parameters. The columns of the result are calculated based on the restriction. The orderby parameter is used for sorting the results.<para/>The other variants of the Find method allow you greater control over the individual aspects of the process.
|
|
2219
|
+
* @param request - StorageType, ProviderName, StorageKey, PageSize, PageNumber, OrderBy
|
|
2220
|
+
* @returns Results from search, containing column information and result rows.
|
|
2221
|
+
*/
|
|
2222
|
+
public async findOrderBy2Async(request: carriers.Find_FindOrderBy2Request, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
2223
|
+
|
|
2224
|
+
/**
|
|
2225
|
+
* Execute a Find operation and return a page of results. The criteria for the Find are fetched from the restriction storage provider according to the given parameters. The columns of the result are calculated based on the restriction. The orderby parameter is used for sorting the results.<para/>The other variants of the Find method allow you greater control over the individual aspects of the process.
|
|
2226
|
+
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
2227
|
+
* @param providerName - Name of archive provider that is to execute the search and return the result columns/rows
|
|
2228
|
+
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search
|
|
2229
|
+
* @param pageSize - Size of result set pages
|
|
2230
|
+
* @param pageNumber - Result set page to return, 0 is the first page. When a call returns no rows, no further pages are available. Negative page numbers are interpreted as number of rows to skip.
|
|
2231
|
+
* @param orderBy - Comma separated list of order by specifications. "name asc, dept desc" If it is null or empty, the row order is unspecified, database dependent, and might not be the same from call to call, depending on query execution plans. The unspecified order willgenerally not vary within pages of the same query.
|
|
2232
|
+
* @returns Results from search, containing column information and result rows.
|
|
2233
|
+
*/
|
|
2234
|
+
public async findOrderBy2Async(storageType: string, providerName: string, storageKey: string, pageSize: number, pageNumber: number, orderBy: string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
2235
|
+
|
|
2236
|
+
public async findOrderBy2Async(storageType:string|carriers.Find_FindOrderBy2Request, providerName?:string|base.WebApiRequestOptions, storageKey?:string, pageSize?:number, pageNumber?:number, orderBy?:string, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
2237
|
+
let _request : carriers.Find_FindOrderBy2Request = null;
|
|
2238
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2239
|
+
const first : any = storageType;
|
|
2240
|
+
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.pageSize)!='undefined' || typeof(first.pageNumber)!='undefined' || typeof(first.orderBy)!='undefined' ) )
|
|
2241
|
+
{
|
|
2242
|
+
_request = storageType as carriers.Find_FindOrderBy2Request;
|
|
2243
|
+
_options = providerName as base.WebApiRequestOptions;
|
|
2244
|
+
}
|
|
2245
|
+
else
|
|
2246
|
+
{
|
|
2247
|
+
_request = {
|
|
2248
|
+
storageType: storageType as string,
|
|
2249
|
+
providerName: providerName as string,
|
|
2250
|
+
storageKey: storageKey as string,
|
|
2251
|
+
pageSize: pageSize as number,
|
|
2252
|
+
pageNumber: pageNumber as number,
|
|
2253
|
+
orderBy: orderBy as string,
|
|
2254
|
+
};
|
|
2255
|
+
_options = webapi_options;
|
|
2256
|
+
}
|
|
2257
|
+
return this._findOrderBy2Async( _request, _options );
|
|
2258
|
+
}
|
|
2259
|
+
|
|
2260
|
+
|
|
2261
|
+
private async _findWithExtraRestrictions2Async(request: carriers.Find_FindWithExtraRestrictions2Request, options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
2262
|
+
const config : AxiosRequestConfig = base.WebApiBase.GetAxiosRequestConfig(options, this._options);
|
|
2263
|
+
base.WebApiBase.SetPending(options);
|
|
2264
|
+
return new Promise< carriers.FindResults >(async (resolve, reject) => {
|
|
2265
|
+
try {
|
|
2266
|
+
config.baseURL = this._options.baseUrl;
|
|
2267
|
+
const response = await this._axios.post("FindWithExtraRestrictions2", request , config);
|
|
2268
|
+
base.WebApiBase.SetCompleted(options, response);
|
|
2269
|
+
const res : carriers.FindResults = converters.Create_FindResults_From( response.data );
|
|
2270
|
+
resolve(res);
|
|
2271
|
+
}
|
|
2272
|
+
catch( err ) {
|
|
2273
|
+
base.WebApiBase.HandleError(options, config, err);
|
|
2274
|
+
reject(err);
|
|
2275
|
+
}
|
|
2276
|
+
});
|
|
2277
|
+
}
|
|
2278
|
+
|
|
2279
|
+
|
|
2280
|
+
|
|
2281
|
+
/**
|
|
2282
|
+
* Execute a Find operation and return a page of results. The criteria for the Find are fetched from the restriction storage provider according to the given parameters. In addition an extra set of restrictions can be added to the search. These restrictions will not be saved, they are only valid for the current search. Extra restrictions will override restrictions with the same key already stored on the storagekey.
|
|
2283
|
+
* @param request - StorageType, ProviderName, StorageKey, ExtraRestrictions, OrderBy, DesiredColumns, PageSize, PageNumber
|
|
2284
|
+
* @returns Results from search, containing column information and result rows.
|
|
2285
|
+
*/
|
|
2286
|
+
public async findWithExtraRestrictions2Async(request: carriers.Find_FindWithExtraRestrictions2Request, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
2287
|
+
|
|
2288
|
+
/**
|
|
2289
|
+
* Execute a Find operation and return a page of results. The criteria for the Find are fetched from the restriction storage provider according to the given parameters. In addition an extra set of restrictions can be added to the search. These restrictions will not be saved, they are only valid for the current search. Extra restrictions will override restrictions with the same key already stored on the storagekey.
|
|
2290
|
+
* @param storageType - Restriction storage type specification, either 'Criteria' or 'Reporter' (or possible extensions)
|
|
2291
|
+
* @param providerName - Name of archive provider that is to execute the search and return the result columns/rows
|
|
2292
|
+
* @param storageKey - Storage key to be interpreted by the restriction storage provider, when it fetches criteria for the search
|
|
2293
|
+
* @param extraRestrictions - Extra restrictions to append to the the search. These will override saved restrictions with the same key.
|
|
2294
|
+
* @param orderBy - Comma separated list of order by specifications. If it is null or empty, the row order is unspecified, database dependent, and might not be the same from call to call, depending on query execution plans. The unspecified order willgenerally not vary within pages of the same query.
|
|
2295
|
+
* @param desiredColumns - Comma separated list of column names desired for the result. Each name must match a column offered by the given archive provider.
|
|
2296
|
+
* @param pageSize - Size of result set pages
|
|
2297
|
+
* @param pageNumber - Result set page to return, 0 is the first page. When a call returns no rows, no further pages are available. Negative page numbers are interpreted as number of rows to skip.
|
|
2298
|
+
* @returns Results from search, containing column information and result rows.
|
|
2299
|
+
*/
|
|
2300
|
+
public async findWithExtraRestrictions2Async(storageType: string, providerName: string, storageKey: string, extraRestrictions: string, orderBy: string, desiredColumns: string, pageSize: number, pageNumber: number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults >;
|
|
2301
|
+
|
|
2302
|
+
public async findWithExtraRestrictions2Async(storageType:string|carriers.Find_FindWithExtraRestrictions2Request, providerName?:string|base.WebApiRequestOptions, storageKey?:string, extraRestrictions?:string, orderBy?:string, desiredColumns?:string, pageSize?:number, pageNumber?:number, webapi_options?:base.WebApiRequestOptions) : Promise< carriers.FindResults > {
|
|
2303
|
+
let _request : carriers.Find_FindWithExtraRestrictions2Request = null;
|
|
2304
|
+
let _options : base.WebApiRequestOptions = null;
|
|
2305
|
+
const first : any = storageType;
|
|
2306
|
+
if( typeof( first ) === "object" && first && ( typeof(first.storageType)!='undefined' || typeof(first.providerName)!='undefined' || typeof(first.storageKey)!='undefined' || typeof(first.extraRestrictions)!='undefined' || typeof(first.orderBy)!='undefined' || typeof(first.desiredColumns)!='undefined' || typeof(first.pageSize)!='undefined' || typeof(first.pageNumber)!='undefined' ) )
|
|
2307
|
+
{
|
|
2308
|
+
_request = storageType as carriers.Find_FindWithExtraRestrictions2Request;
|
|
2309
|
+
_options = providerName as base.WebApiRequestOptions;
|
|
2310
|
+
}
|
|
2311
|
+
else
|
|
2312
|
+
{
|
|
2313
|
+
_request = {
|
|
2314
|
+
storageType: storageType as string,
|
|
2315
|
+
providerName: providerName as string,
|
|
2316
|
+
storageKey: storageKey as string,
|
|
2317
|
+
extraRestrictions: extraRestrictions as string,
|
|
2318
|
+
orderBy: orderBy as string,
|
|
2319
|
+
desiredColumns: desiredColumns as string,
|
|
2320
|
+
pageSize: pageSize as number,
|
|
2321
|
+
pageNumber: pageNumber as number,
|
|
2322
|
+
};
|
|
2323
|
+
_options = webapi_options;
|
|
2324
|
+
}
|
|
2325
|
+
return this._findWithExtraRestrictions2Async( _request, _options );
|
|
2326
|
+
}
|
|
2327
|
+
|
|
2328
|
+
} // class v1FindAgentController
|
|
2329
|
+
|
|
2330
|
+
|