wallet 1.1.3 → 1.1.6
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/.openapi-generator/FILES +309 -309
- package/.openapi-generator-ignore +23 -23
- package/README.md +13 -1
- package/api/advertisementCreditsApi.ts +589 -589
- package/api/analyticsApi.ts +5953 -5953
- package/api/apis.ts +86 -86
- package/api/appleWalletSubscribersApi.ts +235 -235
- package/api/billingApi.ts +680 -680
- package/api/clubMembersPointsApi.ts +798 -798
- package/api/configurationApi.ts +225 -225
- package/api/countriesApi.ts +155 -155
- package/api/customerApi.ts +737 -737
- package/api/dashboardApi.ts +1553 -1553
- package/api/dynamicVouchersApi.ts +603 -603
- package/api/employeeAccessApi.ts +165 -165
- package/api/employeesApi.ts +2933 -2933
- package/api/industriesApi.ts +155 -155
- package/api/infoGenesisReportsApi.ts +2023 -2023
- package/api/integratedTerminalsApi.ts +447 -447
- package/api/interactionsApi.ts +678 -678
- package/api/linkBookApi.ts +447 -447
- package/api/linkBookSectionApi.ts +447 -447
- package/api/loginAndLogoutApi.ts +296 -296
- package/api/membershipTiersApi.ts +729 -729
- package/api/merchantApi.ts +1534 -1534
- package/api/merchantCreditsApi.ts +798 -798
- package/api/merchantURLsApi.ts +586 -586
- package/api/mobileTerminalApi.ts +323 -323
- package/api/newsApi.ts +447 -447
- package/api/paymentDesignsApi.ts +519 -519
- package/api/performancesApi.ts +447 -447
- package/api/promoCodesApi.ts +447 -447
- package/api/sMSApi.ts +1999 -1999
- package/api/settingsApi.ts +220 -220
- package/api/staticVoucherCampaignGroupsApi.ts +165 -165
- package/api/staticVoucherCampaignsApi.ts +1484 -1484
- package/api/staticVouchersApi.ts +535 -535
- package/api/systemApi.ts +604 -604
- package/api/transactionLedgerApi.ts +203 -203
- package/api/utilitiesApi.ts +157 -157
- package/api/webTerminalApi.ts +309 -309
- package/api.ts +2 -2
- package/examples/advertisementcredits.example.ts +50 -50
- package/examples/clubmembers.example.ts +50 -50
- package/examples/linkbook.example.ts +50 -50
- package/examples/membershiptiers.example.ts +49 -49
- package/examples/merchanturls.example.ts +47 -47
- package/examples/news.example.ts +51 -51
- package/examples/paymentdesigns.example.ts +56 -56
- package/git_push.sh +57 -57
- package/model/advertisementCredit.ts +103 -103
- package/model/advertisementCreditBroadcast.ts +154 -154
- package/model/advertisementCreditScan.ts +170 -170
- package/model/agreement.ts +133 -133
- package/model/alert.ts +79 -79
- package/model/announcement.ts +67 -67
- package/model/applicableTerminals.ts +30 -30
- package/model/applicableTerminalsAnyOf.ts +17 -17
- package/model/applicableTerminalsAnyOf1.ts +17 -17
- package/model/applicableTerminalsAnyOf2.ts +17 -17
- package/model/applicableTerminalsAnyOf3.ts +17 -17
- package/model/authError.ts +55 -55
- package/model/availablePhoneNumbersRequest.ts +43 -43
- package/model/clickFunnelAmount.ts +37 -37
- package/model/clickFunnelContact.ts +248 -248
- package/model/clickFunnelContactProfile.ts +235 -235
- package/model/clickFunnelEvent.ts +38 -38
- package/model/clickFunnelOriginalAmount.ts +37 -37
- package/model/clickFunnelProduct.ts +194 -194
- package/model/clickFunnelPurchase.ts +178 -178
- package/model/createStaticVoucherCampaign.ts +109 -109
- package/model/createStaticVoucherCampaignWithVoucher.ts +109 -109
- package/model/createStaticVoucherCampaignWithVoucherWithCSV.ts +109 -109
- package/model/dashboardWidget.ts +115 -115
- package/model/duplicateRowFound.ts +55 -55
- package/model/dynamicVoucher.ts +224 -224
- package/model/dynamicVoucherBroadcast.ts +154 -154
- package/model/employee.ts +109 -109
- package/model/employeeActivityLog.ts +67 -67
- package/model/employeeAlert.ts +79 -79
- package/model/exportDataFile.ts +85 -85
- package/model/falsumError.ts +41 -41
- package/model/falsumField.ts +55 -55
- package/model/feature.ts +79 -79
- package/model/forbiddenRequest.ts +55 -55
- package/model/foreignKeyDoesNotExist.ts +55 -55
- package/model/helpDeskRequest.ts +85 -85
- package/model/importedList.ts +73 -73
- package/model/importedListRecipient.ts +73 -73
- package/model/inlineObject.ts +31 -31
- package/model/inlineObject1.ts +31 -31
- package/model/inlineObject10.ts +37 -37
- package/model/inlineObject11.ts +37 -37
- package/model/inlineObject12.ts +37 -37
- package/model/inlineObject13.ts +37 -37
- package/model/inlineObject14.ts +37 -37
- package/model/inlineObject15.ts +67 -67
- package/model/inlineObject16.ts +61 -61
- package/model/inlineObject17.ts +55 -55
- package/model/inlineObject18.ts +61 -61
- package/model/inlineObject19.ts +55 -55
- package/model/inlineObject2.ts +31 -31
- package/model/inlineObject20.ts +61 -61
- package/model/inlineObject21.ts +73 -73
- package/model/inlineObject22.ts +31 -31
- package/model/inlineObject23.ts +31 -31
- package/model/inlineObject24.ts +43 -43
- package/model/inlineObject25.ts +55 -55
- package/model/inlineObject26.ts +31 -31
- package/model/inlineObject27.ts +31 -31
- package/model/inlineObject28.ts +43 -43
- package/model/inlineObject29.ts +49 -49
- package/model/inlineObject3.ts +31 -31
- package/model/inlineObject30.ts +43 -43
- package/model/inlineObject31.ts +31 -31
- package/model/inlineObject32.ts +31 -31
- package/model/inlineObject33.ts +31 -31
- package/model/inlineObject34.ts +43 -43
- package/model/inlineObject35.ts +43 -43
- package/model/inlineObject36.ts +43 -43
- package/model/inlineObject37.ts +43 -43
- package/model/inlineObject38.ts +43 -43
- package/model/inlineObject39.ts +43 -43
- package/model/inlineObject4.ts +37 -37
- package/model/inlineObject40.ts +43 -43
- package/model/inlineObject41.ts +43 -43
- package/model/inlineObject42.ts +43 -43
- package/model/inlineObject43.ts +43 -43
- package/model/inlineObject44.ts +43 -43
- package/model/inlineObject45.ts +43 -43
- package/model/inlineObject46.ts +43 -43
- package/model/inlineObject47.ts +43 -43
- package/model/inlineObject48.ts +43 -43
- package/model/inlineObject49.ts +43 -43
- package/model/inlineObject5.ts +31 -31
- package/model/inlineObject50.ts +43 -43
- package/model/inlineObject51.ts +97 -97
- package/model/inlineObject52.ts +31 -31
- package/model/inlineObject53.ts +97 -97
- package/model/inlineObject54.ts +97 -97
- package/model/inlineObject55.ts +91 -91
- package/model/inlineObject56.ts +37 -37
- package/model/inlineObject57.ts +37 -37
- package/model/inlineObject58.ts +37 -37
- package/model/inlineObject59.ts +43 -43
- package/model/inlineObject6.ts +31 -31
- package/model/inlineObject60.ts +43 -43
- package/model/inlineObject61.ts +43 -43
- package/model/inlineObject62.ts +37 -37
- package/model/inlineObject63.ts +37 -37
- package/model/inlineObject64.ts +37 -37
- package/model/inlineObject65.ts +205 -205
- package/model/inlineObject66.ts +49 -49
- package/model/inlineObject67.ts +49 -49
- package/model/inlineObject68.ts +37 -37
- package/model/inlineObject69.ts +121 -121
- package/model/inlineObject7.ts +31 -31
- package/model/inlineObject8.ts +43 -43
- package/model/inlineObject9.ts +37 -37
- package/model/inlineResponse200.ts +37 -37
- package/model/inlineResponse2001.ts +56 -56
- package/model/inlineResponse20010.ts +109 -109
- package/model/inlineResponse20011.ts +43 -43
- package/model/inlineResponse2002.ts +31 -31
- package/model/inlineResponse2003.ts +31 -31
- package/model/inlineResponse2004.ts +43 -43
- package/model/inlineResponse2005.ts +38 -38
- package/model/inlineResponse2006.ts +97 -97
- package/model/inlineResponse2007.ts +44 -44
- package/model/inlineResponse2008.ts +31 -31
- package/model/inlineResponse2009.ts +98 -98
- package/model/internalServerError.ts +55 -55
- package/model/ledgerEntry.ts +176 -176
- package/model/linkBook.ts +85 -85
- package/model/linkBookSection.ts +61 -61
- package/model/mSMemberHistory.ts +112 -112
- package/model/mSMemberHistoryPagination.ts +53 -53
- package/model/mSMemberRedemption.ts +109 -109
- package/model/mSMemberRedemptionPagination.ts +53 -53
- package/model/mSMembershipTierHistory.ts +106 -106
- package/model/mSMembershipTierHistoryPagination.ts +53 -53
- package/model/mSMembershipTierRedemption.ts +121 -121
- package/model/mSMembershipTierRedemptionPagination.ts +53 -53
- package/model/mSMerchantCreditHistory.ts +88 -88
- package/model/mSMerchantCreditHistoryPagination.ts +53 -53
- package/model/mSMerchantCreditRedemption.ts +109 -109
- package/model/mSMerchantCreditRedemptionPagination.ts +53 -53
- package/model/mediaFile.ts +85 -85
- package/model/member.ts +118 -118
- package/model/memberSearch.ts +61 -61
- package/model/merchant.ts +133 -133
- package/model/merchantCreditSearch.ts +61 -61
- package/model/merchantNotInitialized.ts +55 -55
- package/model/merchantURL.ts +67 -67
- package/model/message.ts +74 -74
- package/model/models.ts +1015 -1015
- package/model/moduleError.ts +157 -157
- package/model/newsArticle.ts +85 -85
- package/model/optInList.ts +121 -121
- package/model/optInListSource.ts +73 -73
- package/model/optInListSubscriber.ts +104 -104
- package/model/outboundSMS.ts +157 -157
- package/model/paginatedWTMembers.ts +53 -53
- package/model/paginatedWTMerchantCredits.ts +53 -53
- package/model/paginationRequestWithSortOptions.ts +75 -75
- package/model/paymentDesign.ts +139 -139
- package/model/performance.ts +100 -100
- package/model/phoneNumber.ts +157 -157
- package/model/pickCreateStaticVoucherCampaignWithVoucherExcludeKeyofcreateStaticVoucherCampaignWithVoucherSourceID.ts +106 -106
- package/model/pickMSMemberCreationParamsExcludeKeyofMSMemberCreationParamsMemberIdentifier.ts +67 -67
- package/model/pickMSMemberExcludeKeyofMSMemberMemberIdentifier.ts +106 -106
- package/model/pickMSMerchantCreditCreationParamsExcludeKeyofMSMerchantCreditCreationParamsMemberIdentifier.ts +43 -43
- package/model/pickMSMerchantCreditExcludeKeyofMSMerchantCreditMemberIdentifier.ts +82 -82
- package/model/pickPaginationRequestWithoutSortOptionsExcludeKeyofPaginationRequestWithoutSortOptionsIsArchiveIncluded.ts +46 -46
- package/model/pickSSImportedListUpdateParamsExcludeKeyofSSImportedListUpdateParamsId.ts +52 -52
- package/model/pickSSMobileNumberUpdateParamsExcludeKeyofSSMobileNumberUpdateParamsId.ts +100 -100
- package/model/pickSSOptInListCreateParamsExcludeKeyofSSOptInListCreateParamsEmployeeID.ts +94 -94
- package/model/pickSSOptInListUpdateParamsExcludeKeyofSSOptInListUpdateParamsId.ts +100 -100
- package/model/pickSSOptInSourceUpdateParamsExcludeKeyofSSOptInSourceUpdateParamsId.ts +46 -46
- package/model/pickSSOutboundMessageLogExcludeKeyofSSOutboundMessageLogToCellPhone.ts +154 -154
- package/model/pickVSAdvertisementCreditScanExcludeKeyofVSAdvertisementCreditScanRedeemedAtOrRefundedAt.ts +137 -137
- package/model/pickVSAdvertisementCreditUpdateParamsExcludeKeyofVSAdvertisementCreditUpdateParamsId.ts +58 -58
- package/model/pickVSCampaignUpdateParamsExcludeKeyofVSCampaignUpdateParamsStartDateOrExpirationDate.ts +106 -106
- package/model/pickVSDynamicVoucherExcludeKeyofVSDynamicVoucherTemporalDecreaseFrequencyType.ts +142 -142
- package/model/pickVSPaymentDesignCreateParamsExcludeKeyofVSPaymentDesignCreateParamsBackgroundImageURLOrCompanyLogoURLOrEmployeeID.ts +94 -94
- package/model/pickVSPaymentDesignUpdateParamsExcludeKeyofVSPaymentDesignUpdateParamsId.ts +106 -106
- package/model/pickVSStaticVoucherExcludeKeyofVSStaticVoucherRedeemedAtOrRefundedAtOrLastViewedAt.ts +167 -167
- package/model/pickWTAdvertisementCreditCreateParamsExcludeKeyofWTAdvertisementCreditCreateParamsEmployeeID.ts +58 -58
- package/model/pickWTEmployeeCreateExcludeKeyofWTEmployeeCreateEmail.ts +58 -58
- package/model/pickWTMemberMemberIDOrFirstNameOrLastNameOrMembershipTierIDOrPointsAccruedOrMobileNumber.ts +76 -76
- package/model/pickWTMerchantCreditMemberIDOrCreditAmountOrMobileNumber.ts +52 -52
- package/model/pickWTMerchantURLUpdateExcludeKeyofWTMerchantURLUpdateUrlID.ts +40 -40
- package/model/pickWTNewsArticleUpdateParamsExcludeKeyofWTNewsArticleUpdateParamsId.ts +58 -58
- package/model/pickWTPaymentObjectBroadcastExcludeKeyofWTPaymentObjectBroadcastListTypeOrListID.ts +138 -138
- package/model/pickWTStaticVoucherCampaignCreateParamsExcludeKeyofWTStaticVoucherCampaignCreateParamsStartDateTimeOrExpirationDateTime.ts +112 -112
- package/model/pickWTStaticVoucherCreateParamsExcludeKeyofWTStaticVoucherCreateParamsCampaignID.ts +46 -46
- package/model/plan.ts +62 -62
- package/model/portalPage.ts +67 -67
- package/model/presignedPost.ts +41 -41
- package/model/presignedPostFields.ts +43 -43
- package/model/product.ts +74 -74
- package/model/promoCode.ts +97 -97
- package/model/reachPerformanceStats.ts +70 -70
- package/model/request.ts +349 -349
- package/model/response.ts +67 -67
- package/model/role.ts +117 -117
- package/model/roleAuditLog.ts +97 -97
- package/model/sSOptInSource.ts +73 -73
- package/model/simpleSMSBroadcast.ts +147 -147
- package/model/staticVoucher.ts +224 -224
- package/model/staticVoucherCampaign.ts +175 -175
- package/model/staticVoucherCampaignBroadcast.ts +142 -142
- package/model/staticVoucherCampaignGroup.ts +85 -85
- package/model/staticVoucherCampaignUpdate.ts +85 -85
- package/model/status.ts +30 -30
- package/model/statusAnyOf.ts +17 -17
- package/model/statusAnyOf1.ts +17 -17
- package/model/statusAnyOf2.ts +17 -17
- package/model/statusAnyOf3.ts +17 -17
- package/model/subscriptionFeature.ts +79 -79
- package/model/subscriptionPlan.ts +69 -69
- package/model/subscriptionProduct.ts +81 -81
- package/model/tcpa.ts +67 -67
- package/model/updateStaticVoucherCampaignWithVoucher.ts +109 -109
- package/model/vSCampaignGeneratedMessage.ts +43 -43
- package/model/vSCampaignGeneratedMessagePagination.ts +53 -53
- package/model/vSDynamicVoucherStatus.ts +28 -28
- package/model/wTAdvertisementCredit.ts +103 -103
- package/model/wTAdvertisementCreditScan.ts +170 -170
- package/model/wTAdvertisementCreditUpdateParams.ts +55 -55
- package/model/wTDynamicVoucher.ts +224 -224
- package/model/wTDynamicVoucherCreateParams.ts +103 -103
- package/model/wTDynamicVoucherRedemption.ts +164 -164
- package/model/wTDynamicVoucherSummary.ts +169 -169
- package/model/wTDynamicVoucherUpdateParams.ts +103 -103
- package/model/wTEmployee.ts +109 -109
- package/model/wTEmployeeCreate.ts +61 -61
- package/model/wTEmployeeUpdate.ts +55 -55
- package/model/wTImportedList.ts +73 -73
- package/model/wTLinkBookCreateParams.ts +55 -55
- package/model/wTLinkBookSectionCreateParams.ts +31 -31
- package/model/wTLinkBookSectionUpdateParams.ts +31 -31
- package/model/wTLinkBookUpdateParams.ts +55 -55
- package/model/wTMember.ts +118 -118
- package/model/wTMemberCreationParams.ts +73 -73
- package/model/wTMembershipTier.ts +106 -106
- package/model/wTMembershipTierCreationParams.ts +64 -64
- package/model/wTMembershipTierUpdateParams.ts +64 -64
- package/model/wTMembershipTierWithMemberCount.ts +115 -115
- package/model/wTMerchantCredit.ts +106 -106
- package/model/wTMerchantCreditCreationParams.ts +49 -49
- package/model/wTMerchantURLCreate.ts +37 -37
- package/model/wTMerchantURLUpdate.ts +37 -37
- package/model/wTNewsArticleCreateParams.ts +55 -55
- package/model/wTNewsArticleUpdateParams.ts +55 -55
- package/model/wTOptInList.ts +121 -121
- package/model/wTOptInListCreationParams.ts +91 -91
- package/model/wTPaymentDesign.ts +139 -139
- package/model/wTPaymentDesignCreateParams.ts +115 -115
- package/model/wTPaymentDesignUpdateParams.ts +115 -115
- package/model/wTPerformanceCreateParams.ts +70 -70
- package/model/wTPerformanceUpdateParams.ts +70 -70
- package/model/wTPosMachine.ts +88 -88
- package/model/wTPosMachineCreateParams.ts +58 -58
- package/model/wTPosMachineUpdateParams.ts +58 -58
- package/model/wTPromoCodeCreateParams.ts +67 -67
- package/model/wTPromoCodeUpdateParams.ts +67 -67
- package/model/wTRole.ts +116 -116
- package/model/wTStaticVoucher.ts +224 -224
- package/model/wTStaticVoucherCampaign.ts +175 -175
- package/model/wTStaticVoucherCreateParams.ts +49 -49
- package/model/wTStaticVoucherUpdateParams.ts +43 -43
- package/model/wTWalletPageView.ts +251 -251
- package/model/wTWalletPageViewGeoPoint.ts +37 -37
- package/model/walletPageView.ts +251 -251
- package/model/webpage.ts +85 -85
- package/package.json +1 -26
- package/readme-generator.py +54 -42
- package/tsconfig.json +25 -25
package/api/systemApi.ts
CHANGED
|
@@ -1,604 +1,604 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* wallet-api
|
|
3
|
-
* API
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 1.1.
|
|
6
|
-
* Contact: development@wallet.inc
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
import localVarRequest from 'request';
|
|
15
|
-
import http from 'http';
|
|
16
|
-
|
|
17
|
-
/* tslint:disable:no-unused-locals */
|
|
18
|
-
import { AuthError } from '../model/authError';
|
|
19
|
-
import { Employee } from '../model/employee';
|
|
20
|
-
import { FalsumError } from '../model/falsumError';
|
|
21
|
-
import { InlineObject63 } from '../model/inlineObject63';
|
|
22
|
-
import { InlineObject64 } from '../model/inlineObject64';
|
|
23
|
-
import { InternalServerError } from '../model/internalServerError';
|
|
24
|
-
import { Role } from '../model/role';
|
|
25
|
-
import { RoleAuditLog } from '../model/roleAuditLog';
|
|
26
|
-
import { WTRole } from '../model/wTRole';
|
|
27
|
-
import { Webpage } from '../model/webpage';
|
|
28
|
-
|
|
29
|
-
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
|
30
|
-
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
|
31
|
-
|
|
32
|
-
import { HttpError, RequestFile } from './apis';
|
|
33
|
-
|
|
34
|
-
let defaultBasePath = 'https://api.wall.et';
|
|
35
|
-
|
|
36
|
-
// ===============================================
|
|
37
|
-
// This file is autogenerated - Please do not edit
|
|
38
|
-
// ===============================================
|
|
39
|
-
|
|
40
|
-
export enum SystemApiApiKeys {
|
|
41
|
-
api_key,
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export class SystemApi {
|
|
45
|
-
protected _basePath = defaultBasePath;
|
|
46
|
-
protected _defaultHeaders : any = {};
|
|
47
|
-
protected _useQuerystring : boolean = false;
|
|
48
|
-
|
|
49
|
-
protected authentications = {
|
|
50
|
-
'default': <Authentication>new VoidAuth(),
|
|
51
|
-
'api_key': new ApiKeyAuth('header', 'access-token'),
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
protected interceptors: Interceptor[] = [];
|
|
55
|
-
|
|
56
|
-
constructor(basePath?: string);
|
|
57
|
-
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
|
58
|
-
if (password) {
|
|
59
|
-
if (basePath) {
|
|
60
|
-
this.basePath = basePath;
|
|
61
|
-
}
|
|
62
|
-
} else {
|
|
63
|
-
if (basePathOrUsername) {
|
|
64
|
-
this.basePath = basePathOrUsername
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
set useQuerystring(value: boolean) {
|
|
70
|
-
this._useQuerystring = value;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
set basePath(basePath: string) {
|
|
74
|
-
this._basePath = basePath;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
set defaultHeaders(defaultHeaders: any) {
|
|
78
|
-
this._defaultHeaders = defaultHeaders;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
get defaultHeaders() {
|
|
82
|
-
return this._defaultHeaders;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
get basePath() {
|
|
86
|
-
return this._basePath;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
public setDefaultAuthentication(auth: Authentication) {
|
|
90
|
-
this.authentications.default = auth;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
public setApiKey(key: SystemApiApiKeys, value: string) {
|
|
94
|
-
(this.authentications as any)[SystemApiApiKeys[key]].apiKey = value;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
public addInterceptor(interceptor: Interceptor) {
|
|
98
|
-
this.interceptors.push(interceptor);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
*
|
|
103
|
-
* @summary Create role
|
|
104
|
-
* @param inlineObject64
|
|
105
|
-
*/
|
|
106
|
-
public async createRole (inlineObject64: InlineObject64, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Role; }> {
|
|
107
|
-
const localVarPath = this.basePath + '/v1/system/roles';
|
|
108
|
-
let localVarQueryParameters: any = {};
|
|
109
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
110
|
-
const produces = ['application/json'];
|
|
111
|
-
// give precedence to 'application/json'
|
|
112
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
113
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
114
|
-
} else {
|
|
115
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
116
|
-
}
|
|
117
|
-
let localVarFormParams: any = {};
|
|
118
|
-
|
|
119
|
-
// verify required parameter 'inlineObject64' is not null or undefined
|
|
120
|
-
if (inlineObject64 === null || inlineObject64 === undefined) {
|
|
121
|
-
throw new Error('Required parameter inlineObject64 was null or undefined when calling createRole.');
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
125
|
-
|
|
126
|
-
let localVarUseFormData = false;
|
|
127
|
-
|
|
128
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
129
|
-
method: 'POST',
|
|
130
|
-
qs: localVarQueryParameters,
|
|
131
|
-
headers: localVarHeaderParams,
|
|
132
|
-
uri: localVarPath,
|
|
133
|
-
useQuerystring: this._useQuerystring,
|
|
134
|
-
json: true,
|
|
135
|
-
body: ObjectSerializer.serialize(inlineObject64, "InlineObject64")
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
let authenticationPromise = Promise.resolve();
|
|
139
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
140
|
-
|
|
141
|
-
let interceptorPromise = authenticationPromise;
|
|
142
|
-
for (const interceptor of this.interceptors) {
|
|
143
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
return interceptorPromise.then(() => {
|
|
147
|
-
if (Object.keys(localVarFormParams).length) {
|
|
148
|
-
if (localVarUseFormData) {
|
|
149
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
150
|
-
} else {
|
|
151
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
return new Promise<{ response: http.IncomingMessage; body: Role; }>((resolve, reject) => {
|
|
155
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
156
|
-
if (error) {
|
|
157
|
-
reject(error);
|
|
158
|
-
} else {
|
|
159
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
160
|
-
body = ObjectSerializer.deserialize(body, "Role");
|
|
161
|
-
resolve({ response: response, body: body });
|
|
162
|
-
} else {
|
|
163
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
});
|
|
167
|
-
});
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
*
|
|
172
|
-
* @summary Delete role
|
|
173
|
-
* @param roleID
|
|
174
|
-
*/
|
|
175
|
-
public async deleteRole (roleID: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: boolean; }> {
|
|
176
|
-
const localVarPath = this.basePath + '/v1/system/roles/{roleID}'
|
|
177
|
-
.replace('{' + 'roleID' + '}', encodeURIComponent(String(roleID)));
|
|
178
|
-
let localVarQueryParameters: any = {};
|
|
179
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
180
|
-
const produces = ['application/json'];
|
|
181
|
-
// give precedence to 'application/json'
|
|
182
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
183
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
184
|
-
} else {
|
|
185
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
186
|
-
}
|
|
187
|
-
let localVarFormParams: any = {};
|
|
188
|
-
|
|
189
|
-
// verify required parameter 'roleID' is not null or undefined
|
|
190
|
-
if (roleID === null || roleID === undefined) {
|
|
191
|
-
throw new Error('Required parameter roleID was null or undefined when calling deleteRole.');
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
195
|
-
|
|
196
|
-
let localVarUseFormData = false;
|
|
197
|
-
|
|
198
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
199
|
-
method: 'DELETE',
|
|
200
|
-
qs: localVarQueryParameters,
|
|
201
|
-
headers: localVarHeaderParams,
|
|
202
|
-
uri: localVarPath,
|
|
203
|
-
useQuerystring: this._useQuerystring,
|
|
204
|
-
json: true,
|
|
205
|
-
};
|
|
206
|
-
|
|
207
|
-
let authenticationPromise = Promise.resolve();
|
|
208
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
209
|
-
|
|
210
|
-
let interceptorPromise = authenticationPromise;
|
|
211
|
-
for (const interceptor of this.interceptors) {
|
|
212
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
return interceptorPromise.then(() => {
|
|
216
|
-
if (Object.keys(localVarFormParams).length) {
|
|
217
|
-
if (localVarUseFormData) {
|
|
218
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
219
|
-
} else {
|
|
220
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
return new Promise<{ response: http.IncomingMessage; body: boolean; }>((resolve, reject) => {
|
|
224
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
225
|
-
if (error) {
|
|
226
|
-
reject(error);
|
|
227
|
-
} else {
|
|
228
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
229
|
-
body = ObjectSerializer.deserialize(body, "boolean");
|
|
230
|
-
resolve({ response: response, body: body });
|
|
231
|
-
} else {
|
|
232
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
});
|
|
236
|
-
});
|
|
237
|
-
});
|
|
238
|
-
}
|
|
239
|
-
/**
|
|
240
|
-
*
|
|
241
|
-
* @summary Fetch role\'s audit log
|
|
242
|
-
* @param startDateTime
|
|
243
|
-
* @param endDateTime
|
|
244
|
-
*/
|
|
245
|
-
public async fetchAuditLogOfRoles (startDateTime: Date, endDateTime: Date, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<RoleAuditLog>; }> {
|
|
246
|
-
const localVarPath = this.basePath + '/v1/system/roles/auditLog';
|
|
247
|
-
let localVarQueryParameters: any = {};
|
|
248
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
249
|
-
const produces = ['application/json'];
|
|
250
|
-
// give precedence to 'application/json'
|
|
251
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
252
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
253
|
-
} else {
|
|
254
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
255
|
-
}
|
|
256
|
-
let localVarFormParams: any = {};
|
|
257
|
-
|
|
258
|
-
// verify required parameter 'startDateTime' is not null or undefined
|
|
259
|
-
if (startDateTime === null || startDateTime === undefined) {
|
|
260
|
-
throw new Error('Required parameter startDateTime was null or undefined when calling fetchAuditLogOfRoles.');
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
// verify required parameter 'endDateTime' is not null or undefined
|
|
264
|
-
if (endDateTime === null || endDateTime === undefined) {
|
|
265
|
-
throw new Error('Required parameter endDateTime was null or undefined when calling fetchAuditLogOfRoles.');
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
if (startDateTime !== undefined) {
|
|
269
|
-
localVarQueryParameters['startDateTime'] = ObjectSerializer.serialize(startDateTime, "Date");
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
if (endDateTime !== undefined) {
|
|
273
|
-
localVarQueryParameters['endDateTime'] = ObjectSerializer.serialize(endDateTime, "Date");
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
277
|
-
|
|
278
|
-
let localVarUseFormData = false;
|
|
279
|
-
|
|
280
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
281
|
-
method: 'GET',
|
|
282
|
-
qs: localVarQueryParameters,
|
|
283
|
-
headers: localVarHeaderParams,
|
|
284
|
-
uri: localVarPath,
|
|
285
|
-
useQuerystring: this._useQuerystring,
|
|
286
|
-
json: true,
|
|
287
|
-
};
|
|
288
|
-
|
|
289
|
-
let authenticationPromise = Promise.resolve();
|
|
290
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
291
|
-
|
|
292
|
-
let interceptorPromise = authenticationPromise;
|
|
293
|
-
for (const interceptor of this.interceptors) {
|
|
294
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
return interceptorPromise.then(() => {
|
|
298
|
-
if (Object.keys(localVarFormParams).length) {
|
|
299
|
-
if (localVarUseFormData) {
|
|
300
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
301
|
-
} else {
|
|
302
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
return new Promise<{ response: http.IncomingMessage; body: Array<RoleAuditLog>; }>((resolve, reject) => {
|
|
306
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
307
|
-
if (error) {
|
|
308
|
-
reject(error);
|
|
309
|
-
} else {
|
|
310
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
311
|
-
body = ObjectSerializer.deserialize(body, "Array<RoleAuditLog>");
|
|
312
|
-
resolve({ response: response, body: body });
|
|
313
|
-
} else {
|
|
314
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
});
|
|
318
|
-
});
|
|
319
|
-
});
|
|
320
|
-
}
|
|
321
|
-
/**
|
|
322
|
-
*
|
|
323
|
-
* @summary Fetch employees with role
|
|
324
|
-
* @param roleID
|
|
325
|
-
*/
|
|
326
|
-
public async fetchEmployeesWithRole (roleID: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<Employee>; }> {
|
|
327
|
-
const localVarPath = this.basePath + '/v1/system/roles/employees/{roleID}'
|
|
328
|
-
.replace('{' + 'roleID' + '}', encodeURIComponent(String(roleID)));
|
|
329
|
-
let localVarQueryParameters: any = {};
|
|
330
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
331
|
-
const produces = ['application/json'];
|
|
332
|
-
// give precedence to 'application/json'
|
|
333
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
334
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
335
|
-
} else {
|
|
336
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
337
|
-
}
|
|
338
|
-
let localVarFormParams: any = {};
|
|
339
|
-
|
|
340
|
-
// verify required parameter 'roleID' is not null or undefined
|
|
341
|
-
if (roleID === null || roleID === undefined) {
|
|
342
|
-
throw new Error('Required parameter roleID was null or undefined when calling fetchEmployeesWithRole.');
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
346
|
-
|
|
347
|
-
let localVarUseFormData = false;
|
|
348
|
-
|
|
349
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
350
|
-
method: 'GET',
|
|
351
|
-
qs: localVarQueryParameters,
|
|
352
|
-
headers: localVarHeaderParams,
|
|
353
|
-
uri: localVarPath,
|
|
354
|
-
useQuerystring: this._useQuerystring,
|
|
355
|
-
json: true,
|
|
356
|
-
};
|
|
357
|
-
|
|
358
|
-
let authenticationPromise = Promise.resolve();
|
|
359
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
360
|
-
|
|
361
|
-
let interceptorPromise = authenticationPromise;
|
|
362
|
-
for (const interceptor of this.interceptors) {
|
|
363
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
return interceptorPromise.then(() => {
|
|
367
|
-
if (Object.keys(localVarFormParams).length) {
|
|
368
|
-
if (localVarUseFormData) {
|
|
369
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
370
|
-
} else {
|
|
371
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
return new Promise<{ response: http.IncomingMessage; body: Array<Employee>; }>((resolve, reject) => {
|
|
375
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
376
|
-
if (error) {
|
|
377
|
-
reject(error);
|
|
378
|
-
} else {
|
|
379
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
380
|
-
body = ObjectSerializer.deserialize(body, "Array<Employee>");
|
|
381
|
-
resolve({ response: response, body: body });
|
|
382
|
-
} else {
|
|
383
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
});
|
|
387
|
-
});
|
|
388
|
-
});
|
|
389
|
-
}
|
|
390
|
-
/**
|
|
391
|
-
*
|
|
392
|
-
* @summary Fetch webpages for role
|
|
393
|
-
* @param roleID
|
|
394
|
-
*/
|
|
395
|
-
public async fetchWebpagesForRole (roleID: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<Webpage>; }> {
|
|
396
|
-
const localVarPath = this.basePath + '/v1/system/roles/webpages/{roleID}'
|
|
397
|
-
.replace('{' + 'roleID' + '}', encodeURIComponent(String(roleID)));
|
|
398
|
-
let localVarQueryParameters: any = {};
|
|
399
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
400
|
-
const produces = ['application/json'];
|
|
401
|
-
// give precedence to 'application/json'
|
|
402
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
403
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
404
|
-
} else {
|
|
405
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
406
|
-
}
|
|
407
|
-
let localVarFormParams: any = {};
|
|
408
|
-
|
|
409
|
-
// verify required parameter 'roleID' is not null or undefined
|
|
410
|
-
if (roleID === null || roleID === undefined) {
|
|
411
|
-
throw new Error('Required parameter roleID was null or undefined when calling fetchWebpagesForRole.');
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
415
|
-
|
|
416
|
-
let localVarUseFormData = false;
|
|
417
|
-
|
|
418
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
419
|
-
method: 'GET',
|
|
420
|
-
qs: localVarQueryParameters,
|
|
421
|
-
headers: localVarHeaderParams,
|
|
422
|
-
uri: localVarPath,
|
|
423
|
-
useQuerystring: this._useQuerystring,
|
|
424
|
-
json: true,
|
|
425
|
-
};
|
|
426
|
-
|
|
427
|
-
let authenticationPromise = Promise.resolve();
|
|
428
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
429
|
-
|
|
430
|
-
let interceptorPromise = authenticationPromise;
|
|
431
|
-
for (const interceptor of this.interceptors) {
|
|
432
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
return interceptorPromise.then(() => {
|
|
436
|
-
if (Object.keys(localVarFormParams).length) {
|
|
437
|
-
if (localVarUseFormData) {
|
|
438
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
439
|
-
} else {
|
|
440
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
return new Promise<{ response: http.IncomingMessage; body: Array<Webpage>; }>((resolve, reject) => {
|
|
444
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
445
|
-
if (error) {
|
|
446
|
-
reject(error);
|
|
447
|
-
} else {
|
|
448
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
449
|
-
body = ObjectSerializer.deserialize(body, "Array<Webpage>");
|
|
450
|
-
resolve({ response: response, body: body });
|
|
451
|
-
} else {
|
|
452
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
});
|
|
456
|
-
});
|
|
457
|
-
});
|
|
458
|
-
}
|
|
459
|
-
/**
|
|
460
|
-
*
|
|
461
|
-
* @summary Fetch role
|
|
462
|
-
* @param roleID
|
|
463
|
-
*/
|
|
464
|
-
public async loadRole (roleID: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: WTRole; }> {
|
|
465
|
-
const localVarPath = this.basePath + '/v1/system/roles/{roleID}'
|
|
466
|
-
.replace('{' + 'roleID' + '}', encodeURIComponent(String(roleID)));
|
|
467
|
-
let localVarQueryParameters: any = {};
|
|
468
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
469
|
-
const produces = ['application/json'];
|
|
470
|
-
// give precedence to 'application/json'
|
|
471
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
472
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
473
|
-
} else {
|
|
474
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
475
|
-
}
|
|
476
|
-
let localVarFormParams: any = {};
|
|
477
|
-
|
|
478
|
-
// verify required parameter 'roleID' is not null or undefined
|
|
479
|
-
if (roleID === null || roleID === undefined) {
|
|
480
|
-
throw new Error('Required parameter roleID was null or undefined when calling loadRole.');
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
484
|
-
|
|
485
|
-
let localVarUseFormData = false;
|
|
486
|
-
|
|
487
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
488
|
-
method: 'GET',
|
|
489
|
-
qs: localVarQueryParameters,
|
|
490
|
-
headers: localVarHeaderParams,
|
|
491
|
-
uri: localVarPath,
|
|
492
|
-
useQuerystring: this._useQuerystring,
|
|
493
|
-
json: true,
|
|
494
|
-
};
|
|
495
|
-
|
|
496
|
-
let authenticationPromise = Promise.resolve();
|
|
497
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
498
|
-
|
|
499
|
-
let interceptorPromise = authenticationPromise;
|
|
500
|
-
for (const interceptor of this.interceptors) {
|
|
501
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
return interceptorPromise.then(() => {
|
|
505
|
-
if (Object.keys(localVarFormParams).length) {
|
|
506
|
-
if (localVarUseFormData) {
|
|
507
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
508
|
-
} else {
|
|
509
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
510
|
-
}
|
|
511
|
-
}
|
|
512
|
-
return new Promise<{ response: http.IncomingMessage; body: WTRole; }>((resolve, reject) => {
|
|
513
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
514
|
-
if (error) {
|
|
515
|
-
reject(error);
|
|
516
|
-
} else {
|
|
517
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
518
|
-
body = ObjectSerializer.deserialize(body, "WTRole");
|
|
519
|
-
resolve({ response: response, body: body });
|
|
520
|
-
} else {
|
|
521
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
});
|
|
525
|
-
});
|
|
526
|
-
});
|
|
527
|
-
}
|
|
528
|
-
/**
|
|
529
|
-
*
|
|
530
|
-
* @summary Update role
|
|
531
|
-
* @param roleID
|
|
532
|
-
* @param inlineObject63
|
|
533
|
-
*/
|
|
534
|
-
public async saveRole (roleID: string, inlineObject63: InlineObject63, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Role; }> {
|
|
535
|
-
const localVarPath = this.basePath + '/v1/system/roles/{roleID}'
|
|
536
|
-
.replace('{' + 'roleID' + '}', encodeURIComponent(String(roleID)));
|
|
537
|
-
let localVarQueryParameters: any = {};
|
|
538
|
-
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
539
|
-
const produces = ['application/json'];
|
|
540
|
-
// give precedence to 'application/json'
|
|
541
|
-
if (produces.indexOf('application/json') >= 0) {
|
|
542
|
-
localVarHeaderParams.Accept = 'application/json';
|
|
543
|
-
} else {
|
|
544
|
-
localVarHeaderParams.Accept = produces.join(',');
|
|
545
|
-
}
|
|
546
|
-
let localVarFormParams: any = {};
|
|
547
|
-
|
|
548
|
-
// verify required parameter 'roleID' is not null or undefined
|
|
549
|
-
if (roleID === null || roleID === undefined) {
|
|
550
|
-
throw new Error('Required parameter roleID was null or undefined when calling saveRole.');
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
// verify required parameter 'inlineObject63' is not null or undefined
|
|
554
|
-
if (inlineObject63 === null || inlineObject63 === undefined) {
|
|
555
|
-
throw new Error('Required parameter inlineObject63 was null or undefined when calling saveRole.');
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
559
|
-
|
|
560
|
-
let localVarUseFormData = false;
|
|
561
|
-
|
|
562
|
-
let localVarRequestOptions: localVarRequest.Options = {
|
|
563
|
-
method: 'PUT',
|
|
564
|
-
qs: localVarQueryParameters,
|
|
565
|
-
headers: localVarHeaderParams,
|
|
566
|
-
uri: localVarPath,
|
|
567
|
-
useQuerystring: this._useQuerystring,
|
|
568
|
-
json: true,
|
|
569
|
-
body: ObjectSerializer.serialize(inlineObject63, "InlineObject63")
|
|
570
|
-
};
|
|
571
|
-
|
|
572
|
-
let authenticationPromise = Promise.resolve();
|
|
573
|
-
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
574
|
-
|
|
575
|
-
let interceptorPromise = authenticationPromise;
|
|
576
|
-
for (const interceptor of this.interceptors) {
|
|
577
|
-
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
return interceptorPromise.then(() => {
|
|
581
|
-
if (Object.keys(localVarFormParams).length) {
|
|
582
|
-
if (localVarUseFormData) {
|
|
583
|
-
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
584
|
-
} else {
|
|
585
|
-
localVarRequestOptions.form = localVarFormParams;
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
return new Promise<{ response: http.IncomingMessage; body: Role; }>((resolve, reject) => {
|
|
589
|
-
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
590
|
-
if (error) {
|
|
591
|
-
reject(error);
|
|
592
|
-
} else {
|
|
593
|
-
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
594
|
-
body = ObjectSerializer.deserialize(body, "Role");
|
|
595
|
-
resolve({ response: response, body: body });
|
|
596
|
-
} else {
|
|
597
|
-
reject(new HttpError(response, body, response.statusCode));
|
|
598
|
-
}
|
|
599
|
-
}
|
|
600
|
-
});
|
|
601
|
-
});
|
|
602
|
-
});
|
|
603
|
-
}
|
|
604
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* wallet-api
|
|
3
|
+
* API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.1.6
|
|
6
|
+
* Contact: development@wallet.inc
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
import localVarRequest from 'request';
|
|
15
|
+
import http from 'http';
|
|
16
|
+
|
|
17
|
+
/* tslint:disable:no-unused-locals */
|
|
18
|
+
import { AuthError } from '../model/authError';
|
|
19
|
+
import { Employee } from '../model/employee';
|
|
20
|
+
import { FalsumError } from '../model/falsumError';
|
|
21
|
+
import { InlineObject63 } from '../model/inlineObject63';
|
|
22
|
+
import { InlineObject64 } from '../model/inlineObject64';
|
|
23
|
+
import { InternalServerError } from '../model/internalServerError';
|
|
24
|
+
import { Role } from '../model/role';
|
|
25
|
+
import { RoleAuditLog } from '../model/roleAuditLog';
|
|
26
|
+
import { WTRole } from '../model/wTRole';
|
|
27
|
+
import { Webpage } from '../model/webpage';
|
|
28
|
+
|
|
29
|
+
import { ObjectSerializer, Authentication, VoidAuth, Interceptor } from '../model/models';
|
|
30
|
+
import { HttpBasicAuth, HttpBearerAuth, ApiKeyAuth, OAuth } from '../model/models';
|
|
31
|
+
|
|
32
|
+
import { HttpError, RequestFile } from './apis';
|
|
33
|
+
|
|
34
|
+
let defaultBasePath = 'https://api.wall.et';
|
|
35
|
+
|
|
36
|
+
// ===============================================
|
|
37
|
+
// This file is autogenerated - Please do not edit
|
|
38
|
+
// ===============================================
|
|
39
|
+
|
|
40
|
+
export enum SystemApiApiKeys {
|
|
41
|
+
api_key,
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export class SystemApi {
|
|
45
|
+
protected _basePath = defaultBasePath;
|
|
46
|
+
protected _defaultHeaders : any = {};
|
|
47
|
+
protected _useQuerystring : boolean = false;
|
|
48
|
+
|
|
49
|
+
protected authentications = {
|
|
50
|
+
'default': <Authentication>new VoidAuth(),
|
|
51
|
+
'api_key': new ApiKeyAuth('header', 'access-token'),
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
protected interceptors: Interceptor[] = [];
|
|
55
|
+
|
|
56
|
+
constructor(basePath?: string);
|
|
57
|
+
constructor(basePathOrUsername: string, password?: string, basePath?: string) {
|
|
58
|
+
if (password) {
|
|
59
|
+
if (basePath) {
|
|
60
|
+
this.basePath = basePath;
|
|
61
|
+
}
|
|
62
|
+
} else {
|
|
63
|
+
if (basePathOrUsername) {
|
|
64
|
+
this.basePath = basePathOrUsername
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
set useQuerystring(value: boolean) {
|
|
70
|
+
this._useQuerystring = value;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
set basePath(basePath: string) {
|
|
74
|
+
this._basePath = basePath;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
set defaultHeaders(defaultHeaders: any) {
|
|
78
|
+
this._defaultHeaders = defaultHeaders;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
get defaultHeaders() {
|
|
82
|
+
return this._defaultHeaders;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
get basePath() {
|
|
86
|
+
return this._basePath;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
public setDefaultAuthentication(auth: Authentication) {
|
|
90
|
+
this.authentications.default = auth;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
public setApiKey(key: SystemApiApiKeys, value: string) {
|
|
94
|
+
(this.authentications as any)[SystemApiApiKeys[key]].apiKey = value;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
public addInterceptor(interceptor: Interceptor) {
|
|
98
|
+
this.interceptors.push(interceptor);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
*
|
|
103
|
+
* @summary Create role
|
|
104
|
+
* @param inlineObject64
|
|
105
|
+
*/
|
|
106
|
+
public async createRole (inlineObject64: InlineObject64, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Role; }> {
|
|
107
|
+
const localVarPath = this.basePath + '/v1/system/roles';
|
|
108
|
+
let localVarQueryParameters: any = {};
|
|
109
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
110
|
+
const produces = ['application/json'];
|
|
111
|
+
// give precedence to 'application/json'
|
|
112
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
113
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
114
|
+
} else {
|
|
115
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
116
|
+
}
|
|
117
|
+
let localVarFormParams: any = {};
|
|
118
|
+
|
|
119
|
+
// verify required parameter 'inlineObject64' is not null or undefined
|
|
120
|
+
if (inlineObject64 === null || inlineObject64 === undefined) {
|
|
121
|
+
throw new Error('Required parameter inlineObject64 was null or undefined when calling createRole.');
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
125
|
+
|
|
126
|
+
let localVarUseFormData = false;
|
|
127
|
+
|
|
128
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
129
|
+
method: 'POST',
|
|
130
|
+
qs: localVarQueryParameters,
|
|
131
|
+
headers: localVarHeaderParams,
|
|
132
|
+
uri: localVarPath,
|
|
133
|
+
useQuerystring: this._useQuerystring,
|
|
134
|
+
json: true,
|
|
135
|
+
body: ObjectSerializer.serialize(inlineObject64, "InlineObject64")
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
let authenticationPromise = Promise.resolve();
|
|
139
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
140
|
+
|
|
141
|
+
let interceptorPromise = authenticationPromise;
|
|
142
|
+
for (const interceptor of this.interceptors) {
|
|
143
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
return interceptorPromise.then(() => {
|
|
147
|
+
if (Object.keys(localVarFormParams).length) {
|
|
148
|
+
if (localVarUseFormData) {
|
|
149
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
150
|
+
} else {
|
|
151
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
return new Promise<{ response: http.IncomingMessage; body: Role; }>((resolve, reject) => {
|
|
155
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
156
|
+
if (error) {
|
|
157
|
+
reject(error);
|
|
158
|
+
} else {
|
|
159
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
160
|
+
body = ObjectSerializer.deserialize(body, "Role");
|
|
161
|
+
resolve({ response: response, body: body });
|
|
162
|
+
} else {
|
|
163
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
*
|
|
172
|
+
* @summary Delete role
|
|
173
|
+
* @param roleID
|
|
174
|
+
*/
|
|
175
|
+
public async deleteRole (roleID: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: boolean; }> {
|
|
176
|
+
const localVarPath = this.basePath + '/v1/system/roles/{roleID}'
|
|
177
|
+
.replace('{' + 'roleID' + '}', encodeURIComponent(String(roleID)));
|
|
178
|
+
let localVarQueryParameters: any = {};
|
|
179
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
180
|
+
const produces = ['application/json'];
|
|
181
|
+
// give precedence to 'application/json'
|
|
182
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
183
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
184
|
+
} else {
|
|
185
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
186
|
+
}
|
|
187
|
+
let localVarFormParams: any = {};
|
|
188
|
+
|
|
189
|
+
// verify required parameter 'roleID' is not null or undefined
|
|
190
|
+
if (roleID === null || roleID === undefined) {
|
|
191
|
+
throw new Error('Required parameter roleID was null or undefined when calling deleteRole.');
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
195
|
+
|
|
196
|
+
let localVarUseFormData = false;
|
|
197
|
+
|
|
198
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
199
|
+
method: 'DELETE',
|
|
200
|
+
qs: localVarQueryParameters,
|
|
201
|
+
headers: localVarHeaderParams,
|
|
202
|
+
uri: localVarPath,
|
|
203
|
+
useQuerystring: this._useQuerystring,
|
|
204
|
+
json: true,
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
let authenticationPromise = Promise.resolve();
|
|
208
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
209
|
+
|
|
210
|
+
let interceptorPromise = authenticationPromise;
|
|
211
|
+
for (const interceptor of this.interceptors) {
|
|
212
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
return interceptorPromise.then(() => {
|
|
216
|
+
if (Object.keys(localVarFormParams).length) {
|
|
217
|
+
if (localVarUseFormData) {
|
|
218
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
219
|
+
} else {
|
|
220
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
return new Promise<{ response: http.IncomingMessage; body: boolean; }>((resolve, reject) => {
|
|
224
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
225
|
+
if (error) {
|
|
226
|
+
reject(error);
|
|
227
|
+
} else {
|
|
228
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
229
|
+
body = ObjectSerializer.deserialize(body, "boolean");
|
|
230
|
+
resolve({ response: response, body: body });
|
|
231
|
+
} else {
|
|
232
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
});
|
|
236
|
+
});
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
*
|
|
241
|
+
* @summary Fetch role\'s audit log
|
|
242
|
+
* @param startDateTime
|
|
243
|
+
* @param endDateTime
|
|
244
|
+
*/
|
|
245
|
+
public async fetchAuditLogOfRoles (startDateTime: Date, endDateTime: Date, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<RoleAuditLog>; }> {
|
|
246
|
+
const localVarPath = this.basePath + '/v1/system/roles/auditLog';
|
|
247
|
+
let localVarQueryParameters: any = {};
|
|
248
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
249
|
+
const produces = ['application/json'];
|
|
250
|
+
// give precedence to 'application/json'
|
|
251
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
252
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
253
|
+
} else {
|
|
254
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
255
|
+
}
|
|
256
|
+
let localVarFormParams: any = {};
|
|
257
|
+
|
|
258
|
+
// verify required parameter 'startDateTime' is not null or undefined
|
|
259
|
+
if (startDateTime === null || startDateTime === undefined) {
|
|
260
|
+
throw new Error('Required parameter startDateTime was null or undefined when calling fetchAuditLogOfRoles.');
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
// verify required parameter 'endDateTime' is not null or undefined
|
|
264
|
+
if (endDateTime === null || endDateTime === undefined) {
|
|
265
|
+
throw new Error('Required parameter endDateTime was null or undefined when calling fetchAuditLogOfRoles.');
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
if (startDateTime !== undefined) {
|
|
269
|
+
localVarQueryParameters['startDateTime'] = ObjectSerializer.serialize(startDateTime, "Date");
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
if (endDateTime !== undefined) {
|
|
273
|
+
localVarQueryParameters['endDateTime'] = ObjectSerializer.serialize(endDateTime, "Date");
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
277
|
+
|
|
278
|
+
let localVarUseFormData = false;
|
|
279
|
+
|
|
280
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
281
|
+
method: 'GET',
|
|
282
|
+
qs: localVarQueryParameters,
|
|
283
|
+
headers: localVarHeaderParams,
|
|
284
|
+
uri: localVarPath,
|
|
285
|
+
useQuerystring: this._useQuerystring,
|
|
286
|
+
json: true,
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
let authenticationPromise = Promise.resolve();
|
|
290
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
291
|
+
|
|
292
|
+
let interceptorPromise = authenticationPromise;
|
|
293
|
+
for (const interceptor of this.interceptors) {
|
|
294
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
return interceptorPromise.then(() => {
|
|
298
|
+
if (Object.keys(localVarFormParams).length) {
|
|
299
|
+
if (localVarUseFormData) {
|
|
300
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
301
|
+
} else {
|
|
302
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
return new Promise<{ response: http.IncomingMessage; body: Array<RoleAuditLog>; }>((resolve, reject) => {
|
|
306
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
307
|
+
if (error) {
|
|
308
|
+
reject(error);
|
|
309
|
+
} else {
|
|
310
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
311
|
+
body = ObjectSerializer.deserialize(body, "Array<RoleAuditLog>");
|
|
312
|
+
resolve({ response: response, body: body });
|
|
313
|
+
} else {
|
|
314
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
});
|
|
318
|
+
});
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
*
|
|
323
|
+
* @summary Fetch employees with role
|
|
324
|
+
* @param roleID
|
|
325
|
+
*/
|
|
326
|
+
public async fetchEmployeesWithRole (roleID: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<Employee>; }> {
|
|
327
|
+
const localVarPath = this.basePath + '/v1/system/roles/employees/{roleID}'
|
|
328
|
+
.replace('{' + 'roleID' + '}', encodeURIComponent(String(roleID)));
|
|
329
|
+
let localVarQueryParameters: any = {};
|
|
330
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
331
|
+
const produces = ['application/json'];
|
|
332
|
+
// give precedence to 'application/json'
|
|
333
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
334
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
335
|
+
} else {
|
|
336
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
337
|
+
}
|
|
338
|
+
let localVarFormParams: any = {};
|
|
339
|
+
|
|
340
|
+
// verify required parameter 'roleID' is not null or undefined
|
|
341
|
+
if (roleID === null || roleID === undefined) {
|
|
342
|
+
throw new Error('Required parameter roleID was null or undefined when calling fetchEmployeesWithRole.');
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
346
|
+
|
|
347
|
+
let localVarUseFormData = false;
|
|
348
|
+
|
|
349
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
350
|
+
method: 'GET',
|
|
351
|
+
qs: localVarQueryParameters,
|
|
352
|
+
headers: localVarHeaderParams,
|
|
353
|
+
uri: localVarPath,
|
|
354
|
+
useQuerystring: this._useQuerystring,
|
|
355
|
+
json: true,
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
let authenticationPromise = Promise.resolve();
|
|
359
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
360
|
+
|
|
361
|
+
let interceptorPromise = authenticationPromise;
|
|
362
|
+
for (const interceptor of this.interceptors) {
|
|
363
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
return interceptorPromise.then(() => {
|
|
367
|
+
if (Object.keys(localVarFormParams).length) {
|
|
368
|
+
if (localVarUseFormData) {
|
|
369
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
370
|
+
} else {
|
|
371
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
return new Promise<{ response: http.IncomingMessage; body: Array<Employee>; }>((resolve, reject) => {
|
|
375
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
376
|
+
if (error) {
|
|
377
|
+
reject(error);
|
|
378
|
+
} else {
|
|
379
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
380
|
+
body = ObjectSerializer.deserialize(body, "Array<Employee>");
|
|
381
|
+
resolve({ response: response, body: body });
|
|
382
|
+
} else {
|
|
383
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
});
|
|
387
|
+
});
|
|
388
|
+
});
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
*
|
|
392
|
+
* @summary Fetch webpages for role
|
|
393
|
+
* @param roleID
|
|
394
|
+
*/
|
|
395
|
+
public async fetchWebpagesForRole (roleID: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Array<Webpage>; }> {
|
|
396
|
+
const localVarPath = this.basePath + '/v1/system/roles/webpages/{roleID}'
|
|
397
|
+
.replace('{' + 'roleID' + '}', encodeURIComponent(String(roleID)));
|
|
398
|
+
let localVarQueryParameters: any = {};
|
|
399
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
400
|
+
const produces = ['application/json'];
|
|
401
|
+
// give precedence to 'application/json'
|
|
402
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
403
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
404
|
+
} else {
|
|
405
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
406
|
+
}
|
|
407
|
+
let localVarFormParams: any = {};
|
|
408
|
+
|
|
409
|
+
// verify required parameter 'roleID' is not null or undefined
|
|
410
|
+
if (roleID === null || roleID === undefined) {
|
|
411
|
+
throw new Error('Required parameter roleID was null or undefined when calling fetchWebpagesForRole.');
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
415
|
+
|
|
416
|
+
let localVarUseFormData = false;
|
|
417
|
+
|
|
418
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
419
|
+
method: 'GET',
|
|
420
|
+
qs: localVarQueryParameters,
|
|
421
|
+
headers: localVarHeaderParams,
|
|
422
|
+
uri: localVarPath,
|
|
423
|
+
useQuerystring: this._useQuerystring,
|
|
424
|
+
json: true,
|
|
425
|
+
};
|
|
426
|
+
|
|
427
|
+
let authenticationPromise = Promise.resolve();
|
|
428
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
429
|
+
|
|
430
|
+
let interceptorPromise = authenticationPromise;
|
|
431
|
+
for (const interceptor of this.interceptors) {
|
|
432
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
return interceptorPromise.then(() => {
|
|
436
|
+
if (Object.keys(localVarFormParams).length) {
|
|
437
|
+
if (localVarUseFormData) {
|
|
438
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
439
|
+
} else {
|
|
440
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
return new Promise<{ response: http.IncomingMessage; body: Array<Webpage>; }>((resolve, reject) => {
|
|
444
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
445
|
+
if (error) {
|
|
446
|
+
reject(error);
|
|
447
|
+
} else {
|
|
448
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
449
|
+
body = ObjectSerializer.deserialize(body, "Array<Webpage>");
|
|
450
|
+
resolve({ response: response, body: body });
|
|
451
|
+
} else {
|
|
452
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
});
|
|
456
|
+
});
|
|
457
|
+
});
|
|
458
|
+
}
|
|
459
|
+
/**
|
|
460
|
+
*
|
|
461
|
+
* @summary Fetch role
|
|
462
|
+
* @param roleID
|
|
463
|
+
*/
|
|
464
|
+
public async loadRole (roleID: string, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: WTRole; }> {
|
|
465
|
+
const localVarPath = this.basePath + '/v1/system/roles/{roleID}'
|
|
466
|
+
.replace('{' + 'roleID' + '}', encodeURIComponent(String(roleID)));
|
|
467
|
+
let localVarQueryParameters: any = {};
|
|
468
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
469
|
+
const produces = ['application/json'];
|
|
470
|
+
// give precedence to 'application/json'
|
|
471
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
472
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
473
|
+
} else {
|
|
474
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
475
|
+
}
|
|
476
|
+
let localVarFormParams: any = {};
|
|
477
|
+
|
|
478
|
+
// verify required parameter 'roleID' is not null or undefined
|
|
479
|
+
if (roleID === null || roleID === undefined) {
|
|
480
|
+
throw new Error('Required parameter roleID was null or undefined when calling loadRole.');
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
484
|
+
|
|
485
|
+
let localVarUseFormData = false;
|
|
486
|
+
|
|
487
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
488
|
+
method: 'GET',
|
|
489
|
+
qs: localVarQueryParameters,
|
|
490
|
+
headers: localVarHeaderParams,
|
|
491
|
+
uri: localVarPath,
|
|
492
|
+
useQuerystring: this._useQuerystring,
|
|
493
|
+
json: true,
|
|
494
|
+
};
|
|
495
|
+
|
|
496
|
+
let authenticationPromise = Promise.resolve();
|
|
497
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
498
|
+
|
|
499
|
+
let interceptorPromise = authenticationPromise;
|
|
500
|
+
for (const interceptor of this.interceptors) {
|
|
501
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
return interceptorPromise.then(() => {
|
|
505
|
+
if (Object.keys(localVarFormParams).length) {
|
|
506
|
+
if (localVarUseFormData) {
|
|
507
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
508
|
+
} else {
|
|
509
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
return new Promise<{ response: http.IncomingMessage; body: WTRole; }>((resolve, reject) => {
|
|
513
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
514
|
+
if (error) {
|
|
515
|
+
reject(error);
|
|
516
|
+
} else {
|
|
517
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
518
|
+
body = ObjectSerializer.deserialize(body, "WTRole");
|
|
519
|
+
resolve({ response: response, body: body });
|
|
520
|
+
} else {
|
|
521
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
});
|
|
525
|
+
});
|
|
526
|
+
});
|
|
527
|
+
}
|
|
528
|
+
/**
|
|
529
|
+
*
|
|
530
|
+
* @summary Update role
|
|
531
|
+
* @param roleID
|
|
532
|
+
* @param inlineObject63
|
|
533
|
+
*/
|
|
534
|
+
public async saveRole (roleID: string, inlineObject63: InlineObject63, options: {headers: {[name: string]: string}} = {headers: {}}) : Promise<{ response: http.IncomingMessage; body: Role; }> {
|
|
535
|
+
const localVarPath = this.basePath + '/v1/system/roles/{roleID}'
|
|
536
|
+
.replace('{' + 'roleID' + '}', encodeURIComponent(String(roleID)));
|
|
537
|
+
let localVarQueryParameters: any = {};
|
|
538
|
+
let localVarHeaderParams: any = (<any>Object).assign({}, this._defaultHeaders);
|
|
539
|
+
const produces = ['application/json'];
|
|
540
|
+
// give precedence to 'application/json'
|
|
541
|
+
if (produces.indexOf('application/json') >= 0) {
|
|
542
|
+
localVarHeaderParams.Accept = 'application/json';
|
|
543
|
+
} else {
|
|
544
|
+
localVarHeaderParams.Accept = produces.join(',');
|
|
545
|
+
}
|
|
546
|
+
let localVarFormParams: any = {};
|
|
547
|
+
|
|
548
|
+
// verify required parameter 'roleID' is not null or undefined
|
|
549
|
+
if (roleID === null || roleID === undefined) {
|
|
550
|
+
throw new Error('Required parameter roleID was null or undefined when calling saveRole.');
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
// verify required parameter 'inlineObject63' is not null or undefined
|
|
554
|
+
if (inlineObject63 === null || inlineObject63 === undefined) {
|
|
555
|
+
throw new Error('Required parameter inlineObject63 was null or undefined when calling saveRole.');
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
(<any>Object).assign(localVarHeaderParams, options.headers);
|
|
559
|
+
|
|
560
|
+
let localVarUseFormData = false;
|
|
561
|
+
|
|
562
|
+
let localVarRequestOptions: localVarRequest.Options = {
|
|
563
|
+
method: 'PUT',
|
|
564
|
+
qs: localVarQueryParameters,
|
|
565
|
+
headers: localVarHeaderParams,
|
|
566
|
+
uri: localVarPath,
|
|
567
|
+
useQuerystring: this._useQuerystring,
|
|
568
|
+
json: true,
|
|
569
|
+
body: ObjectSerializer.serialize(inlineObject63, "InlineObject63")
|
|
570
|
+
};
|
|
571
|
+
|
|
572
|
+
let authenticationPromise = Promise.resolve();
|
|
573
|
+
authenticationPromise = authenticationPromise.then(() => this.authentications.default.applyToRequest(localVarRequestOptions));
|
|
574
|
+
|
|
575
|
+
let interceptorPromise = authenticationPromise;
|
|
576
|
+
for (const interceptor of this.interceptors) {
|
|
577
|
+
interceptorPromise = interceptorPromise.then(() => interceptor(localVarRequestOptions));
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
return interceptorPromise.then(() => {
|
|
581
|
+
if (Object.keys(localVarFormParams).length) {
|
|
582
|
+
if (localVarUseFormData) {
|
|
583
|
+
(<any>localVarRequestOptions).formData = localVarFormParams;
|
|
584
|
+
} else {
|
|
585
|
+
localVarRequestOptions.form = localVarFormParams;
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
return new Promise<{ response: http.IncomingMessage; body: Role; }>((resolve, reject) => {
|
|
589
|
+
localVarRequest(localVarRequestOptions, (error, response, body) => {
|
|
590
|
+
if (error) {
|
|
591
|
+
reject(error);
|
|
592
|
+
} else {
|
|
593
|
+
if (response.statusCode && response.statusCode >= 200 && response.statusCode <= 299) {
|
|
594
|
+
body = ObjectSerializer.deserialize(body, "Role");
|
|
595
|
+
resolve({ response: response, body: body });
|
|
596
|
+
} else {
|
|
597
|
+
reject(new HttpError(response, body, response.statusCode));
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
});
|
|
601
|
+
});
|
|
602
|
+
});
|
|
603
|
+
}
|
|
604
|
+
}
|