From b5d9429926e97e0adc9bfa4fd006641afbca5dbb Mon Sep 17 00:00:00 2001 From: Sanyam96 Date: Sun, 27 Aug 2017 23:22:52 +0530 Subject: [PATCH 1/4] GSOC'17:swagger and swagger UI integration on fineract-provider --- .gitignore | 1 + fineract-provider/build.gradle | 4 +- fineract-provider/dependencies.gradle | 4 +- fineract-provider/dev-dependencies.gradle | 5 +- fineract-provider/fineract-provider.iml | 14 + .../api/AccrualAccountingApiResource.java | 8 +- .../AccrualAccountingApiResourceSwagger.java | 46 ++ .../closure/api/GLClosuresApiResource.java | 25 +- .../api/GLClosuresApiResourceSwagger.java | 133 ++++++ .../FinancialActivityAccountsApiResource.java | 23 +- ...ialActivityAccountsApiResourceSwagger.java | 103 ++++ .../glaccount/api/GLAccountsApiResource.java | 37 +- .../api/GLAccountsApiResourceSwagger.java | 190 ++++++++ .../api/JournalEntriesApiResource.java | 48 +- .../api/JournalEntriesApiResourceSwagger.java | 61 +++ .../api/ProvisioningEntriesApiResource.java | 23 +- ...ProvisioningEntriesApiResourceSwagger.java | 80 ++++ .../rule/api/AccountingRuleApiResource.java | 24 +- .../api/AccountingRuleApiResourceSwagger.java | 130 +++++ .../fineract/batch/api/BatchApiResource.java | 9 +- .../batch/api/BatchApiResourceSwagger.java | 78 +++ .../commands/api/AuditsApiResource.java | 32 +- .../api/MakercheckersApiResource.java | 26 +- .../api/MakercheckersApiResourceSwagger.java | 87 ++++ .../api/AccountNumberFormatsApiResource.java | 24 +- ...ccountNumberFormatsApiResourceSwagger.java | 129 +++++ .../cache/api/CacheApiResource.java | 9 +- .../cache/api/CacheApiResourceSwagger.java | 68 +++ .../sms/api/SmsCampaignApiResource.java | 24 +- .../codes/api/CodeValuesApiResource.java | 26 +- .../api/CodeValuesApiResourceSwagger.java | 109 +++++ .../codes/api/CodesApiResource.java | 22 +- .../codes/api/CodesApiResourceSwagger.java | 95 ++++ ...ernalServicesConfigurationApiResource.java | 12 +- ...rvicesConfigurationApiResourceSwagger.java | 42 ++ .../api/GlobalConfigurationApiResource.java | 15 +- ...GlobalConfigurationApiResourceSwagger.java | 63 +++ .../api/CreditBureauConfigurationAPI.java | 2 + .../api/DatatablesApiResource.java | 78 ++- .../api/DatatablesApiResourceSwagger.java | 253 ++++++++++ .../api/EntityDatatableChecksApiResource.java | 21 +- ...tityDatatableChecksApiResourceSwagger.java | 101 ++++ .../dataqueries/api/ReportsApiResource.java | 24 +- .../api/ReportsApiResourceSwagger.java | 139 ++++++ .../api/RunreportsApiResource.java | 7 +- .../api/RunreportsApiResourceSwagger.java | 40 ++ .../api/DocumentManagementApiResource.java | 48 +- .../DocumentManagementApiResourceSwagger.java | 110 +++++ .../api/ImagesApiResource.java | 2 + .../api/ImagesApiResourceSwagger.java | 30 ++ .../api/FineractEntityApiResource.java | 2 + .../hooks/api/HookApiResource.java | 26 +- .../hooks/api/HookApiResourceSwagger.java | 147 ++++++ .../jobs/api/SchedulerApiResource.java | 8 +- .../jobs/api/SchedulerApiResourceSwagger.java | 42 ++ .../jobs/api/SchedulerJobApiResource.java | 27 +- .../api/SchedulerJobApiResourceSwagger.java | 96 ++++ .../api/ReportMailingJobApiResource.java | 31 +- .../ReportMailingJobApiResourceSwagger.java | 172 +++++++ ...ReportMailingJobRunHistoryApiResource.java | 14 +- ...ailingJobRunHistoryApiResourceSwagger.java | 54 +++ .../api/AuthenticationApiResource.java | 6 +- .../api/AuthenticationApiResourceSwagger.java | 62 +++ .../security/api/UserDetailsApiResource.java | 6 +- .../api/UserDetailsApiResourceSwagger.java | 62 +++ .../sms/api/SmsApiResource.java | 2 + .../survey/api/LikelihoodApiResource.java | 2 + .../survey/api/PovertyLineApiResource.java | 2 + .../survey/api/SurveyApiResource.java | 13 +- .../survey/api/SurveyApiResourceSwagger.java | 103 ++++ .../mix/api/MixReportApiResource.java | 2 + .../mix/api/MixTaxonomyApiResource.java | 2 + .../api/MixTaxonomyMappingApiResource.java | 2 + .../holiday/api/HolidaysApiResource.java | 35 +- .../api/HolidaysApiResourceSwagger.java | 146 ++++++ .../monetary/api/CurrenciesApiResource.java | 9 +- .../api/CurrenciesApiResourceSwagger.java | 76 +++ .../api/OfficeTransactionsApiResource.java | 2 + .../office/api/OfficesApiResource.java | 24 +- .../office/api/OfficesApiResourceSwagger.java | 128 +++++ .../api/ProvisioningCategoryApiResource.java | 2 + .../api/ProvisioningCriteriaApiResource.java | 22 +- ...rovisioningCriteriaApiResourceSwagger.java | 118 +++++ .../staff/api/StaffApiResource.java | 28 +- .../staff/api/StaffApiResourceSwagger.java | 131 +++++ .../teller/api/CashierApiResource.java | 5 + .../teller/api/TellerApiResource.java | 102 ++-- .../teller/api/TellerApiResourceSwagger.java | 446 ++++++++++++++++++ .../teller/api/TellerJournalApiResource.java | 2 + .../api/WorkingDaysApiResource.java | 11 +- .../api/WorkingDaysApiResourceSwagger.java | 81 ++++ .../client/api/ClientAddressApiResources.java | 45 +- .../client/api/ClientChargesApiResource.java | 16 +- .../api/ClientIdentifiersApiResource.java | 21 +- .../api/ClientTransactionsApiResource.java | 13 +- .../client/api/ClientsApiResource.java | 37 +- .../portfolio/client/data/ClientData.java | 56 ++- .../spm/api/LookupTableApiResource.java | 16 +- .../spm/api/ScorecardApiResource.java | 14 +- .../fineract/spm/api/SpmApiResource.java | 16 +- .../template/api/TemplatesApiResource.java | 28 +- .../api/TemplatesApiResourcesSwagger.java | 159 +++++++ .../api/PasswordPreferencesApiResource.java | 10 +- ...PasswordPreferencesApiResourceSwagger.java | 56 +++ .../api/PermissionsApiResource.java | 9 +- .../api/PermissionsApiResourceSwagger.java | 58 +++ .../api/RolesApiResource.java | 38 +- .../api/RolesApiResourceSwagger.java | 197 ++++++++ .../api/UsersApiResource.java | 25 +- .../api/UsersApiResourceSwagger.java | 186 ++++++++ .../resources/META-INF/spring/appContext.xml | 3 + .../resources/META-INF/spring/swagger.xml | 74 +++ .../resources/swagger-ui/favicon-16x16.png | Bin 0 -> 445 bytes .../resources/swagger-ui/favicon-32x32.png | Bin 0 -> 1141 bytes .../src/main/resources/swagger-ui/index.html | 95 ++++ .../resources/swagger-ui/oauth2-redirect.html | 53 +++ .../main/resources/swagger-ui/response.json | 1 + .../resources/swagger-ui/swagger-ui-bundle.js | 108 +++++ .../swagger-ui/swagger-ui-bundle.js.map | 1 + .../swagger-ui-standalone-preset.js | 20 + .../swagger-ui-standalone-preset.js.map | 1 + .../main/resources/swagger-ui/swagger-ui.css | 2 + .../resources/swagger-ui/swagger-ui.css.map | 1 + .../main/resources/swagger-ui/swagger-ui.js | 15 + .../resources/swagger-ui/swagger-ui.js.map | 1 + 125 files changed, 6023 insertions(+), 287 deletions(-) create mode 100644 fineract-provider/fineract-provider.iml create mode 100644 fineract-provider/src/main/java/org/apache/fineract/accounting/accrual/api/AccrualAccountingApiResourceSwagger.java create mode 100755 fineract-provider/src/main/java/org/apache/fineract/accounting/closure/api/GLClosuresApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/accounting/financialactivityaccount/api/FinancialActivityAccountsApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/api/GLAccountsApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/api/JournalEntriesApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/api/ProvisioningEntriesApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/accounting/rule/api/AccountingRuleApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/batch/api/BatchApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/commands/api/MakercheckersApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/api/AccountNumberFormatsApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/infrastructure/cache/api/CacheApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/api/CodeValuesApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/api/CodesApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/ExternalServicesConfigurationApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/GlobalConfigurationApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/DatatablesApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/EntityDatatableChecksApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/ReportsApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/RunreportsApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/DocumentManagementApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/ImagesApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/api/HookApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerJobApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/api/ReportMailingJobApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/api/ReportMailingJobRunHistoryApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/api/AuthenticationApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/api/UserDetailsApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/SurveyApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/api/HolidaysApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/organisation/monetary/api/CurrenciesApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/organisation/office/api/OfficesApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/api/ProvisioningCriteriaApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/organisation/staff/api/StaffApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/organisation/teller/api/TellerApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/api/WorkingDaysApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/template/api/TemplatesApiResourcesSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/useradministration/api/PasswordPreferencesApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/useradministration/api/PermissionsApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/useradministration/api/RolesApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/useradministration/api/UsersApiResourceSwagger.java create mode 100644 fineract-provider/src/main/resources/META-INF/spring/swagger.xml create mode 100644 fineract-provider/src/main/resources/swagger-ui/favicon-16x16.png create mode 100644 fineract-provider/src/main/resources/swagger-ui/favicon-32x32.png create mode 100644 fineract-provider/src/main/resources/swagger-ui/index.html create mode 100644 fineract-provider/src/main/resources/swagger-ui/oauth2-redirect.html create mode 100644 fineract-provider/src/main/resources/swagger-ui/response.json create mode 100644 fineract-provider/src/main/resources/swagger-ui/swagger-ui-bundle.js create mode 100644 fineract-provider/src/main/resources/swagger-ui/swagger-ui-bundle.js.map create mode 100644 fineract-provider/src/main/resources/swagger-ui/swagger-ui-standalone-preset.js create mode 100644 fineract-provider/src/main/resources/swagger-ui/swagger-ui-standalone-preset.js.map create mode 100644 fineract-provider/src/main/resources/swagger-ui/swagger-ui.css create mode 100644 fineract-provider/src/main/resources/swagger-ui/swagger-ui.css.map create mode 100644 fineract-provider/src/main/resources/swagger-ui/swagger-ui.js create mode 100644 fineract-provider/src/main/resources/swagger-ui/swagger-ui.js.map diff --git a/.gitignore b/.gitignore index c7f7defc6..5570147a0 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ *.war *.ear .gradle +.idea build diff --git a/fineract-provider/build.gradle b/fineract-provider/build.gradle index 771fcde58..cf6febab2 100644 --- a/fineract-provider/build.gradle +++ b/fineract-provider/build.gradle @@ -109,7 +109,9 @@ rat { '**/*.iml', //Notice files '**/NOTICE_RELEASE', - '**/NOTICE_SOURCE', + '**/NOTICE_SOURCE', + // Swagger License + '**/fineract-provider/src/main/resources/swagger-ui/*.*', // gradle '**/.gradle/**', '**/gradlew', diff --git a/fineract-provider/dependencies.gradle b/fineract-provider/dependencies.gradle index 562e76784..131472518 100644 --- a/fineract-provider/dependencies.gradle +++ b/fineract-provider/dependencies.gradle @@ -91,10 +91,12 @@ dependencies { [group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.3.5'], // Once we've switched to Java 8 this dep can be removed. //[group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.0'] + + [group: 'io.swagger', name: 'swagger-jersey-jaxrs', version: '1.5.15'], [group: 'org.springframework', name:'spring-jms'], [group: 'org.apache.activemq', name: 'activemq-broker'] + ) - ) testCompile 'junit:junit:4.11', 'junit:junit-dep:4.11', 'org.mockito:mockito-core:1.9.5', diff --git a/fineract-provider/dev-dependencies.gradle b/fineract-provider/dev-dependencies.gradle index 80c8f490e..d12494e0c 100644 --- a/fineract-provider/dev-dependencies.gradle +++ b/fineract-provider/dev-dependencies.gradle @@ -90,9 +90,12 @@ dependencies { [group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.3.5'], // Once we've switched to Java 8 this dep can be removed. //[group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.0'] + + [group: 'io.swagger', name: 'swagger-jersey-jaxrs', version: '1.5.15'], [group: 'org.springframework', name:'spring-jms'], [group: 'org.apache.activemq', name: 'activemq-broker'] - ) + ) + testCompile 'junit:junit:4.11', 'junit:junit-dep:4.11', 'org.mockito:mockito-core:1.9.5', diff --git a/fineract-provider/fineract-provider.iml b/fineract-provider/fineract-provider.iml new file mode 100644 index 000000000..98e6d6688 --- /dev/null +++ b/fineract-provider/fineract-provider.iml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/accrual/api/AccrualAccountingApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/accrual/api/AccrualAccountingApiResource.java index 489ebc48f..63d3693a2 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/accrual/api/AccrualAccountingApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/accrual/api/AccrualAccountingApiResource.java @@ -24,6 +24,8 @@ import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; +import io.swagger.annotations.*; +// import org.apache.fineract.accounting.accrual.swagger.runaccuralPost; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -36,6 +38,7 @@ import org.springframework.stereotype.Component; @Path("/runaccruals") @Component @Scope("singleton") +@Api(value = "Periodic Accrual Accounting", description = "Periodic Accrual is to accrue the loan income till the specific date or till batch job scheduled time.\n\n ") public class AccrualAccountingApiResource { private final PortfolioCommandSourceWritePlatformService commandsSourceWritePlatformService; @@ -52,7 +55,10 @@ public class AccrualAccountingApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String executePeriodicAccrualAccounting(final String jsonRequestBody) { + @ApiOperation(value = "Executes Periodic Accrual Accounting", httpMethod = "POST", notes = "Mandatory Fields\n" + "\n" + "tillDate\n") + @ApiImplicitParams({@ApiImplicitParam(paramType = "body", required = true, type = "body", dataTypeClass = AccrualAccountingApiResourceSwagger.PostRunaccrualsRequest.class, value = "Request Body\n" + "\n" + "Field Descriptions: \n" + "tillDate: \n" + "which specifies periodic accruals should happen till the given Date" )}) + @ApiResponses({@ApiResponse(code = 200, message = "OK")}) + public String executePeriodicAccrualAccounting( @ApiParam(hidden = true) final String jsonRequestBody) { final CommandWrapper commandRequest = new CommandWrapperBuilder().excuteAccrualAccounting().withJson(jsonRequestBody).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/accrual/api/AccrualAccountingApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/accrual/api/AccrualAccountingApiResourceSwagger.java new file mode 100644 index 000000000..aee84ee4e --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/accrual/api/AccrualAccountingApiResourceSwagger.java @@ -0,0 +1,46 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.accounting.accrual.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * Created by sanyam on 24/7/17. + */ +final class AccrualAccountingApiResourceSwagger { + private AccrualAccountingApiResourceSwagger() { + // don't allow to instantiate; use only for live API documentation + } + + @ApiModel(value = "runaccrualsRequest") + public static final class PostRunaccrualsRequest { + private PostRunaccrualsRequest() { + // don't allow to instantiate; use only for live API documentation + } + + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "04 June 2014", notes = "which specifies periodic accruals should happen till the given Date", required = true) + public String tillDate; + } + +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/closure/api/GLClosuresApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/closure/api/GLClosuresApiResource.java index 7fbf17f38..e57144fb9 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/closure/api/GLClosuresApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/closure/api/GLClosuresApiResource.java @@ -36,6 +36,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.fineract.accounting.closure.data.GLClosureData; import org.apache.fineract.accounting.closure.service.GLClosureReadPlatformService; import org.apache.fineract.commands.domain.CommandWrapper; @@ -54,6 +55,7 @@ import org.springframework.stereotype.Component; @Path("/glclosures") @Component @Scope("singleton") +@Api(value = "Accounting Closure", description = "An accounting closure indicates that no more journal entries may be logged (or reversed) in the system, either manually or via the portfolio with an entry date prior to the defined closure date\n" + "\n" + "Field Descriptions\n" + "closingDate\n" + "The date for which the accounting closure is defined\n" + "officeId\n" + "The identifer of the branch for which accounting has been closed\n" + "comments\n" + "Description associated with an Accounting closure") public class GLClosuresApiResource { private static final Set RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "officeId", "officeName", @@ -85,7 +87,9 @@ public class GLClosuresApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveAllClosures(@Context final UriInfo uriInfo, @QueryParam("officeId") final Long officeId) { + @ApiOperation(value = "List Accounting closures", notes = "Example Requests:\n" + "\n" + "glclosures") + @ApiResponses({@ApiResponse(code = 200, response = GLClosuresApiResourceSwagger.GetGlClosureResponse.class, message = "", responseContainer = "list")}) + public String retrieveAllClosures(@Context final UriInfo uriInfo, @QueryParam("officeId") @ApiParam(value = "officeId") final Long officeId) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermission); final List glClosureDatas = this.glClosureReadPlatformService.retrieveAllGLClosures(officeId); @@ -98,7 +102,9 @@ public class GLClosuresApiResource { @Path("{glClosureId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retreiveClosure(@PathParam("glClosureId") final Long glClosureId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve an Accounting Closure", notes = "Example Requests:\n" + "\n" + "glclosures/1\n" + "\n" + "\n" + "/glclosures/1?fields=officeName,closingDate") + @ApiResponses({@ApiResponse(code = 200, message = "", response = GLClosuresApiResourceSwagger.GetGlClosureResponse.class)}) + public String retreiveClosure(@PathParam("glClosureId") @ApiParam(value = "glClosureId") final Long glClosureId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermission); @@ -112,10 +118,14 @@ public class GLClosuresApiResource { return this.apiJsonSerializerService.serialize(settings, glClosureData, RESPONSE_DATA_PARAMETERS); } + // NOTE: proposal slight changes @Aleks @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String createGLClosure(final String jsonRequestBody) { + @ApiOperation(value = "Create an Accounting Closure", notes = "Mandatory Fields\n" + "officeId,closingDate") + @ApiImplicitParams({@ApiImplicitParam(paramType = "body", required = true, type = "body", dataTypeClass = GLClosuresApiResourceSwagger.PostGlClosuresRequest.class, value = "Request Body")}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = GLClosuresApiResourceSwagger.PostGlClosuresResponse.class)}) + public String createGLClosure(@ApiParam(hidden = true) final String jsonRequestBody) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createGLClosure().withJson(jsonRequestBody).build(); @@ -128,7 +138,10 @@ public class GLClosuresApiResource { @Path("{glClosureId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String updateGLClosure(@PathParam("glClosureId") final Long glClosureId, final String jsonRequestBody) { + @ApiOperation(value = "Update an Accounting closure", notes = "Once an accounting closure is created, only the comments associated with it may be edited") + @ApiImplicitParams({@ApiImplicitParam(paramType = "body", value = "Request body", dataType = "body", dataTypeClass = GLClosuresApiResourceSwagger.PutGlClosuresRequest.class, required = true)}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = GLClosuresApiResourceSwagger.PutGlClosuresResponse.class)}) + public String updateGLClosure(@PathParam("glClosureId") @ApiParam(value = "glClosureId") final Long glClosureId, @ApiParam(hidden = true) final String jsonRequestBody) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateGLClosure(glClosureId).withJson(jsonRequestBody).build(); final CommandProcessingResult result = this.commandsSourceWritePlatformService.logCommandSource(commandRequest); @@ -140,7 +153,9 @@ public class GLClosuresApiResource { @Path("{glClosureId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String deleteGLClosure(@PathParam("glClosureId") final Long glClosureId) { + @ApiOperation(value = "Delete an accounting closure", notes = "Note: Only the latest accounting closure associated with a branch may be deleted.") + @ApiResponses({@ApiResponse(code = 200, message = "", response = GLClosuresApiResourceSwagger.DeleteGlClosuresResponse.class)}) + public String deleteGLClosure(@PathParam("glClosureId") @ApiParam(value = "glclosureId") final Long glClosureId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteGLClosure(glClosureId).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/closure/api/GLClosuresApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/closure/api/GLClosuresApiResourceSwagger.java new file mode 100755 index 000000000..704eb76bd --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/closure/api/GLClosuresApiResourceSwagger.java @@ -0,0 +1,133 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.accounting.closure.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.joda.time.LocalDate; + +import java.lang.reflect.Array; +import java.util.ArrayList; + +final class GLClosuresApiResourceSwagger { + private GLClosuresApiResourceSwagger() { + // don't allow to instantiate; use only for live API documentation + } + + /** + * TODO: describe where this belongs: {@link GLClosuresApiResource } + * {@Link GLClosuresApiResource} + */ + // Check !! + + @ApiModel(value = "GetGLClosureResponse") + public static final class GetGlClosureResponse { + private GetGlClosureResponse() { + // dont allow to initiatiate + } + + @ApiModelProperty(example = "7") + public Long id; + @ApiModelProperty(example = "1") + public Long officeId; + @ApiModelProperty(example = "Head Office") + public String officeName; + @ApiModelProperty(example = "2013,1,2") + public LocalDate closingDate; + @ApiModelProperty(example = "false") + public boolean deleted; + @ApiModelProperty(example = "2013,1,3") + public LocalDate createdDate; + @ApiModelProperty(example = "2013,1,3") + public LocalDate lastUpdatedDate; + @ApiModelProperty(example = "1") + public Long createdByUserId; + @ApiModelProperty(example = "mifos") + public String createdByUsername; + @ApiModelProperty(example = "1") + public Long lastUpdatedByUserId; + @ApiModelProperty(example = "mifos") + public String lastUpdatedByUsername; + @ApiModelProperty(example = "closed") + public String comments; + + } + + @ApiModel(value = "PostGLCLosuresRequest") + public static final class PostGlClosuresRequest { + private PostGlClosuresRequest() { + // don't allow to instantiate; use only for live API documentation + } + @ApiModelProperty(example = "1") + public Long officeId; + @ApiModelProperty(example = "06 December 2012") + public LocalDate closingDate; + @ApiModelProperty(example = "The accountants are heading for a carribean vacation") + public String comments; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + } + + @ApiModel(value = "PostGlClosuresResponse") + public static final class PostGlClosuresResponse { + private PostGlClosuresResponse() { + // don't allow to instantiate; use only for live API documentation + } + @ApiModelProperty(example = "1") + public Long officeId; + @ApiModelProperty(example = "9") + public Long resourceId; + } + + @ApiModel(value = "PutGlClosuresRequest") + public static final class PutGlClosuresRequest { + private PutGlClosuresRequest() { + // don't allow to instantiate; use only for live API documentation + } + @ApiModelProperty(example = "All transactions verified by Johnny Cash") + public String comments; + } + + @ApiModel(value = "PutGlClosuresResponse") + public static final class PutGlClosuresResponse{ + private PutGlClosuresResponse() { + // don't allow to instantiate; use only for live API documentation + } + @ApiModelProperty(example = "1") + public Long officeId; + @ApiModelProperty(example = "9") + public Long resourceId; + @ApiModelProperty(example = "All transactions verified by Johnny Cash") + public String comments; + } + + @ApiModel(value = "DeleteGlClosuresResponse") + public static final class DeleteGlClosuresResponse{ + private DeleteGlClosuresResponse(){ + + } + + @ApiModelProperty(example = "1") + public Long officeId; + @ApiModelProperty(example = "9") + public Long resourceId; + } +} \ No newline at end of file diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/financialactivityaccount/api/FinancialActivityAccountsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/financialactivityaccount/api/FinancialActivityAccountsApiResource.java index 19a94fad3..08d8557cc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/financialactivityaccount/api/FinancialActivityAccountsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/financialactivityaccount/api/FinancialActivityAccountsApiResource.java @@ -32,7 +32,9 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.fineract.accounting.financialactivityaccount.data.FinancialActivityAccountData; +import org.apache.fineract.accounting.financialactivityaccount.data.FinancialActivityData; import org.apache.fineract.accounting.financialactivityaccount.service.FinancialActivityAccountReadPlatformService; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; @@ -49,6 +51,7 @@ import org.springframework.stereotype.Component; @Path("/financialactivityaccounts") @Component @Scope("singleton") +@Api(value = "Mapping Financial Activities to Accounts", description = "Organization Level Financial Activities like Asset and Liability Transfer can be mapped to GL Account. Integrated accounting takes these accounts into consideration when an Account transfer is made between a savings to loan/savings account and vice-versa\n" + "\n" +"\nField Descriptions\n" +"financialActivityId\n" +"The identifier of the Financial Activity\n" +"glAccountId\n" +"The identifier of a GL Account ( Ledger Account) which shall be used as the default account for the selected Financial Activity") public class FinancialActivityAccountsApiResource { private final FinancialActivityAccountReadPlatformService financialActivityAccountReadPlatformService; @@ -89,6 +92,8 @@ public class FinancialActivityAccountsApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "List Financial Activities to Accounts Mappings", notes = "Example Requests:\n" + "\n" + "financialactivityaccounts") + @ApiResponses({@ApiResponse(code = 200, message = "", response = FinancialActivityAccountsApiResourceSwagger.GetFinancialActivityAccountsResponse.class, responseContainer = "list" )}) public String retrieveAll(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(FinancialActivityAccountsConstants.resourceNameForPermission); @@ -103,7 +108,9 @@ public class FinancialActivityAccountsApiResource { @Path("{mappingId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retreive(@PathParam("mappingId") final Long mappingId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve a Financial Activity to Account Mapping\n", notes = "Example Requests:\n" + "\n" + "financialactivityaccounts/1") + @ApiResponses({@ApiResponse(code = 200, message = "", response = FinancialActivityAccountsApiResourceSwagger.GetFinancialActivityAccountsResponse.class)}) + public String retreive(@PathParam("mappingId") @ApiParam(value = "mappingId") final Long mappingId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(FinancialActivityAccountsConstants.resourceNameForPermission); @@ -121,7 +128,10 @@ public class FinancialActivityAccountsApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String createGLAccount(final String jsonRequestBody) { + @ApiOperation(value = "Create a new Financial Activity to Accounts Mapping", notes = "Mandatory Fields\n" + "financialActivityId, glAccountId") + @ApiImplicitParams({@ApiImplicitParam(value = "Request body", paramType = "body", dataType = "body", dataTypeClass = FinancialActivityAccountsApiResourceSwagger.PostFinancialActivityAccountsRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = FinancialActivityAccountsApiResourceSwagger.PostFinancialActivityAccountsResponse.class)}) + public String createGLAccount(@ApiParam(hidden = true) final String jsonRequestBody) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createOfficeToGLAccountMapping().withJson(jsonRequestBody) .build(); @@ -135,7 +145,10 @@ public class FinancialActivityAccountsApiResource { @Path("{mappingId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String updateGLAccount(@PathParam("mappingId") final Long mappingId, final String jsonRequestBody) { + @ApiOperation(value = "Update a Financial Activity to Account Mapping", notes = "the API updates the Ledger account linked to a Financial Activity \n") + @ApiImplicitParams({@ApiImplicitParam(value = "Request body", dataType = "body", paramType = "body", dataTypeClass = FinancialActivityAccountsApiResourceSwagger.PostFinancialActivityAccountsRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = FinancialActivityAccountsApiResourceSwagger.PutFinancialActivityAccountsResponse.class)}) + public String updateGLAccount(@PathParam("mappingId") @ApiParam(value = "mappingId") final Long mappingId, @ApiParam(hidden = true) final String jsonRequestBody) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateOfficeToGLAccountMapping(mappingId) .withJson(jsonRequestBody).build(); @@ -149,7 +162,9 @@ public class FinancialActivityAccountsApiResource { @Path("{mappingId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String deleteGLAccount(@PathParam("mappingId") final Long mappingId) { + @ApiOperation(value = "Delete a Financial Activity to Account Mapping") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = FinancialActivityAccountsApiResourceSwagger.DeleteFinancialActivityAccountsResponse.class)}) + public String deleteGLAccount(@PathParam("mappingId") @ApiParam(value = "mappingId") final Long mappingId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteOfficeToGLAccountMapping(mappingId).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/financialactivityaccount/api/FinancialActivityAccountsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/financialactivityaccount/api/FinancialActivityAccountsApiResourceSwagger.java new file mode 100644 index 000000000..21033c9e9 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/financialactivityaccount/api/FinancialActivityAccountsApiResourceSwagger.java @@ -0,0 +1,103 @@ +/** +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ +package org.apache.fineract.accounting.financialactivityaccount.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.apache.fineract.accounting.financialactivityaccount.data.FinancialActivityData; +import org.apache.fineract.accounting.glaccount.data.GLAccountData; + +import java.util.List; +import java.util.Map; + +/** + * Created by sanyam on 24/7/17. + */ +final class FinancialActivityAccountsApiResourceSwagger { + private FinancialActivityAccountsApiResourceSwagger() { + } + + @ApiModel(value = "GetFinancialActivityAccountsResponse") + public static final class GetFinancialActivityAccountsResponse{ + private GetFinancialActivityAccountsResponse() { + + } + @ApiModelProperty(example = "1") + public Long id; + public FinancialActivityData financialActivityData; + public GLAccountData glAccountData; + + } + + @ApiModel(value = "PostFinancialActivityAccountsRequest") + public static final class PostFinancialActivityAccountsRequest{ + private PostFinancialActivityAccountsRequest() { + + } + @ApiModelProperty(example = "200") + public Long financialActivityId; + @ApiModelProperty(example = "2") + public Long glAccountId; + } + + @ApiModel(value = "PostFinancialActivityAccountsResponse") + public static final class PostFinancialActivityAccountsResponse{ + private PostFinancialActivityAccountsResponse() { + + } + @ApiModelProperty(example = "1") + public Long resourceId; + } + + @ApiModel(value = "PutFinancialActivityAccountsRequest") + public static final class PutFinancialActivityAccountsRequest{ + private PutFinancialActivityAccountsRequest() { + + } + @ApiModelProperty(example = "200") + public Long financialActivityId; + @ApiModelProperty(example = "3") + public Long glAccountId; + } + + @ApiModel(value = "PutFinancialActivityAccountsResponse") + public static final class PutFinancialActivityAccountsResponse{ + private PutFinancialActivityAccountsResponse() { + + } + public final class PutFinancialActivityAccountscommentsSwagger{ + private PutFinancialActivityAccountscommentsSwagger(){} + @ApiModelProperty(example = "1") + public Long glAccountId; + } + @ApiModelProperty(example = "1") + public Long resourceId; + public PutFinancialActivityAccountscommentsSwagger comments; + } + + @ApiModel(value = "DeleteFinancialActivityAccountsResponse") + public static final class DeleteFinancialActivityAccountsResponse{ + private DeleteFinancialActivityAccountsResponse() { + + } + @ApiModelProperty(example = "1") + public Long resourceId; + } + +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/api/GLAccountsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/api/GLAccountsApiResource.java index 613911448..956b01482 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/api/GLAccountsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/api/GLAccountsApiResource.java @@ -37,6 +37,8 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; +import io.swagger.models.parameters.HeaderParameter; import org.apache.fineract.accounting.common.AccountingConstants; import org.apache.fineract.accounting.common.AccountingDropdownReadPlatformService; import org.apache.fineract.accounting.glaccount.data.GLAccountData; @@ -61,6 +63,7 @@ import org.springframework.stereotype.Component; @Path("/glaccounts") @Component @Scope("singleton") +@Api(value = "General Ledger Account", description = "Ledger accounts represent an Individual account within an Organizations Chart Of Accounts(COA) and are assigned a name and unique number by which they can be identified. \n" + "All transactions relating to a company's assets, liabilities, owners' equity, revenue and expenses are recorded against these accounts") public class GLAccountsApiResource { private static final Set RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "name", "parentId", "glCode", @@ -98,7 +101,9 @@ public class GLAccountsApiResource { @Path("template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveNewAccountDetails(@Context final UriInfo uriInfo, @QueryParam("type") final Integer type) { + @ApiOperation(value = "Retrieve GL Accounts Template", notes = "This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n" + "\n" + "Field Defaults\n" + "Allowed Value Lists\n" + "Example Request:\n" + "\n" + "glaccounts/template\n" + "glaccounts/template?type=1\n" + "\n" + "type is optional and integer value from 1 to 5.\n" + "\n" + "1.Assets \n" + "2.Liabilities \n" + "3.Equity \n" + "4.Income \n" + "5.Expenses") + @ApiResponses({@ApiResponse(code = 200, message = "", response = GLAccountsApiResourceSwagger.GetGLAccountsTemplateResponse.class)}) + public String retrieveNewAccountDetails(@Context final UriInfo uriInfo, @QueryParam("type") @ApiParam(value = "type") final Integer type) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermission); @@ -112,10 +117,12 @@ public class GLAccountsApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveAllAccounts(@Context final UriInfo uriInfo, @QueryParam("type") final Integer type, - @QueryParam("searchParam") final String searchParam, @QueryParam("usage") final Integer usage, - @QueryParam("manualEntriesAllowed") final Boolean manualEntriesAllowed, @QueryParam("disabled") final Boolean disabled, - @QueryParam("fetchRunningBalance") final boolean runningBalance) { + @ApiOperation(value = "List General Ledger Accounts", notes = "ARGUMENTS\n" + "type Integer optional manualEntriesAllowed boolean optional usage Integer optional disabled boolean optional parentId Long optional tagId Long optional\n" + "Example Requests:\n" + "\n" + "glaccounts\n" + "\n" + "\n" + "glaccounts?type=1&manualEntriesAllowed=true&usage=1&disabled=false\n" + "\n" + "glaccounts?fetchRunningBalance=true") + @ApiResponses({@ApiResponse(code = 200, message = "", response = GLAccountsApiResourceSwagger.GetGLAccountsResponse.class, responseContainer = "list")}) + public String retrieveAllAccounts(@Context final UriInfo uriInfo, @QueryParam("type") @ApiParam(value = "type") final Integer type, + @QueryParam("searchParam") @ApiParam(value = "searchParam") final String searchParam, @QueryParam("usage") @ApiParam(value = "usage") final Integer usage, + @QueryParam("manualEntriesAllowed") @ApiParam(value = "manualEntriesAllowed") final Boolean manualEntriesAllowed, @QueryParam("disabled") @ApiParam(value = "disabled") final Boolean disabled, + @QueryParam("fetchRunningBalance") @ApiParam(value = "fetchRunningBalance") final boolean runningBalance) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermission); JournalEntryAssociationParametersData associationParametersData = new JournalEntryAssociationParametersData(false, runningBalance); @@ -130,8 +137,10 @@ public class GLAccountsApiResource { @Path("{glAccountId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retreiveAccount(@PathParam("glAccountId") final Long glAccountId, @Context final UriInfo uriInfo, - @QueryParam("fetchRunningBalance") final boolean runningBalance) { + @ApiOperation(value = "Retrieve a General Ledger Account", notes = "Example Requests:\n" + "\n" + "glaccounts/1\n" + "\n" + "\n" + "glaccounts/1?template=true\n" + "\n" + "\n" + "glaccounts/1?fields=name,glCode\n" + "\n" + "\n" + "glaccounts/1?fetchRunningBalance=true") + @ApiResponses({@ApiResponse(code = 200, message = "", response = GLAccountsApiResourceSwagger.GetGLAccountsResponse.class)}) + public String retreiveAccount(@PathParam("glAccountId") @ApiParam(value = "glAccountId") final Long glAccountId, @Context final UriInfo uriInfo, + @QueryParam("fetchRunningBalance") @ApiParam(value = "fetchRunningBalance") final boolean runningBalance) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermission); @@ -148,7 +157,10 @@ public class GLAccountsApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String createGLAccount(final String jsonRequestBody) { + @ApiOperation(value = "Create a General Ledger Account", notes = "Note: You may optionally create Hierarchical Chart of Accounts by using the \"parentId\" property of an Account\n" + "Mandatory Fields: \n" + "name, glCode, type, usage and manualEntriesAllowed") + @ApiImplicitParams({@ApiImplicitParam(paramType = "body", value = "body", dataType = "body", dataTypeClass = GLAccountsApiResourceSwagger.PostGLAccountsRequest.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = GLAccountsApiResourceSwagger.PostGLAccountsResponse.class)}) + public String createGLAccount(@ApiParam(hidden = true) final String jsonRequestBody) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createGLAccount().withJson(jsonRequestBody).build(); @@ -161,7 +173,10 @@ public class GLAccountsApiResource { @Path("{glAccountId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String updateGLAccount(@PathParam("glAccountId") final Long glAccountId, final String jsonRequestBody) { + @ApiOperation(value = "Update an Accounting closure", notes = "Once an accounting closure is created, only the comments associated with it may be edited\n" + "\n") + @ApiImplicitParams({@ApiImplicitParam(paramType = "body", value = "body", dataType = "body", dataTypeClass = GLAccountsApiResourceSwagger.PutGLAccountsRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = GLAccountsApiResourceSwagger.PutGLAccountsResponse.class)}) + public String updateGLAccount(@PathParam("glAccountId") @ApiParam(value = "glAccountId") final Long glAccountId, @ApiParam(hidden = true) final String jsonRequestBody) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateGLAccount(glAccountId).withJson(jsonRequestBody).build(); @@ -174,7 +189,9 @@ public class GLAccountsApiResource { @Path("{glAccountId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String deleteGLAccount(@PathParam("glAccountId") final Long glAccountId) { + @ApiOperation(value = "Delete an accounting closure", notes = "Note: Only the latest accounting closure associated with a branch may be deleted.") + @ApiResponses({@ApiResponse(code = 200, message = "", response = GLAccountsApiResourceSwagger.DeleteGLAccountsRequest.class)}) + public String deleteGLAccount(@PathParam("glAccountId") @ApiParam(value = "glAccountId") final Long glAccountId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteGLAccount(glAccountId).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/api/GLAccountsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/api/GLAccountsApiResourceSwagger.java new file mode 100644 index 000000000..e546d6e64 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/api/GLAccountsApiResourceSwagger.java @@ -0,0 +1,190 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.accounting.glaccount.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.apache.fineract.accounting.glaccount.data.GLAccountData; +import org.apache.fineract.infrastructure.codes.data.CodeValueData; +import org.apache.fineract.infrastructure.core.data.EnumOptionData; + +import java.util.Collection; +import java.util.List; + +/** + * Created by sanyam on 24/7/17. + */ +final class GLAccountsApiResourceSwagger { + private GLAccountsApiResourceSwagger() { + + } + + @ApiModel(value = "GetGLAccountsResponse") + public static final class GetGLAccountsResponse{ + private GetGLAccountsResponse(){ + + } + + @ApiModelProperty(example = "16") + public Long id; + + @ApiModelProperty(example = "Cash") + public String name; + + @ApiModelProperty(example = "1") + public Long parentId; + + @ApiModelProperty(example = "100001") + public String glCode; + + @ApiModelProperty(example = "false") + public Boolean disabled; + + @ApiModelProperty(example = "true") + public Boolean manualEntriesAllowed; + + public EnumOptionData type; + public EnumOptionData usage; + + @ApiModelProperty(example = "Desc") + public String description; + + @ApiModelProperty(example = "....Cash") + public String nameDecorated; + + public CodeValueData tagId; + + @ApiModelProperty(example = "118437") + public Long organizationRunningBalance; + } + + @ApiModel(value = "GetGLAccountsTemplateResponse") + public static final class GetGLAccountsTemplateResponse{ + private GetGLAccountsTemplateResponse(){ + + } + + @ApiModelProperty(example = "false") + public Boolean disabled; + + @ApiModelProperty(example = "true") + public Boolean manualEntriesAllowed; + + public EnumOptionData type; + public EnumOptionData usage; + public List accountTypeOptions; + public List usageOptions; + public List assetHeaderAccountOptions; + public List liabilityHeaderAccountOptions; + public List equityHeaderAccountOptions; + public List expenseHeaderAccountOptions; + public Collection allowedAssetsTagOptions; + public Collection allowedLiabilitiesTagOptions; + public Collection allowedEquityTagOptions; + public Collection allowedIncomeTagOptions; + public Collection allowedExpensesTagOptions; + + } + + @ApiModel(value = "PostGLAccountsRequest") + public static final class PostGLAccountsRequest{ + private PostGLAccountsRequest(){ + + } + + @ApiModelProperty(example = "Cash at Bangalore") + public String name; + + @ApiModelProperty(example = "100001") + public String glCode; + + @ApiModelProperty(example = "true") + public Boolean manualEntriesAllowed; + + @ApiModelProperty(example = "1") + public String type; + + @ApiModelProperty(example = "10") + public String tagId; + + @ApiModelProperty(example = "1") + public Long parentId; + + @ApiModelProperty(example = "1") + public EnumOptionData usage; + + @ApiModelProperty(example = "Desc") + public String description; + + } + + @ApiModel(value = "PostGLAccountsResponse") + public static final class PostGLAccountsResponse{ + private PostGLAccountsResponse() { + + } + + @ApiModelProperty(example = "22") + public int resourceId; + } + + @ApiModel(value = "PutGLAccountsRequest") + public static final class PutGLAccountsRequest{ + private PutGLAccountsRequest() { + + } + + @ApiModelProperty(example = "Cash at Bangalore") + public String name; + } + + @ApiModel(value = "PutGLAccountsResponse") + public static final class PutGLAccountsResponse{ + private PutGLAccountsResponse() { + + } + @ApiModel + public static final class PutGLAccountsResponsechangesSwagger{ + private PutGLAccountsResponsechangesSwagger(){} + @ApiModelProperty(example = "Cash at Bangalore") + public String name; + } + @ApiModelProperty(example = "1") + public int resourceId; + public PutGLAccountsResponsechangesSwagger changes; + } + + @ApiModel(value = "DeleteGLAccountsRequest") + public static final class DeleteGLAccountsRequest{ + private DeleteGLAccountsRequest() { + + } + + private static final class DeleteGLAccountsRequestchangesSwagger{ + private DeleteGLAccountsRequestchangesSwagger(){} + + } + + @ApiModelProperty(example = "1") + public int resourceId; + + private DeleteGLAccountsRequestchangesSwagger changes; + } + +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/api/JournalEntriesApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/api/JournalEntriesApiResource.java index 9e66b0b3f..37f48d286 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/api/JournalEntriesApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/api/JournalEntriesApiResource.java @@ -34,7 +34,10 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.commons.lang.StringUtils; +import org.apache.fineract.accounting.journalentry.command.JournalEntryCommand; +import org.apache.fineract.accounting.journalentry.command.SingleDebitOrCreditEntryCommand; import org.apache.fineract.accounting.journalentry.data.JournalEntryAssociationParametersData; import org.apache.fineract.accounting.journalentry.data.JournalEntryData; import org.apache.fineract.accounting.journalentry.data.OfficeOpeningBalancesData; @@ -58,6 +61,7 @@ import org.springframework.stereotype.Component; @Path("/journalentries") @Component @Scope("singleton") +@Api(value = "Journal Entries", description = "A journal entry refers to the logging of transactions against general ledger accounts. A journal entry may consist of several line items, each of which is either a \"debit\" or a \"credit\". The total amount of the debits must equal the total amount of the credits or the journal entry is said to be \"unbalanced\" \n" + "\n" + "A journal entry directly changes the account balances on the general ledger") public class JournalEntriesApiResource { private static final Set RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "officeId", "officeName", @@ -88,15 +92,17 @@ public class JournalEntriesApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveAll(@Context final UriInfo uriInfo, @QueryParam("officeId") final Long officeId, - @QueryParam("glAccountId") final Long glAccountId, @QueryParam("manualEntriesOnly") final Boolean onlyManualEntries, - @QueryParam("fromDate") final DateParam fromDateParam, @QueryParam("toDate") final DateParam toDateParam, - @QueryParam("transactionId") final String transactionId, @QueryParam("entityType") final Integer entityType, - @QueryParam("offset") final Integer offset, @QueryParam("limit") final Integer limit, - @QueryParam("orderBy") final String orderBy, @QueryParam("sortOrder") final String sortOrder, - @QueryParam("locale") final String locale, @QueryParam("dateFormat") final String dateFormat, - @QueryParam("loanId") final Long loanId, @QueryParam("savingsId") final Long savingsId, - @QueryParam("runningBalance") final boolean runningBalance, @QueryParam("transactionDetails") final boolean transactionDetails) { + @ApiOperation(value = "List Journal Entries", notes = "The list capability of journal entries can support pagination and sorting.\n\n" + "Example Requests:\n" + "\n" + "journalentries\n" + "\n" + "journalentries?transactionId=PB37X8Y21EQUY4S\n" + "\n" + "journalentries?officeId=1&manualEntriesOnly=true&fromDate=1 July 2013&toDate=15 July 2013&dateFormat=dd MMMM yyyy&locale=en\n" + "\n" + "journalentries?fields=officeName,glAccountName,transactionDate\n" + "\n" + "journalentries?offset=10&limit=50\n" + "\n" + "journalentries?orderBy=transactionId&sortOrder=DESC\n" + "\n" + "journalentries?runningBalance=true\n" + "\n" + "journalentries?transactionDetails=true\n" + "\n" + "journalentries?loanId=12\n" + "\n" + "journalentries?savingsId=24") + @ApiResponses({@ApiResponse(code = 200, message = "", response = JournalEntryData.class, responseContainer = "list")}) + public String retrieveAll(@Context final UriInfo uriInfo, @QueryParam("officeId") @ApiParam(value = "officeId") final Long officeId, + @QueryParam("glAccountId") @ApiParam(value = "glAccountId") final Long glAccountId, @QueryParam("manualEntriesOnly") @ApiParam(value = "manualEntriesOnly") final Boolean onlyManualEntries, + @QueryParam("fromDate") @ApiParam(value = "fromDate") final DateParam fromDateParam, @QueryParam("toDate") @ApiParam(value = "toDate") final DateParam toDateParam, + @QueryParam("transactionId") @ApiParam(value = "transactionId") final String transactionId, @QueryParam("entityType") @ApiParam(value = "entityType") final Integer entityType, + @QueryParam("offset") @ApiParam(value = "offset") final Integer offset, @QueryParam("limit") @ApiParam(value = "limit") final Integer limit, + @QueryParam("orderBy") @ApiParam(value = "orderBy") final String orderBy, @QueryParam("sortOrder") @ApiParam(value = "sortOrder") final String sortOrder, + @QueryParam("locale") @ApiParam(value = "locale") final String locale, @QueryParam("dateFormat") @ApiParam(value = "dateFormat") final String dateFormat, + @QueryParam("loanId") @ApiParam(value = "loanId") final Long loanId, @QueryParam("savingsId") @ApiParam(value = "savingsId") final Long savingsId, + @QueryParam("runningBalance") @ApiParam(value = "runningBalance") final boolean runningBalance, @QueryParam("transactionDetails") @ApiParam(value = "transactionDetails") final boolean transactionDetails) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermission); @@ -124,8 +130,10 @@ public class JournalEntriesApiResource { @Path("{journalEntryId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retreiveJournalEntryById(@PathParam("journalEntryId") final Long journalEntryId, @Context final UriInfo uriInfo, - @QueryParam("runningBalance") final boolean runningBalance, @QueryParam("transactionDetails") final boolean transactionDetails) { + @ApiOperation(value = "Retrieve a single Entry", notes = "Example Requests:\n" + "\n" + "journalentries/1\n" + "\n" + "\n" + "\n" + "journalentries/1?fields=officeName,glAccountId,entryType,amount\n" + "\n" + "journalentries/1?runningBalance=true\n" + "\n" + "journalentries/1?transactionDetails=true") + @ApiResponses({@ApiResponse(code = 200, message = "", response = JournalEntryData.class)}) + public String retreiveJournalEntryById(@PathParam("journalEntryId") @ApiParam(value = "journalEntryId") final Long journalEntryId, @Context final UriInfo uriInfo, + @QueryParam("runningBalance") @ApiParam(value = "runningBalance") final boolean runningBalance, @QueryParam("transactionDetails") @ApiParam(value = "transactionDetails") final boolean transactionDetails) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermission); JournalEntryAssociationParametersData associationParametersData = new JournalEntryAssociationParametersData(transactionDetails, @@ -140,7 +148,10 @@ public class JournalEntriesApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String createGLJournalEntry(final String jsonRequestBody, @QueryParam("command") final String commandParam) { + @ApiOperation(value = "Create \"Balanced\" Journal Entries", notes = "Note: A Balanced (simple) Journal entry would have atleast one \"Debit\" and one \"Credit\" entry whose amounts are equal \n" + "Compound Journal entries may have \"n\" debits and \"m\" credits where both \"m\" and \"n\" are greater than 0 and the net sum or all debits and credits are equal \n\n" + "\n" + "Mandatory Fields\n" + "officeId, transactionDate\n\n" + "\ncredits- glAccountId, amount, comments\n\n " + "\ndebits- glAccountId, amount, comments\n\n " + "\n" + "Optional Fields\n" + "paymentTypeId, accountNumber, checkNumber, routingCode, receiptNumber, bankNumber") + @ApiImplicitParams({@ApiImplicitParam(paramType = "body", value = "body", dataType = "body", dataTypeClass = JournalEntryCommand.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = JournalEntriesApiResourceSwagger.PostJournalEntriesResponse.class)}) + public String createGLJournalEntry(@ApiParam(hidden = true) final String jsonRequestBody, @QueryParam("command") @ApiParam(value = "command") final String commandParam) { CommandProcessingResult result = null; if (is(commandParam, "updateRunningBalance")) { @@ -162,8 +173,11 @@ public class JournalEntriesApiResource { @Path("{transactionId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String createReversalJournalEntry(final String jsonRequestBody, @PathParam("transactionId") final String transactionId, - @QueryParam("command") final String commandParam) { + @ApiOperation(value = "Update Running balances for Journal Entries", notes = "This API calculates the running balances for office. If office ID not provided this API calculates running balances for all offices. \n" + "Mandatory Fields\n" + "officeId") + @ApiImplicitParams({@ApiImplicitParam(paramType = "body", value = "body", dataType = "body", dataTypeClass = JournalEntriesApiResourceSwagger.PostJournalEntriesTransactionIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = JournalEntriesApiResourceSwagger.PostJournalEntriesTransactionIdResponse.class)}) + public String createReversalJournalEntry(@ApiParam(hidden = true) final String jsonRequestBody, @PathParam("transactionId") @ApiParam(value = "transactionId") final String transactionId, + @QueryParam("command") @ApiParam(value = "command") final String commandParam) { CommandProcessingResult result = null; if (is(commandParam, "reverse")) { final CommandWrapper commandRequest = new CommandWrapperBuilder().reverseJournalEntry(transactionId).withJson(jsonRequestBody) @@ -187,14 +201,14 @@ public class JournalEntriesApiResource { SearchParameters params = SearchParameters.forPagination(offset, limit) ; Page entries = this.journalEntryReadPlatformService.retrieveAll(params, null, null, null, null, transactionId, PortfolioProductType.PROVISIONING.getValue(), null) ; final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters()); - return this.apiJsonSerializerService.serialize(settings, entries, RESPONSE_DATA_PARAMETERS); + return this.apiJsonSerializerService.serialize(settings, entries, RESPONSE_DATA_PARAMETERS); } - + @GET + @Path("openingbalance") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Path("openingbalance") public String retrieveOpeningBalance(@Context final UriInfo uriInfo, @QueryParam("officeId") final Long officeId, @QueryParam("currencyCode") final String currencyCode) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/api/JournalEntriesApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/api/JournalEntriesApiResourceSwagger.java new file mode 100644 index 000000000..981615e96 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/api/JournalEntriesApiResourceSwagger.java @@ -0,0 +1,61 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.accounting.journalentry.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.joda.time.LocalDate; + +/** + * Created by sanyam on 25/7/17. + */ +final class JournalEntriesApiResourceSwagger { + private JournalEntriesApiResourceSwagger(){} + + @ApiModel(value = "PostJournalEntriesResponse") + public static final class PostJournalEntriesResponse { + + private PostJournalEntriesResponse(){ + + } + @ApiModelProperty(value = "1") + public Long officeId; + @ApiModelProperty(value = "RS9MCISID4WK1ZM") + public String transactionId; + + } + + @ApiModel(value = "PostJournalEntriesTransactionIdRequest") + public static final class PostJournalEntriesTransactionIdRequest { + private PostJournalEntriesTransactionIdRequest() { + + } + @ApiModelProperty(value = "1") + public Long officeId; + } + + @ApiModel(value = "PostJournalEntriesTransactionIdResponse") + public static final class PostJournalEntriesTransactionIdResponse { + private PostJournalEntriesTransactionIdResponse() { + + } + @ApiModelProperty(value = "1") + public Long officeId; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/api/ProvisioningEntriesApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/api/ProvisioningEntriesApiResource.java index d5369c206..655094458 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/api/ProvisioningEntriesApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/api/ProvisioningEntriesApiResource.java @@ -29,6 +29,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.fineract.accounting.provisioning.constant.ProvisioningEntriesApiConstants; import org.apache.fineract.accounting.provisioning.data.LoanProductProvisioningEntryData; import org.apache.fineract.accounting.provisioning.data.ProvisioningEntryData; @@ -55,6 +56,7 @@ import java.util.Set; @Path("/provisioningentries") @Component @Scope("singleton") +@Api(value = "Provisioning Entries", description = "This defines the Provisioning Entries for all active loan products\n" + "\n" + "Field Descriptions\n" + "date\n" + "Date on which day provisioning entries should be created\n" + "createjournalentries\n" + "Boolean variable whether to add journal entries for generated provisioning entries\n") public class ProvisioningEntriesApiResource { private final PlatformSecurityContext platformSecurityContext; @@ -84,7 +86,10 @@ public class ProvisioningEntriesApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String createProvisioningEntries(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Create new Provisioning Entries", notes = "Creates a new Provisioning Entries\n" + "\n" + "Mandatory Fields\n" + "date\n" + "dateFormat\n" + "locale\n" + "Optional Fields\n" + "createjournalentries") + @ApiImplicitParams({@ApiImplicitParam(paramType = "body", value = "body", dataType = "body", dataTypeClass = ProvisioningEntriesApiResourceSwagger.PostProvisioningEntriesRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = ProvisioningEntriesApiResourceSwagger.PostProvisioningEntriesResponse.class)}) + public String createProvisioningEntries(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { CommandWrapper commandWrapper = null; this.platformSecurityContext.authenticatedUser(); commandWrapper = new CommandWrapperBuilder().createProvisioningEntries().withJson(apiRequestBodyAsJson).build(); @@ -96,8 +101,11 @@ public class ProvisioningEntriesApiResource { @Path("{entryId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String modifyProvisioningEntry(@PathParam("entryId") final Long entryId, @QueryParam("command") final String commandParam, - final String apiRequestBodyAsJson) { + @ApiOperation(value = "Recreates Provisioning Entry", notes = "Recreates Provisioning Entry | createjournalentry.") + @ApiImplicitParams({@ApiImplicitParam(paramType = "body", value = "body", dataType = "body", dataTypeClass = ProvisioningEntriesApiResourceSwagger.PutProvisioningEntriesRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = ProvisioningEntriesApiResourceSwagger.PutProvisioningEntriesResponse.class)}) + public String modifyProvisioningEntry(@PathParam("entryId") @ApiParam(value = "entryId") final Long entryId, @QueryParam("command") @ApiParam(value = "command=createjournalentry\ncommand=recreateprovisioningentry") final String commandParam, + @ApiParam(hidden = true) final String apiRequestBodyAsJson) { CommandWrapper commandWrapper = null; this.platformSecurityContext.authenticatedUser(); if ("createjournalentry".equals(commandParam)) { @@ -118,7 +126,9 @@ public class ProvisioningEntriesApiResource { @Path("{entryId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveProvisioningEntry(@PathParam("entryId") final Long entryId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieves a Provisioning Entry", notes = "Returns the details of a generated Provisioning Entry.") + @ApiResponses({@ApiResponse(code = 200, message = "", response = ProvisioningEntryData.class)}) + public String retrieveProvisioningEntry(@PathParam("entryId") @ApiParam(value = "entryId") final Long entryId, @Context final UriInfo uriInfo) { platformSecurityContext.authenticatedUser(); ProvisioningEntryData data = this.provisioningEntriesReadPlatformService.retrieveProvisioningEntryData(entryId); final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters()); @@ -129,6 +139,7 @@ public class ProvisioningEntriesApiResource { @Path("entries") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiResponses({@ApiResponse(code = 200, message = "", response = LoanProductProvisioningEntryData.class)}) public String retrieveProviioningEntries(@QueryParam("entryId") final Long entryId, @QueryParam("offset") final Integer offset, @QueryParam("limit") final Integer limit, @QueryParam("officeId") final Long officeId, @QueryParam("productId") final Long productId, @QueryParam("categoryId") final Long categoryId, @Context final UriInfo uriInfo) { @@ -142,7 +153,9 @@ public class ProvisioningEntriesApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveAllProvisioningEntries(@QueryParam("offset") final Integer offset, @QueryParam("limit") final Integer limit, + @ApiOperation(value = "List all Provisioning Entries") + @ApiResponses({@ApiResponse(code = 200, message = "", response = ProvisioningEntryData.class, responseContainer = "list")}) + public String retrieveAllProvisioningEntries(@QueryParam("offset") @ApiParam(value = "offset") final Integer offset, @QueryParam("limit") @ApiParam(value = "limit") final Integer limit, @Context final UriInfo uriInfo) { platformSecurityContext.authenticatedUser(); Page data = this.provisioningEntriesReadPlatformService.retrieveAllProvisioningEntries(offset, limit); diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/api/ProvisioningEntriesApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/api/ProvisioningEntriesApiResourceSwagger.java new file mode 100644 index 000000000..8b77bfbd8 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/api/ProvisioningEntriesApiResourceSwagger.java @@ -0,0 +1,80 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.accounting.provisioning.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * Created by sanyam on 25/7/17. + */ +final class ProvisioningEntriesApiResourceSwagger { + private ProvisioningEntriesApiResourceSwagger() { + // only for Swagger Documentation + } + + @ApiModel(value = "PostProvisioningEntriesRequest") + public static final class PostProvisioningEntriesRequest { + private PostProvisioningEntriesRequest() { + + } + @ApiModelProperty(example = "16 October 2015") + public String date; + + @ApiModelProperty(example = "en") + public String locale; + + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + + @ApiModelProperty(example = "true") + public String createjournalentries; + + public String provisioningentry; + + public String entries; + } + + @ApiModel(value = "PostProvisioningEntriesResponse") + public static final class PostProvisioningEntriesResponse{ + private PostProvisioningEntriesResponse() { + + } + @ApiModelProperty(example = "1") + public Long resourceId; + } + + @ApiModel(value = "PutProvisioningEntriesRequest") + public static final class PutProvisioningEntriesRequest{ + private PutProvisioningEntriesRequest() { + + } + @ApiModelProperty(example = "recreateprovisioningentry") + public String command; + } + + @ApiModel(value = "PutProvisioningEntriesResponse") + public static final class PutProvisioningEntriesResponse{ + private PutProvisioningEntriesResponse() { + + } + @ApiModelProperty(example = "1") + public Long resourceId; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/rule/api/AccountingRuleApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/rule/api/AccountingRuleApiResource.java index 7955f1478..626df9c22 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/rule/api/AccountingRuleApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/rule/api/AccountingRuleApiResource.java @@ -39,6 +39,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.fineract.accounting.common.AccountingConstants; import org.apache.fineract.accounting.glaccount.data.GLAccountData; import org.apache.fineract.accounting.glaccount.service.GLAccountReadPlatformService; @@ -66,6 +67,7 @@ import org.springframework.stereotype.Component; @Path("/accountingrules") @Component @Scope("singleton") +@Api(value = "Accounting Rules", description = "It is typical scenario in MFI's that non accountants pass journal entries on a regular basis. For Ex: A branch office might deposit their entire cash at hand to their Bank account at the end of a working day. The branch office users might not understand enough of accounting to figure out which account needs to get credited and which account needs to be debited to represent this transaction.\n" + "\n" + "Enter accounting rules, an abstraction on top of manual Journal entires for enabling simpler data entry. An accounting rule can define any of the following abstractions\n" + "\n" + "A Simple journal entry where both the credit and debit account have been preselected\n" + "A Simple journal entry where either credit or debit accounts have been limited to a pre-selected list of accounts (Ex: Debit account should be one of \"Bank of America\" of \"JP Morgan\" and credit account should be \"Cash\")\n" + "A Compound journal entry where multiple debits and / or multiple credits may be made amongst a set of preselected list of accounts (Ex: Credit account should be either \"Bank Of America\" or \"Cash\" and debit account can be \"Employee Salary\" and/or \"Miscellenous Expenses\")\n" + "An accounting rule can also be optionally associated with a branch, so that only a particular Branch's users have access to the rule") public class AccountingRuleApiResource { private static final Set RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "officeId", "officeName", @@ -105,6 +107,8 @@ public class AccountingRuleApiResource { @Path("template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Retrieve Accounting Rule Details Template", notes = "This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n" + "\n" + "Field Defaults\n" + "Allowed Value Lists\n" + "Example Request:\n" + "\n" + "accountingrules/template") + @ApiResponses({@ApiResponse(code = 200, message = "", response = AccountingRuleApiResourceSwagger.GetAccountRulesTemplateResponse.class)}) public String retrieveTemplate(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermission); @@ -119,6 +123,8 @@ public class AccountingRuleApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Retrieve Accounting Rules", notes = "Returns the list of defined accounting rules.\n" + "\n" + "Example Requests:\n" + "\n" + "accountingrules") + @ApiResponses({@ApiResponse(code = 200, message = "", response = AccountingRuleApiResourceSwagger.GetAccountRulesResponse.class, responseContainer = "list")}) public String retrieveAllAccountingRules(@Context final UriInfo uriInfo) { final AppUser currentUser = this.context.authenticatedUser(); @@ -147,7 +153,9 @@ public class AccountingRuleApiResource { @Path("{accountingRuleId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retreiveAccountingRule(@PathParam("accountingRuleId") final Long accountingRuleId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve a Accounting rule", notes = "Returns the details of a defined Accounting rule.\n" + "\n" + "Example Requests:\n" + "\n" + "accountingrules/1") + @ApiResponses({@ApiResponse(code = 200, message = "", response = AccountingRuleData.class)}) + public String retreiveAccountingRule(@PathParam("accountingRuleId") @ApiParam(value = "accountingRuleId") final Long accountingRuleId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermission); final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters()); @@ -163,7 +171,10 @@ public class AccountingRuleApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String createAccountingRule(final String jsonRequestBody) { + @ApiOperation(value = "Create/Define a Accounting rule", notes = "Define a new Accounting rule.\n" + "\n" + "Mandatory Fields\n" + "name, officeId,\n" + "accountToDebit OR debitTags,\n" + "accountToCredit OR creditTags.\n" + "\n" + "Optional Fields\n" + "description") + @ApiImplicitParams({@ApiImplicitParam(paramType = "body", value = "body", dataType = "body", dataTypeClass = AccountingRuleApiResourceSwagger.PostAccountingRulesRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = AccountingRuleApiResourceSwagger.PostAccountingRulesResponse.class)}) + public String createAccountingRule(@ApiParam(hidden = true) final String jsonRequestBody) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createAccountingRule().withJson(jsonRequestBody).build(); @@ -176,7 +187,10 @@ public class AccountingRuleApiResource { @Path("{accountingRuleId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String updateAccountingRule(@PathParam("accountingRuleId") final Long accountingRuleId, final String jsonRequestBody) { + @ApiOperation(value = "Update a Accounting Rule", notes = "Updates the details of a Accounting rule.") + @ApiImplicitParams({@ApiImplicitParam(paramType = "body", value = "body", dataType = "body", dataTypeClass = AccountingRuleApiResourceSwagger.PutAccountingRulesRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = AccountingRuleApiResourceSwagger.PutAccountingRulesResponse.class)}) + public String updateAccountingRule(@PathParam("accountingRuleId") @ApiParam(value = "accountingRuleId") final Long accountingRuleId,@ApiParam(hidden = true) final String jsonRequestBody) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateAccountingRule(accountingRuleId).withJson(jsonRequestBody) .build(); @@ -189,7 +203,9 @@ public class AccountingRuleApiResource { @Path("{accountingRuleId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String deleteAccountingRule(@PathParam("accountingRuleId") final Long accountingRuleId) { + @ApiOperation(value = "Delete a Accounting Rule", notes = "Deletes a Accounting rule.") + @ApiResponses({@ApiResponse(code = 200, message = "", response = AccountingRuleApiResourceSwagger.DeleteAccountingRulesResponse.class)}) + public String deleteAccountingRule(@PathParam("accountingRuleId") @ApiParam(value = "accountingRuleId") final Long accountingRuleId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteAccountingRule(accountingRuleId).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/rule/api/AccountingRuleApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/rule/api/AccountingRuleApiResourceSwagger.java new file mode 100644 index 000000000..5f62be23a --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/rule/api/AccountingRuleApiResourceSwagger.java @@ -0,0 +1,130 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.accounting.rule.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.apache.fineract.accounting.glaccount.data.GLAccountData; +import org.apache.fineract.accounting.rule.data.AccountingTagRuleData; +import org.apache.fineract.organisation.office.data.OfficeData; + +import java.util.ArrayList; +import java.util.List; + +/** + * Created by sanyam on 26/7/17. + */ +final class AccountingRuleApiResourceSwagger { + private AccountingRuleApiResourceSwagger() { + // For Swagger Documentation + } + + @ApiModel(value = "GetAccountRulesResponse") + public static final class GetAccountRulesResponse { + private GetAccountRulesResponse() { + + } + + public Long id; + public Long officeId; + public String officeName; + public String name; + public String description; + public boolean systemDefined; + public boolean allowMultipleDebitEntries; + public boolean allowMultipleCreditEntries; + public List creditTags; + public List debitTags; + } + + @ApiModel(value = "GetAccountRulesTemplateResponse") + public static final class GetAccountRulesTemplateResponse { + private GetAccountRulesTemplateResponse() { + + } + + @ApiModelProperty(example = "false") + public boolean systemDefined; + public List allowedOffices = new ArrayList(); + public List allowedAccounts = new ArrayList(); + } + + @ApiModel(value = "PostAccountingRulesRequest") + public static final class PostAccountingRulesRequest { + private PostAccountingRulesRequest() { + + } + + @ApiModelProperty(example = "test") + public String name; + @ApiModelProperty(example = "1") + public Long officeId; + @ApiModelProperty(example = "21") + public Long accountToDebit; + @ApiModelProperty(example = "9") + public Long accountToCredit; + @ApiModelProperty(example = "Employee salary") + public String description; + } + + @ApiModel(value = "PostAccountingRulesResponse") + public static final class PostAccountingRulesResponse { + private PostAccountingRulesResponse() { + + } + @ApiModelProperty(example = "1") + public Long officeId; + @ApiModelProperty(example = "1") + public Long resourceId; + } + + @ApiModel(value = "PutAccountingRulesRequest") + public static final class PutAccountingRulesRequest { + private PutAccountingRulesRequest() { + + } + @ApiModelProperty(example = "Employee Salary posting rule") + public String name; + } + + @ApiModel(value = "PutAccountingRulesResponse") + public static final class PutAccountingRulesResponse { + private PutAccountingRulesResponse () { + + } + + public class PutAccountingRulesResponsechangesSwagger { + public PutAccountingRulesResponsechangesSwagger(){} + @ApiModelProperty(example = "Employee Salary posting rule") + public String name; + } + @ApiModelProperty(example = "1") + public Long resourceId; + public PutAccountingRulesResponsechangesSwagger changes; + } + + @ApiModel(value = "DeleteAccountingRulesResponse") + public static final class DeleteAccountingRulesResponse { + private DeleteAccountingRulesResponse() { + + } + @ApiModelProperty(example = "1") + public Long resourceId; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/api/BatchApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/batch/api/BatchApiResource.java index ca30f71bd..de881e77a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/api/BatchApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/api/BatchApiResource.java @@ -31,6 +31,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.fineract.batch.domain.BatchRequest; import org.apache.fineract.batch.domain.BatchResponse; import org.apache.fineract.batch.serialization.BatchRequestJsonHelper; @@ -59,6 +60,7 @@ import org.springframework.stereotype.Component; @Path("/batches") @Component @Scope("singleton") +@Api(value = "Batch API", description = "The Apache Fineract Batch API enables a consumer to access significant amounts of data in a single call or to make changes to several objects at once. Batching allows a consumer to pass instructions for several operations in a single HTTP request. A consumer can also specify dependencies between related operations. Once all operations have been completed, a consolidated response will be passed back and the HTTP connection will be closed.\n" + "\n" + "The Batch API takes in an array of logical HTTP requests represented as JSON arrays - each request has a requestId (the id of a request used to specify the sequence and as a dependency between requests), a method (corresponding to HTTP method GET/PUT/POST/DELETE etc.), a relativeUrl (the portion of the URL after https://example.org/api/v2/), optional headers array (corresponding to HTTP headers), optional reference parameter if a request is dependent on another request and an optional body (for POST and PUT requests). The Batch API returns an array of logical HTTP responses represented as JSON arrays - each response has a requestId, a status code, an optional headers array and an optional body (which is a JSON encoded string).\n" + "\n" + "Batch API uses Json Path to handle dependent parameters. For example, if request '2' is referencing request '1' and in the \"body\" or in \"relativeUrl\" of request '2', there is a dependent parameter (which will look like \"$.parameter_name\"), then Batch API will internally substitute this dependent parameter from the response body of request '1'.\n" + "\n" + "Batch API is able to handle deeply nested dependent requests as well nested parameters. As shown in the example, requests are dependent on each other as, 1<--2<--6, i.e a nested dependency, where request '6' is not directly dependent on request '1' but still it is one of the nested child of request '1'. In the same way Batch API could handle a deeply nested dependent value, such as {..[..{..,$.parameter_name,..}..]}.") public class BatchApiResource { private final PlatformSecurityContext context; @@ -97,8 +99,11 @@ public class BatchApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String handleBatchRequests(@DefaultValue("false") @QueryParam("enclosingTransaction") final boolean enclosingTransaction, - final String jsonRequestString, @Context UriInfo uriInfo) { + @ApiOperation(value = "Batch requests in a single transaction", httpMethod = "POST", notes = "The Apache Fineract Batch API is also capable of executing all the requests in a single transaction, by setting a Query Parameter, \"enclosingTransaction=true\". So, if one or more of the requests in a batch returns an erroneous response all of the Data base transactions made by other successful requests will be rolled back.\n" + "\n" + "If there has been a rollback in a transaction then a single response will be provided, with a '400' status code and a body consisting of the error details of the first failed request.") + @ApiImplicitParams({@ApiImplicitParam(paramType = "body", dataType = "BatchRequest", required = true, type = "body", dataTypeClass = BatchApiResourceSwagger.PostBatchesRequest.class, value = "request body")}) + @ApiResponses({@ApiResponse(code = 200, message = "Success", response = BatchResponse.class)}) + public String handleBatchRequests(@DefaultValue("false") @QueryParam("enclosingTransaction") @ApiParam(value = "enclosingTransaction", defaultValue = "false") final boolean enclosingTransaction, + @ApiParam(hidden = true) final String jsonRequestString, @Context UriInfo uriInfo) { // Handles user authentication this.context.authenticatedUser(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/api/BatchApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/batch/api/BatchApiResourceSwagger.java new file mode 100644 index 000000000..0aa351464 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/api/BatchApiResourceSwagger.java @@ -0,0 +1,78 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.batch.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.apache.fineract.batch.domain.Header; + +import java.util.Set; + +/** + * Created by sanyam on 26/7/17. + */ +final class BatchApiResourceSwagger { + private BatchApiResourceSwagger() { + + } + + @ApiModel(value = "PostBatchesRequest") + public static final class PostBatchesRequest{ + private PostBatchesRequest() { + + } + + public static final class PostBodyRequestSwagger{ + private PostBodyRequestSwagger() { + + } + + @ApiModelProperty(example = "1") + public Long officeId; + @ApiModelProperty(example = "\"Petra\"") + public String firstname; + @ApiModelProperty(example = "\"Yton\"") + public String lastname; + @ApiModelProperty(example = "\"ex_externalId1\"") + public String externalId; + @ApiModelProperty(example = "\"dd MMMM yyyy\"") + public String dateFormat; + @ApiModelProperty(example = "\"en\"") + public String locale; + @ApiModelProperty(example = "true") + public boolean active; + @ApiModelProperty(example = "\"04 March 2009\"") + public String activationDate; + @ApiModelProperty(example = "\"04 March 2009\"") + public String submittedOnDate; + + } + + @ApiModelProperty(example = "1") + public Long requestId; + @ApiModelProperty(example = "clients") + public String relativeUrl; + @ApiModelProperty(example = "POST") + public String method; + public Set
headers; + @ApiModelProperty(example = "1") + public Long reference; + public PostBodyRequestSwagger body; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/commands/api/AuditsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/commands/api/AuditsApiResource.java index f1b278ad4..4db43e7c9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/commands/api/AuditsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/commands/api/AuditsApiResource.java @@ -33,6 +33,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.commons.lang.StringUtils; import org.apache.fineract.commands.data.AuditData; import org.apache.fineract.commands.data.AuditSearchData; @@ -51,6 +52,7 @@ import org.springframework.stereotype.Component; @Path("/audits") @Component @Scope("singleton") +@Api(value = "Audits",description = "Every non-read Mifos API request is audited. A fully processed request can not be changed or deleted. See maker checker api for situations where an audit is not fully processed.\n" + "\n" + "Permissions: To search and look at audit entries a user needs to be attached to a role that has one of the ALL_FUNCTIONS, ALL_FUNCTIONS_READ or READ_AUDIT permissions.\n" + "\n" + "Data Scope: A user can only see audits that are within their data scope. However, 'head office' users can see all audits including those that aren't office/branch related e.g. Loan Product changes.") public class AuditsApiResource { private final Set RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "actionName", "entityName", "resourceId", @@ -79,17 +81,19 @@ public class AuditsApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveAuditEntries(@Context final UriInfo uriInfo, @QueryParam("actionName") final String actionName, - @QueryParam("entityName") final String entityName, @QueryParam("resourceId") final Long resourceId, - @QueryParam("makerId") final Long makerId, @QueryParam("makerDateTimeFrom") final String makerDateTimeFrom, - @QueryParam("makerDateTimeTo") final String makerDateTimeTo, @QueryParam("checkerId") final Long checkerId, - @QueryParam("checkerDateTimeFrom") final String checkerDateTimeFrom, - @QueryParam("checkerDateTimeTo") final String checkerDateTimeTo, - @QueryParam("processingResult") final Integer processingResult, @QueryParam("officeId") final Integer officeId, - @QueryParam("groupId") final Integer groupId, @QueryParam("clientId") final Integer clientId, - @QueryParam("loanid") final Integer loanId, @QueryParam("savingsAccountId") final Integer savingsAccountId, - @QueryParam("paged") final Boolean paged, @QueryParam("offset") final Integer offset, @QueryParam("limit") final Integer limit, - @QueryParam("orderBy") final String orderBy, @QueryParam("sortOrder") final String sortOrder) { + @ApiOperation(value = "List Audits", notes = "Get a 200 list of audits that match the criteria supplied and sorted by audit id in descending order, and are within the requestors' data scope. Also it supports pagination and sorting\n" + "\n" + "Example Requests:\n" + "\n" + "audits\n" + "\n" + "audits?fields=madeOnDate,maker,processingResult\n" + "\n" + "audits?makerDateTimeFrom=2013-03-25 08:00:00&makerDateTimeTo=2013-04-04 18:00:00\n" + "\n" + "audits?officeId=1\n" + "\n" + "audits?officeId=1&includeJson=true") + @ApiResponses({@ApiResponse(code = 200, message = "", response = MakercheckersApiResourceSwagger.GetMakerCheckerResponse.class, responseContainer = "list")}) + public String retrieveAuditEntries(@Context final UriInfo uriInfo, @QueryParam("actionName") @ApiParam(value = "actionName") final String actionName, + @QueryParam("entityName") @ApiParam(value = "entityName") final String entityName, @QueryParam("resourceId") @ApiParam(value = "resourceId") final Long resourceId, + @QueryParam("makerId") @ApiParam(value = "makerId") final Long makerId, @QueryParam("makerDateTimeFrom") @ApiParam(value = "makerDateTimeFrom") final String makerDateTimeFrom, + @QueryParam("makerDateTimeTo") @ApiParam(value = "makerDateTimeTo") final String makerDateTimeTo, @QueryParam("checkerId") @ApiParam(value = "checkerId") final Long checkerId, + @QueryParam("checkerDateTimeFrom") @ApiParam(value = "checkerDateTimeFrom") final String checkerDateTimeFrom, + @QueryParam("checkerDateTimeTo") @ApiParam(value = "checkerDateTimeTo") final String checkerDateTimeTo, + @QueryParam("processingResult") @ApiParam(value = "processingResult") final Integer processingResult, @QueryParam("officeId") @ApiParam(value = "officeId") final Integer officeId, + @QueryParam("groupId") @ApiParam(value = "groupId") final Integer groupId, @QueryParam("clientId") @ApiParam(value = "clientId") final Integer clientId, + @QueryParam("loanid") @ApiParam(value = "loanid") final Integer loanId, @QueryParam("savingsAccountId") @ApiParam(value = "savingsAccountId") final Integer savingsAccountId, + @QueryParam("paged") @ApiParam(value = "paged") final Boolean paged, @QueryParam("offset") @ApiParam(value = "offset") final Integer offset, @QueryParam("limit") @ApiParam(value = "limit") final Integer limit, + @QueryParam("orderBy") @ApiParam(value = "orderBy") final String orderBy, @QueryParam("sortOrder") @ApiParam(value = "sortOrder") final String sortOrder) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); final PaginationParameters parameters = PaginationParameters.instance(paged, offset, limit, orderBy, sortOrder); @@ -114,7 +118,9 @@ public class AuditsApiResource { @Path("{auditId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveAuditEntry(@PathParam("auditId") final Long auditId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve an Audit Entry", notes = "Example Requests:\n" + "\n" + "audits/20\n" + "audits/20?fields=madeOnDate,maker,processingResult") + @ApiResponses({@ApiResponse(code = 200, message = "", response = MakercheckersApiResourceSwagger.GetMakerCheckerResponse.class)}) + public String retrieveAuditEntry(@PathParam("auditId") @ApiParam(value = "auditId") final Long auditId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -128,6 +134,8 @@ public class AuditsApiResource { @Path("/searchtemplate") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Audit Search Template", notes = "This is a convenience resource. It can be useful when building an Audit Search UI. \"appUsers\" are data scoped to the office/branch the requestor is associated with.\n" + "\n" + "Example Requests:\n" + "\n" + "audits/searchtemplate\n" + "audits/searchtemplate?fields=actionNames") + @ApiResponses({@ApiResponse(code = 200, message = "", response = MakercheckersApiResourceSwagger.GetMakerCheckersSearchTemplateResponse.class)}) public String retrieveAuditSearchTemplate(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); diff --git a/fineract-provider/src/main/java/org/apache/fineract/commands/api/MakercheckersApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/commands/api/MakercheckersApiResource.java index 327fee155..6916266c9 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/commands/api/MakercheckersApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/commands/api/MakercheckersApiResource.java @@ -35,6 +35,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.commons.lang.StringUtils; import org.apache.fineract.commands.data.AuditData; import org.apache.fineract.commands.data.AuditSearchData; @@ -53,6 +54,7 @@ import org.springframework.stereotype.Component; @Path("/makercheckers") @Component @Scope("singleton") +@Api(value = "Maker Checker (or 4-eye) functionality") public class MakercheckersApiResource { private final Set RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "actionName", "entityName", "resourceId", @@ -80,12 +82,14 @@ public class MakercheckersApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveCommands(@Context final UriInfo uriInfo, @QueryParam("actionName") final String actionName, - @QueryParam("entityName") final String entityName, @QueryParam("resourceId") final Long resourceId, - @QueryParam("makerId") final Long makerId, @QueryParam("makerDateTimeFrom") final String makerDateTimeFrom, - @QueryParam("makerDateTimeTo") final String makerDateTimeTo, @QueryParam("officeId") final Integer officeId, - @QueryParam("groupId") final Integer groupId, @QueryParam("clientId") final Integer clientId, - @QueryParam("loanid") final Integer loanId, @QueryParam("savingsAccountId") final Integer savingsAccountId) { + @ApiOperation(value = "List Maker Checker Entries", notes = "Get a list of entries that can be checked by the requestor that match the criteria supplied.\n" + "\n" + "Example Requests:\n" + "\n" + "makercheckers\n" + "\n" + "makercheckers?fields=madeOnDate,maker,processingResult\n" + "\n" + "makercheckers?makerDateTimeFrom=2013-03-25 08:00:00&makerDateTimeTo=2013-04-04 18:00:00\n" + "\n" + "makercheckers?officeId=1\n" + "\n" + "makercheckers?officeId=1&includeJson=true") + @ApiResponses({@ApiResponse(code = 200, message = "", response = MakercheckersApiResourceSwagger.GetMakerCheckerResponse.class, responseContainer = "list")}) + public String retrieveCommands(@Context final UriInfo uriInfo, @QueryParam("actionName") @ApiParam(value = "actionName") final String actionName, + @QueryParam("entityName") @ApiParam(value = "entityName") final String entityName, @QueryParam("resourceId") @ApiParam(value = "resourceId") final Long resourceId, + @QueryParam("makerId") @ApiParam(value = "makerId") final Long makerId, @QueryParam("makerDateTimeFrom") @ApiParam(value = "makerDateTimeFrom") final String makerDateTimeFrom, + @QueryParam("makerDateTimeTo") @ApiParam(value = "makerDateTimeTo") final String makerDateTimeTo, @QueryParam("officeId") @ApiParam(value = "officeId") final Integer officeId, + @QueryParam("groupId") @ApiParam(value = "groupId") final Integer groupId, @QueryParam("clientId") @ApiParam(value = "clientId") final Integer clientId, + @QueryParam("loanid") @ApiParam(value = "loanid") final Integer loanId, @QueryParam("savingsAccountId") @ApiParam(value = "savingsAccountId") final Integer savingsAccountId) { final String extraCriteria = getExtraCriteria(actionName, entityName, resourceId, makerId, makerDateTimeFrom, makerDateTimeTo, officeId, groupId, clientId, loanId, savingsAccountId); @@ -102,6 +106,8 @@ public class MakercheckersApiResource { @Path("/searchtemplate") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Maker Checker Search Template", notes = "This is a convenience resource. It can be useful when building a Checker Inbox UI. \"appUsers\" are data scoped to the office/branch the requestor is associated with. \"actionNames\" and \"entityNames\" returned are those that the requestor has Checker approval permissions for.\n" + "\n" + "Example Requests:\n" + "\n" + "makercheckers/searchtemplate\n" + "makercheckers/searchtemplate?fields=entityNames") + @ApiResponses({@ApiResponse(code = 200, message = "", response = MakercheckersApiResourceSwagger.GetMakerCheckersSearchTemplateResponse.class)}) public String retrieveAuditSearchTemplate(@Context final UriInfo uriInfo) { final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters()); @@ -118,7 +124,9 @@ public class MakercheckersApiResource { @Path("{auditId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String approveMakerCheckerEntry(@PathParam("auditId") final Long auditId, @QueryParam("command") final String commandParam) { + @ApiOperation(value = "Approve Maker Checker Entry | Reject Maker Checker Entry") + @ApiResponses({@ApiResponse(code = 200, message = "", response = MakercheckersApiResourceSwagger.PostMakerCheckersResponse.class)}) + public String approveMakerCheckerEntry(@PathParam("auditId") @ApiParam(value = "auditId") final Long auditId, @QueryParam("command") @ApiParam(value = "command") final String commandParam) { CommandProcessingResult result = null; if (is(commandParam, "approve")) { @@ -140,7 +148,9 @@ public class MakercheckersApiResource { @Path("{auditId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String deleteMakerCheckerEntry(@PathParam("auditId") final Long auditId) { + @ApiOperation(value = "Delete Maker Checker Entry") + @ApiResponses({@ApiResponse(code = 200, message = "", response = MakercheckersApiResourceSwagger.PostMakerCheckersResponse.class)}) + public String deleteMakerCheckerEntry(@PathParam("auditId") @ApiParam(value = "auditId") final Long auditId) { final Long id = this.writePlatformService.deleteEntry(auditId); diff --git a/fineract-provider/src/main/java/org/apache/fineract/commands/api/MakercheckersApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/commands/api/MakercheckersApiResourceSwagger.java new file mode 100644 index 000000000..8b41b6890 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/commands/api/MakercheckersApiResourceSwagger.java @@ -0,0 +1,87 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.commands.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.apache.fineract.commands.data.ProcessingResultLookup; +import org.apache.fineract.useradministration.data.AppUserData; +import org.joda.time.DateTime; + +import java.util.Collection; +import java.util.List; + +/** + * Created by sanyam on 27/7/17. + */ +final class MakercheckersApiResourceSwagger { + private MakercheckersApiResourceSwagger() { + // only to initialize swagger documentation + } + + @ApiModel(value = "GetMakerCheckerResponse") + public static final class GetMakerCheckerResponse{ + private GetMakerCheckerResponse() { + + } + public Long id; + public String actionName; + public String entityName; + public Long resourceId; + public Long subresourceId; + public String maker; + public DateTime madeOnDate; + public String checker; + public DateTime checkedOnDate; + public String processingResult; + public String commandAsJson; + public String officeName; + public String groupLevelName; + public String groupName; + public String clientName; + public String loanAccountNo; + public String savingsAccountNo; + public Long clientId; + public Long loanId; + public String url; + + + } + + @ApiModel(value = "GetMakerCheckersSearchTemplateResponse") + public static final class GetMakerCheckersSearchTemplateResponse{ + private GetMakerCheckersSearchTemplateResponse() { + + } + public Collection appUsers; + public List actionNames; + public List entityNames; + public Collection processingResults; + } + + @ApiModel(value = "PostMakerCheckersResponse") + public static final class PostMakerCheckersResponse{ + private PostMakerCheckersResponse() { + + } + @ApiModelProperty(example = "1") + public Long auditId; + + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/api/AccountNumberFormatsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/api/AccountNumberFormatsApiResource.java index 5d9601fda..df17186e7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/api/AccountNumberFormatsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/api/AccountNumberFormatsApiResource.java @@ -35,6 +35,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -54,6 +55,7 @@ import org.springframework.stereotype.Component; @Path(AccountNumberFormatConstants.resourceRelativeURL) @Component @Scope("singleton") +@Api(value = "Account number format", description = "Account number preferences are used to describe custom formats for account numbers associated with Customer, Loan and Savings accounts." ) public class AccountNumberFormatsApiResource { private final PlatformSecurityContext context; @@ -83,6 +85,8 @@ public class AccountNumberFormatsApiResource { @Path("template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Retrieve Account number format Template", notes = "This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n" + "\n" + "Field Defaults\n" + "Allowed Value Lists\n" + "\n" + "Example Request:\n" + "\n" + "accountnumberformats/template") + @ApiResponses({@ApiResponse(code = 200, message = "", response = AccountNumberFormatsApiResourceSwagger.GetAccountNumberFormatsResponseTemplate.class)}) public String retrieveTemplate(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(AccountNumberFormatConstants.ENTITY_NAME); @@ -98,6 +102,8 @@ public class AccountNumberFormatsApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "List Account number formats", notes = "Example Requests:\n" + "\n" + "accountnumberformats\n" + "\n" + "\n" + "accountnumberformats?fields=accountType,prefixType", responseContainer = "List") + @ApiResponses({@ApiResponse(code = 200, message = "", response = AccountNumberFormatsApiResourceSwagger.GetAccountNumberFormatsIdResponse.class, responseContainer = "List")}) public String retrieveAll(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(AccountNumberFormatConstants.ENTITY_NAME); @@ -114,7 +120,9 @@ public class AccountNumberFormatsApiResource { @Path("{accountNumberFormatId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveOne(@Context final UriInfo uriInfo, @PathParam("accountNumberFormatId") final Long accountNumberFormatId) { + @ApiOperation(value = "Retrieve an Account number format", notes = "Example Requests:\n" + "\n" + "accountnumberformats/1\n" + "\n" + "\n" + "accountnumberformats/1?template=true\n" + "\n" + "\n" + "accountnumberformats/1?fields=accountType,prefixType") + @ApiResponses({@ApiResponse(code = 200, message = "", response = AccountNumberFormatsApiResourceSwagger.GetAccountNumberFormatsIdResponse.class)}) + public String retrieveOne(@Context final UriInfo uriInfo, @PathParam("accountNumberFormatId") @ApiParam(value = "accountNumberFormatId") final Long accountNumberFormatId) { this.context.authenticatedUser().validateHasReadPermission(AccountNumberFormatConstants.ENTITY_NAME); @@ -135,7 +143,10 @@ public class AccountNumberFormatsApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String create(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Create an Account number format", notes = "Note: You may associate a single Account number format for a given account type\n" + "Mandatory Fields for Account number formats\n" + "accountType") + @ApiImplicitParams({@ApiImplicitParam(value = "body", paramType = "body", dataType = "body", format = "body", dataTypeClass = AccountNumberFormatsApiResourceSwagger.PostAccountNumberFormatsRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = AccountNumberFormatsApiResourceSwagger.PostAccountNumberFormatsResponse.class)}) + public String create(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // .createAccountNumberFormat() // @@ -151,7 +162,10 @@ public class AccountNumberFormatsApiResource { @Path("{accountNumberFormatId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String update(@PathParam("accountNumberFormatId") final Long accountNumberFormatId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update an Account number format") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true,paramType = "body", dataType = "body", format = "body", dataTypeClass = AccountNumberFormatsApiResourceSwagger.PutAccountNumberFormatsRequest.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = AccountNumberFormatsApiResourceSwagger.PutAccountNumberFormatsResponse.class)}) + public String update(@PathParam("accountNumberFormatId") @ApiParam(value = "accountNumberFormatId") final Long accountNumberFormatId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // .updateAccountNumberFormat(accountNumberFormatId) // @@ -167,7 +181,9 @@ public class AccountNumberFormatsApiResource { @Path("{accountNumberFormatId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String delete(@PathParam("accountNumberFormatId") final Long accountNumberFormatId) { + @ApiOperation(value = "Delete an Account number format", notes = "Note: Account numbers created while this format was active would remain unchanged.") + @ApiResponses({@ApiResponse(code = 200, message = "", response = AccountNumberFormatsApiResourceSwagger.DeleteAccountNumberFormatsResponse.class)}) + public String delete(@PathParam("accountNumberFormatId") @ApiParam(value = "accountNumberFormatId") final Long accountNumberFormatId) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // .deleteAccountNumberFormat(accountNumberFormatId) // diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/api/AccountNumberFormatsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/api/AccountNumberFormatsApiResourceSwagger.java new file mode 100644 index 000000000..4dac2f58c --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/api/AccountNumberFormatsApiResourceSwagger.java @@ -0,0 +1,129 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.infrastructure.accountnumberformat.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.apache.fineract.infrastructure.core.data.EnumOptionData; + +import java.util.List; +import java.util.Map; + +/** + * Created by sanyam on 28/7/17. + */ +final class AccountNumberFormatsApiResourceSwagger { + private AccountNumberFormatsApiResourceSwagger() { + // this class is only for Swagger implementation for Live Documentation + } + + @ApiModel(value = "GetAccountNumberFormatsResponse") + public static final class GetAccountNumberFormatsResponse { + private GetAccountNumberFormatsResponse() { + + } +// public List _; + + } + + @ApiModel(value = "GetAccountNumberFormatsIdResponse") + public static final class GetAccountNumberFormatsIdResponse { + private GetAccountNumberFormatsIdResponse() { + + } + @ApiModelProperty(example = "2") + public Long id; + public EnumOptionData accountType; + + public EnumOptionData prefixType; + + } + + @ApiModel(value = "GetAccountNumberFormatsResponseTemplate") + public static final class GetAccountNumberFormatsResponseTemplate { + private GetAccountNumberFormatsResponseTemplate() { + + } + public List accountTypeOptions; + public Map> prefixTypeOptions; + + } + + @ApiModel(value = "PostAccountNumberFormatsRequest") + public static final class PostAccountNumberFormatsRequest { + private PostAccountNumberFormatsRequest() { + + } + @ApiModelProperty(example = "1") + public Long accountType; + @ApiModelProperty(example = "101") + public Long prefixType; + + } + + @ApiModel(value = "PostAccountNumberFormatsResponse") + public static final class PostAccountNumberFormatsResponse { + private PostAccountNumberFormatsResponse() { + + } + @ApiModelProperty(example = "4") + public Long resourceId; + + } + + @ApiModel(value = "PutAccountNumberFormatsRequest") + public static final class PutAccountNumberFormatsRequest { + private PutAccountNumberFormatsRequest() { + + } + @ApiModelProperty(example = "1") + public Long prefixType; + + } + + @ApiModel(value = "PutAccountNumberFormatsResponse") + public static final class PutAccountNumberFormatsResponse { + private PutAccountNumberFormatsResponse() { + + } + public static final class PutAccountNumberFormatschangesSwagger { + private PutAccountNumberFormatschangesSwagger() { + + } + @ApiModelProperty(example = "OFFICE_NAME") + public Long prefixType; + } + + @ApiModelProperty(example = "2") + public Long resourceId; + public PutAccountNumberFormatschangesSwagger changes; + + } + + @ApiModel(value = "DeleteAccountNumberFormatsResponse") + public static final class DeleteAccountNumberFormatsResponse { + private DeleteAccountNumberFormatsResponse() { + + } + @ApiModelProperty(example = "2") + public Long resourceId; + + } + +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/cache/api/CacheApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/cache/api/CacheApiResource.java index fd3d1d3bf..982b50df4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/cache/api/CacheApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/cache/api/CacheApiResource.java @@ -32,6 +32,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -52,6 +53,7 @@ import org.springframework.stereotype.Component; @Produces({ MediaType.APPLICATION_JSON }) @Component @Scope("singleton") +@Api(value = "Cache", description = "The following settings are possible for cache:\n" + "\n" + "No Caching: caching turned off\n" + "Single node: caching on for single instance deployments of platorm (works for multiple tenants but only one tomcat)\n" + "By default caching is set to No Caching. Switching between caches results in the cache been clear e.g. from Single node to No cache and back again would clear down the single node cache.") public class CacheApiResource { private final Set RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id")); @@ -76,6 +78,8 @@ public class CacheApiResource { } @GET + @ApiOperation(value = "Retrieve Cache Types", notes = "Returns the list of caches.\n" + "\n" + "Example Requests:\n" + "\n" + "caches") + @ApiResponses({@ApiResponse(code = 200, message = "", response = CacheApiResourceSwagger.GetCachesResponse.class, responseContainer = "list")}) public String retrieveAll(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -87,7 +91,10 @@ public class CacheApiResource { } @PUT - public String switchCache(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Switch Cache", notes = "Switches the cache to chosen one.") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = CacheApiResourceSwagger.PutCachesRequest.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = CacheApiResourceSwagger.PutCachesResponse.class)}) + public String switchCache(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateCache().withJson(apiRequestBodyAsJson).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/cache/api/CacheApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/cache/api/CacheApiResourceSwagger.java new file mode 100644 index 000000000..6cd4b860b --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/cache/api/CacheApiResourceSwagger.java @@ -0,0 +1,68 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.infrastructure.cache.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.apache.fineract.infrastructure.core.data.EnumOptionData; + +/** + * Created by sanyam on 28/7/17. + */ +final class CacheApiResourceSwagger { + private CacheApiResourceSwagger() { + + } + + @ApiModel(value = "GetCachesResponse") + public static final class GetCachesResponse { + private GetCachesResponse() { + + } + public EnumOptionData cacheType; + public boolean enabled; + } + + @ApiModel(value = "PutCachesRequest") + public static final class PutCachesRequest { + private PutCachesRequest() { + + } + @ApiModelProperty(example = "2") + public Long cacheType; + + } + + @ApiModel(value = "PutCachesResponse") + public static final class PutCachesResponse { + private PutCachesResponse() { + + } + public static final class PutCachechangesSwagger{ + private PutCachechangesSwagger() { + + } + @ApiModelProperty(example = "2") + public Long cacheType; + + } + public PutCachechangesSwagger cacheType; + + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/api/SmsCampaignApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/api/SmsCampaignApiResource.java index 54e714c3d..1a49ce245 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/api/SmsCampaignApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/api/SmsCampaignApiResource.java @@ -33,6 +33,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.commons.lang.StringUtils; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; @@ -61,6 +62,7 @@ import com.google.gson.JsonElement; @Path("/smscampaigns") @Component @Scope("singleton") +@Api(value = "SMS Campaigns") public class SmsCampaignApiResource { private final PlatformSecurityContext platformSecurityContext; @@ -96,6 +98,8 @@ public class SmsCampaignApiResource { @GET @Path("template") + @ApiOperation(value = "Retrieve a SMS Campaign", notes = "Example Requests:\n" + "\n" + "smscampaigns/1\n" + "\n" + "\n" + "smscampaigns/1?template=true\n" + "\n" + "\n" + "smscampaigns/template") + @ApiResponse(code = 200, message = "", response = SmsCampaignData.class) public String template(@Context final UriInfo uriInfo) { this.platformSecurityContext.authenticatedUser().validateHasReadPermission(SmsCampaignConstants.RESOURCE_NAME); final SmsCampaignData smsCampaignData = this.smsCampaignReadPlatformService.retrieveTemplate(CampaignType.SMS.name()); @@ -106,7 +110,10 @@ public class SmsCampaignApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String createCampaign(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Create a SMS Campaign", notes = "Mandatory Fields\n" + "campaignName, campaignType, triggerType, providerId, runReportId, message\n" + "\n" + "Mandatory Fields for Cash based on selected report id\n" + "paramValue in json format") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass =CommandWrapper.class)}) + @ApiResponse(code = 200, message = "", response = CommandProcessingResult.class) + public String createCampaign(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { this.platformSecurityContext.authenticatedUser(); final CommandWrapper commandRequest = new CommandWrapperBuilder().createSmsCampaign().withJson(apiRequestBodyAsJson).build(); final CommandProcessingResult result = this.commandsSourceWritePlatformService.logCommandSource(commandRequest); @@ -116,6 +123,8 @@ public class SmsCampaignApiResource { @GET @Path("{resourceId}") @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Retrieve a SMS Campaign", notes = "Example Requests:\n" + "\n" + "smscampaigns/1\n") + @ApiResponse(code = 200, message = "", response = SmsCampaignData.class) public String retrieveCampaign(@PathParam("resourceId") final Long resourceId, @Context final UriInfo uriInfo) { this.platformSecurityContext.authenticatedUser().validateHasReadPermission(SmsCampaignConstants.RESOURCE_NAME); SmsCampaignData smsCampaignData = this.smsCampaignReadPlatformService.retrieveOne(resourceId); @@ -126,6 +135,8 @@ public class SmsCampaignApiResource { @GET @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "List SMS Campaigns", notes = "Example Requests:\n" + "\n" + "smscampaigns") + @ApiResponse(code = 200, message = "", response = SmsCampaignData.class) public String retrieveAllCampaigns(@QueryParam("sqlSearch") final String sqlSearch, @QueryParam("offset") final Integer offset, @QueryParam("limit") final Integer limit, @QueryParam("orderBy") final String orderBy, @QueryParam("sortOrder") final String sortOrder, @Context final UriInfo uriInfo) { @@ -140,7 +151,10 @@ public class SmsCampaignApiResource { @Path("{campaignId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String updateCampaign(@PathParam("campaignId") final Long campaignId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update a Campaign") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = CommandWrapper.class)}) + @ApiResponse(code = 200, message = "", response = CommandProcessingResult.class) + public String updateCampaign(@PathParam("campaignId") final Long campaignId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateSmsCampaign(campaignId).withJson(apiRequestBodyAsJson) .build(); final CommandProcessingResult result = this.commandsSourceWritePlatformService.logCommandSource(commandRequest); @@ -151,8 +165,10 @@ public class SmsCampaignApiResource { @Path("{campaignId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "SMS Campaign", notes = "Activates | Deactivates | Reactivates") + @ApiResponse(code = 200, message = "", response = CommandProcessingResult.class) public String handleCommands(@PathParam("campaignId") final Long campaignId, @QueryParam("command") final String commandParam, - final String apiRequestBodyAsJson) { + @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapperBuilder builder = new CommandWrapperBuilder().withJson(apiRequestBodyAsJson); CommandProcessingResult result = null; CommandWrapper commandRequest = null; @@ -187,6 +203,8 @@ public class SmsCampaignApiResource { @DELETE @Path("{campaignId}") + @ApiOperation(value = "Delete a SMS Campaign", notes = "Note: Only closed SMS Campaigns can be deleted") + @ApiResponse(code = 200, message = "", response = CommandProcessingResult.class) public String delete(@PathParam("campaignId") final Long campaignId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteSmsCampaign(campaignId).build(); final CommandProcessingResult result = this.commandsSourceWritePlatformService.logCommandSource(commandRequest); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/api/CodeValuesApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/api/CodeValuesApiResource.java index 4c9faa315..060e1dfe4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/api/CodeValuesApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/api/CodeValuesApiResource.java @@ -35,6 +35,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -54,6 +55,7 @@ import org.springframework.stereotype.Component; @Path("/codes/{codeId}/codevalues") @Component @Scope("singleton") +@Api(value = "Code Values", description = "Code and code values: Codes represent a specific category of data, their code values are a specific instance of that category.\n" + "\n" + "Codes are mostly system defined which means the code itself comes out of the box and cannot be modified however its code values can be. e.g. 'Customer Identifier', it defaults to a code value of 'Passport' but could be 'Drivers License, National Id' etc") public class CodeValuesApiResource { /** @@ -86,7 +88,9 @@ public class CodeValuesApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveAllCodeValues(@Context final UriInfo uriInfo, @PathParam("codeId") final Long codeId) { + @ApiOperation(value = "List Code Values", notes = "Returns the list of Code Values for a given Code\n" + "\n" + "Example Requests:\n" + "\n" + "codes/1/codevalues") + @ApiResponses({@ApiResponse(code = 200, message = "A List of Given response", response = CodeValuesApiResourceSwagger.GetCodeValuesDataResponse.class, responseContainer = "list")}) + public String retrieveAllCodeValues(@Context final UriInfo uriInfo, @PathParam("codeId") @ApiParam(value = "codeId") final Long codeId) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -100,7 +104,9 @@ public class CodeValuesApiResource { @Path("{codeValueId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveCodeValue(@Context final UriInfo uriInfo, @PathParam("codeValueId") final Long codeValueId) { + @ApiOperation(value = "Retrieve a Code Value", notes = "Returns the details of a Code Value\n" + "\n" + "Example Requests:\n" + "\n" + "codes/1/codevalues/1") + @ApiResponses({@ApiResponse(code = 200, message = "", response = CodeValuesApiResourceSwagger.GetCodeValuesDataResponse.class)}) + public String retrieveCodeValue(@Context final UriInfo uriInfo, @PathParam("codeValueId") @ApiParam(value = "codeValueId") final Long codeValueId) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -113,7 +119,10 @@ public class CodeValuesApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String createCodeValue(@PathParam("codeId") final Long codeId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Create a Code Value", notes = "") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = CodeValuesApiResourceSwagger.PostCodeValuesDataRequest.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = CodeValuesApiResourceSwagger.PostCodeValueDataResponse.class)}) + public String createCodeValue(@PathParam("codeId") @ApiParam(value = "codeId") final Long codeId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createCodeValue(codeId).withJson(apiRequestBodyAsJson).build(); @@ -127,8 +136,11 @@ public class CodeValuesApiResource { @Path("{codeValueId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String updateCodeValue(@PathParam("codeId") final Long codeId, @PathParam("codeValueId") final Long codeValueId, - final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update a Code Value", notes = "Updates the details of a code value.") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = CodeValuesApiResourceSwagger.PutCodeValuesDataRequest.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = CodeValuesApiResourceSwagger.PutCodeValueDataResponse.class)}) + public String updateCodeValue(@PathParam("codeId") @ApiParam(value = "codeId") final Long codeId, @PathParam("codeValueId") @ApiParam(value = "codeValueId") final Long codeValueId, + @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateCodeValue(codeId, codeValueId) .withJson(apiRequestBodyAsJson).build(); @@ -142,7 +154,9 @@ public class CodeValuesApiResource { @Path("{codeValueId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String deleteCodeValue(@PathParam("codeId") final Long codeId, @PathParam("codeValueId") final Long codeValueId) { + @ApiOperation(value = "Delete a Code Value", notes = "Deletes a code value") + @ApiResponses({@ApiResponse(code = 200, message = "", response = CodeValuesApiResourceSwagger.DeleteCodeValueDataResponse.class)}) + public String deleteCodeValue(@PathParam("codeId") @ApiParam(value = "codeId") final Long codeId, @PathParam("codeValueId") @ApiParam(value = "codeValueId") final Long codeValueId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteCodeValue(codeId, codeValueId).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/api/CodeValuesApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/api/CodeValuesApiResourceSwagger.java new file mode 100644 index 000000000..636577492 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/api/CodeValuesApiResourceSwagger.java @@ -0,0 +1,109 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.infrastructure.codes.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * Created by sanyam on 30/7/17. + */ +final class CodeValuesApiResourceSwagger { + private CodeValuesApiResourceSwagger() { + + } + + @ApiModel(value = "GetCodeValuesDataResponse") + public static final class GetCodeValuesDataResponse { + private GetCodeValuesDataResponse() { + + } + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "Passport") + public String name; + @ApiModelProperty(example = "Passport information") + public String description; + @ApiModelProperty(example = "0") + public Integer position; + } + + @ApiModel(value = "PostCodeValuesDataRequest") + public static final class PostCodeValuesDataRequest { + private PostCodeValuesDataRequest() { + + } + @ApiModelProperty(example = "Passport") + public String name; + @ApiModelProperty(example = "Passport information") + public String description; + @ApiModelProperty(example = "0") + public Integer position; + } + + @ApiModel(value = "PostCodeValueDataResponse") + public static final class PostCodeValueDataResponse { + private PostCodeValueDataResponse() { + + } + @ApiModelProperty(example = "4") + public Long resourceId; + } + + @ApiModel(value = "PutCodeValuesDataRequest") + public static final class PutCodeValuesDataRequest { + private PutCodeValuesDataRequest() { + + } + @ApiModelProperty(example = "Passport") + public String name; + @ApiModelProperty(example = "Passport information") + public String description; + @ApiModelProperty(example = "0") + public Integer position; + } + + @ApiModel(value = "PutCodeValueDataResponse") + public static final class PutCodeValueDataResponse { + private PutCodeValueDataResponse() { + + } + private final class PutCodeValuechangesSwagger{ + private PutCodeValuechangesSwagger() {} + @ApiModelProperty(example = "Passport") + public String name; + @ApiModelProperty(example = "Passport information") + public String description; + @ApiModelProperty(example = "0") + public Integer position; + } + @ApiModelProperty(example = "4") + public Long resourceId; + public PutCodeValuechangesSwagger changes; + } + + @ApiModel(value = "DeleteCodeValueDataResponse") + public static final class DeleteCodeValueDataResponse { + private DeleteCodeValueDataResponse() { + + } + @ApiModelProperty(example = "4") + public Long resourceId; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/api/CodesApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/api/CodesApiResource.java index 332657494..b53c22ede 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/api/CodesApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/api/CodesApiResource.java @@ -35,6 +35,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -52,6 +53,7 @@ import org.springframework.stereotype.Component; @Path("/codes") @Component @Scope("singleton") +@Api(value = "Codes", description = "Code and code values: Codes represent a specific category of data, their code values are a specific instance of that category.\n" + "\n" + "Codes are mostly system defined which means the code itself comes out of the box and cannot be modified however its code values can be. e.g. 'Customer Identifier', it defaults to a code value of 'Passport' but could be 'Drivers License, National Id' etc") public class CodesApiResource { /** @@ -80,6 +82,8 @@ public class CodesApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Retrieve Codes", notes = "Returns the list of codes.\n" + "\n" + "Example Requests:\n" + "\n" + "codes") + @ApiResponses({@ApiResponse(code = 200, message = "", response = CodesApiResourceSwagger.GetCodesResponse.class, responseContainer = "list")}) public String retrieveCodes(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -93,7 +97,10 @@ public class CodesApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String createCode(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Create a Code", notes = "Creates a code. Codes created through api are always 'user defined' and so system defined is marked as false.") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = CodesApiResourceSwagger.PostCodesRequest.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = CodesApiResourceSwagger.PostCodesResponse.class)}) + public String createCode(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createCode().withJson(apiRequestBodyAsJson).build(); @@ -106,7 +113,9 @@ public class CodesApiResource { @Path("{codeId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveCode(@PathParam("codeId") final Long codeId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve a Code", notes = "Returns the details of a Code.\n" + "\n" + "Example Requests:\n" + "\n" + "codes/1") + @ApiResponses({@ApiResponse(code = 200, message = "", response = CodesApiResourceSwagger.GetCodesResponse.class)}) + public String retrieveCode(@PathParam("codeId") @ApiParam(value = "codeId") final Long codeId, @Context final UriInfo uriInfo) { final CodeData code = this.readPlatformService.retrieveCode(codeId); @@ -118,7 +127,10 @@ public class CodesApiResource { @Path("{codeId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String updateCode(@PathParam("codeId") final Long codeId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update a Code", notes = "Updates the details of a code if it is not system defined.") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = CodesApiResourceSwagger.PutCodesRequest.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = CodesApiResourceSwagger.PutCodesResponse.class)}) + public String updateCode(@PathParam("codeId") @ApiParam(value = "codeId") final Long codeId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateCode(codeId).withJson(apiRequestBodyAsJson).build(); @@ -131,7 +143,9 @@ public class CodesApiResource { @Path("{codeId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String deleteCode(@PathParam("codeId") final Long codeId) { + @ApiOperation(value = "Delete a Code", notes = "Deletes a code if it is not system defined.") + @ApiResponses({@ApiResponse(code = 200, message = "", response = CodesApiResourceSwagger.DeleteCodesResponse.class)}) + public String deleteCode(@PathParam("codeId") @ApiParam(value = "codeId") final Long codeId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteCode(codeId).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/api/CodesApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/api/CodesApiResourceSwagger.java new file mode 100644 index 000000000..69ce81676 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/api/CodesApiResourceSwagger.java @@ -0,0 +1,95 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.infrastructure.codes.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * Created by sanyam on 29/7/17. + */ +final class CodesApiResourceSwagger { + private CodesApiResourceSwagger() { + // this class is only for Swagger Live Documentation + } + + @ApiModel(value = "GetCodesResponse") + public static final class GetCodesResponse { + private GetCodesResponse() { + + } + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "Education") + public String name; + @ApiModelProperty(example = "true") + public boolean systemDefined; + } + + @ApiModel(value = "PostCodesRequest") + public static final class PostCodesRequest { + private PostCodesRequest() { + + } + @ApiModelProperty(example = "MyNewCode") + public String name; + } + + @ApiModel(value = "PostCodesResponse") + public static final class PostCodesResponse { + private PostCodesResponse() { + + } + @ApiModelProperty(example = "4") + public Long resourceId; + } + + @ApiModel(value = "PutCodesRequest") + public static final class PutCodesRequest { + private PutCodesRequest() { + + } + @ApiModelProperty(example = "MyNewCode(changed)") + public String name; + } + + @ApiModel(value = "PutCodesResponse") + public static final class PutCodesResponse { + private PutCodesResponse() { + + } + private final class PutCodesApichangesSwagger{ + private PutCodesApichangesSwagger() {} + @ApiModelProperty(example = "MyNewCode(changed)") + public String name; + } + @ApiModelProperty(example = "4") + public Long resourceId; + public PutCodesApichangesSwagger changes; + } + + @ApiModel(value = "DeleteCodesResponse") + public static final class DeleteCodesResponse { + private DeleteCodesResponse() { + + } + @ApiModelProperty(example = "4") + public Long resourceId; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/ExternalServicesConfigurationApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/ExternalServicesConfigurationApiResource.java index 18405d1e9..32449d477 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/ExternalServicesConfigurationApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/ExternalServicesConfigurationApiResource.java @@ -30,6 +30,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -47,6 +48,7 @@ import org.springframework.stereotype.Component; @Path("/externalservice") @Component @Scope("singleton") +@Api(value = "External Services", description = "External Services Configuration related to set of supported configurations for third party services like Amazon S3 and SMTP:\n" + "\n" + "S3 (Amazon S3):\n" + "s3_access_key -\n" + "s3_bucket_name -\n" + "s3_secret_key -\n" + "\n" + "\n" + "SMTP (Email Service):\n" + "username -\n" + "password -\n" + "host -\n" + "port -\n" + "useTLS -") public class ExternalServicesConfigurationApiResource { private final PlatformSecurityContext context; @@ -75,7 +77,9 @@ public class ExternalServicesConfigurationApiResource { @Path("{servicename}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveOne(@PathParam("servicename") final String serviceName, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve External Services Configuration", notes = "Returns a external Service configurations based on the Service Name.\n" + "\n" + "Service Names supported are S3 and SMTP.\n" + "\n" + "Example Requests:\n" + "\n" + "externalservice/SMTP") + @ApiResponses({@ApiResponse(code = 200, message = "", response = ExternalServicesPropertiesData.class)}) + public String retrieveOne(@PathParam("servicename") @ApiParam(value = "servicename") final String serviceName, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(ExternalServiceConfigurationApiConstant.EXTERNAL_SERVICE_RESOURCE_NAME); final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters()); final Collection externalServiceNVPs = this.externalServicePropertiesReadPlatformService @@ -88,7 +92,11 @@ public class ExternalServicesConfigurationApiResource { @Path("{servicename}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String updateExternalServiceProperties(@PathParam("servicename") final String serviceName, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update External Service", notes = "Updates the external Service Configuration for a Service Name.\n" + "\n" + "Example: \n" + "\n" + "externalservice/S3") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = ExternalServicesConfigurationApiResourceSwagger.PutExternalServiceRequest.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "")}) + public String updateExternalServiceProperties(@PathParam("servicename") @ApiParam(value = "servicename") final String serviceName, + @ApiParam(hidden = true) final String apiRequestBodyAsJson) { // ExternalServicesData external = // this.externalServiceReadPlatformService.getExternalServiceDetailsByServiceName(serviceName); final CommandWrapper commandRequest = new CommandWrapperBuilder().updateExternalServiceProperties(serviceName) diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/ExternalServicesConfigurationApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/ExternalServicesConfigurationApiResourceSwagger.java new file mode 100644 index 000000000..8db296ed5 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/ExternalServicesConfigurationApiResourceSwagger.java @@ -0,0 +1,42 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.infrastructure.configuration.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * Created by sanyam on 30/7/17. + */ +final class ExternalServicesConfigurationApiResourceSwagger { + private ExternalServicesConfigurationApiResourceSwagger() { + + } + + @ApiModel(value = "PutExternalServiceRequest") + public static final class PutExternalServiceRequest{ + private PutExternalServiceRequest() { + + } + @ApiModelProperty(example = "test@mifos.org") + public String username; + @ApiModelProperty(example = "XXXX") + public String password; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/GlobalConfigurationApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/GlobalConfigurationApiResource.java index 57ab554bc..fd9bb91c9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/GlobalConfigurationApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/GlobalConfigurationApiResource.java @@ -27,6 +27,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -45,6 +46,7 @@ import org.springframework.stereotype.Component; @Path("/configurations") @Component @Scope("singleton") +@Api(value = "Global Configuration", description = "Global configuration related to set of supported enable/disable configurations:\n" + "\n" + "maker-checker - defaults to false - if true turns on maker-checker functionality\n" + "reschedule-future-repayments - defaults to false - if true reschedules repayemnts which falls on a non-working day to configured repayment rescheduling rule\n" + "allow-transactions-on-non_workingday - defaults to false - if true allows transactions on non-working days\n" + "reschedule-repayments-on-holidays - defaults to false - if true reschedules repayemnts which falls on a non-working day to defined reschedule date\n" + "allow-transactions-on-holiday - defaults to false - if true allows transactions on holidays\n" + "savings-interest-posting-current-period-end - Set it at the database level before any savings interest is posted. When set as false(default), interest will be posted on the first date of next period. If set as true, interest will be posted on last date of current period. There is no difference in the interest amount posted.\n" + "financial-year-beginning-month - Set it at the database level before any savings interest is posted. Allowed values 1 - 12 (January - December). Interest posting periods are evaluated based on this configuration.\n" + "meetings-mandatory-for-jlg-loans - if set to true, enforces all JLG loans to follow a meeting schedule belonging to either the parent group or Center.") public class GlobalConfigurationApiResource { private final Set RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("globalConfiguration")); @@ -76,7 +78,9 @@ public class GlobalConfigurationApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveConfiguration(@Context final UriInfo uriInfo,@DefaultValue("false") @QueryParam("survey") final boolean survey) { + @ApiOperation(value = "Retrieve Global Configuration | Retrieve Global Configuration for surveys", notes = "Returns the list global enable/disable configurations.\n" + "\n" + "Example Requests:\n" + "\n" + "configurations\n\n" + "\n" + "Returns the list global enable/disable survey configurations.\n" + "\n" + "Example Requests:\n" + "\n" + "configurations/survey") + @ApiResponses({@ApiResponse(code = 200, message = "List of example \n response \nsurveys response \ngiven below", response = GlobalConfigurationApiResourceSwagger.GetGlobalConfigurationsResponse.class, responseContainer = "list")}) + public String retrieveConfiguration(@Context final UriInfo uriInfo,@DefaultValue("false") @QueryParam("survey") @ApiParam(value = "survey") final boolean survey) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -90,7 +94,9 @@ public class GlobalConfigurationApiResource { @Path("{configId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveOne(@PathParam("configId") final Long configId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve Global Configuration", notes = "Returns a global enable/disable configurations.\n" + "\n" + "Example Requests:\n" + "\n" + "configurations/1") + @ApiResponses({@ApiResponse(code = 200, message = "", response = GlobalConfigurationApiResourceSwagger.GetGlobalConfigurationsResponse.class)}) + public String retrieveOne(@PathParam("configId") @ApiParam(value = "configId") final Long configId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -105,7 +111,10 @@ public class GlobalConfigurationApiResource { @Path("{configId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String updateConfiguration(@PathParam("configId") final Long configId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update Global Configuration", notes = "Updates an enable/disable global configuration item.") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = GlobalConfigurationApiResourceSwagger.PutGlobalConfigurationsRequest.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = GlobalConfigurationApiResourceSwagger.PutGlobalConfigurationsResponse.class)}) + public String updateConfiguration(@PathParam("configId") @ApiParam(value = "configId") final Long configId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // .updateGlobalConfiguration(configId) // diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/GlobalConfigurationApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/GlobalConfigurationApiResourceSwagger.java new file mode 100644 index 000000000..f5f030f0b --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/GlobalConfigurationApiResourceSwagger.java @@ -0,0 +1,63 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.infrastructure.configuration.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.apache.fineract.infrastructure.configuration.data.GlobalConfigurationPropertyData; + +import java.util.List; + +/** + * Created by sanyam on 30/7/17. + */ +final class GlobalConfigurationApiResourceSwagger { + private GlobalConfigurationApiResourceSwagger() { + + } + + @ApiModel(value = "GetGlobalConfigurationsResponse") + public static final class GetGlobalConfigurationsResponse { + private GetGlobalConfigurationsResponse(){} + public List globalConfiguration; + } + + @ApiModel(value = "PutGlobalConfigurationsRequest") + public static final class PutGlobalConfigurationsRequest { + private PutGlobalConfigurationsRequest(){} + @ApiModelProperty(example = "true") + public boolean enabled; + @ApiModelProperty(example = "2") + public Long value; + } + + @ApiModel(value = "PutGlobalConfigurationsResponse") + public static final class PutGlobalConfigurationsResponse { + private PutGlobalConfigurationsResponse(){} + final class PutGlobalConfigurationsResponsechangesSwagger{ + private PutGlobalConfigurationsResponsechangesSwagger() {} + @ApiModelProperty(example = "true") + public boolean enabled; + } + @ApiModelProperty(example = "4") + public Long resourceId; + public PutGlobalConfigurationsResponsechangesSwagger changes; + } + +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/api/CreditBureauConfigurationAPI.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/api/CreditBureauConfigurationAPI.java index 2838ce3a0..2c34263c5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/api/CreditBureauConfigurationAPI.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/api/CreditBureauConfigurationAPI.java @@ -35,6 +35,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.Api; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -58,6 +59,7 @@ import org.springframework.stereotype.Component; @Path("/CreditBureauConfiguration") @Component @Scope("singleton") +@Api(value = "CreditBureau Configuration") public class CreditBureauConfigurationAPI { private final Set RESPONSE_DATA_PARAMETERS = new HashSet<>( Arrays.asList("creditBureauId", "alias", "country", "creditBureauProductId", "startDate", "endDate", "isActive")); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/DatatablesApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/DatatablesApiResource.java index 1ab734b98..33bfe1787 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/DatatablesApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/DatatablesApiResource.java @@ -33,6 +33,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -55,6 +56,7 @@ import org.springframework.stereotype.Component; @Path("/datatables") @Component @Scope("singleton") +@Api(value = "Data Tables", description = "The datatables API allows you to plug-in your own tables (MySql) that have a relationship to a Apache Fineract core table. For example, you might want to add some extra client fields and record information about each of the clients' family members. Via the API you can create, read, update and delete entries for each 'plugged-in' table. The API checks for permission and for 'data scoping' (only data within the users' office hierarchy can be managed by the user).\n" + "\n" + "The Apache Fineract Reference App uses a JQuery plug-in called stretchydatatables (which in turn uses this datatables resource) to provide a pretty flexible CRUD (Create, Read, Update, Delete) User Interface.") public class DatatablesApiResource { private final PlatformSecurityContext context; @@ -79,7 +81,10 @@ public class DatatablesApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String getDatatables(@QueryParam("apptable") final String apptable, @Context final UriInfo uriInfo) { + @ApiOperation(value = "List Data Tables", notes = "Lists registered data tables and the Apache Fineract Core application table they are registered to.\n" + "\n" + "ARGUMENTS\n" + "\n" + "apptable - optional" + "\n"+ "The Apache Fineract core application table.\n" + "\n" + "Example Requests:\n" + "\n" + "datatables?apptable=m_client\n" + "\n" + "\n" + "datatables", + responseContainer = "List", response = DatatablesApiResourceSwagger.GetDataTablesResponse.class) + @ApiResponses({@ApiResponse(code = 200, message = "", response = DatatablesApiResourceSwagger.GetDataTablesResponse.class, responseContainer = "list")}) + public String getDatatables(@QueryParam("apptable") @ApiParam(value = "apptable") final String apptable, @Context final UriInfo uriInfo) { final List result = this.readWriteNonCoreDataService.retrieveDatatableNames(apptable); @@ -90,7 +95,13 @@ public class DatatablesApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String createDatatable(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Create Data Table", notes = "Create a new data table and registers it with the Apache Fineract Core application table.\n" + "\n" + "Field Descriptions\n" + "\n" + "Mandatory - datatableName : \n"+ "\nThe name of the Data Table.\n" + "\n" + "Mandatory - apptableName\n" + "\n" + "Application table name. Must be one of the following:\n" + "\n" + "m_client\n" + "\n" + "m_group" +"\n" + "\n" + "m_loan" + "\n" + "\n" + "m_office" + "\n" + "\n" + "m_saving_account" + "\n" + "\n" + "m_product_loan" + "\n" + "\n" + "m_savings_product" + "\n" + "\n" + "Mandatory - columns " + "\n" + "An array of columns in the new Data Table." + "\n" + "\n" + "Optional - multiRow" + "\n" + + "\n" + "Allows to create multiple entries in the Data Table. Optional, defaults to false. If this property is not provided Data Table will allow only one entry." + "\n" + "\n" + "Field Descriptions - columns" + "\n" + "\n" + "Mandatory - name" + "\n" + "\n" + "Name of the created column. Can contain only alphanumeric characters, underscores and spaces, but cannot start with a number. Cannot start or end with an underscore or space." + "\n" + "\n" + "Mandatory - type" + "\n" + "\n" + "Column type. Must be one of the following:" + "\n" + "\n" + "Boolean" + "\n" + "\n" + "Date" + "\n" + "\n" + "DateTime" + "\n" + "\n" + "Decimal" + "\n" + "\n" + "Dropdown" + "\n" + + "\n" + "\n" + "Number" + "\n" + "\n" + "String" + "\n" + "\n" + "Text" + "\n" + "\n" + "Mandatory [type = Dropdown] - code" + "\n" + "\n" + "Used in Code Value fields. Column name becomes: code_cd_name. Mandatory if using type Dropdown, otherwise an error is returned." + "\n" + "\n" + "Optional - mandatory" + "\n" + "\n" + + "Determines whether this column must have a value in every entry. Optional, defaults to false." + "\n" + "\n" + "Mandatory [type = String] - length" + "\n" + "\n" + "Length of the text field. Mandatory if type String is used, otherwise an error is returned.") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = DatatablesApiResourceSwagger.PostDataTablesRequest.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = DatatablesApiResourceSwagger.PostDataTablesResponse.class)}) + public String createDatatable(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createDBDatatable(apiRequestBodyAsJson).build(); @@ -102,7 +113,10 @@ public class DatatablesApiResource { @Path("{datatableName}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String updateDatatable(@PathParam("datatableName") final String datatableName, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update Data Table", notes = "Modifies fields of a data table. If the apptableName parameter is passed, data table is deregistered and registered with the new application table.") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = DatatablesApiResourceSwagger.PutDataTablesRequest.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = DatatablesApiResourceSwagger.PutDataTablesResponse.class)}) + public String updateDatatable(@PathParam("datatableName") @ApiParam(value = "datatableName") final String datatableName, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateDBDatatable(datatableName, apiRequestBodyAsJson).build(); @@ -114,7 +128,9 @@ public class DatatablesApiResource { @Path("{datatableName}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String deleteDatatable(@PathParam("datatableName") final String datatableName, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Delete Data Table", notes = "Deletes a data table and deregisters it from the Apache Fineract Core application table.") + @ApiResponses({@ApiResponse(code = 200, message = "", response = DatatablesApiResourceSwagger.DeleteDataTablesResponse.class)}) + public String deleteDatatable(@PathParam("datatableName") @ApiParam(value = "datatableName") final String datatableName, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteDBDatatable(datatableName, apiRequestBodyAsJson).build(); @@ -126,8 +142,11 @@ public class DatatablesApiResource { @Path("register/{datatable}/{apptable}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String registerDatatable(@PathParam("datatable") final String datatable, @PathParam("apptable") final String apptable, - final String apiRequestBodyAsJson) { + @ApiOperation(value = "Register Data Table", notes = "Registers a data table with the Apache Fineract Core application table. This allows the data table to be maintained through the API. In case the datatable is a PPI (survey table), a parameter category should be pass along with the request. The API currently support one category (200)") + @ApiImplicitParams({@ApiImplicitParam(value = "body", paramType = "body", dataType = "body", format = "body", dataTypeClass = DatatablesApiResourceSwagger.PostDataTablesRegisterDatatableAppTable.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = DatatablesApiResourceSwagger.PutDataTablesResponse.class)}) + public String registerDatatable(@PathParam("datatable") @ApiParam(value = "datatable") final String datatable, @PathParam("apptable") @ApiParam(value = "apptable") final String apptable, + @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().registerDBDatatable(datatable, apptable) .withJson(apiRequestBodyAsJson).build(); @@ -141,7 +160,9 @@ public class DatatablesApiResource { @Path("deregister/{datatable}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String deregisterDatatable(@PathParam("datatable") final String datatable) { + @ApiOperation(value = "Deregister Data Table", notes = "Deregisters a data table. It will no longer be available through the API.") + @ApiResponses({@ApiResponse(code = 200, message = "", response = DatatablesApiResourceSwagger.PutDataTablesResponse.class)}) + public String deregisterDatatable(@PathParam("datatable") @ApiParam(value = "datatable") final String datatable) { this.readWriteNonCoreDataService.deregisterDatatable(datatable); @@ -154,7 +175,9 @@ public class DatatablesApiResource { @Path("{datatable}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String getDatatable(@PathParam("datatable") final String datatable, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve Data Table Details", notes = "Lists a registered data table details and the Apache Fineract Core application table they are registered to.") + @ApiResponses({@ApiResponse(code = 200, message = "", response = DatatablesApiResourceSwagger.GetDataTablesResponse.class)}) + public String getDatatable(@PathParam("datatable") @ApiParam(value = "datatable") final String datatable, @Context final UriInfo uriInfo) { final DatatableData result = this.readWriteNonCoreDataService.retrieveDatatable(datatable); @@ -166,8 +189,10 @@ public class DatatablesApiResource { @Path("{datatable}/{apptableId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String getDatatable(@PathParam("datatable") final String datatable, @PathParam("apptableId") final Long apptableId, - @QueryParam("order") final String order, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve Entry(s) from Data Table", notes = "Gets the entry (if it exists) for data tables that are one to one with the application table. \n" + "Gets the entries (if they exist) for data tables that are one to many with the application table.\n" + "\n" + "Note: The 'fields' parameter is not available for datatables.\n" + "\n" + "ARGUMENTS\n" + "orderoptional Specifies the order in which data is returned.genericResultSetoptional, defaults to false If 'true' an optimised JSON format is returned suitable for tabular display of data. This format is used by the default data tables UI functionality.\n" + "Example Requests:\n" + "\n" + "datatables/extra_client_details/1\n" + "\n" + "\n" + "datatables/extra_family_details/1?order=`Date of Birth` desc\n" + "\n" + "\n" + "datatables/extra_client_details/1?genericResultSet=true") + @ApiResponses({@ApiResponse(code = 200, message = "", response = DatatablesApiResourceSwagger.GetDataTablesAppTableIdResponse.class)}) + public String getDatatable(@PathParam("datatable") @ApiParam(value = "datatable") final String datatable, @PathParam("apptableId") @ApiParam(value = "apptableId") final Long apptableId, + @QueryParam("order") @ApiParam(value = "order") final String order, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasDatatableReadPermission(datatable); @@ -216,8 +241,11 @@ public class DatatablesApiResource { @Path("{datatable}/{apptableId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String createDatatableEntry(@PathParam("datatable") final String datatable, @PathParam("apptableId") final Long apptableId, - final String apiRequestBodyAsJson) { + @ApiOperation(value = "Create Entry in Data Table", notes = "Adds a row to the data table.\n" + "\n" + "Note that the default datatable UI functionality converts any field name containing spaces to underscores when using the API. This means the field name \"Business Description\" is considered the same as \"Business_Description\". So you shouldn't have both \"versions\" in any data table.") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = DatatablesApiResourceSwagger.PostDataTablesAppTableIdRequest.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = DatatablesApiResourceSwagger.PostDataTablesAppTableIdResponse.class)}) + public String createDatatableEntry(@PathParam("datatable") @ApiParam(value = "datatable") final String datatable, @PathParam("apptableId") @ApiParam(value = "apptableId") final Long apptableId, + @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // .createDatatable(datatable, apptableId, null) // @@ -233,8 +261,11 @@ public class DatatablesApiResource { @Path("{datatable}/{apptableId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String updateDatatableEntryOnetoOne(@PathParam("datatable") final String datatable, - @PathParam("apptableId") final Long apptableId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update Entry in Data Table (One to One)", notes = "Updates the row (if it exists) of the data table.") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = DatatablesApiResourceSwagger.PutDataTablesAppTableIdRequest.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = DatatablesApiResourceSwagger.PutDataTablesAppTableIdResponse.class)}) + public String updateDatatableEntryOnetoOne(@PathParam("datatable") @ApiParam(value = "datatable") final String datatable, + @PathParam("apptableId") @ApiParam(value = "apptableId") final Long apptableId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // .updateDatatable(datatable, apptableId, null) // @@ -250,9 +281,12 @@ public class DatatablesApiResource { @Path("{datatable}/{apptableId}/{datatableId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String updateDatatableEntryOneToMany(@PathParam("datatable") final String datatable, - @PathParam("apptableId") final Long apptableId, @PathParam("datatableId") final Long datatableId, - final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update Entry in Data Table (One to Many)", notes = "Updates the row (if it exists) of the data table.") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = DatatablesApiResourceSwagger.PutDataTablesAppTableIdDatatableIdRequest.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = DatatablesApiResourceSwagger.PutDataTablesAppTableIdDatatableIdResponse.class)}) + public String updateDatatableEntryOneToMany(@PathParam("datatable") @ApiParam(value = "datatable") final String datatable, + @PathParam("apptableId") @ApiParam(value = "apptableId") final Long apptableId, @PathParam("datatableId") @ApiParam(value = "datatableId") final Long datatableId, + @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // .updateDatatable(datatable, apptableId, datatableId) // @@ -268,7 +302,9 @@ public class DatatablesApiResource { @Path("{datatable}/{apptableId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String deleteDatatableEntries(@PathParam("datatable") final String datatable, @PathParam("apptableId") final Long apptableId) { + @ApiOperation(value = "Delete Entry(s) in Data Table", notes = "Deletes the entry (if it exists) for data tables that are one-to-one with the application table. \n" + "Deletes the entries (if they exist) for data tables that are one-to-many with the application table.") + @ApiResponses({@ApiResponse(code = 200, message = "", response = DatatablesApiResourceSwagger.DeleteDataTablesDatatableAppTableIdResponse.class)}) + public String deleteDatatableEntries(@PathParam("datatable") @ApiParam(value = "datatable") final String datatable, @PathParam("apptableId") @ApiParam(value = "apptableId") final Long apptableId) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // .deleteDatatable(datatable, apptableId, null) // @@ -283,8 +319,10 @@ public class DatatablesApiResource { @Path("{datatable}/{apptableId}/{datatableId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String deleteDatatableEntries(@PathParam("datatable") final String datatable, @PathParam("apptableId") final Long apptableId, - @PathParam("datatableId") final Long datatableId) { + @ApiOperation(value = "Delete Entry in Datatable (One to Many)", notes = "Deletes the entry (if it exists) for data tables that are one to many with the application table.\n" + "\n") + @ApiResponses({@ApiResponse(code = 200, message = "", response = DatatablesApiResourceSwagger.DeleteDataTablesDatatableAppTableIdDatatableIdResponse.class)}) + public String deleteDatatableEntries(@PathParam("datatable") @ApiParam(value = "datatable", type = "body", example = "{}") final String datatable, @PathParam("apptableId") @ApiParam(value = "apptableId") final Long apptableId, + @PathParam("datatableId") @ApiParam(value = "datatableId") final Long datatableId) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // .deleteDatatable(datatable, apptableId, datatableId) // diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/DatatablesApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/DatatablesApiResourceSwagger.java new file mode 100644 index 000000000..abf45277d --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/DatatablesApiResourceSwagger.java @@ -0,0 +1,253 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.infrastructure.dataqueries.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.apache.fineract.infrastructure.dataqueries.data.GenericResultsetData; +import org.apache.fineract.infrastructure.dataqueries.data.ResultsetColumnHeaderData; +import org.apache.fineract.infrastructure.dataqueries.data.ResultsetRowData; + +import java.util.List; + +/** + * Created by sanyam on 31/7/17. + */ +final class DatatablesApiResourceSwagger { + private DatatablesApiResourceSwagger() { + + } + + @ApiModel(value = "GetDataTablesResponse") + public static final class GetDataTablesResponse { + private GetDataTablesResponse() { + + } + @ApiModelProperty(example = "m_client") + public String appTableName; + @ApiModelProperty(example = "extra_client_details") + public String datatableName; + public List column; + } + + @ApiModel(value = "PostDataTablesRequest") + public static final class PostDataTablesRequest{ + private PostDataTablesRequest() { + + } + @ApiModelProperty(example = "m_client") + public String applicationTableName; + @ApiModelProperty(example = "extra_client_details") + public String registeredTableName; + @ApiModelProperty(example = "true") + public boolean multiRow; + public List columnHeaderData; + } + + @ApiModel(value = "PostDataTablesResponse") + public static final class PostDataTablesResponse{ + private PostDataTablesResponse() { + + } + @ApiModelProperty(example = "extra_client_details") + public String resourceIdentifier; + } + + @ApiModel(value = "PutDataTablesRequest") + public static final class PutDataTablesRequest{ + private PutDataTablesRequest() { + + } + final class PutDataTablesRequestDropColumns { + private PutDataTablesRequestDropColumns() {} + @ApiModelProperty(example = "Gender_cd_Question") + public String name; + } + final class PutDataTablesRequestAddColumns { + private PutDataTablesRequestAddColumns() { + } + @ApiModelProperty(example = "Question") + public String name; + @ApiModelProperty(example = "Dropdown") + public String type; + @ApiModelProperty(example = "Gender") + public String code; + @ApiModelProperty(example = "true") + public boolean mandatory; + } + final class PutDataTablesRequestChangeColumns { + private PutDataTablesRequestChangeColumns() { + } + @ApiModelProperty(example = "Question") + public String name; + @ApiModelProperty(example = "Question 2") + public String newName; + @ApiModelProperty(example = "Gender") + public String code; + @ApiModelProperty(example = "Gender2") + public String newCode; + @ApiModelProperty(example = "true") + public boolean mandatory; + } + @ApiModelProperty(example = "m_client") + public String appTableName; + public List dropColumns; + public List addColumns; + public List ChangeColumns; + } + + @ApiModel(value = "PutDataTablesResponse") + public static final class PutDataTablesResponse{ + private PutDataTablesResponse() { + + } + @ApiModelProperty(example = "extra_client_details") + public String resourceIdentifier; + } + + @ApiModel(value = "DeleteDataTablesResponse") + public static final class DeleteDataTablesResponse{ + private DeleteDataTablesResponse() { + + } + @ApiModelProperty(example = "extra_client_details") + public String resourceIdentifier; + } + + @ApiModel(value = "PostDataTablesRegisterDatatableAppTable") + public static final class PostDataTablesRegisterDatatableAppTable { + private PostDataTablesRegisterDatatableAppTable () {} + } + + @ApiModel(value = "PostDataTablesAppTableIdRequest") + public static final class PostDataTablesAppTableIdRequest{ + private PostDataTablesAppTableIdRequest() { + + } + @ApiModelProperty(example = "Livestock sales") + public String BusinessDescription; + @ApiModelProperty(example = "First comment made") + public String Comment; + @ApiModelProperty(example = "Primary") + public String Education_cv; + @ApiModelProperty(example = "6") + public Long Gender_cd; + @ApiModelProperty(example = "8.5") + public Double HighestRatePaid; + @ApiModelProperty(example = "01 October 2012") + public String NextVisit; + @ApiModelProperty(example = "5") + public Long YearsinBusiness; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "en") + public String locale; + } + + @ApiModel(value = "PostDataTablesAppTableIdResponse ") + public static final class PostDataTablesAppTableIdResponse { + private PostDataTablesAppTableIdResponse () { + + } + @ApiModelProperty(example = "1") + public Long resourceId; + } + + @ApiModel(value = "GetDataTablesAppTableIdResponse") + public static final class GetDataTablesAppTableIdResponse { + private GetDataTablesAppTableIdResponse() { + + } + public List columnHeaders; + public List data; + } + + @ApiModel(value = "PutDataTablesAppTableIdRequest") + public static final class PutDataTablesAppTableIdRequest{ + private PutDataTablesAppTableIdRequest() { + + } + @ApiModelProperty(example = "Livestock sales updated") + public String BusinessDescription; + } + + @ApiModel(value = "PutDataTablesAppTableIdResponse") + public static final class PutDataTablesAppTableIdResponse { + private PutDataTablesAppTableIdResponse() { + + } + final class PutDataTablesAppTableIdResponseChanges{ + private PutDataTablesAppTableIdResponseChanges () {} + @ApiModelProperty(example = "Livestock sales updated") + public String BusinessDescription; + } + @ApiModelProperty(example = "1") + public Long resourceId; + public PutDataTablesAppTableIdResponseChanges changes; + } + + @ApiModel(value = "PutDataTablesAppTableIdDatatableIdRequest") + public static final class PutDataTablesAppTableIdDatatableIdRequest{ + private PutDataTablesAppTableIdDatatableIdRequest() { + + } + @ApiModelProperty(example = "01 June 1982") + public String DateOfBirth; + @ApiModelProperty(example = "5") + public Long Education_cdHighest; + @ApiModelProperty(example = "June") + public String Name; + @ApiModelProperty(example = "More notes") + public String OtherNotes; + @ApiModelProperty(example = "20") + public Long PointsScore; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "en") + public String locale; + } + + @ApiModel(value = "PutDataTablesAppTableIdDatatableIdResponse ") + public static final class PutDataTablesAppTableIdDatatableIdResponse { + private PutDataTablesAppTableIdDatatableIdResponse () { + + } + @ApiModelProperty(example = "1") + public Long resourceId; + } + + @ApiModel(value = "DeleteDataTablesDatatableAppTableIdResponse ") + public static final class DeleteDataTablesDatatableAppTableIdResponse { + private DeleteDataTablesDatatableAppTableIdResponse () { + + } + @ApiModelProperty(example = "1") + public Long resourceId; + } + + @ApiModel(value = "DeleteDataTablesDatatableAppTableIdDatatableIdResponse ") + public static final class DeleteDataTablesDatatableAppTableIdDatatableIdResponse { + private DeleteDataTablesDatatableAppTableIdDatatableIdResponse () { + + } + @ApiModelProperty(example = "1") + public Long resourceId; + } + +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/EntityDatatableChecksApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/EntityDatatableChecksApiResource.java index 880687495..0ae09b0f5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/EntityDatatableChecksApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/EntityDatatableChecksApiResource.java @@ -30,6 +30,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -52,6 +53,7 @@ import org.springframework.stereotype.Component; @Path("/entityDatatableChecks") @Component @Scope("singleton") +@Api(value = "Entity-Datatable Checks", description = "This defines Entity-Datatable Check.") public class EntityDatatableChecksApiResource { private final PlatformSecurityContext context; @@ -76,9 +78,11 @@ public class EntityDatatableChecksApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveAll(@Context final UriInfo uriInfo, @QueryParam("status") final Long status, - @QueryParam("entity") final String entity, @QueryParam("productId") final Long productId, - @QueryParam("offset") final Integer offset, @QueryParam("limit") final Integer limit) { + @ApiOperation(value = "List Entity-Datatable Checks", notes = "The list capability of Entity-Datatable Checks can support pagination.\n" + "\n" + "OPTIONAL ARGUMENTS\n" + "offset Integer optional, defaults to 0 Indicates the result from which pagination startslimit Integer optional, defaults to 200 Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1\n" + "Example Request:\n" + "\n" + "entityDatatableChecks?offset=0&limit=15") + @ApiResponses({@ApiResponse(code = 200, message = "", response = EntityDatatableChecksApiResourceSwagger.GetEntityDatatableChecksResponse.class, responseContainer = "list")}) + public String retrieveAll(@Context final UriInfo uriInfo, @QueryParam("status") @ApiParam(value = "status") final Long status, + @QueryParam("entity") @ApiParam(value = "entity") final String entity, @QueryParam("productId") @ApiParam(value = "productId") final Long productId, + @QueryParam("offset") @ApiParam(value = "offset") final Integer offset, @QueryParam("limit") @ApiParam(value = "limit") final Integer limit) { final SearchParameters searchParameters = SearchParameters.forPagination(offset, limit); final Page result = this.readEntityDatatableChecksService.retrieveAll(searchParameters, status, entity, productId); @@ -91,6 +95,8 @@ public class EntityDatatableChecksApiResource { @Path("template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Retrieve Entity-Datatable Checks Template", notes = "This is a convenience resource useful for building maintenance user interface screens for Entity-Datatable Checks applications. The template data returned consists of:\n" + "\n" + "Allowed Value Lists\n" + "Example Request:\n" + "\n" + "entityDatatableChecks/template") + @ApiResponses({@ApiResponse(code = 200, message = "", response = EntityDatatableChecksApiResourceSwagger.GetEntityDatatableChecksTemplateResponse.class)}) public String getTemplate(@Context final UriInfo uriInfo) { final EntityDataTableChecksTemplateData result = this.readEntityDatatableChecksService.retrieveTemplate(); @@ -102,7 +108,10 @@ public class EntityDatatableChecksApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String createEntityDatatableCheck(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Create Entity-Datatable Checks", notes = "Mandatory Fields : \n" + "entity, status, datatableName\n" + "\n" + "Non-Mandatory Fields : \n" + "productId") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = EntityDatatableChecksApiResourceSwagger.PostEntityDatatableChecksTemplateRequest.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = EntityDatatableChecksApiResourceSwagger.PostEntityDatatableChecksTemplateResponse.class)}) + public String createEntityDatatableCheck(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createEntityDatatableChecks(apiRequestBodyAsJson).build(); final CommandProcessingResult result = this.commandsSourceWritePlatformService.logCommandSource(commandRequest); @@ -113,7 +122,9 @@ public class EntityDatatableChecksApiResource { @Path("{entityDatatableCheckId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String deleteDatatable(@PathParam("entityDatatableCheckId") final long entityDatatableCheckId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Delete Entity-Datatable Checks", notes = "Deletes an existing Entity-Datatable Check") + @ApiResponses({@ApiResponse(code = 200, message = "", response = EntityDatatableChecksApiResourceSwagger.DeleteEntityDatatableChecksTemplateResponse.class)}) + public String deleteDatatable(@PathParam("entityDatatableCheckId") @ApiParam(value = "entityDatatableCheckId") final long entityDatatableCheckId, final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteEntityDatatableChecks(entityDatatableCheckId, apiRequestBodyAsJson).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/EntityDatatableChecksApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/EntityDatatableChecksApiResourceSwagger.java new file mode 100644 index 000000000..86e1de1b9 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/EntityDatatableChecksApiResourceSwagger.java @@ -0,0 +1,101 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.infrastructure.dataqueries.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.apache.fineract.infrastructure.core.data.EnumOptionData; +import org.apache.fineract.infrastructure.dataqueries.data.DatatableCheckStatusData; +import org.apache.fineract.infrastructure.dataqueries.data.DatatableChecksData; +import org.apache.fineract.portfolio.loanproduct.data.LoanProductData; +import org.apache.fineract.portfolio.savings.data.SavingsProductData; + +import java.util.Collection; +import java.util.List; + +/** + * Created by sanyam on 31/7/17. + */ +final class EntityDatatableChecksApiResourceSwagger { + private EntityDatatableChecksApiResourceSwagger() { + + } + + @ApiModel(value = "GetEntityDatatableChecksResponse") + public static final class GetEntityDatatableChecksResponse { + private GetEntityDatatableChecksResponse(){} + + public long id; + public String entity; + public EnumOptionData status; + public String datatableName; + public boolean systemDefined; + public Long order; + public Long productId; + public String productName; + } + + @ApiModel(value = "GetEntityDatatableChecksTemplateResponse") + public static final class GetEntityDatatableChecksTemplateResponse { + private GetEntityDatatableChecksTemplateResponse(){} + + public List entities; + public List statusClient; + public List statusGroup; + public List statusSavings; + public List statusLoans; + public List datatables; + public Collection loanProductDatas; + public Collection savingsProductDatas; + } + + @ApiModel(value = "PostEntityDatatableChecksTemplateRequest") + public static final class PostEntityDatatableChecksTemplateRequest{ + private PostEntityDatatableChecksTemplateRequest() { + + } + @ApiModelProperty(example = "m_loan") + public String entity; + @ApiModelProperty(example = "100") + public Long status; + @ApiModelProperty(example = "Additional Details") + public String datatableName; + @ApiModelProperty(example = "1") + public Long productId; + } + + @ApiModel(value = "PostEntityDatatableChecksTemplateResponse") + public static final class PostEntityDatatableChecksTemplateResponse{ + private PostEntityDatatableChecksTemplateResponse() { + + } + @ApiModelProperty(example = "1") + public Long resourceId; + } + + @ApiModel(value = "DeleteEntityDatatableChecksTemplateResponse") + public static final class DeleteEntityDatatableChecksTemplateResponse{ + private DeleteEntityDatatableChecksTemplateResponse() { + + } + @ApiModelProperty(example = "1") + public Long resourceId; + } +} + diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/ReportsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/ReportsApiResource.java index f77be4e85..88df3a3c0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/ReportsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/ReportsApiResource.java @@ -35,6 +35,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -52,6 +53,7 @@ import org.springframework.stereotype.Component; @Path("/reports") @Component @Scope("singleton") +@Api(value = "Reports", description = "Non-core reports can be added, updated and deleted.") public class ReportsApiResource { private final Set RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "reportName", "reportType", "reportSubType", @@ -79,6 +81,8 @@ public class ReportsApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "List Reports", notes = "Lists all reports and their parameters.\n" + "\n" + "Example Request:\n" + "\n" + "reports", responseContainer = "List", response = ReportsApiResourceSwagger.GetReportsResponse.class) + @ApiResponses({@ApiResponse(code = 200, message = "")}) public String retrieveReportList(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -93,7 +97,9 @@ public class ReportsApiResource { @Path("{id}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveReport(@PathParam("id") final Long id, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve a Report\n", notes = "Example Requests:\n" + "\n" + "reports/1\n" + "\n" + "\n" + "reports/1?template=true") + @ApiResponses({@ApiResponse(code = 200, message = "", response = ReportsApiResourceSwagger.GetReportsResponse.class)}) + public String retrieveReport(@PathParam("id") @ApiParam(value = "id") final Long id, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -111,6 +117,8 @@ public class ReportsApiResource { @Path("template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Retrieve Report Template", notes = "This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n" + "\n" + "Field Defaults\n" + "Allowed Value Lists\n" + "\n" + "Example Request : \n" + "\n" + "reports/template") + @ApiResponses({@ApiResponse(code = 200, message = "", response = ReportsApiResourceSwagger.GetReportsTemplateResponse.class)}) public String retrieveOfficeTemplate(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -125,7 +133,10 @@ public class ReportsApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String createReport(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Create a Report", notes = "") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = ReportsApiResourceSwagger.PostRepostRequest.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = ReportsApiResourceSwagger.PostReportsResponse.class)}) + public String createReport(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createReport().withJson(apiRequestBodyAsJson).build(); @@ -138,7 +149,10 @@ public class ReportsApiResource { @Path("{id}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String updateReport(@PathParam("id") final Long id, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update a Report", notes = "Only the useReport value can be updated for core reports.") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = ReportsApiResourceSwagger.PutReportRequest.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = ReportsApiResourceSwagger.PutReportResponse.class)}) + public String updateReport(@PathParam("id") @ApiParam(value = "id") final Long id, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateReport(id).withJson(apiRequestBodyAsJson).build(); @@ -151,7 +165,9 @@ public class ReportsApiResource { @Path("{id}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String deleteReport(@PathParam("id") final Long id) { + @ApiOperation(value = "Delete a Report", notes = "Only non-core reports can be deleted.") + @ApiResponses({@ApiResponse(code = 200, message = "", response = ReportsApiResourceSwagger.DeleteReportsResponse.class)}) + public String deleteReport(@PathParam("id") @ApiParam(value = "id") final Long id) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteReport(id).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/ReportsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/ReportsApiResourceSwagger.java new file mode 100644 index 000000000..8358a3e5e --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/ReportsApiResourceSwagger.java @@ -0,0 +1,139 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.infrastructure.dataqueries.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.apache.fineract.infrastructure.dataqueries.data.ReportParameterData; + +import java.util.Collection; +import java.util.List; + +/** + * Created by sanyam on 4/8/17. + */ +final class ReportsApiResourceSwagger { + private ReportsApiResourceSwagger() { + + } + + @ApiModel(value = "GetReportsResponse") + public static final class GetReportsResponse { + private GetReportsResponse() { + + } + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "Client Listing") + public String reportName; + @ApiModelProperty(example = "Table") + public String reportType; + public String reportSubType; + @ApiModelProperty(example = "Client") + public String reportCategory; + @ApiModelProperty(example = "Individual Client Report Lists the small number of defined fields on the client table. Would expect to copy this report and add any one to one additional data for specific tenant needs. Can be run for any size MFI but you expect it only to be run within a branch for larger ones. Depending on how many columns are displayed, there is probably is a limit of about 20/50k clients returned for html display (export to excel doesnt have that client browser/memory impact).") + public String description; + @ApiModelProperty(example = "") + public String reportSql; + @ApiModelProperty(example = "true") + public Boolean coreReport; + @ApiModelProperty(example = "true") + public Boolean useReport; + public Collection reportParameters; + + } + + @ApiModel(value = "GetReportsTemplateResponse") + public static final class GetReportsTemplateResponse { + private GetReportsTemplateResponse(){ + + } + + public List allowedReportTypes; + public List allowedReportSubTypes; + public Collection allowedParameters; + } + + @ApiModel(value = "PostRepostRequest") + public static final class PostRepostRequest { + private PostRepostRequest() { + + } + @ApiModelProperty(example = "Completely New Report") + public String reportName; + @ApiModelProperty(example = "Table") + public String reportType; + @ApiModelProperty(example = "") + public String reportSubType; + @ApiModelProperty(example = "Loan") + public String reportCategory; + @ApiModelProperty(example = "Just An Example") + public String description; + @ApiModelProperty(example = "select 'very good sql' as AComment") + public String reportSql; + public Collection reportParameters; + } + + @ApiModel(value = "PostReportsResponse") + public static final class PostReportsResponse { + private PostReportsResponse(){ + + } + @ApiModelProperty(example = "132") + public long resourceId; + } + + @ApiModel(value = "PutReportRequest") + public static final class PutReportRequest { + private PutReportRequest() { + + } + @ApiModelProperty(example = "Completely New Report") + public String reportName; + public Collection reportParameters; + + } + + @ApiModel(value = "PutReportResponse") + public static final class PutReportResponse { + private PutReportResponse() { + + } + final class PutReportResponseChanges{ + private PutReportResponseChanges() { + + } + @ApiModelProperty(example = "Changed New Report") + public String reportName; + public Collection reportParameters; + } + @ApiModelProperty(example = "132") + public long resourceId; + public PutReportResponseChanges changes; + } + + @ApiModel(value = "DeleteReportsResponse") + public static final class DeleteReportsResponse { + private DeleteReportsResponse(){ + + } + @ApiModelProperty(example = "132") + public long resourceId; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/RunreportsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/RunreportsApiResource.java index b664d414f..ff83770e9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/RunreportsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/RunreportsApiResource.java @@ -36,6 +36,7 @@ import javax.ws.rs.core.Response.ResponseBuilder; import javax.ws.rs.core.StreamingOutput; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.fineract.infrastructure.core.api.ApiParameterHelper; import org.apache.fineract.infrastructure.core.serialization.ToApiJsonSerializer; import org.apache.fineract.infrastructure.dataqueries.data.GenericResultsetData; @@ -54,6 +55,7 @@ import org.springframework.stereotype.Component; @Path("/runreports") @Component @Scope("singleton") +@Api(value = "Run Reports", description = "") public class RunreportsApiResource { private final PlatformSecurityContext context; @@ -77,7 +79,10 @@ public class RunreportsApiResource { @Path("{reportName}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON, "text/csv", "application/vnd.ms-excel", "application/pdf", "text/html" }) - public Response runReport(@PathParam("reportName") final String reportName, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Running a Report", notes = "This resource allows you to run and receive output from pre-defined Apache Fineract reports.\n" + "\n" + "Reports can also be used to provide data for searching and workflow functionality.\n" + "\n" + "The default output is a JSON formatted \"Generic Resultset\". The Generic Resultset contains Column Heading as well as Data information. However, you can export to CSV format by simply adding \"&exportCSV=true\" to the end of your URL.\n" + "\n" + "If Pentaho reports have been pre-defined, they can also be run through this resource. Pentaho reports can return HTML, PDF or CSV formats.\n" + "\n" + "The Apache Fineract reference application uses a JQuery plugin called stretchy reporting which, itself, uses this reports resource to provide a pretty flexible reporting User Interface (UI).\n\n" + "\n" + + "\n" + "Example Requests:\n" + "\n" + "runreports/Client%20Listing?R_officeId=1\n" + "\n" + "\n" + "runreports/Client%20Listing?R_officeId=1&exportCSV=true\n" + "\n" + "\n" + "runreports/OfficeIdSelectOne?R_officeId=1¶meterType=true\n" + "\n" + "\n" + "runreports/OfficeIdSelectOne?R_officeId=1¶meterType=true&exportCSV=true\n" + "\n" + "\n" + "runreports/Expected%20Payments%20By%20Date%20-%20Formatted?R_endDate=2013-04-30&R_loanOfficerId=-1&R_officeId=1&R_startDate=2013-04-16&output-type=HTML&R_officeId=1\n" + "\n" + "\n" + "runreports/Expected%20Payments%20By%20Date%20-%20Formatted?R_endDate=2013-04-30&R_loanOfficerId=-1&R_officeId=1&R_startDate=2013-04-16&output-type=XLS&R_officeId=1\n" + "\n" + "\n" + "runreports/Expected%20Payments%20By%20Date%20-%20Formatted?R_endDate=2013-04-30&R_loanOfficerId=-1&R_officeId=1&R_startDate=2013-04-16&output-type=CSV&R_officeId=1\n" + "\n" + "\n" + "runreports/Expected%20Payments%20By%20Date%20-%20Formatted?R_endDate=2013-04-30&R_loanOfficerId=-1&R_officeId=1&R_startDate=2013-04-16&output-type=PDF&R_officeId=1") + @ApiResponses({@ApiResponse(code = 200, message = "", response = RunreportsApiResourceSwagger.GetReportNameResponse.class)}) + public Response runReport(@PathParam("reportName") @ApiParam(value = "reportName") final String reportName, @Context final UriInfo uriInfo) { final MultivaluedMap queryParams = uriInfo.getQueryParameters(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/RunreportsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/RunreportsApiResourceSwagger.java new file mode 100644 index 000000000..1303fd160 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/RunreportsApiResourceSwagger.java @@ -0,0 +1,40 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.infrastructure.dataqueries.api; + +import io.swagger.annotations.ApiModel; +import org.apache.fineract.infrastructure.dataqueries.data.ResultsetColumnHeaderData; +import org.apache.fineract.infrastructure.dataqueries.data.ResultsetRowData; + +/** + * Created by sanyam on 5/8/17. + */ +final class RunreportsApiResourceSwagger { + private RunreportsApiResourceSwagger() { + + } + @ApiModel(value = "GetReportNameResponse") + public static final class GetReportNameResponse { + private GetReportNameResponse() { + + } + public ResultsetColumnHeaderData columnHeaders; + public ResultsetRowData row; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/DocumentManagementApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/DocumentManagementApiResource.java index 83537f817..b937cd8c1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/DocumentManagementApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/DocumentManagementApiResource.java @@ -39,6 +39,7 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.ResponseBuilder; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.fineract.infrastructure.core.api.ApiRequestParameterHelper; import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; import org.apache.fineract.infrastructure.core.serialization.ApiRequestJsonSerializationSettings; @@ -60,6 +61,7 @@ import com.sun.jersey.multipart.FormDataParam; @Path("{entityType}/{entityId}/documents") @Component @Scope("singleton") +@Api(value = "Documents", description = "Multiple Documents (a combination of a name, description and a file) may be attached to different Entities like Clients, Groups, Staff, Loans, Savings and Client Identifiers in the system\n" + "\n" + "Note: The currently allowed Entities are\n" + "\n" + "Clients: URL Pattern as clients\n" + "Staff: URL Pattern as staff\n" + "Loans: URL Pattern as loans\n" + "Savings: URL Pattern as savings\n" + "Client Identifiers: URL Pattern as client_identifiers\n" + "Groups: URL Pattern as groups") public class DocumentManagementApiResource { private final Set RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "parentEntityType", "parentEntityId", @@ -87,8 +89,10 @@ public class DocumentManagementApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retreiveAllDocuments(@Context final UriInfo uriInfo, @PathParam("entityType") final String entityType, - @PathParam("entityId") final Long entityId) { + @ApiOperation(value = "List documents", notes = "Example Requests:\n" + "\n" + "clients/1/documents\n" + "\n" + "client_identifiers/1/documents\n" + "\n" + "loans/1/documents?fields=name,description") + @ApiResponses({@ApiResponse(code = 200, message = "", response = DocumentManagementApiResourceSwagger.GetEntityTypeEntityIdDocumentsResponse.class, responseContainer = "list")}) + public String retreiveAllDocuments(@Context final UriInfo uriInfo, @PathParam("entityType") @ApiParam(value = "entityType") final String entityType, + @PathParam("entityId") @ApiParam(value = "entityId") final Long entityId) { this.context.authenticatedUser().validateHasReadPermission(this.SystemEntityType); @@ -101,10 +105,12 @@ public class DocumentManagementApiResource { @POST @Consumes({ MediaType.MULTIPART_FORM_DATA }) @Produces({ MediaType.APPLICATION_JSON }) - public String createDocument(@PathParam("entityType") final String entityType, @PathParam("entityId") final Long entityId, - @HeaderParam("Content-Length") final Long fileSize, @FormDataParam("file") final InputStream inputStream, - @FormDataParam("file") final FormDataContentDisposition fileDetails, @FormDataParam("file") final FormDataBodyPart bodyPart, - @FormDataParam("name") final String name, @FormDataParam("description") final String description) { + @ApiOperation(value = "Create a Document", notes = "Note: A document is created using a Multi-part form upload \n" + "\n" + "Body Parts\n" + "\n" + "name : \n" + "Name or summary of the document\n" + "\n" + "description : \n" + "Description of the document\n" + "\n" + "file : \n" + "The file to be uploaded\n" + "\n" + "Mandatory Fields : \n" + "file and description") + @ApiResponses({@ApiResponse(code = 200, message = "Not Shown (multi-part form data)", response = DocumentManagementApiResourceSwagger.PostEntityTypeEntityIdDocumentsResponse.class)}) + public String createDocument(@PathParam("entityType") @ApiParam(value = "entityType") final String entityType, @PathParam("entityId") @ApiParam(value = "entityId") final Long entityId, + @HeaderParam("Content-Length") @ApiParam(value = "Content-Length") final Long fileSize, @FormDataParam("file") @ApiParam(value = "file") final InputStream inputStream, + @FormDataParam("file") final @ApiParam(value = "file") FormDataContentDisposition fileDetails, @FormDataParam("file") @ApiParam(value = "file") final FormDataBodyPart bodyPart, + @FormDataParam("name") @ApiParam(value = "name") final String name, @FormDataParam("description") @ApiParam(value = "description") final String description) { /** * TODO: also need to have a backup and stop reading from stream after @@ -127,11 +133,13 @@ public class DocumentManagementApiResource { @Path("{documentId}") @Consumes({ MediaType.MULTIPART_FORM_DATA }) @Produces({ MediaType.APPLICATION_JSON }) - public String updateDocument(@PathParam("entityType") final String entityType, @PathParam("entityId") final Long entityId, - @PathParam("documentId") final Long documentId, @HeaderParam("Content-Length") final Long fileSize, - @FormDataParam("file") final InputStream inputStream, @FormDataParam("file") final FormDataContentDisposition fileDetails, - @FormDataParam("file") final FormDataBodyPart bodyPart, @FormDataParam("name") final String name, - @FormDataParam("description") final String description) { + @ApiOperation(value = "Update a Document", notes = "Note: A document is updated using a Multi-part form upload \n" + "Body Parts\n" + "name\n" + "Name or summary of the document\n" + "description\n" + "Description of the document\n" + "file\n" + "The file to be uploaded") + @ApiResponses({@ApiResponse(code = 200, message = "Not Shown (multi-part form data)", response = DocumentManagementApiResourceSwagger.PutEntityTypeEntityIdDocumentsResponse.class)}) + public String updateDocument(@PathParam("entityType") @ApiParam(value = "entityType") final String entityType, @PathParam("entityId") @ApiParam(value = "entityId") final Long entityId, + @PathParam("documentId") @ApiParam(value = "documentId") final Long documentId, @HeaderParam("Content-Length") @ApiParam(value = "Content-Length") final Long fileSize, + @FormDataParam("file") @ApiParam(value = "file") final InputStream inputStream, @FormDataParam("file") @ApiParam(value = "file") final FormDataContentDisposition fileDetails, + @FormDataParam("file") @ApiParam(value = "file") final FormDataBodyPart bodyPart, @FormDataParam("name") @ApiParam(value = "name") final String name, + @FormDataParam("description") @ApiParam(value = "description") final String description) { final Set modifiedParams = new HashSet<>(); modifiedParams.add("name"); @@ -166,8 +174,10 @@ public class DocumentManagementApiResource { @Path("{documentId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String getDocument(@PathParam("entityType") final String entityType, @PathParam("entityId") final Long entityId, - @PathParam("documentId") final Long documentId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve a Document", notes = "Example Requests:\n" + "\n" + "clients/1/documents/1\n" + "\n" + "\n" + "loans/1/documents/1\n" + "\n" + "\n" + "client_identifiers/1/documents/1?fields=name,description") + @ApiResponses({@ApiResponse(code = 200, message = "", response = DocumentManagementApiResourceSwagger.GetEntityTypeEntityIdDocumentsResponse.class)}) + public String getDocument(@PathParam("entityType") @ApiParam(value = "entityType") final String entityType, @PathParam("entityId") @ApiParam(value = "entityId") final Long entityId, + @PathParam("documentId") @ApiParam(value = "documentId") final Long documentId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.SystemEntityType); @@ -181,8 +191,10 @@ public class DocumentManagementApiResource { @Path("{documentId}/attachment") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_OCTET_STREAM }) - public Response downloadFile(@PathParam("entityType") final String entityType, @PathParam("entityId") final Long entityId, - @PathParam("documentId") final Long documentId) { + @ApiOperation(value = "Retrieve Binary File associated with Document", notes = "Request used to download the file associated with the document\n" + "\n" + "Example Requests:\n" + "\n" + "clients/1/documents/1/attachment\n" + "\n" + "\n" + "loans/1/documents/1/attachment") + @ApiResponses({@ApiResponse(code = 200, message = "Not Shown: The corresponding Binary file")}) + public Response downloadFile(@PathParam("entityType") @ApiParam(value = "entityType") final String entityType, @PathParam("entityId") @ApiParam(value = "entityId") final Long entityId, + @PathParam("documentId") @ApiParam(value = "documentId") final Long documentId) { this.context.authenticatedUser().validateHasReadPermission(this.SystemEntityType); @@ -198,8 +210,10 @@ public class DocumentManagementApiResource { @Path("{documentId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String deleteDocument(@PathParam("entityType") final String entityType, @PathParam("entityId") final Long entityId, - @PathParam("documentId") final Long documentId) { + @ApiOperation(value = "Remove a Document", notes = "") + @ApiResponses({@ApiResponse(code = 200, message = "", response = DocumentManagementApiResourceSwagger.DeleteEntityTypeEntityIdDocumentsResponse.class)}) + public String deleteDocument(@PathParam("entityType") @ApiParam(value = "entityType") final String entityType, @PathParam("entityId") @ApiParam(value = "entityId") final Long entityId, + @PathParam("documentId") @ApiParam(value = "documentId") final Long documentId) { final DocumentCommand documentCommand = new DocumentCommand(null, documentId, entityType, entityId, null, null, null, null, null, null); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/DocumentManagementApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/DocumentManagementApiResourceSwagger.java new file mode 100644 index 000000000..39fe48215 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/DocumentManagementApiResourceSwagger.java @@ -0,0 +1,110 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.infrastructure.documentmanagement.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * Created by sanyam on 7/8/17. + */ + +final class DocumentManagementApiResourceSwagger { + private DocumentManagementApiResourceSwagger() { + + } + + @ApiModel(value = "GetEntityTypeEntityIdDocumentsResponse") + public static final class GetEntityTypeEntityIdDocumentsResponse { + private GetEntityTypeEntityIdDocumentsResponse() { + + } + + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "clients") + public String parentEntityType; + @ApiModelProperty(example = "1") + public Long parentEntityId; + @ApiModelProperty(example = "Client Details Form") + public String name; + @ApiModelProperty(example = "CGAP.pdf") + public String fileName; + @ApiModelProperty(example = "5246719") + public Long size; + @ApiModelProperty(example = "application/pdf") + public String type; + @ApiModelProperty(example = "A signed form signed by new member") + public String description; + @ApiModelProperty(example = "") + public String location; + @ApiModelProperty(example = "") + public Integer storageType; + } + + @ApiModel(value = "PostEntityTypeEntityIdDocumentsResponse") + public static final class PostEntityTypeEntityIdDocumentsResponse { + private PostEntityTypeEntityIdDocumentsResponse() { + + } + @ApiModelProperty(example = "3") + public Long resourceId; + @ApiModelProperty(example = "3") + public String resourceIdentifier; + } + + @ApiModel(value = "PutEntityTypeEntityIdDocumentsResponse") + public static final class PutEntityTypeEntityIdDocumentsResponse { + private PutEntityTypeEntityIdDocumentsResponse() { + + } + + public final class PutEntityTypeEntityIdDocumentsResponseChangesSwagger{ + private PutEntityTypeEntityIdDocumentsResponseChangesSwagger() { + + } + + } + @ApiModelProperty(example = "3") + public Long resourceId; + public PutEntityTypeEntityIdDocumentsResponseChangesSwagger changes; + @ApiModelProperty(example = "3") + public String resourceIdentifier; + } + + @ApiModel(value = "DeleteEntityTypeEntityIdDocumentsResponse") + public static final class DeleteEntityTypeEntityIdDocumentsResponse { + private DeleteEntityTypeEntityIdDocumentsResponse() { + + } + + public final class PutEntityTypeEntityIdDocumentsResponseChangesSwagger{ + private PutEntityTypeEntityIdDocumentsResponseChangesSwagger() { + + } + + } + @ApiModelProperty(example = "3") + public Long resourceId; + public PutEntityTypeEntityIdDocumentsResponseChangesSwagger changes; + @ApiModelProperty(example = "3") + public String resourceIdentifier; + } + +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/ImagesApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/ImagesApiResource.java index 6a653d4eb..39afce5db 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/ImagesApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/ImagesApiResource.java @@ -34,6 +34,7 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.ResponseBuilder; +import io.swagger.annotations.Api; import org.apache.commons.lang.StringUtils; import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; import org.apache.fineract.infrastructure.core.domain.Base64EncodedImage; @@ -58,6 +59,7 @@ import com.sun.jersey.multipart.FormDataParam; @Path("{entity}/{entityId}/images") @Component @Scope("singleton") +@Api(value = "DomainName//api//v1//{entity}//{entityId}//images", description = "") public class ImagesApiResource { private final PlatformSecurityContext context; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/ImagesApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/ImagesApiResourceSwagger.java new file mode 100644 index 000000000..7455260d1 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/ImagesApiResourceSwagger.java @@ -0,0 +1,30 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.infrastructure.documentmanagement.api; + +/** + * Created by sanyam on 10/8/17. + */ + +final class ImagesApiResourceSwagger { + private ImagesApiResourceSwagger() { + + } + +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/api/FineractEntityApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/api/FineractEntityApiResource.java index 173c8271a..59ef12a39 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/api/FineractEntityApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/api/FineractEntityApiResource.java @@ -32,6 +32,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.Api; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -52,6 +53,7 @@ import org.springframework.stereotype.Component; @Produces({ MediaType.APPLICATION_JSON }) @Component @Scope("singleton") +@Api(value = "DomainName/api/v1/entitytoentitymapping", description = "") // https://github.com/swagger-api/swagger-ui/issues/1655 public class FineractEntityApiResource { private final PlatformSecurityContext context; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/api/HookApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/api/HookApiResource.java index 5aff5da99..21a6753ec 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/api/HookApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/api/HookApiResource.java @@ -35,6 +35,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -54,6 +55,7 @@ import org.springframework.stereotype.Component; @Produces({ MediaType.APPLICATION_JSON }) @Component @Scope("singleton") +@Api(value = "Hooks", description = "Hooks are a mechanism to trigger custom code on the occurence of events.") public class HookApiResource { private final PlatformSecurityContext context; @@ -77,6 +79,8 @@ public class HookApiResource { } @GET + @ApiOperation(value = "Retrieve Hooks", notes = "Returns the list of hooks.\n" + "\n" + "Example Requests:\n" + "\n" + "hooks", responseContainer = "List", response = HookApiResourceSwagger.GetHookResponse.class) + @ApiResponses({@ApiResponse(code = 200, message = "", response = HookApiResourceSwagger.GetHookResponse.class, responseContainer = "list")}) public String retrieveHooks(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission( @@ -93,7 +97,9 @@ public class HookApiResource { @GET @Path("{hookId}") - public String retrieveHook(@PathParam("hookId") final Long hookId, + @ApiOperation(value = "Retrieve a Hook", notes = "Returns the details of a Hook.\n" + "\n" + "Example Requests:\n" + "\n" + "hooks/1") + @ApiResponses({@ApiResponse(code = 200, message = "", response = HookApiResourceSwagger.GetHookResponse.class)}) + public String retrieveHook(@PathParam("hookId") @ApiParam(value = "hookId") final Long hookId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission( @@ -116,6 +122,8 @@ public class HookApiResource { @GET @Path("template") + @ApiOperation(value = "Retrieve Hooks Template", notes = "This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n" + "\n" + "Field Defaults\n" + "Allowed Value Lists\n" + "Example Request:\n" + "\n" + "hooks/template") + @ApiResponses({@ApiResponse(code = 200, message = "", response = HookApiResourceSwagger.GetHookTemplateResponse.class)}) public String template(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission( @@ -131,7 +139,10 @@ public class HookApiResource { } @POST - public String createHook(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Create a Hook", notes = "The following parameters can be passed for the creation of a hook :-\n" + "\n" + "name - string - Required. The name of the template that is being called. (See /hooks/template for the list of valid hook names.)\n" + "\n" + "isActive - boolean - Determines whether the hook is actually triggered.\n" + "\n" + "events - array - Determines what events the hook is triggered for.\n" + "\n" + "config - hash - Required. Key/value pairs to provide settings for this hook. These settings vary between the templates.\n" + "\n" + "templateId - Optional. The UGD template ID associated with the same entity (client or loan).") + @ApiImplicitParams({@ApiImplicitParam(paramType = "body", dataType = "body", required = true, type = "body", dataTypeClass = HookApiResourceSwagger.PostHookRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = HookApiResourceSwagger.PostHookResponse.class)}) + public String createHook(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() .createHook().withJson(apiRequestBodyAsJson).build(); @@ -144,8 +155,11 @@ public class HookApiResource { @PUT @Path("{hookId}") - public String updateHook(@PathParam("hookId") final Long hookId, - final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update a Hook", notes = "Updates the details of a hook.") + @ApiImplicitParams({@ApiImplicitParam(paramType = "body", dataType = "body", required = true, type = "body", dataTypeClass = HookApiResourceSwagger.PutHookRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = HookApiResourceSwagger.PutHookResponse.class)}) + public String updateHook(@PathParam("hookId") @ApiParam(value = "hookId") final Long hookId, + @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() .updateHook(hookId).withJson(apiRequestBodyAsJson).build(); @@ -158,7 +172,9 @@ public class HookApiResource { @DELETE @Path("{hookId}") - public String deleteHook(@PathParam("hookId") final Long hookId) { + @ApiOperation(value = "Delete a Hook", notes = "Deletes a hook.") + @ApiResponses({@ApiResponse(code = 200, message = "", response = HookApiResourceSwagger.DeleteHookResponse.class)}) + public String deleteHook(@PathParam("hookId") @ApiParam(value = "hookId") final Long hookId) { final CommandWrapper commandRequest = new CommandWrapperBuilder() .deleteHook(hookId).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/api/HookApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/api/HookApiResourceSwagger.java new file mode 100644 index 000000000..d1e379cce --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/api/HookApiResourceSwagger.java @@ -0,0 +1,147 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.infrastructure.hooks.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.apache.fineract.infrastructure.hooks.data.Event; +import org.apache.fineract.infrastructure.hooks.data.Field; +import org.apache.fineract.infrastructure.hooks.data.Grouping; +import org.apache.fineract.infrastructure.hooks.data.HookTemplateData; +import org.joda.time.LocalDate; + +import java.util.List; + +/** + * Created by sanyam on 11/8/17. + */ + +final class HookApiResourceSwagger { + private HookApiResourceSwagger() { + + } + + @ApiModel(value = "PostHookRequest") + public static final class PostHookRequest { + private PostHookRequest () { + + } + + @ApiModelProperty(example = "Web") + public String name; + @ApiModelProperty(example = "true") + public Boolean isActive; + @ApiModelProperty(example = "Kremlin") + public String displayName; + @ApiModelProperty(example = "1") + public Long templateId; + public List events; + public List config; + } + + @ApiModel(value = "PostHookResponse") + public static final class PostHookResponse { + private PostHookResponse() { + + } + @ApiModelProperty(example = "4") + public Long resourceId; + } + + @ApiModel(value = "GetHookResponse") + public static final class GetHookResponse { + private GetHookResponse() { + + } + + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "Web") + public String name; + @ApiModelProperty(example = "Kremlin") + public String displayName; + @ApiModelProperty(example = "true") + public Boolean isActive; + @ApiModelProperty(example = "[2014, 9, 16]") + public LocalDate createdAt; + @ApiModelProperty(example = "[2014, 9, 16]") + public LocalDate updatedAt; + @ApiModelProperty(example = "1") + public Long templateId; + @ApiModelProperty(example = "My UGD") + public String templateName; + public List events; + public List config; + } + + @ApiModel(value = "GetHookTemplateResponse") + public static final class GetHookTemplateResponse { + private GetHookTemplateResponse() { + + } + + public List templates; + public List groupings; + } + + @ApiModel(value = "DeleteHookResponse") + public static final class DeleteHookResponse { + private DeleteHookResponse() { + + } + @ApiModelProperty(example = "4") + public Long resourceId; + } + + @ApiModel(value = "PutHookRequest") + public static final class PutHookRequest { + private PutHookRequest () { + + } + + @ApiModelProperty(example = "Web") + public String name; + @ApiModelProperty(example = "true") + public Boolean isActive; + @ApiModelProperty(example = "Kremlin") + public String displayName; + @ApiModelProperty(example = "1") + public Long templateId; + public List events; + public List config; + } + + @ApiModel(value = "PutHookResponse") + public static final class PutHookResponse { + private PutHookResponse () { + + } + final class PutHookResponseChangesSwagger { + private PutHookResponseChangesSwagger() {} + @ApiModelProperty(example = "Kremlin") + public String displayName; + @ApiModelProperty(example = "1") + public List events; + public List config; + } + @ApiModelProperty(example = "4") + public Long resourceId; + public PutHookResponseChangesSwagger changes; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerApiResource.java index fe743074d..6962f2762 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerApiResource.java @@ -29,6 +29,7 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.commons.lang.StringUtils; import org.apache.fineract.infrastructure.core.api.ApiRequestParameterHelper; import org.apache.fineract.infrastructure.core.exception.UnrecognizedQueryParamException; @@ -43,6 +44,7 @@ import org.springframework.stereotype.Component; @Path("/scheduler") @Component +@Api(value = "Scheduler", description = "") public class SchedulerApiResource { private final PlatformSecurityContext context; @@ -62,6 +64,8 @@ public class SchedulerApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Retrieve Scheduler Status", notes = "Returns the scheduler status.\n" + "\n" + "Example Requests:\n" + "\n" + "scheduler") + @ApiResponses({@ApiResponse(code = 200, message = "", response = SchedulerApiResourceSwagger.GetSchedulerResponse.class)}) public String retrieveStatus(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(SchedulerJobApiConstants.SCHEDULER_RESOURCE_NAME); final boolean isSchedulerRunning = this.jobRegisterService.isSchedulerRunning(); @@ -74,7 +78,9 @@ public class SchedulerApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public Response changeSchedulerStatus(@QueryParam(SchedulerJobApiConstants.COMMAND) final String commandParam) { + @ApiOperation(value = "Activate Scheduler Jobs | Suspend Scheduler Jobs", notes = "Activates the scheduler job service. | Suspends the scheduler job service.") + @ApiResponses({@ApiResponse(code = 200, message = "POST : scheduler?command=start\n\n"+"\n"+"POST : scheduler?command=stop")}) + public Response changeSchedulerStatus(@QueryParam(SchedulerJobApiConstants.COMMAND) @ApiParam(value = "command") final String commandParam) { // check the logged in user have permissions to update scheduler status final boolean hasNotPermission = this.context.authenticatedUser().hasNotPermissionForAnyOf("ALL_FUNCTIONS", "UPDATE_SCHEDULER"); if (hasNotPermission) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerApiResourceSwagger.java new file mode 100644 index 000000000..e2f1b913d --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerApiResourceSwagger.java @@ -0,0 +1,42 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.infrastructure.jobs.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * Created by sanyam on 12/8/17. + */ +final class SchedulerApiResourceSwagger { + private SchedulerApiResourceSwagger(){ + + } + + @ApiModel(value = "GetSchedulerResponse") + public static final class GetSchedulerResponse { + private GetSchedulerResponse() { + + } + @ApiModelProperty(example = "true") + public boolean active; + } + + +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerJobApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerJobApiResource.java index 61faf10f1..46e41e99b 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerJobApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerJobApiResource.java @@ -33,6 +33,7 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.commons.lang.StringUtils; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; @@ -57,6 +58,7 @@ import org.springframework.stereotype.Component; @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Component +@Api(value = "MIFOSX-BATCH JOBS", description = "Batch jobs (also known as cron jobs on Unix-based systems) are a series of back-end jobs executed on a computer at a particular time defined in job's cron expression.\n" + "\n" + "At any point, you can view the list of batch jobs scheduled to run along with other details specific to each job. Manually you can execute the jobs at any point of time.\n" + "\n" + "The scheduler status can be either \"Active\" or \"Standby\". If the scheduler status is Active, it indicates that all batch jobs are running/ will run as per the specified schedule.If the scheduler status is Standby, it will ensure all scheduled batch runs are suspended.") public class SchedulerJobApiResource { private final SchedulerJobRunnerReadService schedulerJobRunnerReadService; @@ -84,6 +86,8 @@ public class SchedulerJobApiResource { } @GET + @ApiOperation(value = "Retrieve Scheduler Jobs", notes = "Returns the list of jobs.\n" + "\n" + "Example Requests:\n" + "\n" + "jobs") + @ApiResponses({@ApiResponse(code = 200, message = "", response = SchedulerJobApiResourceSwagger.GetJobsResponse.class, responseContainer = "list")}) public String retrieveAll(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(SchedulerJobApiConstants.SCHEDULER_RESOURCE_NAME); final List jobDetailDatas = this.schedulerJobRunnerReadService.findAllJobDeatils(); @@ -93,7 +97,9 @@ public class SchedulerJobApiResource { @GET @Path("{" + SchedulerJobApiConstants.JOB_ID + "}") - public String retrieveOne(@PathParam(SchedulerJobApiConstants.JOB_ID) final Long jobId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve a Job", notes = "Returns the details of a Job.\n" + "\n" + "Example Requests:\n" + "\n" + "jobs/5") + @ApiResponses({@ApiResponse(code = 200, message = "", response = SchedulerJobApiResourceSwagger.GetJobsResponse.class)}) + public String retrieveOne(@PathParam(SchedulerJobApiConstants.JOB_ID) @ApiParam(value = "jobId") final Long jobId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(SchedulerJobApiConstants.SCHEDULER_RESOURCE_NAME); final JobDetailData jobDetailData = this.schedulerJobRunnerReadService.retrieveOne(jobId); final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters()); @@ -102,9 +108,11 @@ public class SchedulerJobApiResource { @GET @Path("{" + SchedulerJobApiConstants.JOB_ID + "}/" + SchedulerJobApiConstants.JOB_RUN_HISTORY) - public String retrieveHistory(@Context final UriInfo uriInfo, @PathParam(SchedulerJobApiConstants.JOB_ID) final Long jobId, - @QueryParam("offset") final Integer offset, @QueryParam("limit") final Integer limit, - @QueryParam("orderBy") final String orderBy, @QueryParam("sortOrder") final String sortOrder) { + @ApiOperation(value = "Retrieve Job Run History", notes = "Example Requests:\n" + "\n" + "jobs/5/runhistory?offset=0&limit=200") + @ApiResponses({@ApiResponse(code = 200, message = "", response = SchedulerJobApiResourceSwagger.GetJobsJobIDJobRunHistoryResponse.class)}) + public String retrieveHistory(@Context final UriInfo uriInfo, @PathParam(SchedulerJobApiConstants.JOB_ID) @ApiParam(value = "jobId") final Long jobId, + @QueryParam("offset") @ApiParam(value = "offset") final Integer offset, @QueryParam("limit") @ApiParam(value = "limit") final Integer limit, + @QueryParam("orderBy") @ApiParam(value = "orderBy") final String orderBy, @QueryParam("sortOrder") @ApiParam(value = "sortOrder") final String sortOrder) { this.context.authenticatedUser().validateHasReadPermission(SchedulerJobApiConstants.SCHEDULER_RESOURCE_NAME); final SearchParameters searchParameters = SearchParameters.forPagination(offset, limit, orderBy, sortOrder); final Page jobhistoryDetailData = this.schedulerJobRunnerReadService.retrieveJobHistory(jobId, @@ -116,8 +124,10 @@ public class SchedulerJobApiResource { @POST @Path("{" + SchedulerJobApiConstants.JOB_ID + "}") - public Response executeJob(@PathParam(SchedulerJobApiConstants.JOB_ID) final Long jobId, - @QueryParam(SchedulerJobApiConstants.COMMAND) final String commandParam) { + @ApiOperation(value = "Run a Job", notes = "Manually Execute Specific Job.") + @ApiResponses({@ApiResponse(code = 200, message = "POST: jobs/1?command=executeJob")}) + public Response executeJob(@PathParam(SchedulerJobApiConstants.JOB_ID) @ApiParam(value = "jobId") final Long jobId, + @QueryParam(SchedulerJobApiConstants.COMMAND) @ApiParam(value = "command") final String commandParam) { // check the logged in user have permissions to execute scheduler jobs final boolean hasNotPermission = this.context.authenticatedUser().hasNotPermissionForAnyOf("ALL_FUNCTIONS", "EXECUTEJOB_SCHEDULER"); if (hasNotPermission) { @@ -136,7 +146,10 @@ public class SchedulerJobApiResource { @PUT @Path("{" + SchedulerJobApiConstants.JOB_ID + "}") - public String updateJobDetail(@PathParam(SchedulerJobApiConstants.JOB_ID) final Long jobId, final String jsonRequestBody) { + @ApiOperation(value = "Update a Job", notes = "Updates the details of a job.") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = SchedulerJobApiResourceSwagger.PutJobsJobIDRequest.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "")}) + public String updateJobDetail(@PathParam(SchedulerJobApiConstants.JOB_ID) @ApiParam(value = "jobId") final Long jobId, @ApiParam(hidden = true) final String jsonRequestBody) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // .updateJobDetail(jobId) // diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerJobApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerJobApiResourceSwagger.java new file mode 100644 index 000000000..d77439f10 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerJobApiResourceSwagger.java @@ -0,0 +1,96 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.infrastructure.jobs.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.apache.fineract.infrastructure.jobs.data.JobDetailHistoryData; + +import java.util.Date; +import java.util.List; + +/** + * Created by sanyam on 12/8/17. + */ +final class SchedulerJobApiResourceSwagger { + private SchedulerJobApiResourceSwagger() { + + } + + @ApiModel(value = "GetJobsResponse") + public static final class GetJobsResponse { + private GetJobsResponse() { + + } + @ApiModelProperty(example = "1") + public Long jobId; + @ApiModelProperty(example = "Update loan Summary") + public String displayName; + @ApiModelProperty(example = "") + public Date nextRunTime; + @ApiModelProperty(example = "") + public String initializingError; + @ApiModelProperty(example = "0 0 22 1/1 * ? *") + public String cronExpression; + @ApiModelProperty(example = "false") + public boolean active; + @ApiModelProperty(example = "false") + public boolean currentlyRunning; + public JobDetailHistoryData lastRunHistory; + } + + @ApiModel(value = "PutJobsJobsIDRequest") + public static final class PutJobsJobIDRequest { + private PutJobsJobIDRequest() { + + } + @ApiModelProperty(example = "Update loan Summary") + public String displayName; + @ApiModelProperty(example = "0 0 22 1/1 * ? *") + public String cronExpression; + @ApiModelProperty(example = "false") + public boolean active; + + } + + @ApiModel(value = "GetJobsJobIDJobRunHistoryResponse") + public static final class GetJobsJobIDJobRunHistoryResponse { + private GetJobsJobIDJobRunHistoryResponse() { + + } + + final class JobDetailHistoryDataSwagger { + private JobDetailHistoryDataSwagger(){} + @ApiModelProperty(example = "1") + public Long version; + @ApiModelProperty(example = "Jul 16, 2013 12:00:00 PM") + public Date jobRunStartTime; + @ApiModelProperty(example = "Jul 16, 2013 12:00:00 PM") + public Date jobRunEndTime; + @ApiModelProperty(example = "success") + public String status; + @ApiModelProperty(example = "cron") + public String triggerType; + } + @ApiModelProperty(example = "8") + public int totalFilteredRecords; + public List pageItems; + + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/api/ReportMailingJobApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/api/ReportMailingJobApiResource.java index da6da6d8f..f121626e7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/api/ReportMailingJobApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/api/ReportMailingJobApiResource.java @@ -31,6 +31,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -51,6 +52,7 @@ import org.springframework.stereotype.Component; @Path("/" + ReportMailingJobConstants.REPORT_MAILING_JOB_RESOURCE_NAME) @Component @Scope("singleton") +@Api(value = "Report Mailing Jobs", description = "This resource allows you to create a scheduled job that runs a report and sents it by email to specified email addresses.\n" + "\n" + "The scheduled job can be configured to run once or on a regular basis (once a day, twice a week, etc).") public class ReportMailingJobApiResource { private final PlatformSecurityContext platformSecurityContext; @@ -75,7 +77,10 @@ public class ReportMailingJobApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String createReportMailingJob(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Create a Report Mailing Job", notes = "Mandatory Fields: " + "name, startDateTime, stretchyReportId, emailRecipients, emailSubject, emailMessage, emailAttachmentFileFormatId, recurrence, isActive\n" + "\n" + "Optional Fields: " + "description, stretchyReportParamMap") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = ReportMailingJobApiResourceSwagger.PostReportMailingJobsRequest.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = ReportMailingJobApiResourceSwagger.PostReportMailingJobsResponse.class)}) + public String createReportMailingJob(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandWrapper = new CommandWrapperBuilder(). createReportMailingJob(ReportMailingJobConstants.REPORT_MAILING_JOB_ENTITY_NAME). withJson(apiRequestBodyAsJson).build(); @@ -89,7 +94,10 @@ public class ReportMailingJobApiResource { @Path("{entityId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String updateReportMailingJob(@PathParam("entityId") final Long entityId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update a Report Mailing Job\n", notes = "") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = ReportMailingJobApiResourceSwagger.PutReportMailingJobsRequest.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = ReportMailingJobApiResourceSwagger.PutReportMailingJobsResponse.class)}) + public String updateReportMailingJob(@PathParam("entityId") @ApiParam(value = "entityId") final Long entityId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandWrapper = new CommandWrapperBuilder(). updateReportMailingJob(ReportMailingJobConstants.REPORT_MAILING_JOB_ENTITY_NAME, entityId). withJson(apiRequestBodyAsJson).build(); @@ -103,7 +111,10 @@ public class ReportMailingJobApiResource { @Path("{entityId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String deleteReportMailingJob(@PathParam("entityId") final Long entityId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Delete a Report Mailing Job", notes = "") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = ReportMailingJobApiResourceSwagger.DeleteReportMailingJobsRequest.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = ReportMailingJobApiResourceSwagger.DeleteReportMailingJobsResponse.class)}) + public String deleteReportMailingJob(@PathParam("entityId") @ApiParam(value = "entityId") final Long entityId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandWrapper = new CommandWrapperBuilder(). deleteReportMailingJob(ReportMailingJobConstants.REPORT_MAILING_JOB_ENTITY_NAME, entityId). withJson(apiRequestBodyAsJson).build(); @@ -117,7 +128,9 @@ public class ReportMailingJobApiResource { @Path("{entityId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveReportMailingJob(@PathParam("entityId") final Long entityId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve a Report Mailing Job", notes = "Example Requests:\n" + "\n" + "reportmailingjobs/1\n" + "\n" + "\n" + "reportmailingjobs/1?template=true") + @ApiResponses({@ApiResponse(code = 200, message = "", response = ReportMailingJobApiResourceSwagger.GetReportMailingJobsResponse.class)}) + public String retrieveReportMailingJob(@PathParam("entityId") @ApiParam(value = "entityId") final Long entityId, @Context final UriInfo uriInfo) { this.platformSecurityContext.authenticatedUser().validateHasReadPermission(ReportMailingJobConstants.REPORT_MAILING_JOB_ENTITY_NAME); final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters()); @@ -135,6 +148,8 @@ public class ReportMailingJobApiResource { @Path("template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Retrieve Report Mailing Job Details Template", notes = "This is a convenience resource. It can be useful when building maintenance user interface screens for report mailing job applications. The template data returned consists of any or all of:\n" + "\n" + "Field Defaults\n" + "Allowed Value Lists\n" + "Example Request:\n" + "\n" + "reportmailingjobs/template") + @ApiResponses({@ApiResponse(code = 200, message = "", response = ReportMailingJobApiResourceSwagger.GetReportMailingJobsTemplate.class)}) public String retrieveReportMailingJobTemplate(@Context final UriInfo uriInfo) { this.platformSecurityContext.authenticatedUser().validateHasReadPermission(ReportMailingJobConstants.REPORT_MAILING_JOB_ENTITY_NAME); @@ -147,10 +162,12 @@ public class ReportMailingJobApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "List Report Mailing Jobs", notes = "Example Requests:\n" + "\n" + "reportmailingjobs") + @ApiResponses({@ApiResponse(code = 200, message = "", response = ReportMailingJobApiResourceSwagger.GetReportMailingJobsResponse.class, responseContainer = "list")}) public String retrieveAllReportMailingJobs(@Context final UriInfo uriInfo, - @QueryParam("offset") final Integer offset, - @QueryParam("limit") final Integer limit, @QueryParam("orderBy") final String orderBy, - @QueryParam("sortOrder") final String sortOrder) { + @QueryParam("offset") @ApiParam(value = "offset") final Integer offset, + @QueryParam("limit") @ApiParam(value = "limit") final Integer limit, @QueryParam("orderBy") @ApiParam(value = "orderBy") final String orderBy, + @QueryParam("sortOrder") @ApiParam(value = "sortOrder") final String sortOrder) { this.platformSecurityContext.authenticatedUser().validateHasReadPermission(ReportMailingJobConstants.REPORT_MAILING_JOB_ENTITY_NAME); final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters()); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/api/ReportMailingJobApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/api/ReportMailingJobApiResourceSwagger.java new file mode 100644 index 000000000..41b5a36ea --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/api/ReportMailingJobApiResourceSwagger.java @@ -0,0 +1,172 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.infrastructure.reportmailingjob.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.apache.fineract.infrastructure.core.data.EnumOptionData; +import org.apache.fineract.infrastructure.dataqueries.data.ReportData; +import org.apache.fineract.infrastructure.reportmailingjob.data.ReportMailingJobTimelineData; +import org.joda.time.DateTime; + +import java.util.List; + +/** + * Created by sanyam on 13/8/17. + */ +final class ReportMailingJobApiResourceSwagger { + private ReportMailingJobApiResourceSwagger(){ + + } + + @ApiModel(value = "GetReportMailingJobsTemplate") + public static final class GetReportMailingJobsTemplate { + private GetReportMailingJobsTemplate(){ + + } + @ApiModelProperty(example = "true") + public boolean isActive; + public List emailAttachmentFileFormatOptions; + public List stretchyReportParamDateOptions; + } + + @ApiModel(value = "GetReportMailingJobsResponse") + public static final class GetReportMailingJobsResponse { + private GetReportMailingJobsResponse(){ + + } + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "Client Numbers Report") + public String name; + @ApiModelProperty(example = "Client Numbers Report") + public String description; + @ApiModelProperty(example = "1469627093000") + public DateTime startDateTime; + @ApiModelProperty(example = "") + public String recurrence; + public ReportMailingJobTimelineData timeline; + @ApiModelProperty(example = "info@musonisystem.com") + public String emailRecipients; + @ApiModelProperty(example = "Client Numbers Report") + public String emailSubject; + @ApiModelProperty(example = "Client Numbers Report") + public String emailMessage; + @ApiModelProperty(example = "") + public EnumOptionData emailAttachmentFileFormat; + @ApiModelProperty(example = "") + public ReportData stretchyReport; + @ApiModelProperty(example = "{\"startDate\":\"2016-07-01\",\"endDate\":\"2016-08-02\",\"selectOffice\":\"1\",\"environementUrl\":\"environementUrl\"}") + public String stretchyReportParamMap; + @ApiModelProperty(example = "1469627093000") + public DateTime nextRunDateTime; + @ApiModelProperty(example = "0") + public Integer numberOfRuns; + @ApiModelProperty(example = "true") + public boolean isActive; + @ApiModelProperty(example = "1") + public Long runAsUserId; + } + + @ApiModel(value = "PostReportMailingJobsRequest") + public static final class PostReportMailingJobsRequest { + private PostReportMailingJobsRequest(){ + + } + @ApiModelProperty(example = "en_GB") + public String locale; + @ApiModelProperty(example = "dd-MM-yyyy HH:mm:ss") + public String dateFormat; + @ApiModelProperty(example = "Client Numbers Report") + public String name; + @ApiModelProperty(example = "Client Numbers Report") + public String description; + @ApiModelProperty(example = "1469627093000") + public DateTime startDateTime; + @ApiModelProperty(example = "120") + public Long stretchyReportId; + @ApiModelProperty(example = "info@musonisystem.com") + public String emailRecipients; + @ApiModelProperty(example = "Client Numbers Report") + public String emailSubject; + @ApiModelProperty(example = "Client Numbers Report") + public String emailMessage; + @ApiModelProperty(example = "FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,WE,FR") + public String recurrence; + @ApiModelProperty(example = "true") + public boolean isActive; + @ApiModelProperty(example = "{\"startDate\":\"2016-07-01\",\"endDate\":\"2016-08-02\",\"selectOffice\":\"1\",\"environementUrl\":\"environementUrl\"}") + public String stretchyReportParamMap; + + } + + @ApiModel(value = "PostReportMailingJobsResponse") + public static final class PostReportMailingJobsResponse { + private PostReportMailingJobsResponse(){ + + } + @ApiModelProperty(example = "1") + public Long resourceId; + } + + @ApiModel(value = "PutReportMailingJobsRequest") + public static final class PutReportMailingJobsRequest { + private PutReportMailingJobsRequest(){ + + } + @ApiModelProperty(example = "en_GB") + public String locale; + @ApiModelProperty(example = "dd-MM-yyyy HH:mm:ss") + public String dateFormat; + @ApiModelProperty(example = "10-08-2016 23:30:00") + public DateTime startDateTime; + } + + @ApiModel(value = "PutReportMailingJobsResponse") + public static final class PutReportMailingJobsResponse { + private PutReportMailingJobsResponse(){ + + } + final class PutReportMailingJobsResponseChanges{ + private PutReportMailingJobsResponseChanges(){} + @ApiModelProperty(example = "10-08-2016 23:30:00") + public DateTime startDateTime; + } + @ApiModelProperty(example = "1") + public Long resourceId; + public PutReportMailingJobsResponseChanges changes; + } + + @ApiModel(value = "DeleteReportMailingJobsRequest ") + public static final class DeleteReportMailingJobsRequest { + private DeleteReportMailingJobsRequest(){ + + } + } + + @ApiModel(value = "DeleteReportMailingJobsResponse") + public static final class DeleteReportMailingJobsResponse { + private DeleteReportMailingJobsResponse(){ + + } + @ApiModelProperty(example = "1") + public Long resourceId; + } + +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/api/ReportMailingJobRunHistoryApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/api/ReportMailingJobRunHistoryApiResource.java index a7802eee9..30ebc73c7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/api/ReportMailingJobRunHistoryApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/api/ReportMailingJobRunHistoryApiResource.java @@ -27,6 +27,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.fineract.infrastructure.core.api.ApiRequestParameterHelper; import org.apache.fineract.infrastructure.core.serialization.ApiRequestJsonSerializationSettings; import org.apache.fineract.infrastructure.core.serialization.DefaultToApiJsonSerializer; @@ -43,6 +44,7 @@ import org.springframework.stereotype.Component; @Path("/" + ReportMailingJobConstants.REPORT_MAILING_JOB_RUN_HISTORY_RESOURCE_NAME) @Component @Scope("singleton") +@Api(value = "List Report Mailing Job History", description = "") public class ReportMailingJobRunHistoryApiResource { private final PlatformSecurityContext platformSecurityContext; @@ -64,10 +66,14 @@ public class ReportMailingJobRunHistoryApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveAllByReportMailingJobId(@Context final UriInfo uriInfo, - @QueryParam("reportMailingJobId") final Long reportMailingJobId, @QueryParam("offset") final Integer offset, - @QueryParam("limit") final Integer limit, @QueryParam("orderBy") final String orderBy, - @QueryParam("sortOrder") final String sortOrder) { + @ApiOperation(value = "List Report Mailing Job History", notes = "The list capability of report mailing job history can support pagination and sorting.\n" + "\n" + "Example Requests:\n" + "\n" + "reportmailingjobrunhistory/1") + @ApiResponses({@ApiResponse(code = 200, message = "", response = ReportMailingJobRunHistoryData.class)}) + public String retrieveAllByReportMailingJobId(@Context final UriInfo uriInfo, + @QueryParam("reportMailingJobId") @ApiParam(value = "reportMailingJobId") final Long reportMailingJobId, + @QueryParam("offset") @ApiParam(value = "offset") final Integer offset, + @QueryParam("limit") @ApiParam(value = "limit") final Integer limit, + @QueryParam("orderBy") @ApiParam(value = "orderBy") final String orderBy, + @QueryParam("sortOrder") @ApiParam(value = "sortOrder") final String sortOrder) { this.platformSecurityContext.authenticatedUser().validateHasReadPermission(ReportMailingJobConstants.REPORT_MAILING_JOB_ENTITY_NAME); final SearchParameters searchParameters = SearchParameters.fromReportMailingJobRunHistory(offset, limit, orderBy, sortOrder); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/api/ReportMailingJobRunHistoryApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/api/ReportMailingJobRunHistoryApiResourceSwagger.java new file mode 100644 index 000000000..e19538582 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/api/ReportMailingJobRunHistoryApiResourceSwagger.java @@ -0,0 +1,54 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.infrastructure.reportmailingjob.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import io.swagger.annotations.ApiParam; +import org.joda.time.DateTime; + +/** + * Created by sanyam on 13/8/17. + */ +final class ReportMailingJobRunHistoryApiResourceSwagger { + private ReportMailingJobRunHistoryApiResourceSwagger(){ + + } + + @ApiModel(value = "GetReportMailingJobRunHistoryResponse") + public static final class GetReportMailingJobRunHistoryResponse { + private GetReportMailingJobRunHistoryResponse(){ + + } + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "1") + public Long reportMailingJobId; + @ApiModelProperty(example = "1469627093050") + public DateTime startDateTime; + @ApiModelProperty(example = "1469627093050") + public DateTime endDateTime; + @ApiModelProperty(example = "success") + public String status; + @ApiModelProperty(example = "") + public String errorMessage; + @ApiModelProperty(example = "") + public String errorLog; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/api/AuthenticationApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/api/AuthenticationApiResource.java index 163835931..80a6a7e36 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/api/AuthenticationApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/api/AuthenticationApiResource.java @@ -28,6 +28,7 @@ import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; +import io.swagger.annotations.*; import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.infrastructure.core.serialization.ToApiJsonSerializer; import org.apache.fineract.infrastructure.security.data.AuthenticatedUserData; @@ -51,6 +52,7 @@ import com.sun.jersey.core.util.Base64; @Component @Profile("basicauth") @Scope("singleton") +@Api(value = "Authentication HTTP Basic", description = "An API capability that allows client applications to verify authentication details using HTTP Basic Authentication.") public class AuthenticationApiResource { private final DaoAuthenticationProvider customAuthenticationProvider; @@ -69,7 +71,9 @@ public class AuthenticationApiResource { @POST @Produces({ MediaType.APPLICATION_JSON }) - public String authenticate(@QueryParam("username") final String username, @QueryParam("password") final String password) { + @ApiOperation(value = "Verify authentication", notes = "Authenticates the credentials provided and returns the set roles and permissions allowed.") + @ApiResponses({@ApiResponse(code = 200, message = "", response = AuthenticationApiResourceSwagger.PostAuthenticationResponse.class), @ApiResponse(code = 400, message = "Unauthenticated. Please login")}) + public String authenticate(@QueryParam("username") @ApiParam(value = "username") final String username, @QueryParam("password") @ApiParam(value = "password") final String password) { final Authentication authentication = new UsernamePasswordAuthenticationToken(username, password); final Authentication authenticationCheck = this.customAuthenticationProvider.authenticate(authentication); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/api/AuthenticationApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/api/AuthenticationApiResourceSwagger.java new file mode 100644 index 000000000..42e3d8fdb --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/api/AuthenticationApiResourceSwagger.java @@ -0,0 +1,62 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.infrastructure.security.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.apache.fineract.infrastructure.core.data.EnumOptionData; +import org.apache.fineract.useradministration.data.RoleData; + +import java.util.Collection; + +/** + * Created by sanyam on 13/8/17. + */ +final class AuthenticationApiResourceSwagger { + private AuthenticationApiResourceSwagger(){ + + } + + @ApiModel(value = "PostAuthenticationResponse") + public static final class PostAuthenticationResponse { + private PostAuthenticationResponse() { + + } + @ApiModelProperty(example = "mifos") + public String username; + @ApiModelProperty(example = "1") + public Long userId; + @ApiModelProperty(example = "bWlmb3M6cGFzc3dvcmQ=") + public String base64EncodedAuthenticationKey; + @ApiModelProperty(example = "true") + public boolean authenticated; + @ApiModelProperty(example = "1") + public Long officeId; + @ApiModelProperty(example = "Head Office") + public String officeName; + @ApiModelProperty(example = "1") + public Long staffId; + @ApiModelProperty(example = "Director, Program") + public String staffDisplayName; + public EnumOptionData organisationalRole; + public Collection roles; + @ApiModelProperty(example = "ALL_FUNCTIONS") + public Collection permissions; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/api/UserDetailsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/api/UserDetailsApiResource.java index 67f061680..04981f919 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/api/UserDetailsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/api/UserDetailsApiResource.java @@ -28,6 +28,7 @@ import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; +import io.swagger.annotations.*; import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.infrastructure.core.serialization.ToApiJsonSerializer; import org.apache.fineract.infrastructure.security.data.AuthenticatedOauthUserData; @@ -51,6 +52,7 @@ import org.springframework.stereotype.Component; @Component @Profile("oauth") @Scope("singleton") +@Api(value = "Fetch authenticated user details", description = "") public class UserDetailsApiResource { private final ResourceServerTokenServices tokenServices; @@ -68,7 +70,9 @@ public class UserDetailsApiResource { @GET @Produces({ MediaType.APPLICATION_JSON }) - public String fetchAuthenticatedUserData(@QueryParam("access_token") final String accessToken) { + @ApiOperation(value = "Fetch authenticated user details\n", notes = "checks the Authentication and returns the set roles and permissions allowed.") + @ApiResponses({@ApiResponse(code = 200, message = "", response = UserDetailsApiResourceSwagger.GetUserDetailsResponse.class)}) + public String fetchAuthenticatedUserData(@QueryParam("access_token") @ApiParam(value = "access_token") final String accessToken) { final Authentication authentication = this.tokenServices.loadAuthentication(accessToken); if (authentication.isAuthenticated()) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/api/UserDetailsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/api/UserDetailsApiResourceSwagger.java new file mode 100644 index 000000000..38c10f757 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/api/UserDetailsApiResourceSwagger.java @@ -0,0 +1,62 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.infrastructure.security.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.apache.fineract.infrastructure.core.data.EnumOptionData; +import org.apache.fineract.useradministration.data.RoleData; + +import java.util.Collection; + +/** + * Created by sanyam on 13/8/17. + */ +final class UserDetailsApiResourceSwagger { + private UserDetailsApiResourceSwagger() { + + } + + @ApiModel(value = "GetUserDetailsResponse") + public static final class GetUserDetailsResponse { + private GetUserDetailsResponse(){ + + } + @ApiModelProperty(example = "mifos") + public String username; + @ApiModelProperty(example = "1") + public Long userId; + @ApiModelProperty(example = "bWlmb3M6cGFzc3dvcmQ=") + public String accessToken; + @ApiModelProperty(example = "true") + public boolean authenticated; + @ApiModelProperty(example = "1") + public Long officeId; + @ApiModelProperty(example = "Head Office") + public String officeName; + @ApiModelProperty(example = "1") + public Long staffId; + @ApiModelProperty(example = "mifosStaffDisplayName") + public String staffDisplayName; + public EnumOptionData organisationalRole; + public Collection roles; + @ApiModelProperty(example = "ALL_FUNCTIONS") + public Collection permissions; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/api/SmsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/api/SmsApiResource.java index 9f73ea8ee..7b9c00e3f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/api/SmsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/api/SmsApiResource.java @@ -34,6 +34,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.Api; import org.apache.fineract.accounting.journalentry.api.DateParam; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; @@ -56,6 +57,7 @@ import org.springframework.stereotype.Component; @Produces({ MediaType.APPLICATION_JSON }) @Component @Scope("singleton") +@Api(value = "SMS", description = "") public class SmsApiResource { private final String resourceNameForPermissions = "SMS"; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/LikelihoodApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/LikelihoodApiResource.java index 4256fe566..d030ae03a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/LikelihoodApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/LikelihoodApiResource.java @@ -28,6 +28,7 @@ import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; +import io.swagger.annotations.Api; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -46,6 +47,7 @@ import org.springframework.stereotype.Component; @Path("/likelihood") @Component @Scope("singleton") +@Api(value = "Likelihood") public class LikelihoodApiResource { private final DefaultToApiJsonSerializer toApiJsonSerializer; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/PovertyLineApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/PovertyLineApiResource.java index ce3cfdc06..4e0b450e2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/PovertyLineApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/PovertyLineApiResource.java @@ -25,6 +25,7 @@ import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; +import io.swagger.annotations.Api; import org.apache.fineract.infrastructure.core.serialization.DefaultToApiJsonSerializer; import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; import org.apache.fineract.infrastructure.survey.data.LikeliHoodPovertyLineData; @@ -37,6 +38,7 @@ import org.springframework.stereotype.Component; @Path("/povertyLine") @Component @Scope("singleton") +@Api(value = "Poverty Line") public class PovertyLineApiResource { private final DefaultToApiJsonSerializer toApiJsonSerializer; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/SurveyApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/SurveyApiResource.java index ec0e46e9f..a230ff439 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/SurveyApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/SurveyApiResource.java @@ -30,6 +30,7 @@ import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; +import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -52,6 +53,7 @@ import org.springframework.stereotype.Component; @Path("/survey") @Component @Scope("singleton") +@Api(value = "Survey", description = "") public class SurveyApiResource { private final DefaultToApiJsonSerializer toApiJsonSerializer; @@ -78,6 +80,8 @@ public class SurveyApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Retrieve surveys", notes = "Retrieve surveys. This allows to retrieve the list of survey tables registered .") + @ApiResponses({@ApiResponse(code = 200, message = "", response = SurveyApiResourceSwagger.GetSurveyResponse.class, responseContainer = "List")}) public String retrieveSurveys() { this.context.authenticatedUser().validateHasReadPermission(SurveyApiConstants.SURVEY_RESOURCE_NAME); @@ -90,7 +94,9 @@ public class SurveyApiResource { @Path("{surveyName}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveSurvey(@PathParam("surveyName") final String surveyName) { + @ApiOperation(value = "Retrieve survey", notes = "Lists a registered survey table details and the Apache Fineract Core application table they are registered to.") + @ApiResponses({@ApiResponse(code = 200, message = "", response = SurveyApiResourceSwagger.GetSurveyResponse.class)}) + public String retrieveSurvey(@PathParam("surveyName") @ApiParam(value = "surveyName") final String surveyName) { this.context.authenticatedUser().validateHasReadPermission(SurveyApiConstants.SURVEY_RESOURCE_NAME); @@ -104,7 +110,10 @@ public class SurveyApiResource { @Path("{surveyName}/{apptableId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String createDatatableEntry(@PathParam("surveyName") final String datatable, @PathParam("apptableId") final Long apptableId, + @ApiOperation(value = "Create an entry in the survey table", notes = "Insert and entry in a survey table (full fill the survey)." + "\n" + "\n" + "Refer Link for sample Body: [ https://demo.openmf.org/api-docs/apiLive.htm#survey_create ] ") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = SurveyApiResourceSwagger.PostSurveySurveyNameApptableIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = SurveyApiResourceSwagger.PostSurveySurveyNameApptableIdResponse.class)}) + public String createDatatableEntry(@PathParam("surveyName") @ApiParam(value = "surveyName") final String datatable, @PathParam("apptableId") @ApiParam(value = "apptableId") final Long apptableId, final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/SurveyApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/SurveyApiResourceSwagger.java new file mode 100644 index 000000000..322a5a85f --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/SurveyApiResourceSwagger.java @@ -0,0 +1,103 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.infrastructure.survey.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.apache.fineract.infrastructure.dataqueries.data.DatatableData; +import org.apache.fineract.infrastructure.dataqueries.data.ResultsetColumnHeaderData; +import org.joda.time.DateTime; + +import java.util.List; + +/** + * Created by sanyam on 13/8/17. + */ +final class SurveyApiResourceSwagger { + private SurveyApiResourceSwagger(){ + + } + + @ApiModel(value = "GetSurveyResponse") + public static final class GetSurveyResponse { + private GetSurveyResponse(){ + + } + final class GetSurveyResponseDatatableData { + private GetSurveyResponseDatatableData() { + + } + @ApiModelProperty(example = "m_client") + public String applicationTableName; + @ApiModelProperty(example = "ppi_kenya_2005") + public String registeredTableName; + public List columnHeaderData; + } + public GetSurveyResponseDatatableData datatableData; + @ApiModelProperty(example = "false") + public boolean enabled; + } + + @ApiModel(value = "PostSurveySurveyNameApptableIdRequest") + public static final class PostSurveySurveyNameApptableIdRequest { + private PostSurveySurveyNameApptableIdRequest() { + + } + @ApiModelProperty(example = "167") + public Long ppi_household_members_cd_q1_householdmembers; + @ApiModelProperty(example = "174") + public Long ppi_highestschool_cd_q2_highestschool; + @ApiModelProperty(example = "180") + public Long ppi_businessoccupation_cd_q3_businessoccupation; + @ApiModelProperty(example = "184") + public Long ppi_habitablerooms_cd_q4_habitablerooms; + @ApiModelProperty(example = "188") + public Long ppi_floortype_cd_q5_floortype; + @ApiModelProperty(example = "190") + public Long ppi_lightingsource_cd_q6_lightingsource; + @ApiModelProperty(example = "193") + public Long ppi_irons_cd_q7_irons; + @ApiModelProperty(example = "195") + public Long ppi_mosquitonets_cd_q8_mosquitonets; + @ApiModelProperty(example = "198") + public Long ppi_towels_cd_q9_towels; + @ApiModelProperty(example = "201") + public Long ppi_fryingpans_cd_q10_fryingpans; + @ApiModelProperty(example = "2014-12-02 20:30:00") + public DateTime Date; + @ApiModelProperty(example = "Y-m-d H:i:s") + public DateTime dateFormat; + @ApiModelProperty(example = "en_GB") + public String locale; + } + + + @ApiModel(value = "PostSurveySurveyNameApptableIdResponse") + public static final class PostSurveySurveyNameApptableIdResponse { + private PostSurveySurveyNameApptableIdResponse() { + + } + @ApiModelProperty(example = "2") + public Long officeId; + @ApiModelProperty(example = "87") + public Long clientId; + @ApiModelProperty(example = "87") + public Long resourceId; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/mix/api/MixReportApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/mix/api/MixReportApiResource.java index 7abd936bd..09f6520ba 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/mix/api/MixReportApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/mix/api/MixReportApiResource.java @@ -26,6 +26,7 @@ import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; +import io.swagger.annotations.Api; import org.apache.fineract.mix.data.XBRLData; import org.apache.fineract.mix.service.XBRLBuilder; import org.apache.fineract.mix.service.XBRLResultService; @@ -36,6 +37,7 @@ import org.springframework.stereotype.Component; @Path("/mixreport") @Component @Scope("singleton") +@Api(value = "Mix Report", description = "") public class MixReportApiResource { private final XBRLResultService xbrlResultService; diff --git a/fineract-provider/src/main/java/org/apache/fineract/mix/api/MixTaxonomyApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/mix/api/MixTaxonomyApiResource.java index 38dde6abe..9210f7155 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/mix/api/MixTaxonomyApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/mix/api/MixTaxonomyApiResource.java @@ -31,6 +31,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.Api; import org.apache.fineract.infrastructure.core.api.ApiRequestParameterHelper; import org.apache.fineract.infrastructure.core.serialization.ApiRequestJsonSerializationSettings; import org.apache.fineract.infrastructure.core.serialization.ToApiJsonSerializer; @@ -44,6 +45,7 @@ import org.springframework.stereotype.Component; @Path("/mixtaxonomy") @Component @Scope("singleton") +@Api(value = "Mix Taxonomy", description = "") public class MixTaxonomyApiResource { private final Set RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("taxonomyId", "name", "namespace", "dimension", diff --git a/fineract-provider/src/main/java/org/apache/fineract/mix/api/MixTaxonomyMappingApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/mix/api/MixTaxonomyMappingApiResource.java index 7d50c51f0..2b55eda01 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/mix/api/MixTaxonomyMappingApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/mix/api/MixTaxonomyMappingApiResource.java @@ -31,6 +31,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.Api; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -48,6 +49,7 @@ import org.springframework.stereotype.Component; @Path("/mixmapping") @Component @Scope("singleton") +@Api(value = "Mix Mapping") public class MixTaxonomyMappingApiResource { private final Set RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("identifier", "config")); diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/api/HolidaysApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/api/HolidaysApiResource.java index e8b22d3b7..1fc32ac9e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/api/HolidaysApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/api/HolidaysApiResource.java @@ -37,6 +37,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.commons.lang.StringUtils; import org.apache.fineract.accounting.journalentry.api.DateParam; import org.apache.fineract.commands.domain.CommandWrapper; @@ -57,6 +58,7 @@ import org.springframework.stereotype.Component; @Path("/holidays") @Component @Scope("singleton") +@Api(value = "Holidays", description = "Some MFI's span large regions where different branch offices might observe different holidays. They need the ability to define holidays for specific branch offices and be able to set the repayment rule to follow during those holidays.\n" + "\n" + "The reschedule of repayments to repaymentsRescheduledTo date during defined holidays is turned on/off by enabling/disabling reschedule-repayments-on-holidays in Global configurations.\n" + "\n" + "Allow Repayment transactions on a defined holidays is turned on/off by enabling/disabling allow-transactions-on-holiday in Global configurations.") public class HolidaysApiResource { private final DefaultToApiJsonSerializer toApiJsonSerializer; @@ -80,7 +82,10 @@ public class HolidaysApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String createNewHoliday(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Create a Holiday", notes = "Mandatory Fields: " + "name, description, fromDate, toDate, repaymentsRescheduledTo, offices") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = HolidaysApiResourceSwagger.PostHolidaysRequest.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = HolidaysApiResourceSwagger.PostHolidaysResponse.class)}) + public String createNewHoliday(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createHoliday().withJson(apiRequestBodyAsJson).build(); @@ -93,8 +98,11 @@ public class HolidaysApiResource { @Path("{holidayId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String handleCommands(@PathParam("holidayId") final Long holidayId, @QueryParam("command") final String commandParam, - final String apiRequestBodyAsJson) { + @ApiOperation(value = "Activate a Holiday", notes = "Always Holidays are created in pending state. This API allows to activate a holiday.\n" + "\n" + "Only the active holidays are considered for rescheduling the loan repayment.") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = HolidaysApiResourceSwagger.PostHolidaysHolidayIdRequest.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = HolidaysApiResourceSwagger.PostHolidaysHolidayIdResponse.class)}) + public String handleCommands(@PathParam("holidayId") @ApiParam(value = "holidayId") final Long holidayId, @QueryParam("command") @ApiParam(value = "command") final String commandParam, + @ApiParam(hidden = true) final String apiRequestBodyAsJson) { String jsonApiRequest = apiRequestBodyAsJson; if (StringUtils.isBlank(jsonApiRequest)) { @@ -118,7 +126,9 @@ public class HolidaysApiResource { @Path("{holidayId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveOne(@PathParam("holidayId") final Long holidayId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve a Holiday", notes = "Example Requests:\n" + "\n" + "holidays/1") + @ApiResponses({@ApiResponse(code = 200, message = "", response = HolidaysApiResourceSwagger.GetHolidaysResponse.class)}) + public String retrieveOne(@PathParam("holidayId") @ApiParam(value = "holidayId") final Long holidayId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(HOLIDAY_RESOURCE_NAME); @@ -133,7 +143,10 @@ public class HolidaysApiResource { @Path("{holidayId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String update(@PathParam("holidayId") final Long holidayId, final String jsonRequestBody) { + @ApiOperation(value = "Update a Holiday", notes = "If a holiday is in pending state (created and not activated) then all fields are allowed to modify. Once holidays become active only name and descriptions are allowed to modify.") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = HolidaysApiResourceSwagger.PutHolidaysHolidayIdRequest.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = HolidaysApiResourceSwagger.PutHolidaysHolidayIdResponse.class)}) + public String update(@PathParam("holidayId") @ApiParam(value = "holidayId") final Long holidayId, @ApiParam(hidden = true) final String jsonRequestBody) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateHoliday(holidayId).withJson(jsonRequestBody).build(); @@ -146,7 +159,9 @@ public class HolidaysApiResource { @Path("{holidayId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String delete(@PathParam("holidayId") final Long holidayId) { + @ApiOperation(value = "Delete a Holiday", notes = "This API allows to delete a holiday. This is a soft delete the deleted holiday status is marked as deleted.") + @ApiResponses({@ApiResponse(code = 200, message = "", response = HolidaysApiResourceSwagger.DeleteHolidaysHolidayIdResponse.class)}) + public String delete(@PathParam("holidayId") @ApiParam(value = "holidayId") final Long holidayId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteHoliday(holidayId).build(); final CommandProcessingResult result = this.commandsSourceWritePlatformService.logCommandSource(commandRequest); return this.toApiJsonSerializer.serialize(result); @@ -159,9 +174,11 @@ public class HolidaysApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveAllHolidays(@Context final UriInfo uriInfo, @QueryParam("officeId") final Long officeId, - @QueryParam("fromDate") final DateParam fromDateParam, @QueryParam("toDate") final DateParam toDateParam, - @QueryParam("locale") final String locale, @QueryParam("dateFormat") final String dateFormat) { + @ApiOperation(value = "List Holidays", notes = "Example Requests:\n" + "\n" + "holidays?officeId=1") + @ApiResponses({@ApiResponse(code = 200, message = "", response = HolidaysApiResourceSwagger.GetHolidaysResponse.class, responseContainer = "List")}) + public String retrieveAllHolidays(@Context final UriInfo uriInfo, @QueryParam("officeId") @ApiParam(value = "officeId") final Long officeId, + @QueryParam("fromDate") @ApiParam(value = "fromDate") final DateParam fromDateParam, @QueryParam("toDate") @ApiParam(value = "toDate") final DateParam toDateParam, + @QueryParam("locale") @ApiParam(value = "locale") final String locale, @QueryParam("dateFormat") @ApiParam(value = "dateFormat") final String dateFormat) { this.context.authenticatedUser().validateHasReadPermission(HOLIDAY_RESOURCE_NAME); diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/api/HolidaysApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/api/HolidaysApiResourceSwagger.java new file mode 100644 index 000000000..7aa3335dd --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/api/HolidaysApiResourceSwagger.java @@ -0,0 +1,146 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.organisation.holiday.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.apache.fineract.infrastructure.core.data.EnumOptionData; +import org.joda.time.LocalDate; + +import java.util.List; + +/** + * Created by sanyam on 14/8/17. + */ +final class HolidaysApiResourceSwagger { + private HolidaysApiResourceSwagger() { + + } + + @ApiModel(value = "GetHolidaysResponse") + public static final class GetHolidaysResponse { + private GetHolidaysResponse() { + + } + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "Good Friday") + public String name; + @ApiModelProperty(example = "[2013, 10, 26]") + public LocalDate fromDate; + @ApiModelProperty(example = "[2013, 10, 26]") + public LocalDate toDate; + @ApiModelProperty(example = "[2013, 10, 27]") + public LocalDate repaymentsRescheduledTo; + @ApiModelProperty(example = "1") + public Long officeId; + public EnumOptionData status; + } + + @ApiModel(value = "PostHolidaysRequest") + public static final class PostHolidaysRequest { + private PostHolidaysRequest(){ + + } + final class PostHolidaysRequestOffices { + private PostHolidaysRequestOffices(){ + + } + @ApiModelProperty(example = "1") + public Long officeId; + } + @ApiModelProperty(example = "Good Friday") + public String name; + @ApiModelProperty(example = "Good Friday") + public String description; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "25 October 2013") + public LocalDate fromDate; + @ApiModelProperty(example = "25 October 2013") + public LocalDate toDate; + @ApiModelProperty(example = "26 October 2013") + public LocalDate repaymentsRescheduledTo; + public List offices; + } + + @ApiModel(value = "PostHolidaysResponse") + public static final class PostHolidaysResponse { + private PostHolidaysResponse() { + + } + @ApiModelProperty(example = "1") + public Long resourceId; + } + + @ApiModel(value = "PostHolidaysHolidayIdRequest") + public static final class PostHolidaysHolidayIdRequest { + private PostHolidaysHolidayIdRequest() { + + } + } + + @ApiModel(value = "PostHolidaysHolidayIdResponse") + public static final class PostHolidaysHolidayIdResponse { + private PostHolidaysHolidayIdResponse() { + + } + @ApiModelProperty(example = "1") + public Long resourceId; + } + + @ApiModel(value = "PutHolidaysHolidayIdRequest") + public static final class PutHolidaysHolidayIdRequest { + private PutHolidaysHolidayIdRequest() { + + } + @ApiModelProperty(example = "Independence day") + public String name; + @ApiModelProperty(example = "Holiday for Independence day celebration") + public String description; + } + + @ApiModel(value = "PutHolidaysHolidayIdResponse") + public static final class PutHolidaysHolidayIdResponse { + private PutHolidaysHolidayIdResponse() { + + } + final class PutHolidaysHolidayIdResponseChanges{ + private PutHolidaysHolidayIdResponseChanges(){} + @ApiModelProperty(example = "Independence day") + public String name; + @ApiModelProperty(example = "Holiday for Independence day celebration") + public String description; + } + @ApiModelProperty(example = "1") + public Long resourceId; + public PutHolidaysHolidayIdResponseChanges changes; + } + + @ApiModel(value = "DeleteHolidaysHolidayIdResponse") + public static final class DeleteHolidaysHolidayIdResponse { + private DeleteHolidaysHolidayIdResponse() { + + } + @ApiModelProperty(example = "1") + public Long resourceId; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/monetary/api/CurrenciesApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/monetary/api/CurrenciesApiResource.java index e55cd6dce..31152e1f8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/monetary/api/CurrenciesApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/monetary/api/CurrenciesApiResource.java @@ -31,6 +31,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -48,6 +49,7 @@ import org.springframework.stereotype.Component; @Path("/currencies") @Component @Scope("singleton") +@Api(value = "Currency", description = "Application related configuration around viewing/updating the currencies permitted for use within the MFI.") public class CurrenciesApiResource { private final Set RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("selectedCurrencyOptions", "currencyOptions")); @@ -75,6 +77,8 @@ public class CurrenciesApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Retrieve Currency Configuration", notes = "Returns the list of currencies permitted for use AND the list of currencies not selected (but available for selection).\n" + "\n" + "Example Requests:\n" + "\n" + "currencies\n" + "\n" + "\n" + "currencies?fields=selectedCurrencyOptions") + @ApiResponses({@ApiResponse(code = 200, message = "", response = CurrenciesApiResourceSwagger.GetCurrenciesResponse.class)}) public String retrieveCurrencies(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -88,7 +92,10 @@ public class CurrenciesApiResource { @PUT @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String updateCurrencies(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update Currency Configuration", notes = "Updates the list of currencies permitted for use.") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = CurrenciesApiResourceSwagger.PutCurrenciesRequest.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = CurrenciesApiResourceSwagger.PutCurrenciesResponse.class)}) + public String updateCurrencies(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // .updateCurrencies() // diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/monetary/api/CurrenciesApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/monetary/api/CurrenciesApiResourceSwagger.java new file mode 100644 index 000000000..9f56bd7c2 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/monetary/api/CurrenciesApiResourceSwagger.java @@ -0,0 +1,76 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.organisation.monetary.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.apache.fineract.organisation.monetary.data.CurrencyData; + +import java.util.Collection; + +/** + * Created by sanyam on 14/8/17. + */ +final class CurrenciesApiResourceSwagger { + private CurrenciesApiResourceSwagger() { + + } + + @ApiModel(value = "GetCurrenciesResponse") + public static final class GetCurrenciesResponse { + private GetCurrenciesResponse(){ + + } + public Collection selectedCurrencyOptions; + public Collection currencyOptions; + } + + @ApiModel(value = "PutCurrenciesRequest") + public static final class PutCurrenciesRequest { + private PutCurrenciesRequest() { + + } + @ApiModelProperty(example = "[\"KES\",\n" + + " \"BND\",\n" + + " \"LBP\",\n" + + " \"GHC\",\n" + + " \"USD\",\n" + + " \"XOF\",\n" + + " \"AED\",\n" + + " \"AMD\"]") + public String currencies; + + } + + @ApiModel(value = "PutCurrenciesResponse") + public static final class PutCurrenciesResponse { + private PutCurrenciesResponse() { + + } + @ApiModelProperty(example = "[\"KES\",\n" + + " \"BND\",\n" + + " \"LBP\",\n" + + " \"GHC\",\n" + + " \"USD\",\n" + + " \"XOF\",\n" + + " \"AED\",\n" + + " \"AMD\"]") + public String currencies; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/api/OfficeTransactionsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/api/OfficeTransactionsApiResource.java index 564edfc93..f4aba724b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/api/OfficeTransactionsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/api/OfficeTransactionsApiResource.java @@ -34,6 +34,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.Api; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -51,6 +52,7 @@ import org.springframework.stereotype.Component; @Path("/officetransactions") @Component @Scope("singleton") +@Api(value = "officetransactions", description = "") public class OfficeTransactionsApiResource { private static final Set RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "transactionDate", "fromOfficeId", diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/api/OfficesApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/api/OfficesApiResource.java index 9f0b109c6..196fa3235 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/api/OfficesApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/api/OfficesApiResource.java @@ -36,6 +36,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -54,6 +55,7 @@ import org.springframework.stereotype.Component; @Path("/offices") @Component @Scope("singleton") +@Api(value = "Offices", description = "Offices are used to model an MFIs structure. A hierarchical representation of offices is supported. There will always be at least one office (which represents the MFI or an MFIs head office). All subsequent offices added must have a parent office.") public class OfficesApiResource { /** @@ -85,9 +87,11 @@ public class OfficesApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "List Offices", notes = "Example Requests:\n" + "\n" + "offices\n" + "\n" + "\n" + "offices?fields=id,name,openingDate") + @ApiResponses({@ApiResponse(code = 200, message = "", response = OfficesApiResourceSwagger.GetOfficesResponse.class, responseContainer = "List")}) public String retrieveOffices(@Context final UriInfo uriInfo, - @DefaultValue("false") @QueryParam("includeAllOffices") final boolean onlyManualEntries, - @QueryParam("orderBy") final String orderBy, @QueryParam("sortOrder") final String sortOrder) { + @DefaultValue("false") @QueryParam("includeAllOffices") @ApiParam(value = "includeAllOffices") final boolean onlyManualEntries, + @QueryParam("orderBy") @ApiParam(value = "orderBy") final String orderBy, @QueryParam("sortOrder") @ApiParam(value = "sortOrder") final String sortOrder) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -103,6 +107,8 @@ public class OfficesApiResource { @Path("template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Retrieve Office Details Template", notes = "This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n" + "\n" + "Field Defaults\n" + "Allowed Value Lists\n" + "Example Request:\n" + "\n" + "offices/template") + @ApiResponses({@ApiResponse(code = 200, message = "", response = OfficesApiResourceSwagger.GetOfficesTemplateResponse.class)}) public String retrieveOfficeTemplate(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -119,7 +125,10 @@ public class OfficesApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String createOffice(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Create an Office", notes = "Mandatory Fields\n" + "name, openingDate, parentId") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = OfficesApiResourceSwagger.PostOfficesRequest.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = OfficesApiResourceSwagger.PostOfficesResponse.class)}) + public String createOffice(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // .createOffice() // @@ -135,7 +144,9 @@ public class OfficesApiResource { @Path("{officeId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retreiveOffice(@PathParam("officeId") final Long officeId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve an Office", notes = "Example Requests:\n" + "\n" + "offices/1\n" + "\n" + "\n" + "offices/1?template=true\n" + "\n" + "\n" + "offices/1?fields=id,name,parentName") + @ApiResponses({@ApiResponse(code = 200, message = "", response = OfficesApiResourceSwagger.GetOfficesResponse.class)}) + public String retreiveOffice(@PathParam("officeId") @ApiParam(value = "officeId") final Long officeId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -154,7 +165,10 @@ public class OfficesApiResource { @Path("{officeId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String updateOffice(@PathParam("officeId") final Long officeId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update Office", notes = "") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = OfficesApiResourceSwagger.PutOfficesOfficeIdRequest.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = OfficesApiResourceSwagger.PutOfficesOfficeIdResponse.class)}) + public String updateOffice(@PathParam("officeId") @ApiParam(value = "officeId") final Long officeId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // .updateOffice(officeId) // diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/api/OfficesApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/api/OfficesApiResourceSwagger.java new file mode 100644 index 000000000..2c5689ea7 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/api/OfficesApiResourceSwagger.java @@ -0,0 +1,128 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.organisation.office.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.apache.fineract.organisation.office.data.OfficeData; +import org.joda.time.LocalDate; + +import java.util.Collection; + +/** + * Created by sanyam on 14/8/17. + */ +final class OfficesApiResourceSwagger { + private OfficesApiResourceSwagger() { + + } + + @ApiModel(value = "GetOfficesResponse") + public static final class GetOfficesResponse { + private GetOfficesResponse() { + + } + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "Head Office") + public String name; + @ApiModelProperty(example = "Head Office") + public String nameDecorated; + @ApiModelProperty(example = "1") + public String externalId; + @ApiModelProperty(example = "[2009, 1, 1]") + public LocalDate openingDate; + @ApiModelProperty(example = ".") + public String hierarchy; +// @ApiModelProperty(example = "") +// public Long parentId; +// @ApiModelProperty(example = "") +// public String parentName; + } + + @ApiModel(value = "GetOfficesTemplateResponse") + public static final class GetOfficesTemplateResponse { + private GetOfficesTemplateResponse() { + + } + @ApiModelProperty(example = "[2009, 1, 1]") + public LocalDate openingDate; + public Collection allowedParents; + } + + @ApiModel(value = "PostOfficesRequest") + public static final class PostOfficesRequest { + private PostOfficesRequest() { + + } + @ApiModelProperty(example = "Good Friday") + public String name; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "01 July 2007") + public LocalDate openingDate; + @ApiModelProperty(example = "2") + public Long parentId; + @ApiModelProperty(example = "SYS54-88") + public String externalId; + + } + + @ApiModel(value = "PostOfficesResponse") + public static final class PostOfficesResponse { + private PostOfficesResponse() { + + } + @ApiModelProperty(example = "3") + public Long officeId; + @ApiModelProperty(example = "3") + public Long resourceId; + } + + @ApiModel(value = "PutOfficesOfficeIdRequest") + public static final class PutOfficesOfficeIdRequest { + private PutOfficesOfficeIdRequest() { + + } + @ApiModelProperty(example = "Name is updated") + public String name; + } + + @ApiModel(value = "PutOfficesOfficeIdResponse") + public static final class PutOfficesOfficeIdResponse { + private PutOfficesOfficeIdResponse() { + + } + final class PutOfficesOfficeIdResponseChanges { + private PutOfficesOfficeIdResponseChanges(){ + + } + @ApiModelProperty(example = "Name is updated") + public String name; + } + @ApiModelProperty(example = "3") + public Long officeId; + @ApiModelProperty(example = "3") + public Long resourceId; + public PutOfficesOfficeIdResponseChanges changes; + } + +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/api/ProvisioningCategoryApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/api/ProvisioningCategoryApiResource.java index 6a0fdeae4..ceec605a6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/api/ProvisioningCategoryApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/api/ProvisioningCategoryApiResource.java @@ -32,6 +32,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.Api; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -49,6 +50,7 @@ import org.springframework.stereotype.Component; @Path("/provisioningcategory") @Component @Scope("singleton") +@Api(value = "Provisioning Category", description = "") public class ProvisioningCategoryApiResource { private final PlatformSecurityContext platformSecurityContext; diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/api/ProvisioningCriteriaApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/api/ProvisioningCriteriaApiResource.java index 46efdb023..f5c5aae5b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/api/ProvisioningCriteriaApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/api/ProvisioningCriteriaApiResource.java @@ -35,6 +35,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -53,6 +54,7 @@ import org.springframework.stereotype.Component; @Path("/provisioningcriteria") @Component @Scope("singleton") +@Api(value = "Provisioning Criteria", description = "This defines the Provisioning Criteria") public class ProvisioningCriteriaApiResource { private final PlatformSecurityContext platformSecurityContext; @@ -101,7 +103,9 @@ public class ProvisioningCriteriaApiResource { @Path("{criteriaId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveProvisioningCriteria(@PathParam("criteriaId") final Long criteriaId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieves a Provisioning Criteria", notes = "Retrieves a Provisioning Criteria") + @ApiResponses({@ApiResponse(code = 200, message = "", response = ProvisioningCriteriaApiResourceSwagger.GetProvisioningCriteriaCriteriaIdResponse.class)}) + public String retrieveProvisioningCriteria(@PathParam("criteriaId") @ApiParam(value = "criteriaId") final Long criteriaId, @Context final UriInfo uriInfo) { platformSecurityContext.authenticatedUser() ; ProvisioningCriteriaData criteria = this.provisioningCriteriaReadPlatformService.retrieveProvisioningCriteria(criteriaId) ; final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters()); @@ -114,6 +118,8 @@ public class ProvisioningCriteriaApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Retrieves all created Provisioning Criterias", notes = "Retrieves all created Provisioning Criterias") + @ApiResponses({@ApiResponse(code = 200, message = "", responseContainer = "List",response = ProvisioningCriteriaApiResourceSwagger.GetProvisioningCriteriaResponse.class)}) public String retrieveAllProvisioningCriterias(@Context final UriInfo uriInfo) { platformSecurityContext.authenticatedUser() ; Collection data = this.provisioningCriteriaReadPlatformService.retrieveAllProvisioningCriterias() ; @@ -124,7 +130,10 @@ public class ProvisioningCriteriaApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String createProvisioningCriteria(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Create a new Provisioning Criteria", notes = "Creates a new Provisioning Criteria\n" + "\n" + "Mandatory Fields: \n" + "criteriaName\n" + "provisioningcriteria\n" + "\n" + "Optional Fields: \n" + "loanProducts") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = ProvisioningCriteriaApiResourceSwagger.PostProvisioningCriteriaRequest.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = ProvisioningCriteriaApiResourceSwagger.PostProvisioningCriteriaResponse.class)}) + public String createProvisioningCriteria(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { CommandWrapper commandWrapper = null; this.platformSecurityContext.authenticatedUser(); commandWrapper = new CommandWrapperBuilder().createProvisioningCriteria().withJson(apiRequestBodyAsJson).build(); @@ -136,7 +145,10 @@ public class ProvisioningCriteriaApiResource { @Path("{criteriaId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String updateProvisioningCriteria(@PathParam("criteriaId") final Long criteriaId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Updates a new Provisioning Criteria", notes = "Updates a new Provisioning Criteria\n" + "\n" + "Optional Fields\n" + "criteriaName, loanProducts, provisioningcriteria") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = ProvisioningCriteriaApiResourceSwagger.PutProvisioningCriteriaRequest.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = ProvisioningCriteriaApiResourceSwagger.PutProvisioningCriteriaResponse.class)}) + public String updateProvisioningCriteria(@PathParam("criteriaId") @ApiParam(value = "criteriaId") final Long criteriaId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { this.platformSecurityContext.authenticatedUser(); final CommandWrapper commandRequest = new CommandWrapperBuilder().updateProvisioningCriteria(criteriaId) .withJson(apiRequestBodyAsJson).build(); @@ -148,7 +160,9 @@ public class ProvisioningCriteriaApiResource { @Path("{criteriaId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String deleteProvisioningCriteria(@PathParam("criteriaId") final Long criteriaId) { + @ApiOperation(value = "Deletes Provisioning Criteria", notes = "Deletes Provisioning Criteria") + @ApiResponses({@ApiResponse(code = 200, message = "", response = ProvisioningCriteriaApiResourceSwagger.DeleteProvisioningCriteriaResponse.class)}) + public String deleteProvisioningCriteria(@PathParam("criteriaId") @ApiParam(value = "criteriaId") final Long criteriaId) { this.platformSecurityContext.authenticatedUser(); final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteProvisioningCriteria(criteriaId).build(); final CommandProcessingResult result = this.commandsSourceWritePlatformService.logCommandSource(commandRequest); diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/api/ProvisioningCriteriaApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/api/ProvisioningCriteriaApiResourceSwagger.java new file mode 100644 index 000000000..a8f7bab13 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/api/ProvisioningCriteriaApiResourceSwagger.java @@ -0,0 +1,118 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.organisation.provisioning.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.apache.fineract.organisation.provisioning.data.ProvisioningCriteriaDefinitionData; +import org.apache.fineract.portfolio.loanproduct.data.LoanProductData; + +import java.util.Collection; + +/** + * Created by sanyam on 18/8/17. + */ +final class ProvisioningCriteriaApiResourceSwagger { + private ProvisioningCriteriaApiResourceSwagger() { + + } + + @ApiModel(value = "PostProvisioningCriteriaRequest") + public static final class PostProvisioningCriteriaRequest { + private PostProvisioningCriteriaRequest() { + + } + @ApiModelProperty(example = "High Risk Products Criteria") + public String criteriaName; + public Collection loanProducts; + public Collection provisioningcriteria; + } + + @ApiModel(value = "PostProvisioningCriteriaResponse") + public static final class PostProvisioningCriteriaResponse { + private PostProvisioningCriteriaResponse() { + + } + @ApiModelProperty(example = "1") + public Long resourceId; + } + + @ApiModel(value = "GetProvisioningCriteriaResponse") + public static final class GetProvisioningCriteriaResponse { + private GetProvisioningCriteriaResponse() { + + } + @ApiModelProperty(example = "1") + public Long criteriaId; + @ApiModelProperty(example = "High Risk Products Criteria") + public String criteriaName; + @ApiModelProperty(example = "mifos") + public String createdBy; + } + + @ApiModel(value = "GetProvisioningCriteriaCriteriaIdResponse") + public static final class GetProvisioningCriteriaCriteriaIdResponse { + private GetProvisioningCriteriaCriteriaIdResponse() { + + } + @ApiModelProperty(example = "1") + public Long criteriaId; + @ApiModelProperty(example = "High Risk Products Criteria") + public String criteriaName; + @ApiModelProperty(example = "mifos") + public String createdBy; + public Collection loanProducts; + public Collection provisioningcriteria; + } + + @ApiModel(value = "PutProvisioningCriteriaRequest") + public static final class PutProvisioningCriteriaRequest { + private PutProvisioningCriteriaRequest() { + + } + @ApiModelProperty(example = "High Risk Products Criteria") + public String criteriaName; + public Collection loanProducts; + public Collection provisioningcriteria; + } + + @ApiModel(value = "PutProvisioningCriteriaResponse") + public static final class PutProvisioningCriteriaResponse { + private PutProvisioningCriteriaResponse() { + + } + final class PutProvisioningCriteriaResponseChanges{ + private PutProvisioningCriteriaResponseChanges(){} + @ApiModelProperty(example = "High Risk Products Criteria") + public String criteriaName; + } + @ApiModelProperty(example = "1") + public Long resourceId; + public PutProvisioningCriteriaResponseChanges changes; + } + + @ApiModel(value = "DeleteProvisioningCriteriaResponse") + public static final class DeleteProvisioningCriteriaResponse { + private DeleteProvisioningCriteriaResponse() { + + } + @ApiModelProperty(example = "1") + public Long resourceId; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/api/StaffApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/api/StaffApiResource.java index c857874cb..394316b5a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/api/StaffApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/api/StaffApiResource.java @@ -36,6 +36,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -55,6 +56,7 @@ import org.springframework.stereotype.Component; @Path("/staff") @Component @Scope("singleton") +@Api(value = "Staff", description = "Allows you to model staff members. At present the key role of significance is whether this staff member is a loan officer or not.") public class StaffApiResource { /** @@ -89,11 +91,13 @@ public class StaffApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveStaff(@Context final UriInfo uriInfo, @QueryParam("sqlSearch") final String sqlSearch, - @QueryParam("officeId") final Long officeId, - @DefaultValue("false") @QueryParam("staffInOfficeHierarchy") final boolean staffInOfficeHierarchy, - @DefaultValue("false") @QueryParam("loanOfficersOnly") final boolean loanOfficersOnly, - @DefaultValue("active") @QueryParam("status") final String status) { + @ApiOperation(value = "Retrieve Staff", notes = "Returns the list of staff members.\n" + "\n" + "Example Requests:\n" + "\n" + "staff\n\n\n\n" + "\n" + "Retrieve a Staff by status\n" + "\n" + "Returns the details of a Staff based on status.\n" + "\n" + "By default it Returns all the ACTIVE Staff.\n" + "\n" + "If status=INACTIVE, then it returns all INACTIVE Staff.\n" + "\n" + "and for status=ALL, it Returns both ACTIVE and INACTIVE Staff.\n" + "\n" + "Example Requests:\n" + "\n" + "staff?status=active") + @ApiResponses({@ApiResponse(code = 200, message = "", response = StaffApiResourceSwagger.GetStaffResponse.class, responseContainer = "List"), @ApiResponse(code = 200, message = "GET https://DomainName/api/v1/staff?status={ACTIVE|INACTIVE|ALL}", response = StaffApiResourceSwagger.GetStaffResponse.class)}) + public String retrieveStaff(@Context final UriInfo uriInfo, @QueryParam("sqlSearch") @ApiParam(value = "sqlSearch") final String sqlSearch, + @QueryParam("officeId") @ApiParam(value = "officeId") final Long officeId, + @DefaultValue("false") @QueryParam("staffInOfficeHierarchy") @ApiParam(value = "staffInOfficeHierarchy") final boolean staffInOfficeHierarchy, + @DefaultValue("false") @QueryParam("loanOfficersOnly") @ApiParam(value = "loanOfficersOnly") final boolean loanOfficersOnly, + @DefaultValue("active") @QueryParam("status") @ApiParam(value = "status") final String status) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -111,7 +115,10 @@ public class StaffApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String createStaff(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Create a staff member", notes = "Creates a staff member.\n" + "\n" + "Mandatory Fields: \n" + "officeId, firstname, lastname\n" + "\n" + "Optional Fields: \n" + "isLoanOfficer, isActive") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = StaffApiResourceSwagger.PostStaffRequest.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = StaffApiResourceSwagger.PostStaffResponse.class)}) + public String createStaff(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createStaff().withJson(apiRequestBodyAsJson).build(); @@ -124,7 +131,9 @@ public class StaffApiResource { @Path("{staffId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retreiveStaff(@PathParam("staffId") final Long staffId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve a Staff Member", notes = "Returns the details of a Staff Member.\n" + "\n" + "Example Requests:\n" + "\n" + "staff/1") + @ApiResponses({@ApiResponse(code = 200, message = "", response = StaffApiResourceSwagger.GetStaffResponse.class)}) + public String retreiveStaff(@PathParam("staffId") @ApiParam(value = "staffId") final Long staffId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -142,7 +151,10 @@ public class StaffApiResource { @Path("{staffId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String updateStaff(@PathParam("staffId") final Long staffId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update a Staff Member", notes = "Updates the details of a staff member.") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = StaffApiResourceSwagger.PutStaffRequest.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = StaffApiResourceSwagger.PutStaffResponse.class)}) + public String updateStaff(@PathParam("staffId") @ApiParam(value = "staffId") final Long staffId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateStaff(staffId).withJson(apiRequestBodyAsJson).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/api/StaffApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/api/StaffApiResourceSwagger.java new file mode 100644 index 000000000..9c81819a5 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/api/StaffApiResourceSwagger.java @@ -0,0 +1,131 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.organisation.staff.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.joda.time.LocalDate; + +/** + * Created by sanyam on 19/8/17. + */ + +final class StaffApiResourceSwagger { + private StaffApiResourceSwagger() { + + } + + @ApiModel(value = "PostStaffRequest") + public static final class PostStaffRequest { + private PostStaffRequest() { + + } + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "John") + public String firstname; + @ApiModelProperty(example = "Doe") + public String lastname; + @ApiModelProperty(example = "true") + public Boolean isLoanOfficer; + @ApiModelProperty(example = "17H") + public String externalId; + @ApiModelProperty(example = "+353851239876") + public String mobileNo; + @ApiModelProperty(example = "true") + public Boolean isActive; + @ApiModelProperty(example = "01 January 2009") + public LocalDate joiningDate; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + + } + + @ApiModel(value = "PostStaffResponse") + public static final class PostStaffResponse { + private PostStaffResponse() { + + } + @ApiModelProperty(example = "1") + public Long officeId; + @ApiModelProperty(example = "1") + public Long resourceId; + } + + @ApiModel(value = "GetStaffResponse") + public static final class GetStaffResponse { + private GetStaffResponse() { + + } + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "John") + public String firstname; + @ApiModelProperty(example = "Doe") + public String lastname; + @ApiModelProperty(example = "Doe, John") + public String displayName; + @ApiModelProperty(example = "1") + public Long officeId; + @ApiModelProperty(example = "Head Office") + public String officeName; + @ApiModelProperty(example = "true") + public Boolean isLoanOfficer; + @ApiModelProperty(example = "17H") + public String externalId; + @ApiModelProperty(example = "+353851239876") + public Boolean isActive; + @ApiModelProperty(example = "[2009,8,1]") + public LocalDate joiningDate; + + } + + @ApiModel(value = "PutStaffRequest") + public static final class PutStaffRequest { + private PutStaffRequest() { + + } + @ApiModelProperty(example = "false") + public Boolean isLoanOfficer; + @ApiModelProperty(example = "17Hbb") + public String externalId; + + } + + @ApiModel(value = "PutStaffResponse") + public static final class PutStaffResponse { + private PutStaffResponse() { + + } + final class PutStaffResponseChanges { + private PutStaffResponseChanges(){} + @ApiModelProperty(example = "false") + public Boolean isLoanOfficer; + @ApiModelProperty(example = "17Hbb") + public String externalId; + } + @ApiModelProperty(example = "1") + public Long officeId; + @ApiModelProperty(example = "1") + public Long resourceId; + + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/api/CashierApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/api/CashierApiResource.java index 788adfcd0..08437227c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/api/CashierApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/api/CashierApiResource.java @@ -28,6 +28,10 @@ import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiResponse; +import io.swagger.annotations.ApiResponses; import org.apache.fineract.infrastructure.core.serialization.DefaultToApiJsonSerializer; import org.apache.fineract.organisation.teller.data.CashierData; import org.apache.fineract.organisation.teller.service.TellerManagementReadPlatformService; @@ -40,6 +44,7 @@ import org.springframework.stereotype.Component; @Path("cashiers") @Component @Scope("singleton") +@Api(value = "cashiers", description = "") public class CashierApiResource { private final DefaultToApiJsonSerializer jsonSerializer; diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/api/TellerApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/api/TellerApiResource.java index a69dc1ff9..2298700a2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/api/TellerApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/api/TellerApiResource.java @@ -32,6 +32,7 @@ import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; +import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -57,6 +58,7 @@ import org.springframework.stereotype.Component; @Path("tellers") @Component @Scope("singleton") +@Api(value = "Teller Cash Management", description = "Teller cash management which will allow an organization to manage their cash transactions at branches or head office more effectively.") public class TellerApiResource { private final PlatformSecurityContext securityContext; @@ -78,17 +80,21 @@ public class TellerApiResource { @GET @Consumes({ MediaType.TEXT_HTML, MediaType.APPLICATION_JSON }) @Produces(MediaType.APPLICATION_JSON) - public String getTellerData(@QueryParam("officeId") final Long officeId) { + @ApiOperation(value = "List all tellers", notes = "Retrieves list tellers") + @ApiResponses({@ApiResponse(code = 200, message = "", response = TellerApiResourceSwagger.GetTellersResponse.class, responseContainer = "List")}) + public String getTellerData(@QueryParam("officeId") @ApiParam(value = "officeId") final Long officeId) { final Collection foundTellers = this.readPlatformService.getTellers(officeId); return this.jsonSerializer.serialize(foundTellers); } - @Path("{tellerId}") @GET + @Path("{tellerId}") @Consumes({ MediaType.TEXT_HTML, MediaType.APPLICATION_JSON }) @Produces(MediaType.APPLICATION_JSON) - public String findTeller(@PathParam("tellerId") final Long tellerId) { + @ApiOperation(value = "Retrieve tellers", notes = "") + @ApiResponses({@ApiResponse(code = 200, message = "", response = TellerApiResourceSwagger.GetTellersResponse.class)}) + public String findTeller(@PathParam("tellerId") @ApiParam(value = "tellerId") final Long tellerId) { final TellerData teller = this.readPlatformService.findTeller(tellerId); return this.jsonSerializer.serialize(teller); @@ -97,7 +103,10 @@ public class TellerApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces(MediaType.APPLICATION_JSON) - public String createTeller(final String tellerData) { + @ApiOperation(value = "Create teller", notes = "Mandatory Fields\n" + "Teller name, OfficeId, Description, Start Date, Status\n" + "Optional Fields\n" + "End Date") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = TellerApiResourceSwagger.PostTellersRequest.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = TellerApiResourceSwagger.PostTellersResponse.class)}) + public String createTeller(@ApiParam(hidden = true) final String tellerData) { final CommandWrapper request = new CommandWrapperBuilder().createTeller().withJson(tellerData).build(); final CommandProcessingResult result = this.commandWritePlatformService.logCommandSource(request); @@ -105,11 +114,14 @@ public class TellerApiResource { return this.jsonSerializer.serialize(result); } - @Path("{tellerId}") @PUT + @Path("{tellerId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces(MediaType.APPLICATION_JSON) - public String updateTeller(@PathParam("tellerId") final Long tellerId, final String tellerData) { + @ApiOperation(value = "Update teller", notes = "") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = TellerApiResourceSwagger.PutTellersRequest.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = TellerApiResourceSwagger.PutTellersResponse.class)}) + public String updateTeller(@PathParam("tellerId") @ApiParam(value = "tellerId") final Long tellerId, @ApiParam(hidden = true) final String tellerData) { final CommandWrapper request = new CommandWrapperBuilder().updateTeller(tellerId).withJson(tellerData).build(); final CommandProcessingResult result = this.commandWritePlatformService.logCommandSource(request); @@ -117,11 +129,11 @@ public class TellerApiResource { return this.jsonSerializer.serialize(result); } - @Path("{tellerId}") @DELETE + @Path("{tellerId}") @Consumes({ MediaType.TEXT_HTML, MediaType.APPLICATION_JSON }) @Produces(MediaType.APPLICATION_JSON) - public String deleteTeller(@PathParam("tellerId") final Long tellerId) { + public String deleteTeller(@PathParam("tellerId") @ApiParam(value = "tellerId") final Long tellerId) { final CommandWrapper request = new CommandWrapperBuilder().deleteTeller(tellerId).build(); final CommandProcessingResult result = this.commandWritePlatformService.logCommandSource(request); @@ -133,8 +145,10 @@ public class TellerApiResource { @Path("{tellerId}/cashiers") @Consumes({ MediaType.TEXT_HTML, MediaType.APPLICATION_JSON }) @Produces(MediaType.APPLICATION_JSON) - public String getCashierData(@PathParam("tellerId") final Long tellerId, @QueryParam("fromdate") final String fromDateStr, - @QueryParam("todate") final String toDateStr) { + @ApiOperation(value = "List Cashiers", notes = "") + @ApiResponses({@ApiResponse(code = 200, message = "", response = TellerApiResourceSwagger.GetTellersTellerIdCashiersResponse.class)}) + public String getCashierData(@PathParam("tellerId") @ApiParam(value = "tellerId") final Long tellerId, @QueryParam("fromdate") @ApiParam(value = "fromdate") final String fromDateStr, + @QueryParam("todate") @ApiParam(value = "todate") final String toDateStr) { final DateTimeFormatter dateFormatter = ISODateTimeFormat.basicDate(); final Date fromDate = (fromDateStr != null ? dateFormatter.parseDateTime(fromDateStr).toDate() : new Date()); @@ -157,7 +171,9 @@ public class TellerApiResource { @Path("{tellerId}/cashiers/{cashierId}") @Consumes({ MediaType.TEXT_HTML, MediaType.APPLICATION_JSON }) @Produces(MediaType.APPLICATION_JSON) - public String findCashierData(@PathParam("tellerId") final Long tellerId, @PathParam("cashierId") final Long cashierId) { + @ApiOperation(value = "Retrieve a cashier", notes = "") + @ApiResponses({@ApiResponse(code = 200, message = "", response = TellerApiResourceSwagger.GetTellersTellerIdCashiersCashierIdResponse.class)}) + public String findCashierData(@PathParam("tellerId") @ApiParam(value = "tellerId") final Long tellerId, @PathParam("cashierId") @ApiParam(value = "cashierId") final Long cashierId) { final CashierData cashier = this.readPlatformService.findCashier(cashierId); return this.jsonSerializer.serialize(cashier); @@ -167,7 +183,9 @@ public class TellerApiResource { @Path("{tellerId}/cashiers/template") @Consumes({ MediaType.TEXT_HTML, MediaType.APPLICATION_JSON }) @Produces(MediaType.APPLICATION_JSON) - public String getCashierTemplate(@PathParam("tellerId") final Long tellerId) { + @ApiOperation(value = "Find Cashiers", notes = "") + @ApiResponses({@ApiResponse(code = 200, message = "", response = TellerApiResourceSwagger.GetTellersTellerIdCashiersTemplateResponse.class)}) + public String getCashierTemplate(@PathParam("tellerId") @ApiParam(value = "tellerId") final Long tellerId) { final TellerData teller = this.readPlatformService.findTeller(tellerId); Long officeId = teller.getOfficeId(); @@ -181,7 +199,10 @@ public class TellerApiResource { @Path("{tellerId}/cashiers") @Consumes({ MediaType.APPLICATION_JSON }) @Produces(MediaType.APPLICATION_JSON) - public String createCashier(@PathParam("tellerId") final Long tellerId, final String cashierData) { + @ApiOperation(value = "Create Cashiers", notes = "Mandatory Fields: \n" + "Cashier/staff, Fromm Date, To Date, Full Day or From time and To time\n" + "\n\n\n" + "Optional Fields: \n" + "Description/Notes") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = TellerApiResourceSwagger.PostTellersTellerIdCashiersRequest.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = TellerApiResourceSwagger.PostTellersTellerIdCashiersResponse.class)}) + public String createCashier(@PathParam("tellerId") @ApiParam(value = "tellerId") final Long tellerId, @ApiParam(hidden = true) final String cashierData) { final CommandWrapper request = new CommandWrapperBuilder().allocateTeller(tellerId).withJson(cashierData).build(); final CommandProcessingResult result = this.commandWritePlatformService.logCommandSource(request); @@ -193,8 +214,11 @@ public class TellerApiResource { @Path("{tellerId}/cashiers/{cashierId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces(MediaType.APPLICATION_JSON) - public String updateCashier(@PathParam("tellerId") final Long tellerId, @PathParam("cashierId") final Long cashierId, - final String cashierDate) { + @ApiOperation(value = "Update Cashier", notes = "") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = TellerApiResourceSwagger.PutTellersTellerIdCashiersCashierIdRequest.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = TellerApiResourceSwagger.PutTellersTellerIdCashiersCashierIdResponse.class)}) + public String updateCashier(@PathParam("tellerId") @ApiParam(value = "tellerId") final Long tellerId, @PathParam("cashierId") @ApiParam(value = "cashierId") final Long cashierId, + @ApiParam(hidden = true) final String cashierDate) { final CommandWrapper request = new CommandWrapperBuilder().updateAllocationTeller(tellerId, cashierId).withJson(cashierDate) .build(); @@ -207,7 +231,9 @@ public class TellerApiResource { @Path("{tellerId}/cashiers/{cashierId}") @Consumes({ MediaType.TEXT_HTML, MediaType.APPLICATION_JSON }) @Produces(MediaType.APPLICATION_JSON) - public String deleteCashier(@PathParam("tellerId") final Long tellerId, @PathParam("cashierId") final Long cashierId) { + @ApiOperation(value = "Delete Cashier", notes = "") + @ApiResponses({@ApiResponse(code = 200, message = "", response = TellerApiResourceSwagger.DeleteTellersTellerIdCashiersCashierIdResponse.class)}) + public String deleteCashier(@PathParam("tellerId") @ApiParam(value = "tellerId") final Long tellerId, @PathParam("cashierId") @ApiParam(value = "cashierId") final Long cashierId) { final CommandWrapper request = new CommandWrapperBuilder().deleteAllocationTeller(tellerId, cashierId).build(); final CommandProcessingResult result = this.commandWritePlatformService.logCommandSource(request); @@ -219,8 +245,11 @@ public class TellerApiResource { @Path("{tellerId}/cashiers/{cashierId}/allocate") @Consumes({ MediaType.TEXT_HTML, MediaType.APPLICATION_JSON }) @Produces(MediaType.APPLICATION_JSON) - public String allocateCashToCashier(@PathParam("tellerId") final Long tellerId, @PathParam("cashierId") final Long cashierId, - final String cashierTxnData) { + @ApiOperation(value = "Allocate Cash To Cashier", notes = "Mandatory Fields: \n" + "Date, Amount, Currency, Notes/Comments") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = TellerApiResourceSwagger.PostTellersTellerIdCashiersCashierIdAllocateRequest.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = TellerApiResourceSwagger.PostTellersTellerIdCashiersCashierIdAllocateResponse.class)}) + public String allocateCashToCashier(@PathParam("tellerId") @ApiParam(value = "tellerId") final Long tellerId, @PathParam("cashierId") @ApiParam(value = "cashierId") final Long cashierId, + @ApiParam(hidden = true) final String cashierTxnData) { final CommandWrapper request = new CommandWrapperBuilder().allocateCashToCashier(tellerId, cashierId).withJson(cashierTxnData) .build(); @@ -234,8 +263,11 @@ public class TellerApiResource { @Path("{tellerId}/cashiers/{cashierId}/settle") @Consumes({ MediaType.TEXT_HTML, MediaType.APPLICATION_JSON }) @Produces(MediaType.APPLICATION_JSON) - public String settleCashFromCashier(@PathParam("tellerId") final Long tellerId, @PathParam("cashierId") final Long cashierId, - final String cashierTxnData) { + @ApiOperation(value = "Settle Cash From Cashier", notes = "Mandatory Fields\n" + "Date, Amount, Currency, Notes/Comments") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = TellerApiResourceSwagger.PostTellersTellerIdCashiersCashierIdSettleRequest.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = TellerApiResourceSwagger.PostTellersTellerIdCashiersCashierIdSettleResponse.class)}) + public String settleCashFromCashier(@PathParam("tellerId") @ApiParam(value = "tellerId") final Long tellerId, @PathParam("cashierId") @ApiParam(value = "cashierId") final Long cashierId, + @ApiParam(hidden = true) final String cashierTxnData) { final CommandWrapper request = new CommandWrapperBuilder().settleCashFromCashier(tellerId, cashierId).withJson(cashierTxnData) .build(); @@ -249,9 +281,11 @@ public class TellerApiResource { @Path("{tellerId}/cashiers/{cashierId}/transactions") @Consumes({ MediaType.APPLICATION_JSON }) @Produces(MediaType.APPLICATION_JSON) - public String getTransactionsForCashier(@PathParam("tellerId") final Long tellerId, @PathParam("cashierId") final Long cashierId, - @QueryParam("currencyCode") final String currencyCode, @QueryParam("offset") final Integer offset, @QueryParam("limit") final Integer limit, - @QueryParam("orderBy") final String orderBy, @QueryParam("sortOrder") final String sortOrder) { + @ApiOperation(value = "Retrieve Cashier Transaction", notes = "") + @ApiResponses({@ApiResponse(code = 200, message = "", response = TellerApiResourceSwagger.GetTellersTellerIdCashiersCashiersIdTransactionsResponse.class, responseContainer = "List")}) + public String getTransactionsForCashier(@PathParam("tellerId") @ApiParam(value = "tellerId") final Long tellerId, @PathParam("cashierId") @ApiParam(value = "cashierId") final Long cashierId, + @QueryParam("currencyCode") @ApiParam(value = "currencyCode") final String currencyCode, @QueryParam("offset") @ApiParam(value = "offset") final Integer offset, @QueryParam("limit") @ApiParam(value = "limit") final Integer limit, + @QueryParam("orderBy") @ApiParam(value = "orderBy") final String orderBy, @QueryParam("sortOrder") @ApiParam(value = "sortOrder") final String sortOrder) { final TellerData teller = this.readPlatformService.findTeller(tellerId); final CashierData cashier = this.readPlatformService.findCashier(cashierId); @@ -268,10 +302,12 @@ public class TellerApiResource { @Path("{tellerId}/cashiers/{cashierId}/summaryandtransactions") @Consumes({ MediaType.APPLICATION_JSON }) @Produces(MediaType.APPLICATION_JSON) - public String getTransactionsWtihSummaryForCashier(@PathParam("tellerId") final Long tellerId, - @PathParam("cashierId") final Long cashierId, @QueryParam("currencyCode") final String currencyCode, - @QueryParam("offset") final Integer offset, @QueryParam("limit") final Integer limit, - @QueryParam("orderBy") final String orderBy, @QueryParam("sortOrder") final String sortOrder) { + @ApiOperation(value = "Transactions Wtih Summary For Cashier", notes = "") + @ApiResponses({@ApiResponse(code = 200, message = "", response = TellerApiResourceSwagger.GetTellersTellerIdCashiersCashiersIdSummaryAndTransactionsResponse.class)}) + public String getTransactionsWtihSummaryForCashier(@PathParam("tellerId") @ApiParam(value = "tellerId") final Long tellerId, + @PathParam("cashierId") @ApiParam(value = "cashierId") final Long cashierId, @QueryParam("currencyCode") @ApiParam(value = "currencyCode") final String currencyCode, + @QueryParam("offset") @ApiParam(value = "offset") final Integer offset, @QueryParam("limit") @ApiParam(value = "limit") final Integer limit, + @QueryParam("orderBy") @ApiParam(value = "orderBy") final String orderBy, @QueryParam("sortOrder") @ApiParam(value = "sortOrder") final String sortOrder) { final TellerData teller = this.readPlatformService.findTeller(tellerId); final CashierData cashier = this.readPlatformService.findCashier(cashierId); @@ -290,7 +326,9 @@ public class TellerApiResource { @Path("{tellerId}/cashiers/{cashierId}/transactions/template") @Consumes({ MediaType.TEXT_HTML, MediaType.APPLICATION_JSON }) @Produces(MediaType.APPLICATION_JSON) - public String getCashierTxnTemplate(@PathParam("tellerId") final Long tellerId, @PathParam("cashierId") final Long cashierId) { + @ApiOperation(value = "Retrieve Cashier Transaction Template", notes = "") + @ApiResponses({@ApiResponse(code = 200, message = "", response = TellerApiResourceSwagger.GetTellersTellerIdCashiersCashiersIdTransactionsTemplateResponse.class)}) + public String getCashierTxnTemplate(@PathParam("tellerId") @ApiParam(value = "tellerId") final Long tellerId, @PathParam("cashierId") @ApiParam(value = "cashierId") final Long cashierId) { final CashierTransactionData cashierTxnTemplate = this.readPlatformService.retrieveCashierTxnTemplate(cashierId); @@ -301,7 +339,7 @@ public class TellerApiResource { @Path("{tellerId}/transactions") @Consumes({ MediaType.TEXT_HTML, MediaType.APPLICATION_JSON }) @Produces(MediaType.APPLICATION_JSON) - public String getTransactionData(@PathParam("tellerId") final Long tellerId, @QueryParam("dateRange") final String dateRange) { + public String getTransactionData(@PathParam("tellerId") @ApiParam(value = "tellerId") final Long tellerId, @QueryParam("dateRange") @ApiParam(value = "dateRange") final String dateRange) { final DateRange dateRangeHolder = DateRange.fromString(dateRange); final Collection transactions = this.readPlatformService.fetchTellerTransactionsByTellerId(tellerId, @@ -314,7 +352,7 @@ public class TellerApiResource { @Path("{tellerId}/transactions/{transactionId}") @Consumes({ MediaType.TEXT_HTML, MediaType.APPLICATION_JSON }) @Produces(MediaType.APPLICATION_JSON) - public String findTransactionData(@PathParam("tellerId") final Long tellerid, @PathParam("transactionId") final Long transactionId) { + public String findTransactionData(@PathParam("tellerId") @ApiParam(value = "tellerId") final Long tellerid, @PathParam("transactionId") @ApiParam(value = "transactionId") final Long transactionId) { final TellerTransactionData transaction = this.readPlatformService.findTellerTransaction(transactionId); return this.jsonSerializer.serialize(transaction); @@ -324,8 +362,8 @@ public class TellerApiResource { @Path("{tellerId}/journals") @Consumes({ MediaType.TEXT_HTML, MediaType.APPLICATION_JSON }) @Produces(MediaType.APPLICATION_JSON) - public String getJournalData(@PathParam("tellerId") final Long tellerId, @QueryParam("cashierId") final Long cashierDate, - @QueryParam("dateRange") final String dateRange) { + public String getJournalData(@PathParam("tellerId") @ApiParam(value = "tellerId") final Long tellerId, @QueryParam("cashierId") @ApiParam(value = "cashierId") final Long cashierDate, + @QueryParam("dateRange") @ApiParam(value = "dateRange") final String dateRange) { final DateRange dateRangeHolder = DateRange.fromString(dateRange); final Collection journals = this.readPlatformService.fetchTellerJournals(tellerId, cashierDate, diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/api/TellerApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/api/TellerApiResourceSwagger.java new file mode 100644 index 000000000..1f6498d55 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/api/TellerApiResourceSwagger.java @@ -0,0 +1,446 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.organisation.teller.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.apache.fineract.infrastructure.core.service.Page; +import org.apache.fineract.organisation.monetary.data.CurrencyData; +import org.apache.fineract.organisation.staff.data.StaffData; +import org.apache.fineract.organisation.teller.data.CashierData; +import org.apache.fineract.organisation.teller.data.CashierTransactionData; +import org.apache.fineract.organisation.teller.domain.CashierTxnType; +import org.apache.fineract.organisation.teller.domain.TellerStatus; +import org.joda.time.LocalDate; + +import java.math.BigDecimal; +import java.util.Collection; +import java.util.Date; + +/** + * Created by sanyam on 20/8/17. + */ +final class TellerApiResourceSwagger { + private TellerApiResourceSwagger(){ + + } + + @ApiModel(value = "GetTellersResponse") + public static final class GetTellersResponse { + private GetTellersResponse() { + + } + @ApiModelProperty(example = "3") + public Long id; + @ApiModelProperty(example = "1") + public Long officeId; + @ApiModelProperty(example = "0") + public Long debitAccountId; + @ApiModelProperty(example = "0") + public Long creditAccountId; + @ApiModelProperty(example = "Teller3") + public String name; + @ApiModelProperty(example = "[2015,2,1]") + public LocalDate startDate; + @ApiModelProperty(example = "ACTIVE") + public TellerStatus status; + @ApiModelProperty(example = "Head Office") + public String officeName; + } + + @ApiModel(value = "PostTellersRequest") + public static final class PostTellersRequest { + private PostTellersRequest() { + + } + @ApiModelProperty(example = "1") + public Long officeId; + @ApiModelProperty(example = "Teller3") + public String name; + @ApiModelProperty(example = "cash handling") + public String description; + @ApiModelProperty(example = "ACTIVE") + public TellerStatus status; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "dd-MM-yyyy") + public String dateFormat; + @ApiModelProperty(example = "01 February 2015") + public LocalDate startDate; + + } + + @ApiModel(value = "PostTellersResponse") + public static final class PostTellersResponse { + private PostTellersResponse() { + + } + @ApiModelProperty(example = "1") + public Long officeId; + @ApiModelProperty(example = "5") + public Long resourceId; + } + + @ApiModel(value = "PutTellersRequest") + public static final class PutTellersRequest { + private PutTellersRequest() { + + } + @ApiModelProperty(example = "Teller3") + public String name; + @ApiModelProperty(example = "1") + public Long officeId; + @ApiModelProperty(example = "teller cash handling") + public String description; + @ApiModelProperty(example = "ACTIVE") + public TellerStatus status; + @ApiModelProperty(example = "28 February 2015") + public LocalDate endDate; + @ApiModelProperty(example = "01 February 2015") + public LocalDate startDate; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "dd-MM-yyyy") + public String dateFormat; + + } + + @ApiModel(value = "PutTellersResponse") + public static final class PutTellersResponse { + private PutTellersResponse() { + + } + final class PutTellersResponseChanges { + private PutTellersResponseChanges() {} + @ApiModelProperty(example = "teller cash handling") + public String description; + @ApiModelProperty(example = "28 February 2015") + public LocalDate endDate; + @ApiModelProperty(example = "01 February 2015") + public LocalDate startDate; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "dd-MM-yyyy") + public String dateFormat; + } + @ApiModelProperty(example = "1") + public Long officeId; + @ApiModelProperty(example = "5") + public Long resourceId; + public PutTellersResponseChanges changes; + + } + + @ApiModel(value = "GetTellersTellerIdCashiersResponse") + public static final class GetTellersTellerIdCashiersResponse { + private GetTellersTellerIdCashiersResponse() { + + } + @ApiModelProperty(example = "1") + public Long tellerId; + @ApiModelProperty(example = "Teller1") + public String tellerName; + @ApiModelProperty(example = "1") + public Long officeId; + @ApiModelProperty(example = "Head Office") + public String officeName; + public Collection cashiers; + + } + + @ApiModel(value = "PostTellersTellerIdCashiersRequest") + public static final class PostTellersTellerIdCashiersRequest { + private PostTellersTellerIdCashiersRequest() { + + } + @ApiModelProperty(example = "28 February 2015") + public LocalDate endDate; + @ApiModelProperty(example = "teller cash handling") + public String description; + @ApiModelProperty(example = "true") + public Boolean isFullDay; + @ApiModelProperty(example = "3") + public Long staffId; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "dd-MM-yyyy") + public String dateFormat; + @ApiModelProperty(example = "01 February 2015") + public LocalDate startDate; + + } + + @ApiModel(value = "PostTellersTellerIdCashiersResponse") + public static final class PostTellersTellerIdCashiersResponse { + private PostTellersTellerIdCashiersResponse() { + + } + @ApiModelProperty(example = "1") + public Long resourceId; + @ApiModelProperty(example = "2") + public Long subResourceId; + + } + + @ApiModel(value = "GetTellersTellerIdCashiersCashierIdResponse") + public static final class GetTellersTellerIdCashiersCashierIdResponse { + private GetTellersTellerIdCashiersCashierIdResponse() { + + } + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "1") + public Long tellerId; + @ApiModelProperty(example = "1") + public Long staffId; + @ApiModelProperty(example = "") + public String description; + @ApiModelProperty(example = "Feb 20, 2015 12:00:00 AM") + public LocalDate startDate; + @ApiModelProperty(example = "Feb 27, 2015 12:00:00 AM") + public LocalDate endDate; + @ApiModelProperty(example = "true") + public Boolean isFullDay; + @ApiModelProperty(example = "") + public String startTime; + @ApiModelProperty(example = "") + public String endTime; + @ApiModelProperty(example = "Teller1") + public String tellerName; + @ApiModelProperty(example = "Staff1, Test") + public String staffName; + + } + + @ApiModel(value = "PutTellersTellerIdCashiersCashierIdRequest") + public static final class PutTellersTellerIdCashiersCashierIdRequest { + private PutTellersTellerIdCashiersCashierIdRequest() { + + } + @ApiModelProperty(example = "25 February 2015") + public LocalDate endDate; + @ApiModelProperty(example = "Cashier updated.") + public String description; + @ApiModelProperty(example = "true") + public Boolean isFullDay; + @ApiModelProperty(example = "1") + public Long staffId; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "dd-MM-yyyy") + public String dateFormat; + @ApiModelProperty(example = "01 February 2015") + public LocalDate startDate; + + } + + @ApiModel(value = "PutTellersTellerIdCashiersCashierIdResponse") + public static final class PutTellersTellerIdCashiersCashierIdResponse { + private PutTellersTellerIdCashiersCashierIdResponse() { + + } + final class PutTellersTellerIdCashiersCashierIdResponseChanges { + private PutTellersTellerIdCashiersCashierIdResponseChanges() {} + @ApiModelProperty(example = "25 February 2015") + public LocalDate endDate; + @ApiModelProperty(example = "Cashier updated.") + public String description; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "dd-MM-yyyy") + public String dateFormat; + } + @ApiModelProperty(example = "1") + public Long resourceId; + @ApiModelProperty(example = "2") + public Long subResourceId; + public PutTellersTellerIdCashiersCashierIdResponseChanges changes; + } + + @ApiModel(value = "DeleteTellersTellerIdCashiersCashierIdResponse") + public static final class DeleteTellersTellerIdCashiersCashierIdResponse { + private DeleteTellersTellerIdCashiersCashierIdResponse() { + + } + @ApiModelProperty(example = "1") + public Long resourceId; + } + + @ApiModel(value = "GetTellersTellerIdCashiersTemplateResponse") + public static final class GetTellersTellerIdCashiersTemplateResponse { + private GetTellersTellerIdCashiersTemplateResponse() { + + } + @ApiModelProperty(example = "1") + public Long tellerId; + @ApiModelProperty(example = "Teller1") + public String tellerName; + @ApiModelProperty(example = "1") + public Long officeId; + @ApiModelProperty(example = "Head Office") + public String officeName; + public Collection staffOptions; + } + + @ApiModel(value = "GetTellersTellerIdCashiersCashiersIdTransactionsResponse") + public static final class GetTellersTellerIdCashiersCashiersIdTransactionsResponse { + private GetTellersTellerIdCashiersCashiersIdTransactionsResponse() { + + } + @ApiModelProperty(example = "8") + public Long id; + @ApiModelProperty(example = "15") + public Long cashierId; + public CashierTxnType txnType; + @ApiModelProperty(example = "1000") + public BigDecimal txnAmount; + @ApiModelProperty(example = "Feb 25, 2015 12:00:00 AM") + public Date txnDate; + @ApiModelProperty(example = "2") + public Long entityId; + @ApiModelProperty(example = "loans") + public String entityType; + @ApiModelProperty(example = "Disbursement, Loan:2-000000002,Client:1-Test 1") + public String txnNote; + @ApiModelProperty(example = "Feb 25, 2015 12:00:00 AM") + public Date createdDate; + @ApiModelProperty(example = "1") + public Long officeId; + @ApiModelProperty(example = "Head Office") + public String officeName; + @ApiModelProperty(example = "0") + public Long tellerId; + @ApiModelProperty(example = "B, Ramesh") + public String cashierName; + } + + @ApiModel(value = "PostTellersTellerIdCashiersCashierIdAllocateRequest") + public static final class PostTellersTellerIdCashiersCashierIdAllocateRequest { + private PostTellersTellerIdCashiersCashierIdAllocateRequest() { + + } + @ApiModelProperty(example = "USD") + public String currencyCode; + @ApiModelProperty(example = "5000") + public BigDecimal txnAmount; + @ApiModelProperty(example = "allocating cash") + public String txnNote; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "dd-MM-yyyy") + public String dateFormat; + @ApiModelProperty(example = "01 February 2015") + public Date txnDate; + } + + @ApiModel(value = "PostTellersTellerIdCashiersCashierIdAllocateResponse") + public static final class PostTellersTellerIdCashiersCashierIdAllocateResponse { + private PostTellersTellerIdCashiersCashierIdAllocateResponse() { + + } + @ApiModelProperty(example = "1") + public Long resourceId; + @ApiModelProperty(example = "4") + public Long subResourceId; + } + + @ApiModel(value = "PostTellersTellerIdCashiersCashierIdSettleRequest") + public static final class PostTellersTellerIdCashiersCashierIdSettleRequest { + private PostTellersTellerIdCashiersCashierIdSettleRequest() { + + } + @ApiModelProperty(example = "USD") + public String currencyCode; + @ApiModelProperty(example = "2000") + public BigDecimal txnAmount; + @ApiModelProperty(example = "cash settlement") + public String txnNote; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "dd-MM-yyyy") + public String dateFormat; + @ApiModelProperty(example = "20 February 2015") + public Date txnDate; + + } + + @ApiModel(value = "PostTellersTellerIdCashiersCashierIdSettleResponse") + public static final class PostTellersTellerIdCashiersCashierIdSettleResponse { + private PostTellersTellerIdCashiersCashierIdSettleResponse() { + + } + @ApiModelProperty(example = "1") + public Long resourceId; + @ApiModelProperty(example = "5") + public Long subResourceId; + } + + @ApiModel(value = "GetTellersTellerIdCashiersCashiersIdSummaryAndTransactionsResponse") + public static final class GetTellersTellerIdCashiersCashiersIdSummaryAndTransactionsResponse { + private GetTellersTellerIdCashiersCashiersIdSummaryAndTransactionsResponse() { + + } + @ApiModelProperty(example = "7000.000000") + public BigDecimal sumCashAllocation; + @ApiModelProperty(example = "0") + public BigDecimal sumInwardCash; + @ApiModelProperty(example = "0") + public BigDecimal sumOutwardCash; + @ApiModelProperty(example = "50.000000") + public BigDecimal sumCashSettlement; + @ApiModelProperty(example = "6950.000000") + public BigDecimal netCash; + @ApiModelProperty(example = "Head Office") + public String officeName; + @ApiModelProperty(example = "1") + public long tellerId; + @ApiModelProperty(example = "Teller1") + public String tellerName; + @ApiModelProperty(example = "1") + public long cashierId; + @ApiModelProperty(example = "Staff1, Test") + public String cashierName; + public Page cashierTransactions; + + } + + @ApiModel(value = "GetTellersTellerIdCashiersCashiersIdTransactionsTemplateResponse") + public static final class GetTellersTellerIdCashiersCashiersIdTransactionsTemplateResponse { + private GetTellersTellerIdCashiersCashiersIdTransactionsTemplateResponse() { + + } + @ApiModelProperty(example = "1") + public Long cashierId; + @ApiModelProperty(example = "Head Office") + public String officeName; + @ApiModelProperty(example = "0") + public Long tellerId; + @ApiModelProperty(example = "Teller1") + public String tellerName; + @ApiModelProperty(example = "Staff1, Test") + public String cashierName; + public CashierData cashierData; + @ApiModelProperty(example = "Feb 20, 2015 12:00:00 AM") + public LocalDate startDate; + @ApiModelProperty(example = "Feb 27, 2015 12:00:00 AM") + public LocalDate endDate; + public Collection currencyOptions; + } + +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/api/TellerJournalApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/api/TellerJournalApiResource.java index 744fbf1d9..e9c5ecd7c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/api/TellerJournalApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/api/TellerJournalApiResource.java @@ -27,6 +27,7 @@ import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.MediaType; +import io.swagger.annotations.Api; import org.apache.fineract.infrastructure.core.serialization.DefaultToApiJsonSerializer; import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; import org.apache.fineract.organisation.teller.data.TellerData; @@ -40,6 +41,7 @@ import org.springframework.stereotype.Component; @Path("cashiersjournal") @Component @Scope("singleton") +@Api(value = "cashiersjournal", description = "") public class TellerJournalApiResource { private final PlatformSecurityContext securityContext; diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/api/WorkingDaysApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/api/WorkingDaysApiResource.java index 65c8dccbf..1d4aa1673 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/api/WorkingDaysApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/api/WorkingDaysApiResource.java @@ -27,6 +27,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -44,6 +45,7 @@ import org.springframework.stereotype.Component; @Path("/workingdays") @Component @Scope("singleton") +@Api(value = "Working days", description = "The days of the week that are workdays.\n" + "\n" + "Rescheduling of repayments when it falls on a non-working is turned on /off by enable/disable reschedule-future-repayments parameter in Global configurations.\n" + "\n" + "Allow transactions on non-working days is configurable by enabling/disbaling the allow-transactions-on-non_workingday parameter in Global configurations.") public class WorkingDaysApiResource { private final DefaultToApiJsonSerializer toApiJsonSerializer; @@ -67,6 +69,8 @@ public class WorkingDaysApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "List Working days", notes = "Example Requests:\n" + "\n" + "workingdays") + @ApiResponses({@ApiResponse(code = 200, message = "", response = WorkingDaysApiResourceSwagger.GetWorkingDaysResponse.class, responseContainer = "list")}) public String retrieveAll(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(WorkingDaysApiConstants.WORKING_DAYS_RESOURCE_NAME); final WorkingDaysData workingDaysData = this.workingDaysReadPlatformService.retrieve(); @@ -78,7 +82,10 @@ public class WorkingDaysApiResource { @PUT @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String update(final String jsonRequestBody) { + @ApiOperation(value = "Update a Working Day", notes = "Mandatory Fields\n" + "recurrence,repaymentRescheduleType,extendTermForDailyRepayments,locale") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = WorkingDaysApiResourceSwagger.PutWorkingDaysRequest.class )}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = WorkingDaysApiResourceSwagger.PutWorkingDaysResponse.class)}) + public String update(@ApiParam(hidden = true) final String jsonRequestBody) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateWorkingDays().withJson(jsonRequestBody).build(); @@ -91,6 +98,8 @@ public class WorkingDaysApiResource { @Path("/template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Working Days Template", notes = "This is a convenience resource. It can be useful when building maintenance user interface screens for working days.\n" + "\n" + "Example Request:\n" + "\n" + "workingdays/template") + @ApiResponses({@ApiResponse(code = 200, message = "", response = WorkingDaysApiResourceSwagger.GetWorkingDaysTemplateResponse.class )}) public String template(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(WorkingDaysApiConstants.WORKING_DAYS_RESOURCE_NAME); diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/api/WorkingDaysApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/api/WorkingDaysApiResourceSwagger.java new file mode 100644 index 000000000..035f98105 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/api/WorkingDaysApiResourceSwagger.java @@ -0,0 +1,81 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.organisation.workingdays.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.apache.fineract.infrastructure.core.data.EnumOptionData; + +import java.util.Collection; + +/** + * Created by sanyam on 19/8/17. + */ + +final class WorkingDaysApiResourceSwagger { + private WorkingDaysApiResourceSwagger() { + + } + + @ApiModel(value = "GetWorkingDaysResponse") + public static final class GetWorkingDaysResponse { + private GetWorkingDaysResponse() { + + } + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR") + public String recurrence; + public EnumOptionData repaymentRescheduleType; + @ApiModelProperty(example = "true") + public Boolean extendTermForDailyRepayments; + } + + @ApiModel(value = "GetWorkingDaysTemplateResponse") + public static final class GetWorkingDaysTemplateResponse { + private GetWorkingDaysTemplateResponse() { + + } + public Collection repaymentRescheduleOptions; + } + + @ApiModel(value = "PutWorkingDaysRequest") + public static final class PutWorkingDaysRequest { + private PutWorkingDaysRequest() { + + } + @ApiModelProperty(example = "FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR") + public String recurrence; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "4") + public EnumOptionData repaymentRescheduleType; + @ApiModelProperty(example = "true") + public Boolean extendTermForDailyRepayments; + } + + @ApiModel(value = "PutWorkingDaysResponse") + public static final class PutWorkingDaysResponse { + private PutWorkingDaysResponse() { + + } + @ApiModelProperty(example = "1") + public Long resourceId; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientAddressApiResources.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientAddressApiResources.java index 67c72b4a0..d4eb074ac 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientAddressApiResources.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientAddressApiResources.java @@ -35,6 +35,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -45,6 +46,8 @@ import org.apache.fineract.infrastructure.core.serialization.DefaultToApiJsonSer import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; import org.apache.fineract.portfolio.address.data.AddressData; import org.apache.fineract.portfolio.address.service.AddressReadPlatformServiceImpl; +import org.apache.fineract.portfolio.client.data.ClientApiCollectionConstants; +import org.apache.fineract.portfolio.client.data.ClientData; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; @@ -52,6 +55,7 @@ import org.springframework.stereotype.Component; @Path("/client") @Component @Scope("singleton") +@Api(value = "Clients Address", description = "Address module is an optional module and can be configured into the system by using GlobalConfiguration setting: enable-address. In order to activate Address module, we need to enable the configuration, enable-address by setting its value to true.") public class ClientAddressApiResources { private final Set RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("addressId", "street", "addressLine1", "addressLine2", "addressLine3", "townVillage", "city", "countyDistrict", "stateProvinceId", @@ -93,12 +97,31 @@ public class ClientAddressApiResources { } + @POST + @Path("/{clientid}/addresses") + @Consumes({ MediaType.APPLICATION_JSON }) + @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Create an address for a Client", notes = "Mandatory Fields : \n" + "type and clientId") + @ApiResponses(value = { @ApiResponse(code = 200, message = "", response = CommandProcessingResult.class) }) + public String AddClientAddress(@QueryParam("type") final long addressTypeId, + @PathParam("clientid") final long clientid, final String apiRequestBodyAsJson) { + + final CommandWrapper commandRequest = new CommandWrapperBuilder().addClientAddress(clientid, addressTypeId) + .withJson(apiRequestBodyAsJson).build(); + + final CommandProcessingResult result = this.commandsSourceWritePlatformService.logCommandSource(commandRequest); + + return this.toApiJsonSerializer.serialize(result); + } + @GET @Path("/{clientid}/addresses") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "List all addresses for a Client", notes = "Example Requests:\n" + "\n" +"client/1/addresses\n" + "\n" + "\n" +"clients/1/addresses?status=false,true&&type=1,2,3" ) + @ApiResponses({@ApiResponse(code = 200, message = "", response = AddressData.class)}) public String getAddresses(@QueryParam("status") final String status, @QueryParam("type") final long addressTypeId, - @PathParam("clientid") final long clientid, @Context final UriInfo uriInfo) { + @PathParam("clientid") final long clientid, @Context final UriInfo uriInfo) { Collection address; this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -119,26 +142,14 @@ public class ClientAddressApiResources { } - @POST - @Path("/{clientid}/addresses") - @Consumes({ MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_JSON }) - public String AddClientAddress(@QueryParam("type") final long addressTypeId, - @PathParam("clientid") final long clientid, final String apiRequestBodyAsJson) { - - final CommandWrapper commandRequest = new CommandWrapperBuilder().addClientAddress(clientid, addressTypeId) - .withJson(apiRequestBodyAsJson).build(); - - final CommandProcessingResult result = this.commandsSourceWritePlatformService.logCommandSource(commandRequest); - - return this.toApiJsonSerializer.serialize(result); - } - @PUT @Path("/{clientid}/addresses") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String UpdateClientAddress(@PathParam("clientid") final long clientid, final String apiRequestBodyAsJson) { + @ApiOperation(value = "update an address for a Client", notes = "All the address fields can be updated by using update client address API\n" + "\n" + "Mandatory Fields\n" + "type and addressId") + @ApiImplicitParams({@ApiImplicitParam(value = "body", dataType = "body", dataTypeClass = ClientApiConstants.class)}) + @ApiResponses(value = { @ApiResponse(code = 200, message = "", response = CommandProcessingResult.class) }) + public String UpdateClientAddress(@PathParam("clientid") final long clientid, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateClientAddress(clientid) .withJson(apiRequestBodyAsJson).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientChargesApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientChargesApiResource.java index 4719c4286..8baf881cc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientChargesApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientChargesApiResource.java @@ -35,6 +35,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.commons.lang.StringUtils; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; @@ -51,7 +52,9 @@ import org.apache.fineract.infrastructure.security.service.PlatformSecurityConte import org.apache.fineract.portfolio.charge.data.ChargeData; import org.apache.fineract.portfolio.charge.service.ChargeReadPlatformService; import org.apache.fineract.portfolio.client.data.ClientChargeData; +import org.apache.fineract.portfolio.client.data.ClientData; import org.apache.fineract.portfolio.client.data.ClientTransactionData; +import org.apache.fineract.portfolio.client.domain.ClientCharge; import org.apache.fineract.portfolio.client.service.ClientChargeReadPlatformService; import org.apache.fineract.portfolio.client.service.ClientTransactionReadPlatformService; import org.springframework.beans.factory.annotation.Autowired; @@ -60,6 +63,7 @@ import org.springframework.util.CollectionUtils; @Path("/clients/{clientId}/charges") @Component +@Api(value = "Client Charges", description = "It is typical for MFI's to directly associate charges with an implicit Client account. These can be either fees or penalties\n" + "\n" + "Client Charges are client specific instances of Charges. Refer Charges for documentation of the various properties of a charge, Only additional properties ( specific to the context of a Charge being associated with a Client account) are described here") public class ClientChargesApiResource { private final PlatformSecurityContext context; @@ -89,6 +93,8 @@ public class ClientChargesApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "List Client Charges", notes = "The list capability of client charges supports pagination." + "Example Requests:\n" + "clients/1/charges\n" + "\nclients/1/charges?offset=0&limit=5" ) + @ApiResponses(value = { @ApiResponse(code = 200, message = "", response = ClientCharge.class) }) public String retrieveAllClientCharges(@PathParam("clientId") final Long clientId, @DefaultValue(ClientApiConstants.CLIENT_CHARGE_QUERY_PARAM_STATUS_VALUE_ALL) @QueryParam(ClientApiConstants.CLIENT_CHARGE_QUERY_PARAM_STATUS) final String chargeStatus, @QueryParam("pendingPayment") final Boolean pendingPayment, @Context final UriInfo uriInfo, @@ -134,6 +140,8 @@ public class ClientChargesApiResource { @Path("{chargeId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Retrieve a Client Charge", notes = "Example Requests:\n" + "clients/1/charges/1\n" + "\n" + "\n" + "clients/1/charges/1?fields=name,id" ) + @ApiResponses(value = { @ApiResponse(code = 200, message = "", response = ClientChargeData.class) }) public String retrieveClientCharge(@PathParam("clientId") final Long clientId, @PathParam("chargeId") final Long chargeId, @Context final UriInfo uriInfo) { @@ -161,7 +169,10 @@ public class ClientChargesApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String applyClientCharge(@PathParam("clientId") final Long clientId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Add Client Charge", notes = " This API associates a Client charge with an implicit Client account\n" + "Mandatory Fields : \n" + "chargeId and dueDate \n" + "Optional Fields : \n" + "amount" ) + @ApiImplicitParams({@ApiImplicitParam(value = "body", dataType = "body", dataTypeClass = ClientData.class )}) + @ApiResponses(value = { @ApiResponse(code = 200, message = "", response = CommandProcessingResult.class) }) + public String applyClientCharge(@PathParam("clientId") final Long clientId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createClientCharge(clientId).withJson(apiRequestBodyAsJson) .build(); @@ -175,6 +186,7 @@ public class ClientChargesApiResource { @Path("{chargeId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Pay a Client Charge", notes = "Mandatory Fields\n" + "transactionDate and amount " + "" + "\"Pay either a part of or the entire due amount for a charge.(command=paycharge)\n" + "\n" + "Waive a Client Charge\n" + "\n" + "\n" + "This API provides the facility of waiving off the remaining amount on a client charge (command=waive)\n" ) public String payOrWaiveClientCharge(@PathParam("clientId") final Long clientId, @PathParam("chargeId") final Long chargeId, @QueryParam("command") final String commandParam, final String apiRequestBodyAsJson) { @@ -211,6 +223,8 @@ public class ClientChargesApiResource { @Path("{chargeId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Delete a Client Charge", notes = "Deletes a Client Charge on which no transactions have taken place (either payments or waivers). ") + @ApiResponses({@ApiResponse(code = 200, message = "", response = CommandProcessingResult.class)}) public String deleteClientCharge(@PathParam("clientId") final Long clientId, @PathParam("chargeId") final Long chargeId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteClientCharge(clientId, chargeId).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientIdentifiersApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientIdentifiersApiResource.java index eaa885027..96c30ea32 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientIdentifiersApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientIdentifiersApiResource.java @@ -35,6 +35,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -47,6 +48,7 @@ import org.apache.fineract.infrastructure.core.serialization.DefaultToApiJsonSer import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; import org.apache.fineract.portfolio.client.data.ClientData; import org.apache.fineract.portfolio.client.data.ClientIdentifierData; +import org.apache.fineract.portfolio.client.domain.ClientIdentifier; import org.apache.fineract.portfolio.client.exception.DuplicateClientIdentifierException; import org.apache.fineract.portfolio.client.service.ClientIdentifierReadPlatformService; import org.apache.fineract.portfolio.client.service.ClientReadPlatformService; @@ -57,6 +59,7 @@ import org.springframework.stereotype.Component; @Path("/clients/{clientId}/identifiers") @Component @Scope("singleton") +@Api(value = "Client Identifier Api", description = "Client Identifiers refer to documents that are used to uniquely identify a customer\n" + "Ex: Drivers License, Passport, Ration card etc ") public class ClientIdentifiersApiResource { private static final Set CLIENT_IDENTIFIER_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "clientId", @@ -91,6 +94,8 @@ public class ClientIdentifiersApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "List all Identifiers for a Client", notes = "Example Requests:\n" + "clients/1/identifiers\n" + "\n" + "\n" + "clients/1/identifiers?fields=documentKey,documentType,description") + @ApiResponses({@ApiResponse(code = 200, message = "", response = ClientIdentifierData.class)}) public String retrieveAllClientIdentifiers(@Context final UriInfo uriInfo, @PathParam("clientId") final Long clientId) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -106,6 +111,8 @@ public class ClientIdentifiersApiResource { @Path("template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Retrieve Client Identifier Details Template", notes = "This is a convenience resource useful for building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n" + "\n" + " Field Defaults\n" + " Allowed Value Lists\n" + "\n\nExample Request:\n" + "clients/1/identifiers/template" ) + @ApiResponses({@ApiResponse(code = 200, message = "", response = ClientIdentifierData.class)}) public String newClientIdentifierDetails(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -120,7 +127,10 @@ public class ClientIdentifiersApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String createClientIdentifier(@PathParam("clientId") final Long clientId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Create an Identifier for a Client", notes = "Mandatory Fields\n" + "documentKey, documentTypeId " ) + @ApiImplicitParams({@ApiImplicitParam(value = "body", dataType = "body", dataTypeClass = ClientData.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = CommandProcessingResult.class)}) + public String createClientIdentifier(@PathParam("clientId") final Long clientId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { try { final CommandWrapper commandRequest = new CommandWrapperBuilder().createClientIdentifier(clientId) @@ -146,6 +156,8 @@ public class ClientIdentifiersApiResource { @Path("{identifierId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Retrieve a Client Identifier", notes = "Example Requests:\n" + "clients/1/identifier/2\n" + "\n" + "\n" + "clients/1/identifier/2?template=true\n" + "\n" + "clients/1/identifiers/2?fields=documentKey,documentType,description" ) + @ApiResponses({@ApiResponse(code = 200, message = "", response = ClientIdentifierData.class)}) public String retrieveClientIdentifiers(@PathParam("clientId") final Long clientId, @PathParam("identifierId") final Long clientIdentifierId, @Context final UriInfo uriInfo) { @@ -167,8 +179,11 @@ public class ClientIdentifiersApiResource { @Path("{identifierId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Update a Client Identifier") + @ApiImplicitParams({@ApiImplicitParam(value = "body", dataType = "body", dataTypeClass = ClientData.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = CommandProcessingResult.class)}) public String updateClientIdentifer(@PathParam("clientId") final Long clientId, - @PathParam("identifierId") final Long clientIdentifierId, final String apiRequestBodyAsJson) { + @PathParam("identifierId") final Long clientIdentifierId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { try { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateClientIdentifier(clientId, clientIdentifierId) @@ -193,6 +208,8 @@ public class ClientIdentifiersApiResource { @Path("{identifierId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Delete a Client Identifier") + @ApiResponses({@ApiResponse(code = 200, message = "", response = CommandProcessingResult.class)}) public String deleteClientIdentifier(@PathParam("clientId") final Long clientId, @PathParam("identifierId") final Long clientIdentifierId) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientTransactionsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientTransactionsApiResource.java index a485957fd..ddcc76ee3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientTransactionsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientTransactionsApiResource.java @@ -29,6 +29,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.commons.lang.StringUtils; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; @@ -41,13 +42,16 @@ import org.apache.fineract.infrastructure.core.serialization.DefaultToApiJsonSer import org.apache.fineract.infrastructure.core.service.Page; import org.apache.fineract.infrastructure.core.service.SearchParameters; import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; +import org.apache.fineract.portfolio.client.data.ClientData; import org.apache.fineract.portfolio.client.data.ClientTransactionData; +import org.apache.fineract.portfolio.client.domain.ClientTransaction; import org.apache.fineract.portfolio.client.service.ClientTransactionReadPlatformService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @Path("/clients/{clientId}/transactions") @Component +@Api(value = "Client Transaction", description = "Client Transactions refer to transactions made directly againt a Client's internal account. Currently, these transactions are only created as a result of charge payments/waivers. You are allowed to undo a transaction, however you cannot explicitly create one. ") public class ClientTransactionsApiResource { private final PlatformSecurityContext context; @@ -72,6 +76,8 @@ public class ClientTransactionsApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "List Client Transactions", notes = "The list capability of client transaction can support pagination." + "\n\nMandatory Arguments : " + "offset\n" + " Integer Mandatory, defaults to 0 \n" + " Indicates the result from which pagination starts\n" + "limit\n" + " Integer Mandatory, defaults to 200 \n" + " Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1\n" + "\n" + "\n\n" + "Example Requests:\n" + "clients/189/transactions\n" + "clients/189/transactions?offset=10&limit=50" ) + @ApiResponses({@ApiResponse(code = 200, message = "", response = ClientTransactionData.class)}) public String retrieveAllClientTransactions(@PathParam("clientId") final Long clientId, @Context final UriInfo uriInfo, @QueryParam("offset") final Integer offset, @QueryParam("limit") final Integer limit) { this.context.authenticatedUser().validateHasReadPermission(ClientApiConstants.CLIENT_CHARGES_RESOURCE_NAME); @@ -89,6 +95,8 @@ public class ClientTransactionsApiResource { @Path("{transactionId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Retrieve a Client Transaction", notes = "Example Requests:\n" + "clients/1/transactions/1\n" + "\n" + "\n" + "clients/1/transactions/1?fields=id,officeName" ) + @ApiResponses({@ApiResponse(code = 200, message = "", response = ClientTransactionData.class)}) public String retrieveClientTransaction(@PathParam("clientId") final Long clientId, @PathParam("transactionId") final Long transactionId, @Context final UriInfo uriInfo) { @@ -106,8 +114,11 @@ public class ClientTransactionsApiResource { @Path("{transactionId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Undo a Client Transaction") + @ApiImplicitParams({@ApiImplicitParam(value = "body", dataType = "body", dataTypeClass = ClientData.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = CommandProcessingResult.class)}) public String undoClientTransaction(@PathParam("clientId") final Long clientId, @PathParam("transactionId") final Long transactionId, - @QueryParam("command") final String commandParam, final String apiRequestBodyAsJson) { + @QueryParam("command") final String commandParam, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { String json = ""; if (is(commandParam, ClientApiConstants.CLIENT_TRANSACTION_COMMAND_UNDO)) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientsApiResource.java index f8bf7a88d..a457bca73 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientsApiResource.java @@ -18,6 +18,7 @@ */ package org.apache.fineract.portfolio.client.api; +import java.lang.reflect.Array; import java.util.Arrays; import java.util.Collection; import java.util.HashSet; @@ -37,6 +38,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.commons.lang.StringUtils; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; @@ -62,6 +64,7 @@ import org.springframework.stereotype.Component; @Path("/clients") @Component @Scope("singleton") +@Api(value = "Client Api", description = "Clients are people and businesses that have applied (or may apply) to an MFI for loans.\n" + "\n" + "Clients can be created in Pending or straight into Active state.") public class ClientsApiResource { private final PlatformSecurityContext context; @@ -95,9 +98,11 @@ public class ClientsApiResource { @Path("template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveTemplate(@Context final UriInfo uriInfo, @QueryParam("officeId") final Long officeId, - @QueryParam("commandParam") final String commandParam, - @DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") final boolean staffInSelectedOfficeOnly) { + @ApiOperation(value = "Retrieve Client Details Template", notes = "This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n" + "\n" + "Field Defaults\n" + "Allowed Value Lists" + "Example Request:\n" + "\n" + "clients/template") + @ApiResponses(value = { @ApiResponse(code = 200, message = "", response = ClientData.class) }) + public String retrieveTemplate(@Context final UriInfo uriInfo, @ApiParam(value = "optional") @QueryParam("officeId") final Long officeId, + @ApiParam(value = "optional If commandParam=close retrieves all closureReasons which are associated with \"ClientClosureReason\" value.", defaultValue = "false") @QueryParam("commandParam") final String commandParam, + @DefaultValue("false") @ApiParam(value = "optional Defaults to false if not provided. If staffInSelectedOfficeOnly=true only staff who are associated with the selected branch are returned.") @QueryParam("staffInSelectedOfficeOnly") final boolean staffInSelectedOfficeOnly) { this.context.authenticatedUser().validateHasReadPermission(ClientApiConstants.CLIENT_RESOURCE_NAME); @@ -122,6 +127,9 @@ public class ClientsApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "List Clients", + notes = "Example Requests:\n" + "\n" + "clients\n" + "\n" + "clients?fields=displayName,officeName,timeline\n" + "\n" + "clients?offset=10&limit=50\n" + "\n" + "clients?orderBy=displayName&sortOrder=DESC" ) + @ApiResponses({@ApiResponse(code = 200, message = "", response = ClientData.class)}) public String retrieveAll(@Context final UriInfo uriInfo, @QueryParam("sqlSearch") final String sqlSearch, @QueryParam("officeId") final Long officeId, @QueryParam("externalId") final String externalId, @QueryParam("displayName") final String displayName, @QueryParam("firstName") final String firstname, @@ -157,6 +165,8 @@ public class ClientsApiResource { @Path("{clientId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Retrieve a Client", notes = "Example Requests:\n" + "\n" + "clients/1\n" +"\n" + "\n" + "clients/1?template=true\n" + "\n" + "\n" + "clients/1?fields=id,displayName,officeName" ) + @ApiResponses({@ApiResponse(code = 200, message = "", response = ClientData.class)}) public String retrieveOne(@PathParam("clientId") final Long clientId, @Context final UriInfo uriInfo, @DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") final boolean staffInSelectedOfficeOnly) { @@ -181,7 +191,11 @@ public class ClientsApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String create(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Create a Client", httpMethod = "POST", notes = "Note:" + "\n" + "1. You can enter either:firstname/middlename/lastname - for a person (middlename is optional) OR fullname - for a business or organisation (or person known by one name).\n" + "\n" + "2.If address is enable(enable-address=true), then additional field called address has to be passed.", response = CommandProcessingResult.class, consumes="application/json") + @ApiImplicitParams({@ApiImplicitParam( paramType = "body", dataType = "ClientData", required = true, type = "body", dataTypeClass = ClientData.class)}) + @ApiResponses(value = { @ApiResponse(code = 200, message = "Successfully Client Created", response = CommandProcessingResult.class) }) + public String create(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { + final CommandWrapper commandRequest = new CommandWrapperBuilder() // .createClient() // @@ -197,7 +211,10 @@ public class ClientsApiResource { @Path("{clientId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String update(@PathParam("clientId") final Long clientId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update a Client", notes = "You can update any of the basic attributes of a client (but not its associations) using this API.\n" + "\n" + "Changing the relationship between a client and its office is not supported through this API. An API specific to handling transfers of clients between offices is available for the same.\n" + "\n" + "The relationship between a client and a group must be removed through the Groups API." ) + @ApiImplicitParams({@ApiImplicitParam( paramType = "body", dataType = "ClientData", required = true, type = "body", dataTypeClass = ClientData.class)}) + @ApiResponses(value = { @ApiResponse(code = 200, message = "", response = CommandProcessingResult.class) }) + public String update(@ApiParam(value = "ClientId") @PathParam("clientId") final Long clientId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // .updateClient(clientId) // @@ -213,6 +230,8 @@ public class ClientsApiResource { @Path("{clientId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Delete a Client", notes = "If a client is in Pending state, you are allowed to Delete it. The delete is a 'hard delete' and cannot be recovered from. Once clients become active or have loans or savings associated with them, you cannot delete the client but you may Close the client if they have left the program.") + @ApiResponses(value = {@ApiResponse(code = 200, message = "", response = CommandProcessingResult.class) }) public String delete(@PathParam("clientId") final Long clientId) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // @@ -228,6 +247,9 @@ public class ClientsApiResource { @Path("{clientId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Activate a Client | Close a Client | Reject a Client | Withdraw a Client | Reactivate a Client | UndoReject a Client | UndoWithdraw a Client | Assign a Staff | Unassign a Staff | Update Default Savings Account | Propose a Client Transfer | Withdraw a Client Transfer | Reject a Client Transfer | Accept a Client Transfer | Propose and Accept a Client Transfer | ", + notes = "\n[Reject a Client] Mandatory Fields : rejectionDate, rejectionReasonId\n" + "\n[Withdraw a Client] Mandatory Fields : withdrawalDate, withdrawalReasonId\n" + "\n[Reactivate a Client] Mandatory Fields : reactivationDate\n" + "\n[UndoReject a Client] Mandatory Fields : reopenedDate\n" + "\n[UndoWithdraw a Client]Mandatory Fields : reopenedDate\n" ) + @ApiImplicitParams({@ApiImplicitParam( paramType = "body", dataType = "body", required = true, type = "body")}) public String activate(@PathParam("clientId") final Long clientId, @QueryParam("command") final String commandParam, final String apiRequestBodyAsJson) { @@ -299,6 +321,11 @@ public class ClientsApiResource { @Path("{clientId}/accounts") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Retrieve client accounts overview", notes = "An example of how a loan portfolio summary can be provided. This is requested in a specific use case of the community application.\n" + "It is quite reasonable to add resources like this to simplify User Interface development.\n" + "\n" + "Example Requests:\n " + "\n" + "clients/1/accounts\n"+ "\n" + "clients/1/accounts?fields=loanAccounts,savingsAccounts" ) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "", response = AccountSummaryCollectionData.class), + @ApiResponse(code = 400, message = "Bad Request") + }) public String retrieveAssociatedAccounts(@PathParam("clientId") final Long clientId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(ClientApiConstants.CLIENT_RESOURCE_NAME); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientData.java index 3827307fc..a31a62227 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientData.java @@ -21,6 +21,8 @@ package org.apache.fineract.portfolio.client.data; import java.util.Collection; import java.util.List; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.builder.CompareToBuilder; import org.apache.commons.lang.builder.EqualsBuilder; @@ -62,17 +64,22 @@ final public class ClientData implements Comparable { private final CodeValueData gender; private final CodeValueData clientType; private final CodeValueData clientClassification; - private final Boolean isStaff; + private final Boolean isStaff; + @ApiModelProperty(required = true, hidden = false, dataType = "long") private final Long officeId; + private final String officeName; private final Long transferToOfficeId; private final String transferToOfficeName; + @ApiModelProperty(required = false, hidden = true) private final Long imageId; + @ApiModelProperty(required = false, hidden = true) private final Boolean imagePresent; private final Long staffId; private final String staffName; + @ApiModelProperty(required = false, hidden = true) private final ClientTimelineData timeline; private final Long savingsProductId; @@ -421,14 +428,17 @@ final public class ClientData implements Comparable { return this.officeName; } + @ApiModelProperty(required = false, hidden = true) public Long getImageId() { return this.imageId; } + @ApiModelProperty(required = false, hidden = true) public Boolean getImagePresent() { return this.imagePresent; } + @ApiModelProperty(required = false, hidden = true) public ClientTimelineData getTimeline() { return this.timeline; } @@ -483,4 +493,48 @@ final public class ClientData implements Comparable { public Boolean getIsAddressEnabled() { return this.isAddressEnabled; } + + + + + public Long getId() { + return id; + } + + public String getFullname() { + return fullname; + } + + public CodeValueData getGender() { + return gender; + } + + @ApiModelProperty(required = false, hidden = false) + public Boolean getStaff() { + return isStaff; + } + @ApiModelProperty(required = true, hidden = false) + public Long getOfficeId() { + return officeId; + } + @ApiModelProperty(required = true, hidden = false) + public AddressData getAddress() { + return address; + } + @ApiModelProperty(required = true, hidden = false) + public Boolean getAddressEnabled() { + return isAddressEnabled; + } + + public String getAccountNo() { + return accountNo; + } + @ApiModelProperty(required = true, hidden = false) + public String getMiddlename() { + return middlename; + } + @ApiModelProperty(required = true, hidden = false) + public Boolean getActive() { + return active; + } } \ No newline at end of file diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/api/LookupTableApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/spm/api/LookupTableApiResource.java index 588f24e44..085462926 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/spm/api/LookupTableApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/spm/api/LookupTableApiResource.java @@ -18,6 +18,7 @@ */ package org.apache.fineract.spm.api; +import io.swagger.annotations.*; import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; import org.apache.fineract.spm.data.LookupTableData; import org.apache.fineract.spm.domain.LookupTable; @@ -41,6 +42,7 @@ import java.util.List; @Path("/surveys/{surveyId}/lookuptables") @Component @Scope("singleton") +@Api(value = "SPM API - LookUp Table", description = "The Apache Fineract SPM API provides the ability to create custom surveys to collect social performance measurentment data or any additional questionnaire a financial institute want to collect.") public class LookupTableApiResource { private final PlatformSecurityContext securityContext; @@ -61,7 +63,9 @@ public class LookupTableApiResource { @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Transactional - public List fetchLookupTables(@PathParam("surveyId") final Long surveyId) { + @ApiOperation(value = "List all Lookup Table entries", notes = "List all Lookup Table entries for a survey.") + @ApiResponses({@ApiResponse(code = 200, message = "", response = LookupTableData.class, responseContainer = "list")}) + public List fetchLookupTables(@PathParam("surveyId") @ApiParam(value = "Enter surveyId") final Long surveyId) { this.securityContext.authenticatedUser(); final Survey survey = findSurvey(surveyId); @@ -80,8 +84,10 @@ public class LookupTableApiResource { @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Transactional - public LookupTableData findLookupTable(@PathParam("surveyId") final Long surveyId, - @PathParam("key") final String key) { + @ApiOperation(value = "Retrieve a Lookup Table entry", notes = "Retrieve a Lookup Table entry for a survey.") + @ApiResponses({@ApiResponse(code = 200, message = "", response = LookupTableData.class)}) + public LookupTableData findLookupTable(@PathParam("surveyId") @ApiParam(value = "Enter surveyId") final Long surveyId, + @PathParam("key") @ApiParam(value = "Enter key") final String key) { this.securityContext.authenticatedUser(); findSurvey(surveyId); @@ -99,7 +105,9 @@ public class LookupTableApiResource { @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Transactional - public void createLookupTable(@PathParam("surveyId") final Long surveyId, + @ApiOperation(value = "Create a Lookup Table entry", notes = "Add a new netry to a survey.\n" + "\n" + "Mandatory Fields\n" + "key, score, validFrom, validTo") + @ApiResponses({@ApiResponse(code = 200, message = "OK")}) + public void createLookupTable(@PathParam("surveyId") @ApiParam(value = "Enter surveyId") final Long surveyId, final LookupTableData lookupTableData) { this.securityContext.authenticatedUser(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/api/ScorecardApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/spm/api/ScorecardApiResource.java index 84987daa7..eea6502fd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/spm/api/ScorecardApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/spm/api/ScorecardApiResource.java @@ -29,6 +29,7 @@ import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; +import io.swagger.annotations.*; import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; import org.apache.fineract.portfolio.client.domain.Client; import org.apache.fineract.portfolio.client.domain.ClientRepositoryWrapper; @@ -48,6 +49,7 @@ import org.springframework.transaction.annotation.Transactional; @Path("/surveys/{surveyId}/scorecards") @Component @Scope("singleton") +@Api(value = "SPM - Scorecards", description = " ") public class ScorecardApiResource { private final PlatformSecurityContext securityContext; @@ -69,7 +71,9 @@ public class ScorecardApiResource { @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Transactional - public List findBySurvey(@PathParam("surveyId") final Long surveyId) { + @ApiOperation(value = "List all Scorecard entries", notes = "List all Scorecard entries for a survey.") + @ApiResponses({@ApiResponse(code = 200, message = "", response = Scorecard.class, responseContainer = "list")}) + public List findBySurvey(@PathParam("surveyId") @ApiParam(value = "Enter surveyId") final Long surveyId) { this.securityContext.authenticatedUser(); final Survey survey = findSurvey(surveyId); @@ -87,7 +91,9 @@ public class ScorecardApiResource { @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Transactional - public void createScorecard(@PathParam("surveyId") final Long surveyId, final ScorecardData scorecardData) { + @ApiOperation(value = "Create a Scorecard entry", notes = "Add a new netry to a survey.\n" + "\n" + "Mandatory Fields\n" + "clientId, createdOn, questionId, responseId, staffId") + @ApiResponses({@ApiResponse(code = 200, message = "OK")}) + public void createScorecard(@PathParam("surveyId") @ApiParam(value = "Enter surveyId") final Long surveyId, @ApiParam(format = "body", type = "body") final ScorecardData scorecardData) { final AppUser appUser = this.securityContext.authenticatedUser(); final Survey survey = findSurvey(surveyId); final Client client = this.clientRepositoryWrapper.findOneWithNotFoundDetection(scorecardData.getClientId()); @@ -99,8 +105,8 @@ public class ScorecardApiResource { @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Transactional - public List findBySurveyClient(@PathParam("surveyId") final Long surveyId, - @PathParam("clientId") final Long clientId) { + public List findBySurveyClient(@PathParam("surveyId") @ApiParam(value = "Enter surveyId") final Long surveyId, + @PathParam("clientId") @ApiParam(value = "Enter clientId") final Long clientId) { this.securityContext.authenticatedUser(); final Survey survey = findSurvey(surveyId); final Client client = this.clientRepositoryWrapper.findOneWithNotFoundDetection(clientId); diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/api/SpmApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/spm/api/SpmApiResource.java index 8da5c154a..021328bff 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/spm/api/SpmApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/spm/api/SpmApiResource.java @@ -18,6 +18,7 @@ */ package org.apache.fineract.spm.api; +import io.swagger.annotations.*; import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; import org.apache.fineract.spm.data.SurveyData; import org.apache.fineract.spm.domain.Survey; @@ -37,6 +38,7 @@ import java.util.List; @Path("/surveys") @Component @Scope("singleton") +@Api(value = "SPM - Serveys", description = "") public class SpmApiResource { private final PlatformSecurityContext securityContext; @@ -53,6 +55,8 @@ public class SpmApiResource { @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Transactional + @ApiOperation(value = "List all Surveys", notes = "") + @ApiResponses({@ApiResponse(code = 200, message = "", response = SurveyData.class, responseContainer = "list")}) public List fetchActiveSurveys() { this.securityContext.authenticatedUser(); @@ -74,7 +78,9 @@ public class SpmApiResource { @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Transactional - public SurveyData findSurvey(@PathParam("id") final Long id) { + @ApiOperation(value = "Retrieve a Survey", notes = "") + @ApiResponses({@ApiResponse(code = 200, message = "", response = SurveyData.class)}) + public SurveyData findSurvey(@PathParam("id") @ApiParam(value = "Enter id") final Long id) { this.securityContext.authenticatedUser(); final Survey survey = this.spmService.findById(id); @@ -90,7 +96,9 @@ public class SpmApiResource { @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Transactional - public void createSurvey(final SurveyData surveyData) { + @ApiOperation(value = "Create a Survey", notes = "Adds a new survey to collect client related data.\n" + "\n" + "Mandatory Fields\n" + "\n" + "countryCode, key, name, questions, responses, sequenceNo, text, value") + @ApiResponses({@ApiResponse(code = 200, message = "OK")}) + public void createSurvey(@ApiParam(value = "Create survey") final SurveyData surveyData) { this.securityContext.authenticatedUser(); final Survey survey = SurveyMapper.map(surveyData); @@ -103,7 +111,9 @@ public class SpmApiResource { @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Transactional - public void deactivateSurvey(@PathParam("id") final Long id) { + @ApiOperation(value = "Deactivate Survey", notes = "") + @ApiResponses({@ApiResponse(code = 200, message = "OK")}) + public void deactivateSurvey(@PathParam("id") @ApiParam(value = "Enter id") final Long id) { this.securityContext.authenticatedUser(); this.spmService.deactivateSurvey(id); diff --git a/fineract-provider/src/main/java/org/apache/fineract/template/api/TemplatesApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/template/api/TemplatesApiResource.java index 442e76cbb..5dd799cef 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/template/api/TemplatesApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/template/api/TemplatesApiResource.java @@ -43,6 +43,7 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -67,6 +68,7 @@ import org.springframework.stereotype.Component; @Produces({ MediaType.APPLICATION_JSON }) @Component @Scope("singleton") +@Api(value = "User Generated Documents", description = "User Generated Documents(alternatively, Templates) are used for end-user features such as custom user defined document generation (AKA UGD). They are based on {{ moustache }} templates. Think of them as a sort of built-in \"mail merge\" functionality.\n" + "\n" + "User Generated Documents (and other types of templates) can aggregate data from several Apache Fineract back-end API calls via mappers. Mappers can even access non-Apache Fineract REST services from other servers. UGDs can render such data in tables, show images, etc. TBD: Please have a look at some of the Example UGDs included in Apache Fineract (or the Wiki page, for now.).\n" + "\n" + "UGDs can be assigned to an entity like client or loan and be of a type like Document or SMS. The entity and type of a UGD is only there for the convenience of user agents (UIs), in order to know where to show UGDs for the user (i.e. which tab). The Template Engine back-end runner does not actually need this metadata.") public class TemplatesApiResource { private final Set RESPONSE_TEMPLATES_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id")); @@ -98,8 +100,10 @@ public class TemplatesApiResource { } @GET - public String retrieveAll(@DefaultValue("-1") @QueryParam("typeId") final int typeId, - @DefaultValue("-1") @QueryParam("entityId") final int entityId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve all UGDs", notes = "Example Requests:\n" + "\n" + "templates\n" + "\n" + "It is also possible to get specific UGDs by entity and type:\n" + "\n" + "templates?type=0&entity=0\n" + "[Entity: Id]\n\n\n\n" + "\n\n" + "client: 0, loan: 1" + "\n\n" + "[Type: Id]\n\n\n\n" + "Document: 0, E-Mail (not yet): 1, SMS: 2" ) + @ApiResponses({@ApiResponse(code = 200, message = "", response = TemplatesApiResourcesSwagger.GetTemplatesResponse.class)}) + public String retrieveAll(@DefaultValue("-1") @QueryParam("typeId") @ApiParam(value = "typeId") final int typeId, + @DefaultValue("-1") @QueryParam("entityId") @ApiParam(value = "entityId") final int entityId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.RESOURCE_NAME_FOR_PERMISSION); @@ -119,6 +123,8 @@ public class TemplatesApiResource { @GET @Path("template") + @ApiOperation(value = "Retrieve UGD Details Template", notes = "This is a convenience resource. It can be useful when building maintenance user interface screens for UGDs. The UGD data returned consists of any or all of:\n" + "\n" + "ARGUMENTS\n" + "name String entity String type String text String optional mappers Mapper optional\n" + "Example Request:\n" + "\n" + "templates/template") + @ApiResponses({@ApiResponse(code = 200, message = "", response = TemplatesApiResourcesSwagger.GetTemplatesTemplateResponse.class)}) public String template(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.RESOURCE_NAME_FOR_PERMISSION); @@ -130,7 +136,10 @@ public class TemplatesApiResource { } @POST - public String createTemplate(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Add a UGD", notes = "Adds a new UGD.\n" + "\n" + "Mandatory Fields\n" + "name\n\n\n\n" + "Example Requests:\n" + "\n" + "templates/1") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = TemplatesApiResourcesSwagger.PostTemplatesRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = TemplatesApiResourcesSwagger.PostTemplatesResponse.class)}) + public String createTemplate(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createTemplate().withJson(apiRequestBodyAsJson).build(); final CommandProcessingResult result = this.commandsSourceWritePlatformService.logCommandSource(commandRequest); @@ -140,7 +149,9 @@ public class TemplatesApiResource { @GET @Path("{templateId}") - public String retrieveOne(@PathParam("templateId") final Long templateId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve a UGD", notes = "Example Requests:\n" + "\n" + "templates/1") + @ApiResponses({@ApiResponse(code = 200, message = "", response = TemplatesApiResourcesSwagger.GetTemplatesTemplateIdResponse.class)}) + public String retrieveOne(@PathParam("templateId") @ApiParam(value = "templateId") final Long templateId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.RESOURCE_NAME_FOR_PERMISSION); @@ -164,7 +175,10 @@ public class TemplatesApiResource { @PUT @Path("{templateId}") - public String saveTemplate(@PathParam("templateId") final Long templateId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update a UGD", notes = "") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = TemplatesApiResourcesSwagger.PutTemplatesTemplateIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = TemplatesApiResourcesSwagger.PutTemplatesTemplateIdResponse.class)}) + public String saveTemplate(@PathParam("templateId") @ApiParam(value = "templateId") final Long templateId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateTemplate(templateId).withJson(apiRequestBodyAsJson).build(); @@ -175,7 +189,9 @@ public class TemplatesApiResource { @DELETE @Path("{templateId}") - public String deleteTemplate(@PathParam("templateId") final Long templateId) { + @ApiOperation(value = "Delete a UGD", notes = "") + @ApiResponses({@ApiResponse(code = 200, message = "", response = TemplatesApiResourcesSwagger.DeleteTemplatesTemplateIdResponse.class)}) + public String deleteTemplate(@PathParam("templateId") @ApiParam(value = "templateId") final Long templateId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteTemplate(templateId).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/template/api/TemplatesApiResourcesSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/template/api/TemplatesApiResourcesSwagger.java new file mode 100644 index 000000000..419f5be01 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/template/api/TemplatesApiResourcesSwagger.java @@ -0,0 +1,159 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.template.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.apache.fineract.template.domain.TemplateMapper; + +import java.util.List; + +/** + * Created by sanyam on 21/8/17. + */ +final class TemplatesApiResourcesSwagger { + private TemplatesApiResourcesSwagger() { + + } + + @ApiModel(value = "GetTemplatesResponse") + public static final class GetTemplatesResponse { + private GetTemplatesResponse() { + + } + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "Text") + public String name; + @ApiModelProperty(example = "1") + public Long entity; + @ApiModelProperty(example = "0") + public Long type; + @ApiModelProperty(example = "This is a loan for {{loan.clientName}}") + public String text; + public List mappers; + + } + + @ApiModel(value = "GetTemplatesTemplateResponse") + public static final class GetTemplatesTemplateResponse { + private GetTemplatesTemplateResponse() { + + } + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "Text") + public String name; + @ApiModelProperty(example = "1") + public Long entity; + @ApiModelProperty(example = "0") + public Long type; + @ApiModelProperty(example = "This is a loan for {{loan.clientName}}") + public String text; + public List mappers; + + } + + @ApiModel(value = "PostTemplatesRequest") + public static final class PostTemplatesRequest { + private PostTemplatesRequest() { + + } + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "Text") + public String name; + @ApiModelProperty(example = "1") + public Long entity; + @ApiModelProperty(example = "0") + public Long type; + @ApiModelProperty(example = "This is a loan for {{loan.clientName}}") + public String text; + public List mappers; + + } + + @ApiModel(value = "PostTemplatesResponse") + public static final class PostTemplatesResponse { + private PostTemplatesResponse() { + + } + @ApiModelProperty(example = "1") + public Long resourceId; + + } + + @ApiModel(value = "GetTemplatesTemplateIdResponse") + public static final class GetTemplatesTemplateIdResponse { + private GetTemplatesTemplateIdResponse() { + + } + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "Text") + public String name; + @ApiModelProperty(example = "1") + public Long entity; + @ApiModelProperty(example = "0") + public Long type; + @ApiModelProperty(example = "This is a loan for {{loan.clientName}}") + public String text; + public List mappers; + + } + + @ApiModel(value = "PutTemplatesTemplateIdRequest") + public static final class PutTemplatesTemplateIdRequest { + private PutTemplatesTemplateIdRequest() { + + } + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "Text") + public String name; + @ApiModelProperty(example = "1") + public Long entity; + @ApiModelProperty(example = "0") + public Long type; + @ApiModelProperty(example = "This is a loan for {{loan.clientName}}") + public String text; + public List mappers; + + } + + @ApiModel(value = "PutTemplatesTemplateIdResponse") + public static final class PutTemplatesTemplateIdResponse { + private PutTemplatesTemplateIdResponse() { + + } + @ApiModelProperty(example = "1") + public Long resourceId; + + } + + @ApiModel(value = "DeleteTemplatesTemplateIdResponse") + public static final class DeleteTemplatesTemplateIdResponse { + private DeleteTemplatesTemplateIdResponse() { + + } + @ApiModelProperty(example = "1") + public Long resourceId; + + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/PasswordPreferencesApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/PasswordPreferencesApiResource.java index 75a173e3f..c0405d340 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/PasswordPreferencesApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/PasswordPreferencesApiResource.java @@ -29,6 +29,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -46,6 +47,7 @@ import org.springframework.stereotype.Component; @Path("/" + PasswordPreferencesApiConstants.RESOURCE_NAME) @Component @Scope("singleton") +@Api(value = "Password preferences", description = "This API enables management of password policy for user administration.\n" + "\n" + "There is no Apache Fineract functionality for creating a validation policy. The validation policies come pre-installed.\n" + "\n" + "Validation policies may be updated") public class PasswordPreferencesApiResource { private final PlatformSecurityContext context; @@ -70,6 +72,7 @@ public class PasswordPreferencesApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiResponses({@ApiResponse(code = 200, message = "", response = PasswordPreferencesApiResourceSwagger.GetPasswordPreferencesTemplateResponse.class)}) public String retrieve(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(PasswordPreferencesApiConstants.ENTITY_NAME); @@ -85,7 +88,10 @@ public class PasswordPreferencesApiResource { @PUT @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String update(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update password preferences", notes = "") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = PasswordPreferencesApiResourceSwagger.PutPasswordPreferencesTemplateRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "")}) + public String update(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // .updatePasswordPreferences() // @@ -101,6 +107,8 @@ public class PasswordPreferencesApiResource { @Path("/template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "List Application Password validation policies", notes = "ARGUMENTS\n" + "Example Requests:\n" + "\n" + "passwordpreferences") + @ApiResponses({@ApiResponse(code = 200, message = "", response = PasswordPreferencesApiResourceSwagger.GetPasswordPreferencesTemplateResponse.class, responseContainer = "List")}) public String template(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(PasswordPreferencesApiConstants.ENTITY_NAME); diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/PasswordPreferencesApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/PasswordPreferencesApiResourceSwagger.java new file mode 100644 index 000000000..f291d1e2a --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/PasswordPreferencesApiResourceSwagger.java @@ -0,0 +1,56 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.useradministration.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * Created by sanyam on 22/8/17. + */ +final class PasswordPreferencesApiResourceSwagger { + private PasswordPreferencesApiResourceSwagger() { + + } + + @ApiModel(value = "GetPasswordPreferencesTemplateResponse") + public static final class GetPasswordPreferencesTemplateResponse { + private GetPasswordPreferencesTemplateResponse() { + + } + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "Password must be at least 1 character and not more that 50 characters long") + public String description; + @ApiModelProperty(example = "true") + public boolean active; + @ApiModelProperty(example = "simple") + public String key; + } + + @ApiModel(value = "PutPasswordPreferencesTemplateRequest") + public static final class PutPasswordPreferencesTemplateRequest { + private PutPasswordPreferencesTemplateRequest() { + + } + @ApiModelProperty(example = "1") + public Long validationPolicyId; + } + +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/PermissionsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/PermissionsApiResource.java index d430caf2d..8b7502bcb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/PermissionsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/PermissionsApiResource.java @@ -32,6 +32,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -49,6 +50,7 @@ import org.springframework.stereotype.Component; @Path("/permissions") @Component @Scope("singleton") +@Api(value = "Permissions", description = "An API capability to support management of application permissions for user administration.\n" + "\n" + "There is no Apache Fineract functionality for creating or deleting permissions. Permissions come pre-installed.\n" + "\n" + "Permissions are not updated, except in the case of enabling or disabling non-read transactions for Maker Checker functionality") public class PermissionsApiResource { private final Set RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("grouping", "code", "entityName", "actionName", @@ -76,6 +78,8 @@ public class PermissionsApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "List Application Permissions", notes = "ARGUMENTS\n" + "makerCheckerableoptional, Values are true, false. Default is false.\n" + "If makerCheckerable=false or not supplied then a list of application permissions is returned. The \"selected\" attribute is always true in this case.\n" + "\n" + "If makerCheckerable=true then the \"selected\" attribute shows whether the permission is enabled for Maker Check functionality.\n" + "\n" + "Note: Each Apache Fineract transaction is associated with a permission.\n" + "\n" + "Example Requests:\n" + "\n" + "permissions\n" + "\n" + "\n" + "permissions?makerCheckerable=true\n" + "\n" + "\n" + "permissions?fields=grouping,code") + @ApiResponses({@ApiResponse(code = 200, message = "", response = PermissionsApiResourceSwagger.GetPermissionsResponse.class, responseContainer = "List")}) public String retrieveAllPermissions(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -95,7 +99,10 @@ public class PermissionsApiResource { @PUT @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String updatePermissionsDetails(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Enable/Disable Permissions for Maker Checker", notes = "") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = PermissionsApiResourceSwagger.PutPermissionsRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = CommandProcessingResult.class)}) + public String updatePermissionsDetails(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // .updatePermissions() // diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/PermissionsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/PermissionsApiResourceSwagger.java new file mode 100644 index 000000000..d42abfadf --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/PermissionsApiResourceSwagger.java @@ -0,0 +1,58 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.useradministration.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * Created by sanyam on 22/8/17. + */ +final class PermissionsApiResourceSwagger { + private PermissionsApiResourceSwagger() { + + } + + @ApiModel(value = "GetPermissionsResponse") + public static final class GetPermissionsResponse { + private GetPermissionsResponse() { + + } + @ApiModelProperty(example = "authorisation") + public String grouping; + @ApiModelProperty(example = "READ_PERMISSION") + public String code; + @ApiModelProperty(example = "PERMISSION") + public String entityName; + @ApiModelProperty(example = "READ") + public String actionName; + @ApiModelProperty(example = "true") + public Boolean selected; + } + + @ApiModel(value = "PutPermissionsRequest") + public static final class PutPermissionsRequest { + private PutPermissionsRequest() { + + } + @ApiModelProperty(example = "\"CREATE_GUARANTOR\":true,\n" + + " \"CREATE_CLIENT\":true") + public String permissions; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/RolesApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/RolesApiResource.java index 4da979d8e..34a0721d1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/RolesApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/RolesApiResource.java @@ -36,6 +36,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.commons.lang.StringUtils; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; @@ -57,6 +58,7 @@ import org.springframework.stereotype.Component; @Path("/roles") @Component @Scope("singleton") +@Api(value = "Roles", description = "An API capability to support management of application roles for user administration.") public class RolesApiResource { /** @@ -100,6 +102,8 @@ public class RolesApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "List Roles", notes = "Example Requests:\n" + "\n" + "roles\n" + "\n" + "\n" + "roles?fields=name") + @ApiResponses({@ApiResponse(code = 200, message = "", response = RolesApiResourceSwagger.GetRolesResponse.class, responseContainer = "List")}) public String retrieveAllRoles(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -113,7 +117,10 @@ public class RolesApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String createRole(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Create a New Role", notes = "Mandatory Fields\n" + "name, description") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = RolesApiResourceSwagger.PostRolesRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = RolesApiResourceSwagger.PostRolesResponse.class)}) + public String createRole(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // .createRole() // @@ -129,7 +136,9 @@ public class RolesApiResource { @Path("{roleId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveRole(@PathParam("roleId") final Long roleId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve a Role", notes = "Example Requests:\n" + "\n" + "roles/1\n" + "\n" + "\n" + "roles/1?fields=name") + @ApiResponses({@ApiResponse(code = 200, message = "", response = RolesApiResourceSwagger.GetRolesRoleIdResponse.class)}) + public String retrieveRole(@PathParam("roleId") @ApiParam(value = "roleId") final Long roleId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -152,8 +161,11 @@ public class RolesApiResource { @Path("{roleId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String actionsOnRoles(@PathParam("roleId") final Long roleId, @QueryParam("command") final String commandParam, - final String apiRequestBodyAsJson) { + @ApiOperation(value = "Enable Role | Disable Role", notes = "Description : Enable role in case role is disabled. | Disable the role in case role is not associated with any users.\n\n\n\n" + "\n\n" + "Example Request: https://DomainName/api/v1/roles/{roleId}?command=enable" + "\n\n\n\n" + "\n\n" + "https://DomainName/api/v1/roles/{roleId}?command=disable") + @ApiImplicitParams({@ApiImplicitParam(value = "No Request Body", name = "No Request Body")}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = RolesApiResourceSwagger.PostRolesRoleIdResponse.class)}) + public String actionsOnRoles(@PathParam("roleId") @ApiParam(value = "roleId") final Long roleId, @QueryParam("command") @ApiParam(value = "command") final String commandParam, + @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapperBuilder builder = new CommandWrapperBuilder().withJson(apiRequestBodyAsJson); @@ -173,7 +185,10 @@ public class RolesApiResource { @Path("{roleId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String updateRole(@PathParam("roleId") final Long roleId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update a Role", notes = "") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = RolesApiResourceSwagger.PutRolesRoleIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = RolesApiResourceSwagger.PutRolesRoleIdResponse.class)}) + public String updateRole(@PathParam("roleId") @ApiParam(value = "roleId") final Long roleId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // .updateRole(roleId) // @@ -189,7 +204,9 @@ public class RolesApiResource { @Path("{roleId}/permissions") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveRolePermissions(@PathParam("roleId") final Long roleId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve a Role's Permissions", notes = "Example Requests:\n" + "\n" + "roles/1/permissions") + @ApiResponses({@ApiResponse(code = 200, message = "", response = RolesApiResourceSwagger.GetRolesRoleIdPermissionsResponse.class)}) + public String retrieveRolePermissions(@PathParam("roleId") @ApiParam(value = "roleId") final Long roleId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -205,7 +222,10 @@ public class RolesApiResource { @Path("{roleId}/permissions") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String updateRolePermissions(@PathParam("roleId") final Long roleId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update a Role's Permissions", notes = "") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = RolesApiResourceSwagger.PutRolesRoleIdPermissionsRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = RolesApiResourceSwagger.PutRolesRoleIdPermissionsResponse.class)}) + public String updateRolePermissions(@PathParam("roleId") @ApiParam(value = "roleId") final Long roleId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // .updateRolePermissions(roleId) // @@ -227,7 +247,9 @@ public class RolesApiResource { @Path("{roleId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String deleteRole(@PathParam("roleId") final Long roleId) { + @ApiOperation(value = "Delete a Role", notes = "Description : Delete the role in case role is not associated with any users.") + @ApiResponses({@ApiResponse(code = 200, message = "", response = RolesApiResourceSwagger.DeleteRolesRoleIdResponse.class)}) + public String deleteRole(@PathParam("roleId") @ApiParam(value = "roleId") final Long roleId) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // .deleteRole(roleId) // diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/RolesApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/RolesApiResourceSwagger.java new file mode 100644 index 000000000..5393df30d --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/RolesApiResourceSwagger.java @@ -0,0 +1,197 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.useradministration.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.Collection; + +/** + * Created by sanyam on 23/8/17. + */ +final class RolesApiResourceSwagger { + private RolesApiResourceSwagger() { + + } + + @ApiModel(value = "GetRolesResponse") + public static final class GetRolesResponse { + private GetRolesResponse() { + + } + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "Super Users") + public String name; + @ApiModelProperty(example = "This role provides all application permissions.") + public String description; + + } + + @ApiModel(value = "GetRolesRoleIdResponse") + public static final class GetRolesRoleIdResponse { + private GetRolesRoleIdResponse() { + + } + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "Super Users") + public String name; + @ApiModelProperty(example = "This role provides all application permissions.") + public String description; + + } + + @ApiModel(value = "PostRolesRequest") + public static final class PostRolesRequest { + private PostRolesRequest() { + + } + @ApiModelProperty(example = "Another Role Name") + public String name; + @ApiModelProperty(example = "A description outlining the purpose of this role in relation to the application.") + public String description; + + } + + @ApiModel(value = "PostRolesResponse") + public static final class PostRolesResponse { + private PostRolesResponse() { + + } + @ApiModelProperty(example = "1") + public Long resourceId; + + } + + @ApiModel(value = "PutRolesRoleIdRequest") + public static final class PutRolesRoleIdRequest { + private PutRolesRoleIdRequest() { + + } + @ApiModelProperty(example = "some description(changed)") + public String description; + + } + + @ApiModel(value = "PutRolesRoleIdResponse") + public static final class PutRolesRoleIdResponse { + private PutRolesRoleIdResponse() { + + } + final class PutRolesRoleIdResponseChanges { + private PutRolesRoleIdResponseChanges(){} + @ApiModelProperty(example = "some description(changed)") + public String description; + } + @ApiModelProperty(example = "1") + public Long resourceId; + public PutRolesRoleIdResponseChanges changes; + + } + + @ApiModel(value = "PostRolesRoleIdResponse") + public static final class PostRolesRoleIdResponse { + private PostRolesRoleIdResponse() { + + } + @ApiModelProperty(example = "1") + public Long resourceId; + + } + + @ApiModel(value = "GetRolesRoleIdPermissionsResponse") + public static final class GetRolesRoleIdPermissionsResponse { + private GetRolesRoleIdPermissionsResponse() { + + } + + final class GetRolesRoleIdPermissionsResponsePermissionData { + private GetRolesRoleIdPermissionsResponsePermissionData() { + + } + @ApiModelProperty(example = "authorisation") + public String grouping; + @ApiModelProperty(example = "READ_PERMISSION") + public String code; + @ApiModelProperty(example = "PERMISSION") + public String entityName; + @ApiModelProperty(example = "READ") + public String actionName; + @ApiModelProperty(example = "false") + public Boolean selected; + } + + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "Super Users") + public String name; + @ApiModelProperty(example = "This role provides all application permissions.") + public String description; + public Collection permissionUsageData; + + } + + @ApiModel(value = "PutRolesRoleIdPermissionsRequest") + public static final class PutRolesRoleIdPermissionsRequest { + private PutRolesRoleIdPermissionsRequest() { + + } + + final class PostRolesRoleIdPermissionsResponsePermissions { + private PostRolesRoleIdPermissionsResponsePermissions() { + + } + @ApiModelProperty(example = "true") + public String ALL_FUNCTIONS_READ; + } + public PostRolesRoleIdPermissionsResponsePermissions permissions; + + } + + @ApiModel(value = "PutRolesRoleIdPermissionsResponse") + public static final class PutRolesRoleIdPermissionsResponse { + private PutRolesRoleIdPermissionsResponse() { + + } + + final class PostRolesRoleIdPermissionsResponsePermissions { + private PostRolesRoleIdPermissionsResponsePermissions() { + + } + @ApiModelProperty(example = "true") + public String ALL_FUNCTIONS_READ; + } + + @ApiModelProperty(example = "8") + public Long resourceId; + public PostRolesRoleIdPermissionsResponsePermissions permissions; + + } + + @ApiModel(value = "DeleteRolesRoleIdResponse") + public static final class DeleteRolesRoleIdResponse { + private DeleteRolesRoleIdResponse() { + + } + @ApiModelProperty(example = "1") + public Long resourceId; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/UsersApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/UsersApiResource.java index 481284a21..47c4c0c72 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/UsersApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/UsersApiResource.java @@ -35,6 +35,7 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.UriInfo; +import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -46,6 +47,7 @@ import org.apache.fineract.infrastructure.security.service.PlatformSecurityConte import org.apache.fineract.organisation.office.data.OfficeData; import org.apache.fineract.organisation.office.service.OfficeReadPlatformService; import org.apache.fineract.useradministration.data.AppUserData; +import org.apache.fineract.useradministration.domain.AppUser; import org.apache.fineract.useradministration.service.AppUserReadPlatformService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; @@ -56,6 +58,7 @@ import org.springframework.stereotype.Component; @Produces({ MediaType.APPLICATION_JSON }) @Component @Scope("singleton") +@Api(value = "Users", description = "An API capability to support administration of application users.") public class UsersApiResource { /** @@ -88,6 +91,8 @@ public class UsersApiResource { } @GET + @ApiOperation(value = "Retrieve list of users", notes = "Example Requests:\n" + "\n" + "users\n" + "\n" + "\n" + "users?fields=id,username,email,officeName") + @ApiResponses({@ApiResponse(code = 200, message = "", response = UsersApiResourceSwagger.GetUsersResponse.class, responseContainer = "List")}) public String retrieveAll(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -100,7 +105,9 @@ public class UsersApiResource { @GET @Path("{userId}") - public String retrieveOne(@PathParam("userId") final Long userId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve a User", notes = "Example Requests:\n" + "\n" + "users/1\n" + "\n" + "\n" + "users/1?template=true\n" + "\n" + "\n" + "users/1?fields=username,officeName") + @ApiResponses({@ApiResponse(code = 200, message = "", response = UsersApiResourceSwagger.GetUsersUserIdResponse.class)}) + public String retrieveOne(@PathParam("userId") @ApiParam(value = "userId") final Long userId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions, userId); @@ -117,6 +124,8 @@ public class UsersApiResource { @GET @Path("template") + @ApiOperation(value = "Retrieve User Details Template", notes = "This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n" + "\n" + "Field Defaults\n" + "Allowed Value Lists\n" + "Example Request:\n" + "\n" + "users/template") + @ApiResponses({@ApiResponse(code = 200, message = "", response = UsersApiResourceSwagger.GetUsersTemplateResponse.class)}) public String template(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -128,7 +137,10 @@ public class UsersApiResource { } @POST - public String create(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Create a User", notes = "Adds new application user.\n" + "\n" + "Note: Password information is not required (or processed). Password details at present are auto-generated and then sent to the email account given (which is why it can take a few seconds to complete).\n" + "\n" + "Mandatory Fields: \n" + "username, firstname, lastname, email, officeId, roles, sendPasswordToEmail\n" + "\n" + "Optional Fields: \n" + "staffId,passwordNeverExpires,isSelfServiceUser,clients") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = UsersApiResourceSwagger.PostUsersRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = UsersApiResourceSwagger.PostUsersResponse.class)}) + public String create(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // .createUser() // @@ -142,7 +154,10 @@ public class UsersApiResource { @PUT @Path("{userId}") - public String update(@PathParam("userId") final Long userId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update a User", notes = "When updating a password you must provide the repeatPassword parameter also.") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = UsersApiResourceSwagger.PutUsersUserIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = UsersApiResourceSwagger.PutUsersUserIdResponse.class)}) + public String update(@PathParam("userId") @ApiParam(value = "userId") final Long userId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // .updateUser(userId) // @@ -156,7 +171,9 @@ public class UsersApiResource { @DELETE @Path("{userId}") - public String delete(@PathParam("userId") final Long userId) { + @ApiOperation(value = "Delete a User", notes = "Removes the user and the associated roles and permissions.") + @ApiResponses({@ApiResponse(code = 200, message = "", response = UsersApiResourceSwagger.DeleteUsersUserIdResponse.class)}) + public String delete(@PathParam("userId") @ApiParam(value = "userId") final Long userId) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // .deleteUser(userId) // diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/UsersApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/UsersApiResourceSwagger.java new file mode 100644 index 000000000..a3725ff32 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/UsersApiResourceSwagger.java @@ -0,0 +1,186 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.useradministration.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.apache.fineract.organisation.office.data.OfficeData; +import org.apache.fineract.organisation.staff.data.StaffData; +import org.apache.fineract.useradministration.data.RoleData; + +import java.util.Collection; + +/** + * Created by sanyam on 23/8/17. + */ +final class UsersApiResourceSwagger { + private UsersApiResourceSwagger() { + + } + + @ApiModel(value = "GetUsersResponse") + public static final class GetUsersResponse { + private GetUsersResponse() { + + } + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "mifos") + public String username; + @ApiModelProperty(example = "1") + public Long officeId; + @ApiModelProperty(example = "Head Office") + public String officeName; + @ApiModelProperty(example = "App") + public String firstname; + @ApiModelProperty(example = "Administrator") + public String lastname; + @ApiModelProperty(example = "demomfi@mifos.org") + public String email; + @ApiModelProperty(example = "false") + public Boolean passwordNeverExpires; + public StaffData staff; + public Collection selectedRoles; + + } + + @ApiModel(value = "GetUsersUserIdResponse") + public static final class GetUsersUserIdResponse { + private GetUsersUserIdResponse() { + + } + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "mifos") + public String username; + @ApiModelProperty(example = "1") + public Long officeId; + @ApiModelProperty(example = "Head Office") + public String officeName; + @ApiModelProperty(example = "App") + public String firstname; + @ApiModelProperty(example = "Administrator") + public String lastname; + @ApiModelProperty(example = "demomfi@mifos.org") + public String email; + @ApiModelProperty(example = "false") + public Boolean passwordNeverExpires; + public StaffData staff; + public Collection availableRoles;; + public Collection selectedRoles; + + } + + @ApiModel(value = "GetUsersTemplateResponse") + public static final class GetUsersTemplateResponse { + private GetUsersTemplateResponse() { + + } + public Collection allowedOffices; + public Collection availableRoles; + } + + @ApiModel(value = "PostUsersRequest") + public static final class PostUsersRequest { + private PostUsersRequest() { + + } + @ApiModelProperty(example = "newuser") + public String username; + @ApiModelProperty(example = "Test") + public String firstname; + @ApiModelProperty(example = "User") + public String lastname; + @ApiModelProperty(example = "whatever@mifos.org") + public String email; + @ApiModelProperty(example = "1") + public Long officeId; + @ApiModelProperty(example = "1") + public Long staffId; + @ApiModelProperty(example = "[2,3]") + public String Roles; + @ApiModelProperty(example = "true") + public Boolean sendPasswordToEmail; + @ApiModelProperty(example = "true") + public Boolean isSelfServiceUser; + } + + @ApiModel(value = "PostUsersResponse") + public static final class PostUsersResponse { + private PostUsersResponse() { + + } + @ApiModelProperty(example = "1") + public Long officeId; + @ApiModelProperty(example = "11") + public Long resourceId; + } + + @ApiModel(value = "PutUsersUserIdRequest") + public static final class PutUsersUserIdRequest { + private PutUsersUserIdRequest() { + + } + @ApiModelProperty(example = "Test") + public String firstname; + @ApiModelProperty(example = "window75") + public String password; + @ApiModelProperty(example = "window75") + public String repeatPassword; + } + + @ApiModel(value = "PutUsersUserIdResponse") + public static final class PutUsersUserIdResponse { + private PutUsersUserIdResponse() { + + } + final class PutUsersUserIdResponseChanges { + private PutUsersUserIdResponseChanges() { + + } + @ApiModelProperty(example = "Test") + public String firstname; + @ApiModelProperty(example = "abc3326b1bb376351c7baeb4175f5e0504e33aadf6a158474a6d71de1befae51") + public String passwordEncoded; + } + @ApiModelProperty(example = "1") + public Long officeId; + @ApiModelProperty(example = "11") + public Long resourceId; + public PutUsersUserIdResponseChanges changes; + } + + @ApiModel(value = "DeleteUsersUserIdResponse") + public static final class DeleteUsersUserIdResponse { + private DeleteUsersUserIdResponse() { + + } + final class DeleteUsersUserIdResponseChanges { + private DeleteUsersUserIdResponseChanges() { + + } + } + @ApiModelProperty(example = "1") + public Long officeId; + @ApiModelProperty(example = "11") + public Long resourceId; + public DeleteUsersUserIdResponseChanges changes; + } + +} diff --git a/fineract-provider/src/main/resources/META-INF/spring/appContext.xml b/fineract-provider/src/main/resources/META-INF/spring/appContext.xml index e348d8aef..ce8364c8f 100644 --- a/fineract-provider/src/main/resources/META-INF/spring/appContext.xml +++ b/fineract-provider/src/main/resources/META-INF/spring/appContext.xml @@ -99,5 +99,8 @@ + + + diff --git a/fineract-provider/src/main/resources/META-INF/spring/swagger.xml b/fineract-provider/src/main/resources/META-INF/spring/swagger.xml new file mode 100644 index 000000000..aea5b223a --- /dev/null +++ b/fineract-provider/src/main/resources/META-INF/spring/swagger.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fineract-provider/src/main/resources/swagger-ui/favicon-16x16.png b/fineract-provider/src/main/resources/swagger-ui/favicon-16x16.png new file mode 100644 index 0000000000000000000000000000000000000000..0f7e13b0d9903d27a9129950b1dad362361504e4 GIT binary patch literal 445 zcmV;u0Yd(XP)rNm2=6wQ7&2F}_`h_PI>(9Fx!5<0%l6W{u0OQ#*rglqx3__&vD?|#%fhn*Mn&YY1i+JQHqPvZ34FR@_E%P@x zzTL;Bw#nJXWY}D7^bC>-bx{t|^|R6Oci&MKvov8Op~S=}R=h^p-=vZ0uqG@LE6tP7 n92{cY$^db6>&z__iT?Z#Z8BG|DVcT0DjiaEd>Z!7_`J}8! zKk_$1lGm$vJOY&DjT-(&VGn0;R`iN9=1aOuG`H}BlY>&R3KbGER zB2$7euhH;y1C_LTQex%L6khZpkjFn!ajOUK)f3JLz+I;CE@(N)T)CM4AWjfl-(04= zrsMQ)#NG6nr^Y7!6LA;iHXh?UOFE%hhy>7dl=;I$J>g0BH_r|_4ctEsXx z2sDIQnwa*rcK=*3XUC$D{I@}DTNs@GCb7dB2%%nV%jR){xktt;Ah09op7x@l5D6B2 z0uBdt0YmcN!o?lMpu9Io(1&B1s{TUu*a>2&>Iycx__fbDRM8PYtLt+#G*xSt(cn}K zt!~W2{`9r)xkh^xodLS&FbYw`x$t&Vhl?)#f&k-lZIs<`$gTj{^#^HewuJz(WnUZZ z{Ty_aE;^93bhc-^^k6ZM!^e~$q5!Zz`XPta{a@651gPzaFx$&%IHL6hx$mSeAa#n6 zLkyc-M zs$qhBZhCNE^aIEV)H_~^IeqSRnvo!21Qc`Z;S9!IqXl4K(RUImejotzuG65LVuGS# zcqp@OA8~ln^4c^VihUew)IOX^E9KMtvSvnZ| zC@rl{f(B*PA26aFR`|X!!I(7x_|kq{rlqwhCia+CfNbOg_yYt0bDCc4g#h#`3jpCd zNAhr%4#Ye{i>ni$fzY%r0IS%l3HHZ4tTjOi=JW-t_iG~)oC!2C!52Cc|TAPaH zJ}l%m9yPmA-4#lJea@uf$a`(1;={rL2f*8;7%icbF}e^_`X#ndU=SI0nIn8hXPXHS zSN4rbF}jl0HWx(_`q`-SRa9jP8Ab!}sThNkQ634k=qXBVM4`o{M>qrLJD ze*%D)S;wpxG$d%FcDf-6%zMqWA+gw!C1~T5+|ys$G3Ksm&x59Lyd?0l+LWSk6hc4~ z+yC>|4f;X3#cq3!)>#Mvb-^co7LMrzqWeKB$21I>tJgaGFwu6eB%&j?@d*8GAx~In zI1p-lXVKtcvY7;$TX~wjYw|QhB%q!npQES%F~%Aqz~pJB%rNu!xAj;>xZt75!VHju zfFy%B-`3;Qf<{h94~I62zcHv}D5pS-QCN`M8K1>jN9mpbrFk=5no8j!00000NkvXX Hu0mjfOavUK literal 0 HcmV?d00001 diff --git a/fineract-provider/src/main/resources/swagger-ui/index.html b/fineract-provider/src/main/resources/swagger-ui/index.html new file mode 100644 index 000000000..fc21c7d35 --- /dev/null +++ b/fineract-provider/src/main/resources/swagger-ui/index.html @@ -0,0 +1,95 @@ + + + + + + Swagger UI + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + diff --git a/fineract-provider/src/main/resources/swagger-ui/oauth2-redirect.html b/fineract-provider/src/main/resources/swagger-ui/oauth2-redirect.html new file mode 100644 index 000000000..00c7f0144 --- /dev/null +++ b/fineract-provider/src/main/resources/swagger-ui/oauth2-redirect.html @@ -0,0 +1,53 @@ + + + + + + diff --git a/fineract-provider/src/main/resources/swagger-ui/response.json b/fineract-provider/src/main/resources/swagger-ui/response.json new file mode 100644 index 000000000..a3237bf2d --- /dev/null +++ b/fineract-provider/src/main/resources/swagger-ui/response.json @@ -0,0 +1 @@ +{"swagger":"2.0","info":{"description":"Apache Fineract is a secure, multi-tenanted microfinance platform.
The goal of the Apache Fineract API is to empower developers to build apps on top of the Apache Fineract Platform. The reference app [ https://demo.openmf.org ] (username: mifos, password: password) works on the same demo tenant as the interactive links in this documentation.
The API is organized around REST [ https://en.wikipedia.org/wiki/Representational_state_transfer ]
Find out more about Apache Fineract on [ https://demo.openmf.org/api-docs/apiLive.htm#top ]
You can Try The API From Your Browser itself at [ https://demo.openmf.org/api-docs/apiLive.htm#interact ]
The Generic Options are available at [ https://demo.openmf.org/api-docs/apiLive.htm#genopts ]
Find out more about Updating Dates and Numbers at [ https://demo.openmf.org/api-docs/apiLive.htm#dates_and_numbers ]
For the Authentication and the Basic of HTTP and HTTPS refer [ https://demo.openmf.org/api-docs/apiLive.htm#authentication_overview ]
Check about ERROR codes at [ https://demo.openmf.org/api-docs/apiLive.htm#errors ]

Please refer to the old documentation for any documentation queries [ https://demo.openmf.org/api-docs/apiLive.htm ]
______________________________________________________________________________________________________________________________ ","version":"1.0.0","title":"Apache Fineract API Documentation","termsOfService":"https://demo.openmf.org/api-docs/apiLive.htm","contact":{"name":"https://gitter.im/openMF/mifos"}},"host":"https://demo.openmf.org","basePath":"/fineract-provider/api/v1","tags":[{"name":"Periodic Accrual Accounting"},{"name":"Accounting Closure"},{"name":"Mapping Financial Activities to Accounts"},{"name":"General Ledger Account"},{"name":"Journal Entries"},{"name":"Provisioning Entries"},{"name":"Accounting Rules"},{"name":"Batch API"},{"name":"Audits"},{"name":"Maker Checker (or 4-eye) functionality"},{"name":"Account number format"},{"name":"Cache"},{"name":"SMS Campaigns"},{"name":"Code Values"},{"name":"Codes"},{"name":"External Services"},{"name":"Global Configuration"},{"name":"CreditBureau Configuration"},{"name":"Data Tables"},{"name":"Entity-Datatable Checks"},{"name":"Reports"},{"name":"Run Reports"},{"name":"Documents"},{"name":"DomainNameapiv1{entity}{entityId}images"},{"name":"DomainNameapiv1entitytoentitymapping"},{"name":"Hooks"},{"name":"Scheduler"},{"name":"MIFOSX-BATCH JOBS"},{"name":"Report Mailing Jobs"},{"name":"List Report Mailing Job History"},{"name":"Authentication HTTP Basic"},{"name":"Fetch authenticated user details"},{"name":"SMS"},{"name":"Likelihood"},{"name":"Poverty Line"},{"name":"Survey"},{"name":"Mix Report"},{"name":"Mix Taxonomy"},{"name":"Mix Mapping"},{"name":"Holidays"},{"name":"Currency"},{"name":"officetransactions"},{"name":"Offices"},{"name":"Provisioning Category"},{"name":"Provisioning Criteria"},{"name":"Staff"},{"name":"cashiers"},{"name":"Teller Cash Management"},{"name":"cashiersjournal"},{"name":"Working days"},{"name":"Clients Address"},{"name":"Client Charges"},{"name":"Client Identifier Api"},{"name":"Client Transaction"},{"name":"Client Api"},{"name":"SPM API - LookUp Table"},{"name":"SPM - Scorecards"},{"name":"SPM - Serveys"},{"name":"User Generated Documents"},{"name":"Password preferences"},{"name":"Permissions"},{"name":"Roles"},{"name":"Users"}],"schemes":["https"],"paths":{"/runaccruals":{"post":{"tags":["Periodic Accrual Accounting"],"summary":"Executes Periodic Accrual Accounting","description":"Mandatory Fields\n\ntillDate\n","operationId":"executePeriodicAccrualAccounting","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"Request Body\n\nField Descriptions: \ntillDate: \nwhich specifies periodic accruals should happen till the given Date","required":true,"schema":{"$ref":"#/definitions/runaccrualsRequest"}}],"responses":{"200":{"description":"OK"}}}},"/glclosures":{"get":{"tags":["Accounting Closure"],"summary":"List Accounting closures","description":"Example Requests:\n\nglclosures","operationId":"retrieveAllClosures","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"officeId","in":"query","description":"officeId","required":false,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetGLClosureResponse"}}}}},"post":{"tags":["Accounting Closure"],"summary":"Create an Accounting Closure","description":"Mandatory Fields\nofficeId,closingDate","operationId":"createGLClosure","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"Request Body","required":true,"schema":{"$ref":"#/definitions/PostGLCLosuresRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostGlClosuresResponse"}}}}},"/glclosures/{glClosureId}":{"get":{"tags":["Accounting Closure"],"summary":"Retrieve an Accounting Closure","description":"Example Requests:\n\nglclosures/1\n\n\n/glclosures/1?fields=officeName,closingDate","operationId":"retreiveClosure","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"glClosureId","in":"path","description":"glClosureId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetGLClosureResponse"}}}},"put":{"tags":["Accounting Closure"],"summary":"Update an Accounting closure","description":"Once an accounting closure is created, only the comments associated with it may be edited","operationId":"updateGLClosure","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"glClosureId","in":"path","description":"glClosureId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"Request body","required":true,"schema":{"$ref":"#/definitions/PutGlClosuresRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutGlClosuresResponse"}}}},"delete":{"tags":["Accounting Closure"],"summary":"Delete an accounting closure","description":"Note: Only the latest accounting closure associated with a branch may be deleted.","operationId":"deleteGLClosure","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"glClosureId","in":"path","description":"glclosureId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteGlClosuresResponse"}}}}},"/financialactivityaccounts":{"get":{"tags":["Mapping Financial Activities to Accounts"],"summary":"List Financial Activities to Accounts Mappings","description":"Example Requests:\n\nfinancialactivityaccounts","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetFinancialActivityAccountsResponse"}}}}},"post":{"tags":["Mapping Financial Activities to Accounts"],"summary":"Create a new Financial Activity to Accounts Mapping","description":"Mandatory Fields\nfinancialActivityId, glAccountId","operationId":"createGLAccount","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"Request body","required":false,"schema":{"$ref":"#/definitions/PostFinancialActivityAccountsRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostFinancialActivityAccountsResponse"}}}}},"/financialactivityaccounts/{mappingId}":{"get":{"tags":["Mapping Financial Activities to Accounts"],"summary":"Retrieve a Financial Activity to Account Mapping\n","description":"Example Requests:\n\nfinancialactivityaccounts/1","operationId":"retreive","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"mappingId","in":"path","description":"mappingId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetFinancialActivityAccountsResponse"}}}},"put":{"tags":["Mapping Financial Activities to Accounts"],"summary":"Update a Financial Activity to Account Mapping","description":"the API updates the Ledger account linked to a Financial Activity \n","operationId":"updateGLAccount","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"mappingId","in":"path","description":"mappingId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"Request body","required":false,"schema":{"$ref":"#/definitions/PostFinancialActivityAccountsRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutFinancialActivityAccountsResponse"}}}},"delete":{"tags":["Mapping Financial Activities to Accounts"],"summary":"Delete a Financial Activity to Account Mapping","description":"","operationId":"deleteGLAccount","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"mappingId","in":"path","description":"mappingId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/DeleteFinancialActivityAccountsResponse"}}}}},"/financialactivityaccounts/template":{"get":{"tags":["Mapping Financial Activities to Accounts"],"operationId":"retrieveTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/glaccounts/template":{"get":{"tags":["General Ledger Account"],"summary":"Retrieve GL Accounts Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\nExample Request:\n\nglaccounts/template\nglaccounts/template?type=1\n\ntype is optional and integer value from 1 to 5.\n\n1.Assets \n2.Liabilities \n3.Equity \n4.Income \n5.Expenses","operationId":"retrieveNewAccountDetails","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"type","in":"query","description":"type","required":false,"type":"integer","format":"int32"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetGLAccountsTemplateResponse"}}}}},"/glaccounts":{"get":{"tags":["General Ledger Account"],"summary":"List General Ledger Accounts","description":"ARGUMENTS\ntype Integer optional manualEntriesAllowed boolean optional usage Integer optional disabled boolean optional parentId Long optional tagId Long optional\nExample Requests:\n\nglaccounts\n\n\nglaccounts?type=1&manualEntriesAllowed=true&usage=1&disabled=false\n\nglaccounts?fetchRunningBalance=true","operationId":"retrieveAllAccounts","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"type","in":"query","description":"type","required":false,"type":"integer","format":"int32"},{"name":"searchParam","in":"query","description":"searchParam","required":false,"type":"string"},{"name":"usage","in":"query","description":"usage","required":false,"type":"integer","format":"int32"},{"name":"manualEntriesAllowed","in":"query","description":"manualEntriesAllowed","required":false,"type":"boolean"},{"name":"disabled","in":"query","description":"disabled","required":false,"type":"boolean"},{"name":"fetchRunningBalance","in":"query","description":"fetchRunningBalance","required":false,"type":"boolean"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetGLAccountsResponse"}}}}},"post":{"tags":["General Ledger Account"],"summary":"Create a General Ledger Account","description":"Note: You may optionally create Hierarchical Chart of Accounts by using the \"parentId\" property of an Account\nMandatory Fields: \nname, glCode, type, usage and manualEntriesAllowed","operationId":"createGLAccount","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":false,"schema":{"$ref":"#/definitions/PostGLAccountsRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostGLAccountsResponse"}}}}},"/glaccounts/{glAccountId}":{"get":{"tags":["General Ledger Account"],"summary":"Retrieve a General Ledger Account","description":"Example Requests:\n\nglaccounts/1\n\n\nglaccounts/1?template=true\n\n\nglaccounts/1?fields=name,glCode\n\n\nglaccounts/1?fetchRunningBalance=true","operationId":"retreiveAccount","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"glAccountId","in":"path","description":"glAccountId","required":true,"type":"integer","format":"int64"},{"name":"fetchRunningBalance","in":"query","description":"fetchRunningBalance","required":false,"type":"boolean"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetGLAccountsResponse"}}}},"put":{"tags":["General Ledger Account"],"summary":"Update an Accounting closure","description":"Once an accounting closure is created, only the comments associated with it may be edited\n\n","operationId":"updateGLAccount","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"glAccountId","in":"path","description":"glAccountId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":false,"schema":{"$ref":"#/definitions/PutGLAccountsRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutGLAccountsResponse"}}}},"delete":{"tags":["General Ledger Account"],"summary":"Delete an accounting closure","description":"Note: Only the latest accounting closure associated with a branch may be deleted.","operationId":"deleteGLAccount","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"glAccountId","in":"path","description":"glAccountId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteGLAccountsRequest"}}}}},"/journalentries/{journalEntryId}":{"get":{"tags":["Journal Entries"],"summary":"Retrieve a single Entry","description":"Example Requests:\n\njournalentries/1\n\n\n\njournalentries/1?fields=officeName,glAccountId,entryType,amount\n\njournalentries/1?runningBalance=true\n\njournalentries/1?transactionDetails=true","operationId":"retreiveJournalEntryById","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"journalEntryId","in":"path","description":"journalEntryId","required":true,"type":"integer","format":"int64"},{"name":"runningBalance","in":"query","description":"runningBalance","required":false,"type":"boolean"},{"name":"transactionDetails","in":"query","description":"transactionDetails","required":false,"type":"boolean"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/JournalEntryData"}}}}},"/journalentries":{"get":{"tags":["Journal Entries"],"summary":"List Journal Entries","description":"The list capability of journal entries can support pagination and sorting.\n\nExample Requests:\n\njournalentries\n\njournalentries?transactionId=PB37X8Y21EQUY4S\n\njournalentries?officeId=1&manualEntriesOnly=true&fromDate=1 July 2013&toDate=15 July 2013&dateFormat=dd MMMM yyyy&locale=en\n\njournalentries?fields=officeName,glAccountName,transactionDate\n\njournalentries?offset=10&limit=50\n\njournalentries?orderBy=transactionId&sortOrder=DESC\n\njournalentries?runningBalance=true\n\njournalentries?transactionDetails=true\n\njournalentries?loanId=12\n\njournalentries?savingsId=24","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"officeId","in":"query","description":"officeId","required":false,"type":"integer","format":"int64"},{"name":"glAccountId","in":"query","description":"glAccountId","required":false,"type":"integer","format":"int64"},{"name":"manualEntriesOnly","in":"query","description":"manualEntriesOnly","required":false,"type":"boolean"},{"name":"fromDate","in":"query","description":"fromDate","required":false,"type":"string"},{"name":"toDate","in":"query","description":"toDate","required":false,"type":"string"},{"name":"transactionId","in":"query","description":"transactionId","required":false,"type":"string"},{"name":"entityType","in":"query","description":"entityType","required":false,"type":"integer","format":"int32"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","description":"orderBy","required":false,"type":"string"},{"name":"sortOrder","in":"query","description":"sortOrder","required":false,"type":"string"},{"name":"locale","in":"query","description":"locale","required":false,"type":"string"},{"name":"dateFormat","in":"query","description":"dateFormat","required":false,"type":"string"},{"name":"loanId","in":"query","description":"loanId","required":false,"type":"integer","format":"int64"},{"name":"savingsId","in":"query","description":"savingsId","required":false,"type":"integer","format":"int64"},{"name":"runningBalance","in":"query","description":"runningBalance","required":false,"type":"boolean"},{"name":"transactionDetails","in":"query","description":"transactionDetails","required":false,"type":"boolean"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/JournalEntryData"}}}}},"post":{"tags":["Journal Entries"],"summary":"Create \"Balanced\" Journal Entries","description":"Note: A Balanced (simple) Journal entry would have atleast one \"Debit\" and one \"Credit\" entry whose amounts are equal \nCompound Journal entries may have \"n\" debits and \"m\" credits where both \"m\" and \"n\" are greater than 0 and the net sum or all debits and credits are equal \n\n\nMandatory Fields\nofficeId, transactionDate\n\n\ncredits- glAccountId, amount, comments\n\n \ndebits- glAccountId, amount, comments\n\n \nOptional Fields\npaymentTypeId, accountNumber, checkNumber, routingCode, receiptNumber, bankNumber","operationId":"createGLJournalEntry","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"command","in":"query","description":"command","required":false,"type":"string"},{"in":"body","name":"body","description":"body","required":false,"schema":{"$ref":"#/definitions/JournalEntryCommand"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostJournalEntriesResponse"}}}}},"/journalentries/{transactionId}":{"post":{"tags":["Journal Entries"],"summary":"Update Running balances for Journal Entries","description":"This API calculates the running balances for office. If office ID not provided this API calculates running balances for all offices. \nMandatory Fields\nofficeId","operationId":"createReversalJournalEntry","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"transactionId","in":"path","description":"transactionId","required":true,"type":"string"},{"name":"command","in":"query","description":"command","required":false,"type":"string"},{"in":"body","name":"body","description":"body","required":false,"schema":{"$ref":"#/definitions/PostJournalEntriesTransactionIdRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostJournalEntriesTransactionIdResponse"}}}}},"/journalentries/provisioning":{"get":{"tags":["Journal Entries"],"operationId":"retrieveJournalEntries","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"offset","in":"query","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","required":false,"type":"integer","format":"int32"},{"name":"entryId","in":"query","required":false,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/journalentries/openingbalance":{"get":{"tags":["Journal Entries"],"operationId":"retrieveOpeningBalance","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"officeId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"currencyCode","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/provisioningentries":{"get":{"tags":["Provisioning Entries"],"summary":"List all Provisioning Entries","description":"","operationId":"retrieveAllProvisioningEntries","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/ProvisioningEntryData"}}}}},"post":{"tags":["Provisioning Entries"],"summary":"Create new Provisioning Entries","description":"Creates a new Provisioning Entries\n\nMandatory Fields\ndate\ndateFormat\nlocale\nOptional Fields\ncreatejournalentries","operationId":"createProvisioningEntries","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":false,"schema":{"$ref":"#/definitions/PostProvisioningEntriesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostProvisioningEntriesResponse"}}}}},"/provisioningentries/{entryId}":{"get":{"tags":["Provisioning Entries"],"summary":"Retrieves a Provisioning Entry","description":"Returns the details of a generated Provisioning Entry.","operationId":"retrieveProvisioningEntry","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"entryId","in":"path","description":"entryId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/ProvisioningEntryData"}}}},"post":{"tags":["Provisioning Entries"],"summary":"Recreates Provisioning Entry","description":"Recreates Provisioning Entry | createjournalentry.","operationId":"modifyProvisioningEntry","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"entryId","in":"path","description":"entryId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command=createjournalentry\ncommand=recreateprovisioningentry","required":false,"type":"string"},{"in":"body","name":"body","description":"body","required":false,"schema":{"$ref":"#/definitions/PutProvisioningEntriesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutProvisioningEntriesResponse"}}}}},"/provisioningentries/entries":{"get":{"tags":["Provisioning Entries"],"operationId":"retrieveProviioningEntries","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"entryId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"offset","in":"query","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","required":false,"type":"integer","format":"int32"},{"name":"officeId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"productId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"categoryId","in":"query","required":false,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/LoanProductProvisioningEntryData"}}}}},"/accountingrules":{"get":{"tags":["Accounting Rules"],"summary":"Retrieve Accounting Rules","description":"Returns the list of defined accounting rules.\n\nExample Requests:\n\naccountingrules","operationId":"retrieveAllAccountingRules","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetAccountRulesResponse"}}}}},"post":{"tags":["Accounting Rules"],"summary":"Create/Define a Accounting rule","description":"Define a new Accounting rule.\n\nMandatory Fields\nname, officeId,\naccountToDebit OR debitTags,\naccountToCredit OR creditTags.\n\nOptional Fields\ndescription","operationId":"createAccountingRule","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":false,"schema":{"$ref":"#/definitions/PostAccountingRulesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostAccountingRulesResponse"}}}}},"/accountingrules/{accountingRuleId}":{"get":{"tags":["Accounting Rules"],"summary":"Retrieve a Accounting rule","description":"Returns the details of a defined Accounting rule.\n\nExample Requests:\n\naccountingrules/1","operationId":"retreiveAccountingRule","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountingRuleId","in":"path","description":"accountingRuleId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/AccountingRuleData"}}}},"put":{"tags":["Accounting Rules"],"summary":"Update a Accounting Rule","description":"Updates the details of a Accounting rule.","operationId":"updateAccountingRule","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountingRuleId","in":"path","description":"accountingRuleId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":false,"schema":{"$ref":"#/definitions/PutAccountingRulesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutAccountingRulesResponse"}}}},"delete":{"tags":["Accounting Rules"],"summary":"Delete a Accounting Rule","description":"Deletes a Accounting rule.","operationId":"deleteAccountingRule","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountingRuleId","in":"path","description":"accountingRuleId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteAccountingRulesResponse"}}}}},"/accountingrules/template":{"get":{"tags":["Accounting Rules"],"summary":"Retrieve Accounting Rule Details Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\nExample Request:\n\naccountingrules/template","operationId":"retrieveTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetAccountRulesTemplateResponse"}}}}},"/batches":{"post":{"tags":["Batch API"],"summary":"Batch requests in a single transaction","description":"The Apache Fineract Batch API is also capable of executing all the requests in a single transaction, by setting a Query Parameter, \"enclosingTransaction=true\". So, if one or more of the requests in a batch returns an erroneous response all of the Data base transactions made by other successful requests will be rolled back.\n\nIf there has been a rollback in a transaction then a single response will be provided, with a '400' status code and a body consisting of the error details of the first failed request.","operationId":"handleBatchRequests","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"enclosingTransaction","in":"query","description":"enclosingTransaction","required":false,"type":"boolean","default":false},{"in":"body","name":"body","description":"request body","required":true,"schema":{"$ref":"#/definitions/PostBatchesRequest"}}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/BatchResponse"}}}}},"/audits/{auditId}":{"get":{"tags":["Audits"],"summary":"Retrieve an Audit Entry","description":"Example Requests:\n\naudits/20\naudits/20?fields=madeOnDate,maker,processingResult","operationId":"retrieveAuditEntry","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"auditId","in":"path","description":"auditId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetMakerCheckerResponse"}}}}},"/audits/searchtemplate":{"get":{"tags":["Audits"],"summary":"Audit Search Template","description":"This is a convenience resource. It can be useful when building an Audit Search UI. \"appUsers\" are data scoped to the office/branch the requestor is associated with.\n\nExample Requests:\n\naudits/searchtemplate\naudits/searchtemplate?fields=actionNames","operationId":"retrieveAuditSearchTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetMakerCheckersSearchTemplateResponse"}}}}},"/audits":{"get":{"tags":["Audits"],"summary":"List Audits","description":"Get a 200 list of audits that match the criteria supplied and sorted by audit id in descending order, and are within the requestors' data scope. Also it supports pagination and sorting\n\nExample Requests:\n\naudits\n\naudits?fields=madeOnDate,maker,processingResult\n\naudits?makerDateTimeFrom=2013-03-25 08:00:00&makerDateTimeTo=2013-04-04 18:00:00\n\naudits?officeId=1\n\naudits?officeId=1&includeJson=true","operationId":"retrieveAuditEntries","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"actionName","in":"query","description":"actionName","required":false,"type":"string"},{"name":"entityName","in":"query","description":"entityName","required":false,"type":"string"},{"name":"resourceId","in":"query","description":"resourceId","required":false,"type":"integer","format":"int64"},{"name":"makerId","in":"query","description":"makerId","required":false,"type":"integer","format":"int64"},{"name":"makerDateTimeFrom","in":"query","description":"makerDateTimeFrom","required":false,"type":"string"},{"name":"makerDateTimeTo","in":"query","description":"makerDateTimeTo","required":false,"type":"string"},{"name":"checkerId","in":"query","description":"checkerId","required":false,"type":"integer","format":"int64"},{"name":"checkerDateTimeFrom","in":"query","description":"checkerDateTimeFrom","required":false,"type":"string"},{"name":"checkerDateTimeTo","in":"query","description":"checkerDateTimeTo","required":false,"type":"string"},{"name":"processingResult","in":"query","description":"processingResult","required":false,"type":"integer","format":"int32"},{"name":"officeId","in":"query","description":"officeId","required":false,"type":"integer","format":"int32"},{"name":"groupId","in":"query","description":"groupId","required":false,"type":"integer","format":"int32"},{"name":"clientId","in":"query","description":"clientId","required":false,"type":"integer","format":"int32"},{"name":"loanid","in":"query","description":"loanid","required":false,"type":"integer","format":"int32"},{"name":"savingsAccountId","in":"query","description":"savingsAccountId","required":false,"type":"integer","format":"int32"},{"name":"paged","in":"query","description":"paged","required":false,"type":"boolean"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","description":"orderBy","required":false,"type":"string"},{"name":"sortOrder","in":"query","description":"sortOrder","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetMakerCheckerResponse"}}}}}},"/makercheckers/searchtemplate":{"get":{"tags":["Maker Checker (or 4-eye) functionality"],"summary":"Maker Checker Search Template","description":"This is a convenience resource. It can be useful when building a Checker Inbox UI. \"appUsers\" are data scoped to the office/branch the requestor is associated with. \"actionNames\" and \"entityNames\" returned are those that the requestor has Checker approval permissions for.\n\nExample Requests:\n\nmakercheckers/searchtemplate\nmakercheckers/searchtemplate?fields=entityNames","operationId":"retrieveAuditSearchTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetMakerCheckersSearchTemplateResponse"}}}}},"/makercheckers":{"get":{"tags":["Maker Checker (or 4-eye) functionality"],"summary":"List Maker Checker Entries","description":"Get a list of entries that can be checked by the requestor that match the criteria supplied.\n\nExample Requests:\n\nmakercheckers\n\nmakercheckers?fields=madeOnDate,maker,processingResult\n\nmakercheckers?makerDateTimeFrom=2013-03-25 08:00:00&makerDateTimeTo=2013-04-04 18:00:00\n\nmakercheckers?officeId=1\n\nmakercheckers?officeId=1&includeJson=true","operationId":"retrieveCommands","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"actionName","in":"query","description":"actionName","required":false,"type":"string"},{"name":"entityName","in":"query","description":"entityName","required":false,"type":"string"},{"name":"resourceId","in":"query","description":"resourceId","required":false,"type":"integer","format":"int64"},{"name":"makerId","in":"query","description":"makerId","required":false,"type":"integer","format":"int64"},{"name":"makerDateTimeFrom","in":"query","description":"makerDateTimeFrom","required":false,"type":"string"},{"name":"makerDateTimeTo","in":"query","description":"makerDateTimeTo","required":false,"type":"string"},{"name":"officeId","in":"query","description":"officeId","required":false,"type":"integer","format":"int32"},{"name":"groupId","in":"query","description":"groupId","required":false,"type":"integer","format":"int32"},{"name":"clientId","in":"query","description":"clientId","required":false,"type":"integer","format":"int32"},{"name":"loanid","in":"query","description":"loanid","required":false,"type":"integer","format":"int32"},{"name":"savingsAccountId","in":"query","description":"savingsAccountId","required":false,"type":"integer","format":"int32"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetMakerCheckerResponse"}}}}}},"/makercheckers/{auditId}":{"post":{"tags":["Maker Checker (or 4-eye) functionality"],"summary":"Approve Maker Checker Entry | Reject Maker Checker Entry","description":"","operationId":"approveMakerCheckerEntry","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"auditId","in":"path","description":"auditId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostMakerCheckersResponse"}}}},"delete":{"tags":["Maker Checker (or 4-eye) functionality"],"summary":"Delete Maker Checker Entry","description":"","operationId":"deleteMakerCheckerEntry","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"auditId","in":"path","description":"auditId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostMakerCheckersResponse"}}}}},"/accountnumberformats":{"get":{"tags":["Account number format"],"summary":"List Account number formats","description":"Example Requests:\n\naccountnumberformats\n\n\naccountnumberformats?fields=accountType,prefixType","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetAccountNumberFormatsIdResponse"}}}}},"post":{"tags":["Account number format"],"summary":"Create an Account number format","description":"Note: You may associate a single Account number format for a given account type\nMandatory Fields for Account number formats\naccountType","operationId":"create","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":false,"schema":{"$ref":"#/definitions/PostAccountNumberFormatsRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostAccountNumberFormatsResponse"}}}}},"/accountnumberformats/{accountNumberFormatId}":{"get":{"tags":["Account number format"],"summary":"Retrieve an Account number format","description":"Example Requests:\n\naccountnumberformats/1\n\n\naccountnumberformats/1?template=true\n\n\naccountnumberformats/1?fields=accountType,prefixType","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountNumberFormatId","in":"path","description":"accountNumberFormatId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetAccountNumberFormatsIdResponse"}}}},"put":{"tags":["Account number format"],"summary":"Update an Account number format","description":"","operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountNumberFormatId","in":"path","description":"accountNumberFormatId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutAccountNumberFormatsRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutAccountNumberFormatsResponse"}}}},"delete":{"tags":["Account number format"],"summary":"Delete an Account number format","description":"Note: Account numbers created while this format was active would remain unchanged.","operationId":"delete","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountNumberFormatId","in":"path","description":"accountNumberFormatId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteAccountNumberFormatsResponse"}}}}},"/accountnumberformats/template":{"get":{"tags":["Account number format"],"summary":"Retrieve Account number format Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\n\nExample Request:\n\naccountnumberformats/template","operationId":"retrieveTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetAccountNumberFormatsResponseTemplate"}}}}},"/caches":{"get":{"tags":["Cache"],"summary":"Retrieve Cache Types","description":"Returns the list of caches.\n\nExample Requests:\n\ncaches","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetCachesResponse"}}}}},"put":{"tags":["Cache"],"summary":"Switch Cache","description":"Switches the cache to chosen one.","operationId":"switchCache","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutCachesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutCachesResponse"}}}}},"/smscampaigns":{"get":{"tags":["SMS Campaigns"],"summary":"List SMS Campaigns","description":"Example Requests:\n\nsmscampaigns","operationId":"retrieveAllCampaigns","produces":["application/json"],"parameters":[{"name":"sqlSearch","in":"query","required":false,"type":"string"},{"name":"offset","in":"query","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","required":false,"type":"string"},{"name":"sortOrder","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"}}}},"post":{"tags":["SMS Campaigns"],"summary":"Create a SMS Campaign","description":"Mandatory Fields\ncampaignName, campaignType, triggerType, providerId, runReportId, message\n\nMandatory Fields for Cash based on selected report id\nparamValue in json format","operationId":"createCampaign","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/CommandWrapper"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"}}}}},"/smscampaigns/{resourceId}":{"get":{"tags":["SMS Campaigns"],"summary":"Retrieve a SMS Campaign","description":"Example Requests:\n\nsmscampaigns/1\n","operationId":"retrieveCampaign","produces":["application/json"],"parameters":[{"name":"resourceId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"}}}}},"/smscampaigns/{campaignId}":{"post":{"tags":["SMS Campaigns"],"summary":"SMS Campaign","description":"Activates | Deactivates | Reactivates","operationId":"handleCommands","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"campaignId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"}}}},"put":{"tags":["SMS Campaigns"],"summary":"Update a Campaign","description":"","operationId":"updateCampaign","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"campaignId","in":"path","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/CommandWrapper"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"}}}},"delete":{"tags":["SMS Campaigns"],"summary":"Delete a SMS Campaign","description":"Note: Only closed SMS Campaigns can be deleted","operationId":"delete","parameters":[{"name":"campaignId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"}}}}},"/smscampaigns/template":{"get":{"tags":["SMS Campaigns"],"summary":"Retrieve a SMS Campaign","description":"Example Requests:\n\nsmscampaigns/1\n\n\nsmscampaigns/1?template=true\n\n\nsmscampaigns/template","operationId":"template","parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"}}}}},"/smscampaigns/preview":{"post":{"tags":["SMS Campaigns"],"operationId":"preview","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/codes/{codeId}/codevalues":{"get":{"tags":["Code Values"],"summary":"List Code Values","description":"Returns the list of Code Values for a given Code\n\nExample Requests:\n\ncodes/1/codevalues","operationId":"retrieveAllCodeValues","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"codeId","in":"path","description":"codeId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"A List of Given response","schema":{"type":"array","items":{"$ref":"#/definitions/GetCodeValuesDataResponse"}}}}},"post":{"tags":["Code Values"],"summary":"Create a Code Value","description":"","operationId":"createCodeValue","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"codeId","in":"path","description":"codeId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostCodeValuesDataRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostCodeValueDataResponse"}}}}},"/codes/{codeId}/codevalues/{codeValueId}":{"get":{"tags":["Code Values"],"summary":"Retrieve a Code Value","description":"Returns the details of a Code Value\n\nExample Requests:\n\ncodes/1/codevalues/1","operationId":"retrieveCodeValue","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"codeValueId","in":"path","description":"codeValueId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetCodeValuesDataResponse"}}}},"put":{"tags":["Code Values"],"summary":"Update a Code Value","description":"Updates the details of a code value.","operationId":"updateCodeValue","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"codeId","in":"path","description":"codeId","required":true,"type":"integer","format":"int64"},{"name":"codeValueId","in":"path","description":"codeValueId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutCodeValuesDataRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutCodeValueDataResponse"}}}},"delete":{"tags":["Code Values"],"summary":"Delete a Code Value","description":"Deletes a code value","operationId":"deleteCodeValue","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"codeId","in":"path","description":"codeId","required":true,"type":"integer","format":"int64"},{"name":"codeValueId","in":"path","description":"codeValueId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteCodeValueDataResponse"}}}}},"/codes":{"get":{"tags":["Codes"],"summary":"Retrieve Codes","description":"Returns the list of codes.\n\nExample Requests:\n\ncodes","operationId":"retrieveCodes","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetCodesResponse"}}}}},"post":{"tags":["Codes"],"summary":"Create a Code","description":"Creates a code. Codes created through api are always 'user defined' and so system defined is marked as false.","operationId":"createCode","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostCodesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostCodesResponse"}}}}},"/codes/{codeId}":{"get":{"tags":["Codes"],"summary":"Retrieve a Code","description":"Returns the details of a Code.\n\nExample Requests:\n\ncodes/1","operationId":"retrieveCode","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"codeId","in":"path","description":"codeId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetCodesResponse"}}}},"put":{"tags":["Codes"],"summary":"Update a Code","description":"Updates the details of a code if it is not system defined.","operationId":"updateCode","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"codeId","in":"path","description":"codeId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutCodesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutCodesResponse"}}}},"delete":{"tags":["Codes"],"summary":"Delete a Code","description":"Deletes a code if it is not system defined.","operationId":"deleteCode","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"codeId","in":"path","description":"codeId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteCodesResponse"}}}}},"/externalservice/{servicename}":{"get":{"tags":["External Services"],"summary":"Retrieve External Services Configuration","description":"Returns a external Service configurations based on the Service Name.\n\nService Names supported are S3 and SMTP.\n\nExample Requests:\n\nexternalservice/SMTP","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"servicename","in":"path","description":"servicename","required":true,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/ExternalServicesPropertiesData"}}}},"put":{"tags":["External Services"],"summary":"Update External Service","description":"Updates the external Service Configuration for a Service Name.\n\nExample: \n\nexternalservice/S3","operationId":"updateExternalServiceProperties","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"servicename","in":"path","description":"servicename","required":true,"type":"string"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutExternalServiceRequest"}}],"responses":{"200":{"description":""}}}},"/configurations":{"get":{"tags":["Global Configuration"],"summary":"Retrieve Global Configuration | Retrieve Global Configuration for surveys","description":"Returns the list global enable/disable configurations.\n\nExample Requests:\n\nconfigurations\n\n\nReturns the list global enable/disable survey configurations.\n\nExample Requests:\n\nconfigurations/survey","operationId":"retrieveConfiguration","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"survey","in":"query","description":"survey","required":false,"type":"boolean","default":false}],"responses":{"200":{"description":"List of example \n response \nsurveys response \ngiven below","schema":{"type":"array","items":{"$ref":"#/definitions/GetGlobalConfigurationsResponse"}}}}}},"/configurations/{configId}":{"get":{"tags":["Global Configuration"],"summary":"Retrieve Global Configuration","description":"Returns a global enable/disable configurations.\n\nExample Requests:\n\nconfigurations/1","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"configId","in":"path","description":"configId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetGlobalConfigurationsResponse"}}}},"put":{"tags":["Global Configuration"],"summary":"Update Global Configuration","description":"Updates an enable/disable global configuration item.","operationId":"updateConfiguration","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"configId","in":"path","description":"configId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutGlobalConfigurationsRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutGlobalConfigurationsResponse"}}}}},"/CreditBureauConfiguration/organisationCreditBureau":{"get":{"tags":["CreditBureau Configuration"],"operationId":"getOrganisationCreditBureau","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"put":{"tags":["CreditBureau Configuration"],"operationId":"updateCreditBureau","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/CreditBureauConfiguration/loanProduct":{"get":{"tags":["CreditBureau Configuration"],"operationId":"fetchLoanProducts","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/CreditBureauConfiguration/mappings":{"get":{"tags":["CreditBureau Configuration"],"operationId":"getCreditBureauLoanProductMapping","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"put":{"tags":["CreditBureau Configuration"],"operationId":"updateCreditBureauLoanProductMapping","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/CreditBureauConfiguration/organisationCreditBureau/{organisationCreditBureauId}":{"post":{"tags":["CreditBureau Configuration"],"operationId":"addOrganisationCreditBureau","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"organisationCreditBureauId","in":"path","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/CreditBureauConfiguration/mappings/{CreditBureauId}":{"post":{"tags":["CreditBureau Configuration"],"operationId":"createCreditBureauLoanProductMapping","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"CreditBureauId","in":"path","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/CreditBureauConfiguration/config/{organisationCreditBureauId}":{"get":{"tags":["CreditBureau Configuration"],"operationId":"getConfiguration","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"organisationCreditBureauId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/CreditBureauConfiguration":{"get":{"tags":["CreditBureau Configuration"],"operationId":"getCreditBureau","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/datatables/{datatableName}":{"put":{"tags":["Data Tables"],"summary":"Update Data Table","description":"Modifies fields of a data table. If the apptableName parameter is passed, data table is deregistered and registered with the new application table.","operationId":"updateDatatable","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"datatableName","in":"path","description":"datatableName","required":true,"type":"string"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutDataTablesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutDataTablesResponse"}}}},"delete":{"tags":["Data Tables"],"summary":"Delete Data Table","description":"Deletes a data table and deregisters it from the Apache Fineract Core application table.","operationId":"deleteDatatable","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"datatableName","in":"path","description":"datatableName","required":true,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteDataTablesResponse"}}}}},"/datatables":{"get":{"tags":["Data Tables"],"summary":"List Data Tables","description":"Lists registered data tables and the Apache Fineract Core application table they are registered to.\n\nARGUMENTS\n\napptable - optional\nThe Apache Fineract core application table.\n\nExample Requests:\n\ndatatables?apptable=m_client\n\n\ndatatables","operationId":"getDatatables","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"apptable","in":"query","description":"apptable","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetDataTablesResponse"}}}}},"post":{"tags":["Data Tables"],"summary":"Create Data Table","description":"Create a new data table and registers it with the Apache Fineract Core application table.\n\nField Descriptions\n\nMandatory - datatableName : \n\nThe name of the Data Table.\n\nMandatory - apptableName\n\nApplication table name. Must be one of the following:\n\nm_client\n\nm_group\n\nm_loan\n\nm_office\n\nm_saving_account\n\nm_product_loan\n\nm_savings_product\n\nMandatory - columns \nAn array of columns in the new Data Table.\n\nOptional - multiRow\n\nAllows to create multiple entries in the Data Table. Optional, defaults to false. If this property is not provided Data Table will allow only one entry.\n\nField Descriptions - columns\n\nMandatory - name\n\nName of the created column. Can contain only alphanumeric characters, underscores and spaces, but cannot start with a number. Cannot start or end with an underscore or space.\n\nMandatory - type\n\nColumn type. Must be one of the following:\n\nBoolean\n\nDate\n\nDateTime\n\nDecimal\n\nDropdown\n\n\nNumber\n\nString\n\nText\n\nMandatory [type = Dropdown] - code\n\nUsed in Code Value fields. Column name becomes: code_cd_name. Mandatory if using type Dropdown, otherwise an error is returned.\n\nOptional - mandatory\n\nDetermines whether this column must have a value in every entry. Optional, defaults to false.\n\nMandatory [type = String] - length\n\nLength of the text field. Mandatory if type String is used, otherwise an error is returned.","operationId":"createDatatable","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostDataTablesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostDataTablesResponse"}}}}},"/datatables/register/{datatable}/{apptable}":{"post":{"tags":["Data Tables"],"summary":"Register Data Table","description":"Registers a data table with the Apache Fineract Core application table. This allows the data table to be maintained through the API. In case the datatable is a PPI (survey table), a parameter category should be pass along with the request. The API currently support one category (200)","operationId":"registerDatatable","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"datatable","in":"path","description":"datatable","required":true,"type":"string"},{"name":"apptable","in":"path","description":"apptable","required":true,"type":"string"},{"in":"body","name":"body","description":"body","required":false,"schema":{"$ref":"#/definitions/PostDataTablesRegisterDatatableAppTable"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutDataTablesResponse"}}}}},"/datatables/deregister/{datatable}":{"post":{"tags":["Data Tables"],"summary":"Deregister Data Table","description":"Deregisters a data table. It will no longer be available through the API.","operationId":"deregisterDatatable","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"datatable","in":"path","description":"datatable","required":true,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutDataTablesResponse"}}}}},"/datatables/{datatable}":{"get":{"tags":["Data Tables"],"summary":"Retrieve Data Table Details","description":"Lists a registered data table details and the Apache Fineract Core application table they are registered to.","operationId":"getDatatable","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"datatable","in":"path","description":"datatable","required":true,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetDataTablesResponse"}}}}},"/datatables/{datatable}/{apptableId}":{"get":{"tags":["Data Tables"],"summary":"Retrieve Entry(s) from Data Table","description":"Gets the entry (if it exists) for data tables that are one to one with the application table. \nGets the entries (if they exist) for data tables that are one to many with the application table.\n\nNote: The 'fields' parameter is not available for datatables.\n\nARGUMENTS\norderoptional Specifies the order in which data is returned.genericResultSetoptional, defaults to false If 'true' an optimised JSON format is returned suitable for tabular display of data. This format is used by the default data tables UI functionality.\nExample Requests:\n\ndatatables/extra_client_details/1\n\n\ndatatables/extra_family_details/1?order=`Date of Birth` desc\n\n\ndatatables/extra_client_details/1?genericResultSet=true","operationId":"getDatatable","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"datatable","in":"path","description":"datatable","required":true,"type":"string"},{"name":"apptableId","in":"path","description":"apptableId","required":true,"type":"integer","format":"int64"},{"name":"order","in":"query","description":"order","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetDataTablesAppTableIdResponse"}}}},"post":{"tags":["Data Tables"],"summary":"Create Entry in Data Table","description":"Adds a row to the data table.\n\nNote that the default datatable UI functionality converts any field name containing spaces to underscores when using the API. This means the field name \"Business Description\" is considered the same as \"Business_Description\". So you shouldn't have both \"versions\" in any data table.","operationId":"createDatatableEntry","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"datatable","in":"path","description":"datatable","required":true,"type":"string"},{"name":"apptableId","in":"path","description":"apptableId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostDataTablesAppTableIdRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostDataTablesAppTableIdResponse"}}}},"put":{"tags":["Data Tables"],"summary":"Update Entry in Data Table (One to One)","description":"Updates the row (if it exists) of the data table.","operationId":"updateDatatableEntryOnetoOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"datatable","in":"path","description":"datatable","required":true,"type":"string"},{"name":"apptableId","in":"path","description":"apptableId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutDataTablesAppTableIdRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutDataTablesAppTableIdResponse"}}}},"delete":{"tags":["Data Tables"],"summary":"Delete Entry(s) in Data Table","description":"Deletes the entry (if it exists) for data tables that are one-to-one with the application table. \nDeletes the entries (if they exist) for data tables that are one-to-many with the application table.","operationId":"deleteDatatableEntries","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"datatable","in":"path","description":"datatable","required":true,"type":"string"},{"name":"apptableId","in":"path","description":"apptableId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteDataTablesDatatableAppTableIdResponse"}}}}},"/datatables/{datatable}/{apptableId}/{datatableId}":{"get":{"tags":["Data Tables"],"operationId":"getDatatableManyEntry","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"datatable","in":"path","required":true,"type":"string"},{"name":"apptableId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"datatableId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"order","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"put":{"tags":["Data Tables"],"summary":"Update Entry in Data Table (One to Many)","description":"Updates the row (if it exists) of the data table.","operationId":"updateDatatableEntryOneToMany","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"datatable","in":"path","description":"datatable","required":true,"type":"string"},{"name":"apptableId","in":"path","description":"apptableId","required":true,"type":"integer","format":"int64"},{"name":"datatableId","in":"path","description":"datatableId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutDataTablesAppTableIdDatatableIdRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutDataTablesAppTableIdDatatableIdResponse"}}}},"delete":{"tags":["Data Tables"],"summary":"Delete Entry in Datatable (One to Many)","description":"Deletes the entry (if it exists) for data tables that are one to many with the application table.\n\n","operationId":"deleteDatatableEntries","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"datatable","in":"path","description":"datatable","required":true,"type":"body","x-example":"{}"},{"name":"apptableId","in":"path","description":"apptableId","required":true,"type":"integer","format":"int64"},{"name":"datatableId","in":"path","description":"datatableId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteDataTablesDatatableAppTableIdDatatableIdResponse"}}}}},"/entityDatatableChecks/{entityDatatableCheckId}":{"delete":{"tags":["Entity-Datatable Checks"],"summary":"Delete Entity-Datatable Checks","description":"Deletes an existing Entity-Datatable Check","operationId":"deleteDatatable","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"entityDatatableCheckId","in":"path","description":"entityDatatableCheckId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteEntityDatatableChecksTemplateResponse"}}}}},"/entityDatatableChecks":{"get":{"tags":["Entity-Datatable Checks"],"summary":"List Entity-Datatable Checks","description":"The list capability of Entity-Datatable Checks can support pagination.\n\nOPTIONAL ARGUMENTS\noffset Integer optional, defaults to 0 Indicates the result from which pagination startslimit Integer optional, defaults to 200 Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1\nExample Request:\n\nentityDatatableChecks?offset=0&limit=15","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"status","in":"query","description":"status","required":false,"type":"integer","format":"int64"},{"name":"entity","in":"query","description":"entity","required":false,"type":"string"},{"name":"productId","in":"query","description":"productId","required":false,"type":"integer","format":"int64"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetEntityDatatableChecksResponse"}}}}},"post":{"tags":["Entity-Datatable Checks"],"summary":"Create Entity-Datatable Checks","description":"Mandatory Fields : \nentity, status, datatableName\n\nNon-Mandatory Fields : \nproductId","operationId":"createEntityDatatableCheck","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostEntityDatatableChecksTemplateRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostEntityDatatableChecksTemplateResponse"}}}}},"/entityDatatableChecks/template":{"get":{"tags":["Entity-Datatable Checks"],"summary":"Retrieve Entity-Datatable Checks Template","description":"This is a convenience resource useful for building maintenance user interface screens for Entity-Datatable Checks applications. The template data returned consists of:\n\nAllowed Value Lists\nExample Request:\n\nentityDatatableChecks/template","operationId":"getTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetEntityDatatableChecksTemplateResponse"}}}}},"/reports/{id}":{"get":{"tags":["Reports"],"summary":"Retrieve a Report\n","description":"Example Requests:\n\nreports/1\n\n\nreports/1?template=true","operationId":"retrieveReport","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"id","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetReportsResponse"}}}},"put":{"tags":["Reports"],"summary":"Update a Report","description":"Only the useReport value can be updated for core reports.","operationId":"updateReport","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"id","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutReportRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutReportResponse"}}}},"delete":{"tags":["Reports"],"summary":"Delete a Report","description":"Only non-core reports can be deleted.","operationId":"deleteReport","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"id","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteReportsResponse"}}}}},"/reports":{"get":{"tags":["Reports"],"summary":"List Reports","description":"Lists all reports and their parameters.\n\nExample Request:\n\nreports","operationId":"retrieveReportList","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":""}}},"post":{"tags":["Reports"],"summary":"Create a Report","description":"","operationId":"createReport","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostRepostRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostReportsResponse"}}}}},"/reports/template":{"get":{"tags":["Reports"],"summary":"Retrieve Report Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\n\nExample Request : \n\nreports/template","operationId":"retrieveOfficeTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetReportsTemplateResponse"}}}}},"/runreports/{reportName}":{"get":{"tags":["Run Reports"],"summary":"Running a Report","description":"This resource allows you to run and receive output from pre-defined Apache Fineract reports.\n\nReports can also be used to provide data for searching and workflow functionality.\n\nThe default output is a JSON formatted \"Generic Resultset\". The Generic Resultset contains Column Heading as well as Data information. However, you can export to CSV format by simply adding \"&exportCSV=true\" to the end of your URL.\n\nIf Pentaho reports have been pre-defined, they can also be run through this resource. Pentaho reports can return HTML, PDF or CSV formats.\n\nThe Apache Fineract reference application uses a JQuery plugin called stretchy reporting which, itself, uses this reports resource to provide a pretty flexible reporting User Interface (UI).\n\n\n\nExample Requests:\n\nrunreports/Client%20Listing?R_officeId=1\n\n\nrunreports/Client%20Listing?R_officeId=1&exportCSV=true\n\n\nrunreports/OfficeIdSelectOne?R_officeId=1¶meterType=true\n\n\nrunreports/OfficeIdSelectOne?R_officeId=1¶meterType=true&exportCSV=true\n\n\nrunreports/Expected%20Payments%20By%20Date%20-%20Formatted?R_endDate=2013-04-30&R_loanOfficerId=-1&R_officeId=1&R_startDate=2013-04-16&output-type=HTML&R_officeId=1\n\n\nrunreports/Expected%20Payments%20By%20Date%20-%20Formatted?R_endDate=2013-04-30&R_loanOfficerId=-1&R_officeId=1&R_startDate=2013-04-16&output-type=XLS&R_officeId=1\n\n\nrunreports/Expected%20Payments%20By%20Date%20-%20Formatted?R_endDate=2013-04-30&R_loanOfficerId=-1&R_officeId=1&R_startDate=2013-04-16&output-type=CSV&R_officeId=1\n\n\nrunreports/Expected%20Payments%20By%20Date%20-%20Formatted?R_endDate=2013-04-30&R_loanOfficerId=-1&R_officeId=1&R_startDate=2013-04-16&output-type=PDF&R_officeId=1","operationId":"runReport","consumes":["application/json"],"produces":["application/json","text/csv","application/vnd.ms-excel","application/pdf","text/html"],"parameters":[{"name":"reportName","in":"path","description":"reportName","required":true,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetReportNameResponse"}}}}},"/{entityType}/{entityId}/documents":{"get":{"tags":["Documents"],"summary":"List documents","description":"Example Requests:\n\nclients/1/documents\n\nclient_identifiers/1/documents\n\nloans/1/documents?fields=name,description","operationId":"retreiveAllDocuments","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"entityType","in":"path","description":"entityType","required":true,"type":"string"},{"name":"entityId","in":"path","description":"entityId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetEntityTypeEntityIdDocumentsResponse"}}}}},"post":{"tags":["Documents"],"summary":"Create a Document","description":"Note: A document is created using a Multi-part form upload \n\nBody Parts\n\nname : \nName or summary of the document\n\ndescription : \nDescription of the document\n\nfile : \nThe file to be uploaded\n\nMandatory Fields : \nfile and description","operationId":"createDocument","consumes":["multipart/form-data"],"produces":["application/json"],"parameters":[{"name":"entityType","in":"path","description":"entityType","required":true,"type":"string"},{"name":"entityId","in":"path","description":"entityId","required":true,"type":"integer","format":"int64"},{"name":"Content-Length","in":"header","description":"Content-Length","required":false,"type":"integer","format":"int64"},{"name":"file","in":"formData","description":"file","required":false,"type":"file"},{"name":"name","in":"formData","description":"name","required":false,"type":"string"},{"name":"description","in":"formData","description":"description","required":false,"type":"string"}],"responses":{"200":{"description":"Not Shown (multi-part form data)","schema":{"$ref":"#/definitions/PostEntityTypeEntityIdDocumentsResponse"}}}}},"/{entityType}/{entityId}/documents/{documentId}":{"get":{"tags":["Documents"],"summary":"Retrieve a Document","description":"Example Requests:\n\nclients/1/documents/1\n\n\nloans/1/documents/1\n\n\nclient_identifiers/1/documents/1?fields=name,description","operationId":"getDocument","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"entityType","in":"path","description":"entityType","required":true,"type":"string"},{"name":"entityId","in":"path","description":"entityId","required":true,"type":"integer","format":"int64"},{"name":"documentId","in":"path","description":"documentId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetEntityTypeEntityIdDocumentsResponse"}}}},"put":{"tags":["Documents"],"summary":"Update a Document","description":"Note: A document is updated using a Multi-part form upload \nBody Parts\nname\nName or summary of the document\ndescription\nDescription of the document\nfile\nThe file to be uploaded","operationId":"updateDocument","consumes":["multipart/form-data"],"produces":["application/json"],"parameters":[{"name":"entityType","in":"path","description":"entityType","required":true,"type":"string"},{"name":"entityId","in":"path","description":"entityId","required":true,"type":"integer","format":"int64"},{"name":"documentId","in":"path","description":"documentId","required":true,"type":"integer","format":"int64"},{"name":"Content-Length","in":"header","description":"Content-Length","required":false,"type":"integer","format":"int64"},{"name":"file","in":"formData","description":"file","required":false,"type":"file"},{"name":"name","in":"formData","description":"name","required":false,"type":"string"},{"name":"description","in":"formData","description":"description","required":false,"type":"string"}],"responses":{"200":{"description":"Not Shown (multi-part form data)","schema":{"$ref":"#/definitions/PutEntityTypeEntityIdDocumentsResponse"}}}},"delete":{"tags":["Documents"],"summary":"Remove a Document","description":"","operationId":"deleteDocument","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"entityType","in":"path","description":"entityType","required":true,"type":"string"},{"name":"entityId","in":"path","description":"entityId","required":true,"type":"integer","format":"int64"},{"name":"documentId","in":"path","description":"documentId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteEntityTypeEntityIdDocumentsResponse"}}}}},"/{entityType}/{entityId}/documents/{documentId}/attachment":{"get":{"tags":["Documents"],"summary":"Retrieve Binary File associated with Document","description":"Request used to download the file associated with the document\n\nExample Requests:\n\nclients/1/documents/1/attachment\n\n\nloans/1/documents/1/attachment","operationId":"downloadFile","consumes":["application/json"],"produces":["application/octet-stream"],"parameters":[{"name":"entityType","in":"path","description":"entityType","required":true,"type":"string"},{"name":"entityId","in":"path","description":"entityId","required":true,"type":"integer","format":"int64"},{"name":"documentId","in":"path","description":"documentId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"Not Shown: The corresponding Binary file"}}}},"/{entity}/{entityId}/images":{"get":{"tags":["DomainNameapiv1{entity}{entityId}images"],"operationId":"downloadClientImage","consumes":["application/json"],"produces":["application/octet-stream"],"parameters":[{"name":"entity","in":"path","required":true,"type":"string"},{"name":"entityId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"maxWidth","in":"query","required":false,"type":"integer","format":"int32"},{"name":"maxHeight","in":"query","required":false,"type":"integer","format":"int32"},{"name":"output","in":"query","required":false,"type":"string"}],"responses":{"default":{"description":"successful operation"}}},"post":{"tags":["DomainNameapiv1{entity}{entityId}images"],"operationId":"addNewClientImage","consumes":["text/plain","text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"entity","in":"path","required":true,"type":"string"},{"name":"entityId","in":"path","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"put":{"tags":["DomainNameapiv1{entity}{entityId}images"],"operationId":"updateClientImage","consumes":["multipart/form-data"],"produces":["application/json"],"parameters":[{"name":"entity","in":"path","required":true,"type":"string"},{"name":"entityId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"Content-Length","in":"header","required":false,"type":"integer","format":"int64"},{"name":"file","in":"formData","required":false,"type":"file"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"delete":{"tags":["DomainNameapiv1{entity}{entityId}images"],"operationId":"deleteClientImage","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"entity","in":"path","required":true,"type":"string"},{"name":"entityId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/entitytoentitymapping/{mapId}/{fromId}/{toId}":{"get":{"tags":["DomainNameapiv1entitytoentitymapping"],"operationId":"getEntityToEntityMappings","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"mapId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"fromId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"toId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/entitytoentitymapping/{mapId}":{"get":{"tags":["DomainNameapiv1entitytoentitymapping"],"operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"mapId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"put":{"tags":["DomainNameapiv1entitytoentitymapping"],"operationId":"updateMap","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"mapId","in":"path","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"delete":{"tags":["DomainNameapiv1entitytoentitymapping"],"operationId":"delete","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"mapId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/entitytoentitymapping":{"get":{"tags":["DomainNameapiv1entitytoentitymapping"],"operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/entitytoentitymapping/{relId}":{"post":{"tags":["DomainNameapiv1entitytoentitymapping"],"operationId":"createMap","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"relId","in":"path","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/hooks":{"get":{"tags":["Hooks"],"summary":"Retrieve Hooks","description":"Returns the list of hooks.\n\nExample Requests:\n\nhooks","operationId":"retrieveHooks","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetHookResponse"}}}}},"post":{"tags":["Hooks"],"summary":"Create a Hook","description":"The following parameters can be passed for the creation of a hook :-\n\nname - string - Required. The name of the template that is being called. (See /hooks/template for the list of valid hook names.)\n\nisActive - boolean - Determines whether the hook is actually triggered.\n\nevents - array - Determines what events the hook is triggered for.\n\nconfig - hash - Required. Key/value pairs to provide settings for this hook. These settings vary between the templates.\n\ntemplateId - Optional. The UGD template ID associated with the same entity (client or loan).","operationId":"createHook","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/PostHookRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostHookResponse"}}}}},"/hooks/{hookId}":{"get":{"tags":["Hooks"],"summary":"Retrieve a Hook","description":"Returns the details of a Hook.\n\nExample Requests:\n\nhooks/1","operationId":"retrieveHook","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"hookId","in":"path","description":"hookId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetHookResponse"}}}},"put":{"tags":["Hooks"],"summary":"Update a Hook","description":"Updates the details of a hook.","operationId":"updateHook","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"hookId","in":"path","description":"hookId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/PutHookRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutHookResponse"}}}},"delete":{"tags":["Hooks"],"summary":"Delete a Hook","description":"Deletes a hook.","operationId":"deleteHook","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"hookId","in":"path","description":"hookId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteHookResponse"}}}}},"/hooks/template":{"get":{"tags":["Hooks"],"summary":"Retrieve Hooks Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\nExample Request:\n\nhooks/template","operationId":"template","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetHookTemplateResponse"}}}}},"/scheduler":{"get":{"tags":["Scheduler"],"summary":"Retrieve Scheduler Status","description":"Returns the scheduler status.\n\nExample Requests:\n\nscheduler","operationId":"retrieveStatus","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetSchedulerResponse"}}}},"post":{"tags":["Scheduler"],"summary":"Activate Scheduler Jobs | Suspend Scheduler Jobs","description":"Activates the scheduler job service. | Suspends the scheduler job service.","operationId":"changeSchedulerStatus","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"command","in":"query","description":"command","required":false,"type":"string"}],"responses":{"200":{"description":"POST : scheduler?command=start\n\n\nPOST : scheduler?command=stop"}}}},"/jobs/{jobId}/runhistory":{"get":{"tags":["MIFOSX-BATCH JOBS"],"summary":"Retrieve Job Run History","description":"Example Requests:\n\njobs/5/runhistory?offset=0&limit=200","operationId":"retrieveHistory","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"jobId","in":"path","description":"jobId","required":true,"type":"integer","format":"int64"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","description":"orderBy","required":false,"type":"string"},{"name":"sortOrder","in":"query","description":"sortOrder","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetJobsJobIDJobRunHistoryResponse"}}}}},"/jobs/{jobId}":{"get":{"tags":["MIFOSX-BATCH JOBS"],"summary":"Retrieve a Job","description":"Returns the details of a Job.\n\nExample Requests:\n\njobs/5","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"jobId","in":"path","description":"jobId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetJobsResponse"}}}},"post":{"tags":["MIFOSX-BATCH JOBS"],"summary":"Run a Job","description":"Manually Execute Specific Job.","operationId":"executeJob","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"jobId","in":"path","description":"jobId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command","required":false,"type":"string"}],"responses":{"200":{"description":"POST: jobs/1?command=executeJob"}}},"put":{"tags":["MIFOSX-BATCH JOBS"],"summary":"Update a Job","description":"Updates the details of a job.","operationId":"updateJobDetail","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"jobId","in":"path","description":"jobId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutJobsJobsIDRequest"}}],"responses":{"200":{"description":""}}}},"/jobs":{"get":{"tags":["MIFOSX-BATCH JOBS"],"summary":"Retrieve Scheduler Jobs","description":"Returns the list of jobs.\n\nExample Requests:\n\njobs","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetJobsResponse"}}}}}},"/reportmailingjobs":{"get":{"tags":["Report Mailing Jobs"],"summary":"List Report Mailing Jobs","description":"Example Requests:\n\nreportmailingjobs","operationId":"retrieveAllReportMailingJobs","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","description":"orderBy","required":false,"type":"string"},{"name":"sortOrder","in":"query","description":"sortOrder","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetReportMailingJobsResponse"}}}}},"post":{"tags":["Report Mailing Jobs"],"summary":"Create a Report Mailing Job","description":"Mandatory Fields: name, startDateTime, stretchyReportId, emailRecipients, emailSubject, emailMessage, emailAttachmentFileFormatId, recurrence, isActive\n\nOptional Fields: description, stretchyReportParamMap","operationId":"createReportMailingJob","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostReportMailingJobsRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostReportMailingJobsResponse"}}}}},"/reportmailingjobs/{entityId}":{"get":{"tags":["Report Mailing Jobs"],"summary":"Retrieve a Report Mailing Job","description":"Example Requests:\n\nreportmailingjobs/1\n\n\nreportmailingjobs/1?template=true","operationId":"retrieveReportMailingJob","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"entityId","in":"path","description":"entityId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetReportMailingJobsResponse"}}}},"put":{"tags":["Report Mailing Jobs"],"summary":"Update a Report Mailing Job\n","description":"","operationId":"updateReportMailingJob","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"entityId","in":"path","description":"entityId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutReportMailingJobsRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutReportMailingJobsResponse"}}}},"delete":{"tags":["Report Mailing Jobs"],"summary":"Delete a Report Mailing Job","description":"","operationId":"deleteReportMailingJob","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"entityId","in":"path","description":"entityId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/DeleteReportMailingJobsRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteReportMailingJobsResponse"}}}}},"/reportmailingjobs/template":{"get":{"tags":["Report Mailing Jobs"],"summary":"Retrieve Report Mailing Job Details Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for report mailing job applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\nExample Request:\n\nreportmailingjobs/template","operationId":"retrieveReportMailingJobTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetReportMailingJobsTemplate"}}}}},"/reportmailingjobrunhistory":{"get":{"tags":["List Report Mailing Job History"],"summary":"List Report Mailing Job History","description":"The list capability of report mailing job history can support pagination and sorting.\n\nExample Requests:\n\nreportmailingjobrunhistory/1","operationId":"retrieveAllByReportMailingJobId","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"reportMailingJobId","in":"query","description":"reportMailingJobId","required":false,"type":"integer","format":"int64"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","description":"orderBy","required":false,"type":"string"},{"name":"sortOrder","in":"query","description":"sortOrder","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/ReportMailingJobRunHistoryData"}}}}},"/authentication":{"post":{"tags":["Authentication HTTP Basic"],"summary":"Verify authentication","description":"Authenticates the credentials provided and returns the set roles and permissions allowed.","operationId":"authenticate","produces":["application/json"],"parameters":[{"name":"username","in":"query","description":"username","required":false,"type":"string"},{"name":"password","in":"query","description":"password","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostAuthenticationResponse"}},"400":{"description":"Unauthenticated. Please login"}}}},"/userdetails":{"get":{"tags":["Fetch authenticated user details"],"summary":"Fetch authenticated user details\n","description":"checks the Authentication and returns the set roles and permissions allowed.","operationId":"fetchAuthenticatedUserData","produces":["application/json"],"parameters":[{"name":"access_token","in":"query","description":"access_token","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetUserDetailsResponse"}}}}},"/sms/{campaignId}/messageByStatus":{"get":{"tags":["SMS"],"operationId":"retrieveAllSmsByStatus","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"campaignId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"status","in":"query","required":false,"type":"integer","format":"int64"},{"name":"fromDate","in":"query","required":false,"type":"string"},{"name":"toDate","in":"query","required":false,"type":"string"},{"name":"locale","in":"query","required":false,"type":"string"},{"name":"dateFormat","in":"query","required":false,"type":"string"},{"name":"sqlSearch","in":"query","required":false,"type":"string"},{"name":"offset","in":"query","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","required":false,"type":"string"},{"name":"sortOrder","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/sms":{"get":{"tags":["SMS"],"operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"post":{"tags":["SMS"],"operationId":"create","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/sms/{resourceId}":{"get":{"tags":["SMS"],"operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"resourceId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"put":{"tags":["SMS"],"operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"resourceId","in":"path","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"delete":{"tags":["SMS"],"operationId":"delete","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"resourceId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/likelihood/{ppiName}/{likelihoodId}":{"get":{"tags":["Likelihood"],"operationId":"retrieve","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"likelihoodId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"put":{"tags":["Likelihood"],"operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"likelihoodId","in":"path","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/likelihood/{ppiName}":{"get":{"tags":["Likelihood"],"operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"ppiName","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/povertyLine/{ppiName}":{"get":{"tags":["Poverty Line"],"operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"ppiName","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/povertyLine/{ppiName}/{likelihoodId}":{"get":{"tags":["Poverty Line"],"operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"ppiName","in":"path","required":true,"type":"string"},{"name":"likelihoodId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/survey/{surveyName}/{apptableId}":{"post":{"tags":["Survey"],"summary":"Create an entry in the survey table","description":"Insert and entry in a survey table (full fill the survey).\n\nRefer Link for sample Body: [ https://demo.openmf.org/api-docs/apiLive.htm#survey_create ] ","operationId":"createDatatableEntry","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"surveyName","in":"path","description":"surveyName","required":true,"type":"string"},{"name":"apptableId","in":"path","description":"apptableId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostSurveySurveyNameApptableIdRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostSurveySurveyNameApptableIdResponse"}}}}},"/survey/{surveyName}/{clientId}/{fulfilledId}":{"delete":{"tags":["Survey"],"operationId":"deleteDatatableEntries","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"surveyName","in":"path","required":true,"type":"string"},{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"fulfilledId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/survey":{"get":{"tags":["Survey"],"summary":"Retrieve surveys","description":"Retrieve surveys. This allows to retrieve the list of survey tables registered .","operationId":"retrieveSurveys","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetSurveyResponse"}}}}}},"/survey/{surveyName}":{"get":{"tags":["Survey"],"summary":"Retrieve survey","description":"Lists a registered survey table details and the Apache Fineract Core application table they are registered to.","operationId":"retrieveSurvey","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"surveyName","in":"path","description":"surveyName","required":true,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetSurveyResponse"}}}}},"/survey/{surveyName}/{clientId}":{"get":{"tags":["Survey"],"operationId":"getClientSurveyOverview","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"surveyName","in":"path","required":true,"type":"string"},{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/survey/{surveyName}/{clientId}/{entryId}":{"get":{"tags":["Survey"],"operationId":"getSurveyEntry","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"surveyName","in":"path","required":true,"type":"string"},{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"entryId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/survey/register/{surveyName}/{apptable}":{"put":{"tags":["Survey"],"operationId":"register","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"surveyName","in":"path","required":true,"type":"string"},{"name":"apptable","in":"path","required":true,"type":"string"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/mixreport":{"get":{"tags":["Mix Report"],"operationId":"retrieveXBRLReport","produces":["application/xml"],"parameters":[{"name":"startDate","in":"query","required":false,"type":"string","format":"date-time"},{"name":"endDate","in":"query","required":false,"type":"string","format":"date-time"},{"name":"currency","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/mixtaxonomy":{"get":{"tags":["Mix Taxonomy"],"operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/mixmapping":{"get":{"tags":["Mix Mapping"],"operationId":"retrieveTaxonomyMapping","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"put":{"tags":["Mix Mapping"],"operationId":"updateTaxonomyMapping","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/holidays/{holidayId}":{"get":{"tags":["Holidays"],"summary":"Retrieve a Holiday","description":"Example Requests:\n\nholidays/1","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"holidayId","in":"path","description":"holidayId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetHolidaysResponse"}}}},"post":{"tags":["Holidays"],"summary":"Activate a Holiday","description":"Always Holidays are created in pending state. This API allows to activate a holiday.\n\nOnly the active holidays are considered for rescheduling the loan repayment.","operationId":"handleCommands","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"holidayId","in":"path","description":"holidayId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command","required":false,"type":"string"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostHolidaysHolidayIdRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostHolidaysHolidayIdResponse"}}}},"put":{"tags":["Holidays"],"summary":"Update a Holiday","description":"If a holiday is in pending state (created and not activated) then all fields are allowed to modify. Once holidays become active only name and descriptions are allowed to modify.","operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"holidayId","in":"path","description":"holidayId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutHolidaysHolidayIdRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutHolidaysHolidayIdResponse"}}}},"delete":{"tags":["Holidays"],"summary":"Delete a Holiday","description":"This API allows to delete a holiday. This is a soft delete the deleted holiday status is marked as deleted.","operationId":"delete","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"holidayId","in":"path","description":"holidayId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteHolidaysHolidayIdResponse"}}}}},"/holidays":{"get":{"tags":["Holidays"],"summary":"List Holidays","description":"Example Requests:\n\nholidays?officeId=1","operationId":"retrieveAllHolidays","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"officeId","in":"query","description":"officeId","required":false,"type":"integer","format":"int64"},{"name":"fromDate","in":"query","description":"fromDate","required":false,"type":"string"},{"name":"toDate","in":"query","description":"toDate","required":false,"type":"string"},{"name":"locale","in":"query","description":"locale","required":false,"type":"string"},{"name":"dateFormat","in":"query","description":"dateFormat","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetHolidaysResponse"}}}}},"post":{"tags":["Holidays"],"summary":"Create a Holiday","description":"Mandatory Fields: name, description, fromDate, toDate, repaymentsRescheduledTo, offices","operationId":"createNewHoliday","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostHolidaysRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostHolidaysResponse"}}}}},"/currencies":{"get":{"tags":["Currency"],"summary":"Retrieve Currency Configuration","description":"Returns the list of currencies permitted for use AND the list of currencies not selected (but available for selection).\n\nExample Requests:\n\ncurrencies\n\n\ncurrencies?fields=selectedCurrencyOptions","operationId":"retrieveCurrencies","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetCurrenciesResponse"}}}},"put":{"tags":["Currency"],"summary":"Update Currency Configuration","description":"Updates the list of currencies permitted for use.","operationId":"updateCurrencies","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutCurrenciesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutCurrenciesResponse"}}}}},"/officetransactions":{"get":{"tags":["officetransactions"],"operationId":"retrieveOfficeTransactions","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"post":{"tags":["officetransactions"],"operationId":"transferMoneyFrom","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/officetransactions/template":{"get":{"tags":["officetransactions"],"operationId":"newOfficeTransactionDetails","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/officetransactions/{transactionId}":{"delete":{"tags":["officetransactions"],"operationId":"delete","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"transactionId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/offices/template":{"get":{"tags":["Offices"],"summary":"Retrieve Office Details Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\nExample Request:\n\noffices/template","operationId":"retrieveOfficeTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetOfficesTemplateResponse"}}}}},"/offices":{"get":{"tags":["Offices"],"summary":"List Offices","description":"Example Requests:\n\noffices\n\n\noffices?fields=id,name,openingDate","operationId":"retrieveOffices","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"includeAllOffices","in":"query","description":"includeAllOffices","required":false,"type":"boolean","default":false},{"name":"orderBy","in":"query","description":"orderBy","required":false,"type":"string"},{"name":"sortOrder","in":"query","description":"sortOrder","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetOfficesResponse"}}}}},"post":{"tags":["Offices"],"summary":"Create an Office","description":"Mandatory Fields\nname, openingDate, parentId","operationId":"createOffice","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostOfficesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostOfficesResponse"}}}}},"/offices/{officeId}":{"get":{"tags":["Offices"],"summary":"Retrieve an Office","description":"Example Requests:\n\noffices/1\n\n\noffices/1?template=true\n\n\noffices/1?fields=id,name,parentName","operationId":"retreiveOffice","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"officeId","in":"path","description":"officeId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetOfficesResponse"}}}},"put":{"tags":["Offices"],"summary":"Update Office","description":"","operationId":"updateOffice","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"officeId","in":"path","description":"officeId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutOfficesOfficeIdRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutOfficesOfficeIdResponse"}}}}},"/provisioningcategory":{"get":{"tags":["Provisioning Category"],"operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"post":{"tags":["Provisioning Category"],"operationId":"createProvisioningCategory","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/provisioningcategory/{categoryId}":{"put":{"tags":["Provisioning Category"],"operationId":"updateProvisioningCategory","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"categoryId","in":"path","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"delete":{"tags":["Provisioning Category"],"operationId":"deleteProvisioningCategory","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"categoryId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/provisioningcriteria/{criteriaId}":{"get":{"tags":["Provisioning Criteria"],"summary":"Retrieves a Provisioning Criteria","description":"Retrieves a Provisioning Criteria","operationId":"retrieveProvisioningCriteria","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"criteriaId","in":"path","description":"criteriaId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetProvisioningCriteriaCriteriaIdResponse"}}}},"put":{"tags":["Provisioning Criteria"],"summary":"Updates a new Provisioning Criteria","description":"Updates a new Provisioning Criteria\n\nOptional Fields\ncriteriaName, loanProducts, provisioningcriteria","operationId":"updateProvisioningCriteria","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"criteriaId","in":"path","description":"criteriaId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutProvisioningCriteriaRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutProvisioningCriteriaResponse"}}}},"delete":{"tags":["Provisioning Criteria"],"summary":"Deletes Provisioning Criteria","description":"Deletes Provisioning Criteria","operationId":"deleteProvisioningCriteria","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"criteriaId","in":"path","description":"criteriaId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteProvisioningCriteriaResponse"}}}}},"/provisioningcriteria":{"get":{"tags":["Provisioning Criteria"],"summary":"Retrieves all created Provisioning Criterias","description":"Retrieves all created Provisioning Criterias","operationId":"retrieveAllProvisioningCriterias","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetProvisioningCriteriaResponse"}}}}},"post":{"tags":["Provisioning Criteria"],"summary":"Create a new Provisioning Criteria","description":"Creates a new Provisioning Criteria\n\nMandatory Fields: \ncriteriaName\nprovisioningcriteria\n\nOptional Fields: \nloanProducts","operationId":"createProvisioningCriteria","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostProvisioningCriteriaRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostProvisioningCriteriaResponse"}}}}},"/provisioningcriteria/template":{"get":{"tags":["Provisioning Criteria"],"operationId":"retrieveTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/staff":{"get":{"tags":["Staff"],"summary":"Retrieve Staff","description":"Returns the list of staff members.\n\nExample Requests:\n\nstaff\n\n\n\n\nRetrieve a Staff by status\n\nReturns the details of a Staff based on status.\n\nBy default it Returns all the ACTIVE Staff.\n\nIf status=INACTIVE, then it returns all INACTIVE Staff.\n\nand for status=ALL, it Returns both ACTIVE and INACTIVE Staff.\n\nExample Requests:\n\nstaff?status=active","operationId":"retrieveStaff","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"sqlSearch","in":"query","description":"sqlSearch","required":false,"type":"string"},{"name":"officeId","in":"query","description":"officeId","required":false,"type":"integer","format":"int64"},{"name":"staffInOfficeHierarchy","in":"query","description":"staffInOfficeHierarchy","required":false,"type":"boolean","default":false},{"name":"loanOfficersOnly","in":"query","description":"loanOfficersOnly","required":false,"type":"boolean","default":false},{"name":"status","in":"query","description":"status","required":false,"type":"string","default":"active"}],"responses":{"200":{"description":"GET https://DomainName/api/v1/staff?status={ACTIVE|INACTIVE|ALL}","schema":{"$ref":"#/definitions/GetStaffResponse"}}}},"post":{"tags":["Staff"],"summary":"Create a staff member","description":"Creates a staff member.\n\nMandatory Fields: \nofficeId, firstname, lastname\n\nOptional Fields: \nisLoanOfficer, isActive","operationId":"createStaff","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostStaffRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostStaffResponse"}}}}},"/staff/{staffId}":{"get":{"tags":["Staff"],"summary":"Retrieve a Staff Member","description":"Returns the details of a Staff Member.\n\nExample Requests:\n\nstaff/1","operationId":"retreiveStaff","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"staffId","in":"path","description":"staffId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetStaffResponse"}}}},"put":{"tags":["Staff"],"summary":"Update a Staff Member","description":"Updates the details of a staff member.","operationId":"updateStaff","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"staffId","in":"path","description":"staffId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutStaffRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutStaffResponse"}}}}},"/cashiers":{"get":{"tags":["cashiers"],"operationId":"getCashierData","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"officeId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"tellerId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"staffId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"date","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/tellers":{"get":{"tags":["Teller Cash Management"],"summary":"List all tellers","description":"Retrieves list tellers","operationId":"getTellerData","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"officeId","in":"query","description":"officeId","required":false,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetTellersResponse"}}}}},"post":{"tags":["Teller Cash Management"],"summary":"Create teller","description":"Mandatory Fields\nTeller name, OfficeId, Description, Start Date, Status\nOptional Fields\nEnd Date","operationId":"createTeller","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostTellersRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostTellersResponse"}}}}},"/tellers/{tellerId}":{"get":{"tags":["Teller Cash Management"],"summary":"Retrieve tellers","description":"","operationId":"findTeller","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetTellersResponse"}}}},"put":{"tags":["Teller Cash Management"],"summary":"Update teller","description":"","operationId":"updateTeller","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutTellersRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutTellersResponse"}}}},"delete":{"tags":["Teller Cash Management"],"operationId":"deleteTeller","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/tellers/{tellerId}/cashiers":{"get":{"tags":["Teller Cash Management"],"summary":"List Cashiers","description":"","operationId":"getCashierData","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"name":"fromdate","in":"query","description":"fromdate","required":false,"type":"string"},{"name":"todate","in":"query","description":"todate","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetTellersTellerIdCashiersResponse"}}}},"post":{"tags":["Teller Cash Management"],"summary":"Create Cashiers","description":"Mandatory Fields: \nCashier/staff, Fromm Date, To Date, Full Day or From time and To time\n\n\n\nOptional Fields: \nDescription/Notes","operationId":"createCashier","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostTellersTellerIdCashiersRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostTellersTellerIdCashiersResponse"}}}}},"/tellers/{tellerId}/cashiers/{cashierId}":{"get":{"tags":["Teller Cash Management"],"summary":"Retrieve a cashier","description":"","operationId":"findCashierData","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"name":"cashierId","in":"path","description":"cashierId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetTellersTellerIdCashiersCashierIdResponse"}}}},"put":{"tags":["Teller Cash Management"],"summary":"Update Cashier","description":"","operationId":"updateCashier","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"name":"cashierId","in":"path","description":"cashierId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutTellersTellerIdCashiersCashierIdRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutTellersTellerIdCashiersCashierIdResponse"}}}},"delete":{"tags":["Teller Cash Management"],"summary":"Delete Cashier","description":"","operationId":"deleteCashier","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"name":"cashierId","in":"path","description":"cashierId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteTellersTellerIdCashiersCashierIdResponse"}}}}},"/tellers/{tellerId}/cashiers/template":{"get":{"tags":["Teller Cash Management"],"summary":"Find Cashiers","description":"","operationId":"getCashierTemplate","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetTellersTellerIdCashiersTemplateResponse"}}}}},"/tellers/{tellerId}/cashiers/{cashierId}/allocate":{"post":{"tags":["Teller Cash Management"],"summary":"Allocate Cash To Cashier","description":"Mandatory Fields: \nDate, Amount, Currency, Notes/Comments","operationId":"allocateCashToCashier","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"name":"cashierId","in":"path","description":"cashierId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostTellersTellerIdCashiersCashierIdAllocateRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostTellersTellerIdCashiersCashierIdAllocateResponse"}}}}},"/tellers/{tellerId}/cashiers/{cashierId}/settle":{"post":{"tags":["Teller Cash Management"],"summary":"Settle Cash From Cashier","description":"Mandatory Fields\nDate, Amount, Currency, Notes/Comments","operationId":"settleCashFromCashier","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"name":"cashierId","in":"path","description":"cashierId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostTellersTellerIdCashiersCashierIdSettleRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostTellersTellerIdCashiersCashierIdSettleResponse"}}}}},"/tellers/{tellerId}/cashiers/{cashierId}/transactions":{"get":{"tags":["Teller Cash Management"],"summary":"Retrieve Cashier Transaction","description":"","operationId":"getTransactionsForCashier","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"name":"cashierId","in":"path","description":"cashierId","required":true,"type":"integer","format":"int64"},{"name":"currencyCode","in":"query","description":"currencyCode","required":false,"type":"string"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","description":"orderBy","required":false,"type":"string"},{"name":"sortOrder","in":"query","description":"sortOrder","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetTellersTellerIdCashiersCashiersIdTransactionsResponse"}}}}}},"/tellers/{tellerId}/cashiers/{cashierId}/summaryandtransactions":{"get":{"tags":["Teller Cash Management"],"summary":"Transactions Wtih Summary For Cashier","description":"","operationId":"getTransactionsWtihSummaryForCashier","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"name":"cashierId","in":"path","description":"cashierId","required":true,"type":"integer","format":"int64"},{"name":"currencyCode","in":"query","description":"currencyCode","required":false,"type":"string"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","description":"orderBy","required":false,"type":"string"},{"name":"sortOrder","in":"query","description":"sortOrder","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetTellersTellerIdCashiersCashiersIdSummaryAndTransactionsResponse"}}}}},"/tellers/{tellerId}/cashiers/{cashierId}/transactions/template":{"get":{"tags":["Teller Cash Management"],"summary":"Retrieve Cashier Transaction Template","description":"","operationId":"getCashierTxnTemplate","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"name":"cashierId","in":"path","description":"cashierId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetTellersTellerIdCashiersCashiersIdTransactionsTemplateResponse"}}}}},"/tellers/{tellerId}/transactions":{"get":{"tags":["Teller Cash Management"],"operationId":"getTransactionData","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"name":"dateRange","in":"query","description":"dateRange","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/tellers/{tellerId}/transactions/{transactionId}":{"get":{"tags":["Teller Cash Management"],"operationId":"findTransactionData","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"name":"transactionId","in":"path","description":"transactionId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/tellers/{tellerId}/journals":{"get":{"tags":["Teller Cash Management"],"operationId":"getJournalData","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"name":"cashierId","in":"query","description":"cashierId","required":false,"type":"integer","format":"int64"},{"name":"dateRange","in":"query","description":"dateRange","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/cashiersjournal":{"get":{"tags":["cashiersjournal"],"operationId":"getJournalData","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"officeId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"tellerId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"cashierId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"dateRange","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/workingdays/template":{"get":{"tags":["Working days"],"summary":"Working Days Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for working days.\n\nExample Request:\n\nworkingdays/template","operationId":"template","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetWorkingDaysTemplateResponse"}}}}},"/workingdays":{"get":{"tags":["Working days"],"summary":"List Working days","description":"Example Requests:\n\nworkingdays","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetWorkingDaysResponse"}}}}},"put":{"tags":["Working days"],"summary":"Update a Working Day","description":"Mandatory Fields\nrecurrence,repaymentRescheduleType,extendTermForDailyRepayments,locale","operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutWorkingDaysRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutWorkingDaysResponse"}}}}},"/client/{clientid}/addresses":{"get":{"tags":["Clients Address"],"summary":"List all addresses for a Client","description":"Example Requests:\n\nclient/1/addresses\n\n\nclients/1/addresses?status=false,true&&type=1,2,3","operationId":"getAddresses","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"status","in":"query","required":false,"type":"string"},{"name":"type","in":"query","required":false,"type":"integer","format":"int64"},{"name":"clientid","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/AddressData"}}}},"post":{"tags":["Clients Address"],"summary":"Create an address for a Client","description":"Mandatory Fields : \ntype and clientId","operationId":"AddClientAddress","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"type","in":"query","required":false,"type":"integer","format":"int64"},{"name":"clientid","in":"path","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/CommandProcessingResult"}}}},"put":{"tags":["Clients Address"],"summary":"update an address for a Client","description":"All the address fields can be updated by using update client address API\n\nMandatory Fields\ntype and addressId","operationId":"UpdateClientAddress","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientid","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/CommandProcessingResult"}}}}},"/client/addresses/template":{"get":{"tags":["Clients Address"],"operationId":"getAddressesTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/clients/{clientId}/charges/{chargeId}":{"get":{"tags":["Client Charges"],"summary":"Retrieve a Client Charge","description":"Example Requests:\nclients/1/charges/1\n\n\nclients/1/charges/1?fields=name,id","operationId":"retrieveClientCharge","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"chargeId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/ClientChargeData"}}}},"post":{"tags":["Client Charges"],"summary":"Pay a Client Charge","description":"Mandatory Fields\ntransactionDate and amount \"Pay either a part of or the entire due amount for a charge.(command=paycharge)\n\nWaive a Client Charge\n\n\nThis API provides the facility of waiving off the remaining amount on a client charge (command=waive)\n","operationId":"payOrWaiveClientCharge","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"chargeId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","required":false,"type":"string"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"}}}},"delete":{"tags":["Client Charges"],"summary":"Delete a Client Charge","description":"Deletes a Client Charge on which no transactions have taken place (either payments or waivers). ","operationId":"deleteClientCharge","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"chargeId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/CommandProcessingResult"}}}}},"/clients/{clientId}/charges":{"get":{"tags":["Client Charges"],"summary":"List Client Charges","description":"The list capability of client charges supports pagination.Example Requests:\nclients/1/charges\n\nclients/1/charges?offset=0&limit=5","operationId":"retrieveAllClientCharges","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"chargeStatus","in":"query","required":false,"type":"string","default":"all"},{"name":"pendingPayment","in":"query","required":false,"type":"boolean"},{"name":"limit","in":"query","required":false,"type":"integer","format":"int32"},{"name":"offset","in":"query","required":false,"type":"integer","format":"int32"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/ClientCharge"}}}},"post":{"tags":["Client Charges"],"summary":"Add Client Charge","description":" This API associates a Client charge with an implicit Client account\nMandatory Fields : \nchargeId and dueDate \nOptional Fields : \namount","operationId":"applyClientCharge","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/CommandProcessingResult"}}}}},"/clients/{clientId}/charges/template":{"get":{"tags":["Client Charges"],"operationId":"retrieveTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/clients/{clientId}/identifiers":{"get":{"tags":["Client Identifier Api"],"summary":"List all Identifiers for a Client","description":"Example Requests:\nclients/1/identifiers\n\n\nclients/1/identifiers?fields=documentKey,documentType,description","operationId":"retrieveAllClientIdentifiers","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/ClientIdentifierData"}}}},"post":{"tags":["Client Identifier Api"],"summary":"Create an Identifier for a Client","description":"Mandatory Fields\ndocumentKey, documentTypeId ","operationId":"createClientIdentifier","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/CommandProcessingResult"}}}}},"/clients/{clientId}/identifiers/template":{"get":{"tags":["Client Identifier Api"],"summary":"Retrieve Client Identifier Details Template","description":"This is a convenience resource useful for building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\n Field Defaults\n Allowed Value Lists\n\n\nExample Request:\nclients/1/identifiers/template","operationId":"newClientIdentifierDetails","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/ClientIdentifierData"}}}}},"/clients/{clientId}/identifiers/{identifierId}":{"get":{"tags":["Client Identifier Api"],"summary":"Retrieve a Client Identifier","description":"Example Requests:\nclients/1/identifier/2\n\n\nclients/1/identifier/2?template=true\n\nclients/1/identifiers/2?fields=documentKey,documentType,description","operationId":"retrieveClientIdentifiers","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"identifierId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/ClientIdentifierData"}}}},"put":{"tags":["Client Identifier Api"],"summary":"Update a Client Identifier","description":"","operationId":"updateClientIdentifer","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"identifierId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/CommandProcessingResult"}}}},"delete":{"tags":["Client Identifier Api"],"summary":"Delete a Client Identifier","description":"","operationId":"deleteClientIdentifier","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"identifierId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/CommandProcessingResult"}}}}},"/clients/{clientId}/transactions":{"get":{"tags":["Client Transaction"],"summary":"List Client Transactions","description":"The list capability of client transaction can support pagination.\n\nMandatory Arguments : offset\n Integer Mandatory, defaults to 0 \n Indicates the result from which pagination starts\nlimit\n Integer Mandatory, defaults to 200 \n Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1\n\n\n\nExample Requests:\nclients/189/transactions\nclients/189/transactions?offset=10&limit=50","operationId":"retrieveAllClientTransactions","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"offset","in":"query","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","required":false,"type":"integer","format":"int32"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/ClientTransactionData"}}}}},"/clients/{clientId}/transactions/{transactionId}":{"get":{"tags":["Client Transaction"],"summary":"Retrieve a Client Transaction","description":"Example Requests:\nclients/1/transactions/1\n\n\nclients/1/transactions/1?fields=id,officeName","operationId":"retrieveClientTransaction","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"transactionId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/ClientTransactionData"}}}},"post":{"tags":["Client Transaction"],"summary":"Undo a Client Transaction","description":"","operationId":"undoClientTransaction","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"transactionId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/CommandProcessingResult"}}}}},"/clients/{clientId}/accounts":{"get":{"tags":["Client Api"],"summary":"Retrieve client accounts overview","description":"An example of how a loan portfolio summary can be provided. This is requested in a specific use case of the community application.\nIt is quite reasonable to add resources like this to simplify User Interface development.\n\nExample Requests:\n \nclients/1/accounts\n\nclients/1/accounts?fields=loanAccounts,savingsAccounts","operationId":"retrieveAssociatedAccounts","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/AccountSummaryCollectionData"}},"400":{"description":"Bad Request"}}}},"/clients":{"get":{"tags":["Client Api"],"summary":"List Clients","description":"Example Requests:\n\nclients\n\nclients?fields=displayName,officeName,timeline\n\nclients?offset=10&limit=50\n\nclients?orderBy=displayName&sortOrder=DESC","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"sqlSearch","in":"query","required":false,"type":"string"},{"name":"officeId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"externalId","in":"query","required":false,"type":"string"},{"name":"displayName","in":"query","required":false,"type":"string"},{"name":"firstName","in":"query","required":false,"type":"string"},{"name":"lastName","in":"query","required":false,"type":"string"},{"name":"underHierarchy","in":"query","required":false,"type":"string"},{"name":"offset","in":"query","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","required":false,"type":"string"},{"name":"sortOrder","in":"query","required":false,"type":"string"},{"name":"orphansOnly","in":"query","required":false,"type":"boolean"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/ClientData"}}}},"post":{"tags":["Client Api"],"summary":"Create a Client","description":"Note:\n1. You can enter either:firstname/middlename/lastname - for a person (middlename is optional) OR fullname - for a business or organisation (or person known by one name).\n\n2.If address is enable(enable-address=true), then additional field called address has to be passed.","operationId":"create","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/ClientData"}}],"responses":{"200":{"description":"Successfully Client Created","schema":{"$ref":"#/definitions/CommandProcessingResult"}}}}},"/clients/{clientId}":{"get":{"tags":["Client Api"],"summary":"Retrieve a Client","description":"Example Requests:\n\nclients/1\n\n\nclients/1?template=true\n\n\nclients/1?fields=id,displayName,officeName","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"staffInSelectedOfficeOnly","in":"query","required":false,"type":"boolean","default":false}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/ClientData"}}}},"post":{"tags":["Client Api"],"summary":"Activate a Client | Close a Client | Reject a Client | Withdraw a Client | Reactivate a Client | UndoReject a Client | UndoWithdraw a Client | Assign a Staff | Unassign a Staff | Update Default Savings Account | Propose a Client Transfer | Withdraw a Client Transfer | Reject a Client Transfer | Accept a Client Transfer | Propose and Accept a Client Transfer | ","description":"\n[Reject a Client] Mandatory Fields : rejectionDate, rejectionReasonId\n\n[Withdraw a Client] Mandatory Fields : withdrawalDate, withdrawalReasonId\n\n[Reactivate a Client] Mandatory Fields : reactivationDate\n\n[UndoReject a Client] Mandatory Fields : reopenedDate\n\n[UndoWithdraw a Client]Mandatory Fields : reopenedDate\n","operationId":"activate","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","required":false,"type":"string"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}},{"in":"body","name":"body","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"}}}},"put":{"tags":["Client Api"],"summary":"Update a Client","description":"You can update any of the basic attributes of a client (but not its associations) using this API.\n\nChanging the relationship between a client and its office is not supported through this API. An API specific to handling transfers of clients between offices is available for the same.\n\nThe relationship between a client and a group must be removed through the Groups API.","operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","description":"ClientId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/ClientData"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/CommandProcessingResult"}}}},"delete":{"tags":["Client Api"],"summary":"Delete a Client","description":"If a client is in Pending state, you are allowed to Delete it. The delete is a 'hard delete' and cannot be recovered from. Once clients become active or have loans or savings associated with them, you cannot delete the client but you may Close the client if they have left the program.","operationId":"delete","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/CommandProcessingResult"}}}}},"/clients/template":{"get":{"tags":["Client Api"],"summary":"Retrieve Client Details Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value ListsExample Request:\n\nclients/template","operationId":"retrieveTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"officeId","in":"query","description":"optional","required":false,"type":"integer","format":"int64"},{"name":"commandParam","in":"query","description":"optional If commandParam=close retrieves all closureReasons which are associated with \"ClientClosureReason\" value.","required":false,"type":"string","default":"false"},{"name":"staffInSelectedOfficeOnly","in":"query","description":"optional Defaults to false if not provided. If staffInSelectedOfficeOnly=true only staff who are associated with the selected branch are returned.","required":false,"type":"boolean","default":false}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/ClientData"}}}}},"/surveys/{surveyId}/lookuptables":{"get":{"tags":["SPM API - LookUp Table"],"summary":"List all Lookup Table entries","description":"List all Lookup Table entries for a survey.","operationId":"fetchLookupTables","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"surveyId","in":"path","description":"Enter surveyId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/LookupTableData"}}}}},"post":{"tags":["SPM API - LookUp Table"],"summary":"Create a Lookup Table entry","description":"Add a new netry to a survey.\n\nMandatory Fields\nkey, score, validFrom, validTo","operationId":"createLookupTable","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"surveyId","in":"path","description":"Enter surveyId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"$ref":"#/definitions/LookupTableData"}}],"responses":{"200":{"description":"OK"}}}},"/surveys/{surveyId}/lookuptables/{key}":{"get":{"tags":["SPM API - LookUp Table"],"summary":"Retrieve a Lookup Table entry","description":"Retrieve a Lookup Table entry for a survey.","operationId":"findLookupTable","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"surveyId","in":"path","description":"Enter surveyId","required":true,"type":"integer","format":"int64"},{"name":"key","in":"path","description":"Enter key","required":true,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/LookupTableData"}}}}},"/surveys/{surveyId}/scorecards":{"get":{"tags":["SPM - Scorecards"],"summary":"List all Scorecard entries","description":"List all Scorecard entries for a survey.","operationId":"findBySurvey","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"surveyId","in":"path","description":"Enter surveyId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/Scorecard"}}}}},"post":{"tags":["SPM - Scorecards"],"summary":"Create a Scorecard entry","description":"Add a new netry to a survey.\n\nMandatory Fields\nclientId, createdOn, questionId, responseId, staffId","operationId":"createScorecard","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"surveyId","in":"path","description":"Enter surveyId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"$ref":"#/definitions/ScorecardData"}}],"responses":{"200":{"description":"OK"}}}},"/surveys/{surveyId}/scorecards/clients/{clientId}":{"get":{"tags":["SPM - Scorecards"],"operationId":"findBySurveyClient","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"surveyId","in":"path","description":"Enter surveyId","required":true,"type":"integer","format":"int64"},{"name":"clientId","in":"path","description":"Enter clientId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"array","items":{"$ref":"#/definitions/ScorecardData"}},"headers":{}}}}},"/surveys/{id}":{"get":{"tags":["SPM - Serveys"],"summary":"Retrieve a Survey","description":"","operationId":"findSurvey","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"Enter id","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/SurveyData"}}}},"delete":{"tags":["SPM - Serveys"],"summary":"Deactivate Survey","description":"","operationId":"deactivateSurvey","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"Enter id","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK"}}}},"/surveys":{"get":{"tags":["SPM - Serveys"],"summary":"List all Surveys","description":"","operationId":"fetchActiveSurveys","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/SurveyData"}}}}},"post":{"tags":["SPM - Serveys"],"summary":"Create a Survey","description":"Adds a new survey to collect client related data.\n\nMandatory Fields\n\ncountryCode, key, name, questions, responses, sequenceNo, text, value","operationId":"createSurvey","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"Create survey","required":false,"schema":{"$ref":"#/definitions/SurveyData"}}],"responses":{"200":{"description":"OK"}}}},"/templates/{templateId}":{"get":{"tags":["User Generated Documents"],"summary":"Retrieve a UGD","description":"Example Requests:\n\ntemplates/1","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"templateId","in":"path","description":"templateId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetTemplatesTemplateIdResponse"}}}},"post":{"tags":["User Generated Documents"],"operationId":"mergeTemplate","consumes":["application/json"],"produces":["text/html"],"parameters":[{"name":"templateId","in":"path","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"put":{"tags":["User Generated Documents"],"summary":"Update a UGD","description":"","operationId":"saveTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"templateId","in":"path","description":"templateId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutTemplatesTemplateIdRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutTemplatesTemplateIdResponse"}}}},"delete":{"tags":["User Generated Documents"],"summary":"Delete a UGD","description":"","operationId":"deleteTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"templateId","in":"path","description":"templateId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteTemplatesTemplateIdResponse"}}}}},"/templates/{templateId}/template":{"get":{"tags":["User Generated Documents"],"operationId":"getTemplateByTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"templateId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/templates/template":{"get":{"tags":["User Generated Documents"],"summary":"Retrieve UGD Details Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for UGDs. The UGD data returned consists of any or all of:\n\nARGUMENTS\nname String entity String type String text String optional mappers Mapper optional\nExample Request:\n\ntemplates/template","operationId":"template","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetTemplatesTemplateResponse"}}}}},"/templates":{"get":{"tags":["User Generated Documents"],"summary":"Retrieve all UGDs","description":"Example Requests:\n\ntemplates\n\nIt is also possible to get specific UGDs by entity and type:\n\ntemplates?type=0&entity=0\n[Entity: Id]\n\n\n\n\n\nclient: 0, loan: 1\n\n[Type: Id]\n\n\n\nDocument: 0, E-Mail (not yet): 1, SMS: 2","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"typeId","in":"query","description":"typeId","required":false,"type":"integer","default":-1,"format":"int32"},{"name":"entityId","in":"query","description":"entityId","required":false,"type":"integer","default":-1,"format":"int32"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetTemplatesResponse"}}}},"post":{"tags":["User Generated Documents"],"summary":"Add a UGD","description":"Adds a new UGD.\n\nMandatory Fields\nname\n\n\n\nExample Requests:\n\ntemplates/1","operationId":"createTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostTemplatesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostTemplatesResponse"}}}}},"/passwordpreferences":{"get":{"tags":["Password preferences"],"operationId":"retrieve","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetPasswordPreferencesTemplateResponse"}}}},"put":{"tags":["Password preferences"],"summary":"Update password preferences","description":"","operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutPasswordPreferencesTemplateRequest"}}],"responses":{"200":{"description":""}}}},"/passwordpreferences/template":{"get":{"tags":["Password preferences"],"summary":"List Application Password validation policies","description":"ARGUMENTS\nExample Requests:\n\npasswordpreferences","operationId":"template","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetPasswordPreferencesTemplateResponse"}}}}}},"/permissions":{"get":{"tags":["Permissions"],"summary":"List Application Permissions","description":"ARGUMENTS\nmakerCheckerableoptional, Values are true, false. Default is false.\nIf makerCheckerable=false or not supplied then a list of application permissions is returned. The \"selected\" attribute is always true in this case.\n\nIf makerCheckerable=true then the \"selected\" attribute shows whether the permission is enabled for Maker Check functionality.\n\nNote: Each Apache Fineract transaction is associated with a permission.\n\nExample Requests:\n\npermissions\n\n\npermissions?makerCheckerable=true\n\n\npermissions?fields=grouping,code","operationId":"retrieveAllPermissions","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetPermissionsResponse"}}}}},"put":{"tags":["Permissions"],"summary":"Enable/Disable Permissions for Maker Checker","description":"","operationId":"updatePermissionsDetails","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutPermissionsRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/CommandProcessingResult"}}}}},"/roles":{"get":{"tags":["Roles"],"summary":"List Roles","description":"Example Requests:\n\nroles\n\n\nroles?fields=name","operationId":"retrieveAllRoles","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetRolesResponse"}}}}},"post":{"tags":["Roles"],"summary":"Create a New Role","description":"Mandatory Fields\nname, description","operationId":"createRole","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostRolesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostRolesResponse"}}}}},"/roles/{roleId}":{"get":{"tags":["Roles"],"summary":"Retrieve a Role","description":"Example Requests:\n\nroles/1\n\n\nroles/1?fields=name","operationId":"retrieveRole","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roleId","in":"path","description":"roleId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetRolesRoleIdResponse"}}}},"post":{"tags":["Roles"],"summary":"Enable Role | Disable Role","description":"Description : Enable role in case role is disabled. | Disable the role in case role is not associated with any users.\n\n\n\n\n\nExample Request: https://DomainName/api/v1/roles/{roleId}?command=enable\n\n\n\n\n\nhttps://DomainName/api/v1/roles/{roleId}?command=disable","operationId":"actionsOnRoles","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roleId","in":"path","description":"roleId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostRolesRoleIdResponse"}}}},"put":{"tags":["Roles"],"summary":"Update a Role","description":"","operationId":"updateRole","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roleId","in":"path","description":"roleId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutRolesRoleIdRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutRolesRoleIdResponse"}}}},"delete":{"tags":["Roles"],"summary":"Delete a Role","description":"Description : Delete the role in case role is not associated with any users.","operationId":"deleteRole","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roleId","in":"path","description":"roleId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteRolesRoleIdResponse"}}}}},"/roles/{roleId}/permissions":{"get":{"tags":["Roles"],"summary":"Retrieve a Role's Permissions","description":"Example Requests:\n\nroles/1/permissions","operationId":"retrieveRolePermissions","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roleId","in":"path","description":"roleId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetRolesRoleIdPermissionsResponse"}}}},"put":{"tags":["Roles"],"summary":"Update a Role's Permissions","description":"","operationId":"updateRolePermissions","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roleId","in":"path","description":"roleId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutRolesRoleIdPermissionsRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutRolesRoleIdPermissionsResponse"}}}}},"/users/template":{"get":{"tags":["Users"],"summary":"Retrieve User Details Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\nExample Request:\n\nusers/template","operationId":"template","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetUsersTemplateResponse"}}}}},"/users":{"get":{"tags":["Users"],"summary":"Retrieve list of users","description":"Example Requests:\n\nusers\n\n\nusers?fields=id,username,email,officeName","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetUsersResponse"}}}}},"post":{"tags":["Users"],"summary":"Create a User","description":"Adds new application user.\n\nNote: Password information is not required (or processed). Password details at present are auto-generated and then sent to the email account given (which is why it can take a few seconds to complete).\n\nMandatory Fields: \nusername, firstname, lastname, email, officeId, roles, sendPasswordToEmail\n\nOptional Fields: \nstaffId,passwordNeverExpires,isSelfServiceUser,clients","operationId":"create","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostUsersRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostUsersResponse"}}}}},"/users/{userId}":{"get":{"tags":["Users"],"summary":"Retrieve a User","description":"Example Requests:\n\nusers/1\n\n\nusers/1?template=true\n\n\nusers/1?fields=username,officeName","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","description":"userId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetUsersUserIdResponse"}}}},"put":{"tags":["Users"],"summary":"Update a User","description":"When updating a password you must provide the repeatPassword parameter also.","operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","description":"userId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutUsersUserIdRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutUsersUserIdResponse"}}}},"delete":{"tags":["Users"],"summary":"Delete a User","description":"Removes the user and the associated roles and permissions.","operationId":"delete","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","description":"userId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteUsersUserIdResponse"}}}}}},"definitions":{"runaccrualsRequest":{"type":"object","required":["tillDate"],"properties":{"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"tillDate":{"type":"string","example":"04 June 2014"}}},"GetGLClosureResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":7},"officeId":{"type":"integer","format":"int64","example":1},"officeName":{"type":"string","example":"Head Office"},"closingDate":{"type":"string","format":"date","example":"2013,1,2"},"deleted":{"type":"boolean","example":false},"createdDate":{"type":"string","format":"date","example":"2013,1,3"},"lastUpdatedDate":{"type":"string","format":"date","example":"2013,1,3"},"createdByUserId":{"type":"integer","format":"int64","example":1},"createdByUsername":{"type":"string","example":"mifos"},"lastUpdatedByUserId":{"type":"integer","format":"int64","example":1},"lastUpdatedByUsername":{"type":"string","example":"mifos"},"comments":{"type":"string","example":"closed"}}},"PostGlClosuresResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"resourceId":{"type":"integer","format":"int64","example":9}}},"PostGLCLosuresRequest":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"closingDate":{"type":"string","format":"date","example":"06 December 2012"},"comments":{"type":"string","example":"The accountants are heading for a carribean vacation"},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"}}},"PutGlClosuresResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"resourceId":{"type":"integer","format":"int64","example":9},"comments":{"type":"string","example":"All transactions verified by Johnny Cash"}}},"PutGlClosuresRequest":{"type":"object","properties":{"comments":{"type":"string","example":"All transactions verified by Johnny Cash"}}},"DeleteGlClosuresResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"resourceId":{"type":"integer","format":"int64","example":9}}},"PostFinancialActivityAccountsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PostFinancialActivityAccountsRequest":{"type":"object","properties":{"financialActivityId":{"type":"integer","format":"int64","example":200},"glAccountId":{"type":"integer","format":"int64","example":2}}},"PutFinancialActivityAccountsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1},"comments":{"$ref":"#/definitions/PutFinancialActivityAccountscommentsSwagger"}}},"PutFinancialActivityAccountscommentsSwagger":{"type":"object","properties":{"glAccountId":{"type":"integer","format":"int64","example":1}}},"DeleteFinancialActivityAccountsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"EnumOptionData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"code":{"type":"string"},"value":{"type":"string"}}},"FinancialActivityData":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"name":{"type":"string"},"mappedGLAccountType":{"type":"string","enum":["ASSET","LIABILITY","EQUITY","INCOME","EXPENSE"]}}},"GLAccountData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"glCode":{"type":"string"},"type":{"$ref":"#/definitions/EnumOptionData"},"typeId":{"type":"integer","format":"int32"}}},"GetFinancialActivityAccountsResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"financialActivityData":{"$ref":"#/definitions/FinancialActivityData"},"glAccountData":{"$ref":"#/definitions/GLAccountData"}}},"CodeValueData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"active":{"type":"boolean"},"mandatory":{"type":"boolean"}}},"GetGLAccountsTemplateResponse":{"type":"object","properties":{"disabled":{"type":"boolean","example":false},"manualEntriesAllowed":{"type":"boolean","example":true},"type":{"$ref":"#/definitions/EnumOptionData"},"usage":{"$ref":"#/definitions/EnumOptionData"},"accountTypeOptions":{"type":"array","items":{"$ref":"#/definitions/EnumOptionData"}},"usageOptions":{"type":"array","items":{"$ref":"#/definitions/EnumOptionData"}},"assetHeaderAccountOptions":{"type":"array","items":{"$ref":"#/definitions/GLAccountData"}},"liabilityHeaderAccountOptions":{"type":"array","items":{"$ref":"#/definitions/GLAccountData"}},"equityHeaderAccountOptions":{"type":"array","items":{"$ref":"#/definitions/GLAccountData"}},"expenseHeaderAccountOptions":{"type":"array","items":{"$ref":"#/definitions/GLAccountData"}},"allowedAssetsTagOptions":{"type":"array","items":{"$ref":"#/definitions/CodeValueData"}},"allowedLiabilitiesTagOptions":{"type":"array","items":{"$ref":"#/definitions/CodeValueData"}},"allowedEquityTagOptions":{"type":"array","items":{"$ref":"#/definitions/CodeValueData"}},"allowedIncomeTagOptions":{"type":"array","items":{"$ref":"#/definitions/CodeValueData"}},"allowedExpensesTagOptions":{"type":"array","items":{"$ref":"#/definitions/CodeValueData"}}}},"GetGLAccountsResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":16},"name":{"type":"string","example":"Cash"},"parentId":{"type":"integer","format":"int64","example":1},"glCode":{"type":"string","example":"100001"},"disabled":{"type":"boolean","example":false},"manualEntriesAllowed":{"type":"boolean","example":true},"type":{"$ref":"#/definitions/EnumOptionData"},"usage":{"$ref":"#/definitions/EnumOptionData"},"description":{"type":"string","example":"Desc"},"nameDecorated":{"type":"string","example":"....Cash"},"tagId":{"$ref":"#/definitions/CodeValueData"},"organizationRunningBalance":{"type":"integer","format":"int64","example":118437}}},"PostGLAccountsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":22}}},"PostGLAccountsRequest":{"type":"object","properties":{"name":{"type":"string","example":"Cash at Bangalore"},"glCode":{"type":"string","example":"100001"},"manualEntriesAllowed":{"type":"boolean","example":true},"type":{"type":"string","example":"1"},"tagId":{"type":"string","example":"10"},"parentId":{"type":"integer","format":"int64","example":1},"usage":{"example":"1","$ref":"#/definitions/EnumOptionData"},"description":{"type":"string","example":"Desc"}}},"PutGLAccountsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1},"changes":{"$ref":"#/definitions/PutGLAccountsResponsechangesSwagger"}}},"PutGLAccountsResponsechangesSwagger":{"type":"object","properties":{"name":{"type":"string","example":"Cash at Bangalore"}}},"PutGLAccountsRequest":{"type":"object","properties":{"name":{"type":"string","example":"Cash at Bangalore"}}},"DeleteGLAccountsRequest":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1}}},"JournalEntryData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"officeId":{"type":"integer","format":"int64"},"glAccountId":{"type":"integer","format":"int64"},"glAccountType":{"$ref":"#/definitions/EnumOptionData"},"entryType":{"$ref":"#/definitions/EnumOptionData"},"amount":{"type":"number"},"transactionId":{"type":"string"}}},"PostJournalEntriesResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","description":"1"},"transactionId":{"type":"string","description":"RS9MCISID4WK1ZM"}}},"JournalEntryCommand":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64"},"transactionDate":{"type":"string","format":"date"},"comments":{"type":"string"},"referenceNumber":{"type":"string"},"accountingRuleId":{"type":"integer","format":"int64"},"credits":{"type":"array","items":{"$ref":"#/definitions/SingleDebitOrCreditEntryCommand"}},"debits":{"type":"array","items":{"$ref":"#/definitions/SingleDebitOrCreditEntryCommand"}}}},"SingleDebitOrCreditEntryCommand":{"type":"object","properties":{"glAccountId":{"type":"integer","format":"int64"},"amount":{"type":"number"},"comments":{"type":"string"},"parametersPassedInRequest":{"type":"array","uniqueItems":true,"items":{"type":"string"}},"commentsChanged":{"type":"boolean"},"glAmountChanged":{"type":"boolean"},"glAccountIdChanged":{"type":"boolean"}}},"PostJournalEntriesTransactionIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","description":"1"}}},"PostJournalEntriesTransactionIdRequest":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","description":"1"}}},"PostProvisioningEntriesResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PostProvisioningEntriesRequest":{"type":"object","properties":{"date":{"type":"string","example":"16 October 2015"},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"createjournalentries":{"type":"string","example":"true"},"provisioningentry":{"type":"string"},"entries":{"type":"string"}}},"PutProvisioningEntriesResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PutProvisioningEntriesRequest":{"type":"object","properties":{"command":{"type":"string","example":"recreateprovisioningentry"}}},"ProvisioningEntryData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"createdDate":{"type":"string","format":"date-time"}}},"LoanProductProvisioningEntryData":{"type":"object","properties":{"historyId":{"type":"integer","format":"int64"},"officeId":{"type":"integer","format":"int64"},"currencyCode":{"type":"string"},"productId":{"type":"integer","format":"int64"},"categoryId":{"type":"integer","format":"int64"},"overdueInDays":{"type":"integer","format":"int64"},"percentage":{"type":"number"},"liablityAccount":{"type":"integer","format":"int64"},"expenseAccount":{"type":"integer","format":"int64"},"criteriaId":{"type":"integer","format":"int64"},"outstandingBalance":{"type":"number"}}},"AccountingTagRuleData":{"type":"object","properties":{"tag":{"$ref":"#/definitions/CodeValueData"}}},"GetAccountRulesResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"officeId":{"type":"integer","format":"int64"},"officeName":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"systemDefined":{"type":"boolean"},"allowMultipleDebitEntries":{"type":"boolean"},"allowMultipleCreditEntries":{"type":"boolean"},"creditTags":{"type":"array","items":{"$ref":"#/definitions/AccountingTagRuleData"}},"debitTags":{"type":"array","items":{"$ref":"#/definitions/AccountingTagRuleData"}}}},"AccountingRuleData":{"type":"object","properties":{"creditTags":{"type":"array","items":{"$ref":"#/definitions/AccountingTagRuleData"}},"debitTags":{"type":"array","items":{"$ref":"#/definitions/AccountingTagRuleData"}}}},"PostAccountingRulesResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"resourceId":{"type":"integer","format":"int64","example":1}}},"PostAccountingRulesRequest":{"type":"object","properties":{"name":{"type":"string","example":"test"},"officeId":{"type":"integer","format":"int64","example":1},"accountToDebit":{"type":"integer","format":"int64","example":21},"accountToCredit":{"type":"integer","format":"int64","example":9},"description":{"type":"string","example":"Employee salary"}}},"PutAccountingRulesResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1},"changes":{"$ref":"#/definitions/PutAccountingRulesResponsechangesSwagger"}}},"PutAccountingRulesResponsechangesSwagger":{"type":"object","properties":{"name":{"type":"string","example":"Employee Salary posting rule"}}},"PutAccountingRulesRequest":{"type":"object","properties":{"name":{"type":"string","example":"Employee Salary posting rule"}}},"DeleteAccountingRulesResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"GetAccountRulesTemplateResponse":{"type":"object","properties":{"systemDefined":{"type":"boolean","example":false},"allowedOffices":{"type":"array","items":{"$ref":"#/definitions/OfficeData"}},"allowedAccounts":{"type":"array","items":{"$ref":"#/definitions/GLAccountData"}}}},"OfficeData":{"type":"object","properties":{"hierarchy":{"type":"string"}}},"BatchResponse":{"type":"object","properties":{"requestId":{"type":"integer","format":"int64"},"statusCode":{"type":"integer","format":"int32"},"headers":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/Header"}},"body":{"type":"string"}}},"Header":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}},"PostBatchesRequest":{"type":"object","properties":{"requestId":{"type":"integer","format":"int64","example":1},"relativeUrl":{"type":"string","example":"clients"},"method":{"type":"string","example":"POST"},"headers":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/Header"}},"reference":{"type":"integer","format":"int64","example":1},"body":{"$ref":"#/definitions/PostBodyRequestSwagger"}}},"PostBodyRequestSwagger":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"firstname":{"type":"string","example":"\"Petra\""},"lastname":{"type":"string","example":"\"Yton\""},"externalId":{"type":"string","example":"\"ex_externalId1\""},"dateFormat":{"type":"string","example":"\"dd MMMM yyyy\""},"locale":{"type":"string","example":"\"en\""},"active":{"type":"boolean","example":true},"activationDate":{"type":"string","example":"\"04 March 2009\""},"submittedOnDate":{"type":"string","example":"\"04 March 2009\""}}},"GetMakerCheckerResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"actionName":{"type":"string"},"entityName":{"type":"string"},"resourceId":{"type":"integer","format":"int64"},"subresourceId":{"type":"integer","format":"int64"},"maker":{"type":"string"},"madeOnDate":{"type":"string","format":"date-time"},"checker":{"type":"string"},"checkedOnDate":{"type":"string","format":"date-time"},"processingResult":{"type":"string"},"commandAsJson":{"type":"string"},"officeName":{"type":"string"},"groupLevelName":{"type":"string"},"groupName":{"type":"string"},"clientName":{"type":"string"},"loanAccountNo":{"type":"string"},"savingsAccountNo":{"type":"string"},"clientId":{"type":"integer","format":"int64"},"loanId":{"type":"integer","format":"int64"},"url":{"type":"string"}}},"AppUserData":{"type":"object","properties":{"selfServiceUser":{"type":"boolean"}}},"GetMakerCheckersSearchTemplateResponse":{"type":"object","properties":{"appUsers":{"type":"array","items":{"$ref":"#/definitions/AppUserData"}},"actionNames":{"type":"array","items":{"type":"string"}},"entityNames":{"type":"array","items":{"type":"string"}},"processingResults":{"type":"array","items":{"$ref":"#/definitions/ProcessingResultLookup"}}}},"ProcessingResultLookup":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"processingResult":{"type":"string"}}},"PostMakerCheckersResponse":{"type":"object","properties":{"auditId":{"type":"integer","format":"int64","example":1}}},"GetAccountNumberFormatsIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":2},"accountType":{"$ref":"#/definitions/EnumOptionData"},"prefixType":{"$ref":"#/definitions/EnumOptionData"}}},"GetAccountNumberFormatsResponseTemplate":{"type":"object","properties":{"accountTypeOptions":{"type":"array","items":{"$ref":"#/definitions/EnumOptionData"}},"prefixTypeOptions":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/definitions/EnumOptionData"}}}}},"PutAccountNumberFormatsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":2},"changes":{"$ref":"#/definitions/PutAccountNumberFormatschangesSwagger"}}},"PutAccountNumberFormatschangesSwagger":{"type":"object","properties":{"prefixType":{"type":"integer","format":"int64","example":"OFFICE_NAME"}}},"PutAccountNumberFormatsRequest":{"type":"object","properties":{"prefixType":{"type":"integer","format":"int64","example":1}}},"DeleteAccountNumberFormatsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":2}}},"PostAccountNumberFormatsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":4}}},"PostAccountNumberFormatsRequest":{"type":"object","properties":{"accountType":{"type":"integer","format":"int64","example":1},"prefixType":{"type":"integer","format":"int64","example":101}}},"PutCachechangesSwagger":{"type":"object","properties":{"cacheType":{"type":"integer","format":"int64","example":2}}},"PutCachesResponse":{"type":"object","properties":{"cacheType":{"$ref":"#/definitions/PutCachechangesSwagger"}}},"PutCachesRequest":{"type":"object","properties":{"cacheType":{"type":"integer","format":"int64","example":2}}},"GetCachesResponse":{"type":"object","properties":{"cacheType":{"$ref":"#/definitions/EnumOptionData"},"enabled":{"type":"boolean"}}},"CommandWrapper":{"type":"object","properties":{"groupId":{"type":"integer","format":"int64"},"clientId":{"type":"integer","format":"int64"},"loanId":{"type":"integer","format":"int64"},"savingsId":{"type":"integer","format":"int64"},"entityName":{"type":"string"},"taskPermissionName":{"type":"string"},"entityId":{"type":"integer","format":"int64"},"subentityId":{"type":"integer","format":"int64"},"href":{"type":"string"},"json":{"type":"string"},"transactionId":{"type":"string"},"productId":{"type":"integer","format":"int64"},"creditBureauId":{"type":"integer","format":"int64"},"organisationCreditBureauId":{"type":"integer","format":"int64"},"create":{"type":"boolean"},"createDatatable":{"type":"boolean"},"deleteDatatable":{"type":"boolean"},"updateDatatable":{"type":"boolean"},"datatableResource":{"type":"boolean"},"deleteOneToOne":{"type":"boolean"},"deleteMultiple":{"type":"boolean"},"updateOneToOne":{"type":"boolean"},"updateMultiple":{"type":"boolean"},"registerDatatable":{"type":"boolean"},"noteResource":{"type":"boolean"},"cacheResource":{"type":"boolean"},"updateOperation":{"type":"boolean"},"delete":{"type":"boolean"},"deleteOperation":{"type":"boolean"},"surveyResource":{"type":"boolean"},"registerSurvey":{"type":"boolean"},"fullFilSurvey":{"type":"boolean"},"workingDaysResource":{"type":"boolean"},"passwordPreferencesResource":{"type":"boolean"},"permissionResource":{"type":"boolean"},"userResource":{"type":"boolean"},"currencyResource":{"type":"boolean"},"loanDisburseDetailResource":{"type":"boolean"},"updateDisbursementDate":{"type":"boolean"},"update":{"type":"boolean"}}},"GetCodeValuesDataResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Passport"},"description":{"type":"string","example":"Passport information"},"position":{"type":"integer","format":"int32","example":0}}},"PostCodeValueDataResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":4}}},"PostCodeValuesDataRequest":{"type":"object","properties":{"name":{"type":"string","example":"Passport"},"description":{"type":"string","example":"Passport information"},"position":{"type":"integer","format":"int32","example":0}}},"PutCodeValueDataResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":4},"changes":{"$ref":"#/definitions/PutCodeValuechangesSwagger"}}},"PutCodeValuechangesSwagger":{"type":"object","properties":{"name":{"type":"string","example":"Passport"},"description":{"type":"string","example":"Passport information"},"position":{"type":"integer","format":"int32","example":0}}},"PutCodeValuesDataRequest":{"type":"object","properties":{"name":{"type":"string","example":"Passport"},"description":{"type":"string","example":"Passport information"},"position":{"type":"integer","format":"int32","example":0}}},"DeleteCodeValueDataResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":4}}},"GetCodesResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Education"},"systemDefined":{"type":"boolean","example":true}}},"PostCodesResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":4}}},"PostCodesRequest":{"type":"object","properties":{"name":{"type":"string","example":"MyNewCode"}}},"PutCodesApichangesSwagger":{"type":"object","properties":{"name":{"type":"string","example":"MyNewCode(changed)"}}},"PutCodesResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":4},"changes":{"$ref":"#/definitions/PutCodesApichangesSwagger"}}},"PutCodesRequest":{"type":"object","properties":{"name":{"type":"string","example":"MyNewCode(changed)"}}},"DeleteCodesResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":4}}},"PutExternalServiceRequest":{"type":"object","properties":{"username":{"type":"string","example":"test@mifos.org"},"password":{"type":"string","example":"XXXX"}}},"ExternalServicesPropertiesData":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}},"GetGlobalConfigurationsResponse":{"type":"object","properties":{"globalConfiguration":{"type":"array","items":{"$ref":"#/definitions/GlobalConfigurationPropertyData"}}}},"GlobalConfigurationPropertyData":{"type":"object","properties":{"name":{"type":"string"},"enabled":{"type":"boolean"},"value":{"type":"integer","format":"int64"},"dateValue":{"type":"string","format":"date-time"},"id":{"type":"integer","format":"int64"},"description":{"type":"string"},"trapDoor":{"type":"boolean"}}},"PutGlobalConfigurationsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":4},"changes":{"$ref":"#/definitions/PutGlobalConfigurationsResponsechangesSwagger"}}},"PutGlobalConfigurationsResponsechangesSwagger":{"type":"object","properties":{"enabled":{"type":"boolean","example":true}}},"PutGlobalConfigurationsRequest":{"type":"object","properties":{"enabled":{"type":"boolean","example":true},"value":{"type":"integer","format":"int64","example":2}}},"PutDataTablesResponse":{"type":"object","properties":{"resourceIdentifier":{"type":"string","example":"extra_client_details"}}},"PutDataTablesRequest":{"type":"object","properties":{"appTableName":{"type":"string","example":"m_client"},"dropColumns":{"type":"array","items":{"$ref":"#/definitions/PutDataTablesRequestDropColumns"}},"addColumns":{"type":"array","items":{"$ref":"#/definitions/PutDataTablesRequestAddColumns"}},"ChangeColumns":{"type":"array","items":{"$ref":"#/definitions/PutDataTablesRequestChangeColumns"}}}},"PutDataTablesRequestAddColumns":{"type":"object","properties":{"name":{"type":"string","example":"Question"},"type":{"type":"string","example":"Dropdown"},"code":{"type":"string","example":"Gender"},"mandatory":{"type":"boolean","example":true}}},"PutDataTablesRequestChangeColumns":{"type":"object","properties":{"name":{"type":"string","example":"Question"},"newName":{"type":"string","example":"Question 2"},"code":{"type":"string","example":"Gender"},"newCode":{"type":"string","example":"Gender2"},"mandatory":{"type":"boolean","example":true}}},"PutDataTablesRequestDropColumns":{"type":"object","properties":{"name":{"type":"string","example":"Gender_cd_Question"}}},"GetDataTablesResponse":{"type":"object","properties":{"appTableName":{"type":"string","example":"m_client"},"datatableName":{"type":"string","example":"extra_client_details"},"column":{"type":"array","items":{"$ref":"#/definitions/ResultsetColumnHeaderData"}}}},"ResultsetColumnHeaderData":{"type":"object","properties":{"columnName":{"type":"string"},"columnType":{"type":"string"},"columnLength":{"type":"integer","format":"int64"},"columnDisplayType":{"type":"string"},"columnCode":{"type":"string"},"dateDisplayType":{"type":"boolean"},"dateTimeDisplayType":{"type":"boolean"},"integerDisplayType":{"type":"boolean"},"decimalDisplayType":{"type":"boolean"},"booleanDisplayType":{"type":"boolean"},"codeValueDisplayType":{"type":"boolean"},"codeLookupDisplayType":{"type":"boolean"},"string":{"type":"boolean"},"mandatory":{"type":"boolean"},"optional":{"type":"boolean"}}},"PostDataTablesResponse":{"type":"object","properties":{"resourceIdentifier":{"type":"string","example":"extra_client_details"}}},"PostDataTablesRequest":{"type":"object","properties":{"applicationTableName":{"type":"string","example":"m_client"},"registeredTableName":{"type":"string","example":"extra_client_details"},"multiRow":{"type":"boolean","example":true},"columnHeaderData":{"type":"array","items":{"$ref":"#/definitions/ResultsetColumnHeaderData"}}}},"DeleteDataTablesResponse":{"type":"object","properties":{"resourceIdentifier":{"type":"string","example":"extra_client_details"}}},"PostDataTablesRegisterDatatableAppTable":{"type":"object"},"GetDataTablesAppTableIdResponse":{"type":"object","properties":{"columnHeaders":{"type":"array","items":{"$ref":"#/definitions/ResultsetColumnHeaderData"}},"data":{"type":"array","items":{"$ref":"#/definitions/ResultsetRowData"}}}},"ResultsetRowData":{"type":"object","properties":{"row":{"type":"array","items":{"type":"string"}}}},"PostDataTablesAppTableIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PostDataTablesAppTableIdRequest":{"type":"object","properties":{"BusinessDescription":{"type":"string","example":"Livestock sales"},"Comment":{"type":"string","example":"First comment made"},"Education_cv":{"type":"string","example":"Primary"},"Gender_cd":{"type":"integer","format":"int64","example":6},"HighestRatePaid":{"type":"number","format":"double","example":8.5},"NextVisit":{"type":"string","example":"01 October 2012"},"YearsinBusiness":{"type":"integer","format":"int64","example":5},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"locale":{"type":"string","example":"en"}}},"PutDataTablesAppTableIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1},"changes":{"$ref":"#/definitions/PutDataTablesAppTableIdResponseChanges"}}},"PutDataTablesAppTableIdResponseChanges":{"type":"object","properties":{"BusinessDescription":{"type":"string","example":"Livestock sales updated"}}},"PutDataTablesAppTableIdRequest":{"type":"object","properties":{"BusinessDescription":{"type":"string","example":"Livestock sales updated"}}},"PutDataTablesAppTableIdDatatableIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PutDataTablesAppTableIdDatatableIdRequest":{"type":"object","properties":{"DateOfBirth":{"type":"string","example":"01 June 1982"},"Education_cdHighest":{"type":"integer","format":"int64","example":5},"Name":{"type":"string","example":"June"},"OtherNotes":{"type":"string","example":"More notes"},"PointsScore":{"type":"integer","format":"int64","example":20},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"locale":{"type":"string","example":"en"}}},"DeleteDataTablesDatatableAppTableIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"DeleteDataTablesDatatableAppTableIdDatatableIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"DeleteEntityDatatableChecksTemplateResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PostEntityDatatableChecksTemplateResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PostEntityDatatableChecksTemplateRequest":{"type":"object","properties":{"entity":{"type":"string","example":"m_loan"},"status":{"type":"integer","format":"int64","example":100},"datatableName":{"type":"string","example":"Additional Details"},"productId":{"type":"integer","format":"int64","example":1}}},"GetEntityDatatableChecksResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"entity":{"type":"string"},"status":{"$ref":"#/definitions/EnumOptionData"},"datatableName":{"type":"string"},"systemDefined":{"type":"boolean"},"order":{"type":"integer","format":"int64"},"productId":{"type":"integer","format":"int64"},"productName":{"type":"string"}}},"AppUser":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"email":{"type":"string"},"username":{"type":"string"},"firstname":{"type":"string"},"lastname":{"type":"string"},"password":{"type":"string"},"accountNonExpired":{"type":"boolean"},"accountNonLocked":{"type":"boolean"},"credentialsNonExpired":{"type":"boolean"},"enabled":{"type":"boolean"},"deleted":{"type":"boolean"},"office":{"$ref":"#/definitions/Office"},"staff":{"$ref":"#/definitions/Staff"},"roles":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/Role"}},"lastTimePasswordUpdated":{"type":"string","format":"date-time"},"passwordNeverExpires":{"type":"boolean"},"appUserClientMappings":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/AppUserClientMapping"}},"authorities":{"type":"array","items":{"$ref":"#/definitions/GrantedAuthority"}},"selfServiceUser":{"type":"boolean"},"staffId":{"type":"integer","format":"int64"},"staffDisplayName":{"type":"string"},"notEnabled":{"type":"boolean"},"new":{"type":"boolean"}}},"AppUserClientMapping":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"client":{"$ref":"#/definitions/Client"},"new":{"type":"boolean"}}},"Charge":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"amount":{"type":"number"},"currencyCode":{"type":"string"},"chargeTimeType":{"type":"integer","format":"int32"},"chargeCalculation":{"type":"integer","format":"int32"},"chargePaymentMode":{"type":"integer","format":"int32"},"feeInterval":{"type":"integer","format":"int32"},"penalty":{"type":"boolean"},"active":{"type":"boolean"},"deleted":{"type":"boolean"},"minCap":{"type":"number"},"maxCap":{"type":"number"},"account":{"$ref":"#/definitions/GLAccount"},"taxGroup":{"$ref":"#/definitions/TaxGroup"},"feeOnMonthDay":{"$ref":"#/definitions/MonthDay"},"savingsCharge":{"type":"boolean"},"annualFee":{"type":"boolean"},"monthlyFee":{"type":"boolean"},"overdueInstallment":{"type":"boolean"},"allowedLoanChargeTime":{"type":"boolean"},"allowedClientChargeTime":{"type":"boolean"},"allowedSavingsChargeTime":{"type":"boolean"},"loanCharge":{"type":"boolean"},"clientCharge":{"type":"boolean"},"allowedSavingsChargeCalculationType":{"type":"boolean"},"allowedClientChargeCalculationType":{"type":"boolean"},"percentageOfApprovedAmount":{"type":"boolean"},"percentageOfDisbursementAmount":{"type":"boolean"},"disbursementCharge":{"type":"boolean"},"new":{"type":"boolean"}}},"ChargeData":{"type":"object","properties":{"penalty":{"type":"boolean"},"overdueInstallmentCharge":{"type":"boolean"}}},"Chronology":{"type":"object","properties":{"zone":{"$ref":"#/definitions/DateTimeZone"}}},"Client":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"office":{"$ref":"#/definitions/Office"},"transferToOffice":{"$ref":"#/definitions/Office"},"image":{"$ref":"#/definitions/Image"},"status":{"type":"integer","format":"int32"},"firstname":{"type":"string"},"middlename":{"type":"string"},"lastname":{"type":"string"},"displayName":{"type":"string"},"externalId":{"type":"string"},"staff":{"$ref":"#/definitions/Staff"},"groups":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/Group"}},"accountNumberRequiresAutoGeneration":{"type":"boolean"},"closureDate":{"type":"string","format":"date"},"withdrawalDate":{"type":"string","format":"date"},"submittedOnDate":{"type":"string","format":"date"},"legalForm":{"type":"integer","format":"int32"},"reopenedDate":{"type":"string","format":"date"},"active":{"type":"boolean"},"closed":{"type":"boolean"},"rejected":{"type":"boolean"},"rejectedDate":{"type":"string","format":"date"},"notActive":{"type":"boolean"},"pending":{"type":"boolean"},"withdrawn":{"type":"boolean"},"transferInProgress":{"type":"boolean"},"transferOnHold":{"type":"boolean"},"transferInProgressOrOnHold":{"type":"boolean"},"notPending":{"type":"boolean"},"activationLocalDate":{"type":"string","format":"date"},"officeJoiningLocalDate":{"type":"string","format":"date"},"notStaff":{"type":"boolean"},"new":{"type":"boolean"}}},"CurrencyData":{"type":"object"},"DatatableCheckStatusData":{"type":"object"},"DatatableChecksData":{"type":"object"},"DateTimeField":{"type":"object","properties":{"durationField":{"$ref":"#/definitions/DurationField"},"minimumValue":{"type":"integer","format":"int32"},"maximumValue":{"type":"integer","format":"int32"},"leapDurationField":{"$ref":"#/definitions/DurationField"},"rangeDurationField":{"$ref":"#/definitions/DurationField"},"lenient":{"type":"boolean"},"name":{"type":"string"},"type":{"$ref":"#/definitions/DateTimeFieldType"},"supported":{"type":"boolean"}}},"DateTimeFieldType":{"type":"object","properties":{"rangeDurationType":{"$ref":"#/definitions/DurationFieldType"},"durationType":{"$ref":"#/definitions/DurationFieldType"},"name":{"type":"string"}}},"DateTimeZone":{"type":"object","properties":{"fixed":{"type":"boolean"},"id":{"type":"string"}}},"DurationField":{"type":"object","properties":{"precise":{"type":"boolean"},"unitMillis":{"type":"integer","format":"int64"},"name":{"type":"string"},"type":{"$ref":"#/definitions/DurationFieldType"},"supported":{"type":"boolean"}}},"DurationFieldType":{"type":"object","properties":{"name":{"type":"string"}}},"FloatingRate":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"floatingRatePeriods":{"type":"array","items":{"$ref":"#/definitions/FloatingRatePeriod"}},"createdBy":{"$ref":"#/definitions/AppUser"},"modifiedBy":{"$ref":"#/definitions/AppUser"},"createdOn":{"type":"string","format":"date-time"},"modifiedOn":{"type":"string","format":"date-time"},"active":{"type":"boolean"},"baseLendingRate":{"type":"boolean"},"new":{"type":"boolean"}}},"FloatingRatePeriod":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"fromDate":{"type":"string","format":"date-time"},"interestRate":{"type":"number"},"createdBy":{"$ref":"#/definitions/AppUser"},"modifiedBy":{"$ref":"#/definitions/AppUser"},"createdOn":{"type":"string","format":"date-time"},"modifiedOn":{"type":"string","format":"date-time"},"active":{"type":"boolean"},"floatingRatesId":{"$ref":"#/definitions/FloatingRate"},"differentialToBaseLendingRate":{"type":"boolean"},"new":{"type":"boolean"}}},"FundData":{"type":"object"},"GLAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"children":{"type":"array","items":{"$ref":"#/definitions/GLAccount"}},"name":{"type":"string"},"glCode":{"type":"string"},"disabled":{"type":"boolean"},"manualEntriesAllowed":{"type":"boolean"},"type":{"type":"integer","format":"int32"},"usage":{"type":"integer","format":"int32"},"headerAccount":{"type":"boolean"},"detailAccount":{"type":"boolean"},"new":{"type":"boolean"}}},"GetEntityDatatableChecksTemplateResponse":{"type":"object","properties":{"entities":{"type":"array","items":{"type":"string"}},"statusClient":{"type":"array","items":{"$ref":"#/definitions/DatatableCheckStatusData"}},"statusGroup":{"type":"array","items":{"$ref":"#/definitions/DatatableCheckStatusData"}},"statusSavings":{"type":"array","items":{"$ref":"#/definitions/DatatableCheckStatusData"}},"statusLoans":{"type":"array","items":{"$ref":"#/definitions/DatatableCheckStatusData"}},"datatables":{"type":"array","items":{"$ref":"#/definitions/DatatableChecksData"}},"loanProductDatas":{"type":"array","items":{"$ref":"#/definitions/LoanProductData"}},"savingsProductDatas":{"type":"array","items":{"$ref":"#/definitions/SavingsProductData"}}}},"GrantedAuthority":{"type":"object","properties":{"authority":{"type":"string"}}},"Group":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"office":{"$ref":"#/definitions/Office"},"staff":{"$ref":"#/definitions/Staff"},"parent":{"$ref":"#/definitions/Group"},"groupLevel":{"$ref":"#/definitions/GroupLevel"},"clientMembers":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/Client"}},"submittedOnDate":{"type":"string","format":"date"},"accountNumberRequiresAutoGeneration":{"type":"boolean"},"active":{"type":"boolean"},"closed":{"type":"boolean"},"activeClientMembers":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/Client"}},"childGroup":{"type":"boolean"},"notActive":{"type":"boolean"},"pending":{"type":"boolean"},"transferInProgress":{"type":"boolean"},"transferOnHold":{"type":"boolean"},"group":{"type":"boolean"},"center":{"type":"boolean"},"transferInProgressOrOnHold":{"type":"boolean"},"notPending":{"type":"boolean"},"activationLocalDate":{"type":"string","format":"date"},"new":{"type":"boolean"}}},"GroupLevel":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"parentId":{"type":"integer","format":"int64"},"superParent":{"type":"boolean"},"levelName":{"type":"string"},"recursable":{"type":"boolean"},"group":{"type":"boolean"},"center":{"type":"boolean"},"new":{"type":"boolean"}}},"Image":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"location":{"type":"string"},"storageType":{"type":"integer","format":"int32"},"new":{"type":"boolean"}}},"LoanProduct":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"shortName":{"type":"string"},"loanProductRelatedDetail":{"$ref":"#/definitions/LoanProductRelatedDetail"},"includeInBorrowerCycle":{"type":"boolean"},"startDate":{"type":"string","format":"date"},"closeDate":{"type":"string","format":"date"},"externalId":{"type":"string"},"minimumDaysBetweenDisbursalAndFirstRepayment":{"type":"integer","format":"int32"},"productInterestRecalculationDetails":{"$ref":"#/definitions/LoanProductInterestRecalculationDetails"},"loanProductGuaranteeDetails":{"$ref":"#/definitions/LoanProductGuaranteeDetails"},"principalThresholdForLastInstallment":{"type":"number"},"installmentAmountInMultiplesOf":{"type":"integer","format":"int32"},"floatingRates":{"$ref":"#/definitions/LoanProductFloatingRates"},"currency":{"$ref":"#/definitions/MonetaryCurrency"},"accountingType":{"type":"integer","format":"int32"},"accrualBasedAccountingEnabled":{"type":"boolean"},"minNominalInterestRatePerPeriod":{"type":"number"},"maxNominalInterestRatePerPeriod":{"type":"number"},"minNumberOfRepayments":{"type":"integer","format":"int32"},"maxNumberOfRepayments":{"type":"integer","format":"int32"},"repaymentStrategy":{"$ref":"#/definitions/LoanTransactionProcessingStrategy"},"loanProductCharges":{"type":"array","items":{"$ref":"#/definitions/Charge"}},"loanProductConfigurableAttributes":{"$ref":"#/definitions/LoanProductConfigurableAttributes"},"principalAmount":{"$ref":"#/definitions/Money"},"minPrincipalAmount":{"$ref":"#/definitions/Money"},"maxPrincipalAmount":{"$ref":"#/definitions/Money"},"arrearsBasedOnOriginalSchedule":{"type":"boolean"},"multiDisburseLoan":{"type":"boolean"},"interestRecalculationEnabled":{"type":"boolean"},"numberOfRepayments":{"type":"integer","format":"int32"},"nominalInterestRatePerPeriod":{"type":"number"},"interestPeriodFrequencyType":{"type":"string","enum":["DAYS","WEEKS","MONTHS","YEARS","INVALID"]},"linkedToFloatingInterestRate":{"type":"boolean"},"cashBasedAccountingEnabled":{"type":"boolean"},"upfrontAccrualAccountingEnabled":{"type":"boolean"},"accountingDisabled":{"type":"boolean"},"periodicAccrualAccountingEnabled":{"type":"boolean"},"holdGuaranteeFundsEnabled":{"type":"boolean"},"new":{"type":"boolean"}}},"LoanProductBorrowerCycleVariationData":{"type":"object","properties":{"borrowerCycleNumber":{"type":"integer","format":"int32"},"paramType":{"type":"string","enum":["INVALID","PRINCIPAL","INTERESTRATE","REPAYMENT"]},"valueConditionType":{"type":"string","enum":["INVALID","EQUAL","GREATERTHAN"]},"defaultValue":{"type":"number"}}},"LoanProductConfigurableAttributes":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"loanProduct":{"$ref":"#/definitions/LoanProduct"},"amortizationBoolean":{"type":"boolean"},"interestMethodBoolean":{"type":"boolean"},"transactionProcessingStrategyBoolean":{"type":"boolean"},"interestCalcPeriodBoolean":{"type":"boolean"},"arrearsToleranceBoolean":{"type":"boolean"},"repaymentEveryBoolean":{"type":"boolean"},"graceOnPrincipalAndInterestPaymentBoolean":{"type":"boolean"},"graceOnArrearsAgingBoolean":{"type":"boolean"},"new":{"type":"boolean"}}},"LoanProductData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"description":{"type":"string"},"fundId":{"type":"integer","format":"int64"},"fundName":{"type":"string"},"currency":{"$ref":"#/definitions/CurrencyData"},"principal":{"type":"number"},"minPrincipal":{"type":"number"},"maxPrincipal":{"type":"number"},"numberOfRepayments":{"type":"integer","format":"int32"},"repaymentEvery":{"type":"integer","format":"int32"},"repaymentFrequencyType":{"$ref":"#/definitions/EnumOptionData"},"interestRatePerPeriod":{"type":"number"},"interestRateFrequencyType":{"$ref":"#/definitions/EnumOptionData"},"annualInterestRate":{"type":"number"},"interestRateDifferential":{"type":"number"},"minDifferentialLendingRate":{"type":"number"},"defaultDifferentialLendingRate":{"type":"number"},"maxDifferentialLendingRate":{"type":"number"},"amortizationType":{"$ref":"#/definitions/EnumOptionData"},"interestType":{"$ref":"#/definitions/EnumOptionData"},"interestCalculationPeriodType":{"$ref":"#/definitions/EnumOptionData"},"allowPartialPeriodInterestCalcualtion":{"type":"boolean"},"inArrearsTolerance":{"type":"number"},"transactionProcessingStrategyId":{"type":"integer","format":"int64"},"transactionProcessingStrategyName":{"type":"string"},"graceOnPrincipalPayment":{"type":"integer","format":"int32"},"recurringMoratoriumOnPrincipalPeriods":{"type":"integer","format":"int32"},"graceOnInterestPayment":{"type":"integer","format":"int32"},"graceOnInterestCharged":{"type":"integer","format":"int32"},"graceOnArrearsAgeing":{"type":"integer","format":"int32"},"daysInMonthType":{"$ref":"#/definitions/EnumOptionData"},"daysInYearType":{"$ref":"#/definitions/EnumOptionData"},"interestRecalculationData":{"$ref":"#/definitions/LoanProductInterestRecalculationData"},"principalVariationsForBorrowerCycle":{"type":"array","items":{"$ref":"#/definitions/LoanProductBorrowerCycleVariationData"}},"interestRateVariationsForBorrowerCycle":{"type":"array","items":{"$ref":"#/definitions/LoanProductBorrowerCycleVariationData"}},"numberOfRepaymentVariationsForBorrowerCycle":{"type":"array","items":{"$ref":"#/definitions/LoanProductBorrowerCycleVariationData"}},"fundOptions":{"type":"array","items":{"$ref":"#/definitions/FundData"}},"repaymentFrequencyTypeOptions":{"type":"array","items":{"$ref":"#/definitions/EnumOptionData"}},"interestRateFrequencyTypeOptions":{"type":"array","items":{"$ref":"#/definitions/EnumOptionData"}},"amortizationTypeOptions":{"type":"array","items":{"$ref":"#/definitions/EnumOptionData"}},"interestTypeOptions":{"type":"array","items":{"$ref":"#/definitions/EnumOptionData"}},"interestCalculationPeriodTypeOptions":{"type":"array","items":{"$ref":"#/definitions/EnumOptionData"}},"chargeOptions":{"type":"array","items":{"$ref":"#/definitions/ChargeData"}},"multiDisburseLoan":{"type":"boolean"},"outstandingLoanBalance":{"type":"number"},"getloanProductConfigurableAttributes":{"$ref":"#/definitions/LoanProductConfigurableAttributes"},"minimumGapBetweenInstallments":{"type":"integer","format":"int32"},"maximumGapBetweenInstallments":{"type":"integer","format":"int32"},"floatingInterestRateCalculationAllowed":{"type":"boolean"},"linkedToFloatingInterestRates":{"type":"boolean"},"variableInstallmentsAllowed":{"type":"boolean"},"compoundingToBePostedAsTransaction":{"type":"boolean"},"interestRecalculationEnabled":{"type":"boolean"}}},"LoanProductFloatingRates":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"loanProduct":{"$ref":"#/definitions/LoanProduct"},"floatingRate":{"$ref":"#/definitions/FloatingRate"},"interestRateDifferential":{"type":"number"},"minDifferentialLendingRate":{"type":"number"},"defaultDifferentialLendingRate":{"type":"number"},"maxDifferentialLendingRate":{"type":"number"},"floatingInterestRateCalculationAllowed":{"type":"boolean"},"new":{"type":"boolean"}}},"LoanProductGuaranteeDetails":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"mandatoryGuarantee":{"type":"number"},"minimumGuaranteeFromOwnFunds":{"type":"number"},"minimumGuaranteeFromGuarantor":{"type":"number"},"new":{"type":"boolean"}}},"LoanProductInterestRecalculationData":{"type":"object","properties":{"interestRecalculationCompoundingType":{"$ref":"#/definitions/EnumOptionData"},"rescheduleStrategyType":{"$ref":"#/definitions/EnumOptionData"},"recalculationRestFrequencyType":{"$ref":"#/definitions/EnumOptionData"},"recalculationRestFrequencyInterval":{"type":"integer","format":"int32"},"recalculationRestFrequencyNthDay":{"$ref":"#/definitions/EnumOptionData"},"recalculationRestFrequencyWeekday":{"$ref":"#/definitions/EnumOptionData"},"recalculationRestFrequencyOnDay":{"type":"integer","format":"int32"},"recalculationCompoundingFrequencyType":{"$ref":"#/definitions/EnumOptionData"},"recalculationCompoundingFrequencyInterval":{"type":"integer","format":"int32"},"recalculationCompoundingFrequencyNthDay":{"$ref":"#/definitions/EnumOptionData"},"recalculationCompoundingFrequencyWeekday":{"$ref":"#/definitions/EnumOptionData"},"recalculationCompoundingFrequencyOnDay":{"type":"integer","format":"int32"},"compoundingToBePostedAsTransaction":{"type":"boolean"}}},"LoanProductInterestRecalculationDetails":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"interestRecalculationCompoundingMethod":{"type":"integer","format":"int32"},"rescheduleStrategyMethod":{"type":"integer","format":"int32"},"restFrequencyType":{"type":"string","enum":["INVALID","SAME_AS_REPAYMENT_PERIOD","DAILY","WEEKLY","MONTHLY"]},"restInterval":{"type":"integer","format":"int32"},"restFrequencyNthDay":{"type":"integer","format":"int32"},"restFrequencyWeekday":{"type":"integer","format":"int32"},"restFrequencyOnDay":{"type":"integer","format":"int32"},"compoundingFrequencyType":{"type":"string","enum":["INVALID","SAME_AS_REPAYMENT_PERIOD","DAILY","WEEKLY","MONTHLY"]},"compoundingInterval":{"type":"integer","format":"int32"},"compoundingFrequencyNthDay":{"type":"integer","format":"int32"},"compoundingFrequencyWeekday":{"type":"integer","format":"int32"},"compoundingFrequencyOnDay":{"type":"integer","format":"int32"},"isCompoundingToBePostedAsTransaction":{"type":"boolean"},"arrearsBasedOnOriginalSchedule":{"type":"boolean"},"new":{"type":"boolean"}}},"LoanProductRelatedDetail":{"type":"object","properties":{"currency":{"$ref":"#/definitions/MonetaryCurrency"},"principal":{"$ref":"#/definitions/Money"},"nominalInterestRatePerPeriod":{"type":"number"},"interestPeriodFrequencyType":{"type":"string","enum":["DAYS","WEEKS","MONTHS","YEARS","INVALID"]},"annualNominalInterestRate":{"type":"number"},"interestMethod":{"type":"string","enum":["DECLINING_BALANCE","FLAT","INVALID"]},"interestCalculationPeriodMethod":{"type":"string","enum":["DAILY","SAME_AS_REPAYMENT_PERIOD","INVALID"]},"allowPartialPeriodInterestCalcualtion":{"type":"boolean"},"repayEvery":{"type":"integer","format":"int32"},"repaymentPeriodFrequencyType":{"type":"string","enum":["DAYS","WEEKS","MONTHS","YEARS","INVALID"]},"numberOfRepayments":{"type":"integer","format":"int32"},"graceOnPrincipalPayment":{"type":"integer","format":"int32"},"graceOnInterestPayment":{"type":"integer","format":"int32"},"amortizationMethod":{"type":"string","enum":["EQUAL_PRINCIPAL","EQUAL_INSTALLMENTS","INVALID"]},"inArrearsTolerance":{"$ref":"#/definitions/Money"},"graceOnArrearsAgeing":{"type":"integer","format":"int32"},"arrearsTolerance":{"type":"number"},"interestRecalculationEnabled":{"type":"boolean"},"graceOnDueDate":{"type":"integer","format":"int32"}}},"LoanTransactionProcessingStrategy":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"standardStrategy":{"type":"boolean"},"heavensfamilyStrategy":{"type":"boolean"},"earlyPaymentStrategy":{"type":"boolean"},"creocoreStrategy":{"type":"boolean"},"indianRBIStrategy":{"type":"boolean"},"principalInterestPenaltiesFeesOrderStrategy":{"type":"boolean"},"interestPrincipalPenaltiesFeesOrderStrategy":{"type":"boolean"},"new":{"type":"boolean"}}},"MonetaryCurrency":{"type":"object","properties":{"code":{"type":"string"},"digitsAfterDecimal":{"type":"integer","format":"int32"},"currencyInMultiplesOf":{"type":"integer","format":"int32"}}},"Money":{"type":"object","properties":{"currencyCode":{"type":"string"},"currencyDigitsAfterDecimal":{"type":"integer","format":"int32"},"amount":{"type":"number"},"currency":{"$ref":"#/definitions/MonetaryCurrency"},"zero":{"type":"boolean"},"currencyInMultiplesOf":{"type":"integer","format":"int32"},"amountDefaultedToNullIfZero":{"type":"number"},"lessThanZero":{"type":"boolean"},"greaterThanZero":{"type":"boolean"}}},"MonthDay":{"type":"object","properties":{"dayOfMonth":{"type":"integer","format":"int32"},"fieldTypes":{"type":"array","items":{"$ref":"#/definitions/DateTimeFieldType"}},"monthOfYear":{"type":"integer","format":"int32"},"chronology":{"$ref":"#/definitions/Chronology"},"values":{"type":"array","items":{"type":"integer","format":"int32"}},"fields":{"type":"array","items":{"$ref":"#/definitions/DateTimeField"}}}},"Office":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"hierarchy":{"type":"string"},"openingLocalDate":{"type":"string","format":"date"},"new":{"type":"boolean"}}},"Permission":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"grouping":{"type":"string"},"code":{"type":"string"},"new":{"type":"boolean"}}},"Role":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"disabled":{"type":"boolean"},"permissions":{"type":"array","items":{"$ref":"#/definitions/Permission"}},"enabled":{"type":"boolean"},"new":{"type":"boolean"}}},"SavingsProductData":{"type":"object","properties":{"name":{"type":"string"},"depositAccountType":{"type":"string"}}},"Staff":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"loanOfficer":{"type":"boolean"},"active":{"type":"boolean"},"image":{"$ref":"#/definitions/Image"},"notActive":{"type":"boolean"},"notLoanOfficer":{"type":"boolean"},"new":{"type":"boolean"}}},"TaxComponent":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"createdBy":{"$ref":"#/definitions/AppUser"},"createdDate":{"type":"string","format":"date-time"},"lastModifiedBy":{"$ref":"#/definitions/AppUser"},"lastModifiedDate":{"type":"string","format":"date-time"},"percentage":{"type":"number"},"debitAccountType":{"type":"integer","format":"int32"},"debitAcount":{"$ref":"#/definitions/GLAccount"},"creditAccountType":{"type":"integer","format":"int32"},"creditAcount":{"$ref":"#/definitions/GLAccount"},"taxComponentHistories":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/TaxComponentHistory"}},"taxGroupMappings":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/TaxGroupMappings"}},"new":{"type":"boolean"}}},"TaxComponentHistory":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"createdBy":{"$ref":"#/definitions/AppUser"},"createdDate":{"type":"string","format":"date-time"},"lastModifiedBy":{"$ref":"#/definitions/AppUser"},"lastModifiedDate":{"type":"string","format":"date-time"},"percentage":{"type":"number"},"new":{"type":"boolean"}}},"TaxGroup":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"createdBy":{"$ref":"#/definitions/AppUser"},"createdDate":{"type":"string","format":"date-time"},"lastModifiedBy":{"$ref":"#/definitions/AppUser"},"lastModifiedDate":{"type":"string","format":"date-time"},"name":{"type":"string"},"taxGroupMappings":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/TaxGroupMappings"}},"new":{"type":"boolean"}}},"TaxGroupMappings":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"createdBy":{"$ref":"#/definitions/AppUser"},"createdDate":{"type":"string","format":"date-time"},"lastModifiedBy":{"$ref":"#/definitions/AppUser"},"lastModifiedDate":{"type":"string","format":"date-time"},"taxComponent":{"$ref":"#/definitions/TaxComponent"},"endDate":{"type":"string","format":"date-time"},"new":{"type":"boolean"}}},"PutReportResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":132},"changes":{"$ref":"#/definitions/PutReportResponseChanges"}}},"PutReportResponseChanges":{"type":"object","properties":{"reportName":{"type":"string","example":"Changed New Report"},"reportParameters":{"type":"array","items":{"$ref":"#/definitions/ReportParameterData"}}}},"ReportParameterData":{"type":"object"},"PutReportRequest":{"type":"object","properties":{"reportName":{"type":"string","example":"Completely New Report"},"reportParameters":{"type":"array","items":{"$ref":"#/definitions/ReportParameterData"}}}},"DeleteReportsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":132}}},"GetReportsResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"reportName":{"type":"string","example":"Client Listing"},"reportType":{"type":"string","example":"Table"},"reportSubType":{"type":"string"},"reportCategory":{"type":"string","example":"Client"},"description":{"type":"string","example":"Individual Client Report Lists the small number of defined fields on the client table. Would expect to copy this report and add any one to one additional data for specific tenant needs. Can be run for any size MFI but you expect it only to be run within a branch for larger ones. Depending on how many columns are displayed, there is probably is a limit of about 20/50k clients returned for html display (export to excel doesnt have that client browser/memory impact)."},"reportSql":{"type":"string"},"coreReport":{"type":"boolean","example":true},"useReport":{"type":"boolean","example":true},"reportParameters":{"type":"array","items":{"$ref":"#/definitions/ReportParameterData"}}}},"GetReportsTemplateResponse":{"type":"object","properties":{"allowedReportTypes":{"type":"array","items":{"type":"string"}},"allowedReportSubTypes":{"type":"array","items":{"type":"string"}},"allowedParameters":{"type":"array","items":{"$ref":"#/definitions/ReportParameterData"}}}},"PostReportsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":132}}},"PostRepostRequest":{"type":"object","properties":{"reportName":{"type":"string","example":"Completely New Report"},"reportType":{"type":"string","example":"Table"},"reportSubType":{"type":"string"},"reportCategory":{"type":"string","example":"Loan"},"description":{"type":"string","example":"Just An Example"},"reportSql":{"type":"string","example":"select 'very good sql' as AComment"},"reportParameters":{"type":"array","items":{"$ref":"#/definitions/ReportParameterData"}}}},"GetReportNameResponse":{"type":"object","properties":{"columnHeaders":{"$ref":"#/definitions/ResultsetColumnHeaderData"},"row":{"$ref":"#/definitions/ResultsetRowData"}}},"GetEntityTypeEntityIdDocumentsResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"parentEntityType":{"type":"string","example":"clients"},"parentEntityId":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Client Details Form"},"fileName":{"type":"string","example":"CGAP.pdf"},"size":{"type":"integer","format":"int64","example":5246719},"type":{"type":"string","example":"application/pdf"},"description":{"type":"string","example":"A signed form signed by new member"},"location":{"type":"string"},"storageType":{"type":"integer","format":"int32"}}},"PutEntityTypeEntityIdDocumentsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":3},"changes":{"$ref":"#/definitions/PutEntityTypeEntityIdDocumentsResponseChangesSwagger"},"resourceIdentifier":{"type":"string","example":"3"}}},"PutEntityTypeEntityIdDocumentsResponseChangesSwagger":{"type":"object"},"DeleteEntityTypeEntityIdDocumentsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":3},"changes":{"$ref":"#/definitions/PutEntityTypeEntityIdDocumentsResponseChangesSwagger"},"resourceIdentifier":{"type":"string","example":"3"}}},"PostEntityTypeEntityIdDocumentsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":3},"resourceIdentifier":{"type":"string","example":"3"}}},"Event":{"type":"object","properties":{"actionName":{"type":"string"},"entityName":{"type":"string"}}},"Field":{"type":"object","properties":{"fieldName":{"type":"string"},"fieldValue":{"type":"string"},"fieldType":{"type":"string"}}},"GetHookResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Web"},"displayName":{"type":"string","example":"Kremlin"},"isActive":{"type":"boolean","example":true},"createdAt":{"type":"string","format":"date","example":"[2014, 9, 16]"},"updatedAt":{"type":"string","format":"date","example":"[2014, 9, 16]"},"templateId":{"type":"integer","format":"int64","example":1},"templateName":{"type":"string","example":"My UGD"},"events":{"type":"array","items":{"$ref":"#/definitions/Event"}},"config":{"type":"array","items":{"$ref":"#/definitions/Field"}}}},"PostHookResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":4}}},"PostHookRequest":{"type":"object","properties":{"name":{"type":"string","example":"Web"},"isActive":{"type":"boolean","example":true},"displayName":{"type":"string","example":"Kremlin"},"templateId":{"type":"integer","format":"int64","example":1},"events":{"type":"array","items":{"$ref":"#/definitions/Event"}},"config":{"type":"array","items":{"$ref":"#/definitions/Field"}}}},"PutHookResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":4},"changes":{"$ref":"#/definitions/PutHookResponseChangesSwagger"}}},"PutHookResponseChangesSwagger":{"type":"object","properties":{"displayName":{"type":"string","example":"Kremlin"},"events":{"type":"array","example":"1","items":{"$ref":"#/definitions/Event"}},"config":{"type":"array","items":{"$ref":"#/definitions/Field"}}}},"PutHookRequest":{"type":"object","properties":{"name":{"type":"string","example":"Web"},"isActive":{"type":"boolean","example":true},"displayName":{"type":"string","example":"Kremlin"},"templateId":{"type":"integer","format":"int64","example":1},"events":{"type":"array","items":{"$ref":"#/definitions/Event"}},"config":{"type":"array","items":{"$ref":"#/definitions/Field"}}}},"DeleteHookResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":4}}},"GetHookTemplateResponse":{"type":"object","properties":{"templates":{"type":"array","items":{"$ref":"#/definitions/HookTemplateData"}},"groupings":{"type":"array","items":{"$ref":"#/definitions/Grouping"}}}},"Grouping":{"type":"object","properties":{"name":{"type":"string"}}},"HookTemplateData":{"type":"object","properties":{"serviceId":{"type":"integer","format":"int64"}}},"GetSchedulerResponse":{"type":"object","properties":{"active":{"type":"boolean","example":true}}},"GetJobsJobIDJobRunHistoryResponse":{"type":"object","properties":{"totalFilteredRecords":{"type":"integer","format":"int32","example":8},"pageItems":{"type":"array","items":{"$ref":"#/definitions/JobDetailHistoryDataSwagger"}}}},"JobDetailHistoryDataSwagger":{"type":"object","properties":{"version":{"type":"integer","format":"int64","example":1},"jobRunStartTime":{"type":"string","format":"date-time","example":"Jul 16, 2013 12:00:00 PM"},"jobRunEndTime":{"type":"string","format":"date-time","example":"Jul 16, 2013 12:00:00 PM"},"status":{"type":"string","example":"success"},"triggerType":{"type":"string","example":"cron"}}},"PutJobsJobsIDRequest":{"type":"object","properties":{"displayName":{"type":"string","example":"Update loan Summary"},"cronExpression":{"type":"string","example":"0 0 22 1/1 * ? *"},"active":{"type":"boolean","example":false}}},"GetJobsResponse":{"type":"object","properties":{"jobId":{"type":"integer","format":"int64","example":1},"displayName":{"type":"string","example":"Update loan Summary"},"nextRunTime":{"type":"string","format":"date-time"},"initializingError":{"type":"string"},"cronExpression":{"type":"string","example":"0 0 22 1/1 * ? *"},"active":{"type":"boolean","example":false},"currentlyRunning":{"type":"boolean","example":false},"lastRunHistory":{"$ref":"#/definitions/JobDetailHistoryData"}}},"JobDetailHistoryData":{"type":"object"},"PostReportMailingJobsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PostReportMailingJobsRequest":{"type":"object","properties":{"locale":{"type":"string","example":"en_GB"},"dateFormat":{"type":"string","example":"dd-MM-yyyy HH:mm:ss"},"name":{"type":"string","example":"Client Numbers Report"},"description":{"type":"string","example":"Client Numbers Report"},"startDateTime":{"type":"string","format":"date-time","example":"1469627093000"},"stretchyReportId":{"type":"integer","format":"int64","example":120},"emailRecipients":{"type":"string","example":"info@musonisystem.com"},"emailSubject":{"type":"string","example":"Client Numbers Report"},"emailMessage":{"type":"string","example":"Client Numbers Report"},"recurrence":{"type":"string","example":"FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,WE,FR"},"isActive":{"type":"boolean","example":true},"stretchyReportParamMap":{"type":"string","example":"{\"startDate\":\"2016-07-01\",\"endDate\":\"2016-08-02\",\"selectOffice\":\"1\",\"environementUrl\":\"environementUrl\"}"}}},"PutReportMailingJobsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1},"changes":{"$ref":"#/definitions/PutReportMailingJobsResponseChanges"}}},"PutReportMailingJobsResponseChanges":{"type":"object","properties":{"startDateTime":{"type":"string","format":"date-time","example":"10-08-2016 23:30:00"}}},"PutReportMailingJobsRequest":{"type":"object","properties":{"locale":{"type":"string","example":"en_GB"},"dateFormat":{"type":"string","example":"dd-MM-yyyy HH:mm:ss"},"startDateTime":{"type":"string","format":"date-time","example":"10-08-2016 23:30:00"}}},"DeleteReportMailingJobsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"DeleteReportMailingJobsRequest":{"type":"object"},"GetReportMailingJobsResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Client Numbers Report"},"description":{"type":"string","example":"Client Numbers Report"},"startDateTime":{"type":"string","format":"date-time","example":"1469627093000"},"recurrence":{"type":"string"},"timeline":{"$ref":"#/definitions/ReportMailingJobTimelineData"},"emailRecipients":{"type":"string","example":"info@musonisystem.com"},"emailSubject":{"type":"string","example":"Client Numbers Report"},"emailMessage":{"type":"string","example":"Client Numbers Report"},"emailAttachmentFileFormat":{"$ref":"#/definitions/EnumOptionData"},"stretchyReport":{"$ref":"#/definitions/ReportData"},"stretchyReportParamMap":{"type":"string","example":"{\"startDate\":\"2016-07-01\",\"endDate\":\"2016-08-02\",\"selectOffice\":\"1\",\"environementUrl\":\"environementUrl\"}"},"nextRunDateTime":{"type":"string","format":"date-time","example":"1469627093000"},"numberOfRuns":{"type":"integer","format":"int32","example":0},"isActive":{"type":"boolean","example":true},"runAsUserId":{"type":"integer","format":"int64","example":1}}},"ReportData":{"type":"object"},"ReportMailingJobTimelineData":{"type":"object"},"GetReportMailingJobsTemplate":{"type":"object","properties":{"isActive":{"type":"boolean","example":true},"emailAttachmentFileFormatOptions":{"type":"array","items":{"$ref":"#/definitions/EnumOptionData"}},"stretchyReportParamDateOptions":{"type":"array","items":{"$ref":"#/definitions/EnumOptionData"}}}},"ReportMailingJobRunHistoryData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"reportMailingJobId":{"type":"integer","format":"int64"},"startDateTime":{"type":"string","format":"date-time"},"endDateTime":{"type":"string","format":"date-time"},"status":{"type":"string"},"errorMessage":{"type":"string"},"errorLog":{"type":"string"}}},"PostAuthenticationResponse":{"type":"object","properties":{"username":{"type":"string","example":"mifos"},"userId":{"type":"integer","format":"int64","example":1},"base64EncodedAuthenticationKey":{"type":"string","example":"bWlmb3M6cGFzc3dvcmQ="},"authenticated":{"type":"boolean","example":true},"officeId":{"type":"integer","format":"int64","example":1},"officeName":{"type":"string","example":"Head Office"},"staffId":{"type":"integer","format":"int64","example":1},"staffDisplayName":{"type":"string","example":"Director, Program"},"organisationalRole":{"$ref":"#/definitions/EnumOptionData"},"roles":{"type":"array","items":{"$ref":"#/definitions/RoleData"}},"permissions":{"type":"array","example":"ALL_FUNCTIONS","items":{"type":"string"}}}},"RoleData":{"type":"object"},"GetUserDetailsResponse":{"type":"object","properties":{"username":{"type":"string","example":"mifos"},"userId":{"type":"integer","format":"int64","example":1},"accessToken":{"type":"string","example":"bWlmb3M6cGFzc3dvcmQ="},"authenticated":{"type":"boolean","example":true},"officeId":{"type":"integer","format":"int64","example":1},"officeName":{"type":"string","example":"Head Office"},"staffId":{"type":"integer","format":"int64","example":1},"staffDisplayName":{"type":"string","example":"mifosStaffDisplayName"},"organisationalRole":{"$ref":"#/definitions/EnumOptionData"},"roles":{"type":"array","items":{"$ref":"#/definitions/RoleData"}},"permissions":{"type":"array","example":"ALL_FUNCTIONS","items":{"type":"string"}}}},"PostSurveySurveyNameApptableIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":2},"clientId":{"type":"integer","format":"int64","example":87},"resourceId":{"type":"integer","format":"int64","example":87}}},"PostSurveySurveyNameApptableIdRequest":{"type":"object","properties":{"ppi_household_members_cd_q1_householdmembers":{"type":"integer","format":"int64","example":167},"ppi_highestschool_cd_q2_highestschool":{"type":"integer","format":"int64","example":174},"ppi_businessoccupation_cd_q3_businessoccupation":{"type":"integer","format":"int64","example":180},"ppi_habitablerooms_cd_q4_habitablerooms":{"type":"integer","format":"int64","example":184},"ppi_floortype_cd_q5_floortype":{"type":"integer","format":"int64","example":188},"ppi_lightingsource_cd_q6_lightingsource":{"type":"integer","format":"int64","example":190},"ppi_irons_cd_q7_irons":{"type":"integer","format":"int64","example":193},"ppi_mosquitonets_cd_q8_mosquitonets":{"type":"integer","format":"int64","example":195},"ppi_towels_cd_q9_towels":{"type":"integer","format":"int64","example":198},"ppi_fryingpans_cd_q10_fryingpans":{"type":"integer","format":"int64","example":201},"Date":{"type":"string","format":"date-time","example":"2014-12-02 20:30:00"},"dateFormat":{"type":"string","format":"date-time","example":"Y-m-d H:i:s"},"locale":{"type":"string","example":"en_GB"}}},"GetSurveyResponse":{"type":"object","properties":{"datatableData":{"$ref":"#/definitions/GetSurveyResponseDatatableData"},"enabled":{"type":"boolean","example":false}}},"GetSurveyResponseDatatableData":{"type":"object","properties":{"applicationTableName":{"type":"string","example":"m_client"},"registeredTableName":{"type":"string","example":"ppi_kenya_2005"},"columnHeaderData":{"type":"array","items":{"$ref":"#/definitions/ResultsetColumnHeaderData"}}}},"PostHolidaysHolidayIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PostHolidaysHolidayIdRequest":{"type":"object"},"PostHolidaysResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PostHolidaysRequest":{"type":"object","properties":{"name":{"type":"string","example":"Good Friday"},"description":{"type":"string","example":"Good Friday"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"locale":{"type":"string","example":"en"},"fromDate":{"type":"string","format":"date","example":"25 October 2013"},"toDate":{"type":"string","format":"date","example":"25 October 2013"},"repaymentsRescheduledTo":{"type":"string","format":"date","example":"26 October 2013"},"offices":{"type":"array","items":{"$ref":"#/definitions/PostHolidaysRequestOffices"}}}},"PostHolidaysRequestOffices":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1}}},"GetHolidaysResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Good Friday"},"fromDate":{"type":"string","format":"date","example":"[2013, 10, 26]"},"toDate":{"type":"string","format":"date","example":"[2013, 10, 26]"},"repaymentsRescheduledTo":{"type":"string","format":"date","example":"[2013, 10, 27]"},"officeId":{"type":"integer","format":"int64","example":1},"status":{"$ref":"#/definitions/EnumOptionData"}}},"PutHolidaysHolidayIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1},"changes":{"$ref":"#/definitions/PutHolidaysHolidayIdResponseChanges"}}},"PutHolidaysHolidayIdResponseChanges":{"type":"object","properties":{"name":{"type":"string","example":"Independence day"},"description":{"type":"string","example":"Holiday for Independence day celebration"}}},"PutHolidaysHolidayIdRequest":{"type":"object","properties":{"name":{"type":"string","example":"Independence day"},"description":{"type":"string","example":"Holiday for Independence day celebration"}}},"DeleteHolidaysHolidayIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"GetCurrenciesResponse":{"type":"object","properties":{"selectedCurrencyOptions":{"type":"array","items":{"$ref":"#/definitions/CurrencyData"}},"currencyOptions":{"type":"array","items":{"$ref":"#/definitions/CurrencyData"}}}},"PutCurrenciesResponse":{"type":"object","properties":{"currencies":{"type":"string","example":"[\"KES\",\n \"BND\",\n \"LBP\",\n \"GHC\",\n \"USD\",\n \"XOF\",\n \"AED\",\n \"AMD\"]"}}},"PutCurrenciesRequest":{"type":"object","properties":{"currencies":{"type":"string","example":"[\"KES\",\n \"BND\",\n \"LBP\",\n \"GHC\",\n \"USD\",\n \"XOF\",\n \"AED\",\n \"AMD\"]"}}},"GetOfficesResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Head Office"},"nameDecorated":{"type":"string","example":"Head Office"},"externalId":{"type":"string","example":"1"},"openingDate":{"type":"string","format":"date","example":"[2009, 1, 1]"},"hierarchy":{"type":"string","example":"."}}},"GetOfficesTemplateResponse":{"type":"object","properties":{"openingDate":{"type":"string","format":"date","example":"[2009, 1, 1]"},"allowedParents":{"type":"array","items":{"$ref":"#/definitions/GetOfficesResponse"}}}},"PostOfficesResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":3},"resourceId":{"type":"integer","format":"int64","example":3}}},"PostOfficesRequest":{"type":"object","properties":{"name":{"type":"string","example":"Good Friday"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"locale":{"type":"string","example":"en"},"openingDate":{"type":"string","format":"date","example":"01 July 2007"},"parentId":{"type":"integer","format":"int64","example":2},"externalId":{"type":"string","example":"SYS54-88"}}},"PutOfficesOfficeIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":3},"resourceId":{"type":"integer","format":"int64","example":3},"changes":{"$ref":"#/definitions/PutOfficesOfficeIdResponseChanges"}}},"PutOfficesOfficeIdResponseChanges":{"type":"object","properties":{"name":{"type":"string","example":"Name is updated"}}},"PutOfficesOfficeIdRequest":{"type":"object","properties":{"name":{"type":"string","example":"Name is updated"}}},"GetProvisioningCriteriaCriteriaIdResponse":{"type":"object","properties":{"criteriaId":{"type":"integer","format":"int64","example":1},"criteriaName":{"type":"string","example":"High Risk Products Criteria"},"createdBy":{"type":"string","example":"mifos"},"loanProducts":{"type":"array","items":{"$ref":"#/definitions/LoanProductData"}},"provisioningcriteria":{"type":"array","items":{"$ref":"#/definitions/ProvisioningCriteriaDefinitionData"}}}},"ProvisioningCriteriaDefinitionData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"categoryId":{"type":"integer","format":"int64"},"categoryName":{"type":"string"},"minAge":{"type":"integer","format":"int64"},"maxAge":{"type":"integer","format":"int64"},"provisioningPercentage":{"type":"number"},"liabilityAccount":{"type":"integer","format":"int64"},"liabilityCode":{"type":"string"},"expenseAccount":{"type":"integer","format":"int64"},"expenseCode":{"type":"string"}}},"GetProvisioningCriteriaResponse":{"type":"object","properties":{"criteriaId":{"type":"integer","format":"int64","example":1},"criteriaName":{"type":"string","example":"High Risk Products Criteria"},"createdBy":{"type":"string","example":"mifos"}}},"PostProvisioningCriteriaResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PostProvisioningCriteriaRequest":{"type":"object","properties":{"criteriaName":{"type":"string","example":"High Risk Products Criteria"},"loanProducts":{"type":"array","items":{"$ref":"#/definitions/LoanProductData"}},"provisioningcriteria":{"type":"array","items":{"$ref":"#/definitions/ProvisioningCriteriaDefinitionData"}}}},"PutProvisioningCriteriaResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1},"changes":{"$ref":"#/definitions/PutProvisioningCriteriaResponseChanges"}}},"PutProvisioningCriteriaResponseChanges":{"type":"object","properties":{"criteriaName":{"type":"string","example":"High Risk Products Criteria"}}},"PutProvisioningCriteriaRequest":{"type":"object","properties":{"criteriaName":{"type":"string","example":"High Risk Products Criteria"},"loanProducts":{"type":"array","items":{"$ref":"#/definitions/LoanProductData"}},"provisioningcriteria":{"type":"array","items":{"$ref":"#/definitions/ProvisioningCriteriaDefinitionData"}}}},"DeleteProvisioningCriteriaResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"GetStaffResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"firstname":{"type":"string","example":"John"},"lastname":{"type":"string","example":"Doe"},"displayName":{"type":"string","example":"Doe, John"},"officeId":{"type":"integer","format":"int64","example":1},"officeName":{"type":"string","example":"Head Office"},"isLoanOfficer":{"type":"boolean","example":true},"externalId":{"type":"string","example":"17H"},"isActive":{"type":"boolean","example":false},"joiningDate":{"type":"string","format":"date","example":"[2009,8,1]"}}},"PostStaffResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"resourceId":{"type":"integer","format":"int64","example":1}}},"PostStaffRequest":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"firstname":{"type":"string","example":"John"},"lastname":{"type":"string","example":"Doe"},"isLoanOfficer":{"type":"boolean","example":true},"externalId":{"type":"string","example":"17H"},"mobileNo":{"type":"string","example":"+353851239876"},"isActive":{"type":"boolean","example":true},"joiningDate":{"type":"string","format":"date","example":"01 January 2009"},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"}}},"PutStaffResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"resourceId":{"type":"integer","format":"int64","example":1}}},"PutStaffRequest":{"type":"object","properties":{"isLoanOfficer":{"type":"boolean","example":false},"externalId":{"type":"string","example":"17Hbb"}}},"GetTellersResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":3},"officeId":{"type":"integer","format":"int64","example":1},"debitAccountId":{"type":"integer","format":"int64","example":0},"creditAccountId":{"type":"integer","format":"int64","example":0},"name":{"type":"string","example":"Teller3"},"startDate":{"type":"string","format":"date","example":"[2015,2,1]"},"status":{"type":"string","example":"ACTIVE","enum":["INVALID","PENDING","ACTIVE","INACTIVE","CLOSED"]},"officeName":{"type":"string","example":"Head Office"}}},"PostTellersResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"resourceId":{"type":"integer","format":"int64","example":5}}},"PostTellersRequest":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Teller3"},"description":{"type":"string","example":"cash handling"},"status":{"type":"string","example":"ACTIVE","enum":["INVALID","PENDING","ACTIVE","INACTIVE","CLOSED"]},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd-MM-yyyy"},"startDate":{"type":"string","format":"date","example":"01 February 2015"}}},"PutTellersResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"resourceId":{"type":"integer","format":"int64","example":5},"changes":{"$ref":"#/definitions/PutTellersResponseChanges"}}},"PutTellersResponseChanges":{"type":"object","properties":{"description":{"type":"string","example":"teller cash handling"},"endDate":{"type":"string","format":"date","example":"28 February 2015"},"startDate":{"type":"string","format":"date","example":"01 February 2015"},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd-MM-yyyy"}}},"PutTellersRequest":{"type":"object","properties":{"name":{"type":"string","example":"Teller3"},"officeId":{"type":"integer","format":"int64","example":1},"description":{"type":"string","example":"teller cash handling"},"status":{"type":"string","example":"ACTIVE","enum":["INVALID","PENDING","ACTIVE","INACTIVE","CLOSED"]},"endDate":{"type":"string","format":"date","example":"28 February 2015"},"startDate":{"type":"string","format":"date","example":"01 February 2015"},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd-MM-yyyy"}}},"CashierData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"tellerId":{"type":"integer","format":"int64"},"officeId":{"type":"integer","format":"int64"},"staffId":{"type":"integer","format":"int64"},"description":{"type":"string"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"startTime":{"type":"string"},"endTime":{"type":"string"},"officeName":{"type":"string"},"tellerName":{"type":"string"},"staffName":{"type":"string"},"fullDay":{"type":"boolean"}}},"GetTellersTellerIdCashiersResponse":{"type":"object","properties":{"tellerId":{"type":"integer","format":"int64","example":1},"tellerName":{"type":"string","example":"Teller1"},"officeId":{"type":"integer","format":"int64","example":1},"officeName":{"type":"string","example":"Head Office"},"cashiers":{"type":"array","items":{"$ref":"#/definitions/CashierData"}}}},"GetTellersTellerIdCashiersCashierIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"tellerId":{"type":"integer","format":"int64","example":1},"staffId":{"type":"integer","format":"int64","example":1},"description":{"type":"string"},"startDate":{"type":"string","format":"date","example":"Feb 20, 2015 12:00:00 AM"},"endDate":{"type":"string","format":"date","example":"Feb 27, 2015 12:00:00 AM"},"isFullDay":{"type":"boolean","example":true},"startTime":{"type":"string"},"endTime":{"type":"string"},"tellerName":{"type":"string","example":"Teller1"},"staffName":{"type":"string","example":"Staff1, Test"}}},"GetTellersTellerIdCashiersTemplateResponse":{"type":"object","properties":{"tellerId":{"type":"integer","format":"int64","example":1},"tellerName":{"type":"string","example":"Teller1"},"officeId":{"type":"integer","format":"int64","example":1},"officeName":{"type":"string","example":"Head Office"},"staffOptions":{"type":"array","items":{"$ref":"#/definitions/StaffData"}}}},"StaffData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"firstname":{"type":"string"},"lastname":{"type":"string"},"displayName":{"type":"string"},"officeId":{"type":"integer","format":"int64"},"officeName":{"type":"string"},"joiningDate":{"type":"string","format":"date"}}},"PostTellersTellerIdCashiersResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1},"subResourceId":{"type":"integer","format":"int64","example":2}}},"PostTellersTellerIdCashiersRequest":{"type":"object","properties":{"endDate":{"type":"string","format":"date","example":"28 February 2015"},"description":{"type":"string","example":"teller cash handling"},"isFullDay":{"type":"boolean","example":true},"staffId":{"type":"integer","format":"int64","example":3},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd-MM-yyyy"},"startDate":{"type":"string","format":"date","example":"01 February 2015"}}},"PutTellersTellerIdCashiersCashierIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1},"subResourceId":{"type":"integer","format":"int64","example":2},"changes":{"$ref":"#/definitions/PutTellersTellerIdCashiersCashierIdResponseChanges"}}},"PutTellersTellerIdCashiersCashierIdResponseChanges":{"type":"object","properties":{"endDate":{"type":"string","format":"date","example":"25 February 2015"},"description":{"type":"string","example":"Cashier updated."},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd-MM-yyyy"}}},"PutTellersTellerIdCashiersCashierIdRequest":{"type":"object","properties":{"endDate":{"type":"string","format":"date","example":"25 February 2015"},"description":{"type":"string","example":"Cashier updated."},"isFullDay":{"type":"boolean","example":true},"staffId":{"type":"integer","format":"int64","example":1},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd-MM-yyyy"},"startDate":{"type":"string","format":"date","example":"01 February 2015"}}},"DeleteTellersTellerIdCashiersCashierIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PostTellersTellerIdCashiersCashierIdAllocateResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1},"subResourceId":{"type":"integer","format":"int64","example":4}}},"PostTellersTellerIdCashiersCashierIdAllocateRequest":{"type":"object","properties":{"currencyCode":{"type":"string","example":"USD"},"txnAmount":{"type":"number","example":5000.0},"txnNote":{"type":"string","example":"allocating cash"},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd-MM-yyyy"},"txnDate":{"type":"string","format":"date-time","example":"01 February 2015"}}},"PostTellersTellerIdCashiersCashierIdSettleResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1},"subResourceId":{"type":"integer","format":"int64","example":5}}},"PostTellersTellerIdCashiersCashierIdSettleRequest":{"type":"object","properties":{"currencyCode":{"type":"string","example":"USD"},"txnAmount":{"type":"number","example":2000.0},"txnNote":{"type":"string","example":"cash settlement"},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd-MM-yyyy"},"txnDate":{"type":"string","format":"date-time","example":"20 February 2015"}}},"CashierTxnType":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"value":{"type":"string"}}},"GetTellersTellerIdCashiersCashiersIdTransactionsResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":8},"cashierId":{"type":"integer","format":"int64","example":15},"txnType":{"$ref":"#/definitions/CashierTxnType"},"txnAmount":{"type":"number","example":1000.0},"txnDate":{"type":"string","format":"date-time","example":"Feb 25, 2015 12:00:00 AM"},"entityId":{"type":"integer","format":"int64","example":2},"entityType":{"type":"string","example":"loans"},"txnNote":{"type":"string","example":"Disbursement, Loan:2-000000002,Client:1-Test 1"},"createdDate":{"type":"string","format":"date-time","example":"Feb 25, 2015 12:00:00 AM"},"officeId":{"type":"integer","format":"int64","example":1},"officeName":{"type":"string","example":"Head Office"},"tellerId":{"type":"integer","format":"int64","example":0},"cashierName":{"type":"string","example":"B, Ramesh"}}},"CashierTransactionData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"cashierId":{"type":"integer","format":"int64"},"txnType":{"$ref":"#/definitions/CashierTxnType"},"txnAmount":{"type":"number"},"txnDate":{"type":"string","format":"date-time"},"entityId":{"type":"integer","format":"int64"},"entityType":{"type":"string"},"txnNote":{"type":"string"},"createdDate":{"type":"string","format":"date-time"},"officeId":{"type":"integer","format":"int64"},"officeName":{"type":"string"},"tellerId":{"type":"integer","format":"int64"},"tellerName":{"type":"string"},"cashierName":{"type":"string"},"cashierData":{"$ref":"#/definitions/CashierData"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"}}},"GetTellersTellerIdCashiersCashiersIdSummaryAndTransactionsResponse":{"type":"object","properties":{"sumCashAllocation":{"type":"number","example":7000.0},"sumInwardCash":{"type":"number","example":0.0},"sumOutwardCash":{"type":"number","example":0.0},"sumCashSettlement":{"type":"number","example":50.0},"netCash":{"type":"number","example":6950.0},"officeName":{"type":"string","example":"Head Office"},"tellerId":{"type":"integer","format":"int64","example":1},"tellerName":{"type":"string","example":"Teller1"},"cashierId":{"type":"integer","format":"int64","example":1},"cashierName":{"type":"string","example":"Staff1, Test"},"cashierTransactions":{"$ref":"#/definitions/PageCashierTransactionData"}}},"Page":{"type":"object","properties":{"totalFilteredRecords":{"type":"integer","format":"int32"},"pageItems":{"type":"array","items":{"type":"object"}}}},"PageCashierTransactionData":{"type":"object","properties":{"totalFilteredRecords":{"type":"integer","format":"int32"},"pageItems":{"type":"array","items":{"$ref":"#/definitions/CashierTransactionData"}}}},"GetTellersTellerIdCashiersCashiersIdTransactionsTemplateResponse":{"type":"object","properties":{"cashierId":{"type":"integer","format":"int64","example":1},"officeName":{"type":"string","example":"Head Office"},"tellerId":{"type":"integer","format":"int64","example":0},"tellerName":{"type":"string","example":"Teller1"},"cashierName":{"type":"string","example":"Staff1, Test"},"cashierData":{"$ref":"#/definitions/CashierData"},"startDate":{"type":"string","format":"date","example":"Feb 20, 2015 12:00:00 AM"},"endDate":{"type":"string","format":"date","example":"Feb 27, 2015 12:00:00 AM"},"currencyOptions":{"type":"array","items":{"$ref":"#/definitions/CurrencyData"}}}},"GetWorkingDaysTemplateResponse":{"type":"object","properties":{"repaymentRescheduleOptions":{"type":"array","items":{"$ref":"#/definitions/EnumOptionData"}}}},"GetWorkingDaysResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"recurrence":{"type":"string","example":"FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR"},"repaymentRescheduleType":{"$ref":"#/definitions/EnumOptionData"},"extendTermForDailyRepayments":{"type":"boolean","example":true}}},"PutWorkingDaysResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PutWorkingDaysRequest":{"type":"object","properties":{"recurrence":{"type":"string","example":"FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR"},"locale":{"type":"string","example":"en"},"repaymentRescheduleType":{"example":"4","$ref":"#/definitions/EnumOptionData"},"extendTermForDailyRepayments":{"type":"boolean","example":true}}},"AddressData":{"type":"object"},"CommandProcessingResult":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64"},"groupId":{"type":"integer","format":"int64"},"clientId":{"type":"integer","format":"int64"},"loanId":{"type":"integer","format":"int64"},"savingsId":{"type":"integer","format":"int64"},"subResourceId":{"type":"integer","format":"int64"},"transactionId":{"type":"string"},"changes":{"type":"object","additionalProperties":{"type":"object"}},"productId":{"type":"integer","format":"int64"},"rollbackTransaction":{"type":"boolean"}}},"ClientChargeData":{"type":"object"},"ClientCharge":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"client":{"$ref":"#/definitions/Client"},"charge":{"$ref":"#/definitions/Charge"},"chargeTime":{"type":"integer","format":"int32"},"dueDate":{"type":"string","format":"date-time"},"chargeCalculation":{"type":"integer","format":"int32"},"amount":{"$ref":"#/definitions/Money"},"amountPaid":{"$ref":"#/definitions/Money"},"amountWaived":{"$ref":"#/definitions/Money"},"amountWrittenOff":{"$ref":"#/definitions/Money"},"amountOutstanding":{"$ref":"#/definitions/Money"},"penaltyCharge":{"type":"boolean"},"paid":{"type":"boolean"},"waived":{"type":"boolean"},"inactivationDate":{"type":"string","format":"date-time"},"currency":{"$ref":"#/definitions/MonetaryCurrency"},"active":{"type":"boolean"},"notActive":{"type":"boolean"},"clientId":{"type":"integer","format":"int64"},"officeId":{"type":"integer","format":"int64"},"onSpecifiedDueDate":{"type":"boolean"},"dueLocalDate":{"type":"string","format":"date"},"new":{"type":"boolean"}}},"ClientIdentifierData":{"type":"object"},"ClientTransactionData":{"type":"object"},"AccountSummaryCollectionData":{"type":"object"},"ClientData":{"type":"object","required":["active","address","addressEnabled","middlename","officeId"],"properties":{"id":{"type":"integer","format":"int64"},"accountNo":{"type":"string"},"externalId":{"type":"string"},"active":{"type":"boolean"},"activationDate":{"type":"string","format":"date"},"firstname":{"type":"string"},"middlename":{"type":"string"},"lastname":{"type":"string"},"fullname":{"type":"string"},"gender":{"$ref":"#/definitions/CodeValueData"},"officeId":{"type":"integer","format":"int64"},"address":{"$ref":"#/definitions/AddressData"},"isAddressEnabled":{"type":"boolean"},"addressEnabled":{"type":"boolean"},"staff":{"type":"boolean"}}},"LookupTableData":{"type":"object","properties":{"key":{"type":"string"},"description":{"type":"string"},"entries":{"type":"array","items":{"$ref":"#/definitions/LookupTableEntry"}}}},"LookupTableEntry":{"type":"object","properties":{"valueFrom":{"type":"integer","format":"int32"},"valueTo":{"type":"integer","format":"int32"},"score":{"type":"number","format":"double"}}},"ScorecardData":{"type":"object","properties":{"userId":{"type":"integer","format":"int64"},"clientId":{"type":"integer","format":"int64"},"createdOn":{"type":"string","format":"date-time"},"scorecardValues":{"type":"array","items":{"$ref":"#/definitions/ScorecardValue"}}}},"ScorecardValue":{"type":"object","properties":{"questionId":{"type":"integer","format":"int64"},"responseId":{"type":"integer","format":"int64"},"value":{"type":"integer","format":"int32"}}},"Component":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"survey":{"$ref":"#/definitions/Survey"},"key":{"type":"string"},"text":{"type":"string"},"description":{"type":"string"},"sequenceNo":{"type":"integer","format":"int32"},"new":{"type":"boolean"}}},"Question":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"survey":{"$ref":"#/definitions/Survey"},"responses":{"type":"array","items":{"$ref":"#/definitions/Response"}},"componentKey":{"type":"string"},"key":{"type":"string"},"text":{"type":"string"},"description":{"type":"string"},"sequenceNo":{"type":"integer","format":"int32"},"new":{"type":"boolean"}}},"Response":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"question":{"$ref":"#/definitions/Question"},"text":{"type":"string"},"value":{"type":"integer","format":"int32"},"sequenceNo":{"type":"integer","format":"int32"},"new":{"type":"boolean"}}},"Scorecard":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"survey":{"$ref":"#/definitions/Survey"},"question":{"$ref":"#/definitions/Question"},"response":{"$ref":"#/definitions/Response"},"appUser":{"$ref":"#/definitions/AppUser"},"client":{"$ref":"#/definitions/Client"},"createdOn":{"type":"string","format":"date-time"},"value":{"type":"integer","format":"int32"},"new":{"type":"boolean"}}},"Survey":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"components":{"type":"array","items":{"$ref":"#/definitions/Component"}},"questions":{"type":"array","items":{"$ref":"#/definitions/Question"}},"key":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"countryCode":{"type":"string"},"validFrom":{"type":"string","format":"date-time"},"validTo":{"type":"string","format":"date-time"},"new":{"type":"boolean"}}},"ComponentData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"key":{"type":"string"},"text":{"type":"string"},"description":{"type":"string"},"sequenceNo":{"type":"integer","format":"int32"}}},"QuestionData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"responseDatas":{"type":"array","items":{"$ref":"#/definitions/ResponseData"}},"componentKey":{"type":"string"},"key":{"type":"string"},"text":{"type":"string"},"description":{"type":"string"},"sequenceNo":{"type":"integer","format":"int32"}}},"ResponseData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"text":{"type":"string"},"value":{"type":"integer","format":"int32"},"sequenceNo":{"type":"integer","format":"int32"}}},"SurveyData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"componentDatas":{"type":"array","items":{"$ref":"#/definitions/ComponentData"}},"questionDatas":{"type":"array","items":{"$ref":"#/definitions/QuestionData"}},"key":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"countryCode":{"type":"string"},"validFrom":{"type":"string","format":"date-time"},"validTo":{"type":"string","format":"date-time"}}},"PutTemplatesTemplateIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PutTemplatesTemplateIdRequest":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Text"},"entity":{"type":"integer","format":"int64","example":1},"type":{"type":"integer","format":"int64","example":0},"text":{"type":"string","example":"This is a loan for {{loan.clientName}}"},"mappers":{"type":"array","items":{"$ref":"#/definitions/TemplateMapper"}}}},"TemplateMapper":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"mapperorder":{"type":"integer","format":"int32"},"mapperkey":{"type":"string"},"mappervalue":{"type":"string"},"new":{"type":"boolean"}}},"DeleteTemplatesTemplateIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"GetTemplatesTemplateResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Text"},"entity":{"type":"integer","format":"int64","example":1},"type":{"type":"integer","format":"int64","example":0},"text":{"type":"string","example":"This is a loan for {{loan.clientName}}"},"mappers":{"type":"array","items":{"$ref":"#/definitions/TemplateMapper"}}}},"GetTemplatesResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Text"},"entity":{"type":"integer","format":"int64","example":1},"type":{"type":"integer","format":"int64","example":0},"text":{"type":"string","example":"This is a loan for {{loan.clientName}}"},"mappers":{"type":"array","items":{"$ref":"#/definitions/TemplateMapper"}}}},"GetTemplatesTemplateIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Text"},"entity":{"type":"integer","format":"int64","example":1},"type":{"type":"integer","format":"int64","example":0},"text":{"type":"string","example":"This is a loan for {{loan.clientName}}"},"mappers":{"type":"array","items":{"$ref":"#/definitions/TemplateMapper"}}}},"PostTemplatesResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PostTemplatesRequest":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Text"},"entity":{"type":"integer","format":"int64","example":1},"type":{"type":"integer","format":"int64","example":0},"text":{"type":"string","example":"This is a loan for {{loan.clientName}}"},"mappers":{"type":"array","items":{"$ref":"#/definitions/TemplateMapper"}}}},"GetPasswordPreferencesTemplateResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"description":{"type":"string","example":"Password must be at least 1 character and not more that 50 characters long"},"active":{"type":"boolean","example":true},"key":{"type":"string","example":"simple"}}},"PutPasswordPreferencesTemplateRequest":{"type":"object","properties":{"validationPolicyId":{"type":"integer","format":"int64","example":1}}},"GetPermissionsResponse":{"type":"object","properties":{"grouping":{"type":"string","example":"authorisation"},"code":{"type":"string","example":"READ_PERMISSION"},"entityName":{"type":"string","example":"PERMISSION"},"actionName":{"type":"string","example":"READ"},"selected":{"type":"boolean","example":true}}},"PutPermissionsRequest":{"type":"object","properties":{"permissions":{"type":"string","example":"\"CREATE_GUARANTOR\":true,\n \"CREATE_CLIENT\":true"}}},"GetRolesResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Super Users"},"description":{"type":"string","example":"This role provides all application permissions."}}},"PostRolesResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PostRolesRequest":{"type":"object","properties":{"name":{"type":"string","example":"Another Role Name"},"description":{"type":"string","example":"A description outlining the purpose of this role in relation to the application."}}},"GetRolesRoleIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Super Users"},"description":{"type":"string","example":"This role provides all application permissions."}}},"PostRolesRoleIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"GetRolesRoleIdPermissionsResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Super Users"},"description":{"type":"string","example":"This role provides all application permissions."},"permissionUsageData":{"type":"array","items":{"$ref":"#/definitions/GetRolesRoleIdPermissionsResponsePermissionData"}}}},"GetRolesRoleIdPermissionsResponsePermissionData":{"type":"object","properties":{"grouping":{"type":"string","example":"authorisation"},"code":{"type":"string","example":"READ_PERMISSION"},"entityName":{"type":"string","example":"PERMISSION"},"actionName":{"type":"string","example":"READ"},"selected":{"type":"boolean","example":false}}},"PostRolesRoleIdPermissionsResponsePermissions":{"type":"object","properties":{"ALL_FUNCTIONS_READ":{"type":"string","example":"true"}}},"PutRolesRoleIdPermissionsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":8},"permissions":{"$ref":"#/definitions/PostRolesRoleIdPermissionsResponsePermissions"}}},"PutRolesRoleIdPermissionsRequest":{"type":"object","properties":{"permissions":{"$ref":"#/definitions/PostRolesRoleIdPermissionsResponsePermissions"}}},"DeleteRolesRoleIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PutRolesRoleIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1},"changes":{"$ref":"#/definitions/PutRolesRoleIdResponseChanges"}}},"PutRolesRoleIdResponseChanges":{"type":"object","properties":{"description":{"type":"string","example":"some description(changed)"}}},"PutRolesRoleIdRequest":{"type":"object","properties":{"description":{"type":"string","example":"some description(changed)"}}},"GetUsersTemplateResponse":{"type":"object","properties":{"allowedOffices":{"type":"array","items":{"$ref":"#/definitions/OfficeData"}},"availableRoles":{"type":"array","items":{"$ref":"#/definitions/RoleData"}}}},"GetUsersResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"username":{"type":"string","example":"mifos"},"officeId":{"type":"integer","format":"int64","example":1},"officeName":{"type":"string","example":"Head Office"},"firstname":{"type":"string","example":"App"},"lastname":{"type":"string","example":"Administrator"},"email":{"type":"string","example":"demomfi@mifos.org"},"passwordNeverExpires":{"type":"boolean","example":false},"staff":{"$ref":"#/definitions/StaffData"},"selectedRoles":{"type":"array","items":{"$ref":"#/definitions/RoleData"}}}},"GetUsersUserIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"username":{"type":"string","example":"mifos"},"officeId":{"type":"integer","format":"int64","example":1},"officeName":{"type":"string","example":"Head Office"},"firstname":{"type":"string","example":"App"},"lastname":{"type":"string","example":"Administrator"},"email":{"type":"string","example":"demomfi@mifos.org"},"passwordNeverExpires":{"type":"boolean","example":false},"staff":{"$ref":"#/definitions/StaffData"},"availableRoles":{"type":"array","items":{"$ref":"#/definitions/RoleData"}},"selectedRoles":{"type":"array","items":{"$ref":"#/definitions/RoleData"}}}},"PutUsersUserIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"resourceId":{"type":"integer","format":"int64","example":11},"changes":{"$ref":"#/definitions/PutUsersUserIdResponseChanges"}}},"PutUsersUserIdResponseChanges":{"type":"object","properties":{"firstname":{"type":"string","example":"Test"},"passwordEncoded":{"type":"string","example":"abc3326b1bb376351c7baeb4175f5e0504e33aadf6a158474a6d71de1befae51"}}},"PutUsersUserIdRequest":{"type":"object","properties":{"firstname":{"type":"string","example":"Test"},"password":{"type":"string","example":"window75"},"repeatPassword":{"type":"string","example":"window75"}}},"DeleteUsersUserIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"resourceId":{"type":"integer","format":"int64","example":11},"changes":{"$ref":"#/definitions/DeleteUsersUserIdResponseChanges"}}},"DeleteUsersUserIdResponseChanges":{"type":"object"},"PostUsersResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"resourceId":{"type":"integer","format":"int64","example":11}}},"PostUsersRequest":{"type":"object","properties":{"username":{"type":"string","example":"newuser"},"firstname":{"type":"string","example":"Test"},"lastname":{"type":"string","example":"User"},"email":{"type":"string","example":"whatever@mifos.org"},"officeId":{"type":"integer","format":"int64","example":1},"staffId":{"type":"integer","format":"int64","example":1},"Roles":{"type":"string","example":"[2,3]"},"sendPasswordToEmail":{"type":"boolean","example":true},"isSelfServiceUser":{"type":"boolean","example":true}}}}} \ No newline at end of file diff --git a/fineract-provider/src/main/resources/swagger-ui/swagger-ui-bundle.js b/fineract-provider/src/main/resources/swagger-ui/swagger-ui-bundle.js new file mode 100644 index 000000000..5e71e3078 --- /dev/null +++ b/fineract-provider/src/main/resources/swagger-ui/swagger-ui-bundle.js @@ -0,0 +1,108 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.SwaggerUIBundle=t():e.SwaggerUIBundle=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="/dist",t(0)}(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(typeof e[t]){case"function":break;case"object":e[t]=function(t){var n=t.slice(1),r=e[t[0]];return function(e,t,i){r.apply(this,[e,t,i].concat(n))}}(e[t]);break;default:e[t]=e[e[t]]}return e}([function(e,t,n){n(1),e.exports=n(297)},function(e,t,n){(function(e){"use strict";function t(e,t,n){e[t]||Object[r](e,t,{writable:!0,configurable:!0,value:n})}if(n(2),n(293),n(294),e._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");e._babelPolyfill=!0;var r="defineProperty";t(String.prototype,"padLeft","".padStart),t(String.prototype,"padRight","".padEnd),"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function(e){[][e]&&t(Array,e,Function.call.bind([][e]))})}).call(t,function(){return this}())},function(e,t,n){n(3),n(52),n(53),n(54),n(55),n(57),n(60),n(61),n(62),n(63),n(64),n(65),n(66),n(67),n(68),n(70),n(72),n(74),n(76),n(79),n(80),n(81),n(85),n(87),n(89),n(92),n(93),n(94),n(95),n(97),n(98),n(99),n(100),n(101),n(102),n(103),n(105),n(106),n(107),n(109),n(110),n(111),n(113),n(114),n(115),n(116),n(117),n(118),n(119),n(120),n(121),n(122),n(123),n(124),n(125),n(126),n(131),n(132),n(136),n(137),n(138),n(139),n(141),n(142),n(143),n(144),n(145),n(146),n(147),n(148),n(149),n(150),n(151),n(152),n(153),n(154),n(155),n(156),n(157),n(159),n(160),n(166),n(167),n(169),n(170),n(171),n(175),n(176),n(177),n(178),n(179),n(181),n(182),n(183),n(184),n(187),n(189),n(190),n(191),n(193),n(195),n(197),n(198),n(199),n(201),n(202),n(203),n(204),n(211),n(214),n(215),n(217),n(218),n(221),n(222),n(224),n(225),n(226),n(227),n(228),n(229),n(230),n(231),n(232),n(233),n(234),n(235),n(236),n(237),n(238),n(239),n(240),n(241),n(242),n(244),n(245),n(246),n(247),n(248),n(249),n(251),n(252),n(253),n(254),n(255),n(256),n(257),n(258),n(260),n(261),n(263),n(264),n(265),n(266),n(269),n(270),n(271),n(272),n(273),n(274),n(275),n(276),n(278),n(279),n(280),n(281),n(282),n(283),n(284),n(285),n(286),n(287),n(288),n(291),n(292),e.exports=n(9)},[1379,4,5,6,8,18,22,7,23,24,19,25,26,27,29,42,45,12,32,16,17,46,49,51,11,30,50,44,43,28,10],function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},[1380,7],function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var r=n(4),i=n(9),o=n(10),a=n(18),s=n(20),u="prototype",c=function(e,t,n){var l,p,f,h,d=e&c.F,m=e&c.G,y=e&c.S,v=e&c.P,g=e&c.B,_=m?r:y?r[t]||(r[t]={}):(r[t]||{})[u],b=m?i:i[t]||(i[t]={}),x=b[u]||(b[u]={});m&&(n=t);for(l in n)p=!d&&_&&void 0!==_[l],f=(p?_:n)[l],h=g&&p?s(f,r):v&&"function"==typeof f?s(Function.call,f):f,_&&a(_,l,f,e&c.U),b[l]!=f&&o(b,l,h),v&&x[l]!=f&&(x[l]=f)};r.core=i,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},function(e,t){var n=e.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},[1381,11,17,6],[1382,12,14,16,6],[1383,13],function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},[1384,6,7,15],[1385,13,4],[1386,13],function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(4),i=n(10),o=n(5),a=n(19)("src"),s="toString",u=Function[s],c=(""+u).split(s);n(9).inspectSource=function(e){return u.call(e)},(e.exports=function(e,t,n,s){var u="function"==typeof n;u&&(o(n,"name")||i(n,"name",t)),e[t]!==n&&(u&&(o(n,a)||i(n,a,e[t]?""+e[t]:c.join(String(t)))),e===r?e[t]=n:s?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,s,function(){return"function"==typeof this&&this[a]||u.call(this)})},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},[1387,21],function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},[1388,19,13,5,11,7],[1389,4],[1390,11,5,25],[1391,23,19,4],[1392,25],[1393,4,9,28,26,11],function(e,t){e.exports=!1},[1394,30,32],[1395,31,41],[1396,5,32,36,40],[1397,33,35],[1398,34],function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},[1399,32,37,39],[1400,38],function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},[1401,38],[1402,23,19],function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},[1403,30,43,44],function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t){t.f={}.propertyIsEnumerable},[1404,34],[1405,12,47,41,40,15,48],[1406,11,12,30,6],[1407,4],[1408,32,50],[1409,31,41],[1410,44,17,32,16,5,14,6],[1411,8,46],[1412,8,6,11],function(e,t,n){var r=n(8);r(r.S+r.F*!n(6),"Object",{defineProperties:n(47)})},function(e,t,n){var r=n(32),i=n(51).f;n(56)("getOwnPropertyDescriptor",function(){return function(e,t){return i(r(e),t)}})},[1413,8,9,7],function(e,t,n){var r=n(58),i=n(59);n(56)("getPrototypeOf",function(){return function(e){return i(r(e))}})},[1414,35],[1415,5,58,40],[1416,58,30,56],function(e,t,n){n(56)("getOwnPropertyNames",function(){return n(49).f})},function(e,t,n){var r=n(13),i=n(22).onFreeze;n(56)("freeze",function(e){return function(t){return e&&r(t)?e(i(t)):t}})},function(e,t,n){var r=n(13),i=n(22).onFreeze;n(56)("seal",function(e){return function(t){return e&&r(t)?e(i(t)):t}})},function(e,t,n){var r=n(13),i=n(22).onFreeze;n(56)("preventExtensions",function(e){return function(t){return e&&r(t)?e(i(t)):t}})},function(e,t,n){var r=n(13);n(56)("isFrozen",function(e){return function(t){return!r(t)||!!e&&e(t)}})},function(e,t,n){var r=n(13);n(56)("isSealed",function(e){return function(t){return!r(t)||!!e&&e(t)}})},function(e,t,n){var r=n(13);n(56)("isExtensible",function(e){return function(t){return!!r(t)&&(!e||e(t))}})},[1417,8,69],[1418,30,43,44,58,33,7],function(e,t,n){var r=n(8);r(r.S,"Object",{is:n(71)})},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e===1/t:e!=e&&t!=t}},function(e,t,n){var r=n(8);r(r.S,"Object",{setPrototypeOf:n(73).set})},function(e,t,n){var r=n(13),i=n(12),o=function(e,t){if(i(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{r=n(20)(Function.call,n(51).f(Object.prototype,"__proto__").set,2),r(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return o(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:o}},function(e,t,n){"use strict";var r=n(75),i={};i[n(25)("toStringTag")]="z",i+""!="[object z]"&&n(18)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},[1419,34,25],function(e,t,n){var r=n(8);r(r.P,"Function",{bind:n(77)})},function(e,t,n){"use strict";var r=n(21),i=n(13),o=n(78),a=[].slice,s={},u=function(e,t,n){if(!(t in s)){for(var r=[],i=0;i>>0||(a.test(n)?16:10))}:r},function(e,t,n){var r=n(8),i=n(35),o=n(7),a=n(84),s="["+a+"]",u="​…",c=RegExp("^"+s+s+"*"),l=RegExp(s+s+"*$"),p=function(e,t,n){var i={},s=o(function(){return!!a[e]()||u[e]()!=u}),c=i[e]=s?t(f):a[e];n&&(i[n]=c),r(r.P+r.F*s,"String",i)},f=p.trim=function(e,t){return e=String(i(e)),1&t&&(e=e.replace(c,"")),2&t&&(e=e.replace(l,"")),e};e.exports=p},function(e,t){e.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},function(e,t,n){var r=n(8),i=n(86);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},function(e,t,n){var r=n(4).parseFloat,i=n(83).trim;e.exports=1/r(n(84)+"-0")!==-(1/0)?function(e){var t=i(String(e),3),n=r(t);return 0===n&&"-"==t.charAt(0)?-0:n}:r},function(e,t,n){"use strict";var r=n(4),i=n(5),o=n(34),a=n(88),s=n(16),u=n(7),c=n(50).f,l=n(51).f,p=n(11).f,f=n(83).trim,h="Number",d=r[h],m=d,y=d.prototype,v=o(n(46)(y))==h,g="trim"in String.prototype,_=function(e){var t=s(e,!1);if("string"==typeof t&&t.length>2){t=g?t.trim():f(t,3);var n,r,i,o=t.charCodeAt(0);if(43===o||45===o){if(n=t.charCodeAt(2),88===n||120===n)return NaN}else if(48===o){switch(t.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+t}for(var a,u=t.slice(2),c=0,l=u.length;ci)return NaN;return parseInt(u,r)}}return+t};if(!d(" 0o1")||!d("0b1")||d("+0x1")){d=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof d&&(v?u(function(){y.valueOf.call(n)}):o(n)!=h)?a(new m(_(t)),n,d):_(t)};for(var b,x=n(6)?c(m):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;x.length>w;w++)i(m,b=x[w])&&!i(d,b)&&p(d,b,l(m,b));d.prototype=y,y.constructor=d,n(18)(r,h,d)}},function(e,t,n){var r=n(13),i=n(73).set;e.exports=function(e,t,n){var o,a=t.constructor;return a!==n&&"function"==typeof a&&(o=a.prototype)!==n.prototype&&r(o)&&i&&i(e,o),e}},function(e,t,n){"use strict";var r=n(8),i=n(38),o=n(90),a=n(91),s=1..toFixed,u=Math.floor,c=[0,0,0,0,0,0],l="Number.toFixed: incorrect invocation!",p="0",f=function(e,t){for(var n=-1,r=t;++n<6;)r+=e*c[n],c[n]=r%1e7,r=u(r/1e7)},h=function(e){for(var t=6,n=0;--t>=0;)n+=c[t],c[t]=u(n/e),n=n%e*1e7},d=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==c[e]){var n=String(c[e]);t=""===t?n:t+a.call(p,7-n.length)+n}return t},m=function(e,t,n){return 0===t?n:t%2===1?m(e,t-1,n*e):m(e*e,t/2,n)},y=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t};r(r.P+r.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(7)(function(){s.call({})})),"Number",{toFixed:function(e){var t,n,r,s,u=o(this,l),c=i(e),v="",g=p;if(c<0||c>20)throw RangeError(l);if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return String(u);if(u<0&&(v="-",u=-u),u>1e-21)if(t=y(u*m(2,69,1))-69,n=t<0?u*m(2,-t,1):u/m(2,t,1),n*=4503599627370496,t=52-t,t>0){for(f(0,n),r=c;r>=7;)f(1e7,0),r-=7;for(f(m(10,r,1),0),r=t-1;r>=23;)h(1<<23),r-=23;h(1<0?(s=g.length,g=v+(s<=c?"0."+a.call(p,c-s)+g:g.slice(0,s-c)+"."+g.slice(s-c))):g=v+g,g}})},function(e,t,n){var r=n(34);e.exports=function(e,t){if("number"!=typeof e&&"Number"!=r(e))throw TypeError(t);return+e}},function(e,t,n){"use strict";var r=n(38),i=n(35);e.exports=function(e){var t=String(i(this)),n="",o=r(e);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(n+=t);return n}},function(e,t,n){"use strict";var r=n(8),i=n(7),o=n(90),a=1..toPrecision;r(r.P+r.F*(i(function(){return"1"!==a.call(1,void 0)})||!i(function(){a.call({})})),"Number",{toPrecision:function(e){var t=o(this,"Number#toPrecision: incorrect invocation!");return void 0===e?a.call(t):a.call(t,e)}})},function(e,t,n){var r=n(8);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(e,t,n){var r=n(8),i=n(4).isFinite;r(r.S,"Number",{isFinite:function(e){return"number"==typeof e&&i(e)}})},function(e,t,n){var r=n(8);r(r.S,"Number",{isInteger:n(96)})},function(e,t,n){var r=n(13),i=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&i(e)===e}},function(e,t,n){var r=n(8);r(r.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,n){var r=n(8),i=n(96),o=Math.abs;r(r.S,"Number",{isSafeInteger:function(e){return i(e)&&o(e)<=9007199254740991}})},function(e,t,n){var r=n(8);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){var r=n(8);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){var r=n(8),i=n(86);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(e,t,n){var r=n(8),i=n(82);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(e,t,n){var r=n(8),i=n(104),o=Math.sqrt,a=Math.acosh;r(r.S+r.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:i(e-1+o(e-1)*o(e+1))}})},function(e,t){e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Math.log(1+e)}},function(e,t,n){function r(e){return isFinite(e=+e)&&0!=e?e<0?-r(-e):Math.log(e+Math.sqrt(e*e+1)):e}var i=n(8),o=Math.asinh;i(i.S+i.F*!(o&&1/o(0)>0),"Math",{asinh:r})},function(e,t,n){var r=n(8),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},function(e,t,n){var r=n(8),i=n(108);r(r.S,"Math",{cbrt:function(e){return i(e=+e)*Math.pow(Math.abs(e),1/3)}})},function(e,t){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t,n){var r=n(8);r(r.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},function(e,t,n){var r=n(8),i=Math.exp;r(r.S,"Math",{cosh:function(e){return(i(e=+e)+i(-e))/2}})},function(e,t,n){var r=n(8),i=n(112);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},function(e,t){var n=Math.expm1;e.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||n(-2e-17)!=-2e-17?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Math.exp(e)-1}:n},function(e,t,n){var r=n(8),i=n(108),o=Math.pow,a=o(2,-52),s=o(2,-23),u=o(2,127)*(2-s),c=o(2,-126),l=function(e){return e+1/a-1/a};r(r.S,"Math",{fround:function(e){var t,n,r=Math.abs(e),o=i(e);return ru||n!=n?o*(1/0):o*n)}})},function(e,t,n){var r=n(8),i=Math.abs;r(r.S,"Math",{hypot:function(e,t){for(var n,r,o=0,a=0,s=arguments.length,u=0;a0?(r=n/u,o+=r*r):o+=n;return u===1/0?1/0:u*Math.sqrt(o)}})},function(e,t,n){var r=n(8),i=Math.imul;r(r.S+r.F*n(7)(function(){return i(4294967295,5)!=-5||2!=i.length}),"Math",{imul:function(e,t){var n=65535,r=+e,i=+t,o=n&r,a=n&i;return 0|o*a+((n&r>>>16)*a+o*(n&i>>>16)<<16>>>0)}})},function(e,t,n){var r=n(8);r(r.S,"Math",{log10:function(e){return Math.log(e)/Math.LN10}})},function(e,t,n){var r=n(8);r(r.S,"Math",{log1p:n(104)})},function(e,t,n){var r=n(8);r(r.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},function(e,t,n){var r=n(8);r(r.S,"Math",{sign:n(108)})},function(e,t,n){var r=n(8),i=n(112),o=Math.exp;r(r.S+r.F*n(7)(function(){return!Math.sinh(-2e-17)!=-2e-17}),"Math",{sinh:function(e){return Math.abs(e=+e)<1?(i(e)-i(-e))/2:(o(e-1)-o(-e-1))*(Math.E/2)}})},function(e,t,n){var r=n(8),i=n(112),o=Math.exp;r(r.S,"Math",{tanh:function(e){var t=i(e=+e),n=i(-e);return t==1/0?1:n==1/0?-1:(t-n)/(o(e)+o(-e))}})},function(e,t,n){var r=n(8);r(r.S,"Math",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}})},function(e,t,n){var r=n(8),i=n(39),o=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,a=0;r>a;){if(t=+arguments[a++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?o(t):o(((t-=65536)>>10)+55296,t%1024+56320))}return n.join("")}})},function(e,t,n){var r=n(8),i=n(32),o=n(37);r(r.S,"String",{raw:function(e){for(var t=i(e.raw),n=o(t.length),r=arguments.length,a=[],s=0;n>s;)a.push(String(t[s++])),s1?arguments[1]:void 0,r=i(t.length),u=void 0===n?r:Math.min(i(n),r),c=String(e);return s?s.call(t,c,u):t.slice(u-c.length,u)===c}})},function(e,t,n){var r=n(134),i=n(35);e.exports=function(e,t,n){if(r(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(e))}},function(e,t,n){var r=n(13),i=n(34),o=n(25)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},function(e,t,n){var r=n(25)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,!"/./"[e](t)}catch(e){}}return!0}},function(e,t,n){"use strict";var r=n(8),i=n(133),o="includes";r(r.P+r.F*n(135)(o),"String",{includes:function(e){return!!~i(this,e,o).indexOf(e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(8);r(r.P,"String",{repeat:n(91)})},function(e,t,n){"use strict";var r=n(8),i=n(37),o=n(133),a="startsWith",s=""[a];r(r.P+r.F*n(135)(a),"String",{startsWith:function(e){var t=o(this,e,a),n=i(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return s?s.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){"use strict";n(140)("anchor",function(e){return function(t){return e(this,"a","name",t)}})},function(e,t,n){var r=n(8),i=n(7),o=n(35),a=/"/g,s=function(e,t,n,r){var i=String(o(e)),s="<"+t;return""!==n&&(s+=" "+n+'="'+String(r).replace(a,""")+'"'),s+">"+i+""};e.exports=function(e,t){var n={};n[e]=t(s),r(r.P+r.F*i(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}),"String",n)}},function(e,t,n){"use strict";n(140)("big",function(e){return function(){return e(this,"big","","")}})},function(e,t,n){"use strict";n(140)("blink",function(e){return function(){return e(this,"blink","","")}})},function(e,t,n){"use strict";n(140)("bold",function(e){return function(){return e(this,"b","","")}})},function(e,t,n){"use strict";n(140)("fixed",function(e){return function(){return e(this,"tt","","")}})},function(e,t,n){"use strict";n(140)("fontcolor",function(e){return function(t){return e(this,"font","color",t)}})},function(e,t,n){"use strict";n(140)("fontsize",function(e){return function(t){return e(this,"font","size",t)}})},function(e,t,n){"use strict";n(140)("italics",function(e){return function(){return e(this,"i","","")}})},function(e,t,n){"use strict";n(140)("link",function(e){return function(t){return e(this,"a","href",t)}})},function(e,t,n){"use strict";n(140)("small",function(e){return function(){return e(this,"small","","")}})},function(e,t,n){"use strict";n(140)("strike",function(e){return function(){return e(this,"strike","","")}})},function(e,t,n){"use strict";n(140)("sub",function(e){return function(){return e(this,"sub","","")}})},function(e,t,n){"use strict";n(140)("sup",function(e){return function(){return e(this,"sup","","")}})},function(e,t,n){var r=n(8);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(e,t,n){"use strict";var r=n(8),i=n(58),o=n(16);r(r.P+r.F*n(7)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(e){var t=i(this),n=o(t);return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},function(e,t,n){"use strict";var r=n(8),i=n(7),o=Date.prototype.getTime,a=function(e){return e>9?e:"0"+e};r(r.P+r.F*(i(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!i(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function(){if(!isFinite(o.call(this)))throw RangeError("Invalid time value");var e=this,t=e.getUTCFullYear(),n=e.getUTCMilliseconds(),r=t<0?"-":t>9999?"+":"";return r+("00000"+Math.abs(t)).slice(r?-6:-4)+"-"+a(e.getUTCMonth()+1)+"-"+a(e.getUTCDate())+"T"+a(e.getUTCHours())+":"+a(e.getUTCMinutes())+":"+a(e.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}})},function(e,t,n){var r=Date.prototype,i="Invalid Date",o="toString",a=r[o],s=r.getTime;new Date(NaN)+""!=i&&n(18)(r,o,function(){var e=s.call(this);return e===e?a.call(this):i})},function(e,t,n){var r=n(25)("toPrimitive"),i=Date.prototype;r in i||n(10)(i,r,n(158))},function(e,t,n){"use strict";var r=n(12),i=n(16),o="number";e.exports=function(e){if("string"!==e&&e!==o&&"default"!==e)throw TypeError("Incorrect hint");return i(r(this),e!=o)}},function(e,t,n){var r=n(8);r(r.S,"Array",{isArray:n(45)})},[1424,20,8,58,161,162,37,163,164,165],[1425,12],[1426,129,25],[1427,11,17],[1428,75,25,129,9],[1429,25],function(e,t,n){"use strict";var r=n(8),i=n(163);r(r.S+r.F*n(7)(function(){function e(){}return!(Array.of.call(e)instanceof e)}),"Array",{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)i(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var r=n(8),i=n(32),o=[].join;r(r.P+r.F*(n(33)!=Object||!n(168)(o)),"Array",{join:function(e){return o.call(i(this),void 0===e?",":e)}})},function(e,t,n){var r=n(7);e.exports=function(e,t){return!!e&&r(function(){t?e.call(null,function(){},1):e.call(null)})}},function(e,t,n){"use strict";var r=n(8),i=n(48),o=n(34),a=n(39),s=n(37),u=[].slice;r(r.P+r.F*n(7)(function(){i&&u.call(i)}),"Array",{slice:function(e,t){var n=s(this.length),r=o(this);if(t=void 0===t?n:t,"Array"==r)return u.call(this,e,t);for(var i=a(e,n),c=a(t,n),l=s(c-i),p=Array(l),f=0;f=0:p>f;f+=h)f in l&&(s=t(s,l[f],f,c));return s}},function(e,t,n){"use strict";var r=n(8),i=n(180);r(r.P+r.F*!n(168)([].reduceRight,!0),"Array",{reduceRight:function(e){return i(this,e,arguments.length,arguments[1],!0)}})},function(e,t,n){"use strict";var r=n(8),i=n(36)(!1),o=[].indexOf,a=!!o&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(a||!n(168)(o)),"Array",{indexOf:function(e){return a?o.apply(this,arguments)||0:i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(8),i=n(32),o=n(38),a=n(37),s=[].lastIndexOf,u=!!s&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(u||!n(168)(s)),"Array",{lastIndexOf:function(e){if(u)return s.apply(this,arguments)||0;var t=i(this),n=a(t.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,o(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}})},function(e,t,n){var r=n(8);r(r.P,"Array",{copyWithin:n(185)}),n(186)("copyWithin")},function(e,t,n){"use strict";var r=n(58),i=n(39),o=n(37);e.exports=[].copyWithin||function(e,t){var n=r(this),a=o(n.length),s=i(e,a),u=i(t,a),c=arguments.length>2?arguments[2]:void 0,l=Math.min((void 0===c?a:i(c,a))-u,a-s),p=1;for(u0;)u in n?n[s]=n[u]:delete n[s],s+=p,u+=p;return n}},function(e,t,n){var r=n(25)("unscopables"),i=Array.prototype;void 0==i[r]&&n(10)(i,r,{}),e.exports=function(e){i[r][e]=!0}},function(e,t,n){var r=n(8);r(r.P,"Array",{fill:n(188)}),n(186)("fill")},function(e,t,n){"use strict";var r=n(58),i=n(39),o=n(37);e.exports=function(e){for(var t=r(this),n=o(t.length),a=arguments.length,s=i(a>1?arguments[1]:void 0,n),u=a>2?arguments[2]:void 0,c=void 0===u?n:i(u,n);c>s;)t[s++]=e;return t}},function(e,t,n){"use strict";var r=n(8),i=n(172)(5),o="find",a=!0;o in[]&&Array(1)[o](function(){a=!1}),r(r.P+r.F*a,"Array",{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(186)(o)},function(e,t,n){"use strict";var r=n(8),i=n(172)(6),o="findIndex",a=!0;o in[]&&Array(1)[o](function(){a=!1}),r(r.P+r.F*a,"Array",{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(186)(o)},function(e,t,n){n(192)("Array")},function(e,t,n){"use strict";var r=n(4),i=n(11),o=n(6),a=n(25)("species");e.exports=function(e){var t=r[e];o&&t&&!t[a]&&i.f(t,a,{configurable:!0,get:function(){return this}})}},[1433,186,194,129,32,128],function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){var r=n(4),i=n(88),o=n(11).f,a=n(50).f,s=n(134),u=n(196),c=r.RegExp,l=c,p=c.prototype,f=/a/g,h=/a/g,d=new c(f)!==f;if(n(6)&&(!d||n(7)(function(){return h[n(25)("match")]=!1,c(f)!=f||c(h)==h||"/a/i"!=c(f,"i")}))){c=function(e,t){var n=this instanceof c,r=s(e),o=void 0===t;return!n&&r&&e.constructor===c&&o?e:i(d?new l(r&&!o?e.source:e,t):l((r=e instanceof c)?e.source:e,r&&o?u.call(e):t),n?this:p,c)};for(var m=(function(e){e in c||o(c,e,{configurable:!0,get:function(){return l[e]},set:function(t){l[e]=t}})}),y=a(l),v=0;y.length>v;)m(y[v++]);p.constructor=c,c.prototype=p,n(18)(r,"RegExp",c)}n(192)("RegExp")},function(e,t,n){"use strict";var r=n(12);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";n(198);var r=n(12),i=n(196),o=n(6),a="toString",s=/./[a],u=function(e){n(18)(RegExp.prototype,a,e,!0)};n(7)(function(){return"/a/b"!=s.call({source:"a",flags:"b"})})?u(function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!o&&e instanceof RegExp?i.call(e):void 0)}):s.name!=a&&u(function(){return s.call(this)})},function(e,t,n){n(6)&&"g"!=/./g.flags&&n(11).f(RegExp.prototype,"flags",{configurable:!0,get:n(196)})},function(e,t,n){n(200)("match",1,function(e,t,n){return[function(n){"use strict";var r=e(this),i=void 0==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},n]})},function(e,t,n){"use strict";var r=n(10),i=n(18),o=n(7),a=n(35),s=n(25);e.exports=function(e,t,n){var u=s(e),c=n(a,u,""[e]),l=c[0],p=c[1];o(function(){var t={};return t[u]=function(){return 7},7!=""[e](t)})&&(i(String.prototype,e,l),r(RegExp.prototype,u,2==t?function(e,t){return p.call(e,this,t)}:function(e){return p.call(e,this)}))}},function(e,t,n){n(200)("replace",2,function(e,t,n){return[function(r,i){"use strict";var o=e(this),a=void 0==r?void 0:r[t];return void 0!==a?a.call(r,o,i):n.call(String(o),r,i)},n]})},function(e,t,n){n(200)("search",1,function(e,t,n){return[function(n){"use strict";var r=e(this),i=void 0==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},n]})},function(e,t,n){n(200)("split",2,function(e,t,r){"use strict";var i=n(134),o=r,a=[].push,s="split",u="length",c="lastIndex";if("c"=="abbc"[s](/(b)*/)[1]||4!="test"[s](/(?:)/,-1)[u]||2!="ab"[s](/(?:ab)*/)[u]||4!="."[s](/(.?)(.?)/)[u]||"."[s](/()()/)[u]>1||""[s](/.?/)[u]){var l=void 0===/()??/.exec("")[1];r=function(e,t){var n=String(this);if(void 0===e&&0===t)return[];if(!i(e))return o.call(n,e,t);var r,s,p,f,h,d=[],m=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),y=0,v=void 0===t?4294967295:t>>>0,g=new RegExp(e.source,m+"g");for(l||(r=new RegExp("^"+g.source+"$(?!\\s)",m));(s=g.exec(n))&&(p=s.index+s[0][u],!(p>y&&(d.push(n.slice(y,s.index)),!l&&s[u]>1&&s[0].replace(r,function(){for(h=1;h1&&s.index=v)));)g[c]===s.index&&g[c]++;return y===n[u]?!f&&g.test("")||d.push(""):d.push(n.slice(y)),d[u]>v?d.slice(0,v):d}}else"0"[s](void 0,0)[u]&&(r=function(e,t){return void 0===e&&0===t?[]:o.call(this,e,t)});return[function(n,i){var o=e(this),a=void 0==n?void 0:n[t];return void 0!==a?a.call(n,o,i):r.call(String(o),n,i)},r]})},[1434,28,4,20,75,8,13,21,205,206,207,208,209,25,210,24,192,9,165],function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},[1435,20,161,162,12,37,164],[1436,12,21,25],[1437,20,78,48,15,4,34],[1438,4,208,34],function(e,t,n){var r=n(18);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},function(e,t,n){"use strict";var r=n(212);e.exports=n(213)("Map",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{get:function(e){var t=r.getEntry(this,e);return t&&t.v},set:function(e,t){return r.def(this,0===e?0:e,t)}},r,!0)},function(e,t,n){"use strict";var r=n(11).f,i=n(46),o=n(210),a=n(20),s=n(205),u=n(35),c=n(206),l=n(128),p=n(194),f=n(192),h=n(6),d=n(22).fastKey,m=h?"_s":"size",y=function(e,t){var n,r=d(t);if("F"!==r)return e._i[r];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,l){var p=e(function(e,r){s(e,p,t,"_i"),e._i=i(null),e._f=void 0,e._l=void 0,e[m]=0,void 0!=r&&c(r,n,e[l],e)});return o(p.prototype,{clear:function(){for(var e=this,t=e._i,n=e._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete t[n.i];e._f=e._l=void 0,e[m]=0},delete:function(e){var t=this,n=y(t,e);if(n){var r=n.n,i=n.p;delete t._i[n.i],n.r=!0,i&&(i.n=r),r&&(r.p=i),t._f==n&&(t._f=r),t._l==n&&(t._l=i),t[m]--}return!!n},forEach:function(e){s(this,p,"forEach");for(var t,n=a(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.n:this._f;)for(n(t.v,t.k,this);t&&t.r;)t=t.p},has:function(e){return!!y(this,e)}}),h&&r(p.prototype,"size",{get:function(){return u(this[m])}}),p},def:function(e,t,n){var r,i,o=y(e,t);return o?o.v=n:(e._l=o={i:i=d(t,!0),k:t,v:n,p:r=e._l,n:void 0,r:!1},e._f||(e._f=o), +r&&(r.n=o),e[m]++,"F"!==i&&(e._i[i]=o)),e},getEntry:y,setStrong:function(e,t,n){l(e,t,function(e,t){this._t=e,this._k=t,this._l=void 0},function(){for(var e=this,t=e._k,n=e._l;n&&n.r;)n=n.p;return e._t&&(e._l=n=n?n.n:e._t._f)?"keys"==t?p(0,n.k):"values"==t?p(0,n.v):p(0,[n.k,n.v]):(e._t=void 0,p(1))},n?"entries":"values",!n,!0),f(t)}}},function(e,t,n){"use strict";var r=n(4),i=n(8),o=n(18),a=n(210),s=n(22),u=n(206),c=n(205),l=n(13),p=n(7),f=n(165),h=n(24),d=n(88);e.exports=function(e,t,n,m,y,v){var g=r[e],_=g,b=y?"set":"add",x=_&&_.prototype,w={},k=function(e){var t=x[e];o(x,e,"delete"==e?function(e){return!(v&&!l(e))&&t.call(this,0===e?0:e)}:"has"==e?function(e){return!(v&&!l(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return v&&!l(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if("function"==typeof _&&(v||x.forEach&&!p(function(){(new _).entries().next()}))){var S=new _,E=S[b](v?{}:-0,1)!=S,C=p(function(){S.has(1)}),A=f(function(e){new _(e)}),T=!v&&p(function(){for(var e=new _,t=5;t--;)e[b](t,t);return!e.has(-0)});A||(_=t(function(t,n){c(t,_,e);var r=d(new g,t,_);return void 0!=n&&u(n,y,r[b],r),r}),_.prototype=x,x.constructor=_),(C||T)&&(k("delete"),k("has"),y&&k("get")),(T||E)&&k(b),v&&x.clear&&delete x.clear}else _=m.getConstructor(t,e,y,b),a(_.prototype,n),s.NEED=!0;return h(_,e),w[e]=_,i(i.G+i.W+i.F*(_!=g),w),v||m.setStrong(_,e,y),_}},function(e,t,n){"use strict";var r=n(212);e.exports=n(213)("Set",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return r.def(this,e=0===e?0:e,e)}},r)},[1439,172,18,22,69,216,13,213],[1440,210,22,12,13,205,206,172,5],function(e,t,n){"use strict";var r=n(216);n(213)("WeakSet",function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},{add:function(e){return r.def(this,e,!0)}},r,!1,!0)},function(e,t,n){"use strict";var r=n(8),i=n(219),o=n(220),a=n(12),s=n(39),u=n(37),c=n(13),l=n(4).ArrayBuffer,p=n(207),f=o.ArrayBuffer,h=o.DataView,d=i.ABV&&l.isView,m=f.prototype.slice,y=i.VIEW,v="ArrayBuffer";r(r.G+r.W+r.F*(l!==f),{ArrayBuffer:f}),r(r.S+r.F*!i.CONSTR,v,{isView:function(e){return d&&d(e)||c(e)&&y in e}}),r(r.P+r.U+r.F*n(7)(function(){return!new f(2).slice(1,void 0).byteLength}),v,{slice:function(e,t){if(void 0!==m&&void 0===t)return m.call(a(this),e);for(var n=a(this).byteLength,r=s(e,n),i=s(void 0===t?n:t,n),o=new(p(this,f))(u(i-r)),c=new h(this),l=new h(o),d=0;r>1,l=23===t?O(2,-24)-O(2,-77):0,p=0,f=e<0||0===e&&1/e<0?1:0;for(e=T(e),e!=e||e===C?(i=e!=e?1:0,r=u):(r=D(M(e)/P),e*(o=O(2,-r))<1&&(r--,o*=2),e+=r+c>=1?l/o:l*O(2,1-c),e*o>=2&&(r++,o/=2),r+c>=u?(i=0,r=u):r+c>=1?(i=(e*o-1)*O(2,t),r+=c):(i=e*O(2,c-1)*O(2,t),r=0));t>=8;a[p++]=255&i,i/=256,t-=8);for(r=r<0;a[p++]=255&r,r/=256,s-=8);return a[--p]|=128*f,a},z=function(e,t,n){var r,i=8*n-t-1,o=(1<>1,s=i-7,u=n-1,c=e[u--],l=127&c;for(c>>=7;s>0;l=256*l+e[u],u--,s-=8);for(r=l&(1<<-s)-1,l>>=-s,s+=t;s>0;r=256*r+e[u],u--,s-=8);if(0===l)l=1-a;else{if(l===o)return r?NaN:c?-C:C;r+=O(2,t),l-=a}return(c?-1:1)*r*O(2,l-t)},q=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},U=function(e){return[255&e]},W=function(e){return[255&e,e>>8&255]},K=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},V=function(e){return L(e,52,8)},H=function(e){return L(e,23,4)},J=function(e,t,n){d(e[_],t,{get:function(){return this[n]}})},G=function(e,t,n,r){var i=+n,o=p(i);if(i!=o||o<0||o+t>e[F])throw E(x);var a=e[N]._b,s=o+e[B],u=a.slice(s,s+t);return r?u:u.reverse()},X=function(e,t,n,r,i,o){var a=+n,s=p(a);if(a!=s||s<0||s+t>e[F])throw E(x);for(var u=e[N]._b,c=s+e[B],l=r(+i),f=0;fee;)($=Q[ee++])in w||s(w,$,A[$]);o||(Z.constructor=w)}var te=new k(new w(2)),ne=k[_].setInt8;te.setInt8(0,2147483648),te.setInt8(1,2147483649),!te.getInt8(0)&&te.getInt8(1)||u(k[_],{setInt8:function(e,t){ne.call(this,e,t<<24>>24)},setUint8:function(e,t){ne.call(this,e,t<<24>>24)}},!0)}else w=function(e){var t=Y(this,e);this._b=m.call(Array(t),0),this[F]=t},k=function(e,t,n){l(this,k,g),l(e,w,g);var r=e[F],i=p(t);if(i<0||i>r)throw E("Wrong offset!");if(n=void 0===n?r-i:f(n),i+n>r)throw E(b);this[N]=e,this[B]=i,this[F]=n},i&&(J(w,j,"_l"),J(k,I,"_b"),J(k,j,"_l"),J(k,R,"_o")),u(k[_],{getInt8:function(e){return G(this,1,e)[0]<<24>>24},getUint8:function(e){return G(this,1,e)[0]},getInt16:function(e){var t=G(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=G(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return q(G(this,4,e,arguments[1]))},getUint32:function(e){return q(G(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return z(G(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return z(G(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){X(this,1,e,U,t)},setUint8:function(e,t){X(this,1,e,U,t)},setInt16:function(e,t){X(this,2,e,W,t,arguments[2])},setUint16:function(e,t){X(this,2,e,W,t,arguments[2])},setInt32:function(e,t){X(this,4,e,K,t,arguments[2])},setUint32:function(e,t){X(this,4,e,K,t,arguments[2])},setFloat32:function(e,t){X(this,4,e,H,t,arguments[2])},setFloat64:function(e,t){X(this,8,e,V,t,arguments[2])}});y(w,v),y(k,g),s(k[_],a.VIEW,!0),t[v]=w,t[g]=k},function(e,t,n){var r=n(8);r(r.G+r.W+r.F*!n(219).ABV,{DataView:n(220).DataView})},function(e,t,n){n(223)("Int8",1,function(e){return function(t,n,r){return e(this,t,n,r)}})},function(e,t,n){"use strict";if(n(6)){var r=n(28),i=n(4),o=n(7),a=n(8),s=n(219),u=n(220),c=n(20),l=n(205),p=n(17),f=n(10),h=n(210),d=n(38),m=n(37),y=n(39),v=n(16),g=n(5),_=n(71),b=n(75),x=n(13),w=n(58),k=n(162),S=n(46),E=n(59),C=n(50).f,A=n(164),T=n(19),O=n(25),D=n(172),M=n(36),P=n(207),I=n(193),j=n(129),R=n(165),N=n(192),F=n(188),B=n(185),L=n(11),z=n(51),q=L.f,U=z.f,W=i.RangeError,K=i.TypeError,V=i.Uint8Array,H="ArrayBuffer",J="Shared"+H,G="BYTES_PER_ELEMENT",X="prototype",Y=Array[X],$=u.ArrayBuffer,Z=u.DataView,Q=D(0),ee=D(2),te=D(3),ne=D(4),re=D(5),ie=D(6),oe=M(!0),ae=M(!1),se=I.values,ue=I.keys,ce=I.entries,le=Y.lastIndexOf,pe=Y.reduce,fe=Y.reduceRight,he=Y.join,de=Y.sort,me=Y.slice,ye=Y.toString,ve=Y.toLocaleString,ge=O("iterator"),_e=O("toStringTag"),be=T("typed_constructor"),xe=T("def_constructor"),we=s.CONSTR,ke=s.TYPED,Se=s.VIEW,Ee="Wrong length!",Ce=D(1,function(e,t){return Pe(P(e,e[xe]),t)}),Ae=o(function(){return 1===new V(new Uint16Array([1]).buffer)[0]}),Te=!!V&&!!V[X].set&&o(function(){new V(1).set({})}),Oe=function(e,t){if(void 0===e)throw K(Ee);var n=+e,r=m(e);if(t&&!_(n,r))throw W(Ee);return r},De=function(e,t){var n=d(e);if(n<0||n%t)throw W("Wrong offset!");return n},Me=function(e){if(x(e)&&ke in e)return e;throw K(e+" is not a typed array!")},Pe=function(e,t){if(!(x(e)&&be in e))throw K("It is not a typed array constructor!");return new e(t)},Ie=function(e,t){return je(P(e,e[xe]),t)},je=function(e,t){for(var n=0,r=t.length,i=Pe(e,r);r>n;)i[n]=t[n++];return i},Re=function(e,t,n){q(e,t,{get:function(){return this._d[n]}})},Ne=function(e){var t,n,r,i,o,a,s=w(e),u=arguments.length,l=u>1?arguments[1]:void 0,p=void 0!==l,f=A(s);if(void 0!=f&&!k(f)){for(a=f.call(s),r=[],t=0;!(o=a.next()).done;t++)r.push(o.value);s=r}for(p&&u>2&&(l=c(l,arguments[2],2)),t=0,n=m(s.length),i=Pe(this,n);n>t;t++)i[t]=p?l(s[t],t):s[t];return i},Fe=function(){for(var e=0,t=arguments.length,n=Pe(this,t);t>e;)n[e]=arguments[e++];return n},Be=!!V&&o(function(){ve.call(new V(1))}),Le=function(){return ve.apply(Be?me.call(Me(this)):Me(this),arguments)},ze={copyWithin:function(e,t){return B.call(Me(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return ne(Me(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return F.apply(Me(this),arguments)},filter:function(e){return Ie(this,ee(Me(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return re(Me(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ie(Me(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){Q(Me(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ae(Me(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return oe(Me(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return he.apply(Me(this),arguments)},lastIndexOf:function(e){return le.apply(Me(this),arguments)},map:function(e){return Ce(Me(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return pe.apply(Me(this),arguments)},reduceRight:function(e){return fe.apply(Me(this),arguments)},reverse:function(){for(var e,t=this,n=Me(t).length,r=Math.floor(n/2),i=0;i1?arguments[1]:void 0)},sort:function(e){return de.call(Me(this),e)},subarray:function(e,t){var n=Me(this),r=n.length,i=y(e,r);return new(P(n,n[xe]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,m((void 0===t?r:y(t,r))-i))}},qe=function(e,t){return Ie(this,me.call(Me(this),e,t))},Ue=function(e){Me(this);var t=De(arguments[1],1),n=this.length,r=w(e),i=m(r.length),o=0;if(i+t>n)throw W(Ee);for(;o255?255:255&r),i.v[d](n*t+i.o,r,Ae)},O=function(e,t){q(e,t,{get:function(){return A(this,t)},set:function(e){return T(this,t,e)},enumerable:!0})};_?(y=n(function(e,n,r,i){l(e,y,c,"_d");var o,a,s,u,p=0,h=0;if(x(n)){if(!(n instanceof $||(u=b(n))==H||u==J))return ke in n?je(y,n):Ne.call(y,n);o=n,h=De(r,t);var d=n.byteLength;if(void 0===i){if(d%t)throw W(Ee);if(a=d-h,a<0)throw W(Ee)}else if(a=m(i)*t,a+h>d)throw W(Ee);s=a/t}else s=Oe(n,!0),a=s*t,o=new $(a);for(f(e,"_d",{b:o,o:h,l:a,e:s,v:new Z(o)});p=n.length)return{value:void 0,done:!0};while(!((e=n[t._i++])in t._t));return{value:e,done:!1}}),r(r.S,"Reflect",{enumerate:function(e){return new o(e)}})},function(e,t,n){function r(e,t){var n,s,l=arguments.length<3?e:arguments[2];return c(e)===l?e[t]:(n=i.f(e,t))?a(n,"value")?n.value:void 0!==n.get?n.get.call(l):void 0:u(s=o(e))?r(s,t,l):void 0}var i=n(51),o=n(59),a=n(5),s=n(8),u=n(13),c=n(12);s(s.S,"Reflect",{get:r})},function(e,t,n){var r=n(51),i=n(8),o=n(12);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(e,t){return r.f(o(e),t)}})},function(e,t,n){var r=n(8),i=n(59),o=n(12);r(r.S,"Reflect",{getPrototypeOf:function(e){return i(o(e))}})},function(e,t,n){var r=n(8);r(r.S,"Reflect",{has:function(e,t){return t in e}})},function(e,t,n){var r=n(8),i=n(12),o=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(e){return i(e),!o||o(e)}})},function(e,t,n){var r=n(8);r(r.S,"Reflect",{ownKeys:n(243)})},function(e,t,n){var r=n(50),i=n(43),o=n(12),a=n(4).Reflect;e.exports=a&&a.ownKeys||function(e){var t=r.f(o(e)),n=i.f;return n?t.concat(n(e)):t}},function(e,t,n){var r=n(8),i=n(12),o=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(e){i(e);try{return o&&o(e),!0}catch(e){return!1}}})},function(e,t,n){function r(e,t,n){var u,f,h=arguments.length<4?e:arguments[3],d=o.f(l(e),t);if(!d){if(p(f=a(e)))return r(f,t,n,h);d=c(0)}return s(d,"value")?!(d.writable===!1||!p(h))&&(u=o.f(h,t)||c(0),u.value=n,i.f(h,t,u),!0):void 0!==d.set&&(d.set.call(h,n),!0)}var i=n(11),o=n(51),a=n(59),s=n(5),u=n(8),c=n(17),l=n(12),p=n(13);u(u.S,"Reflect",{set:r})},function(e,t,n){var r=n(8),i=n(73);i&&r(r.S,"Reflect",{setPrototypeOf:function(e,t){i.check(e,t);try{return i.set(e,t),!0}catch(e){return!1}}})},function(e,t,n){"use strict";var r=n(8),i=n(36)(!0);r(r.P,"Array",{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(186)("includes")},function(e,t,n){"use strict";var r=n(8),i=n(127)(!0);r(r.P,"String",{at:function(e){return i(this,e)}})},function(e,t,n){"use strict";var r=n(8),i=n(250);r(r.P,"String",{padStart:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},function(e,t,n){var r=n(37),i=n(91),o=n(35);e.exports=function(e,t,n,a){var s=String(o(e)),u=s.length,c=void 0===n?" ":String(n),l=r(t);if(l<=u||""==c)return s;var p=l-u,f=i.call(c,Math.ceil(p/c.length));return f.length>p&&(f=f.slice(0,p)),a?f+s:s+f}},function(e,t,n){"use strict";var r=n(8),i=n(250);r(r.P,"String",{padEnd:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!1)}})},function(e,t,n){"use strict";n(83)("trimLeft",function(e){return function(){return e(this,1)}},"trimStart")},function(e,t,n){"use strict";n(83)("trimRight",function(e){return function(){return e(this,2)}},"trimEnd")},function(e,t,n){"use strict";var r=n(8),i=n(35),o=n(37),a=n(134),s=n(196),u=RegExp.prototype,c=function(e,t){this._r=e,this._s=t};n(130)(c,"RegExp String",function(){var e=this._r.exec(this._s);return{value:e,done:null===e}}),r(r.P,"String",{matchAll:function(e){if(i(this),!a(e))throw TypeError(e+" is not a regexp!");var t=String(this),n="flags"in u?String(e.flags):s.call(e),r=new RegExp(e.source,~n.indexOf("g")?n:"g"+n);return r.lastIndex=o(e.lastIndex),new c(r,t)}})},[1441,27],[1442,27],function(e,t,n){var r=n(8),i=n(243),o=n(32),a=n(51),s=n(163);r(r.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n=o(e),r=a.f,u=i(n),c={},l=0;u.length>l;)s(c,t=u[l++],r(n,t));return c}})},function(e,t,n){var r=n(8),i=n(259)(!1);r(r.S,"Object",{values:function(e){return i(e)}})},function(e,t,n){var r=n(30),i=n(32),o=n(44).f;e.exports=function(e){return function(t){for(var n,a=i(t),s=r(a),u=s.length,c=0,l=[];u>c;)o.call(a,n=s[c++])&&l.push(e?[n,a[n]]:a[n]);return l}}},function(e,t,n){var r=n(8),i=n(259)(!0);r(r.S,"Object",{entries:function(e){return i(e)}})},function(e,t,n){"use strict";var r=n(8),i=n(58),o=n(21),a=n(11);n(6)&&r(r.P+n(262),"Object",{__defineGetter__:function(e,t){a.f(i(this),e,{get:o(t),enumerable:!0,configurable:!0})}})},function(e,t,n){e.exports=n(28)||!n(7)(function(){var e=Math.random();__defineSetter__.call(null,e,function(){}),delete n(4)[e]})},function(e,t,n){"use strict";var r=n(8),i=n(58),o=n(21),a=n(11);n(6)&&r(r.P+n(262),"Object",{__defineSetter__:function(e,t){a.f(i(this),e,{set:o(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var r=n(8),i=n(58),o=n(16),a=n(59),s=n(51).f;n(6)&&r(r.P+n(262),"Object",{__lookupGetter__:function(e){var t,n=i(this),r=o(e,!0);do if(t=s(n,r))return t.get;while(n=a(n))}})},function(e,t,n){"use strict";var r=n(8),i=n(58),o=n(16),a=n(59),s=n(51).f;n(6)&&r(r.P+n(262),"Object",{__lookupSetter__:function(e){var t,n=i(this),r=o(e,!0);do if(t=s(n,r))return t.set;while(n=a(n))}})},function(e,t,n){var r=n(8);r(r.P+r.R,"Map",{toJSON:n(267)("Map")})},function(e,t,n){var r=n(75),i=n(268);e.exports=function(e){return function(){if(r(this)!=e)throw TypeError(e+"#toJSON isn't generic");return i(this)}}},function(e,t,n){var r=n(206);e.exports=function(e,t){var n=[];return r(e,!1,n.push,n,t),n}},function(e,t,n){var r=n(8);r(r.P+r.R,"Set",{toJSON:n(267)("Set")})},function(e,t,n){var r=n(8);r(r.S,"System",{global:n(4)})},function(e,t,n){var r=n(8),i=n(34);r(r.S,"Error",{isError:function(e){return"Error"===i(e)}})},function(e,t,n){var r=n(8);r(r.S,"Math",{iaddh:function(e,t,n,r){var i=e>>>0,o=t>>>0,a=n>>>0;return o+(r>>>0)+((i&a|(i|a)&~(i+a>>>0))>>>31)|0}})},function(e,t,n){var r=n(8);r(r.S,"Math",{isubh:function(e,t,n,r){var i=e>>>0,o=t>>>0,a=n>>>0;return o-(r>>>0)-((~i&a|~(i^a)&i-a>>>0)>>>31)|0}})},function(e,t,n){var r=n(8);r(r.S,"Math",{imulh:function(e,t){var n=65535,r=+e,i=+t,o=r&n,a=i&n,s=r>>16,u=i>>16,c=(s*a>>>0)+(o*a>>>16);return s*u+(c>>16)+((o*u>>>0)+(c&n)>>16)}})},function(e,t,n){var r=n(8);r(r.S,"Math",{umulh:function(e,t){var n=65535,r=+e,i=+t,o=r&n,a=i&n,s=r>>>16,u=i>>>16,c=(s*a>>>0)+(o*a>>>16);return s*u+(c>>>16)+((o*u>>>0)+(c&n)>>>16)}})},function(e,t,n){var r=n(277),i=n(12),o=r.key,a=r.set;r.exp({defineMetadata:function(e,t,n,r){a(e,t,i(n),o(r))}})},function(e,t,n){var r=n(211),i=n(8),o=n(23)("metadata"),a=o.store||(o.store=new(n(215))),s=function(e,t,n){var i=a.get(e);if(!i){if(!n)return;a.set(e,i=new r)}var o=i.get(t);if(!o){if(!n)return;i.set(t,o=new r)}return o},u=function(e,t,n){var r=s(t,n,!1);return void 0!==r&&r.has(e)},c=function(e,t,n){var r=s(t,n,!1);return void 0===r?void 0:r.get(e)},l=function(e,t,n,r){s(n,r,!0).set(e,t)},p=function(e,t){var n=s(e,t,!1),r=[];return n&&n.forEach(function(e,t){r.push(t)}),r},f=function(e){return void 0===e||"symbol"==typeof e?e:String(e)},h=function(e){i(i.S,"Reflect",e)};e.exports={store:a,map:s,has:u,get:c,set:l,keys:p,key:f,exp:h}},function(e,t,n){var r=n(277),i=n(12),o=r.key,a=r.map,s=r.store;r.exp({deleteMetadata:function(e,t){var n=arguments.length<3?void 0:o(arguments[2]),r=a(i(t),n,!1);if(void 0===r||!r.delete(e))return!1;if(r.size)return!0;var u=s.get(t);return u.delete(n),!!u.size||s.delete(t)}})},function(e,t,n){var r=n(277),i=n(12),o=n(59),a=r.has,s=r.get,u=r.key,c=function(e,t,n){var r=a(e,t,n);if(r)return s(e,t,n);var i=o(t);return null!==i?c(e,i,n):void 0};r.exp({getMetadata:function(e,t){return c(e,i(t),arguments.length<3?void 0:u(arguments[2]))}})},function(e,t,n){var r=n(214),i=n(268),o=n(277),a=n(12),s=n(59),u=o.keys,c=o.key,l=function(e,t){var n=u(e,t),o=s(e);if(null===o)return n;var a=l(o,t);return a.length?n.length?i(new r(n.concat(a))):a:n};o.exp({getMetadataKeys:function(e){return l(a(e),arguments.length<2?void 0:c(arguments[1]))}})},function(e,t,n){var r=n(277),i=n(12),o=r.get,a=r.key;r.exp({getOwnMetadata:function(e,t){return o(e,i(t),arguments.length<3?void 0:a(arguments[2]))}})},function(e,t,n){var r=n(277),i=n(12),o=r.keys,a=r.key;r.exp({getOwnMetadataKeys:function(e){return o(i(e),arguments.length<2?void 0:a(arguments[1]))}})},function(e,t,n){var r=n(277),i=n(12),o=n(59),a=r.has,s=r.key,u=function(e,t,n){var r=a(e,t,n);if(r)return!0;var i=o(t);return null!==i&&u(e,i,n)};r.exp({hasMetadata:function(e,t){return u(e,i(t),arguments.length<3?void 0:s(arguments[2]))}})},function(e,t,n){var r=n(277),i=n(12),o=r.has,a=r.key;r.exp({hasOwnMetadata:function(e,t){return o(e,i(t),arguments.length<3?void 0:a(arguments[2]))}})},function(e,t,n){var r=n(277),i=n(12),o=n(21),a=r.key,s=r.set;r.exp({metadata:function(e,t){return function(n,r){s(e,t,(void 0!==r?i:o)(n),a(r))}}})},function(e,t,n){var r=n(8),i=n(209)(),o=n(4).process,a="process"==n(34)(o);r(r.G,{asap:function(e){var t=a&&o.domain;i(t?t.bind(e):e)}})},function(e,t,n){"use strict";var r=n(8),i=n(4),o=n(9),a=n(209)(),s=n(25)("observable"),u=n(21),c=n(12),l=n(205),p=n(210),f=n(10),h=n(206),d=h.RETURN,m=function(e){return null==e?void 0:u(e)},y=function(e){var t=e._c;t&&(e._c=void 0,t())},v=function(e){return void 0===e._o},g=function(e){v(e)||(e._o=void 0,y(e))},_=function(e,t){c(e),this._c=void 0,this._o=e,e=new b(this);try{var n=t(e),r=n;null!=n&&("function"==typeof n.unsubscribe?n=function(){r.unsubscribe()}:u(n),this._c=n)}catch(t){return void e.error(t)}v(this)&&y(this)};_.prototype=p({},{unsubscribe:function(){g(this)}});var b=function(e){this._s=e};b.prototype=p({},{next:function(e){var t=this._s;if(!v(t)){var n=t._o;try{var r=m(n.next);if(r)return r.call(n,e)}catch(e){try{g(t)}finally{throw e}}}},error:function(e){var t=this._s;if(v(t))throw e;var n=t._o;t._o=void 0;try{var r=m(n.error);if(!r)throw e;e=r.call(n,e)}catch(e){try{y(t)}finally{throw e}}return y(t),e},complete:function(e){var t=this._s;if(!v(t)){var n=t._o;t._o=void 0;try{var r=m(n.complete);e=r?r.call(n,e):void 0}catch(e){try{y(t)}finally{throw e}}return y(t),e}}});var x=function(e){l(this,x,"Observable","_f")._f=u(e)};p(x.prototype,{subscribe:function(e){return new _(e,this._f)},forEach:function(e){var t=this;return new(o.Promise||i.Promise)(function(n,r){u(e);var i=t.subscribe({next:function(t){try{return e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:n})})}}),p(x,{from:function(e){var t="function"==typeof this?this:x,n=m(c(e)[s]);if(n){var r=c(n.call(e));return r.constructor===t?r:new t(function(e){return r.subscribe(e)})}return new t(function(t){var n=!1;return a(function(){if(!n){try{if(h(e,!1,function(e){if(t.next(e),n)return d})===d)return}catch(e){if(n)throw e;return void t.error(e)}t.complete()}}),function(){n=!0}})},of:function(){for(var e=0,t=arguments.length,n=Array(t);ea;)(n[a]=arguments[a++])===s&&(u=!0);return function(){var r,o=this,a=arguments.length,c=0,l=0;if(!u&&!a)return i(e,n,o);if(r=n.slice(),u)for(;t>c;c++)r[c]===s&&(r[c]=arguments[l++]);for(;a>l;)r.push(arguments[l++]);return i(e,r,o)}}},function(e,t,n){e.exports=n(4)},function(e,t,n){var r=n(8),i=n(208);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(e,t,n){for(var r=n(193),i=n(18),o=n(4),a=n(10),s=n(129),u=n(25),c=u("iterator"),l=u("toStringTag"),p=s.Array,f=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],h=0;h<5;h++){var d,m=f[h],y=o[m],v=y&&y.prototype;if(v){v[c]||a(v,c,p),v[l]||a(v,l,m),s[m]=p;for(d in r)v[d]||i(v,d,r[d],!0)}}},function(e,t){(function(t){!function(t){"use strict";function n(e,t,n,r){var o=t&&t.prototype instanceof i?t:i,a=Object.create(o.prototype),s=new h(r||[]);return a._invoke=c(e,n,s),a}function r(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function i(){}function o(){}function a(){}function s(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function u(e){function n(t,i,o,a){var s=r(e[t],e,i);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"==typeof c&&g.call(c,"__await")?Promise.resolve(c.__await).then(function(e){n("next",e,o,a)},function(e){n("throw",e,o,a)}):Promise.resolve(c).then(function(e){u.value=e,o(u)},a)}a(s.arg)}function i(e,t){function r(){return new Promise(function(r,i){n(e,t,r,i)})}return o=o?o.then(r,r):r()}"object"==typeof t.process&&t.process.domain&&(n=t.process.domain.bind(n));var o;this._invoke=i}function c(e,t,n){var i=E;return function(o,a){if(i===A)throw new Error("Generator is already running");if(i===T){if("throw"===o)throw a;return m()}for(n.method=o,n.arg=a;;){var s=n.delegate;if(s){var u=l(s,n);if(u){if(u===O)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===E)throw i=T,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=A;var c=r(e,t,n);if("normal"===c.type){if(i=n.done?T:C,c.arg===O)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i=T,n.method="throw",n.arg=c.arg)}}}function l(e,t){var n=e.iterator[t.method];if(n===y){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=y,l(e,t),"throw"===t.method))return O;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return O}var i=r(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,O;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=y),t.delegate=null,O):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,O)}function p(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function f(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function h(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(p,this),this.reset(!0)}function d(e){if(e){var t=e[b];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n=0;--r){var i=this.tryEntries[r],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=g.call(i,"catchLoc"),s=g.call(i,"finallyLoc");if(a&&s){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&g.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),f(n),O}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;f(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:d(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=y),O}}}("object"==typeof t?t:"object"==typeof window?window:"object"==typeof self?self:this)}).call(t,function(){return this}())},function(e,t,n){n(295),e.exports=n(9).RegExp.escape},function(e,t,n){var r=n(8),i=n(296)(/[\\^$*+?.()|[\]{}]/g,"\\$&");r(r.S,"RegExp",{escape:function(e){return i(e)}})},function(e,t){e.exports=function(e,t){var n=t===Object(t)?function(e){return t[e]}:t;return function(t){return String(t).replace(e,n)}}},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=n(298),s=i(a),u=n(303),c=i(u),l=n(334),p=i(l),f=n(559),h=i(f),d=n(1377),m=r(d),y=n(335),v=["url","spec","validatorUrl","onComplete","onFailure","authorizations","docExpansion","apisSorter","operationsSorter","supportedSubmitMethods","dom_id","defaultModelRendering","oauth2RedirectUrl","showRequestHeaders","custom","modelPropertyMacro","parameterMacro","displayOperationId"],g={PACKAGE_VERSION:"3.0.16",GIT_COMMIT:"gafcb7d3",GIT_DIRTY:!0},_=g.GIT_DIRTY,b=g.GIT_COMMIT,x=g.PACKAGE_VERSION;e.exports=function(e){p.default.versions=p.default.versions||{},p.default.versions.swaggerUi=x+"/"+(b||"unknown")+(_?"-dirty":"");var t={dom_id:null,spec:{},url:"",layout:"BaseLayout",docExpansion:"list",validatorUrl:"https://online.swagger.io/validator",configs:{},custom:{},displayOperationId:!1,presets:[],plugins:[],fn:{},components:{},state:{},store:{}},n=(0,s.default)({},t,e),r=(0,s.default)({},n.store,{system:{configs:n.configs},plugins:n.presets,state:{layout:{layout:n.layout},spec:{spec:"",url:n.url}}}),i=function(){return{fn:n.fn,components:n.components,state:n.state}},a=new c.default(r);a.register([n.plugins,i]);var u=a.getSystem(),l=(0,y.parseSeach)();u.initOAuth=u.authActions.configureAuth;var f=function(e){if("object"!==("undefined"==typeof n?"undefined":o(n)))return u;var t=u.specSelectors.getLocalConfig?u.specSelectors.getLocalConfig():{},r=(0,s.default)({},t,n,e||{},l);return a.setConfigs((0,y.filterConfigs)(r,v)),null!==e&&(!l.url&&"object"===o(r.spec)&&Object.keys(r.spec).length?(u.specActions.updateUrl(""),u.specActions.updateLoadingStatus("success"),u.specActions.updateSpec(JSON.stringify(r.spec))):u.specActions.download&&r.url&&(u.specActions.updateUrl(r.url),u.specActions.download(r.url))),r.dom_id?u.render(r.dom_id,"App"):console.error("Skipped rendering: no `dom_id` was specified"),u},h=l.config||n.configUrl;if(!h||!u.specActions.getConfigByUrl||u.specActions.getConfigByUrl&&!u.specActions.getConfigByUrl(h,f))return f()},e.exports.presets={apis:h.default},e.exports.plugins=m},function(e,t,n){(function(t){/*! + * @description Recursive object extending + * @author Viacheslav Lotsmanov + * @license MIT + * + * The MIT License (MIT) + * + * Copyright (c) 2013-2015 Viacheslav Lotsmanov + * + * Permission is hereby granted, free of charge, to any person obtaining a copy of + * this software and associated documentation files (the "Software"), to deal in + * the Software without restriction, including without limitation the rights to + * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + * the Software, and to permit persons to whom the Software is furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +"use strict";function n(e){return e instanceof t||e instanceof Date||e instanceof RegExp}function r(e){if(e instanceof t){var n=new t(e.length);return e.copy(n),n}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);throw new Error("Unexpected situation")}function i(e){var t=[];return e.forEach(function(e,a){"object"==typeof e&&null!==e?Array.isArray(e)?t[a]=i(e):n(e)?t[a]=r(e):t[a]=o({},e):t[a]=e}),t}var o=e.exports=function(){if(arguments.length<1||"object"!=typeof arguments[0])return!1;if(arguments.length<2)return arguments[0];var e,t,a=arguments[0],s=Array.prototype.slice.call(arguments,1);return s.forEach(function(s){"object"!=typeof s||Array.isArray(s)||Object.keys(s).forEach(function(u){return t=a[u],e=s[u],e===a?void 0:"object"!=typeof e||null===e?void(a[u]=e):Array.isArray(e)?void(a[u]=i(e)):n(e)?void(a[u]=r(e)):"object"!=typeof t||null===t||Array.isArray(t)?void(a[u]=o({},e)):void(a[u]=o(t,e))})}),a}}).call(t,n(299).Buffer)},function(e,t,n){(function(e){/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +"use strict";function r(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}function i(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,t){if(i()=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function y(e){return+e!=e&&(e=0),a.alloc(+e)}function v(e,t){if(a.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return G(e).length;default:if(r)return V(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return I(this,t,n);case"utf8":case"utf-8":return O(this,t,n);case"ascii":return M(this,t,n);case"latin1":case"binary":return P(this,t,n);case"base64":return T(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function _(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=a.from(t,r)),a.isBuffer(t))return 0===t.length?-1:x(e,t,n,r,i);if("number"==typeof t)return t&=255,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):x(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function x(e,t,n,r,i){function o(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,s=e.length,u=t.length;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,n/=2}var c;if(i){var l=-1;for(c=n;cs&&(n=s-u),c=n;c>=0;c--){for(var p=!0,f=0;fi&&(r=i)):r=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a239?4:o>223?3:o>191?2:1;if(i+s<=n){var u,c,l,p;switch(s){case 1:o<128&&(a=o);break;case 2:u=e[i+1],128===(192&u)&&(p=(31&o)<<6|63&u,p>127&&(a=p));break;case 3:u=e[i+1],c=e[i+2],128===(192&u)&&128===(192&c)&&(p=(15&o)<<12|(63&u)<<6|63&c,p>2047&&(p<55296||p>57343)&&(a=p));break;case 4:u=e[i+1],c=e[i+2],l=e[i+3],128===(192&u)&&128===(192&c)&&128===(192&l)&&(p=(15&o)<<18|(63&u)<<12|(63&c)<<6|63&l,p>65535&&p<1114112&&(a=p))}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),i+=s}return D(r)}function D(e){var t=e.length;if(t<=ee)return String.fromCharCode.apply(String,e);for(var n="",r=0;rr)&&(n=r);for(var i="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,n,r,i,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function F(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function B(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function L(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function z(e,t,n,r,i){return i||L(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),Z.write(e,t,n,r,23,4),n+4}function q(e,t,n,r,i){return i||L(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),Z.write(e,t,n,r,52,8),n+8}function U(e){if(e=W(e).replace(te,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function W(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function K(e){return e<16?"0"+e.toString(16):e.toString(16)}function V(e,t){t=t||1/0;for(var n,r=e.length,i=null,o=[],a=0;a55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function H(e){for(var t=[],n=0;n>8,i=n%256,o.push(i),o.push(r);return o}function G(e){return $.toByteArray(U(e))}function X(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function Y(e){return e!==e}var $=n(300),Z=n(301),Q=n(302);t.Buffer=a,t.SlowBuffer=y,t.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:r(),t.kMaxLength=i(),a.poolSize=8192,a._augment=function(e){return e.__proto__=a.prototype,e},a.from=function(e,t,n){return s(null,e,t,n)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(e,t,n){return c(null,e,t,n)},a.allocUnsafe=function(e){return l(null,e)},a.allocUnsafeSlow=function(e){return l(null,e)},a.isBuffer=function(e){return!(null==e||!e._isBuffer)},a.compare=function(e,t){if(!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},a.prototype.compare=function(e,t,n,r,i){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var o=i-r,s=n-t,u=Math.min(o,s),c=this.slice(r,i),l=e.slice(t,n),p=0;pi)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return w(this,e,t,n);case"utf8":case"utf-8":return k(this,e,t,n);case"ascii":return S(this,e,t,n);case"latin1":case"binary":return E(this,e,t,n);case"base64":return C(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ee=4096;a.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t0&&(i*=256);)r+=this[e+--t]*i;return r},a.prototype.readUInt8=function(e,t){return t||R(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return t||R(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return t||R(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return t||R(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return t||R(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=this[e],i=1,o=0;++o=i&&(r-=Math.pow(2,8*t)),r},a.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||R(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},a.prototype.readInt8=function(e,t){return t||R(e,1,this.length),128&this[e]?(255-this[e]+1)*-1:this[e]},a.prototype.readInt16LE=function(e,t){t||R(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(e,t){t||R(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(e,t){return t||R(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return t||R(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return t||R(e,4,this.length),Z.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return t||R(e,4,this.length),Z.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return t||R(e,8,this.length),Z.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return t||R(e,8,this.length),Z.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t|=0,n|=0,!r){var i=Math.pow(2,8*n)-1;N(this,e,t,n,i,0)}var o=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+o]=e/a&255;return t+n},a.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,255,0),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):F(this,e,t,!0),t+2},a.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):F(this,e,t,!1),t+2},a.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):B(this,e,t,!0),t+4},a.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):B(this,e,t,!1),t+4},a.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);N(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o>0)-s&255;return t+n},a.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);N(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},a.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,1,127,-128),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):F(this,e,t,!0),t+2},a.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):F(this,e,t,!1),t+2},a.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):B(this,e,t,!0),t+4},a.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):B(this,e,t,!1),t+4},a.prototype.writeFloatLE=function(e,t,n){return z(this,e,t,!0,n)},a.prototype.writeFloatBE=function(e,t,n){return z(this,e,t,!1,n)},a.prototype.writeDoubleLE=function(e,t,n){return q(this,e,t,!0,n)},a.prototype.writeDoubleBE=function(e,t,n){return q(this,e,t,!1,n)},a.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var o;if("number"==typeof e)for(o=t;o0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function r(e){return 3*e.length/4-n(e)}function i(e){var t,r,i,o,a,s,u=e.length;a=n(e),s=new l(3*u/4-a),i=a>0?u-4:u;var p=0;for(t=0,r=0;t>16&255,s[p++]=o>>8&255,s[p++]=255&o;return 2===a?(o=c[e.charCodeAt(t)]<<2|c[e.charCodeAt(t+1)]>>4,s[p++]=255&o):1===a&&(o=c[e.charCodeAt(t)]<<10|c[e.charCodeAt(t+1)]<<4|c[e.charCodeAt(t+2)]>>2,s[p++]=o>>8&255,s[p++]=255&o),s}function o(e){return u[e>>18&63]+u[e>>12&63]+u[e>>6&63]+u[63&e]}function a(e,t,n){for(var r,i=[],a=t;al?l:c+s));return 1===r?(t=e[n-1],i+=u[t>>2],i+=u[t<<4&63],i+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=u[t>>10],i+=u[t>>4&63],i+=u[t<<2&63],i+="="),o.push(i),o.join("")}t.byteLength=r,t.toByteArray=i,t.fromByteArray=s;for(var u=[],c=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,h=p.length;f>1,l=-7,p=n?i-1:0,f=n?-1:1,h=e[t+p];for(p+=f,o=h&(1<<-l)-1,h>>=-l,l+=s;l>0;o=256*o+e[t+p],p+=f,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+e[t+p],p+=f,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:(h?-1:1)*(1/0);a+=Math.pow(2,r),o-=c}return(h?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,u,c=8*o-i-1,l=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,d=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),t+=a+p>=1?f/u:f*Math.pow(2,1-p),t*u>=2&&(a++,u/=2),a+p>=l?(s=0,a=l):a+p>=1?(s=(t*u-1)*Math.pow(2,i),a+=p):(s=t*Math.pow(2,p-1)*Math.pow(2,i),a=0));i>=8;e[n+h]=255&s,h+=d,s/=256,i-=8);for(a=a<0;e[n+h]=255&a,h+=d,a/=256,c-=8);e[n+h-d]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t,n){var r=[(0,E.systemThunkMiddleware)(n)],i=S.default.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||d.compose;return(0,d.createStore)(e,t,i(d.applyMiddleware.apply(void 0,r)))}function s(e,t){return(0,E.isObject)(e)&&!(0,E.isArray)(e)?e:(0,E.isFunc)(e)?s(e(t),t):(0,E.isArray)(e)?e.map(function(e){return s(e,t)}).reduce(u,{}):{}}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(0,E.isObject)(e))return{};if(!(0,E.isObject)(t))return e;var n=e.statePlugins;if((0,E.isObject)(n))for(var r in n){var i=n[r];if((0,E.isObject)(i)&&(0,E.isObject)(i.wrapActions)){var o=i.wrapActions;for(var a in o){var s=o[a];Array.isArray(s)||(s=[s],o[a]=s),t&&t.statePlugins&&t.statePlugins[r]&&t.statePlugins[r].wrapActions&&t.statePlugins[r].wrapActions[a]&&(t.statePlugins[r].wrapActions[a]=o[a].concat(t.statePlugins[r].wrapActions[a]))}}}return(0,g.default)(e,t)}function c(e){var t=(0,E.objMap)(e,function(e){return e.reducers});return l(t)}function l(e){var t=Object.keys(e).reduce(function(t,n){return t[n]=p(e[n]),t},{});return Object.keys(t).length?(0,_.combineReducers)(t):C}function p(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new m.Map,n=arguments[1];if(!e)return t;var r=e[n.type];return r?r(t,n):t}}function f(e,t,n){var r=a(e,t,n);return r}Object.defineProperty(t,"__esModule",{value:!0});var h=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};o(this,e),(0,g.default)(this,{state:{},plugins:[],system:{configs:{},fn:{},components:{},rootInjects:{},statePlugins:{}},boundSystem:{},toolbox:{}},t),this.getSystem=this._getSystem.bind(this),this.store=f(C,(0,m.fromJS)(this.state),this.getSystem),this.buildSystem(!1),this.register(this.plugins)}return h(e,[{key:"getStore",value:function(){return this.store}},{key:"register",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=s(e,this.getSystem());u(this.system,n),t&&this.buildSystem()}},{key:"buildSystem",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.getStore().dispatch,n=this.getStore().getState;this.boundSystem=Object.assign({},this.getRootInjects(),this.getWrappedAndBoundActions(t),this.getBoundSelectors(n,this.getSystem),this.getStateThunks(n),this.getFn(),this.getConfigs()),e&&this.rebuildReducer()}},{key:"_getSystem",value:function(){return this.boundSystem}},{key:"getRootInjects",value:function(){return Object.assign({getSystem:this.getSystem,getStore:this.getStore.bind(this),getComponents:this.getComponents.bind(this),getState:this.getStore().getState,getConfigs:this._getConfigs.bind(this),Im:y.default},this.system.rootInjects||{})}},{key:"_getConfigs",value:function(){return this.system.configs}},{key:"getConfigs",value:function(){return{configs:this.system.configs}}},{key:"setConfigs",value:function(e){this.system.configs=e}},{key:"rebuildReducer",value:function(){this.store.replaceReducer(c(this.system.statePlugins))}},{key:"getType",value:function(e){var t=e[0].toUpperCase()+e.slice(1);return(0,E.objReduce)(this.system.statePlugins,function(n,r){var o=n[e];if(o)return i({},r+t,o)})}},{key:"getSelectors",value:function(){return this.getType("selectors")}},{key:"getActions",value:function(){var e=this.getType("actions");return(0,E.objMap)(e,function(e){return(0,E.objReduce)(e,function(e,t){if((0,E.isFn)(e))return i({},t,e)})})}},{key:"getWrappedAndBoundActions",value:function(e){var t=this,n=this.getBoundActions(e);return(0,E.objMap)(n,function(e,n){var r=t.system.statePlugins[n.slice(0,-7)].wrapActions;return r?(0,E.objMap)(e,function(e,n){var i=r[n];return i?(Array.isArray(i)||(i=[i]),i.reduce(function(e,n){var r=function(){return n(e,t.getSystem()).apply(void 0,arguments)};if(!(0,E.isFn)(r))throw new TypeError("wrapActions needs to return a function that returns a new function (ie the wrapped action)");return r},e||Function.prototype)):e}):e})}},{key:"getStates",value:function(e){return Object.keys(this.system.statePlugins).reduce(function(t,n){return t[n]=e.get(n),t},{})}},{key:"getStateThunks",value:function(e){return Object.keys(this.system.statePlugins).reduce(function(t,n){return t[n]=function(){return e().get(n)},t},{})}},{key:"getFn",value:function(){return{fn:this.system.fn}}},{key:"getComponents",value:function(e){return"undefined"!=typeof e?this.system.components[e]:this.system.components}},{key:"getBoundSelectors",value:function(e,t){return(0,E.objMap)(this.getSelectors(),function(n,r){var i=[r.slice(0,-9)],o=function(){return e().getIn(i)};return(0,E.objMap)(n,function(e){return function(){for(var n=arguments.length,r=Array(n),i=0;i>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?d(e)+t:t}function y(){return!0}function v(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function g(e,t){return b(e,t,0)}function _(e,t){return b(e,t,t)}function b(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}function x(e){this.next=e}function w(e,t,n,r){var i=0===e?t:1===e?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function k(){return{value:void 0,done:!0}}function S(e){return!!A(e)}function E(e){return e&&"function"==typeof e.next}function C(e){var t=A(e);return t&&t.call(e)}function A(e){var t=e&&(kn&&e[kn]||e[Sn]);if("function"==typeof t)return t}function T(e){return e&&"number"==typeof e.length}function O(e){return null===e||void 0===e?B():o(e)?e.toSeq():q(e)}function D(e){return null===e||void 0===e?B().toKeyedSeq():o(e)?a(e)?e.toSeq():e.fromEntrySeq():L(e)}function M(e){return null===e||void 0===e?B():o(e)?a(e)?e.entrySeq():e.toIndexedSeq():z(e)}function P(e){return(null===e||void 0===e?B():o(e)?a(e)?e.entrySeq():e:z(e)).toSetSeq()}function I(e){this._array=e,this.size=e.length}function j(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function R(e){this._iterable=e,this.size=e.length||e.size}function N(e){this._iterator=e,this._iteratorCache=[]}function F(e){return!(!e||!e[Cn])}function B(){return An||(An=new I([]))}function L(e){var t=Array.isArray(e)?new I(e).fromEntrySeq():E(e)?new N(e).fromEntrySeq():S(e)?new R(e).fromEntrySeq():"object"==typeof e?new j(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function z(e){var t=U(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function q(e){var t=U(e)||"object"==typeof e&&new j(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}function U(e){return T(e)?new I(e):E(e)?new N(e):S(e)?new R(e):void 0}function W(e,t,n,r){var i=e._cache;if(i){for(var o=i.length-1,a=0;a<=o;a++){var s=i[n?o-a:a];if(t(s[1],r?s[0]:a,e)===!1)return a+1}return a}return e.__iterateUncached(t,n)}function K(e,t,n,r){var i=e._cache;if(i){var o=i.length-1,a=0;return new x(function(){var e=i[n?o-a:a];return a++>o?k():w(t,r?e[0]:a-1,e[1])})}return e.__iteratorUncached(t,n)}function V(e,t){return t?H(t,e,"",{"":e}):J(e)}function H(e,t,n,r){return Array.isArray(t)?e.call(r,n,M(t).map(function(n,r){return H(e,n,r,t)})):G(t)?e.call(r,n,D(t).map(function(n,r){return H(e,n,r,t)})):t}function J(e){return Array.isArray(e)?M(e).map(J).toList():G(e)?D(e).map(J).toMap():e}function G(e){return e&&(e.constructor===Object||void 0===e.constructor)}function X(e,t){if(e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if(e=e.valueOf(),t=t.valueOf(),e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function Y(e,t){if(e===t)return!0;if(!o(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||a(e)!==a(t)||s(e)!==s(t)||c(e)!==c(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!u(e);if(c(e)){var r=e.entries();return t.every(function(e,t){var i=r.next().value;return i&&X(i[1],e)&&(n||X(i[0],t))})&&r.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var l=e;e=t,t=l}var p=!0,f=t.__iterate(function(t,r){if(n?!e.has(t):i?!X(t,e.get(r,vn)):!X(e.get(r,vn),t))return p=!1,!1});return p&&e.size===f}function $(e,t){if(!(this instanceof $))return new $(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(Tn)return Tn;Tn=this}}function Z(e,t){if(!e)throw new Error(t)}function Q(e,t,n){if(!(this instanceof Q))return new Q(e,t,n);if(Z(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),t>>1&1073741824|3221225471&e}function oe(e){if(e===!1||null===e||void 0===e)return 0;if("function"==typeof e.valueOf&&(e=e.valueOf(),e===!1||null===e||void 0===e))return 0;if(e===!0)return 1;var t=typeof e;if("number"===t){if(e!==e||e===1/0)return 0;var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)e/=4294967295,n^=e;return ie(n)}if("string"===t)return e.length>Fn?ae(e):se(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return ue(e);if("function"==typeof e.toString)return se(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function ae(e){var t=zn[e];return void 0===t&&(t=se(e),Ln===Bn&&(Ln=0,zn={}),Ln++,zn[e]=t),t}function se(e){for(var t=0,n=0;n0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}function le(e){Z(e!==1/0,"Cannot perform this action with an infinite size.")}function pe(e){return null===e||void 0===e?we():fe(e)&&!c(e)?e:we().withMutations(function(t){var r=n(e);le(r.size),r.forEach(function(e,n){return t.set(n,e)})})}function fe(e){return!(!e||!e[qn])}function he(e,t){this.ownerID=e,this.entries=t}function de(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function me(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function ye(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function ve(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function ge(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&be(e._root)}function _e(e,t){return w(e,t[0],t[1])}function be(e,t){return{node:e,index:0,__prev:t}}function xe(e,t,n,r){var i=Object.create(Un);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function we(){return Wn||(Wn=xe(0))}function ke(e,t,n){var r,i;if(e._root){var o=l(gn),a=l(_n);if(r=Se(e._root,e.__ownerID,0,void 0,t,n,o,a),!a.value)return e;i=e.size+(o.value?n===vn?-1:1:0)}else{if(n===vn)return e;i=1,r=new he(e.__ownerID,[[t,n]])}return e.__ownerID?(e.size=i,e._root=r,e.__hash=void 0,e.__altered=!0,e):r?xe(i,r):we()}function Se(e,t,n,r,i,o,a,s){return e?e.update(t,n,r,i,o,a,s):o===vn?e:(p(s),p(a),new ve(t,r,[i,o]))}function Ee(e){return e.constructor===ve||e.constructor===ye}function Ce(e,t,n,r,i){if(e.keyHash===r)return new ye(t,r,[e.entry,i]);var o,a=(0===n?e.keyHash:e.keyHash>>>n)&yn,s=(0===n?r:r>>>n)&yn,u=a===s?[Ce(e,t,n+dn,r,i)]:(o=new ve(t,r,i),a>>=1)a[s]=1&n?t[o++]:void 0;return a[r]=i,new me(e,o+1,a)}function De(e,t,r){for(var i=[],a=0;a>1&1431655765,e=(858993459&e)+(e>>2&858993459),e=e+(e>>4)&252645135,e+=e>>8,e+=e>>16,127&e}function Ne(e,t,n,r){var i=r?e:h(e);return i[t]=n,i}function Fe(e,t,n,r){var i=e.length+1;if(r&&t+1===i)return e[t]=n,e;for(var o=new Array(i),a=0,s=0;s0&&io?0:o-n,c=a-n;return c>mn&&(c=mn),function(){if(i===c)return Yn;var e=t?--c:i++;return r&&r[e]}}function i(e,r,i){var s,u=e&&e.array,c=i>o?0:o-i>>r,l=(a-i>>r)+1;return l>mn&&(l=mn),function(){for(;;){if(s){var e=s();if(e!==Yn)return e;s=null}if(c===l)return Yn;var o=t?--l:c++;s=n(u&&u[o],r-dn,i+(o<=e.size||t<0)return e.withMutations(function(e){t<0?Xe(e,t).set(0,n):Xe(e,0,t+1).set(t,n)});t+=e._origin;var r=e._tail,i=e._root,o=l(_n);return t>=$e(e._capacity)?r=He(r,e.__ownerID,0,t,n,o):i=He(i,e.__ownerID,e._level,t,n,o),o.value?e.__ownerID?(e._root=i,e._tail=r,e.__hash=void 0,e.__altered=!0,e):We(e._origin,e._capacity,e._level,i,r):e}function He(e,t,n,r,i,o){var a=r>>>n&yn,s=e&&a0){var c=e&&e.array[a],l=He(c,t,n-dn,r,i,o);return l===c?e:(u=Je(e,t),u.array[a]=l,u)}return s&&e.array[a]===i?e:(p(o),u=Je(e,t),void 0===i&&a===u.array.length-1?u.array.pop():u.array[a]=i,u)}function Je(e,t){return t&&e&&t===e.ownerID?e:new qe(e?e.array.slice():[],t)}function Ge(e,t){if(t>=$e(e._capacity))return e._tail;if(t<1<0;)n=n.array[t>>>r&yn],r-=dn;return n}}function Xe(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new f,i=e._origin,o=e._capacity,a=i+t,s=void 0===n?o:n<0?o+n:i+n;if(a===i&&s===o)return e;if(a>=s)return e.clear();for(var u=e._level,c=e._root,l=0;a+l<0;)c=new qe(c&&c.array.length?[void 0,c]:[],r),u+=dn,l+=1<=1<p?new qe([],r):d;if(d&&h>p&&adn;v-=dn){var g=p>>>v&yn;y=y.array[g]=Je(y.array[g],r)}y.array[p>>>dn&yn]=d}if(s=h)a-=h,s-=h,u=dn,c=null,m=m&&m.removeBefore(r,0,a);else if(a>i||h>>u&yn;if(_!==h>>>u&yn)break;_&&(l+=(1<i&&(c=c.removeBefore(r,u,a-l)),c&&ha&&(a=c.size),o(u)||(c=c.map(function(e){return V(e)})),i.push(c)}return a>e.size&&(e=e.setSize(a)),Ie(e,t,i)}function $e(e){return e>>dn<=mn&&a.size>=2*o.size?(i=a.filter(function(e,t){return void 0!==e&&s!==t}),r=i.toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(r.__ownerID=i.__ownerID=e.__ownerID)):(r=o.remove(t),i=s===a.size-1?a.pop():a.set(s,void 0))}else if(u){if(n===a.get(s)[1])return e;r=o,i=a.set(s,[t,n])}else r=o.set(t,a.size),i=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=i,e.__hash=void 0,e):et(r,i)}function rt(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function it(e){this._iter=e,this.size=e.size}function ot(e){this._iter=e,this.size=e.size}function at(e){this._iter=e,this.size=e.size}function st(e){var t=Tt(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=Ot,t.__iterateUncached=function(t,n){var r=this;return e.__iterate(function(e,n){return t(n,e,r)!==!1},n)},t.__iteratorUncached=function(t,n){if(t===wn){var r=e.__iterator(t,n);return new x(function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e})}return e.__iterator(t===xn?bn:xn,n)},t}function ut(e,t,n){var r=Tt(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,i){var o=e.get(r,vn);return o===vn?i:t.call(n,o,r,e)},r.__iterateUncached=function(r,i){var o=this;return e.__iterate(function(e,i,a){return r(t.call(n,e,i,a),i,o)!==!1},i)},r.__iteratorUncached=function(r,i){var o=e.__iterator(wn,i);return new x(function(){var i=o.next();if(i.done)return i;var a=i.value,s=a[0];return w(r,s,t.call(n,a[1],s,e),i)})},r}function ct(e,t){var n=Tt(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=st(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=Ot,n.__iterate=function(t,n){var r=this;return e.__iterate(function(e,n){return t(e,n,r)},!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function lt(e,t,n,r){var i=Tt(e);return r&&(i.has=function(r){var i=e.get(r,vn);return i!==vn&&!!t.call(n,i,r,e)},i.get=function(r,i){var o=e.get(r,vn);return o!==vn&&t.call(n,o,r,e)?o:i}),i.__iterateUncached=function(i,o){var a=this,s=0;return e.__iterate(function(e,o,u){if(t.call(n,e,o,u))return s++,i(e,r?o:s-1,a)},o),s},i.__iteratorUncached=function(i,o){var a=e.__iterator(wn,o),s=0;return new x(function(){for(;;){var o=a.next();if(o.done)return o;var u=o.value,c=u[0],l=u[1];if(t.call(n,l,c,e))return w(i,r?c:s++,l,o)}})},i}function pt(e,t,n){var r=pe().asMutable();return e.__iterate(function(i,o){r.update(t.call(n,i,o,e),0,function(e){return e+1})}),r.asImmutable()}function ft(e,t,n){var r=a(e),i=(c(e)?Ze():pe()).asMutable();e.__iterate(function(o,a){i.update(t.call(n,o,a,e),function(e){return e=e||[],e.push(r?[a,o]:o),e})});var o=At(e);return i.map(function(t){return St(e,o(t))})}function ht(e,t,n,r){var i=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n===1/0?n=i:n|=0),v(t,n,i))return e;var o=g(t,i),a=_(n,i);if(o!==o||a!==a)return ht(e.toSeq().cacheResult(),t,n,r);var s,u=a-o;u===u&&(s=u<0?0:u);var c=Tt(e);return c.size=0===s?s:e.size&&s||void 0,!r&&F(e)&&s>=0&&(c.get=function(t,n){return t=m(this,t),t>=0&&ts)return k();var e=i.next();return r||t===xn?e:t===bn?w(t,u-1,void 0,e):w(t,u-1,e.value[1],e)})},c}function dt(e,t,n){var r=Tt(e);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var a=0;return e.__iterate(function(e,i,s){return t.call(n,e,i,s)&&++a&&r(e,i,o)}),a},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var a=e.__iterator(wn,i),s=!0;return new x(function(){if(!s)return k();var e=a.next();if(e.done)return e;var i=e.value,u=i[0],c=i[1];return t.call(n,c,u,o)?r===wn?e:w(r,u,c,e):(s=!1,k())})},r}function mt(e,t,n,r){var i=Tt(e);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,u=0;return e.__iterate(function(e,o,c){if(!s||!(s=t.call(n,e,o,c)))return u++,i(e,r?o:u-1,a)}),u},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=e.__iterator(wn,o),u=!0,c=0;return new x(function(){var e,o,l;do{if(e=s.next(),e.done)return r||i===xn?e:i===bn?w(i,c++,void 0,e):w(i,c++,e.value[1],e);var p=e.value;o=p[0],l=p[1],u&&(u=t.call(n,l,o,a))}while(u);return i===wn?e:w(i,o,l,e)})},i}function yt(e,t){var r=a(e),i=[e].concat(t).map(function(e){return o(e)?r&&(e=n(e)):e=r?L(e):z(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size});if(0===i.length)return e;if(1===i.length){var u=i[0];if(u===e||r&&a(u)||s(e)&&s(u))return u}var c=new I(i);return r?c=c.toKeyedSeq():s(e)||(c=c.toSetSeq()),c=c.flatten(!0),c.size=i.reduce(function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}},0),c}function vt(e,t,n){var r=Tt(e);return r.__iterateUncached=function(r,i){function a(e,c){var l=this;e.__iterate(function(e,i){return(!t||c0}function kt(e,n,r){var i=Tt(e);return i.size=new I(r).map(function(e){return e.size}).min(),i.__iterate=function(e,t){for(var n,r=this.__iterator(xn,t),i=0;!(n=r.next()).done&&e(n.value,i++,this)!==!1;);return i},i.__iteratorUncached=function(e,i){var o=r.map(function(e){return e=t(e),C(i?e.reverse():e)}),a=0,s=!1;return new x(function(){var t;return s||(t=o.map(function(e){return e.next()}),s=t.some(function(e){return e.done})),s?k():w(e,a++,n.apply(null,t.map(function(e){return e.value})))})},i}function St(e,t){return F(e)?t:e.constructor(t)}function Et(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Ct(e){return le(e.size),d(e)}function At(e){return a(e)?n:s(e)?r:i}function Tt(e){return Object.create((a(e)?D:s(e)?M:P).prototype)}function Ot(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):O.prototype.cacheResult.call(this)}function Dt(e,t){return e>t?1:et?-1:0}function on(e){if(e.size===1/0)return 0;var t=c(e),n=a(e),r=t?1:0,i=e.__iterate(n?t?function(e,t){r=31*r+sn(oe(e),oe(t))|0}:function(e,t){r=r+sn(oe(e),oe(t))|0}:t?function(e){r=31*r+oe(e)|0}:function(e){r=r+oe(e)|0});return an(i,r)}function an(e,t){return t=Mn(t,3432918353),t=Mn(t<<15|t>>>-15,461845907),t=Mn(t<<13|t>>>-13,5),t=(t+3864292196|0)^e,t=Mn(t^t>>>16,2246822507),t=Mn(t^t>>>13,3266489909),t=ie(t^t>>>16)}function sn(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}var un=Array.prototype.slice;e(n,t),e(r,t),e(i,t),t.isIterable=o,t.isKeyed=a,t.isIndexed=s,t.isAssociative=u,t.isOrdered=c,t.Keyed=n,t.Indexed=r,t.Set=i;var cn="@@__IMMUTABLE_ITERABLE__@@",ln="@@__IMMUTABLE_KEYED__@@",pn="@@__IMMUTABLE_INDEXED__@@",fn="@@__IMMUTABLE_ORDERED__@@",hn="delete",dn=5,mn=1<r?k():w(e,i,n[t?r-i++:i++])})},e(j,D),j.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},j.prototype.has=function(e){return this._object.hasOwnProperty(e)},j.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length-1,o=0;o<=i;o++){var a=r[t?i-o:o];if(e(n[a],a,this)===!1)return o+1}return o},j.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length-1,o=0;return new x(function(){var a=r[t?i-o:o];return o++>i?k():w(e,a,n[a])})},j.prototype[fn]=!0,e(R,M),R.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=this._iterable,r=C(n),i=0;if(E(r))for(var o;!(o=r.next()).done&&e(o.value,i++,this)!==!1;);return i},R.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._iterable,r=C(n);if(!E(r))return new x(k);var i=0;return new x(function(){var t=r.next();return t.done?t:w(e,i++,t.value)})},e(N,M),N.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n=this._iterator,r=this._iteratorCache,i=0;i=r.length){var t=n.next();if(t.done)return t;r[i]=t.value}return w(e,i,r[i++])})};var An;e($,M),$.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},$.prototype.get=function(e,t){return this.has(e)?this._value:t},$.prototype.includes=function(e){return X(this._value,e)},$.prototype.slice=function(e,t){var n=this.size;return v(e,t,n)?this:new $(this._value,_(t,n)-g(e,n))},$.prototype.reverse=function(){return this},$.prototype.indexOf=function(e){return X(this._value,e)?0:-1},$.prototype.lastIndexOf=function(e){return X(this._value,e)?this.size:-1},$.prototype.__iterate=function(e,t){ +for(var n=0;n=0&&t=0&&nn?k():w(e,o++,a)})},Q.prototype.equals=function(e){return e instanceof Q?this._start===e._start&&this._end===e._end&&this._step===e._step:Y(this,e)};var On;e(ee,t),e(te,ee),e(ne,ee),e(re,ee),ee.Keyed=te,ee.Indexed=ne,ee.Set=re;var Dn,Mn="function"==typeof Math.imul&&Math.imul(4294967295,2)===-2?Math.imul:function(e,t){e|=0,t|=0;var n=65535&e,r=65535&t;return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0},Pn=Object.isExtensible,In=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}(),jn="function"==typeof WeakMap;jn&&(Dn=new WeakMap);var Rn=0,Nn="__immutablehash__";"function"==typeof Symbol&&(Nn=Symbol(Nn));var Fn=16,Bn=255,Ln=0,zn={};e(pe,te),pe.of=function(){var e=un.call(arguments,0);return we().withMutations(function(t){for(var n=0;n=e.length)throw new Error("Missing value for key: "+e[n]);t.set(e[n],e[n+1])}})},pe.prototype.toString=function(){return this.__toString("Map {","}")},pe.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},pe.prototype.set=function(e,t){return ke(this,e,t)},pe.prototype.setIn=function(e,t){return this.updateIn(e,vn,function(){return t})},pe.prototype.remove=function(e){return ke(this,e,vn)},pe.prototype.deleteIn=function(e){return this.updateIn(e,function(){return vn})},pe.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},pe.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=je(this,Mt(e),t,n);return r===vn?void 0:r},pe.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):we()},pe.prototype.merge=function(){return De(this,void 0,arguments)},pe.prototype.mergeWith=function(e){var t=un.call(arguments,1);return De(this,e,t)},pe.prototype.mergeIn=function(e){var t=un.call(arguments,1);return this.updateIn(e,we(),function(e){return"function"==typeof e.merge?e.merge.apply(e,t):t[t.length-1]})},pe.prototype.mergeDeep=function(){return De(this,Me,arguments)},pe.prototype.mergeDeepWith=function(e){var t=un.call(arguments,1);return De(this,Pe(e),t)},pe.prototype.mergeDeepIn=function(e){var t=un.call(arguments,1);return this.updateIn(e,we(),function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,t):t[t.length-1]})},pe.prototype.sort=function(e){return Ze(bt(this,e))},pe.prototype.sortBy=function(e,t){return Ze(bt(this,t,e))},pe.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},pe.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new f)},pe.prototype.asImmutable=function(){return this.__ensureOwner()},pe.prototype.wasAltered=function(){return this.__altered},pe.prototype.__iterator=function(e,t){return new ge(this,e,t)},pe.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate(function(t){return r++,e(t[1],t[0],n)},t),r},pe.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?xe(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},pe.isMap=fe;var qn="@@__IMMUTABLE_MAP__@@",Un=pe.prototype;Un[qn]=!0,Un[hn]=Un.remove,Un.removeIn=Un.deleteIn,he.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;o=Kn)return Ae(e,u,r,i);var d=e&&e===this.ownerID,m=d?u:h(u);return f?s?c===l-1?m.pop():m[c]=m.pop():m[c]=[r,i]:m.push([r,i]),d?(this.entries=m,this):new he(e,m)}},de.prototype.get=function(e,t,n,r){void 0===t&&(t=oe(n));var i=1<<((0===e?t:t>>>e)&yn),o=this.bitmap;return 0===(o&i)?r:this.nodes[Re(o&i-1)].get(e+dn,t,n,r)},de.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=oe(r));var s=(0===t?n:n>>>t)&yn,u=1<=Vn)return Oe(e,f,c,s,d);if(l&&!d&&2===f.length&&Ee(f[1^p]))return f[1^p];if(l&&d&&1===f.length&&Ee(d))return d;var m=e&&e===this.ownerID,y=l?d?c:c^u:c|u,v=l?d?Ne(f,p,d,m):Be(f,p,m):Fe(f,p,d,m);return m?(this.bitmap=y,this.nodes=v,this):new de(e,y,v)},me.prototype.get=function(e,t,n,r){void 0===t&&(t=oe(n));var i=(0===e?t:t>>>e)&yn,o=this.nodes[i];return o?o.get(e+dn,t,n,r):r},me.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=oe(r));var s=(0===t?n:n>>>t)&yn,u=i===vn,c=this.nodes,l=c[s];if(u&&!l)return this;var p=Se(l,e,t+dn,n,r,i,o,a);if(p===l)return this;var f=this.count;if(l){if(!p&&(f--,f=0&&e>>t&yn;if(r>=this.array.length)return new qe([],e);var i,o=0===r;if(t>0){var a=this.array[r];if(i=a&&a.removeBefore(e,t-dn,n),i===a&&o)return this}if(o&&!i)return this;var s=Je(this,e);if(!o)for(var u=0;u>>t&yn;if(r>=this.array.length)return this;var i;if(t>0){var o=this.array[r];if(i=o&&o.removeAfter(e,t-dn,n),i===o&&r===this.array.length-1)return this}var a=Je(this,e);return a.array.splice(r+1),i&&(a.array[r]=i),a};var Xn,Yn={};e(Ze,pe),Ze.of=function(){return this(arguments)},Ze.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Ze.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},Ze.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):tt()},Ze.prototype.set=function(e,t){return nt(this,e,t)},Ze.prototype.remove=function(e){return nt(this,e,vn)},Ze.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Ze.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],n)},t)},Ze.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},Ze.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?et(t,n,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=n,this)},Ze.isOrderedMap=Qe,Ze.prototype[fn]=!0,Ze.prototype[hn]=Ze.prototype.remove;var $n;e(rt,D),rt.prototype.get=function(e,t){return this._iter.get(e,t)},rt.prototype.has=function(e){return this._iter.has(e)},rt.prototype.valueSeq=function(){return this._iter.valueSeq()},rt.prototype.reverse=function(){var e=this,t=ct(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},rt.prototype.map=function(e,t){var n=this,r=ut(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},rt.prototype.__iterate=function(e,t){var n,r=this;return this._iter.__iterate(this._useKeys?function(t,n){return e(t,n,r)}:(n=t?Ct(this):0,function(i){return e(i,t?--n:n++,r)}),t)},rt.prototype.__iterator=function(e,t){if(this._useKeys)return this._iter.__iterator(e,t);var n=this._iter.__iterator(xn,t),r=t?Ct(this):0;return new x(function(){var i=n.next();return i.done?i:w(e,t?--r:r++,i.value,i)})},rt.prototype[fn]=!0,e(it,M),it.prototype.includes=function(e){return this._iter.includes(e)},it.prototype.__iterate=function(e,t){var n=this,r=0;return this._iter.__iterate(function(t){return e(t,r++,n)},t)},it.prototype.__iterator=function(e,t){var n=this._iter.__iterator(xn,t),r=0;return new x(function(){var t=n.next();return t.done?t:w(e,r++,t.value,t)})},e(ot,P),ot.prototype.has=function(e){return this._iter.includes(e)},ot.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){return e(t,t,n)},t)},ot.prototype.__iterator=function(e,t){var n=this._iter.__iterator(xn,t);return new x(function(){var t=n.next();return t.done?t:w(e,t.value,t.value,t)})},e(at,D),at.prototype.entrySeq=function(){return this._iter.toSeq()},at.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){if(t){Et(t);var r=o(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}},t)},at.prototype.__iterator=function(e,t){var n=this._iter.__iterator(xn,t);return new x(function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){Et(r);var i=o(r);return w(e,i?r.get(0):r[0],i?r.get(1):r[1],t)}}})},it.prototype.cacheResult=rt.prototype.cacheResult=ot.prototype.cacheResult=at.prototype.cacheResult=Ot,e(Pt,te),Pt.prototype.toString=function(){return this.__toString(jt(this)+" {","}")},Pt.prototype.has=function(e){return this._defaultValues.hasOwnProperty(e)},Pt.prototype.get=function(e,t){if(!this.has(e))return t;var n=this._defaultValues[e];return this._map?this._map.get(e,n):n},Pt.prototype.clear=function(){if(this.__ownerID)return this._map&&this._map.clear(),this;var e=this.constructor;return e._empty||(e._empty=It(this,we()))},Pt.prototype.set=function(e,t){if(!this.has(e))throw new Error('Cannot set unknown key "'+e+'" on '+jt(this));if(this._map&&!this._map.has(e)){var n=this._defaultValues[e];if(t===n)return this}var r=this._map&&this._map.set(e,t);return this.__ownerID||r===this._map?this:It(this,r)},Pt.prototype.remove=function(e){if(!this.has(e))return this;var t=this._map&&this._map.remove(e);return this.__ownerID||t===this._map?this:It(this,t)},Pt.prototype.wasAltered=function(){return this._map.wasAltered()},Pt.prototype.__iterator=function(e,t){var r=this;return n(this._defaultValues).map(function(e,t){return r.get(t)}).__iterator(e,t)},Pt.prototype.__iterate=function(e,t){var r=this;return n(this._defaultValues).map(function(e,t){return r.get(t)}).__iterate(e,t)},Pt.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map&&this._map.__ensureOwner(e);return e?It(this,t,e):(this.__ownerID=e,this._map=t,this)};var Zn=Pt.prototype;Zn[hn]=Zn.remove,Zn.deleteIn=Zn.removeIn=Un.removeIn,Zn.merge=Un.merge,Zn.mergeWith=Un.mergeWith,Zn.mergeIn=Un.mergeIn,Zn.mergeDeep=Un.mergeDeep,Zn.mergeDeepWith=Un.mergeDeepWith,Zn.mergeDeepIn=Un.mergeDeepIn,Zn.setIn=Un.setIn,Zn.update=Un.update,Zn.updateIn=Un.updateIn,Zn.withMutations=Un.withMutations,Zn.asMutable=Un.asMutable,Zn.asImmutable=Un.asImmutable,e(Ft,re),Ft.of=function(){return this(arguments)},Ft.fromKeys=function(e){return this(n(e).keySeq())},Ft.prototype.toString=function(){return this.__toString("Set {","}")},Ft.prototype.has=function(e){return this._map.has(e)},Ft.prototype.add=function(e){return Lt(this,this._map.set(e,!0))},Ft.prototype.remove=function(e){return Lt(this,this._map.remove(e))},Ft.prototype.clear=function(){return Lt(this,this._map.clear())},Ft.prototype.union=function(){var e=un.call(arguments,0);return e=e.filter(function(e){return 0!==e.size}),0===e.length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations(function(t){for(var n=0;n=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):Gt(e,t)},Ht.prototype.pushAll=function(e){if(e=r(e),0===e.size)return this;le(e.size);var t=this.size,n=this._head;return e.reverse().forEach(function(e){t++,n={value:e,next:n}}),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):Gt(t,n)},Ht.prototype.pop=function(){return this.slice(1)},Ht.prototype.unshift=function(){return this.push.apply(this,arguments)},Ht.prototype.unshiftAll=function(e){return this.pushAll(e)},Ht.prototype.shift=function(){return this.pop.apply(this,arguments)},Ht.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Xt()},Ht.prototype.slice=function(e,t){if(v(e,t,this.size))return this;var n=g(e,this.size),r=_(t,this.size);if(r!==this.size)return ne.prototype.slice.call(this,e,t);for(var i=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):Gt(i,o)},Ht.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Gt(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},Ht.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&e(r.value,n++,this)!==!1;)r=r.next;return n},Ht.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new x(function(){if(r){var t=r.value;return r=r.next,w(e,n++,t)}return k()})},Ht.isStack=Jt;var ir="@@__IMMUTABLE_STACK__@@",or=Ht.prototype;or[ir]=!0,or.withMutations=Un.withMutations,or.asMutable=Un.asMutable,or.asImmutable=Un.asImmutable,or.wasAltered=Un.wasAltered;var ar;t.Iterator=x,Yt(t,{toArray:function(){le(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate(function(t,n){e[n]=t}),e},toIndexedSeq:function(){return new it(this)},toJS:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJS?e.toJS():e}).__toJS()},toJSON:function(){return this.toSeq().map(function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e}).__toJS()},toKeyedSeq:function(){return new rt(this,!0)},toMap:function(){return pe(this.toKeyedSeq())},toObject:function(){le(this.size);var e={};return this.__iterate(function(t,n){e[n]=t}),e},toOrderedMap:function(){return Ze(this.toKeyedSeq())},toOrderedSet:function(){return Ut(a(this)?this.valueSeq():this)},toSet:function(){return Ft(a(this)?this.valueSeq():this)},toSetSeq:function(){return new ot(this)},toSeq:function(){return s(this)?this.toIndexedSeq():a(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Ht(a(this)?this.valueSeq():this)},toList:function(){return Le(a(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){var e=un.call(arguments,0);return St(this,yt(this,e))},includes:function(e){return this.some(function(t){return X(t,e)})},entries:function(){return this.__iterator(wn)},every:function(e,t){le(this.size);var n=!0;return this.__iterate(function(r,i,o){if(!e.call(t,r,i,o))return n=!1,!1}),n},filter:function(e,t){return St(this,lt(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},forEach:function(e,t){return le(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){le(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate(function(r){n?n=!1:t+=e,t+=null!==r&&void 0!==r?r.toString():""}),t},keys:function(){return this.__iterator(bn)},map:function(e,t){return St(this,ut(this,e,t))},reduce:function(e,t,n){le(this.size);var r,i;return arguments.length<2?i=!0:r=t,this.__iterate(function(t,o,a){i?(i=!1,r=t):r=e.call(n,r,t,o,a)}),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return St(this,ct(this,!0))},slice:function(e,t){return St(this,ht(this,e,t,!0))},some:function(e,t){return!this.every(Qt(e),t)},sort:function(e){return St(this,bt(this,e))},values:function(){return this.__iterator(xn)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(e,t){return d(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return pt(this,e,t)},equals:function(e){return Y(this,e)},entrySeq:function(){var e=this;if(e._cache)return new I(e._cache);var t=e.toSeq().map(Zt).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(Qt(e),t)},findEntry:function(e,t,n){var r=n;return this.__iterate(function(n,i,o){if(e.call(t,n,i,o))return r=[i,n],!1}),r},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},findLastEntry:function(e,t,n){return this.toKeyedSeq().reverse().findEntry(e,t,n)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(){return this.find(y)},flatMap:function(e,t){return St(this,gt(this,e,t))},flatten:function(e){return St(this,vt(this,e,!0))},fromEntrySeq:function(){return new at(this)},get:function(e,t){return this.find(function(t,n){return X(n,e)},void 0,t)},getIn:function(e,t){for(var n,r=this,i=Mt(e);!(n=i.next()).done;){var o=n.value;if(r=r&&r.get?r.get(o,vn):vn,r===vn)return t}return r},groupBy:function(e,t){return ft(this,e,t)},has:function(e){return this.get(e,vn)!==vn},hasIn:function(e){return this.getIn(e,vn)!==vn},isSubset:function(e){return e="function"==typeof e.includes?e:t(e),this.every(function(t){return e.includes(t)})},isSuperset:function(e){return e="function"==typeof e.isSubset?e:t(e),e.isSubset(this)},keyOf:function(e){return this.findKey(function(t){return X(t,e)})},keySeq:function(){return this.toSeq().map($t).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return xt(this,e)},maxBy:function(e,t){return xt(this,t,e)},min:function(e){return xt(this,e?en(e):rn)},minBy:function(e,t){return xt(this,t?en(t):rn,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return St(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return St(this,mt(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(Qt(e),t)},sortBy:function(e,t){return St(this,bt(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return St(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return St(this,dt(this,e,t))},takeUntil:function(e,t){return this.takeWhile(Qt(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=on(this))}});var sr=t.prototype;sr[cn]=!0,sr[En]=sr.values,sr.__toJS=sr.toArray,sr.__toStringMapper=tn,sr.inspect=sr.toSource=function(){return this.toString()},sr.chain=sr.flatMap,sr.contains=sr.includes,Yt(n,{flip:function(){return St(this,st(this))},mapEntries:function(e,t){var n=this,r=0;return St(this,this.toSeq().map(function(i,o){return e.call(t,[o,i],r++,n)}).fromEntrySeq())},mapKeys:function(e,t){var n=this;return St(this,this.toSeq().flip().map(function(r,i){return e.call(t,r,i,n)}).flip())}});var ur=n.prototype;ur[ln]=!0,ur[En]=sr.entries,ur.__toJS=sr.toObject,ur.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+tn(e)},Yt(r,{toKeyedSeq:function(){return new rt(this,!1)},filter:function(e,t){return St(this,lt(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return St(this,ct(this,!1))},slice:function(e,t){return St(this,ht(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=g(e,e<0?this.count():this.size);var r=this.slice(0,e);return St(this,1===n?r:r.concat(h(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.findLastEntry(e,t);return n?n[0]:-1},first:function(){return this.get(0)},flatten:function(e){return St(this,vt(this,e,!1))},get:function(e,t){return e=m(this,e),e<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find(function(t,n){return n===e},void 0,t)},has:function(e){return e=m(this,e),e>=0&&(void 0!==this.size?this.size===1/0||e0?"Unexpected "+(1===a.length?"property":"properties")+' "'+a.join('", "')+'" found in '+i+'. Expected to find one of the known reducer property names instead: "'+r.join('", "')+'". Unexpected properties will be ignored.':null},e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){if(void 0===e)throw new Error('Reducer "'+t+'" returned undefined when handling "'+n.type+'" action. To ignore an action, you must explicitly return the previous state.');return null},e.exports=t.default},function(e,t){"use strict";function n(e,t){var r;return r=Array.isArray(e)?[]:{},t.push(e),Object.keys(e).forEach(function(i){var o=e[i];if("function"!=typeof o)return o&&"object"==typeof o?t.indexOf(e[i])===-1?void(r[i]=n(e[i],t.slice(0))):void(r[i]="[Circular]"):void(r[i]=o)}),r}e.exports=function(e){if("object"==typeof e){var t=n(e,[]);return"string"==typeof e.name&&(t.name=e.name),"string"==typeof e.message&&(t.message=e.message),"string"==typeof e.stack&&(t.stack=e.stack),t}return"function"==typeof e?"[Function: "+(e.name||"anonymous")+"]":e}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return{type:p,payload:{action:t,error:(0,l.default)(e)}}}function o(e){return{type:f,payload:e}}function a(e){return{type:h,payload:e}}function s(e){return{type:d,payload:e}}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{type:m,payload:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.CLEAR=t.NEW_AUTH_ERR=t.NEW_SPEC_ERR=t.NEW_THROWN_ERR_BATCH=t.NEW_THROWN_ERR=void 0,t.newThrownErr=i,t.newThrownErrBatch=o,t.newSpecErr=a, +t.newAuthErr=s,t.clear=u;var c=n(332),l=r(c),p=t.NEW_THROWN_ERR="err_new_thrown_err",f=t.NEW_THROWN_ERR_BATCH="err_new_thrown_err_batch",h=t.NEW_SPEC_ERR="err_new_spec_err",d=t.NEW_AUTH_ERR="err_new_auth_err",m=t.CLEAR="err_clear"},function(e,t){"use strict";function n(){var e={location:{},history:{},open:function(){},close:function(){},File:function(){}};if("undefined"==typeof window)return e;try{e=window;var t=["File","Blob","FormData"],n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value;s in window&&(e[s]=window[s])}}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}}catch(e){console.error(e)}return e}e.exports=n()},function(e,t,n){(function(e){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return l(e)?K(e)?e.toObject():e:{}}function o(e){return e?e.toArray?e.toArray():u(e):[]}function a(e){return K(e)?e:e instanceof U.default.File?e:l(e)?Array.isArray(e)?A.default.Seq(e).map(a).toList():A.default.Seq(e).map(a).toOrderedMap():e}function s(e,t){var n={};return Object.keys(e).filter(function(t){return"function"==typeof e[t]}).forEach(function(r){return n[r]=e[r].bind(null,t)}),n}function u(e){return Array.isArray(e)?e:[e]}function c(e){return"function"==typeof e}function l(e){return!!e&&"object"===("undefined"==typeof e?"undefined":E(e))}function p(e){return"function"==typeof e}function f(e){return Array.isArray(e)}function h(e,t){return Object.keys(e).reduce(function(n,r){return n[r]=t(e[r],r),n},{})}function d(e,t){return Object.keys(e).reduce(function(n,r){var i=t(e[r],r);return i&&"object"===("undefined"==typeof i?"undefined":E(i))&&Object.assign(n,i),n},{})}function m(e){return function(t){t.dispatch,t.getState;return function(t){return function(n){return"function"==typeof n?n(e()):t(n)}}}}function y(e){var t=e.keySeq();return t.contains(W)?W:t.filter(function(e){return"2"===(e+"")[0]}).sort().first()}function v(e,t){if(!A.default.Iterable.isIterable(e))return A.default.List();var n=e.getIn(Array.isArray(t)?t:[t]);return A.default.List.isList(n)?n:A.default.List()}function g(e){var t,n,r,i,o,a,s,u,c,l,p,f;for(l=/(>)(<)(\/*)/g,f=/[ ]*(.*)[ ]+\n/g,t=/(<.+>)(.+\n)/g,e=e.replace(/\r\n/g,"\n").replace(l,"$1\n$2$3").replace(f,"$1\n").replace(t,"$1\n$2"),r="",u=e.split("\n"),i=0,a="other",p={"single->single":0,"single->closing":-1,"single->opening":0,"single->other":0,"closing->single":0,"closing->closing":-1,"closing->opening":0,"closing->other":0,"opening->single":1,"opening->closing":0,"opening->opening":1,"opening->other":1,"other->single":0,"other->closing":-1,"other->opening":0,"other->other":0},n=function(e){var t,n,o,s,u,c;u={single:Boolean(e.match(/<.+\/>/)),closing:Boolean(e.match(/<\/.+>/)),opening:Boolean(e.match(/<[^!?].*>/))},s=function(){var e;e=[];for(n in u)c=u[n],c&&e.push(n);return e}()[0],s=void 0===s?"other":s,t=a+"->"+s,a=s,o="",i+=p[t],o=function(){var e,t,n,r;for(n=[],r=e=0,t=i;0<=t?et;r=0<=t?++e:--e)n.push(" ");return n}().join(""),"opening->closing"===t?r=r.substr(0,r.length-1)+e+"\n":r+=o+e+"\n"},o=0,s=u.length;ot)return e.textContent;var o=function(e){for(var t,o,a,s,u,c=e.textContent,l=0,p=c[0],f=1,h=e.innerHTML="",d=0;o=t,t=d<7&&"\\"==t?1:f;){if(f=p,p=c[++l],s=h.length>1,!f||d>8&&"\n"==f||[/\S/[i](f),1,1,!/[$\w]/[i](f),("/"==t||"\n"==t)&&s,'"'==t&&s,"'"==t&&s,c[l-4]+o+t=="-->",o+t=="*/"][d])for(h&&(e[r](u=n.createElement("span")).setAttribute("style",["color: #555; font-weight: bold;","","","color: #555;",""][d?d<3?2:d>6?4:d>3?3:+/^(a(bstract|lias|nd|rguments|rray|s(m|sert)?|uto)|b(ase|egin|ool(ean)?|reak|yte)|c(ase|atch|har|hecked|lass|lone|ompl|onst|ontinue)|de(bugger|cimal|clare|f(ault|er)?|init|l(egate|ete)?)|do|double|e(cho|ls?if|lse(if)?|nd|nsure|num|vent|x(cept|ec|p(licit|ort)|te(nds|nsion|rn)))|f(allthrough|alse|inal(ly)?|ixed|loat|or(each)?|riend|rom|unc(tion)?)|global|goto|guard|i(f|mp(lements|licit|ort)|n(it|clude(_once)?|line|out|stanceof|t(erface|ernal)?)?|s)|l(ambda|et|ock|ong)|m(icrolight|odule|utable)|NaN|n(amespace|ative|ext|ew|il|ot|ull)|o(bject|perator|r|ut|verride)|p(ackage|arams|rivate|rotected|rotocol|ublic)|r(aise|e(adonly|do|f|gister|peat|quire(_once)?|scue|strict|try|turn))|s(byte|ealed|elf|hort|igned|izeof|tatic|tring|truct|ubscript|uper|ynchronized|witch)|t(emplate|hen|his|hrows?|ransient|rue|ry|ype(alias|def|id|name|of))|u(n(checked|def(ined)?|ion|less|signed|til)|se|sing)|v(ar|irtual|oid|olatile)|w(char_t|hen|here|hile|ith)|xor|yield)$/[i](h):0]),u[r](n.createTextNode(h))),a=d&&d<7?d:a,h="",d=11;![1,/[\/{}[(\-+*=<>:;|\\.,?!&@~]/[i](f),/[\])]/[i](f),/[$\w]/[i](f),"/"==f&&a<2&&"<"!=t,'"'==f,"'"==f,f+p+c[l+1]+c[l+2]=="':null;var r=e.$$ref.match(/\S*\/(\S+)$/);e.xml.name=r[1]}return(0,z.memoizedCreateXMLExample)(e,n)}return JSON.stringify((0,z.memoizedSampleFromSchema)(e,n),null,2)},t.parseSeach=function(){var e={},t=window.location.search;if(""!=t){var n=t.substr(1).split("&");for(var r in n)r=n[r].split("="),e[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return e},t.btoa=function(t){var n=void 0;return n=t instanceof e?t:new e(t.toString(),"utf-8"),n.toString("base64")},t.sorters={operationsSorter:{alpha:function(e,t){return e.get("path").localeCompare(t.get("path"))},method:function(e,t){return e.get("method").localeCompare(t.get("method"))}}},t.buildFormData=function(e){var t=[];for(var n in e){var r=e[n];void 0!==r&&""!==r&&t.push([n,"=",encodeURIComponent(r).replace(/%20/g,"+")].join(""))}return t.join("&")},t.filterConfigs=function(e,t){var n=void 0,r={};for(n in e)t.indexOf(n)!==-1&&(r[n]=e[n]);return r}}).call(t,n(299).Buffer)},function(e,t,n){"use strict";var r=n(337);e.exports=function(e,t,n,i){var o=n?n.call(i,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var a=r(e),s=r(t),u=a.length;if(u!==s.length)return!1;i=i||null;for(var c=Object.prototype.hasOwnProperty.bind(t),l=0;l-1&&e%1==0&&e-1&&e%1==0&&e<=v}function s(e){for(var t=c(e),n=t.length,r=n&&e.length,i=!!r&&a(r)&&(f(e)||p(e)),s=-1,u=[];++s0;++r-1&&e%1==0&&e<=c}function s(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function u(e){return!!e&&"object"==typeof e}var c=9007199254740991,l="[object Arguments]",p="[object Function]",f="[object GeneratorFunction]",h=Object.prototype,d=h.hasOwnProperty,m=h.toString,y=h.propertyIsEnumerable;e.exports=n},function(e,t){function n(e){return!!e&&"object"==typeof e}function r(e,t){var n=null==e?void 0:e[t];return s(n)?n:void 0}function i(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=v}function o(e){return a(e)&&d.call(e)==c}function a(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function s(e){return null!=e&&(o(e)?m.test(f.call(e)):n(e)&&l.test(e))}var u="[object Array]",c="[object Function]",l=/^\[object .+?Constructor\]$/,p=Object.prototype,f=Function.prototype.toString,h=p.hasOwnProperty,d=p.toString,m=RegExp("^"+f.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),y=r(Array,"isArray"),v=9007199254740991,g=y||function(e){return n(e)&&i(e.length)&&d.call(e)==u};e.exports=g},function(e,t,n){var r=n(342),i=n(356),o=i(function(e,t,n){return t=t.toLowerCase(),e+(n?r(t):t)});e.exports=o},function(e,t,n){function r(e){return o(i(e).toLowerCase())}var i=n(343),o=n(348);e.exports=r},function(e,t,n){function r(e){return null==e?"":i(e)}var i=n(344);e.exports=r},function(e,t,n){function r(e){if("string"==typeof e)return e;if(a(e))return o(e,r)+"";if(s(e))return l?l.call(e):"";var t=e+"";return"0"==t&&1/e==-u?"-0":t}var i=n(308),o=n(345),a=n(346),s=n(347),u=1/0,c=i?i.prototype:void 0,l=c?c.toString:void 0;e.exports=r},function(e,t){function n(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n=r?e:i(e,t,n)}var i=n(351);e.exports=r},function(e,t){function n(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++rf))return!1;var d=l.get(e);if(d&&l.get(t))return d==t;var m=-1,y=!0,v=n&u?new i:void 0;for(l.set(e,t),l.set(t,e);++m-1&&e%1==0&&e-1&&e%1==0&&e<=r}var r=9007199254740991;e.exports=n},function(e,t){function n(e){return function(t){return e(t)}}e.exports=n},function(e,t,n){(function(e){var r=n(310),i="object"==typeof t&&t&&!t.nodeType&&t,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,a=o&&o.exports===i,s=a&&r.process,u=function(){try{return s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=u}).call(t,n(318)(e))},[1473,435,436],function(e,t){function n(e){var t=e&&e.constructor,n="function"==typeof t&&t.prototype||r;return e===n}var r=Object.prototype;e.exports=n},[1474,314],[1475,373,431],function(e,t,n){var r=n(439),i=n(391),o=n(440),a=n(441),s=n(442),u=n(307),c=n(377),l="[object Map]",p="[object Object]",f="[object Promise]",h="[object Set]",d="[object WeakMap]",m="[object DataView]",y=c(r),v=c(i),g=c(o),_=c(a),b=c(s),x=u;(r&&x(new r(new ArrayBuffer(1)))!=m||i&&x(new i)!=l||o&&x(o.resolve())!=f||a&&x(new a)!=h||s&&x(new s)!=d)&&(x=function(e){var t=u(e),n=t==p?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case y:return m;case v:return l;case g:return f;case _:return h;case b:return d}return t}),e.exports=x},[1476,371,309],[1477,371,309],[1478,371,309],[1479,371,309],function(e,t,n){function r(e){for(var t=o(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,i(a)]}return t}var i=n(444),o=n(421);e.exports=r},function(e,t,n){function r(e){return e===e&&!i(e)}var i=n(374);e.exports=r},function(e,t){function n(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}e.exports=n},function(e,t,n){function r(e,t){return s(e)&&u(t)?c(l(e),t):function(n){var r=o(n,e);return void 0===r&&r===t?a(n,e):i(t,r,p|f)}}var i=n(409),o=n(447),a=n(454),s=n(450),u=n(444),c=n(445),l=n(453),p=1,f=2;e.exports=r},[1480,448],function(e,t,n){function r(e,t){t=i(t,e);for(var n=0,r=t.length;null!=e&&n1&&void 0!==arguments[1]?arguments[1]:{},r=(0,o.objectify)(t),i=r.type,a=r.example,s=r.properties,u=r.additionalProperties,c=r.items,l=n.includeReadOnly;if(void 0!==a)return a;if(!i)if(s)i="object";else{if(!c)return;i="array"}if("object"===i){var f=(0,o.objectify)(s),h={};for(var d in f)f[d].readOnly&&!l||(h[d]=e(f[d],{includeReadOnly:l}));if(u===!0)h.additionalProp1={};else if(u)for(var m=(0,o.objectify)(u),y=e(m,{includeReadOnly:l}),v=1;v<4;v++)h["additionalProp"+v]=y;return h}return"array"===i?[e(c,{includeReadOnly:l})]:t.enum?t.default?t.default:(0,o.normalizeArray)(t.enum)[0]:p(t)},h=(t.inferSchema=function(e){return e.schema&&(e=e.schema),e.properties&&(e.type="object"),e},t.sampleXmlFromSchema=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(0,o.objectify)(t),i=r.type,a=r.properties,s=r.additionalProperties,u=r.items,c=r.example,l=n.includeReadOnly,f=r.default,h={},d={},m=t.xml,y=m.name,v=m.prefix,g=m.namespace,_=r.enum,b=void 0,x=void 0;if(!i)if(a||s)i="object";else{if(!u)return;i="array"}if(y=y||"notagname",b=(v?v+":":"")+y,g){var w=v?"xmlns:"+v:"xmlns";d[w]=g}if("array"===i&&u){if(u.xml=u.xml||m||{},u.xml.name=u.xml.name||m.name,m.wrapped)return h[b]=[],Array.isArray(c)?c.forEach(function(t){u.example=t,h[b].push(e(u,n))}):Array.isArray(f)?f.forEach(function(t){u.default=t,h[b].push(e(u,n))}):h[b]=[e(u,n)],d&&h[b].push({_attr:d}),h;var k=[];return Array.isArray(c)?(c.forEach(function(t){u.example=t,k.push(e(u,n))}),k):Array.isArray(f)?(f.forEach(function(t){u.default=t,k.push(e(u,n))}),k):e(u,n)}if("object"===i){var S=(0,o.objectify)(a);h[b]=[],c=c||{};for(var E in S)if(!S[E].readOnly||l)if(S[E].xml=S[E].xml||{},S[E].xml.attribute){var C=Array.isArray(S[E].enum)&&S[E].enum[0],A=S[E].example,T=S[E].default;d[S[E].xml.name||E]=void 0!==A&&A||void 0!==c[E]&&c[E]||void 0!==T&&T||C||p(S[E])}else{S[E].xml.name=S[E].xml.name||E,S[E].example=void 0!==S[E].example?S[E].example:c[E];var O=e(S[E]);Array.isArray(O)?h[b]=h[b].concat(O):h[b].push(O)}return s===!0?h[b].push({additionalProp:"Anything can be here"}):s&&h[b].push({additionalProp:p(s)}),d&&h[b].push({_attr:d}),h}return x=void 0!==c?c:void 0!==f?f:Array.isArray(_)?_[0]:p(t),h[b]=d?[{_attr:d},x]:x,h});t.memoizedCreateXMLExample=(0,c.default)(i),t.memoizedSampleFromSchema=(0,c.default)(f)},function(e,t,n){(function(t){function r(e,n){function r(e){y?t.nextTick(e):e()}function i(e,t){if(void 0!==t&&(h+=t),e&&!d&&(f=f||new l,d=!0),e&&d){var n=h;r(function(){f.emit("data",n)}),h=""}}function o(e,t){s(i,a(e,m,m?1:0),t)}function u(){if(f){var e=h;r(function(){f.emit("data",e),f.emit("end"),f.readable=!1,f.emit("close")})}}function c(e){var t=e.encoding||"UTF-8",n={version:"1.0",encoding:t};e.standalone&&(n.standalone=e.standalone),o({"?xml":{_attr:n}}),h=h.replace("/>","?>")}"object"!=typeof n&&(n={indent:n});var f=n.stream?new l:null,h="",d=!1,m=n.indent?n.indent===!0?p:n.indent:"",y=!0;return r(function(){y=!1}),n.declaration&&c(n.declaration),e&&e.forEach?e.forEach(function(t,n){var r;n+1===e.length&&(r=u),o(t,r)}):o(e,u),f?(f.readable=!0,f):h}function i(){var e=Array.prototype.slice.call(arguments),t={_elem:a(e)};return t.push=function(e){if(!this.append)throw new Error("not assigned to a parent!");var t=this,n=this._elem.indent;s(this.append,a(e,n,this._elem.icount+(n?1:0)),function(){t.append(!0)})},t.close=function(e){void 0!==e&&this.push(e),this.end&&this.end()},t}function o(e,t){return new Array(t||0).join(e||"")}function a(e,t,n){function r(e){var t=Object.keys(e);t.forEach(function(t){d.push(u(t,e[t]))})}n=n||0;var i,s=o(t,n),l=e,p=!1;if("object"==typeof e){var f=Object.keys(e);if(i=f[0],l=e[i],l&&l._elem)return l._elem.name=i,l._elem.icount=n,l._elem.indent=t,l._elem.indents=s,l._elem.interrupt=l,l._elem}var h,d=[],m=[];switch(typeof l){case"object":if(null===l)break;l._attr&&r(l._attr),l._cdata&&m.push(("/g,"]]]]>")+"]]>"),l.forEach&&(h=!1,m.push(""),l.forEach(function(e){if("object"==typeof e){var i=Object.keys(e)[0];"_attr"==i?r(e._attr):m.push(a(e,t,n+1))}else m.pop(),h=!0,m.push(c(e))}),h||m.push(""));break;default:m.push(c(l))}return{name:i,interrupt:p,attributes:d,content:m,icount:n,indents:s,indent:t}}function s(e,t,n){function r(){for(;t.content.length;){var r=t.content.shift();if(void 0!==r){if(i(r))return;s(e,r)}}e(!1,(o>1?t.indents:"")+(t.name?"":"")+(t.indent&&!n?"\n":"")),n&&n()}function i(t){return!!t.interrupt&&(t.interrupt.append=e,t.interrupt.end=r,t.interrupt=!1,e(!0),!0)}if("object"!=typeof t)return e(!1,t);var o=t.interrupt?1:t.content.length;return e(!1,t.indents+(t.name?"<"+t.name:"")+(t.attributes.length?" "+t.attributes.join(" "):"")+(o?t.name?">":"":t.name?"/>":"")+(t.indent&&o>1?"\n":"")),o?void(i(t)||r()):e(!1,t.indent?"\n":"")}function u(e,t){return e+'="'+c(t)+'"'}var c=n(471),l=n(472).Stream,p=" ";e.exports=r,e.exports.element=e.exports.Element=i}).call(t,n(470))},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function o(e){if(p===clearTimeout)return clearTimeout(e);if((p===r||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function a(){m&&h&&(m=!1,h.length?d=h.concat(d):y=-1,d.length&&s())}function s(){if(!m){var e=i(a);m=!0;for(var t=d.length;t;){for(h=d,d=[];++y1)for(var n=1;n'])/g,function(e,t){return r[t]}):e}var r={"&":"&",'"':""","'":"'","<":"<",">":">"};e.exports=n},function(e,t,n){function r(){i.call(this)}e.exports=r;var i=n(473).EventEmitter,o=n(474);o(r,i),r.Readable=n(475),r.Writable=n(491),r.Duplex=n(492),r.Transform=n(493),r.PassThrough=n(494),r.Stream=r,r.prototype.pipe=function(e,t){function n(t){e.writable&&!1===e.write(t)&&c.pause&&c.pause()}function r(){c.readable&&c.resume&&c.resume()}function o(){l||(l=!0,e.end())}function a(){l||(l=!0,"function"==typeof e.destroy&&e.destroy())}function s(e){if(u(),0===i.listenerCount(this,"error"))throw e}function u(){c.removeListener("data",n),e.removeListener("drain",r),c.removeListener("end",o),c.removeListener("close",a),c.removeListener("error",s),e.removeListener("error",s),c.removeListener("end",u),c.removeListener("close",u),e.removeListener("close",u)}var c=this;c.on("data",n),e.on("drain",r),e._isStdio||t&&t.end===!1||(c.on("end",o),c.on("close",a));var l=!1;return c.on("error",s),e.on("error",s),c.on("end",u),c.on("close",u),e.on("close",u),e.emit("pipe",c),e}},function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function i(e){return"number"==typeof e}function o(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!i(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,n,i,s,u,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var l=new Error('Uncaught, unspecified "error" event. ('+t+")");throw l.context=t,l}if(n=this._events[e],a(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(o(n))for(s=Array.prototype.slice.call(arguments,1),c=n.slice(),i=c.length,u=0;u0&&this._events[e].length>i&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function n(){this.removeListener(e,n),i||(i=!0,t.apply(this,arguments))}if(!r(t))throw TypeError("listener must be a function");var i=!1;return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var n,i,a,s;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],a=n.length,i=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(n)){for(s=a;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){i=s;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],r(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){t=e.exports=n(476),t.Stream=t,t.Readable=t,t.Writable=n(484),t.Duplex=n(483),t.Transform=n(489),t.PassThrough=n(490)},function(e,t,n){(function(t){"use strict";function r(e,t,n){return"function"==typeof e.prependListener?e.prependListener(t,n):void(e._events&&e._events[t]?D(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n))}function i(e,t){T=T||n(483),e=e||{},this.objectMode=!!e.objectMode,t instanceof T&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,this.highWaterMark=~~this.highWaterMark,this.buffer=new B,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(F||(F=n(488).StringDecoder),this.decoder=new F(e.encoding),this.encoding=e.encoding)}function o(e){return T=T||n(483),this instanceof o?(this._readableState=new i(e,this),this.readable=!0,e&&"function"==typeof e.read&&(this._read=e.read),void P.call(this)):new o(e)}function a(e,t,n,r,i){var o=l(t,n);if(o)e.emit("error",o);else if(null===n)t.reading=!1,p(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!i){var a=new Error("stream.push() after EOF");e.emit("error",a)}else if(t.endEmitted&&i){var u=new Error("stream.unshift() after end event");e.emit("error",u)}else{var c;!t.decoder||i||r||(n=t.decoder.write(n),c=!t.objectMode&&0===n.length),i||(t.reading=!1),c||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&f(e))),d(e,t)}else i||(t.reading=!1);return s(t)}function s(e){return!e.ended&&(e.needReadable||e.length=z?e=z:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function c(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=u(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function l(e,t){var n=null;return I.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function p(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,f(e)}}function f(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(N("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?O(h,e):h(e))}function h(e){N("emit readable"),e.emit("readable"),b(e)}function d(e,t){t.readingMore||(t.readingMore=!0,O(m,e,t))}function m(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=w(e,t.buffer,t.decoder),n}function w(e,t,n){var r;return eo.length?o.length:e;if(i+=a===o.length?o:o.slice(0,e),e-=a,0===e){a===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a));break}++r}return t.length-=r,i}function S(e,t){var n=I.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var o=r.data,a=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,a),e-=a,0===e){a===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++i}return t.length-=i,n}function E(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,O(C,t,e))}function C(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function A(e,t){for(var n=0,r=e.length;n=t.highWaterMark||t.ended))return N("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?E(this):f(this),null;if(e=c(e,t),0===e&&t.ended)return 0===t.length&&E(this),null;var r=t.needReadable;N("need readable",r),(0===t.length||t.length-e0?x(e,t):null,null===i?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&E(this)),null!==i&&this.emit("data",i),i},o.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},o.prototype.pipe=function(e,n){function i(e){N("onunpipe"),e===f&&a()}function o(){N("onend"),e.end()}function a(){N("cleanup"),e.removeListener("close",c),e.removeListener("finish",l),e.removeListener("drain",v),e.removeListener("error",u),e.removeListener("unpipe",i),f.removeListener("end",o),f.removeListener("end",p),f.removeListener("data",s),g=!0,!h.awaitDrain||e._writableState&&!e._writableState.needDrain||v()}function s(t){N("ondata"),_=!1;var n=e.write(t);!1!==n||_||((1===h.pipesCount&&h.pipes===e||h.pipesCount>1&&A(h.pipes,e)!==-1)&&!g&&(N("false write response, pause",f._readableState.awaitDrain),f._readableState.awaitDrain++,_=!0),f.pause())}function u(t){N("onerror",t),p(),e.removeListener("error",u),0===M(e,"error")&&e.emit("error",t)}function c(){e.removeListener("finish",l),p()}function l(){N("onfinish"),e.removeListener("close",c),p()}function p(){N("unpipe"),f.unpipe(e)}var f=this,h=this._readableState;switch(h.pipesCount){case 0:h.pipes=e;break;case 1:h.pipes=[h.pipes,e];break;default:h.pipes.push(e)}h.pipesCount+=1,N("pipe count=%d opts=%j",h.pipesCount,n);var d=(!n||n.end!==!1)&&e!==t.stdout&&e!==t.stderr,m=d?o:p;h.endEmitted?O(m):f.once("end",m),e.on("unpipe",i);var v=y(f);e.on("drain",v);var g=!1,_=!1;return f.on("data",s),r(e,"error",u),e.once("close",c),e.once("finish",l),e.emit("pipe",f),h.flowing||(N("pipe resume"),f.resume()),e},o.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i0?this.tail.next=t:this.head=t,this.tail=t,++this.length},r.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},r.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},r.prototype.clear=function(){this.head=this.tail=null,this.length=0},r.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},r.prototype.concat=function(e){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var t=i.allocUnsafe(e>>>0),n=this.head,r=0;n;)n.data.copy(t,r),r+=n.data.length,n=n.next;return t}},function(e,t,n){"use strict";function r(e){return this instanceof r?(c.call(this,e),l.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",i)):new r(e)}function i(){this.allowHalfOpen||this._writableState.ended||s(o,this)}function o(e){e.end()}var a=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=r;var s=n(477),u=n(480);u.inherits=n(474);var c=n(476),l=n(484);u.inherits(r,c);for(var p=a(l.prototype),f=0;f-1?r:E;s.WritableState=a;var A=n(480);A.inherits=n(474);var T={deprecate:n(487)},O=n(478),D=n(479).Buffer;A.inherits(s,O),a.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(a.prototype,"buffer",{get:T.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(e){}}();var M;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(M=Function.prototype[Symbol.hasInstance],Object.defineProperty(s,Symbol.hasInstance,{value:function(e){return!!M.call(this,e)||e&&e._writableState instanceof a}})):M=function(e){return e instanceof this},s.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},s.prototype.write=function(e,t,n){var r=this._writableState,o=!1,a=D.isBuffer(e);return"function"==typeof t&&(n=t,t=null),a?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=i),r.ended?u(this,n):(a||c(this,r,e,n))&&(r.pendingcb++,o=p(this,r,a,e,t,n)),o},s.prototype.cork=function(){var e=this._writableState;e.corked++},s.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||g(this,e))},s.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},s.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},s.prototype._writev=null,s.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||w(this,r,n)}}).call(t,n(470),n(485).setImmediate)},function(e,t,n){function r(e,t){this._id=e,this._clearFn=t}var i=Function.prototype.apply;t.setTimeout=function(){return new r(i.call(setTimeout,window,arguments),clearTimeout); +},t.setInterval=function(){return new r(i.call(setInterval,window,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(window,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(486),t.setImmediate=setImmediate,t.clearImmediate=clearImmediate},function(e,t,n){(function(e,t){!function(e,n){"use strict";function r(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n>5===6?2:e>>4===14?3:e>>3===30?4:-1}function s(e,t,n){var r=t.length-1;if(r=0?(i>0&&(e.lastNeed=i-1),i):--r=0?(i>0&&(e.lastNeed=i-2),i):--r=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0))}function u(e,t,n){if(128!==(192&t[0]))return e.lastNeed=0,"�".repeat(n);if(e.lastNeed>1&&t.length>1){if(128!==(192&t[1]))return e.lastNeed=1,"�".repeat(n+1);if(e.lastNeed>2&&t.length>2&&128!==(192&t[2]))return e.lastNeed=2,"�".repeat(n+2)}}function c(e){var t=this.lastTotal-this.lastNeed,n=u(this,e,t);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){var n=s(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)}function p(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�".repeat(this.lastTotal-this.lastNeed):t}function f(e,t){if((e.length-t)%2===0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function h(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function d(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function m(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function y(e){return e.toString(this.encoding)}function v(e){return e&&e.length?this.write(e):""}var g=n(479).Buffer,_=g.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};t.StringDecoder=o,o.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(t=this.fillLast(e),void 0===t)return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n1&&(a.normalizer=n(542)(t)):t===!1?a.normalizer=n(543)():1===t?a.normalizer=n(545)():a.normalizer=n(546)(t))),a.async&&n(547),a.promise&&n(550),a.dispose&&n(552),a.maxAge&&n(553),a.max&&n(556),a.refCounter&&n(558),o(e,a)}},function(e,t){"use strict";var n=Array.prototype.forEach,r=Object.create,i=function(e,t){var n;for(n in e)t[n]=e[n]};e.exports=function(e){var t=r(null);return n.call(arguments,function(e){null!=e&&i(Object(e),t)}),t}},function(e,t,n){"use strict";var r=n(498);e.exports=function(e,t,n){var i;return isNaN(e)?(i=t,i>=0?n&&i?i-1:i:1):e!==!1&&r(e)}},function(e,t,n){"use strict";var r=n(499),i=Math.max;e.exports=function(e){return i(0,r(e))}},function(e,t,n){"use strict";var r=n(500),i=Math.abs,o=Math.floor;e.exports=function(e){return isNaN(e)?0:(e=Number(e),0!==e&&isFinite(e)?r(e)*o(i(e)):e)}},function(e,t,n){"use strict";e.exports=n(501)()?Math.sign:n(502)},function(e,t){"use strict";e.exports=function(){var e=Math.sign;return"function"==typeof e&&(1===e(10)&&e(-20)===-1)}},function(e,t){"use strict";e.exports=function(e){return e=Number(e),isNaN(e)||0===e?e:e>0?1:-1}},function(e,t,n){"use strict";var r=n(504),i=n(505),o=n(508),a=n(509),s=n(497),u=Object.prototype.hasOwnProperty;e.exports=function e(t){var n,c,l;if(r(t),n=Object(arguments[1]),n.async&&n.promise)throw new Error("Options 'async' and 'promise' cannot be used together");return u.call(t,"__memoized__")&&!n.force?t:(c=s(n.length,t.length,n.async&&o.async),l=a(t,c,n),i(o,function(e,t){n[t]&&e(n[t],l,n)}),e.__profiler__&&e.__profiler__(l),l.updateEnv(),l.memoized)}},function(e,t){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e,t,n){"use strict";e.exports=n(506)("forEach")},function(e,t,n){"use strict";var r=n(504),i=n(507),o=Function.prototype.bind,a=Function.prototype.call,s=Object.keys,u=Object.prototype.propertyIsEnumerable;e.exports=function(e,t){return function(n,c){var l,p=arguments[2],f=arguments[3];return n=Object(i(n)),r(c),l=s(n),f&&l.sort("function"==typeof f?o.call(f,n):void 0),"function"!=typeof e&&(e=l[e]),a.call(e,l,function(e,r){return u.call(n,e)?a.call(c,p,n[e],e,n,r):t})}}},function(e,t){"use strict";e.exports=function(e){if(null==e)throw new TypeError("Cannot use null or undefined");return e}},function(e,t){"use strict"},function(e,t,n){"use strict";var r=n(510),i=n(518),o=n(520),a=n(525).methods,s=n(526),u=n(540),c=Function.prototype.apply,l=Function.prototype.call,p=Object.create,f=Object.prototype.hasOwnProperty,h=Object.defineProperties,d=a.on,m=a.emit;e.exports=function(e,t,n){var a,y,v,g,_,b,x,w,k,S,E,C,A,T=p(null);return y=t!==!1?t:isNaN(e.length)?1:e.length,n.normalizer&&(w=u(n.normalizer),v=w.get,g=w.set,_=w.delete,b=w.clear),null!=n.resolvers&&(A=s(n.resolvers)),C=v?i(function(t){var n,i,o=arguments;if(A&&(o=A(o)),n=v(o),null!==n&&f.call(T,n))return k&&a.emit("get",n,o,this),T[n];if(i=1===o.length?l.call(e,this,o[0]):c.call(e,this,o),null===n){if(n=v(o),null!==n)throw r("Circular invocation","CIRCULAR_INVOCATION");n=g(o)}else if(f.call(T,n))throw r("Circular invocation","CIRCULAR_INVOCATION");return T[n]=i,S&&a.emit("set",n,null,i),i},y):0===t?function(){var t;if(f.call(T,"data"))return k&&a.emit("get","data",arguments,this),T.data;if(t=arguments.length?c.call(e,this,arguments):l.call(e,this),f.call(T,"data"))throw r("Circular invocation","CIRCULAR_INVOCATION");return T.data=t,S&&a.emit("set","data",null,t),t}:function(t){var n,i,o=arguments;if(A&&(o=A(arguments)),i=String(o[0]),f.call(T,i))return k&&a.emit("get",i,o,this),T[i];if(n=1===o.length?l.call(e,this,o[0]):c.call(e,this,o),f.call(T,i))throw r("Circular invocation","CIRCULAR_INVOCATION");return T[i]=n,S&&a.emit("set",i,null,n),n},a={original:e,memoized:C,get:function(e){return A&&(e=A(e)),v?v(e):String(e[0])},has:function(e){return f.call(T,e)},delete:function(e){var t;f.call(T,e)&&(_&&_(e),t=T[e],delete T[e],E&&a.emit("delete",e,t))},clear:function(){var e=T;b&&b(),T=p(null),a.emit("clear",e)},on:function(e,t){return"get"===e?k=!0:"set"===e?S=!0:"delete"===e&&(E=!0),d.call(this,e,t)},emit:m,updateEnv:function(){e=a.original}},x=v?i(function(e){var t,n=arguments;A&&(n=A(n)),t=v(n),null!==t&&a.delete(t)},y):0===t?function(){return a.delete("data")}:function(e){return A&&(e=A(arguments)[0]),a.delete(e)},h(C,{__memoized__:o(!0),delete:o(x),clear:o(a.clear)}),a}},function(e,t,n){"use strict";var r=n(511),i=n(517),o=Error.captureStackTrace;t=e.exports=function(e){var n=new Error(e),a=arguments[1],s=arguments[2];return null==s&&i(a)&&(s=a,a=null),null!=s&&r(n,s),null!=a&&(n.code=a),o&&o(n,t),n}},function(e,t,n){"use strict";e.exports=n(512)()?Object.assign:n(513)},function(e,t){"use strict";e.exports=function(){var e,t=Object.assign;return"function"==typeof t&&(e={foo:"raz"},t(e,{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},function(e,t,n){"use strict";var r=n(514),i=n(507),o=Math.max;e.exports=function(e,t){var n,a,s,u=o(arguments.length,2);for(e=Object(i(e)),s=function(r){try{e[r]=t[r]}catch(e){n||(n=e)}},a=1;a-1}},function(e,t,n){"use strict";var r,i,o,a,s,u,c,l=n(520),p=n(504),f=Function.prototype.apply,h=Function.prototype.call,d=Object.create,m=Object.defineProperty,y=Object.defineProperties,v=Object.prototype.hasOwnProperty,g={configurable:!0,enumerable:!1,writable:!0};r=function(e,t){var n;return p(t),v.call(this,"__ee__")?n=this.__ee__:(n=g.value=d(null),m(this,"__ee__",g),g.value=null),n[e]?"object"==typeof n[e]?n[e].push(t):n[e]=[n[e],t]:n[e]=t,this},i=function(e,t){var n,i;return p(t),i=this,r.call(this,e,n=function(){o.call(i,e,n),f.call(t,this,arguments)}),n.__eeOnceListener__=t,this},o=function(e,t){var n,r,i,o;if(p(t),!v.call(this,"__ee__"))return this;if(n=this.__ee__,!n[e])return this;if(r=n[e],"object"==typeof r)for(o=0;i=r[o];++o)i!==t&&i.__eeOnceListener__!==t||(2===r.length?n[e]=r[o?0:1]:r.splice(o,1));else r!==t&&r.__eeOnceListener__!==t||delete n[e];return this},a=function(e){var t,n,r,i,o;if(v.call(this,"__ee__")&&(i=this.__ee__[e]))if("object"==typeof i){for(n=arguments.length,o=new Array(n-1),t=1;t=55296&&v<=56319&&(x+=e[++n])),x=w?p.call(w,k,x,d):x,t?(f.value=x,h(m,d,f)):m[d]=x,++d;y=d}if(void 0===y)for(y=a(e.length),t&&(m=new t(y)),n=0;n=0?u(c):r(this.length)-u(s(c)),t=c;ti)throw new TypeError(e+" exceeds maximum possible timeout");return e}},function(e,t){"use strict";e.exports=2147483647},function(e,t,n){"use strict";var r=n(498),i=n(557),o=n(508);o.max=function(e,t,n){var a,s,u;e=r(e),e&&(s=i(e),a=n.async&&o.async||n.promise&&o.promise?"async":"",t.on("set"+a,u=function(e){e=s.hit(e),void 0!==e&&t.delete(e)}),t.on("get"+a,u),t.on("delete"+a,s.delete),t.on("clear"+a,s.clear))}},function(e,t,n){"use strict";var r=n(498),i=Object.create,o=Object.prototype.hasOwnProperty;e.exports=function(e){var t,n=0,a=1,s=i(null),u=i(null),c=0;return e=r(e),{hit:function(r){var i=u[r],l=++c;if(s[l]=r,u[r]=l,!i){if(++n,n<=e)return;return r=s[a],t(r),r}if(delete s[i],a===i)for(;!o.call(s,++a);)continue},delete:t=function(e){var t=u[e];if(t&&(delete s[t],delete u[e],--n,a===t)){if(!n)return c=0,void(a=1);for(;!o.call(s,++a);)continue}},clear:function(){ +n=0,a=1,s=i(null),u=i(null),c=0}}}},function(e,t,n){"use strict";var r=n(520),i=n(508),o=Object.create,a=Object.defineProperties;i.refCounter=function(e,t,n){var s,u;s=o(null),u=n.async&&i.async||n.promise&&i.promise?"async":"",t.on("set"+u,function(e,t){s[e]=t||1}),t.on("get"+u,function(e){++s[e]}),t.on("delete"+u,function(e){delete s[e]}),t.on("clear"+u,function(){s={}}),a(t.memoized,{deleteRef:r(function(){var e=t.get(arguments);return null===e?null:s[e]?!--s[e]&&(t.delete(e),!0):null}),getRefCount:r(function(){var e=t.get(arguments);return null===e?0:s[e]?s[e]:0})})}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){return[a.default]}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var o=n(560),a=r(o)},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e={components:{App:D.default,authorizationPopup:P.default,authorizeBtn:j.default,authorizeOperationBtn:N.default,auths:B.default,authError:z.default,oauth2:H.default,apiKeyAuth:U.default,basicAuth:K.default,clear:G.default,liveResponse:Y.default,info:Ce.default,onlineValidatorBadge:Z.default,operations:ee.default,operation:ne.default,highlightCode:ie.default,responses:ae.default,response:ue.default,responseBody:le.default,parameters:fe.default,parameterRow:de.default,execute:ye.default,headers:ge.default,errors:be.default,contentType:we.default,overview:Se.default,footer:Te.default,ParamBody:De.default,curl:Pe.default,schemes:je.default,modelExample:Ne.default,model:Be.default,models:ze.default,TryItOutButton:Ue.default,Markdown:Ke.default,BaseLayout:He.default}},t={components:Ge},n={components:Ye};return[S.default,y.default,f.default,l.default,a.default,u.default,d.default,e,t,b.default,n,w.default,g.default,C.default,T.default]};var o=n(561),a=i(o),s=n(576),u=i(s),c=n(580),l=i(c),p=n(619),f=i(p),h=n(849),d=i(h),m=n(850),y=i(m),v=n(851),g=i(v),_=n(883),b=i(_),x=n(1156),w=i(x),k=n(1161),S=i(k),E=n(1163),C=i(E),A=n(1212),T=i(A),O=n(1213),D=i(O),M=n(1214),P=i(M),I=n(1215),j=i(I),R=n(1216),N=i(R),F=n(1218),B=i(F),L=n(1219),z=i(L),q=n(1220),U=i(q),W=n(1221),K=i(W),V=n(1222),H=i(V),J=n(1224),G=i(J),X=n(1225),Y=i(X),$=n(1226),Z=i($),Q=n(1227),ee=i(Q),te=n(1228),ne=i(te),re=n(1232),ie=i(re),oe=n(1233),ae=i(oe),se=n(1234),ue=i(se),ce=n(1235),le=i(ce),pe=n(1237),fe=i(pe),he=n(1238),de=i(he),me=n(1239),ye=i(me),ve=n(1240),ge=i(ve),_e=n(1241),be=i(_e),xe=n(1266),we=i(xe),ke=n(1267),Se=i(ke),Ee=n(1269),Ce=i(Ee),Ae=n(1270),Te=i(Ae),Oe=n(1271),De=i(Oe),Me=n(1272),Pe=i(Me),Ie=n(1274),je=i(Ie),Re=n(1275),Ne=i(Re),Fe=n(1276),Be=i(Fe),Le=n(1277),ze=i(Le),qe=n(1278),Ue=i(qe),We=n(1279),Ke=i(We),Ve=n(1375),He=i(Ve),Je=n(1268),Ge=r(Je),Xe=n(1376),Ye=r(Xe)},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return{statePlugins:{err:{reducers:(0,a.default)(e),actions:u,selectors:l}}}};var o=n(562),a=i(o),s=n(333),u=r(s),c=n(574),l=r(c)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return t={},i(t,o.NEW_THROWN_ERR,function(t,n){var r=n.payload,i=Object.assign(f,r,{type:"thrown"});return t.update("errors",function(e){return(e||(0,u.List)()).push((0,u.fromJS)(i))}).update("errors",function(t){return(0,p.default)(t,e.getSystem())})}),i(t,o.NEW_THROWN_ERR_BATCH,function(t,n){var r=n.payload;return r=r.map(function(e){return(0,u.fromJS)(Object.assign(f,e,{type:"thrown"}))}),t.update("errors",function(e){return(e||(0,u.List)()).concat((0,u.fromJS)(r))}).update("errors",function(t){return(0,p.default)(t,e.getSystem())})}),i(t,o.NEW_SPEC_ERR,function(t,n){var r=n.payload,i=(0,u.fromJS)(r);return i=i.set("type","spec"),t.update("errors",function(e){return(e||(0,u.List)()).push((0,u.fromJS)(i)).sortBy(function(e){return e.get("line")})}).update("errors",function(t){return(0,p.default)(t,e.getSystem())})}),i(t,o.NEW_AUTH_ERR,function(t,n){var r=n.payload,i=(0,u.fromJS)(Object.assign({},r));return i=i.set("type","auth"),t.update("errors",function(e){return(e||(0,u.List)()).push((0,u.fromJS)(i))}).update("errors",function(t){return(0,p.default)(t,e.getSystem())})}),i(t,o.CLEAR,function(e,t){var n=t.payload;if(n){var r=c.default.fromJS((0,s.default)((e.get("errors")||(0,u.List)()).toJS(),n));return e.merge({errors:r})}}),t};var o=n(333),a=n(563),s=r(a),u=n(325),c=r(u),l=n(567),p=r(l),f={line:0,level:"error",message:"Unknown error"}},function(e,t,n){function r(e,t){var n=s(e)?i:o;return n(e,u(a(t,3)))}var i=n(564),o=n(565),a=n(400),s=n(346),u=n(566);e.exports=r},function(e,t){function n(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n-1||c.push({name:o(e).replace(".js","").replace("./",""),transform:u(e).transform}))})},function(e,t,n){function r(e,t,n){var r=u(e)?i:s,c=arguments.length<3;return r(e,a(t,4),n,c,o)}var i=n(357),o=n(462),a=n(400),s=n(569),u=n(346);e.exports=r},function(e,t){function n(e,t,n,r,i){return i(e,function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)}),n}e.exports=n},function(e,t,n){function r(e){return n(i(e))}function i(e){return o[e]||function(){throw new Error("Cannot find module '"+e+"'.")}()}var o={"./not-of-type.js":571,"./parameter-oneof.js":572,"./strip-instance.js":573};r.keys=function(){return Object.keys(o)},r.resolve=i,e.exports=r,r.id=570},function(e,t){"use strict";function n(e){return e.map(function(e){var t="is not of a type(s)",n=e.get("message").indexOf(t);if(n>-1){var i=e.get("message").slice(n+t.length).split(",");return e.set("message",e.get("message").slice(0,n)+r(i))}return e})}function r(e){return e.reduce(function(e,t,n,r){return n===r.length-1&&r.length>1?e+"or "+t:r[n+1]&&r.length>2?e+t+", ":r[n+1]?e+t+" ":e+t},"should be a")}Object.defineProperty(t,"__esModule",{value:!0}),t.transform=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){t.jsSpec;return e}Object.defineProperty(t,"__esModule",{value:!0}),t.transform=i;var o=n(447);r(o),n(325)},function(e,t){"use strict";function n(e){return e.map(function(e){return e.set("message",r(e.get("message"),"instance."))})}function r(e,t){return e.replace(new RegExp(t,"g"),"")}Object.defineProperty(t,"__esModule",{value:!0}),t.transform=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lastError=t.allErrors=void 0;var r=n(325),i=n(575),o=function(e){return e},a=t.allErrors=(0,i.createSelector)(o,function(e){return e.get("errors",(0,r.List)())});t.lastError=(0,i.createSelector)(a,function(e){return e.last()})},function(e,t){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1?t-1:0),i=1;i2?r-2:0),o=2;o1&&void 0!==arguments[1])||arguments[1];return e=(0,a.normalizeArray)(e),{type:c,payload:{thing:e,shown:t}}}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e=(0,a.normalizeArray)(e),{type:u,payload:{thing:e,mode:t}}}Object.defineProperty(t,"__esModule",{value:!0}),t.SHOW=t.UPDATE_MODE=t.UPDATE_LAYOUT=void 0,t.updateLayout=r,t.show=i,t.changeMode=o;var a=n(335),s=t.UPDATE_LAYOUT="layout_update_layout",u=t.UPDATE_MODE="layout_update_mode",c=t.SHOW="layout_show"},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t2&&void 0!==arguments[2]?arguments[2]:"";return t=(0,o.normalizeArray)(t),e.getIn(["modes"].concat(r(t)),n)},t.showSummary=(0,i.createSelector)(a,function(e){return!s(e,"editor")})},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{statePlugins:{spec:{wrapActions:f,reducers:a.default,actions:u,selectors:l}}}};var o=n(581),a=i(o),s=n(582),u=r(s),c=n(617),l=r(c),p=n(618),f=r(p)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e){return e instanceof Error?{type:E,error:!0,payload:e}:"string"==typeof e?{type:E,payload:e.replace(/\t/g," ")||""}:{type:E,payload:""}}function a(e){return{type:F,payload:e}}function s(e){return{type:C,payload:e}}function u(e){if(!e||"object"!==("undefined"==typeof e?"undefined":g(e)))throw new Error("updateJson must only accept a simple JSON object");return{type:A,payload:e}}function c(e,t,n,r){return{type:T,payload:{path:e,value:n,paramName:t,isXml:r}}}function l(e){return{type:O,payload:{pathMethod:e}}}function p(e){return{type:R,payload:{pathMethod:e}}}function f(e,t){return{type:N,payload:{path:e,value:t,key:"consumes_value"}}}function h(e,t){return{type:N,payload:{path:e,value:t,key:"produces_value"}}}function d(e,t){return{type:I,payload:{path:e,method:t}}}function m(e,t){return{type:j,payload:{path:e,method:t}}}function y(e,t,n){return{type:B,payload:{scheme:e,path:t,method:n}}}Object.defineProperty(t,"__esModule",{value:!0}),t.execute=t.executeRequest=t.logRequest=t.setRequest=t.setResponse=t.formatIntoYaml=t.resolveSpec=t.parseToJson=t.SET_SCHEME=t.UPDATE_RESOLVED=t.UPDATE_OPERATION_VALUE=t.ClEAR_VALIDATE_PARAMS=t.CLEAR_REQUEST=t.CLEAR_RESPONSE=t.LOG_REQUEST=t.SET_REQUEST=t.SET_RESPONSE=t.VALIDATE_PARAMS=t.UPDATE_PARAM=t.UPDATE_JSON=t.UPDATE_URL=t.UPDATE_SPEC=void 0;var v=Object.assign||function(e){for(var t=1;t0){var i=n.map(function(e){return console.error(e),e.line=e.fullPath?d(m,e.fullPath):null,e.path=e.fullPath?e.fullPath.join("."):null,e.level="error",e.type="thrown",e.source="resolver",Object.defineProperty(e,"message",{enumerable:!0,value:e.message}),e});o.newThrownErrBatch(i)}return r.updateResolved(t)})}},t.formatIntoYaml=function(){return function(e){var t=e.specActions,n=e.specSelectors,r=n.specStr,i=t.updateSpec;try{var o=b.default.safeDump(b.default.safeLoad(r()),{indent:2});i(o)}catch(e){i(e)}}},t.setResponse=function(e,t,n){return{payload:{path:e,method:t,res:n},type:D}},t.setRequest=function(e,t,n){return{payload:{path:e,method:t,req:n},type:M}},t.logRequest=function(e){return{payload:e,type:P}},t.executeRequest=function(e){return function(t){var n=t.fn,r=t.specActions,i=t.specSelectors,o=e.pathName,a=e.method,s=e.operation,u=s.toJS();e.contextUrl=(0,w.default)(i.url()).toString(),u&&u.operationId?e.operationId=u.operationId:u&&o&&a&&(e.operationId=n.opId(u,o,a));var c=Object.assign({},e);return c=n.buildRequest(c),r.setRequest(e.pathName,e.method,c),n.execute(e).then(function(t){return r.setResponse(e.pathName,e.method,t)}).catch(function(t){return r.setResponse(e.pathName,e.method,{error:!0,err:(0,S.default)(t)})})}},function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.path,n=e.method,r=i(e,["path","method"]);return function(e){var i=e.fn.fetch,o=e.specSelectors,a=e.specActions,s=o.spec().toJS(),u=o.operationScheme(t,n),c=o.contentTypeValues([t,n]).toJS(),l=c.requestContentType,p=c.responseContentType,f=/xml/i.test(l),h=o.parameterValues([t,n],f).toJS();return a.executeRequest(v({fetch:i,spec:s,pathName:t,method:n,parameters:h,requestContentType:l,scheme:u,responseContentType:p},r))}});t.execute=L},function(e,t,n){"use strict";var r=n(584);e.exports=r},function(e,t,n){"use strict";function r(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}var i=n(585),o=n(613);e.exports.Type=n(591),e.exports.Schema=n(590),e.exports.FAILSAFE_SCHEMA=n(594),e.exports.JSON_SCHEMA=n(593),e.exports.CORE_SCHEMA=n(592),e.exports.DEFAULT_SAFE_SCHEMA=n(589),e.exports.DEFAULT_FULL_SCHEMA=n(608),e.exports.load=i.load,e.exports.loadAll=i.loadAll,e.exports.safeLoad=i.safeLoad,e.exports.safeLoadAll=i.safeLoadAll,e.exports.dump=o.dump,e.exports.safeDump=o.safeDump,e.exports.YAMLException=n(587),e.exports.MINIMAL_SCHEMA=n(594),e.exports.SAFE_SCHEMA=n(589),e.exports.DEFAULT_SCHEMA=n(608),e.exports.scan=r("scan"),e.exports.parse=r("parse"),e.exports.compose=r("compose"),e.exports.addConstructor=r("addConstructor")},function(e,t,n){"use strict";function r(e){return 10===e||13===e}function i(e){return 9===e||32===e}function o(e){return 9===e||32===e||10===e||13===e}function a(e){return 44===e||91===e||93===e||123===e||125===e}function s(e){var t;return 48<=e&&e<=57?e-48:(t=32|e,97<=t&&t<=102?t-97+10:-1)}function u(e){return 120===e?2:117===e?4:85===e?8:0}function c(e){return 48<=e&&e<=57?e-48:-1}function l(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e?"\t":9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function p(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function f(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||K,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function h(e,t){return new q(t,new U(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function d(e,t){throw h(e,t)}function m(e,t){e.onWarning&&e.onWarning.call(null,h(e,t))}function y(e,t,n,r){var i,o,a,s;if(t1&&(e.result+=z.repeat("\n",t-1))}function k(e,t,n){var s,u,c,l,p,f,h,d,m,v=e.kind,g=e.result;if(m=e.input.charCodeAt(e.position),o(m)||a(m)||35===m||38===m||42===m||33===m||124===m||62===m||39===m||34===m||37===m||64===m||96===m)return!1;if((63===m||45===m)&&(u=e.input.charCodeAt(e.position+1),o(u)||n&&a(u)))return!1;for(e.kind="scalar",e.result="",c=l=e.position,p=!1;0!==m;){if(58===m){if(u=e.input.charCodeAt(e.position+1),o(u)||n&&a(u))break}else if(35===m){if(s=e.input.charCodeAt(e.position-1),o(s))break}else{if(e.position===e.lineStart&&x(e)||n&&a(m))break;if(r(m)){if(f=e.line,h=e.lineStart,d=e.lineIndent,b(e,!1,-1),e.lineIndent>=t){p=!0,m=e.input.charCodeAt(e.position);continue}e.position=l,e.line=f,e.lineStart=h,e.lineIndent=d;break}}p&&(y(e,c,l,!1),w(e,e.line-f),c=l=e.position,p=!1),i(m)||(l=e.position+1),m=e.input.charCodeAt(++e.position)}return y(e,c,l,!1),!!e.result||(e.kind=v,e.result=g,!1)}function S(e,t){var n,i,o;if(n=e.input.charCodeAt(e.position),39!==n)return!1;for(e.kind="scalar",e.result="",e.position++,i=o=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(y(e,i,e.position,!0),n=e.input.charCodeAt(++e.position),39!==n)return!0;i=e.position,e.position++,o=e.position}else r(n)?(y(e,i,o,!0),w(e,b(e,!1,t)),i=o=e.position):e.position===e.lineStart&&x(e)?d(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);d(e,"unexpected end of the stream within a single quoted scalar")}function E(e,t){var n,i,o,a,c,l;if(l=e.input.charCodeAt(e.position),34!==l)return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;0!==(l=e.input.charCodeAt(e.position));){if(34===l)return y(e,n,e.position,!0),e.position++,!0;if(92===l){if(y(e,n,e.position,!0),l=e.input.charCodeAt(++e.position),r(l))b(e,!1,t);else if(l<256&&ie[l])e.result+=oe[l],e.position++;else if((c=u(l))>0){for(o=c,a=0;o>0;o--)l=e.input.charCodeAt(++e.position),(c=s(l))>=0?a=(a<<4)+c:d(e,"expected hexadecimal character");e.result+=p(a),e.position++}else d(e,"unknown escape sequence");n=i=e.position}else r(l)?(y(e,n,i,!0),w(e,b(e,!1,t)),n=i=e.position):e.position===e.lineStart&&x(e)?d(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}d(e,"unexpected end of the stream within a double quoted scalar")}function C(e,t){var n,r,i,a,s,u,c,l,p,f,h,m=!0,y=e.tag,v=e.anchor,_={};if(h=e.input.charCodeAt(e.position),91===h)a=93,c=!1,r=[];else{if(123!==h)return!1;a=125,c=!0,r={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=r),h=e.input.charCodeAt(++e.position);0!==h;){if(b(e,!0,t),h=e.input.charCodeAt(e.position),h===a)return e.position++,e.tag=y,e.anchor=v,e.kind=c?"mapping":"sequence",e.result=r,!0;m||d(e,"missed comma between flow collection entries"),p=l=f=null,s=u=!1,63===h&&(i=e.input.charCodeAt(e.position+1),o(i)&&(s=u=!0,e.position++,b(e,!0,t))),n=e.line,I(e,t,H,!1,!0),p=e.tag,l=e.result,b(e,!0,t),h=e.input.charCodeAt(e.position),!u&&e.line!==n||58!==h||(s=!0,h=e.input.charCodeAt(++e.position),b(e,!0,t),I(e,t,H,!1,!0),f=e.result),c?g(e,r,_,p,l,f):s?r.push(g(e,null,_,p,l,f)):r.push(l),b(e,!0,t),h=e.input.charCodeAt(e.position),44===h?(m=!0,h=e.input.charCodeAt(++e.position)):m=!1}d(e,"unexpected end of the stream within a flow collection")}function A(e,t){var n,o,a,s,u=Y,l=!1,p=!1,f=t,h=0,m=!1;if(s=e.input.charCodeAt(e.position),124===s)o=!1;else{if(62!==s)return!1;o=!0}for(e.kind="scalar",e.result="";0!==s;)if(s=e.input.charCodeAt(++e.position),43===s||45===s)Y===u?u=43===s?Z:$:d(e,"repeat of a chomping mode identifier");else{if(!((a=c(s))>=0))break;0===a?d(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):p?d(e,"repeat of an indentation width identifier"):(f=t+a-1,p=!0)}if(i(s)){do s=e.input.charCodeAt(++e.position);while(i(s));if(35===s)do s=e.input.charCodeAt(++e.position);while(!r(s)&&0!==s)}for(;0!==s;){for(_(e),e.lineIndent=0,s=e.input.charCodeAt(e.position);(!p||e.lineIndentf&&(f=e.lineIndent),r(s))h++;else{if(e.lineIndentt)&&0!==i)d(e,"bad indentation of a sequence entry");else if(e.lineIndentt)&&(I(e,t,X,!0,a)&&(_?y=e.result:v=e.result),_||(g(e,f,h,m,y,v,s,u),m=y=v=null),b(e,!0,-1),c=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==c)d(e,"bad indentation of a mapping entry");else if(e.lineIndentt?h=1:e.lineIndent===t?h=0:e.lineIndentt?h=1:e.lineIndent===t?h=0:e.lineIndent tag; it should be "'+l.kind+'", not "'+e.kind+'"'),l.resolve(e.result)?(e.result=l.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):d(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):d(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||y}function j(e){var t,n,a,s,u=e.position,c=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(s=e.input.charCodeAt(e.position))&&(b(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==s));){for(c=!0,s=e.input.charCodeAt(++e.position),t=e.position;0!==s&&!o(s);)s=e.input.charCodeAt(++e.position);for(n=e.input.slice(t,e.position),a=[],n.length<1&&d(e,"directive name must not be less than one character in length");0!==s;){for(;i(s);)s=e.input.charCodeAt(++e.position);if(35===s){do s=e.input.charCodeAt(++e.position);while(0!==s&&!r(s));break}if(r(s))break;for(t=e.position;0!==s&&!o(s);)s=e.input.charCodeAt(++e.position);a.push(e.input.slice(t,e.position))}0!==s&&_(e),V.call(se,n)?se[n](e,n,a):m(e,'unknown document directive "'+n+'"')}return b(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,b(e,!0,-1)):c&&d(e,"directives end mark is expected"),I(e,e.lineIndent-1,X,!1,!0),b(e,!0,-1),e.checkLineBreaks&&ee.test(e.input.slice(u,e.position))&&m(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&x(e)?void(46===e.input.charCodeAt(e.position)&&(e.position+=3,b(e,!0,-1))):void(e.position0&&"\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(r-1))===-1;)if(r-=1,this.position-r>t/2-1){n=" ... ",r+=5;break}for(o="",a=this.position;at/2-1){o=" ... ",a-=5;break}return s=this.buffer.slice(r,a),i.repeat(" ",e)+n+s+o+"\n"+i.repeat(" ",e+this.position-r+n.length)+"^"},r.prototype.toString=function(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet(),t&&(n+=":\n"+t)),n},e.exports=r},function(e,t,n){"use strict";var r=n(590);e.exports=new r({include:[n(592)],implicit:[n(602),n(603)],explicit:[n(604),n(605),n(606),n(607)]})},function(e,t,n){"use strict";function r(e,t,n){var i=[];return e.include.forEach(function(e){n=r(e,t,n)}),e[t].forEach(function(e){n.forEach(function(t,n){t.tag===e.tag&&t.kind===e.kind&&i.push(n)}),n.push(e)}),n.filter(function(e,t){return i.indexOf(t)===-1})}function i(){function e(e){r[e.kind][e.tag]=r.fallback[e.tag]=e}var t,n,r={scalar:{},sequence:{},mapping:{},fallback:{}};for(t=0,n=arguments.length;t=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:t.indexOf(":")>=0?(t.split(":").forEach(function(e){i.unshift(parseFloat(e,10))}),t=0,r=1,i.forEach(function(e){t+=e*r,r*=60}),n*t):n*parseFloat(t,10)}function o(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(s.isNegativeZero(e))return"-0.0";return n=e.toString(10),l.test(n)?n.replace("e",".e"):n}function a(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!==0||s.isNegativeZero(e))}var s=n(586),u=n(591),c=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),l=/^[-+]?[0-9]+e/;e.exports=new u("tag:yaml.org,2002:float",{kind:"scalar",resolve:r,construct:i,predicate:a,represent:o,defaultStyle:"lowercase"})},function(e,t,n){"use strict";function r(e){return null!==e&&(null!==s.exec(e)||null!==u.exec(e))}function i(e){var t,n,r,i,o,a,c,l,p,f,h=0,d=null;if(t=s.exec(e),null===t&&(t=u.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(o=+t[4],a=+t[5],c=+t[6],t[7]){for(h=t[7].slice(0,3);h.length<3;)h+="0";h=+h}return t[9]&&(l=+t[10],p=+(t[11]||0),d=6e4*(60*l+p),"-"===t[9]&&(d=-d)),f=new Date(Date.UTC(n,r,i,o,a,c,h)),d&&f.setTime(f.getTime()-d),f}function o(e){return e.toISOString()}var a=n(591),s=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),u=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");e.exports=new a("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:r,construct:i,instanceOf:Date,represent:o})},function(e,t,n){"use strict";function r(e){return"<<"===e||null===e}var i=n(591);e.exports=new i("tag:yaml.org,2002:merge",{kind:"scalar",resolve:r})},function(e,t,n){function r(e){if(null===e)return!1;var t,n,r=0,i=e.length,o=c;for(n=0;n64)){if(t<0)return!1;r+=6}return r%8===0}function i(e){var t,n,r=e.replace(/[\r\n=]/g,""),i=r.length,o=c,a=0,u=[];for(t=0;t>16&255),u.push(a>>8&255),u.push(255&a)),a=a<<6|o.indexOf(r.charAt(t));return n=i%4*6,0===n?(u.push(a>>16&255),u.push(a>>8&255),u.push(255&a)):18===n?(u.push(a>>10&255),u.push(a>>2&255)):12===n&&u.push(a>>4&255),s?s.from?s.from(u):new s(u):u}function o(e){var t,n,r="",i=0,o=e.length,a=c;for(t=0;t>18&63],r+=a[i>>12&63],r+=a[i>>6&63],r+=a[63&i]),i=(i<<8)+e[t];return n=o%3,0===n?(r+=a[i>>18&63],r+=a[i>>12&63],r+=a[i>>6&63],r+=a[63&i]):2===n?(r+=a[i>>10&63],r+=a[i>>4&63],r+=a[i<<2&63],r+=a[64]):1===n&&(r+=a[i>>2&63],r+=a[i<<4&63],r+=a[64],r+=a[64]),r}function a(e){return s&&s.isBuffer(e)}var s;try{s=n(299).Buffer}catch(e){}var u=n(591),c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new u("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:a,represent:o})},function(e,t,n){"use strict";function r(e){if(null===e)return!0;var t,n,r,i,o,u=[],c=e;for(t=0,n=c.length;t3)return!1;if("/"!==t[t.length-r.length-1])return!1}return!0}function i(e){var t=e,n=/\/([gim]*)$/.exec(e),r="";return"/"===t[0]&&(n&&(r=n[1]),t=t.slice(1,t.length-r.length-1)),new RegExp(t,r)}function o(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function a(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var s=n(591);e.exports=new s("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:r,construct:i,predicate:a,represent:o})},function(e,t,n){function r(e){if(null===e)return!1;try{var t="("+e+")",n=s.parse(t,{range:!0});return"Program"===n.type&&1===n.body.length&&"ExpressionStatement"===n.body[0].type&&"FunctionExpression"===n.body[0].expression.type}catch(e){return!1}}function i(e){var t,n="("+e+")",r=s.parse(n,{range:!0}),i=[];if("Program"!==r.type||1!==r.body.length||"ExpressionStatement"!==r.body[0].type||"FunctionExpression"!==r.body[0].expression.type)throw new Error("Failed to resolve function");return r.body[0].expression.params.forEach(function(e){i.push(e.name)}),t=r.body[0].expression.body.range,new Function(i,n.slice(t[0]+1,t[1]-1))}function o(e){return e.toString()}function a(e){return"[object Function]"===Object.prototype.toString.call(e)}var s;try{s=n(612)}catch(e){"undefined"!=typeof window&&(s=window.esprima)}var u=n(591);e.exports=new u("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:r,construct:i,predicate:a,represent:o})},function(e,t,n){!function(t,n){e.exports=n()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e,t,n){var r=null,i=function(e,t){n&&n(e,t),r&&r.visit(e,t)},u="function"==typeof n?i:null,c=!1;if(t){c="boolean"==typeof t.comment&&t.comment;var l="boolean"==typeof t.attachComment&&t.attachComment;(c||l)&&(r=new o.CommentHandler,r.attach=l,t.comment=!0,u=i)}var p;p=t&&"boolean"==typeof t.jsx&&t.jsx?new s.JSXParser(e,t,u):new a.Parser(e,t,u);var f=p.parseProgram();return c&&(f.comments=r.comments),p.config.tokens&&(f.tokens=p.tokens),p.config.tolerant&&(f.errors=p.errorHandler.errors),f}function i(e,t,n){var r,i=new u.Tokenizer(e,t);r=[];try{for(;;){var o=i.getNextToken();if(!o)break;n&&(o=n(o)),r.push(o)}}catch(e){i.errorHandler.tolerate(e)}return i.errorHandler.tolerant&&(r.errors=i.errors()),r}var o=n(1),a=n(3),s=n(11),u=n(15);t.parse=r,t.tokenize=i;var c=n(2);t.Syntax=c.Syntax,t.version="3.1.3"},function(e,t,n){"use strict";var r=n(2),i=function(){function e(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return e.prototype.insertInnerComments=function(e,t){if(e.type===r.Syntax.BlockStatement&&0===e.body.length){for(var n=[],i=this.leading.length-1;i>=0;--i){var o=this.leading[i];t.end.offset>=o.start&&(n.unshift(o.comment),this.leading.splice(i,1),this.trailing.splice(i,1))}n.length&&(e.innerComments=n)}},e.prototype.findTrailingComments=function(e,t){var n=[];if(this.trailing.length>0){for(var r=this.trailing.length-1;r>=0;--r){var i=this.trailing[r];i.start>=t.end.offset&&n.unshift(i.comment)}return this.trailing.length=0,n}var o=this.stack[this.stack.length-1];if(o&&o.node.trailingComments){var a=o.node.trailingComments[0];a&&a.range[0]>=t.end.offset&&(n=o.node.trailingComments,delete o.node.trailingComments)}return n},e.prototype.findLeadingComments=function(e,t){for(var n,r=[];this.stack.length>0;){var i=this.stack[this.stack.length-1];if(!(i&&i.start>=t.start.offset))break;n=this.stack.pop().node}if(n){for(var o=n.leadingComments?n.leadingComments.length:0,a=o-1;a>=0;--a){var s=n.leadingComments[a];s.range[1]<=t.start.offset&&(r.unshift(s),n.leadingComments.splice(a,1))}return n.leadingComments&&0===n.leadingComments.length&&delete n.leadingComments,r}for(var a=this.leading.length-1;a>=0;--a){var i=this.leading[a];i.start<=t.start.offset&&(r.unshift(i.comment),this.leading.splice(a,1))}return r},e.prototype.visitNode=function(e,t){if(!(e.type===r.Syntax.Program&&e.body.length>0)){this.insertInnerComments(e,t);var n=this.findTrailingComments(e,t),i=this.findLeadingComments(e,t);i.length>0&&(e.leadingComments=i),n.length>0&&(e.trailingComments=n),this.stack.push({node:e,start:t.start.offset})}},e.prototype.visitComment=function(e,t){var n="L"===e.type[0]?"Line":"Block",r={type:n,value:e.value};if(e.range&&(r.range=e.range),e.loc&&(r.loc=e.loc),this.comments.push(r),this.attach){var i={comment:{type:n,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};e.loc&&(i.comment.loc=e.loc),e.type=n,this.leading.push(i),this.trailing.push(i)}},e.prototype.visit=function(e,t){"LineComment"===e.type?this.visitComment(e,t):"BlockComment"===e.type?this.visitComment(e,t):this.attach&&this.visitNode(e,t)},e}();t.CommentHandler=i},function(e,t){"use strict";t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,n){"use strict";var r=n(4),i=n(5),o=n(6),a=n(7),s=n(8),u=n(2),c=n(10),l="ArrowParameterPlaceHolder",p=function(){function e(e,t,n){void 0===t&&(t={}),this.config={range:"boolean"==typeof t.range&&t.range,loc:"boolean"==typeof t.loc&&t.loc,source:null,tokens:"boolean"==typeof t.tokens&&t.tokens,comment:"boolean"==typeof t.comment&&t.comment,tolerant:"boolean"==typeof t.tolerant&&t.tolerant},this.config.loc&&t.source&&null!==t.source&&(this.config.source=String(t.source)),this.delegate=n,this.errorHandler=new o.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new s.Scanner(e,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.sourceType=t&&"module"===t.sourceType?"module":"script",this.lookahead=null,this.hasLineTerminator=!1,this.context={allowIn:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:"module"===this.sourceType},this.tokens=[],this.startMarker={index:0,lineNumber:this.scanner.lineNumber,lineStart:0},this.lastMarker={index:0,lineNumber:this.scanner.lineNumber,lineStart:0},this.nextToken(),this.lastMarker={index:this.scanner.index,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart}}return e.prototype.throwError=function(e){for(var t=[],n=1;n0&&this.delegate)for(var t=0;t>="===e||">>>="===e||"&="===e||"^="===e||"|="===e},e.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=e.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=n,this.context.firstCoverInitializedNameError=r,i},e.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,r=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var i=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&n,this.context.firstCoverInitializedNameError=r||this.context.firstCoverInitializedNameError,i},e.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(this.lookahead.type===a.Token.EOF||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.lineNumber=this.startMarker.lineNumber,this.lastMarker.lineStart=this.startMarker.lineStart)},e.prototype.parsePrimaryExpression=function(){var e,t,n,r,o=this.createNode();switch(this.lookahead.type){case a.Token.Identifier:"module"===this.sourceType&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),e=this.finalize(o,new c.Identifier(this.nextToken().value));break;case a.Token.NumericLiteral:case a.Token.StringLiteral:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,i.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,n=this.nextToken(),r=this.getTokenRaw(n),e=this.finalize(o,new c.Literal(n.value,r));break;case a.Token.BooleanLiteral:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,n=this.nextToken(),n.value="true"===n.value,r=this.getTokenRaw(n),e=this.finalize(o,new c.Literal(n.value,r));break;case a.Token.NullLiteral:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,n=this.nextToken(),n.value=null,r=this.getTokenRaw(n),e=this.finalize(o,new c.Literal(n.value,r));break;case a.Token.Template:e=this.parseTemplateLiteral();break;case a.Token.Punctuator:switch(t=this.lookahead.value){case"(":this.context.isBindingElement=!1,e=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":e=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":e=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,n=this.nextRegexToken(),r=this.getTokenRaw(n),e=this.finalize(o,new c.RegexLiteral(n.value,r,n.regex));break;default:this.throwUnexpectedToken(this.nextToken())}break;case a.Token.Keyword:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?e=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?e=this.finalize(o,new c.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?e=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),e=this.finalize(o,new c.ThisExpression)):this.matchKeyword("class")?e=this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:this.throwUnexpectedToken(this.nextToken())}return e},e.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new c.SpreadElement(t))},e.prototype.parseArrayInitializer=function(){var e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){var n=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(n)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new c.ArrayExpression(t))},e.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var t=this.context.strict,n=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,n},e.prototype.parsePropertyMethodFunction=function(){var e=!1,t=this.createNode(),n=this.context.allowYield;this.context.allowYield=!1;var r=this.parseFormalParameters(),i=this.parsePropertyMethod(r);return this.context.allowYield=n,this.finalize(t,new c.FunctionExpression(null,r.params,i,e))},e.prototype.parseObjectPropertyKey=function(){var e=this.createNode(),t=this.nextToken(),n=null;switch(t.type){case a.Token.StringLiteral:case a.Token.NumericLiteral:this.context.strict&&t.octal&&this.tolerateUnexpectedToken(t,i.Messages.StrictOctalLiteral);var r=this.getTokenRaw(t);n=this.finalize(e,new c.Literal(t.value,r));break;case a.Token.Identifier:case a.Token.BooleanLiteral:case a.Token.NullLiteral:case a.Token.Keyword:n=this.finalize(e,new c.Identifier(t.value));break;case a.Token.Punctuator:"["===t.value?(n=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):this.throwUnexpectedToken(t);break;default:this.throwUnexpectedToken(t)}return n},e.prototype.isPropertyKey=function(e,t){return e.type===u.Syntax.Identifier&&e.name===t||e.type===u.Syntax.Literal&&e.value===t},e.prototype.parseObjectProperty=function(e){var t,n,r,o=this.createNode(),s=this.lookahead,u=!1,l=!1,p=!1;s.type===a.Token.Identifier?(this.nextToken(),n=this.finalize(o,new c.Identifier(s.value))):this.match("*")?this.nextToken():(u=this.match("["),n=this.parseObjectPropertyKey());var f=this.qualifiedPropertyName(this.lookahead);if(s.type===a.Token.Identifier&&"get"===s.value&&f)t="get",u=this.match("["),n=this.parseObjectPropertyKey(),this.context.allowYield=!1,r=this.parseGetterMethod();else if(s.type===a.Token.Identifier&&"set"===s.value&&f)t="set",u=this.match("["),n=this.parseObjectPropertyKey(),r=this.parseSetterMethod();else if(s.type===a.Token.Punctuator&&"*"===s.value&&f)t="init",u=this.match("["),n=this.parseObjectPropertyKey(),r=this.parseGeneratorMethod(),l=!0;else if(n||this.throwUnexpectedToken(this.lookahead),t="init",this.match(":"))!u&&this.isPropertyKey(n,"__proto__")&&(e.value&&this.tolerateError(i.Messages.DuplicateProtoProperty),e.value=!0),this.nextToken(),r=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))r=this.parsePropertyMethodFunction(),l=!0;else if(s.type===a.Token.Identifier){var h=this.finalize(o,new c.Identifier(s.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),p=!0;var d=this.isolateCoverGrammar(this.parseAssignmentExpression);r=this.finalize(o,new c.AssignmentPattern(h,d))}else p=!0,r=h}else this.throwUnexpectedToken(this.nextToken());return this.finalize(o,new c.Property(t,n,u,r,l,p))},e.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");for(var t=[],n={value:!1};!this.match("}");)t.push(this.parseObjectProperty(n)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(e,new c.ObjectExpression(t))},e.prototype.parseTemplateHead=function(){r.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode(),t=this.nextToken(),n={raw:t.value.raw,cooked:t.value.cooked};return this.finalize(e,new c.TemplateElement(n,t.tail))},e.prototype.parseTemplateElement=function(){this.lookahead.type!==a.Token.Template&&this.throwUnexpectedToken();var e=this.createNode(),t=this.nextToken(),n={raw:t.value.raw,cooked:t.value.cooked};return this.finalize(e,new c.TemplateElement(n,t.tail))},e.prototype.parseTemplateLiteral=function(){var e=this.createNode(),t=[],n=[],r=this.parseTemplateHead();for(n.push(r);!r.tail;)t.push(this.parseExpression()),r=this.parseTemplateElement(),n.push(r);return this.finalize(e,new c.TemplateLiteral(n,t))},e.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case u.Syntax.Identifier:case u.Syntax.MemberExpression:case u.Syntax.RestElement:case u.Syntax.AssignmentPattern:break;case u.Syntax.SpreadElement:e.type=u.Syntax.RestElement,this.reinterpretExpressionAsPattern(e.argument);break;case u.Syntax.ArrayExpression:e.type=u.Syntax.ArrayPattern;for(var t=0;t")||this.expect("=>"),e={type:l,params:[]};else{var t=this.lookahead,n=[];if(this.match("..."))e=this.parseRestElement(n),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:l,params:[e]};else{var r=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var i=[];for(this.context.isAssignmentTarget=!1,i.push(e);this.startMarker.index")||this.expect("=>"),this.context.isBindingElement=!1;for(var o=0;o")&&(e.type===u.Syntax.Identifier&&"yield"===e.name&&(r=!0,e={type:l,params:[e]}),!r)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),e.type===u.Syntax.SequenceExpression)for(var o=0;o0){this.nextToken(),n.prec=r,this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var i=[e,this.lookahead],o=t,a=this.isolateCoverGrammar(this.parseExponentiationExpression),s=[o,n,a];;){if(r=this.binaryPrecedence(this.lookahead),r<=0)break;for(;s.length>2&&r<=s[s.length-2].prec;){a=s.pop();var u=s.pop().value;o=s.pop(),i.pop();var l=this.startNode(i[i.length-1]);s.push(this.finalize(l,new c.BinaryExpression(u,o,a)))}n=this.nextToken(),n.prec=r,s.push(n),i.push(this.lookahead),s.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var p=s.length-1;for(t=s[p],i.pop();p>1;){var l=this.startNode(i.pop());t=this.finalize(l,new c.BinaryExpression(s[p-1].value,s[p-2],t)),p-=2}}return t},e.prototype.parseConditionalExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var n=this.context.allowIn;this.context.allowIn=!0;var r=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=n,this.expect(":");var i=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new c.ConditionalExpression(t,r,i)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return t},e.prototype.checkPatternParam=function(e,t){switch(t.type){case u.Syntax.Identifier:this.validateParam(e,t,t.name);break;case u.Syntax.RestElement:this.checkPatternParam(e,t.argument);break;case u.Syntax.AssignmentPattern:this.checkPatternParam(e,t.left);break;case u.Syntax.ArrayPattern:for(var n=0;n")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var r=this.reinterpretAsCoverFormalsList(e);if(r){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var o=this.context.strict,a=this.context.allowYield;this.context.allowYield=!0;var s=this.startNode(t);this.expect("=>");var p=this.match("{")?this.parseFunctionSourceElements():this.isolateCoverGrammar(this.parseAssignmentExpression),f=p.type!==u.Syntax.BlockStatement;this.context.strict&&r.firstRestricted&&this.throwUnexpectedToken(r.firstRestricted,r.message),this.context.strict&&r.stricted&&this.tolerateUnexpectedToken(r.stricted,r.message),e=this.finalize(s,new c.ArrowFunctionExpression(r.params,p,f)),this.context.strict=o,this.context.allowYield=a}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(i.Messages.InvalidLHSInAssignment),this.context.strict&&e.type===u.Syntax.Identifier){var h=e;this.scanner.isRestrictedWord(h.name)&&this.tolerateUnexpectedToken(n,i.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(h.name)&&this.tolerateUnexpectedToken(n,i.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),n=this.nextToken();var d=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new c.AssignmentExpression(n.value,e,d)),this.context.firstCoverInitializedNameError=null}}return e},e.prototype.parseExpression=function(){var e=this.lookahead,t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];for(n.push(t);this.startMarker.index",t.TokenName[n.Identifier]="Identifier",t.TokenName[n.Keyword]="Keyword",t.TokenName[n.NullLiteral]="Null",t.TokenName[n.NumericLiteral]="Numeric",t.TokenName[n.Punctuator]="Punctuator",t.TokenName[n.StringLiteral]="String",t.TokenName[n.RegularExpression]="RegularExpression",t.TokenName[n.Template]="Template"},function(e,t,n){"use strict";function r(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function i(e){return"01234567".indexOf(e)}var o=n(4),a=n(5),s=n(9),u=n(7),c=function(){function e(e,t){this.source=e,this.errorHandler=t,this.trackComment=!1,this.length=e.length,this.index=0,this.lineNumber=e.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return e.prototype.eof=function(){return this.index>=this.length},e.prototype.throwUnexpectedToken=function(e){void 0===e&&(e=a.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.tolerateUnexpectedToken=function(){this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,a.Messages.UnexpectedTokenIllegal)},e.prototype.skipSingleLineComment=function(e){var t,n,r;for(this.trackComment&&(t=[],n=this.index-e,r={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){var i=this.source.charCodeAt(this.index);if(++this.index,s.Character.isLineTerminator(i)){if(this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart-1};var o={multiLine:!1,slice:[n+e,this.index-1],range:[n,this.index-1],loc:r};t.push(o)}return 13===i&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t}}if(this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart};var o={multiLine:!1,slice:[n+e,this.index],range:[n,this.index],loc:r};t.push(o)}return t},e.prototype.skipMultiLineComment=function(){var e,t,n;for(this.trackComment&&(e=[],t=this.index-2,n={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var r=this.source.charCodeAt(this.index);if(s.Character.isLineTerminator(r))13===r&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===r){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart};var i={multiLine:!0,slice:[t+2,this.index-2],range:[t,this.index],loc:n};e.push(i)}return e}++this.index}else++this.index}if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart};var i={multiLine:!0,slice:[t+2,this.index],range:[t,this.index],loc:n};e.push(i)}return this.tolerateUnexpectedToken(),e},e.prototype.scanComments=function(){var e;this.trackComment&&(e=[]);for(var t=0===this.index;!this.eof();){var n=this.source.charCodeAt(this.index);if(s.Character.isWhiteSpace(n))++this.index;else if(s.Character.isLineTerminator(n))++this.index,13===n&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(47===n)if(n=this.source.charCodeAt(this.index+1),47===n){this.index+=2;var r=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(r)),t=!0}else{if(42!==n)break;this.index+=2;var r=this.skipMultiLineComment();this.trackComment&&(e=e.concat(r))}else if(t&&45===n){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3;var r=this.skipSingleLineComment(3);this.trackComment&&(e=e.concat(r))}else{if(60!==n)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4;var r=this.skipSingleLineComment(4);this.trackComment&&(e=e.concat(r))}}return e},e.prototype.isFutureReservedWord=function(e){switch(e){case"enum":case"export":case"import":case"super":return!0;default:return!1}},e.prototype.isStrictModeReservedWord=function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},e.prototype.isRestrictedWord=function(e){return"eval"===e||"arguments"===e},e.prototype.isKeyword=function(e){switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6: +return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}},e.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){var n=this.source.charCodeAt(e+1);if(n>=56320&&n<=57343){var r=t;t=1024*(r-55296)+n-56320+65536}}return t},e.prototype.scanHexEscape=function(e){for(var t="u"===e?4:2,n=0,i=0;i1114111||"}"!==e)&&this.throwUnexpectedToken(),s.Character.fromCodePoint(t)},e.prototype.getIdentifier=function(){for(var e=this.index++;!this.eof();){var t=this.source.charCodeAt(this.index);if(92===t)return this.index=e,this.getComplexIdentifier();if(t>=55296&&t<57343)return this.index=e,this.getComplexIdentifier();if(!s.Character.isIdentifierPart(t))break;++this.index}return this.source.slice(e,this.index)},e.prototype.getComplexIdentifier=function(){var e=this.codePointAt(this.index),t=s.Character.fromCodePoint(e);this.index+=t.length;var n;for(92===e&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,n=this.scanUnicodeCodePointEscape()):(n=this.scanHexEscape("u"),e=n.charCodeAt(0),n&&"\\"!==n&&s.Character.isIdentifierStart(e)||this.throwUnexpectedToken()),t=n);!this.eof()&&(e=this.codePointAt(this.index),s.Character.isIdentifierPart(e));)n=s.Character.fromCodePoint(e),t+=n,this.index+=n.length,92===e&&(t=t.substr(0,t.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,n=this.scanUnicodeCodePointEscape()):(n=this.scanHexEscape("u"),e=n.charCodeAt(0),n&&"\\"!==n&&s.Character.isIdentifierPart(e)||this.throwUnexpectedToken()),t+=n);return t},e.prototype.octalToDecimal=function(e){var t="0"!==e,n=i(e);return!this.eof()&&s.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,n=8*n+i(this.source[this.index++]),"0123".indexOf(e)>=0&&!this.eof()&&s.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(n=8*n+i(this.source[this.index++]))),{code:n,octal:t}},e.prototype.scanIdentifier=function(){var e,t=this.index,n=92===this.source.charCodeAt(t)?this.getComplexIdentifier():this.getIdentifier();return e=1===n.length?u.Token.Identifier:this.isKeyword(n)?u.Token.Keyword:"null"===n?u.Token.NullLiteral:"true"===n||"false"===n?u.Token.BooleanLiteral:u.Token.Identifier,{type:e,value:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.scanPunctuator=function(){var e={type:u.Token.Punctuator,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index},t=this.source[this.index];switch(t){case"(":case"{":"{"===t&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,t="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:t=this.source.substr(this.index,4),">>>="===t?this.index+=4:(t=t.substr(0,3),"==="===t||"!=="===t||">>>"===t||"<<="===t||">>="===t||"**="===t?this.index+=3:(t=t.substr(0,2),"&&"===t||"||"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t||"**"===t?this.index+=2:(t=this.source[this.index],"<>=!+-*%&|^/".indexOf(t)>=0&&++this.index)))}return this.index===e.start&&this.throwUnexpectedToken(),e.end=this.index,e.value=t,e},e.prototype.scanHexLiteral=function(e){for(var t="";!this.eof()&&s.Character.isHexDigit(this.source.charCodeAt(this.index));)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),s.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:u.Token.NumericLiteral,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanBinaryLiteral=function(e){for(var t,n="";!this.eof()&&(t=this.source[this.index],"0"===t||"1"===t);)n+=this.source[this.index++];return 0===n.length&&this.throwUnexpectedToken(),this.eof()||(t=this.source.charCodeAt(this.index),(s.Character.isIdentifierStart(t)||s.Character.isDecimalDigit(t))&&this.throwUnexpectedToken()),{type:u.Token.NumericLiteral,value:parseInt(n,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanOctalLiteral=function(e,t){var n="",r=!1;for(s.Character.isOctalDigit(e.charCodeAt(0))?(r=!0,n="0"+this.source[this.index++]):++this.index;!this.eof()&&s.Character.isOctalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];return r||0!==n.length||this.throwUnexpectedToken(),(s.Character.isIdentifierStart(this.source.charCodeAt(this.index))||s.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:u.Token.NumericLiteral,value:parseInt(n,8),octal:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1;e=0&&(r=r.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(e,t,r){var o=parseInt(t||r,16);return o>1114111&&i.throwUnexpectedToken(a.Messages.InvalidRegExp),o<=65535?String.fromCharCode(o):n}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,n));try{RegExp(r)}catch(e){this.throwUnexpectedToken(a.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}},e.prototype.scanRegExpBody=function(){var e=this.source[this.index];o.assert("/"===e,"Regular expression literal must start with a slash");for(var t=this.source[this.index++],n=!1,r=!1;!this.eof();)if(e=this.source[this.index++],t+=e,"\\"===e)e=this.source[this.index++],s.Character.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(a.Messages.UnterminatedRegExp),t+=e;else if(s.Character.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(a.Messages.UnterminatedRegExp);else if(n)"]"===e&&(n=!1);else{if("/"===e){r=!0;break}"["===e&&(n=!0)}r||this.throwUnexpectedToken(a.Messages.UnterminatedRegExp);var i=t.substr(1,t.length-2);return{value:i,literal:t}},e.prototype.scanRegExpFlags=function(){for(var e="",t="";!this.eof();){var n=this.source[this.index];if(!s.Character.isIdentifierPart(n.charCodeAt(0)))break;if(++this.index,"\\"!==n||this.eof())t+=n,e+=n;else if(n=this.source[this.index],"u"===n){++this.index;var r=this.index;if(n=this.scanHexEscape("u"))for(t+=n,e+="\\u";r=55296&&e<57343&&s.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},e}();t.Scanner=c},function(e,t){"use strict";var n={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&n.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&n.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return e>=48&&e<=57},isHexDigit:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},isOctalDigit:function(e){return e>=48&&e<=55}}},function(e,t,n){"use strict";var r=n(2),i=function(){function e(e){this.type=r.Syntax.ArrayExpression,this.elements=e}return e}();t.ArrayExpression=i;var o=function(){function e(e){this.type=r.Syntax.ArrayPattern,this.elements=e}return e}();t.ArrayPattern=o;var a=function(){function e(e,t,n){this.type=r.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n}return e}();t.ArrowFunctionExpression=a;var s=function(){function e(e,t,n){this.type=r.Syntax.AssignmentExpression,this.operator=e,this.left=t,this.right=n}return e}();t.AssignmentExpression=s;var u=function(){function e(e,t){this.type=r.Syntax.AssignmentPattern,this.left=e,this.right=t}return e}();t.AssignmentPattern=u;var c=function(){function e(e,t,n){var i="||"===e||"&&"===e;this.type=i?r.Syntax.LogicalExpression:r.Syntax.BinaryExpression,this.operator=e,this.left=t,this.right=n}return e}();t.BinaryExpression=c;var l=function(){function e(e){this.type=r.Syntax.BlockStatement,this.body=e}return e}();t.BlockStatement=l;var p=function(){function e(e){this.type=r.Syntax.BreakStatement,this.label=e}return e}();t.BreakStatement=p;var f=function(){function e(e,t){this.type=r.Syntax.CallExpression,this.callee=e,this.arguments=t}return e}();t.CallExpression=f;var h=function(){function e(e,t){this.type=r.Syntax.CatchClause,this.param=e,this.body=t}return e}();t.CatchClause=h;var d=function(){function e(e){this.type=r.Syntax.ClassBody,this.body=e}return e}();t.ClassBody=d;var m=function(){function e(e,t,n){this.type=r.Syntax.ClassDeclaration,this.id=e,this.superClass=t,this.body=n}return e}();t.ClassDeclaration=m;var y=function(){function e(e,t,n){this.type=r.Syntax.ClassExpression,this.id=e,this.superClass=t,this.body=n}return e}();t.ClassExpression=y;var v=function(){function e(e,t){this.type=r.Syntax.MemberExpression,this.computed=!0,this.object=e,this.property=t}return e}();t.ComputedMemberExpression=v;var g=function(){function e(e,t,n){this.type=r.Syntax.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=n}return e}();t.ConditionalExpression=g;var _=function(){function e(e){this.type=r.Syntax.ContinueStatement,this.label=e}return e}();t.ContinueStatement=_;var b=function(){function e(){this.type=r.Syntax.DebuggerStatement}return e}();t.DebuggerStatement=b;var x=function(){function e(e,t){this.type=r.Syntax.ExpressionStatement,this.expression=e,this.directive=t}return e}();t.Directive=x;var w=function(){function e(e,t){this.type=r.Syntax.DoWhileStatement,this.body=e,this.test=t}return e}();t.DoWhileStatement=w;var k=function(){function e(){this.type=r.Syntax.EmptyStatement}return e}();t.EmptyStatement=k;var S=function(){function e(e){this.type=r.Syntax.ExportAllDeclaration,this.source=e}return e}();t.ExportAllDeclaration=S;var E=function(){function e(e){this.type=r.Syntax.ExportDefaultDeclaration,this.declaration=e}return e}();t.ExportDefaultDeclaration=E;var C=function(){function e(e,t,n){this.type=r.Syntax.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=n}return e}();t.ExportNamedDeclaration=C;var A=function(){function e(e,t){this.type=r.Syntax.ExportSpecifier,this.exported=t,this.local=e}return e}();t.ExportSpecifier=A;var T=function(){function e(e){this.type=r.Syntax.ExpressionStatement,this.expression=e}return e}();t.ExpressionStatement=T;var O=function(){function e(e,t,n){this.type=r.Syntax.ForInStatement,this.left=e,this.right=t,this.body=n,this.each=!1}return e}();t.ForInStatement=O;var D=function(){function e(e,t,n){this.type=r.Syntax.ForOfStatement,this.left=e,this.right=t,this.body=n}return e}();t.ForOfStatement=D;var M=function(){function e(e,t,n,i){this.type=r.Syntax.ForStatement,this.init=e,this.test=t,this.update=n,this.body=i}return e}();t.ForStatement=M;var P=function(){function e(e,t,n,i){this.type=r.Syntax.FunctionDeclaration,this.id=e, +this.params=t,this.body=n,this.generator=i,this.expression=!1}return e}();t.FunctionDeclaration=P;var I=function(){function e(e,t,n,i){this.type=r.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=i,this.expression=!1}return e}();t.FunctionExpression=I;var j=function(){function e(e){this.type=r.Syntax.Identifier,this.name=e}return e}();t.Identifier=j;var R=function(){function e(e,t,n){this.type=r.Syntax.IfStatement,this.test=e,this.consequent=t,this.alternate=n}return e}();t.IfStatement=R;var N=function(){function e(e,t){this.type=r.Syntax.ImportDeclaration,this.specifiers=e,this.source=t}return e}();t.ImportDeclaration=N;var F=function(){function e(e){this.type=r.Syntax.ImportDefaultSpecifier,this.local=e}return e}();t.ImportDefaultSpecifier=F;var B=function(){function e(e){this.type=r.Syntax.ImportNamespaceSpecifier,this.local=e}return e}();t.ImportNamespaceSpecifier=B;var L=function(){function e(e,t){this.type=r.Syntax.ImportSpecifier,this.local=e,this.imported=t}return e}();t.ImportSpecifier=L;var z=function(){function e(e,t){this.type=r.Syntax.LabeledStatement,this.label=e,this.body=t}return e}();t.LabeledStatement=z;var q=function(){function e(e,t){this.type=r.Syntax.Literal,this.value=e,this.raw=t}return e}();t.Literal=q;var U=function(){function e(e,t){this.type=r.Syntax.MetaProperty,this.meta=e,this.property=t}return e}();t.MetaProperty=U;var W=function(){function e(e,t,n,i,o){this.type=r.Syntax.MethodDefinition,this.key=e,this.computed=t,this.value=n,this.kind=i,this.static=o}return e}();t.MethodDefinition=W;var K=function(){function e(e,t){this.type=r.Syntax.NewExpression,this.callee=e,this.arguments=t}return e}();t.NewExpression=K;var V=function(){function e(e){this.type=r.Syntax.ObjectExpression,this.properties=e}return e}();t.ObjectExpression=V;var H=function(){function e(e){this.type=r.Syntax.ObjectPattern,this.properties=e}return e}();t.ObjectPattern=H;var J=function(){function e(e,t){this.type=r.Syntax.Program,this.body=e,this.sourceType=t}return e}();t.Program=J;var G=function(){function e(e,t,n,i,o,a){this.type=r.Syntax.Property,this.key=t,this.computed=n,this.value=i,this.kind=e,this.method=o,this.shorthand=a}return e}();t.Property=G;var X=function(){function e(e,t,n){this.type=r.Syntax.Literal,this.value=e,this.raw=t,this.regex=n}return e}();t.RegexLiteral=X;var Y=function(){function e(e){this.type=r.Syntax.RestElement,this.argument=e}return e}();t.RestElement=Y;var $=function(){function e(e){this.type=r.Syntax.ReturnStatement,this.argument=e}return e}();t.ReturnStatement=$;var Z=function(){function e(e){this.type=r.Syntax.SequenceExpression,this.expressions=e}return e}();t.SequenceExpression=Z;var Q=function(){function e(e){this.type=r.Syntax.SpreadElement,this.argument=e}return e}();t.SpreadElement=Q;var ee=function(){function e(e,t){this.type=r.Syntax.MemberExpression,this.computed=!1,this.object=e,this.property=t}return e}();t.StaticMemberExpression=ee;var te=function(){function e(){this.type=r.Syntax.Super}return e}();t.Super=te;var ne=function(){function e(e,t){this.type=r.Syntax.SwitchCase,this.test=e,this.consequent=t}return e}();t.SwitchCase=ne;var re=function(){function e(e,t){this.type=r.Syntax.SwitchStatement,this.discriminant=e,this.cases=t}return e}();t.SwitchStatement=re;var ie=function(){function e(e,t){this.type=r.Syntax.TaggedTemplateExpression,this.tag=e,this.quasi=t}return e}();t.TaggedTemplateExpression=ie;var oe=function(){function e(e,t){this.type=r.Syntax.TemplateElement,this.value=e,this.tail=t}return e}();t.TemplateElement=oe;var ae=function(){function e(e,t){this.type=r.Syntax.TemplateLiteral,this.quasis=e,this.expressions=t}return e}();t.TemplateLiteral=ae;var se=function(){function e(){this.type=r.Syntax.ThisExpression}return e}();t.ThisExpression=se;var ue=function(){function e(e){this.type=r.Syntax.ThrowStatement,this.argument=e}return e}();t.ThrowStatement=ue;var ce=function(){function e(e,t,n){this.type=r.Syntax.TryStatement,this.block=e,this.handler=t,this.finalizer=n}return e}();t.TryStatement=ce;var le=function(){function e(e,t){this.type=r.Syntax.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0}return e}();t.UnaryExpression=le;var pe=function(){function e(e,t,n){this.type=r.Syntax.UpdateExpression,this.operator=e,this.argument=t,this.prefix=n}return e}();t.UpdateExpression=pe;var fe=function(){function e(e,t){this.type=r.Syntax.VariableDeclaration,this.declarations=e,this.kind=t}return e}();t.VariableDeclaration=fe;var he=function(){function e(e,t){this.type=r.Syntax.VariableDeclarator,this.id=e,this.init=t}return e}();t.VariableDeclarator=he;var de=function(){function e(e,t){this.type=r.Syntax.WhileStatement,this.test=e,this.body=t}return e}();t.WhileStatement=de;var me=function(){function e(e,t){this.type=r.Syntax.WithStatement,this.object=e,this.body=t}return e}();t.WithStatement=me;var ye=function(){function e(e,t){this.type=r.Syntax.YieldExpression,this.argument=e,this.delegate=t}return e}();t.YieldExpression=ye},function(e,t,n){"use strict";function r(e){var t;switch(e.type){case l.JSXSyntax.JSXIdentifier:var n=e;t=n.name;break;case l.JSXSyntax.JSXNamespacedName:var i=e;t=r(i.namespace)+":"+r(i.name);break;case l.JSXSyntax.JSXMemberExpression:var o=e;t=r(o.object)+"."+r(o.property)}return t}var i,o=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},a=n(9),s=n(7),u=n(3),c=n(12),l=n(13),p=n(10),f=n(14);!function(e){e[e.Identifier=100]="Identifier",e[e.Text=101]="Text"}(i||(i={})),s.TokenName[i.Identifier]="JSXIdentifier",s.TokenName[i.Text]="JSXText";var h=function(e){function t(t,n,r){e.call(this,t,n,r)}return o(t,e),t.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():e.prototype.parsePrimaryExpression.call(this)},t.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.lineNumber,this.scanner.lineStart=this.startMarker.lineStart},t.prototype.finishJSX=function(){this.nextToken()},t.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},t.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.scanXHTMLEntity=function(e){for(var t="&",n=!0,r=!1,i=!1,o=!1;!this.scanner.eof()&&n&&!r;){var s=this.scanner.source[this.scanner.index];if(s===e)break;if(r=";"===s,t+=s,++this.scanner.index,!r)switch(t.length){case 2:i="#"===s;break;case 3:i&&(o="x"===s,n=o||a.Character.isDecimalDigit(s.charCodeAt(0)),i=i&&!o);break;default:n=n&&!(i&&!a.Character.isDecimalDigit(s.charCodeAt(0))),n=n&&!(o&&!a.Character.isHexDigit(s.charCodeAt(0)))}}if(n&&r&&t.length>2){var u=t.substr(1,t.length-2);i&&u.length>1?t=String.fromCharCode(parseInt(u.substr(1),10)):o&&u.length>2?t=String.fromCharCode(parseInt("0"+u.substr(1),16)):i||o||!c.XHTMLEntities[u]||(t=c.XHTMLEntities[u])}return t},t.prototype.lexJSX=function(){var e=this.scanner.source.charCodeAt(this.scanner.index);if(60===e||62===e||47===e||58===e||61===e||123===e||125===e){var t=this.scanner.source[this.scanner.index++];return{type:s.Token.Punctuator,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index}}if(34===e||39===e){for(var n=this.scanner.index,r=this.scanner.source[this.scanner.index++],o="";!this.scanner.eof();){var u=this.scanner.source[this.scanner.index++];if(u===r)break;o+="&"===u?this.scanXHTMLEntity(r):u}return{type:s.Token.StringLiteral,value:o,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:n,end:this.scanner.index}}if(46===e){var c=this.scanner.source.charCodeAt(this.scanner.index+1),l=this.scanner.source.charCodeAt(this.scanner.index+2),t=46===c&&46===l?"...":".",n=this.scanner.index;return this.scanner.index+=t.length,{type:s.Token.Punctuator,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:n,end:this.scanner.index}}if(96===e)return{type:s.Token.Template,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(a.Character.isIdentifierStart(e)&&92!==e){var n=this.scanner.index;for(++this.scanner.index;!this.scanner.eof();){var u=this.scanner.source.charCodeAt(this.scanner.index);if(a.Character.isIdentifierPart(u)&&92!==u)++this.scanner.index;else{if(45!==u)break;++this.scanner.index}}var p=this.scanner.source.slice(n,this.scanner.index);return{type:i.Identifier,value:p,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:n,end:this.scanner.index}}this.scanner.throwUnexpectedToken()},t.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.lineNumber=this.scanner.lineNumber,this.startMarker.lineStart=this.scanner.lineStart;var e=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(e)),e},t.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.lineNumber=this.scanner.lineNumber,this.startMarker.lineStart=this.scanner.lineStart;for(var e=this.scanner.index,t="";!this.scanner.eof();){var n=this.scanner.source[this.scanner.index];if("{"===n||"<"===n)break;++this.scanner.index,t+=n,a.Character.isLineTerminator(n.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===n&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart;var r={type:i.Text,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};return t.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(r)),r},t.prototype.peekJSXToken=function(){var e=this.scanner.index,t=this.scanner.lineNumber,n=this.scanner.lineStart;this.scanner.scanComments();var r=this.lexJSX();return this.scanner.index=e,this.scanner.lineNumber=t,this.scanner.lineStart=n,r},t.prototype.expectJSX=function(e){var t=this.nextJSXToken();t.type===s.Token.Punctuator&&t.value===e||this.throwUnexpectedToken(t)},t.prototype.matchJSX=function(e){var t=this.peekJSXToken();return t.type===s.Token.Punctuator&&t.value===e},t.prototype.parseJSXIdentifier=function(){var e=this.createJSXNode(),t=this.nextJSXToken();return t.type!==i.Identifier&&this.throwUnexpectedToken(t),this.finalize(e,new f.JSXIdentifier(t.value))},t.prototype.parseJSXElementName=function(){var e=this.createJSXNode(),t=this.parseJSXIdentifier();if(this.matchJSX(":")){var n=t;this.expectJSX(":");var r=this.parseJSXIdentifier();t=this.finalize(e,new f.JSXNamespacedName(n,r))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var i=t;this.expectJSX(".");var o=this.parseJSXIdentifier();t=this.finalize(e,new f.JSXMemberExpression(i,o))}return t},t.prototype.parseJSXAttributeName=function(){var e,t=this.createJSXNode(),n=this.parseJSXIdentifier();if(this.matchJSX(":")){var r=n;this.expectJSX(":");var i=this.parseJSXIdentifier();e=this.finalize(t,new f.JSXNamespacedName(r,i))}else e=n;return e},t.prototype.parseJSXStringLiteralAttribute=function(){var e=this.createJSXNode(),t=this.nextJSXToken();t.type!==s.Token.StringLiteral&&this.throwUnexpectedToken(t);var n=this.getTokenRaw(t);return this.finalize(e,new p.Literal(t.value,n))},t.prototype.parseJSXExpressionAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new f.JSXExpressionContainer(t))},t.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},t.prototype.parseJSXNameValueAttribute=function(){var e=this.createJSXNode(),t=this.parseJSXAttributeName(),n=null;return this.matchJSX("=")&&(this.expectJSX("="),n=this.parseJSXAttributeValue()),this.finalize(e,new f.JSXAttribute(t,n))},t.prototype.parseJSXSpreadAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new f.JSXSpreadAttribute(t))},t.prototype.parseJSXAttributes=function(){for(var e=[];!this.matchJSX("/")&&!this.matchJSX(">");){var t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();e.push(t)}return e},t.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName(),n=this.parseJSXAttributes(),r=this.matchJSX("/");return r&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new f.JSXOpeningElement(t,r,n))},t.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(e,new f.JSXClosingElement(t))}var n=this.parseJSXElementName(),r=this.parseJSXAttributes(),i=this.matchJSX("/");return i&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new f.JSXOpeningElement(n,i,r))},t.prototype.parseJSXEmptyExpression=function(){var e=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart,this.finalize(e,new f.JSXEmptyExpression)},t.prototype.parseJSXExpressionContainer=function(){var e=this.createJSXNode();this.expectJSX("{");var t;return this.matchJSX("}")?(t=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),t=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(e,new f.JSXExpressionContainer(t))},t.prototype.parseJSXChildren=function(){for(var e=[];!this.scanner.eof();){var t=this.createJSXChildNode(),n=this.nextJSXText();if(n.start0))break;var a=this.finalize(e.node,new f.JSXElement(e.opening,e.children,e.closing));e=t.pop(),e.children.push(a)}}return e},t.prototype.parseJSXElement=function(){var e=this.createJSXNode(),t=this.parseJSXOpeningElement(),n=[],r=null;if(!t.selfClosing){var i=this.parseComplexJSXElement({node:e,opening:t,closing:r,children:n});n=i.children,r=i.closing}return this.finalize(e,new f.JSXElement(t,n,r))},t.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var e=this.parseJSXElement();return this.finishJSX(),e},t}(u.Parser);t.JSXParser=h},function(e,t){"use strict";t.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"}},function(e,t){"use strict";t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,n){"use strict";var r=n(13),i=function(){function e(e){this.type=r.JSXSyntax.JSXClosingElement,this.name=e}return e}();t.JSXClosingElement=i;var o=function(){function e(e,t,n){this.type=r.JSXSyntax.JSXElement,this.openingElement=e,this.children=t,this.closingElement=n}return e}();t.JSXElement=o;var a=function(){function e(){this.type=r.JSXSyntax.JSXEmptyExpression}return e}();t.JSXEmptyExpression=a;var s=function(){function e(e){this.type=r.JSXSyntax.JSXExpressionContainer,this.expression=e}return e}();t.JSXExpressionContainer=s;var u=function(){function e(e){this.type=r.JSXSyntax.JSXIdentifier,this.name=e}return e}();t.JSXIdentifier=u;var c=function(){function e(e,t){this.type=r.JSXSyntax.JSXMemberExpression,this.object=e,this.property=t}return e}();t.JSXMemberExpression=c;var l=function(){function e(e,t){this.type=r.JSXSyntax.JSXAttribute,this.name=e,this.value=t}return e}();t.JSXAttribute=l;var p=function(){function e(e,t){this.type=r.JSXSyntax.JSXNamespacedName,this.namespace=e,this.name=t}return e}();t.JSXNamespacedName=p;var f=function(){function e(e,t,n){this.type=r.JSXSyntax.JSXOpeningElement,this.name=e,this.selfClosing=t,this.attributes=n}return e}();t.JSXOpeningElement=f;var h=function(){function e(e){this.type=r.JSXSyntax.JSXSpreadAttribute,this.argument=e}return e}();t.JSXSpreadAttribute=h;var d=function(){function e(e,t){this.type=r.JSXSyntax.JSXText,this.value=e,this.raw=t}return e}();t.JSXText=d},function(e,t,n){"use strict";var r=n(8),i=n(6),o=n(7),a=function(){function e(){this.values=[],this.curly=this.paren=-1}return e.prototype.beforeFunctionExpression=function(e){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)>=0},e.prototype.isRegexStart=function(){var e=this.values[this.values.length-1],t=null!==e;switch(e){case"this":case"]":t=!1;break;case")":var n=this.values[this.paren-1];t="if"===n||"while"===n||"for"===n||"with"===n;break;case"}":if(t=!1,"function"===this.values[this.curly-3]){var r=this.values[this.curly-4];t=!!r&&!this.beforeFunctionExpression(r)}else if("function"===this.values[this.curly-4]){var i=this.values[this.curly-5];t=!i||!this.beforeFunctionExpression(i)}}return t},e.prototype.push=function(e){e.type===o.Token.Punctuator||e.type===o.Token.Keyword?("{"===e.value?this.curly=this.values.length:"("===e.value&&(this.paren=this.values.length),this.values.push(e.value)):this.values.push(null)},e}(),s=function(){function e(e,t){this.errorHandler=new i.ErrorHandler,this.errorHandler.tolerant=!!t&&("boolean"==typeof t.tolerant&&t.tolerant),this.scanner=new r.Scanner(e,this.errorHandler),this.scanner.trackComment=!!t&&("boolean"==typeof t.comment&&t.comment),this.trackRange=!!t&&("boolean"==typeof t.range&&t.range),this.trackLoc=!!t&&("boolean"==typeof t.loc&&t.loc),this.buffer=[],this.reader=new a}return e.prototype.errors=function(){return this.errorHandler.errors},e.prototype.getNextToken=function(){if(0===this.buffer.length){var e=this.scanner.scanComments();if(this.scanner.trackComment)for(var t=0;tr&&" "!==e[d+1],d=o);else if(!l(a))return le;m=m&&p(a)}u=u||h&&o-d-1>r&&" "!==e[d+1]}return s||u?" "===e[0]&&n>9?le:u?ce:ue:m&&!i(e)?ae:se}function d(e,t,n,r){e.dump=function(){function i(t){return u(e,t)}if(0===t.length)return"''";if(!e.noCompatMode&&oe.indexOf(t)!==-1)return"'"+t+"'";var o=e.indent*Math.max(1,n),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),c=r||e.flowLevel>-1&&n>=e.flowLevel;switch(h(t,c,e.indent,s,i)){case ae:return t;case se:return"'"+t.replace(/'/g,"''")+"'";case ue:return"|"+m(t,e.indent)+y(a(t,o));case ce:return">"+m(t,e.indent)+y(a(v(t,s),o));case le:return'"'+_(t,s)+'"';default:throw new M("impossible error: invalid scalar style")}}()}function m(e,t){var n=" "===e[0]?String(t):"",r="\n"===e[e.length-1],i=r&&("\n"===e[e.length-2]||"\n"===e),o=i?"+":r?"":"-";return n+o+"\n"}function y(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function v(e,t){for(var n,r,i=/(\n+)([^\n]*)/g,o=function(){var n=e.indexOf("\n");return n=n!==-1?n:e.length,i.lastIndex=n,g(e.slice(0,n),t)}(),a="\n"===e[0]||" "===e[0];r=i.exec(e);){var s=r[1],u=r[2];n=" "===u[0],o+=s+(a||n||""===u?"":"\n")+g(u,t),a=n}return o}function g(e,t){if(""===e||" "===e[0])return e;for(var n,r,i=/ [^ ]/g,o=0,a=0,s=0,u="";n=i.exec(e);)s=n.index,s-o>t&&(r=a>o?a:s,u+="\n"+e.slice(o,r),o=r+1),a=s;return u+="\n",u+=e.length-o>t&&a>o?e.slice(o,a)+"\n"+e.slice(a+1):e.slice(o),u.slice(1)}function _(e){for(var t,n,r="",o=0;o1024&&(s+="? "),s+=e.dump+": ",E(e,t,a,!1,!1)&&(s+=e.dump,u+=s));e.tag=c,e.dump="{"+u+"}"}function k(e,t,n,r){var i,o,a,u,c,l,p="",f=e.tag,h=Object.keys(n);if(e.sortKeys===!0)h.sort();else if("function"==typeof e.sortKeys)h.sort(e.sortKeys);else if(e.sortKeys)throw new M("sortKeys must be a boolean or a function");for(i=0,o=h.length;i1024,c&&(l+=e.dump&&F===e.dump.charCodeAt(0)?"?":"? "),l+=e.dump,c&&(l+=s(e,t)),E(e,t+1,u,!0,c)&&(l+=e.dump&&F===e.dump.charCodeAt(0)?":":": ",l+=e.dump,p+=l));e.tag=f,e.dump=p||"{}"}function S(e,t,n){var r,i,o,a,s,u;for(i=n?e.explicitTypes:e.implicitTypes,o=0,a=i.length;o tag resolver accepts not "'+u+'" style');r=s.represent[u](t,u)}e.dump=r}return!0}return!1}function E(e,t,n,r,i,o){e.tag=null,e.dump=n,S(e,n,!1)||S(e,n,!0);var a=j.call(e.dump);r&&(r=e.flowLevel<0||e.flowLevel>t);var s,u,c="[object Object]"===a||"[object Array]"===a;if(c&&(s=e.duplicates.indexOf(n),u=s!==-1),(null!==e.tag&&"?"!==e.tag||u||2!==e.indent&&t>0)&&(i=!1),u&&e.usedDuplicates[s])e.dump="*ref_"+s;else{if(c&&u&&!e.usedDuplicates[s]&&(e.usedDuplicates[s]=!0),"[object Object]"===a)r&&0!==Object.keys(e.dump).length?(k(e,t,e.dump,i),u&&(e.dump="&ref_"+s+e.dump)):(w(e,t,e.dump),u&&(e.dump="&ref_"+s+" "+e.dump));else if("[object Array]"===a)r&&0!==e.dump.length?(x(e,t,e.dump,i),u&&(e.dump="&ref_"+s+e.dump)):(b(e,t,e.dump),u&&(e.dump="&ref_"+s+" "+e.dump));else{if("[object String]"!==a){if(e.skipInvalid)return!1;throw new M("unacceptable kind of an object to dump "+a)}"?"!==e.tag&&d(e,e.dump,t,o)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function C(e,t){var n,r,i=[],o=[];for(A(e,i,o),n=0,r=o.length;n1&&void 0!==arguments[1]?arguments[1]:"";if(h.List.isList(e))return e.some(function(e){return h.Map.isMap(e)&&e.get("in")===t})}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(h.List.isList(e))return e.some(function(e){return h.Map.isMap(e)&&e.get("type")===t})}function u(e,t){var n=g(e).getIn(["paths"].concat(r(t)),(0,h.fromJS)({})),i=n.get("parameters")||new h.List,o=s(i,"file")?"multipart/form-data":a(i,"formData")?"application/x-www-form-urlencoded":n.get("consumes_value");return(0,h.fromJS)({requestContentType:o,responseContentType:n.get("produces_value")})}function c(e,t){return g(e).getIn(["paths"].concat(r(t),["consumes"]),(0,h.fromJS)({}))}function l(e){return h.Map.isMap(e)?e:new h.Map}Object.defineProperty(t,"__esModule",{value:!0}),t.validateBeforeExecute=t.canExecuteScheme=t.operationScheme=t.hasHost=t.allowTryItOutFor=t.requestFor=t.responseFor=t.requests=t.responses=t.taggedOperations=t.operationsWithTags=t.tagDetails=t.tags=t.operationsWithRootInherited=t.schemes=t.host=t.basePath=t.definitions=t.findDefinition=t.securityDefinitions=t.security=t.produces=t.consumes=t.operations=t.paths=t.semver=t.version=t.externalDocs=t.info=t.spec=t.specResolved=t.specJson=t.specSource=t.specStr=t.url=t.lastError=void 0,t.getParameter=i,t.parameterValues=o,t.parametersIncludeIn=a,t.parametersIncludeType=s,t.contentTypeValues=u,t.operationConsumes=c;var p=n(575),f=n(335),h=n(325),d="default",m=["get","put","post","delete","options","head","patch"],y=function(e){return e||(0,h.Map)()},v=(t.lastError=(0,p.createSelector)(y,function(e){return e.get("lastError")}),t.url=(0,p.createSelector)(y,function(e){return e.get("url")}),t.specStr=(0,p.createSelector)(y,function(e){return e.get("spec")||""}),t.specSource=(0,p.createSelector)(y,function(e){return e.get("specSource")||"not-editor"}),t.specJson=(0,p.createSelector)(y,function(e){return e.get("json",(0,h.Map)())}),t.specResolved=(0,p.createSelector)(y,function(e){return e.get("resolved",(0,h.Map)())})),g=t.spec=function(e){var t=v(e);return t},_=t.info=(0,p.createSelector)(g,function(e){return l(e&&e.get("info"))}),b=(t.externalDocs=(0,p.createSelector)(g,function(e){return l(e&&e.get("externalDocs"))}),t.version=(0,p.createSelector)(_,function(e){return e&&e.get("version")})),x=(t.semver=(0,p.createSelector)(b,function(e){return/v?([0-9]*)\.([0-9]*)\.([0-9]*)/i.exec(e).slice(1)}),t.paths=(0,p.createSelector)(g,function(e){return e.get("paths")})),w=t.operations=(0,p.createSelector)(x,function(e){if(!e||e.size<1)return(0,h.List)();var t=(0,h.List)();return e&&e.forEach?(e.forEach(function(e,n){return e&&e.forEach?void e.forEach(function(e,r){m.indexOf(r)!==-1&&(t=t.push((0,h.fromJS)({path:n,method:r,operation:e,id:r+"-"+n})))}):{}}),t):(0,h.List)()}),k=t.consumes=(0,p.createSelector)(g,function(e){return(0,h.Set)(e.get("consumes"))}),S=t.produces=(0,p.createSelector)(g,function(e){return(0,h.Set)(e.get("produces"))}),E=(t.security=(0,p.createSelector)(g,function(e){return e.get("security",(0,h.List)())}),t.securityDefinitions=(0,p.createSelector)(g,function(e){return e.get("securityDefinitions")}),t.findDefinition=function(e,t){return v(e).getIn(["definitions",t],null)},t.definitions=(0,p.createSelector)(g,function(e){return e.get("definitions")||(0,h.Map)()}),t.basePath=(0,p.createSelector)(g,function(e){return e.get("basePath")}),t.host=(0,p.createSelector)(g,function(e){return e.get("host")}),t.schemes=(0,p.createSelector)(g,function(e){return e.get("schemes",(0,h.Map)())}),t.operationsWithRootInherited=(0,p.createSelector)(w,k,S,function(e,t,n){return e.map(function(e){return e.update("operation",function(e){if(e){if(!h.Map.isMap(e))return;return e.withMutations(function(e){return e.get("consumes")||e.update("consumes",function(e){return(0,h.Set)(e).merge(t)}),e.get("produces")||e.update("produces",function(e){return(0,h.Set)(e).merge(n)}),e})}return(0,h.Map)()})})})),C=t.tags=(0,p.createSelector)(g,function(e){return e.get("tags",(0,h.List)())}),A=t.tagDetails=function(e,t){var n=C(e)||(0,h.List)();return n.filter(h.Map.isMap).find(function(e){return e.get("name")===t},(0,h.Map)())},T=t.operationsWithTags=(0,p.createSelector)(E,function(e){return e.reduce(function(e,t){var n=(0,h.Set)(t.getIn(["operation","tags"]));return n.count()<1?e.update(d,(0,h.List)(),function(e){return e.push(t)}):n.reduce(function(e,n){return e.update(n,(0,h.List)(),function(e){return e.push(t)})},e)},(0,h.Map)())}),O=(t.taggedOperations=function(e){return function(t){var n=t.getConfigs,r=n(),i=r.operationsSorter;return T(e).map(function(t,n){var r="function"==typeof i?i:f.sorters.operationsSorter[i],o=r?t.sort(r):t;return(0,h.Map)({tagDetails:A(e,n),operations:o})})}},t.responses=(0,p.createSelector)(y,function(e){return e.get("responses",(0,h.Map)())})),D=t.requests=(0,p.createSelector)(y,function(e){return e.get("requests",(0,h.Map)())}),M=(t.responseFor=function(e,t,n){return O(e).getIn([t,n],null)},t.requestFor=function(e,t,n){return D(e).getIn([t,n],null)},t.allowTryItOutFor=function(){return!0},t.hasHost=(0,p.createSelector)(g,function(e){var t=e.get("host");return"string"==typeof t&&t.length>0&&"/"!==t[0]}),t.operationScheme=function(e,t,n){var r=e.get("url"),i=r.match(/^([a-z][a-z0-9+\-.]*):/),o=Array.isArray(i)?i[1]:null;return e.getIn(["scheme",t,n])||e.getIn(["scheme","_defaultScheme"])||o||""});t.canExecuteScheme=function(e,t,n){return["http","https"].indexOf(M(e,t,n))>-1},t.validateBeforeExecute=function(e,t){var n=g(e).getIn(["paths"].concat(r(t),["parameters"]),(0,h.fromJS)([])),i=!0;return n.forEach(function(e){var t=e.get("errors");t&&t.count()&&(i=!1)}),i}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.updateSpec=function(e,t){var n=t.specActions;return function(){e.apply(void 0,arguments),n.parseToJson.apply(n,arguments)}},t.updateJsonSpec=function(e,t){var n=t.specActions;return function(){e.apply(void 0,arguments),n.resolveSpec.apply(n,arguments)}},t.executeRequest=function(e,t){var n=t.specActions;return function(t){return n.logRequest(t),e(t)}}},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.getComponents,n=e.getStore,r=e.getSystem,i=o.getComponent,s=o.render,u=o.makeMappedContainer,c=(0,a.memoize)(i.bind(null,r,n,t)),l=(0,a.memoize)(u.bind(null,r,n,c,t));return{rootInjects:{getComponent:c,makeMappedContainer:l,render:s.bind(null,r,n,i,t)}}};var i=n(620),o=r(i),a=n(335)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.getComponent=t.render=t.makeMappedContainer=void 0;var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u=Object.assign||function(e){for(var t=1;t1){for(var y=Array(m),v=0;v1){for(var _=Array(g),b=0;b8&&x<=11),S=32,E=String.fromCharCode(S),C={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:["topBlur","topCompositionEnd","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:["topBlur","topCompositionStart","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:["topBlur","topCompositionUpdate","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]}},A=!1,T=null,O={eventTypes:C,extractEvents:function(e,t,n,r){return[c(e,t,n,r),f(e,t,n,r)]}};e.exports=O},function(e,t,n){"use strict";function r(e,t,n){var r=t.dispatchConfig.phasedRegistrationNames[n];return v(e,r)}function i(e,t,n){var i=r(e,n,t);i&&(n._dispatchListeners=m(n._dispatchListeners,i),n._dispatchInstances=m(n._dispatchInstances,e))}function o(e){e&&e.dispatchConfig.phasedRegistrationNames&&d.traverseTwoPhase(e._targetInst,i,e)}function a(e){if(e&&e.dispatchConfig.phasedRegistrationNames){var t=e._targetInst,n=t?d.getParentInstance(t):null;d.traverseTwoPhase(n,i,e)}}function s(e,t,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispatchConfig.registrationName,i=v(e,r);i&&(n._dispatchListeners=m(n._dispatchListeners,i),n._dispatchInstances=m(n._dispatchInstances,e))}}function u(e){e&&e.dispatchConfig.registrationName&&s(e._targetInst,null,e)}function c(e){y(e,o)}function l(e){y(e,a)}function p(e,t,n,r){d.traverseEnterLeave(n,r,s,e,t)}function f(e){y(e,u)}var h=n(661),d=n(663),m=n(665),y=n(666),v=(n(627),h.getListener),g={accumulateTwoPhaseDispatches:c,accumulateTwoPhaseDispatchesSkipTarget:l,accumulateDirectDispatches:f,accumulateEnterLeaveDispatches:p};e.exports=g},function(e,t,n){"use strict";function r(e){return"button"===e||"input"===e||"select"===e||"textarea"===e}function i(e,t,n){switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":return!(!n.disabled||!r(t));default:return!1}}var o=n(654),a=n(662),s=n(663),u=n(664),c=n(665),l=n(666),p=(n(631),{}),f=null,h=function(e,t){e&&(s.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e))},d=function(e){return h(e,!0)},m=function(e){return h(e,!1)},y=function(e){return"."+e._rootNodeID},v={injection:{injectEventPluginOrder:a.injectEventPluginOrder,injectEventPluginsByName:a.injectEventPluginsByName},putListener:function(e,t,n){"function"!=typeof n?o("94",t,typeof n):void 0;var r=y(e),i=p[t]||(p[t]={});i[r]=n;var s=a.registrationNameModules[t];s&&s.didPutListener&&s.didPutListener(e,t,n)},getListener:function(e,t){var n=p[t];if(i(t,e._currentElement.type,e._currentElement.props))return null;var r=y(e);return n&&n[r]},deleteListener:function(e,t){var n=a.registrationNameModules[t];n&&n.willDeleteListener&&n.willDeleteListener(e,t);var r=p[t];if(r){var i=y(e);delete r[i]}},deleteAllListeners:function(e){var t=y(e);for(var n in p)if(p.hasOwnProperty(n)&&p[n][t]){var r=a.registrationNameModules[n];r&&r.willDeleteListener&&r.willDeleteListener(e,n),delete p[n][t]}},extractEvents:function(e,t,n,r){for(var i,o=a.plugins,s=0;s-1?void 0:a("96",e),!c.plugins[n]){t.extractEvents?void 0:a("97",e),c.plugins[n]=t;var r=t.eventTypes;for(var o in r)i(r[o],t,o)?void 0:a("98",o,e)}}}function i(e,t,n){c.eventNameDispatchConfigs.hasOwnProperty(n)?a("99",n):void 0,c.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var i in r)if(r.hasOwnProperty(i)){var s=r[i];o(s,t,n)}return!0}return!!e.registrationName&&(o(e.registrationName,t,n),!0)}function o(e,t,n){c.registrationNameModules[e]?a("100",e):void 0,c.registrationNameModules[e]=t,c.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var a=n(654),s=(n(631),null),u={},c={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(e){s?a("101"):void 0,s=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];u.hasOwnProperty(n)&&u[n]===i||(u[n]?a("102",n):void 0,u[n]=i,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return c.registrationNameModules[t.registrationName]||null;if(void 0!==t.phasedRegistrationNames){var n=t.phasedRegistrationNames;for(var r in n)if(n.hasOwnProperty(r)){var i=c.registrationNameModules[n[r]];if(i)return i}}return null},_resetEventPlugins:function(){s=null;for(var e in u)u.hasOwnProperty(e)&&delete u[e];c.plugins.length=0;var t=c.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=c.registrationNameModules;for(var i in r)r.hasOwnProperty(i)&&delete r[i]}};e.exports=c},function(e,t,n){"use strict";function r(e){return"topMouseUp"===e||"topTouchEnd"===e||"topTouchCancel"===e}function i(e){return"topMouseMove"===e||"topTouchMove"===e}function o(e){return"topMouseDown"===e||"topTouchStart"===e}function a(e,t,n,r){var i=e.type||"unknown-event";e.currentTarget=v.getNodeFromInstance(r),t?m.invokeGuardedCallbackWithCatch(i,n,e):m.invokeGuardedCallback(i,n,e),e.currentTarget=null}function s(e,t){var n=e._dispatchListeners,r=e._dispatchInstances;if(Array.isArray(n))for(var i=0;i1?1-t:void 0;return this._fallbackText=i.slice(e,s),this._fallbackText}}),o.addPoolingTo(r),e.exports=r},[1485,654],function(e,t,n){"use strict";function r(){return!o&&i.canUseDOM&&(o="textContent"in document.documentElement?"textContent":"innerText"),o}var i=n(667),o=null;e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(672),o={data:null};i.augmentClass(r,o),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n;var i=this.constructor.Interface;for(var o in i)if(i.hasOwnProperty(o)){var s=i[o];s?this[o]=s(n):"target"===o?this.target=r:this[o]=n[o]}var u=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1;return u?this.isDefaultPrevented=a.thatReturnsTrue:this.isDefaultPrevented=a.thatReturnsFalse,this.isPropagationStopped=a.thatReturnsFalse,this}var i=n(623),o=n(669),a=n(628),s=(n(627),"function"==typeof Proxy,["dispatchConfig","_targetInst","nativeEvent","isDefaultPrevented","isPropagationStopped","_dispatchListeners","_dispatchInstances"]),u={type:null,target:null,currentTarget:a.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};i(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=a.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=a.thatReturnsTrue)},persist:function(){this.isPersistent=a.thatReturnsTrue},isPersistent:a.thatReturnsFalse,destructor:function(){var e=this.constructor.Interface;for(var t in e)this[t]=null;for(var n=0;n8));var R=!1;k.canUseDOM&&(R=O("input")&&(!("documentMode"in document)||document.documentMode>9));var N={eventTypes:M,_allowSimulatedPassThrough:!0,_isInputEventSupported:R,extractEvents:function(e,t,n,o){var a,s,u=t?S.getNodeFromInstance(t):window;if(i(u)?j?a=l:s=p:D(u)?R?a=_:(a=y,s=m):v(u)&&(a=g),a){var c=a(e,t,n);if(c){var f=r(c,n,o);return f}}s&&s(e,u,t),"topBlur"===e&&b(t,u)}};e.exports=N},function(e,t,n){"use strict";function r(){A.ReactReconcileTransaction&&x?void 0:l("123")}function i(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=f.getPooled(),this.reconcileTransaction=A.ReactReconcileTransaction.getPooled(!0)}function o(e,t,n,i,o,a){return r(),x.batchedUpdates(e,t,n,i,o,a)}function a(e,t){return e._mountOrder-t._mountOrder}function s(e){var t=e.dirtyComponentsLength;t!==v.length?l("124",t,v.length):void 0,v.sort(a),g++;for(var n=0;n]/,u=n(699),c=u(function(e,t){if(e.namespaceURI!==o.svg||"innerHTML"in e)e.innerHTML=t;else{r=r||document.createElement("div"),r.innerHTML=""+t+"";for(var n=r.firstChild;n.firstChild;)e.appendChild(n.firstChild)}});if(i.canUseDOM){var l=document.createElement("div");l.innerHTML=" ",""===l.innerHTML&&(c=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),a.test(t)||"<"===t[0]&&s.test(t)){e.innerHTML=String.fromCharCode(65279)+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t}),l=null}e.exports=c},function(e,t){"use strict";var n=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e};e.exports=n},function(e,t,n){"use strict";var r=n(667),i=n(701),o=n(698),a=function(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t};r.canUseDOM&&("textContent"in document.documentElement||(a=function(e,t){return 3===e.nodeType?void(e.nodeValue=t):void o(e,i(t))})),e.exports=a},function(e,t){"use strict";function n(e){var t=""+e,n=i.exec(t);if(!n)return t;var r,o="",a=0,s=0;for(a=n.index;a]/;e.exports=r},function(e,t,n){"use strict";var r=n(654),i=n(696),o=n(667),a=n(703),s=n(628),u=(n(631),{dangerouslyReplaceNodeWithMarkup:function(e,t){if(o.canUseDOM?void 0:r("56"),t?void 0:r("57"),"HTML"===e.nodeName?r("58"):void 0,"string"==typeof t){var n=a(t,s)[0];e.parentNode.replaceChild(n,e)}else i.replaceChildWithTree(e,t)}});e.exports=u},function(e,t,n){"use strict";function r(e){var t=e.match(l);return t&&t[1].toLowerCase()}function i(e,t){var n=c;c?void 0:u(!1);var i=r(e),o=i&&s(i);if(o){n.innerHTML=o[1]+e+o[2];for(var l=o[0];l--;)n=n.lastChild}else n.innerHTML=e;var p=n.getElementsByTagName("script");p.length&&(t?void 0:u(!1),a(p).forEach(t));for(var f=Array.from(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return f}var o=n(667),a=n(704),s=n(705),u=n(631),c=o.canUseDOM?document.createElement("div"):null,l=/^\s*<(\w+)/;e.exports=i},function(e,t,n){"use strict";function r(e){var t=e.length;if(Array.isArray(e)||"object"!=typeof e&&"function"!=typeof e?a(!1):void 0,"number"!=typeof t?a(!1):void 0,0===t||t-1 in e?void 0:a(!1),"function"==typeof e.callee?a(!1):void 0,e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(e){}for(var n=Array(t),r=0;r":a.innerHTML="<"+e+">",s[e]=!a.firstChild),s[e]?f[e]:null}var i=n(667),o=n(631),a=i.canUseDOM?document.createElement("div"):null,s={},u=[1,'"],c=[1,"","
"],l=[3,"","
"],p=[1,'',""],f={"*":[1,"?
","
"],area:[1,"",""],col:[2,"","
"],legend:[1,"
","
"],param:[1,"",""],tr:[2,"","
"],optgroup:u,option:u,caption:c,colgroup:c,tbody:c,tfoot:c,thead:c,td:l,th:l},h=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];h.forEach(function(e){f[e]=p,s[e]=!0}),e.exports=r},function(e,t,n){"use strict";var r=n(695),i=n(653),o={dangerouslyProcessChildrenUpdates:function(e,t){var n=i.getNodeFromInstance(e);r.processUpdates(n,t)}};e.exports=o},function(e,t,n){"use strict";function r(e){if(e){var t=e._currentElement._owner||null;if(t){var n=t.getName();if(n)return" This DOM node was rendered by `"+n+"`."}}return""}function i(e,t){t&&(Y[e._tag]&&(null!=t.children||null!=t.dangerouslySetInnerHTML?y("137",e._tag,e._currentElement._owner?" Check the render method of "+e._currentElement._owner.getName()+".":""):void 0),null!=t.dangerouslySetInnerHTML&&(null!=t.children?y("60"):void 0,"object"==typeof t.dangerouslySetInnerHTML&&K in t.dangerouslySetInnerHTML?void 0:y("61")),null!=t.style&&"object"!=typeof t.style?y("62",r(e)):void 0)}function o(e,t,n,r){if(!(r instanceof j)){var i=e._hostContainerInfo,o=i._node&&i._node.nodeType===H,s=o?i._node:i._ownerDocument;z(t,s),r.getReactMountReady().enqueue(a,{inst:e,registrationName:t,listener:n})}}function a(){var e=this;S.putListener(e.inst,e.registrationName,e.listener)}function s(){var e=this;O.postMountWrapper(e)}function u(){var e=this;P.postMountWrapper(e)}function c(){var e=this;D.postMountWrapper(e)}function l(){N.track(this)}function p(){var e=this;e._rootNodeID?void 0:y("63");var t=L(e);switch(t?void 0:y("64"),e._tag){case"iframe":case"object":e._wrapperState.listeners=[C.trapBubbledEvent("topLoad","load",t)];break;case"video":case"audio":e._wrapperState.listeners=[];for(var n in J)J.hasOwnProperty(n)&&e._wrapperState.listeners.push(C.trapBubbledEvent(n,J[n],t));break;case"source":e._wrapperState.listeners=[C.trapBubbledEvent("topError","error",t)];break;case"img":e._wrapperState.listeners=[C.trapBubbledEvent("topError","error",t),C.trapBubbledEvent("topLoad","load",t)];break;case"form":e._wrapperState.listeners=[C.trapBubbledEvent("topReset","reset",t),C.trapBubbledEvent("topSubmit","submit",t)];break;case"input":case"select":case"textarea":e._wrapperState.listeners=[C.trapBubbledEvent("topInvalid","invalid",t)]}}function f(){M.postUpdateWrapper(this)}function h(e){Q.call(Z,e)||($.test(e)?void 0:y("65",e),Z[e]=!0)}function d(e,t){return e.indexOf("-")>=0||null!=t.is}function m(e){var t=e.type;h(t),this._currentElement=e,this._tag=t.toLowerCase(),this._namespaceURI=null,this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=0,this._domID=0,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var y=n(654),v=n(623),g=n(708),_=n(710),b=n(696),x=n(697),w=n(655),k=n(718),S=n(661),E=n(662),C=n(720),A=n(656),T=n(653),O=n(723),D=n(726),M=n(727),P=n(728),I=(n(681),n(729)),j=n(747),R=(n(628),n(701)),N=(n(631),n(685),n(736),n(683)),F=(n(750),n(627),A),B=S.deleteListener,L=T.getNodeFromInstance,z=C.listenTo,q=E.registrationNameModules,U={string:!0,number:!0},W="style",K="__html",V={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},H=11,J={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},G={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},X={listing:!0,pre:!0,textarea:!0},Y=v({menuitem:!0},G),$=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Z={},Q={}.hasOwnProperty,ee=1;m.displayName="ReactDOMComponent",m.Mixin={mountComponent:function(e,t,n,r){this._rootNodeID=ee++,this._domID=n._idCounter++,this._hostParent=t,this._hostContainerInfo=n;var o=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},e.getReactMountReady().enqueue(p,this);break;case"input":O.mountWrapper(this,o,t),o=O.getHostProps(this,o),e.getReactMountReady().enqueue(l,this),e.getReactMountReady().enqueue(p,this);break;case"option":D.mountWrapper(this,o,t),o=D.getHostProps(this,o);break;case"select":M.mountWrapper(this,o,t),o=M.getHostProps(this,o),e.getReactMountReady().enqueue(p,this);break;case"textarea":P.mountWrapper(this,o,t),o=P.getHostProps(this,o),e.getReactMountReady().enqueue(l,this),e.getReactMountReady().enqueue(p,this)}i(this,o);var a,f;null!=t?(a=t._namespaceURI,f=t._tag):n._tag&&(a=n._namespaceURI,f=n._tag),(null==a||a===x.svg&&"foreignobject"===f)&&(a=x.html),a===x.html&&("svg"===this._tag?a=x.svg:"math"===this._tag&&(a=x.mathml)),this._namespaceURI=a;var h;if(e.useCreateElement){var d,m=n._ownerDocument;if(a===x.html)if("script"===this._tag){var y=m.createElement("div"),v=this._currentElement.type;y.innerHTML="<"+v+">",d=y.removeChild(y.firstChild)}else d=o.is?m.createElement(this._currentElement.type,o.is):m.createElement(this._currentElement.type);else d=m.createElementNS(a,this._currentElement.type);T.precacheNode(this,d),this._flags|=F.hasCachedChildNodes,this._hostParent||k.setAttributeForRoot(d),this._updateDOMProperties(null,o,e);var _=b(d);this._createInitialChildren(e,o,r,_),h=_}else{var w=this._createOpenTagMarkupAndPutListeners(e,o),S=this._createContentMarkup(e,o,r);h=!S&&G[this._tag]?w+"/>":w+">"+S+""}switch(this._tag){case"input":e.getReactMountReady().enqueue(s,this),o.autoFocus&&e.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"textarea":e.getReactMountReady().enqueue(u,this),o.autoFocus&&e.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"select":o.autoFocus&&e.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"button":o.autoFocus&&e.getReactMountReady().enqueue(g.focusDOMComponent,this);break;case"option":e.getReactMountReady().enqueue(c,this)}return h},_createOpenTagMarkupAndPutListeners:function(e,t){var n="<"+this._currentElement.type;for(var r in t)if(t.hasOwnProperty(r)){var i=t[r];if(null!=i)if(q.hasOwnProperty(r))i&&o(this,r,i,e);else{r===W&&(i&&(i=this._previousStyleCopy=v({},t.style)),i=_.createMarkupForStyles(i,this));var a=null;null!=this._tag&&d(this._tag,t)?V.hasOwnProperty(r)||(a=k.createMarkupForCustomAttribute(r,i)):a=k.createMarkupForProperty(r,i),a&&(n+=" "+a)}}return e.renderToStaticMarkup?n:(this._hostParent||(n+=" "+k.createMarkupForRoot()),n+=" "+k.createMarkupForID(this._domID))},_createContentMarkup:function(e,t,n){var r="",i=t.dangerouslySetInnerHTML;if(null!=i)null!=i.__html&&(r=i.__html);else{var o=U[typeof t.children]?t.children:null,a=null!=o?null:t.children;if(null!=o)r=R(o);else if(null!=a){var s=this.mountChildren(a,e,n);r=s.join("")}}return X[this._tag]&&"\n"===r.charAt(0)?"\n"+r:r},_createInitialChildren:function(e,t,n,r){var i=t.dangerouslySetInnerHTML;if(null!=i)null!=i.__html&&b.queueHTML(r,i.__html);else{var o=U[typeof t.children]?t.children:null,a=null!=o?null:t.children;if(null!=o)""!==o&&b.queueText(r,o);else if(null!=a)for(var s=this.mountChildren(a,e,n),u=0;u0&&r.length<20?n+" (keys: "+r.join(", ")+")":n}function o(e,t){var n=s.get(e);if(!n){return null}return n}var a=n(654),s=(n(636),n(731)),u=(n(681),n(675)),c=(n(631),n(627),{isMounted:function(e){var t=s.get(e);return!!t&&!!t._renderedComponent},enqueueCallback:function(e,t,n){c.validateCallback(t,n);var i=o(e);return i?(i._pendingCallbacks?i._pendingCallbacks.push(t):i._pendingCallbacks=[t],void r(i)):null},enqueueCallbackInternal:function(e,t){e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],r(e)},enqueueForceUpdate:function(e){var t=o(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,r(t))},enqueueReplaceState:function(e,t,n){var i=o(e,"replaceState");i&&(i._pendingStateQueue=[t],i._pendingReplaceState=!0,void 0!==n&&null!==n&&(c.validateCallback(n,"replaceState"),i._pendingCallbacks?i._pendingCallbacks.push(n):i._pendingCallbacks=[n]),r(i))},enqueueSetState:function(e,t){var n=o(e,"setState");if(n){var i=n._pendingStateQueue||(n._pendingStateQueue=[]);i.push(t),r(n)}},enqueueElementInternal:function(e,t,n){e._pendingElement=t,e._context=n,r(e)},validateCallback:function(e,t){e&&"function"!=typeof e?a("122",t,i(e)):void 0}});e.exports=c},function(e,t,n){"use strict";var r=(n(623),n(628)),i=(n(627),r);e.exports=i},function(e,t,n){"use strict";var r=n(623),i=n(696),o=n(653),a=function(e){this._currentElement=null,this._hostNode=null,this._hostParent=null,this._hostContainerInfo=null,this._domID=0};r(a.prototype,{mountComponent:function(e,t,n,r){var a=n._idCounter++;this._domID=a,this._hostParent=t,this._hostContainerInfo=n;var s=" react-empty: "+this._domID+" ";if(e.useCreateElement){var u=n._ownerDocument,c=u.createComment(s);return o.precacheNode(this,c),i(c)}return e.renderToStaticMarkup?"":""},receiveComponent:function(){},getHostNode:function(){return o.getNodeFromInstance(this)},unmountComponent:function(){o.uncacheNode(this)}}),e.exports=a},function(e,t,n){"use strict";function r(e,t){"_hostNode"in e?void 0:u("33"),"_hostNode"in t?void 0:u("33");for(var n=0,r=e;r;r=r._hostParent)n++;for(var i=0,o=t;o;o=o._hostParent)i++;for(;n-i>0;)e=e._hostParent,n--;for(;i-n>0;)t=t._hostParent,i--;for(var a=n;a--;){if(e===t)return e;e=e._hostParent,t=t._hostParent}return null}function i(e,t){"_hostNode"in e?void 0:u("35"),"_hostNode"in t?void 0:u("35");for(;t;){if(t===e)return!0;t=t._hostParent}return!1}function o(e){return"_hostNode"in e?void 0:u("36"),e._hostParent}function a(e,t,n){for(var r=[];e;)r.push(e),e=e._hostParent;var i;for(i=r.length;i-- >0;)t(r[i],"captured",n);for(i=0;i0;)n(u[c],"captured",o); +}var u=n(654);n(631);e.exports={isAncestor:i,getLowestCommonAncestor:r,getParentInstance:o,traverseTwoPhase:a,traverseEnterLeave:s}},function(e,t,n){"use strict";var r=n(654),i=n(623),o=n(695),a=n(696),s=n(653),u=n(701),c=(n(631),n(750),function(e){this._currentElement=e,this._stringText=""+e,this._hostNode=null,this._hostParent=null,this._domID=0,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});i(c.prototype,{mountComponent:function(e,t,n,r){var i=n._idCounter++,o=" react-text: "+i+" ",c=" /react-text ";if(this._domID=i,this._hostParent=t,e.useCreateElement){var l=n._ownerDocument,p=l.createComment(o),f=l.createComment(c),h=a(l.createDocumentFragment());return a.queueChild(h,a(p)),this._stringText&&a.queueChild(h,a(l.createTextNode(this._stringText))),a.queueChild(h,a(f)),s.precacheNode(this,p),this._closingComment=f,h}var d=u(this._stringText);return e.renderToStaticMarkup?d:""+d+""},receiveComponent:function(e,t){if(e!==this._currentElement){this._currentElement=e;var n=""+e;if(n!==this._stringText){this._stringText=n;var r=this.getHostNode();o.replaceDelimitedText(r[0],r[1],n)}}},getHostNode:function(){var e=this._commentNodes;if(e)return e;if(!this._closingComment)for(var t=s.getNodeFromInstance(this),n=t.nextSibling;;){if(null==n?r("67",this._domID):void 0,8===n.nodeType&&" /react-text "===n.nodeValue){this._closingComment=n;break}n=n.nextSibling}return e=[this._hostNode,this._closingComment],this._commentNodes=e,e},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,s.uncacheNode(this)}}),e.exports=c},function(e,t,n){"use strict";function r(){this.reinitializeTransaction()}var i=n(623),o=n(675),a=n(682),s=n(628),u={initialize:s,close:function(){f.isBatchingUpdates=!1}},c={initialize:s,close:o.flushBatchedUpdates.bind(o)},l=[c,u];i(r.prototype,a,{getTransactionWrappers:function(){return l}});var p=new r,f={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,i,o){var a=f.isBatchingUpdates;return f.isBatchingUpdates=!0,a?e(t,n,r,i,o):p.perform(e,null,t,n,r,i,o)}};e.exports=f},function(e,t,n){"use strict";function r(e){for(;e._hostParent;)e=e._hostParent;var t=p.getNodeFromInstance(e),n=t.parentNode;return p.getClosestInstanceFromNode(n)}function i(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}function o(e){var t=h(e.nativeEvent),n=p.getClosestInstanceFromNode(t),i=n;do e.ancestors.push(i),i=i&&r(i);while(i);for(var o=0;ot.end?(n=t.end,r=t.start):(n=t.start,r=t.end),i.moveToElementText(e),i.moveStart("character",n),i.setEndPoint("EndToStart",i),i.moveEnd("character",r-n),i.select()}function s(e,t){if(window.getSelection){var n=window.getSelection(),r=e[l()].length,i=Math.min(t.start,r),o=void 0===t.end?i:Math.min(t.end,r);if(!n.extend&&i>o){var a=o;o=i,i=a}var s=c(e,i),u=c(e,o);if(s&&u){var p=document.createRange();p.setStart(s.node,s.offset),n.removeAllRanges(),i>o?(n.addRange(p),n.extend(u.node,u.offset)):(p.setEnd(u.node,u.offset),n.addRange(p))}}}var u=n(667),c=n(762),l=n(670),p=u.canUseDOM&&"selection"in document&&!("getSelection"in window),f={getOffsets:p?i:o,setOffsets:p?a:s};e.exports=f},function(e,t){"use strict";function n(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function r(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function i(e,t){for(var i=n(e),o=0,a=0;i;){if(3===i.nodeType){if(a=o+i.textContent.length,o<=t&&a>=t)return{node:i,offset:t-o};o=a}i=n(r(i))}}e.exports=i},function(e,t,n){"use strict";function r(e,t){return!(!e||!t)&&(e===t||!i(e)&&(i(t)?r(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}var i=n(764);e.exports=r},function(e,t,n){"use strict";function r(e){return i(e)&&3==e.nodeType}var i=n(765);e.exports=r},function(e,t){"use strict";function n(e){var t=e?e.ownerDocument||e:document,n=t.defaultView||window;return!(!e||!("function"==typeof n.Node?e instanceof n.Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}e.exports=n},function(e,t){"use strict";function n(e){if(e=e||("undefined"!=typeof document?document:void 0),"undefined"==typeof e)return null;try{return e.activeElement||e.body}catch(t){return e.body}}e.exports=n},function(e,t){"use strict";var n={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},r={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",ideographic:0,imageRendering:"image-rendering",in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlns:0,xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},i={Properties:{},DOMAttributeNamespaces:{xlinkActuate:n.xlink,xlinkArcrole:n.xlink,xlinkHref:n.xlink,xlinkRole:n.xlink,xlinkShow:n.xlink,xlinkTitle:n.xlink,xlinkType:n.xlink,xmlBase:n.xml,xmlLang:n.xml,xmlSpace:n.xml},DOMAttributeNames:{}};Object.keys(r).forEach(function(e){i.Properties[e]=0,r[e]&&(i.DOMAttributeNames[e]=r[e])}),e.exports=i},function(e,t,n){"use strict";function r(e){if("selectionStart"in e&&u.hasSelectionCapabilities(e))return{start:e.selectionStart,end:e.selectionEnd};if(window.getSelection){var t=window.getSelection();return{anchorNode:t.anchorNode,anchorOffset:t.anchorOffset,focusNode:t.focusNode,focusOffset:t.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}function i(e,t){if(g||null==m||m!==l())return null;var n=r(m);if(!v||!f(v,n)){v=n;var i=c.getPooled(d.select,y,e,t);return i.type="select",i.target=m,o.accumulateTwoPhaseDispatches(i),i}return null}var o=n(660),a=n(667),s=n(653),u=n(760),c=n(672),l=n(766),p=n(686),f=n(736),h=a.canUseDOM&&"documentMode"in document&&document.documentMode<=11,d={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:["topBlur","topContextMenu","topFocus","topKeyDown","topKeyUp","topMouseDown","topMouseUp","topSelectionChange"]}},m=null,y=null,v=null,g=!1,_=!1,b={eventTypes:d,extractEvents:function(e,t,n,r){if(!_)return null;var o=t?s.getNodeFromInstance(t):window;switch(e){case"topFocus":(p(o)||"true"===o.contentEditable)&&(m=o,y=t,v=null);break;case"topBlur":m=null,y=null,v=null;break;case"topMouseDown":g=!0;break;case"topContextMenu":case"topMouseUp":return g=!1,i(n,r);case"topSelectionChange":if(h)break;case"topKeyDown":case"topKeyUp":return i(n,r)}return null},didPutListener:function(e,t,n){"onSelect"===t&&(_=!0)}};e.exports=b},function(e,t,n){"use strict";function r(e){return"."+e._rootNodeID}function i(e){return"button"===e||"input"===e||"select"===e||"textarea"===e}var o=n(654),a=n(756),s=n(660),u=n(653),c=n(770),l=n(771),p=n(672),f=n(772),h=n(773),d=n(689),m=n(776),y=n(777),v=n(778),g=n(690),_=n(779),b=n(628),x=n(774),w=(n(631),{}),k={};["abort","animationEnd","animationIteration","animationStart","blur","canPlay","canPlayThrough","click","contextMenu","copy","cut","doubleClick","drag","dragEnd","dragEnter","dragExit","dragLeave","dragOver","dragStart","drop","durationChange","emptied","encrypted","ended","error","focus","input","invalid","keyDown","keyPress","keyUp","load","loadedData","loadedMetadata","loadStart","mouseDown","mouseMove","mouseOut","mouseOver","mouseUp","paste","pause","play","playing","progress","rateChange","reset","scroll","seeked","seeking","stalled","submit","suspend","timeUpdate","touchCancel","touchEnd","touchMove","touchStart","transitionEnd","volumeChange","waiting","wheel"].forEach(function(e){var t=e[0].toUpperCase()+e.slice(1),n="on"+t,r="top"+t,i={phasedRegistrationNames:{bubbled:n,captured:n+"Capture"},dependencies:[r]};w[e]=i,k[r]=i});var S={},E={eventTypes:w,extractEvents:function(e,t,n,r){var i=k[e];if(!i)return null;var a;switch(e){case"topAbort":case"topCanPlay":case"topCanPlayThrough":case"topDurationChange":case"topEmptied":case"topEncrypted":case"topEnded":case"topError":case"topInput":case"topInvalid":case"topLoad":case"topLoadedData":case"topLoadedMetadata":case"topLoadStart":case"topPause":case"topPlay":case"topPlaying":case"topProgress":case"topRateChange":case"topReset":case"topSeeked":case"topSeeking":case"topStalled":case"topSubmit":case"topSuspend":case"topTimeUpdate":case"topVolumeChange":case"topWaiting":a=p;break;case"topKeyPress":if(0===x(n))return null;case"topKeyDown":case"topKeyUp":a=h;break;case"topBlur":case"topFocus":a=f;break;case"topClick":if(2===n.button)return null;case"topDoubleClick":case"topMouseDown":case"topMouseMove":case"topMouseUp":case"topMouseOut":case"topMouseOver":case"topContextMenu":a=d;break;case"topDrag":case"topDragEnd":case"topDragEnter":case"topDragExit":case"topDragLeave":case"topDragOver":case"topDragStart":case"topDrop":a=m;break;case"topTouchCancel":case"topTouchEnd":case"topTouchMove":case"topTouchStart":a=y;break;case"topAnimationEnd":case"topAnimationIteration":case"topAnimationStart":a=c;break;case"topTransitionEnd":a=v;break;case"topScroll":a=g;break;case"topWheel":a=_;break;case"topCopy":case"topCut":case"topPaste":a=l}a?void 0:o("86",e);var u=a.getPooled(i,t,n,r);return s.accumulateTwoPhaseDispatches(u),u},didPutListener:function(e,t,n){if("onClick"===t&&!i(e._tag)){var o=r(e),s=u.getNodeFromInstance(e);S[o]||(S[o]=a.listen(s,"click",b))}},willDeleteListener:function(e,t){if("onClick"===t&&!i(e._tag)){var n=r(e);S[n].remove(),delete S[n]}}};e.exports=E},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(672),o={animationName:null,elapsedTime:null,pseudoElement:null};i.augmentClass(r,o),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(672),o={clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}};i.augmentClass(r,o),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(690),o={relatedTarget:null};i.augmentClass(r,o),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(690),o=n(774),a=n(775),s=n(692),u={key:a,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:s,charCode:function(e){return"keypress"===e.type?o(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?o(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}};i.augmentClass(r,u),e.exports=r},function(e,t){"use strict";function n(e){var t,n=e.keyCode;return"charCode"in e?(t=e.charCode,0===t&&13===n&&(t=13)):t=n,t>=32||13===t?t:0}e.exports=n},function(e,t,n){"use strict";function r(e){if(e.key){var t=o[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=i(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?a[e.keyCode]||"Unidentified":""}var i=n(774),o={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},a={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(689),o={dataTransfer:null};i.augmentClass(r,o),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(690),o=n(692),a={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:o};i.augmentClass(r,a),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(672),o={propertyName:null,elapsedTime:null,pseudoElement:null};i.augmentClass(r,o),e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r){return i.call(this,e,t,n,r)}var i=n(689),o={deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null};i.augmentClass(r,o),e.exports=r},function(e,t,n){"use strict";function r(e,t){for(var n=Math.min(e.length,t.length),r=0;r.":"function"==typeof t?" Instead of passing a class like Foo, pass React.createElement(Foo) or .":null!=t&&void 0!==t.props?" This may be caused by unintentionally loading two independent copies of React.":"");var a,s=y.createElement(B,{child:t});if(e){var u=w.get(e);a=u._processChildContext(u._context)}else a=A;var l=f(n);if(l){var p=l._currentElement,d=p.props.child;if(D(d,t)){var m=l._renderedComponent.getPublicInstance(),v=r&&function(){r.call(m)};return L._updateRootComponent(l,s,a,n,v),m}L.unmountComponentAtNode(n)}var g=i(n),_=g&&!!o(g),b=c(n),x=_&&!l&&!b,k=L._renderNewRootComponent(s,n,x,a)._renderedComponent.getPublicInstance();return r&&r.call(k),k},render:function(e,t,n){return L._renderSubtreeIntoContainer(null,e,t,n)},unmountComponentAtNode:function(e){l(e)?void 0:h("40");var t=f(e);if(!t){c(e),1===e.nodeType&&e.hasAttribute(P);return!1}return delete N[t._instance.rootID],C.batchedUpdates(u,t,e,!1),!0},_mountImageIntoNode:function(e,t,n,o,a){if(l(t)?void 0:h("41"),o){var s=i(t);if(k.canReuseMarkup(e,s))return void g.precacheNode(n,s);var u=s.getAttribute(k.CHECKSUM_ATTR_NAME);s.removeAttribute(k.CHECKSUM_ATTR_NAME);var c=s.outerHTML;s.setAttribute(k.CHECKSUM_ATTR_NAME,u);var p=e,f=r(p,c),m=" (client) "+p.substring(f-20,f+20)+"\n (server) "+c.substring(f-20,f+20);t.nodeType===j?h("42",m):void 0}if(t.nodeType===j?h("43"):void 0,a.useCreateElement){for(;t.lastChild;)t.removeChild(t.lastChild);d.insertTreeBefore(t,e,null)}else O(t,e),g.precacheNode(n,t.firstChild)}};e.exports=L},function(e,t,n){"use strict";function r(e,t){var n={_topLevelWrapper:e,_idCounter:1,_ownerDocument:t?t.nodeType===i?t:t.ownerDocument:null,_node:t,_tag:t?t.nodeName.toLowerCase():null,_namespaceURI:t?t.namespaceURI:null};return n}var i=(n(750),9);e.exports=r},function(e,t){"use strict";var n={useCreateElement:!0,useFiber:!1};e.exports=n},function(e,t,n){"use strict";var r=n(784),i=/\/?>/,o=/^<\!\-\-/,a={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=r(e);return o.test(e)?e:e.replace(i," "+a.CHECKSUM_ATTR_NAME+'="'+t+'"$&')},canReuseMarkup:function(e,t){var n=t.getAttribute(a.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var i=r(e);return i===n}};e.exports=a},function(e,t){"use strict";function n(e){for(var t=1,n=0,i=0,o=e.length,a=o&-4;i3&&void 0!==arguments[3]?arguments[3]:{},c=Boolean(e),f=e||S,d=void 0;d="function"==typeof t?t:t?(0,v.default)(t):E;var y=n||C,g=r.pure,_=void 0===g||g,b=r.withRef,w=void 0!==b&&b,O=_&&y!==C,D=T++;return function(e){function t(e,t,n){var r=y(e,t,n);return r}var n="Connect("+s(e)+")",r=function(r){function s(e,t){i(this,s);var a=o(this,r.call(this,e,t));a.version=D,a.store=e.store||t.store,(0,k.default)(a.store,'Could not find "store" in either the context or '+('props of "'+n+'". ')+"Either wrap the root component in a , "+('or explicitly pass "store" as a prop to "'+n+'".'));var u=a.store.getState();return a.state={storeState:u},a.clearCache(),a}return a(s,r),s.prototype.shouldComponentUpdate=function(){return!_||this.haveOwnPropsChanged||this.hasStoreStateChanged},s.prototype.computeStateProps=function(e,t){if(!this.finalMapStateToProps)return this.configureFinalMapState(e,t);var n=e.getState(),r=this.doStatePropsDependOnOwnProps?this.finalMapStateToProps(n,t):this.finalMapStateToProps(n); +return r},s.prototype.configureFinalMapState=function(e,t){var n=f(e.getState(),t),r="function"==typeof n;return this.finalMapStateToProps=r?n:f,this.doStatePropsDependOnOwnProps=1!==this.finalMapStateToProps.length,r?this.computeStateProps(e,t):n},s.prototype.computeDispatchProps=function(e,t){if(!this.finalMapDispatchToProps)return this.configureFinalMapDispatch(e,t);var n=e.dispatch,r=this.doDispatchPropsDependOnOwnProps?this.finalMapDispatchToProps(n,t):this.finalMapDispatchToProps(n);return r},s.prototype.configureFinalMapDispatch=function(e,t){var n=d(e.dispatch,t),r="function"==typeof n;return this.finalMapDispatchToProps=r?n:d,this.doDispatchPropsDependOnOwnProps=1!==this.finalMapDispatchToProps.length,r?this.computeDispatchProps(e,t):n},s.prototype.updateStatePropsIfNeeded=function(){var e=this.computeStateProps(this.store,this.props);return(!this.stateProps||!(0,m.default)(e,this.stateProps))&&(this.stateProps=e,!0)},s.prototype.updateDispatchPropsIfNeeded=function(){var e=this.computeDispatchProps(this.store,this.props);return(!this.dispatchProps||!(0,m.default)(e,this.dispatchProps))&&(this.dispatchProps=e,!0)},s.prototype.updateMergedPropsIfNeeded=function(){var e=t(this.stateProps,this.dispatchProps,this.props);return!(this.mergedProps&&O&&(0,m.default)(e,this.mergedProps))&&(this.mergedProps=e,!0)},s.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},s.prototype.trySubscribe=function(){c&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},s.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},s.prototype.componentDidMount=function(){this.trySubscribe()},s.prototype.componentWillReceiveProps=function(e){_&&(0,m.default)(e,this.props)||(this.haveOwnPropsChanged=!0)},s.prototype.componentWillUnmount=function(){this.tryUnsubscribe(),this.clearCache()},s.prototype.clearCache=function(){this.dispatchProps=null,this.stateProps=null,this.mergedProps=null,this.haveOwnPropsChanged=!0,this.hasStoreStateChanged=!0,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,this.renderedElement=null,this.finalMapDispatchToProps=null,this.finalMapStateToProps=null},s.prototype.handleChange=function(){if(this.unsubscribe){var e=this.store.getState(),t=this.state.storeState;if(!_||t!==e){if(_&&!this.doStatePropsDependOnOwnProps){var n=u(this.updateStatePropsIfNeeded,this);if(!n)return;n===A&&(this.statePropsPrecalculationError=A.value),this.haveStatePropsBeenPrecalculated=!0}this.hasStoreStateChanged=!0,this.setState({storeState:e})}}},s.prototype.getWrappedInstance=function(){return(0,k.default)(w,"To access the wrapped instance, you need to specify { withRef: true } as the fourth argument of the connect() call."),this.refs.wrappedInstance},s.prototype.render=function(){var t=this.haveOwnPropsChanged,n=this.hasStoreStateChanged,r=this.haveStatePropsBeenPrecalculated,i=this.statePropsPrecalculationError,o=this.renderedElement;if(this.haveOwnPropsChanged=!1,this.hasStoreStateChanged=!1,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,i)throw i;var a=!0,s=!0;_&&o&&(a=n||t&&this.doStatePropsDependOnOwnProps,s=t&&this.doDispatchPropsDependOnOwnProps);var u=!1,c=!1;r?u=!0:a&&(u=this.updateStatePropsIfNeeded()),s&&(c=this.updateDispatchPropsIfNeeded());var f=!0;return f=!!(u||c||t)&&this.updateMergedPropsIfNeeded(),!f&&o?o:(w?this.renderedElement=(0,p.createElement)(e,l({},this.mergedProps,{ref:"wrappedInstance"})):this.renderedElement=(0,p.createElement)(e,this.mergedProps),this.renderedElement)},s}(p.Component);return r.displayName=n,r.WrappedComponent=e,r.contextTypes={store:h.default},r.propTypes={store:h.default},(0,x.default)(r,e)}}t.__esModule=!0;var l=Object.assign||function(e){for(var t=1;t1),t}),s(e,c(e),n),u&&(n=i(n,l|p|f));for(var h=t.length;h--;)o(n,t[h]);return n});e.exports=h},function(e,t,n){function r(e,t,n,A,T,O){var D,I=t&k,j=t&S,N=t&E;if(n&&(D=T?n(e,A,T,O):n(e)),void 0!==D)return D;if(!x(e))return e;var F=_(e);if(F){if(D=y(e),!I)return l(e,D)}else{var B=m(e),L=B==M||B==P;if(b(e))return c(e,I);if(B==R||B==C||L&&!T){if(D=j||L?{}:g(e),!I)return j?f(e,u(D,e)):p(e,s(D,e))}else{if(!Z[B])return T?e:{};D=v(e,B,r,I)}}O||(O=new i);var z=O.get(e);if(z)return z;O.set(e,D);var q=N?j?d:h:j?keysIn:w,U=F?void 0:q(e);return o(U||e,function(i,o){U&&(o=i,i=e[o]),a(D,o,r(i,t,n,o,e,O))}),D}var i=n(403),o=n(802),a=n(803),s=n(806),u=n(808),c=n(812),l=n(813),p=n(814),f=n(817),h=n(820),d=n(822),m=n(438),y=n(823),v=n(824),g=n(834),_=n(346),b=n(426),x=n(374),w=n(421),k=1,S=2,E=4,C="[object Arguments]",A="[object Array]",T="[object Boolean]",O="[object Date]",D="[object Error]",M="[object Function]",P="[object GeneratorFunction]",I="[object Map]",j="[object Number]",R="[object Object]",N="[object RegExp]",F="[object Set]",B="[object String]",L="[object Symbol]",z="[object WeakMap]",q="[object ArrayBuffer]",U="[object DataView]",W="[object Float32Array]",K="[object Float64Array]",V="[object Int8Array]",H="[object Int16Array]",J="[object Int32Array]",G="[object Uint8Array]",X="[object Uint8ClampedArray]",Y="[object Uint16Array]",$="[object Uint32Array]",Z={};Z[C]=Z[A]=Z[q]=Z[U]=Z[T]=Z[O]=Z[W]=Z[K]=Z[V]=Z[H]=Z[J]=Z[I]=Z[j]=Z[R]=Z[N]=Z[F]=Z[B]=Z[L]=Z[G]=Z[X]=Z[Y]=Z[$]=!0,Z[D]=Z[M]=Z[z]=!1,e.exports=r},function(e,t){function n(e,t){for(var n=-1,r=null==e?0:e.length;++n0){if(++t>=r)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var r=800,i=16,o=Date.now;e.exports=n},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{fn:o}};var i=n(468),o=r(i)},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(e){for(var t,n=arguments.length,r=Array(n>1?n-1:0),o=1;o=a&&(t=console)[e].apply(t,r)}var n=e.configs,r={debug:0,info:1,log:2,warn:3,error:4},i=function(e){return r[e]||-1},o=n.logLevel,a=i(o);return t.warn=t.bind(null,"warn"),t.error=t.bind(null,"error"),t.info=t.bind(null,"info"),t.debug=t.bind(null,"debug"),{rootInjects:{log:t}}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{fn:{AST:a},components:{JumpToPath:u.default}}};var o=n(852),a=i(o),s=n(882),u=r(s)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){function n(e,t,i){if(!e)return i&&i.start_mark?i.start_mark.line:0;if(t.length&&e.tag===v)for(r=0;r=t.column:t.line===e.start_mark.line?t.column>=e.start_mark.column:t.line===e.end_mark.line?t.column<=e.end_mark.column:e.start_mark.linet.line}var o=0;if(!e||[v,g].indexOf(e.tag)===-1)return i;if(e.tag===v)for(o=0;o0&&(a=this.buffer[u-1],e.call(r,a)<0);)if(u--,this.pointer-u>n/2-1){o=" ... ",u+=5;break}for(c="",i=this.pointer;in/2-1){c=" ... ",i-=5;break}return""+new Array(t).join(" ")+o+this.buffer.slice(u,i)+c+"\n"+new Array(t+this.pointer-u+o.length).join(" ")+"^"},t.prototype.toString=function(){var e,t;return e=this.get_snippet(),t=" on line "+(this.line+1)+", column "+(this.column+1),e?t:t+":\n"+e},t}(),this.YAMLError=function(e){function n(e){this.message=e,n.__super__.constructor.call(this),this.stack=this.toString()+"\n"+(new Error).stack.split("\n").slice(1).join("\n")}return t(n,e),n.prototype.toString=function(){return this.message},n}(Error),this.MarkedYAMLError=function(e){function n(e,t,r,i,o){this.context=e,this.context_mark=t,this.problem=r,this.problem_mark=i,this.note=o,n.__super__.constructor.call(this)}return t(n,e),n.prototype.toString=function(){var e;return e=[],null!=this.context&&e.push(this.context),null==this.context_mark||null!=this.problem&&null!=this.problem_mark&&this.context_mark.line===this.problem_mark.line&&this.context_mark.column===this.problem_mark.column||e.push(this.context_mark.toString()),null!=this.problem&&e.push(this.problem),null!=this.problem_mark&&e.push(this.problem_mark.toString()),null!=this.note&&e.push(this.note),e.join("\n")},n}(this.YAMLError)}).call(this)},function(e,t){(function(){var e,t=function(e,t){function r(){this.constructor=e}for(var i in t)n.call(t,i)&&(e[i]=t[i]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},n={}.hasOwnProperty;e=0,this.Node=function(){function t(t,n,r,i){this.tag=t,this.value=n,this.start_mark=r,this.end_mark=i,this.unique_id="node_"+e++}return t}(),this.ScalarNode=function(e){function n(e,t,r,i,o){this.tag=e,this.value=t,this.start_mark=r,this.end_mark=i,this.style=o,n.__super__.constructor.apply(this,arguments)}return t(n,e),n.prototype.id="scalar",n}(this.Node),this.CollectionNode=function(e){function n(e,t,r,i,o){this.tag=e,this.value=t,this.start_mark=r,this.end_mark=i,this.flow_style=o,n.__super__.constructor.apply(this,arguments)}return t(n,e),n}(this.Node),this.SequenceNode=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return t(n,e),n.prototype.id="sequence",n}(this.CollectionNode),this.MappingNode=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return t(n,e),n.prototype.id="mapping",n}(this.CollectionNode)}).call(this)},function(e,t,n){(function(e){(function(){var r,i,o,a=function(e,t){function n(){this.constructor=e}for(var r in t)s.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},s={}.hasOwnProperty,u=[].indexOf||function(e){for(var t=0,n=this.length;t=0)throw new t.ConstructorError(null,null,"found unconstructable recursive node",e.start_mark);if(this.constructing_nodes.push(e.unique_id),n=null,s=null,e.tag in this.yaml_constructors)n=this.yaml_constructors[e.tag];else{for(a in this.yaml_multi_constructors)if(e.tag.indexOf(0===a)){s=e.tag.slice(a.length),n=this.yaml_multi_constructors[a];break}null==n&&(null in this.yaml_multi_constructors?(s=e.tag,n=this.yaml_multi_constructors[null]):null in this.yaml_constructors?n=this.yaml_constructors[null]:e instanceof i.ScalarNode?n=this.construct_scalar:e instanceof i.SequenceNode?n=this.construct_sequence:e instanceof i.MappingNode&&(n=this.construct_mapping))}return r=n.call(this,null!=s?s:e,e),this.constructed_objects[e.unique_id]=r,this.constructing_nodes.pop(),r},e.prototype.construct_scalar=function(e){if(!(e instanceof i.ScalarNode))throw new t.ConstructorError(null,null,"expected a scalar node but found "+e.id,e.start_mark);return e.value},e.prototype.construct_sequence=function(e){var n,r,o,a,s;if(!(e instanceof i.SequenceNode))throw new t.ConstructorError(null,null,"expected a sequence node but found "+e.id,e.start_mark);for(a=e.value,s=[],r=0,o=a.length;r=0&&(l=l.slice(1)),"0"===l)return 0;if(0===l.indexOf("0b"))return c*parseInt(l.slice(2),2);if(0===l.indexOf("0x"))return c*parseInt(l.slice(2),16);if(0===l.indexOf("0o"))return c*parseInt(l.slice(2),8);if("0"===l[0])return c*parseInt(l,8); +if(u.call(l,":")>=0){for(r=function(){var e,t,n,r;for(n=l.split(/:/g),r=[],e=0,t=n.length;e=0&&(l=l.slice(1)),".inf"===l)return Infinity*c;if(".nan"===l)return NaN;if(u.call(l,":")>=0){for(r=function(){var e,t,n,r;for(n=l.split(/:/g),r=[],e=0,t=n.length;e=n?e:e.length+1===n?""+t+e:""+new Array(n-e.length+1).join(t)+e},this.to_hex=function(e){return"string"==typeof e&&(e=e.charCodeAt(0)),e.toString(16)}}).call(this)}).call(t,function(){return this}())},function(e,t,n){(function(e,r){function i(e,n){var r={seen:[],stylize:a};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),m(n)?r.showHidden=n:n&&t._extend(r,n),x(r.showHidden)&&(r.showHidden=!1),x(r.depth)&&(r.depth=2),x(r.colors)&&(r.colors=!1),x(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=o),u(r,e,r.depth)}function o(e,t){var n=i.styles[t];return n?"["+i.colors[n][0]+"m"+e+"["+i.colors[n][1]+"m":e}function a(e,t){return e}function s(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}function u(e,n,r){if(e.customInspect&&n&&C(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,e);return _(i)||(i=u(e,i,r)),i}var o=c(e,n);if(o)return o;var a=Object.keys(n),m=s(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(n)),E(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return l(n);if(0===a.length){if(C(n)){var y=n.name?": "+n.name:"";return e.stylize("[Function"+y+"]","special")}if(w(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(S(n))return e.stylize(Date.prototype.toString.call(n),"date");if(E(n))return l(n)}var v="",g=!1,b=["{","}"];if(d(n)&&(g=!0,b=["[","]"]),C(n)){var x=n.name?": "+n.name:"";v=" [Function"+x+"]"}if(w(n)&&(v=" "+RegExp.prototype.toString.call(n)),S(n)&&(v=" "+Date.prototype.toUTCString.call(n)),E(n)&&(v=" "+l(n)),0===a.length&&(!g||0==n.length))return b[0]+v+b[1];if(r<0)return w(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special");e.seen.push(n);var k;return k=g?p(e,n,r,m,a):a.map(function(t){return f(e,n,r,m,t,g)}),e.seen.pop(),h(k,v,b)}function c(e,t){if(x(t))return e.stylize("undefined","undefined");if(_(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return g(t)?e.stylize(""+t,"number"):m(t)?e.stylize(""+t,"boolean"):y(t)?e.stylize("null","null"):void 0}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,n,r,i){for(var o=[],a=0,s=t.length;a-1&&(s=o?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n"))):s=e.stylize("[Circular]","special")),x(a)){if(o&&i.match(/^\d+$/))return s;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function h(e,t,n){var r=0,i=e.reduce(function(e,t){return r++,t.indexOf("\n")>=0&&r++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function d(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function y(e){return null===e}function v(e){return null==e}function g(e){return"number"==typeof e}function _(e){return"string"==typeof e}function b(e){return"symbol"==typeof e}function x(e){return void 0===e}function w(e){return k(e)&&"[object RegExp]"===T(e)}function k(e){return"object"==typeof e&&null!==e}function S(e){return k(e)&&"[object Date]"===T(e)}function E(e){return k(e)&&("[object Error]"===T(e)||e instanceof Error)}function C(e){return"function"==typeof e}function A(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function T(e){return Object.prototype.toString.call(e)}function O(e){return e<10?"0"+e.toString(10):e.toString(10)}function D(){var e=new Date,t=[O(e.getHours()),O(e.getMinutes()),O(e.getSeconds())].join(":");return[e.getDate(),R[e.getMonth()],t].join(" ")}function M(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var P=/%[sdj%]/g;t.format=function(e){if(!_(e)){for(var t=[],n=0;n=o)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),s=r[n];n2*this.indent?t.width:80,this.best_line_break="\r"===(n=t.line_break)||"\n"===n||"\r\n"===n?t.line_break:"\n",this.tag_prefixes=null,this.prepared_anchor=null,this.prepared_tag=null,this.analysis=null,this.style=null}var r,a,c;return r="\0 \t\r\n…\u2028\u2029",a={"!":"!","tag:yaml.org,2002:":"!!"},c={"\0":"0","":"a","\b":"b","\t":"t","\n":"n","\v":"v","\f":"f","\r":"r","":"e",'"':'"',"\\":"\\","…":"N"," ":"_","\u2028":"L","\u2029":"P"},n.prototype.dispose=function(){return this.states=[],this.state=null},n.prototype.emit=function(e){var t;for(this.events.push(e),t=[];!this.need_more_events();)this.event=this.events.shift(),this.state(),t.push(this.event=null);return t},n.prototype.need_more_events=function(){var e;return 0===this.events.length||(e=this.events[0],e instanceof i.DocumentStartEvent?this.need_events(1):e instanceof i.SequenceStartEvent?this.need_events(2):e instanceof i.MappingStartEvent&&this.need_events(3))},n.prototype.need_events=function(e){var t,n,r,o,a;for(o=0,a=this.events.slice(1),n=0,r=a.length;nthis.best_width)&&this.write_indent(),this.states.push(this.expect_flow_sequence_item),this.expect_node({sequence:!0}))},n.prototype.expect_flow_sequence_item=function(){return this.event instanceof i.SequenceEndEvent?(this.indent=this.indents.pop(),this.flow_level--,this.canonical&&(this.write_indicator(",",!1),this.write_indent()),this.write_indicator("]",!1),this.state=this.states.pop()):(this.write_indicator(",",!1),(this.canonical||this.column>this.best_width)&&this.write_indent(),this.states.push(this.expect_flow_sequence_item),this.expect_node({sequence:!0}))},n.prototype.expect_flow_mapping=function(){return this.write_indicator("{",!0,{whitespace:!0}),this.flow_level++,this.increase_indent({flow:!0}),this.state=this.expect_first_flow_mapping_key},n.prototype.expect_first_flow_mapping_key=function(){return this.event instanceof i.MappingEndEvent?(this.indent=this.indents.pop(),this.flow_level--,this.write_indicator("}",!1),this.state=this.states.pop()):((this.canonical||this.column>this.best_width)&&this.write_indent(),!this.canonical&&this.check_simple_key()?(this.states.push(this.expect_flow_mapping_simple_value),this.expect_node({mapping:!0,simple_key:!0})):(this.write_indicator("?",!0),this.states.push(this.expect_flow_mapping_value),this.expect_node({mapping:!0})))},n.prototype.expect_flow_mapping_key=function(){return this.event instanceof i.MappingEndEvent?(this.indent=this.indents.pop(),this.flow_level--,this.canonical&&(this.write_indicator(",",!1),this.write_indent()),this.write_indicator("}",!1),this.state=this.states.pop()):(this.write_indicator(",",!1),(this.canonical||this.column>this.best_width)&&this.write_indent(),!this.canonical&&this.check_simple_key()?(this.states.push(this.expect_flow_mapping_simple_value),this.expect_node({mapping:!0,simple_key:!0})):(this.write_indicator("?",!0),this.states.push(this.expect_flow_mapping_value),this.expect_node({mapping:!0})))},n.prototype.expect_flow_mapping_simple_value=function(){return this.write_indicator(":",!1),this.states.push(this.expect_flow_mapping_key),this.expect_node({mapping:!0})},n.prototype.expect_flow_mapping_value=function(){return(this.canonical||this.column>this.best_width)&&this.write_indent(),this.write_indicator(":",!0),this.states.push(this.expect_flow_mapping_key),this.expect_node({mapping:!0})},n.prototype.expect_block_sequence=function(){var e;return e=this.mapping_context&&!this.indentation,this.increase_indent({indentless:e}),this.state=this.expect_first_block_sequence_item},n.prototype.expect_first_block_sequence_item=function(){return this.expect_block_sequence_item(!0)},n.prototype.expect_block_sequence_item=function(e){return null==e&&(e=!1),!e&&this.event instanceof i.SequenceEndEvent?(this.indent=this.indents.pop(),this.state=this.states.pop()):(this.write_indent(),this.write_indicator("-",!0,{indentation:!0}),this.states.push(this.expect_block_sequence_item),this.expect_node({sequence:!0}))},n.prototype.expect_block_mapping=function(){return this.increase_indent(),this.state=this.expect_first_block_mapping_key},n.prototype.expect_first_block_mapping_key=function(){return this.expect_block_mapping_key(!0)},n.prototype.expect_block_mapping_key=function(e){return null==e&&(e=!1),!e&&this.event instanceof i.MappingEndEvent?(this.indent=this.indents.pop(),this.state=this.states.pop()):(this.write_indent(),this.check_simple_key()?(this.states.push(this.expect_block_mapping_simple_value),this.expect_node({mapping:!0,simple_key:!0})):(this.write_indicator("?",!0,{indentation:!0}),this.states.push(this.expect_block_mapping_value),this.expect_node({mapping:!0})))},n.prototype.expect_block_mapping_simple_value=function(){return this.write_indicator(":",!1),this.states.push(this.expect_block_mapping_key),this.expect_node({mapping:!0})},n.prototype.expect_block_mapping_value=function(){return this.write_indent(),this.write_indicator(":",!0,{indentation:!0}),this.states.push(this.expect_block_mapping_key),this.expect_node({mapping:!0})},n.prototype.check_empty_document=function(){var e;return this.event instanceof i.DocumentStartEvent&&0!==this.events.length&&(e=this.events[0],e instanceof i.ScalarEvent&&null==e.anchor&&null==e.tag&&e.implicit&&""===e.value)},n.prototype.check_empty_sequence=function(){return this.event instanceof i.SequenceStartEvent&&this.events[0]instanceof i.SequenceEndEvent},n.prototype.check_empty_mapping=function(){return this.event instanceof i.MappingStartEvent&&this.events[0]instanceof i.MappingEndEvent},n.prototype.check_simple_key=function(){var e;return e=0,this.event instanceof i.NodeEvent&&null!=this.event.anchor&&(null==this.prepared_anchor&&(this.prepared_anchor=this.prepare_anchor(this.event.anchor)),e+=this.prepared_anchor.length),null!=this.event.tag&&(this.event instanceof i.ScalarEvent||this.event instanceof i.CollectionStartEvent)&&(null==this.prepared_tag&&(this.prepared_tag=this.prepare_tag(this.event.tag)),e+=this.prepared_tag.length),this.event instanceof i.ScalarEvent&&(null==this.analysis&&(this.analysis=this.analyze_scalar(this.event.value)),e+=this.analysis.scalar.length),e<128&&(this.event instanceof i.AliasEvent||this.event instanceof i.ScalarEvent&&!this.analysis.empty&&!this.analysis.multiline||this.check_empty_sequence()||this.check_empty_mapping())},n.prototype.process_anchor=function(e){return null==this.event.anchor?void(this.prepared_anchor=null):(null==this.prepared_anchor&&(this.prepared_anchor=this.prepare_anchor(this.event.anchor)),this.prepared_anchor&&this.write_indicator(""+e+this.prepared_anchor,!0),this.prepared_anchor=null)},n.prototype.process_tag=function(){var e;if(e=this.event.tag,this.event instanceof i.ScalarEvent){if(null==this.style&&(this.style=this.choose_scalar_style()),(!this.canonical||null==e)&&(""===this.style&&this.event.implicit[0]||""!==this.style&&this.event.implicit[1]))return void(this.prepared_tag=null);this.event.implicit[0]&&null==e&&(e="!",this.prepared_tag=null)}else if((!this.canonical||null==e)&&this.event.implicit)return void(this.prepared_tag=null);return null==e&&this.error("tag is not specified"),null==this.prepared_tag&&(this.prepared_tag=this.prepare_tag(e)),this.write_indicator(this.prepared_tag,!0),this.prepared_tag=null},n.prototype.process_scalar=function(){var e;switch(null==this.analysis&&(this.analysis=this.analyze_scalar(this.event.value)),null==this.style&&(this.style=this.choose_scalar_style()),e=!this.simple_key_context,this.style){case'"':this.write_double_quoted(this.analysis.scalar,e);break;case"'":this.write_single_quoted(this.analysis.scalar,e);break;case">":this.write_folded(this.analysis.scalar);break;case"|":this.write_literal(this.analysis.scalar);break;default:this.write_plain(this.analysis.scalar,e)}return this.analysis=null,this.style=null},n.prototype.choose_scalar_style=function(){var e;return null==this.analysis&&(this.analysis=this.analyze_scalar(this.event.value)),'"'===this.event.style||this.canonical?'"':this.event.style||!this.event.implicit[0]||this.simple_key_context&&(this.analysis.empty||this.analysis.multiline)||!(this.flow_level&&this.analysis.allow_flow_plain||!this.flow_level&&this.analysis.allow_block_plain)?this.event.style&&(e=this.event.style,u.call("|>",e)>=0)&&!this.flow_level&&!this.simple_key_context&&this.analysis.allow_block?this.event.style:this.event.style&&"'"!==this.event.style||!this.analysis.allow_single_quoted||this.simple_key_context&&this.analysis.multiline?'"':"'":""},n.prototype.prepare_version=function(e){var t,n,r;return t=e[0],n=e[1],r=t+"."+n,1===t?r:this.error("unsupported YAML version",r)},n.prototype.prepare_tag_handle=function(e){var t,n,r,i;for(e||this.error("tag handle must not be empty"),"!"===e[0]&&"!"===e.slice(-1)||this.error("tag handle must start and end with '!':",e),i=e.slice(1,-1),n=0,r=i.length;n=0||this.error("invalid character '"+t+"' in the tag handle:",e);return e},n.prototype.prepare_tag_prefix=function(e){var t,n,r,i;for(e||this.error("tag prefix must not be empty"),n=[],i=0,r=+("!"===e[0]);r=0?r++:(i=0||"!"===t&&"!"!==i?r++:(f"},n.prototype.prepare_anchor=function(e){var t,n,r;for(e||this.error("anchor must not be empty"),n=0,r=e.length;n=0||this.error("invalid character '"+t+"' in the anchor:",e);return e},n.prototype.analyze_scalar=function(t){var n,i,o,a,s,c,l,p,f,h,d,m,y,v,g,_,b,x,w,k,S,E,C,A,T,O;for(t||new e(t,!0,!1,!1,!0,!0,!0,!1),c=!1,f=!1,_=!1,C=!1,O=!1,v=!1,y=!1,T=!1,A=!1,l=!1,E=!1,0!==t.indexOf("---")&&0!==t.indexOf("...")||(c=!0,f=!0),b=!0,h=1===t.length||(k=t[1],u.call("\0 \t\r\n…\u2028\u2029",k)>=0),w=!1,x=!1,m=0,m=d=0,g=t.length;d'\"%@`",p)>=0||"-"===p&&h?(f=!0,c=!0):u.call("?:",p)>=0&&(f=!0,h&&(c=!0)):u.call(",?[]{}",p)>=0?f=!0:":"===p?(f=!0,h&&(c=!0)):"#"===p&&b&&(f=!0,c=!0),u.call("\n…\u2028\u2029",p)>=0&&(_=!0),"\n"===p||" "<=p&&p<="~"||("\ufeff"!==p&&("…"===p||" "<=p&&p<="퟿"||""<=p&&p<="�")?(O=!0,this.allow_unicode||(C=!0)):C=!0)," "===p?(0===m&&(v=!0),m===t.length-1&&(T=!0),x&&(l=!0),x=!1,w=!0):u.call("\n…\u2028\u2029",p)>=0?(0===m&&(y=!0),m===t.length-1&&(A=!0),w&&(E=!0),x=!0,w=!1):(x=!1,w=!1),b=u.call(r,p)>=0,h=m+2>=t.length||(S=t[m+2],u.call(r,S)>=0);return a=!0,i=!0,s=!0,o=!0,n=!0,(v||y||T||A)&&(a=i=!1),T&&(n=!1),l&&(a=i=s=!1),(E||C)&&(a=i=s=n=!1),_&&(a=i=!1),f&&(a=!1),c&&(i=!1),new e(t,!1,_,a,i,s,o,n)},n.prototype.write_stream_start=function(){if(this.encoding&&0===this.encoding.indexOf("utf-16"))return this.stream.write("\ufeff",this.encoding)},n.prototype.write_stream_end=function(){return this.flush_stream()},n.prototype.write_indicator=function(e,t,n){var r;return null==n&&(n={}),r=this.whitespace||!t?e:" "+e,this.whitespace=!!n.whitespace,this.indentation&&(this.indentation=!!n.indentation),this.column+=r.length,this.open_ended=!1,this.stream.write(r,this.encoding)},n.prototype.write_indent=function(){var e,t,n;if(t=null!=(n=this.indent)?n:0,(!this.indentation||this.column>t||this.column===t&&!this.whitespace)&&this.write_line_break(),this.columnthis.best_width&&t&&0!==f&&a!==e.length?this.write_indent():(o=e.slice(f,a),this.column+=o.length,this.stream.write(o,this.encoding)),f=a);else if(r){if(null==i||u.call("\n…\u2028\u2029",i)<0){for("\n"===e[f]&&this.write_line_break(),l=e.slice(f,a),s=0,c=l.length;s=0||"'"===i)&&f=0),a++}return this.write_indicator("'",!1)},n.prototype.write_double_quoted=function(e,t){var n,r,i,a;for(null==t&&(t=!0),this.write_indicator('"',!0),a=i=0;i<=e.length;)n=e[i],(null==n||u.call('"\\…\u2028\u2029\ufeff',n)>=0||!(" "<=n&&n<="~"||this.allow_unicode&&(" "<=n&&n<="퟿"||""<=n&&n<="�")))&&(a=i)&&this.column+(i-a)>this.best_width&&(r=e.slice(a,i)+"\\",a"+a,!0),"+"===a.slice(-1)&&(this.open_ended=!0),this.write_line_break(),c=!0,n=!0,h=!1,d=o=0,f=[];o<=e.length;){if(r=e[o],n){if(null==r||u.call("\n…\u2028\u2029",r)<0){for(c||null==r||" "===r||"\n"!==e[d]||this.write_line_break(),c=" "===r,p=e.slice(d,o),s=0,l=p.length;sthis.best_width?this.write_indent():(i=e.slice(d,o),this.column+=i.length,this.stream.write(i,this.encoding)),d=o):(null==r||u.call(" \n…\u2028\u2029",r)>=0)&&(i=e.slice(d,o),this.column+=i.length,this.stream.write(i,this.encoding),null==r&&this.write_line_break(),d=o);null!=r&&(n=u.call("\n…\u2028\u2029",r)>=0,h=" "===r),f.push(o++)}return f},n.prototype.write_literal=function(e){var t,n,r,i,o,a,s,c,l,p,f;for(a=this.determine_block_hints(e),this.write_indicator("|"+a,!0),"+"===a.slice(-1)&&(this.open_ended=!0),this.write_line_break(),n=!0,f=o=0,p=[];o<=e.length;){if(r=e[o],n){if(null==r||u.call("\n…\u2028\u2029",r)<0){for(l=e.slice(f,o),s=0,c=l.length;s=0)&&(i=e.slice(f,o),this.stream.write(i,this.encoding),null==r&&this.write_line_break(),f=o);null!=r&&(n=u.call("\n…\u2028\u2029",r)>=0),p.push(o++)}return p},n.prototype.write_plain=function(e,t){var n,r,i,o,a,s,c,l,p,f,h;if(null==t&&(t=!0),e){for(this.root_context&&(this.open_ended=!0),this.whitespace||(o=" ",this.column+=o.length,this.stream.write(o,this.encoding)),this.whitespace=!1,this.indentation=!1,f=!1,r=!1,h=a=0,p=[];a<=e.length;){if(i=e[a],f)" "!==i&&(h+1===a&&this.column>this.best_width&&t?(this.write_indent(),this.whitespace=!1,this.indentation=!1):(o=e.slice(h,a),this.column+=o.length,this.stream.write(o,this.encoding)),h=a);else if(r){if(u.call("\n…\u2028\u2029",i)<0){for("\n"===e[h]&&this.write_line_break(),l=e.slice(h,a),s=0,c=l.length;s=0)&&(o=e.slice(h,a),this.column+=o.length,this.stream.write(o,this.encoding),h=a);null!=i&&(f=" "===i,r=u.call("\n…\u2028\u2029",i)>=0),p.push(a++)}return p}},n.prototype.determine_block_hints=function(e){var t,n,r,i,o;return n="",t=e[0],r=e.length-2,o=e[r++],i=e[r++],u.call(" \n…\u2028\u2029",t)>=0&&(n+=this.best_indent),u.call("\n…\u2028\u2029",i)<0?n+="-":(1===e.length||u.call("\n…\u2028\u2029",o)>=0)&&(n+="+"),n},n.prototype.flush_stream=function(){var e;return"function"==typeof(e=this.stream).flush?e.flush():void 0},n.prototype.error=function(e,n){var r,i;throw n&&(n=null!=(r=null!=n&&null!=(i=n.constructor)?i.name:void 0)?r:o.inspect(n)),new t.EmitterError(""+e+(n?" "+n:""))},n}(),e=function(){function e(e,t,n,r,i,o,a,s){this.scalar=e,this.empty=t,this.multiline=n,this.allow_flow_plain=r,this.allow_block_plain=i,this.allow_single_quoted=o,this.allow_double_quoted=a,this.allow_block=s}return e}()}).call(this)},function(e,t,n){(function(){var e,t,r,i,o=function(e,t){function n(){this.constructor=e}for(var r in t)a.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},a={}.hasOwnProperty;t=n(855),r=n(857),i=n(859),e=n(856).YAMLError,this.SerializerError=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t}(e),this.Serializer=function(){function e(e){var t;t=null!=e?e:{},this.encoding=t.encoding,this.explicit_start=t.explicit_start,this.explicit_end=t.explicit_end,this.version=t.version,this.tags=t.tags,this.serialized_nodes={},this.anchors={},this.last_anchor_id=0,this.closed=null}return e.prototype.open=function(){if(null===this.closed)return this.emit(new t.StreamStartEvent(this.encoding)),this.closed=!1;throw this.closed?new SerializerError("serializer is closed"):new SerializerError("serializer is already open")},e.prototype.close=function(){if(null===this.closed)throw new SerializerError("serializer is not opened");if(!this.closed)return this.emit(new t.StreamEndEvent),this.closed=!0},e.prototype.serialize=function(e){if(null===this.closed)throw new SerializerError("serializer is not opened");if(this.closed)throw new SerializerError("serializer is closed");return null!=e&&(this.emit(new t.DocumentStartEvent(void 0,void 0,this.explicit_start,this.version,this.tags)),this.anchor_node(e),this.serialize_node(e),this.emit(new t.DocumentEndEvent(void 0,void 0,this.explicit_end))),this.serialized_nodes={},this.anchors={},this.last_anchor_id=0},e.prototype.anchor_node=function(e){var t,n,i,o,a,s,u,c,l,p,f,h,d,m;if(e.unique_id in this.anchors)return null!=(t=this.anchors)[c=e.unique_id]?t[c]:t[c]=this.generate_anchor(e);if(this.anchors[e.unique_id]=null,e instanceof r.SequenceNode){for(l=e.value,h=[],n=0,s=l.length;nn?p.push([l,s]):i[s]=this.yaml_path_resolvers[l][s]);else for(d=this.yaml_path_resolvers,a=0,c=d.length;a=0)return c[e];if(a.call(c,null)>=0)return c[null]}return e===t.ScalarNode?i:e===t.SequenceNode?o:e===t.MappingNode?n:void 0},e}(),this.Resolver=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return i(t,e),t}(this.BaseResolver),this.Resolver.add_implicit_resolver("tag:yaml.org,2002:bool",/^(?:yes|Yes|YES|true|True|TRUE|on|On|ON|no|No|NO|false|False|FALSE|off|Off|OFF)$/,"yYnNtTfFoO"),this.Resolver.add_implicit_resolver("tag:yaml.org,2002:float",/^(?:[-+]?(?:[0-9][0-9_]*)\.[0-9_]*(?:[eE][-+][0-9]+)?|\.[0-9_]+(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*|[-+]?\.(?:inf|Inf|INF)|\.(?:nan|NaN|NAN))$/,"-+0123456789."),this.Resolver.add_implicit_resolver("tag:yaml.org,2002:int",/^(?:[-+]?0b[01_]+|[-+]?0[0-7_]+|[-+]?(?:0|[1-9][0-9_]*)|[-+]?0x[0-9a-fA-F_]+|[-+]?0o[0-7_]+|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)$/,"-+0123456789"),this.Resolver.add_implicit_resolver("tag:yaml.org,2002:merge",/^(?:<<)$/,"<"),this.Resolver.add_implicit_resolver("tag:yaml.org,2002:null",/^(?:~|null|Null|NULL|)$/,["~","n","N",""]),this.Resolver.add_implicit_resolver("tag:yaml.org,2002:timestamp",/^(?:[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]|[0-9][0-9][0-9][0-9]-[0-9][0-9]?-[0-9][0-9]?(?:[Tt]|[\x20\t]+)[0-9][0-9]?:[0-9][0-9]:[0-9][0-9](?:\.[0-9]*)?(?:[\x20\t]*(?:Z|[-+][0-9][0-9]?(?::[0-9][0-9])?))?)$/,"0123456789"),this.Resolver.add_implicit_resolver("tag:yaml.org,2002:value",/^(?:=)$/,"="),this.Resolver.add_implicit_resolver("tag:yaml.org,2002:yaml",/^(?:!|&|\*)$/,"!&*")}).call(this)},function(e,t,n){(function(){var e,t,r,i,o,a,s,u=[].slice;s=n(859),i=n(869),a=n(870),r=n(872),e=n(854),o=n(867),t=n(858),this.make_loader=function(n,c,l,p,f,h){var d,m;return null==n&&(n=i.Reader),null==c&&(c=a.Scanner),null==l&&(l=r.Parser),null==p&&(p=e.Composer),null==f&&(f=o.Resolver),null==h&&(h=t.Constructor),m=[n,c,l,p,f,h],d=function(){function e(e){var n,r,i;for(m[0].call(this,e),i=m.slice(1),n=0,r=i.length;n=0||"\r"===t&&"\n"!==this.string[this.index]?(this.line++,this.column=0):this.column++,n.push(e--);return n},n.prototype.get_mark=function(){return new e(this.line,this.column,this.string,this.index)},n.prototype.check_printable=function(){var e,n,i;if(n=r.exec(this.string))throw e=n[0],i=this.string.length-this.index+n.index,new t.ReaderError(i,e,"special characters are not allowed")},n}()}).call(this)},function(e,t,n){(function(){var e,r,i,o,a=function(e,t){function n(){this.constructor=e}for(var r in t)s.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},s={}.hasOwnProperty,u=[].slice,c=[].indexOf||function(e){for(var t=0,n=this.length;t"===e&&0===this.flow_level)return this.fetch_folded();if("'"===e)return this.fetch_single();if('"'===e)return this.fetch_double();if(this.check_plain())return this.fetch_plain();throw new t.ScannerError("while scanning for the next token",null,"found character "+e+" that cannot start any token",this.get_mark())},e.prototype.next_possible_simple_key=function(){var e,t,n,r;n=null,r=this.possible_simple_keys;for(t in r)s.call(r,t)&&(e=r[t],(null===n||e.token_numbere;)t=this.get_mark(),this.indent=this.indents.pop(),n.push(this.tokens.push(new i.BlockEndToken(t,t)));return n}},e.prototype.add_indent=function(e){return e>this.indent&&(this.indents.push(this.indent),this.indent=e,!0)},e.prototype.fetch_stream_start=function(){var e;return e=this.get_mark(),this.tokens.push(new i.StreamStartToken(e,e,this.encoding))},e.prototype.fetch_stream_end=function(){var e;return this.unwind_indent(-1),this.remove_possible_simple_key(),this.allow_possible_simple_key=!1,this.possible_simple_keys={},e=this.get_mark(),this.tokens.push(new i.StreamEndToken(e,e)),this.done=!0},e.prototype.fetch_directive=function(){return this.unwind_indent(-1),this.remove_possible_simple_key(),this.allow_simple_key=!1,this.tokens.push(this.scan_directive())},e.prototype.fetch_document_start=function(){return this.fetch_document_indicator(i.DocumentStartToken)},e.prototype.fetch_document_end=function(){return this.fetch_document_indicator(i.DocumentEndToken)},e.prototype.fetch_document_indicator=function(e){var t;return this.unwind_indent(-1),this.remove_possible_simple_key(),this.allow_simple_key=!1,t=this.get_mark(),this.forward(3),this.tokens.push(new e(t,this.get_mark()))},e.prototype.fetch_flow_sequence_start=function(){return this.fetch_flow_collection_start(i.FlowSequenceStartToken)},e.prototype.fetch_flow_mapping_start=function(){return this.fetch_flow_collection_start(i.FlowMappingStartToken)},e.prototype.fetch_flow_collection_start=function(e){var t;return this.save_possible_simple_key(),this.flow_level++,this.allow_simple_key=!0,t=this.get_mark(),this.forward(),this.tokens.push(new e(t,this.get_mark()))},e.prototype.fetch_flow_sequence_end=function(){return this.fetch_flow_collection_end(i.FlowSequenceEndToken)},e.prototype.fetch_flow_mapping_end=function(){return this.fetch_flow_collection_end(i.FlowMappingEndToken)},e.prototype.fetch_flow_collection_end=function(e){var t;return this.remove_possible_simple_key(),this.flow_level--,this.allow_simple_key=!1,t=this.get_mark(),this.forward(),this.tokens.push(new e(t,this.get_mark()))},e.prototype.fetch_flow_entry=function(){var e;return this.allow_simple_key=!0,this.remove_possible_simple_key(),e=this.get_mark(),this.forward(),this.tokens.push(new i.FlowEntryToken(e,this.get_mark()))},e.prototype.fetch_block_entry=function(){var e,n;if(0===this.flow_level){if(!this.allow_simple_key)throw new t.ScannerError(null,null,"sequence entries are not allowed here",this.get_mark());this.add_indent(this.column)&&(e=this.get_mark(),this.tokens.push(new i.BlockSequenceStartToken(e,e)))}return this.allow_simple_key=!0,this.remove_possible_simple_key(),n=this.get_mark(),this.forward(),this.tokens.push(new i.BlockEntryToken(n,this.get_mark()))},e.prototype.fetch_key=function(){var e,n;if(0===this.flow_level){if(!this.allow_simple_key)throw new t.ScannerError(null,null,"mapping keys are not allowed here",this.get_mark());this.add_indent(this.column)&&(e=this.get_mark(),this.tokens.push(new i.BlockMappingStartToken(e,e)))}return this.allow_simple_key=!this.flow_level,this.remove_possible_simple_key(),n=this.get_mark(),this.forward(),this.tokens.push(new i.KeyToken(n,this.get_mark()))},e.prototype.fetch_value=function(){var e,n,r;if(e=this.possible_simple_keys[this.flow_level])delete this.possible_simple_keys[this.flow_level],this.tokens.splice(e.token_number-this.tokens_taken,0,new i.KeyToken(e.mark,e.mark)),0===this.flow_level&&this.add_indent(e.column)&&this.tokens.splice(e.token_number-this.tokens_taken,0,new i.BlockMappingStartToken(e.mark,e.mark)),this.allow_simple_key=!1;else{if(0===this.flow_level){if(!this.allow_simple_key)throw new t.ScannerError(null,null,"mapping values are not allowed here",this.get_mark());this.add_indent(this.column)&&(n=this.get_mark(),this.tokens.push(new i.BlockMappingStartToken(n,n)))}this.allow_simple_key=!this.flow_level,this.remove_possible_simple_key()}return r=this.get_mark(),this.forward(),this.tokens.push(new i.ValueToken(r,this.get_mark()))},e.prototype.fetch_alias=function(){return this.save_possible_simple_key(),this.allow_simple_key=!1,this.tokens.push(this.scan_anchor(i.AliasToken))},e.prototype.fetch_anchor=function(){return this.save_possible_simple_key(),this.allow_simple_key=!1,this.tokens.push(this.scan_anchor(i.AnchorToken))},e.prototype.fetch_tag=function(){return this.save_possible_simple_key(),this.allow_simple_key=!1,this.tokens.push(this.scan_tag())},e.prototype.fetch_literal=function(){return this.fetch_block_scalar("|")},e.prototype.fetch_folded=function(){return this.fetch_block_scalar(">")},e.prototype.fetch_block_scalar=function(e){return this.allow_simple_key=!0,this.remove_possible_simple_key(),this.tokens.push(this.scan_block_scalar(e))},e.prototype.fetch_single=function(){return this.fetch_flow_scalar("'")},e.prototype.fetch_double=function(){return this.fetch_flow_scalar('"')},e.prototype.fetch_flow_scalar=function(e){return this.save_possible_simple_key(),this.allow_simple_key=!1,this.tokens.push(this.scan_flow_scalar(e))},e.prototype.fetch_plain=function(){return this.save_possible_simple_key(),this.allow_simple_key=!1,this.tokens.push(this.scan_plain())},e.prototype.check_directive=function(){return 0===this.column},e.prototype.check_document_start=function(){var e;return 0===this.column&&"---"===this.prefix(3)&&(e=this.peek(3),c.call(n+l+"\0",e)>=0)},e.prototype.check_document_end=function(){var e;return 0===this.column&&"..."===this.prefix(3)&&(e=this.peek(3),c.call(n+l+"\0",e)>=0)},e.prototype.check_block_entry=function(){var e;return e=this.peek(1),c.call(n+l+"\0",e)>=0},e.prototype.check_key=function(){var e;return 0!==this.flow_level||(e=this.peek(1),c.call(n+l+"\0",e)>=0)},e.prototype.check_value=function(){var e;return 0!==this.flow_level||(e=this.peek(1),c.call(n+l+"\0",e)>=0)},e.prototype.check_plain=function(){var e,t;return e=this.peek(),c.call(n+l+"\0-?:,[]{}#&*!|>'\"%@`",e)<0||(t=this.peek(1),c.call(n+l+"\0",t)<0&&("-"===e||0===this.flow_level&&c.call("?:",e)>=0))},e.prototype.scan_to_next_token=function(){var e,t,r;for(0===this.index&&"\ufeff"===this.peek()&&this.forward(),e=!1,r=[];!e;){for(;" "===this.peek();)this.forward();if("#"===this.peek())for(;t=this.peek(),c.call(n+"\0",t)<0;)this.forward();this.scan_line_break()?0===this.flow_level?r.push(this.allow_simple_key=!0):r.push(void 0):r.push(e=!0)}return r},e.prototype.scan_directive=function(){var e,t,r,o,a;if(o=this.get_mark(),this.forward(),t=this.scan_directive_name(o),a=null,"YAML"===t)a=this.scan_yaml_directive_value(o),e=this.get_mark();else if("TAG"===t)a=this.scan_tag_directive_value(o),e=this.get_mark();else for(e=this.get_mark();r=this.peek(),c.call(n+"\0",r)<0;)this.forward();return this.scan_directive_ignored_line(o),new i.DirectiveToken(t,a,o,e)},e.prototype.scan_directive_name=function(e){var r,i,o;for(i=0,r=this.peek(i);"0"<=r&&r<="9"||"A"<=r&&r<="Z"||"a"<=r&&r<="z"||c.call("-_",r)>=0;)i++,r=this.peek(i);if(0===i)throw new t.ScannerError("while scanning a directive",e,"expected alphanumeric or numeric character but found "+r,this.get_mark());if(o=this.prefix(i),this.forward(i),r=this.peek(),c.call(n+"\0 ",r)<0)throw new t.ScannerError("while scanning a directive",e,"expected alphanumeric or numeric character but found "+r,this.get_mark());return o},e.prototype.scan_yaml_directive_value=function(e){for(var r,i,o;" "===this.peek();)this.forward();if(r=this.scan_yaml_directive_number(e),"."!==this.peek())throw new t.ScannerError("while scanning a directive",e,"expected a digit or '.' but found "+this.peek(),this.get_mark());if(this.forward(),i=this.scan_yaml_directive_number(e),o=this.peek(),c.call(n+"\0 ",o)<0)throw new t.ScannerError("while scanning a directive",e,"expected a digit or ' ' but found "+this.peek(),this.get_mark());return[r,i]},e.prototype.scan_yaml_directive_number=function(e){var n,r,i,o;if(n=this.peek(),!("0"<=n&&n<="9"))throw new t.ScannerError("while scanning a directive",e,"expected a digit but found "+n,this.get_mark());for(r=0;"0"<=(i=this.peek(r))&&i<="9";)r++;return o=parseInt(this.prefix(r)),this.forward(r),o},e.prototype.scan_tag_directive_value=function(e){for(var t,n;" "===this.peek();)this.forward();for(t=this.scan_tag_directive_handle(e);" "===this.peek();)this.forward();return n=this.scan_tag_directive_prefix(e),[t,n]},e.prototype.scan_tag_directive_handle=function(e){var n,r;if(r=this.scan_tag_handle("directive",e),n=this.peek()," "!==n)throw new t.ScannerError("while scanning a directive",e,"expected ' ' but found "+n,this.get_mark());return r},e.prototype.scan_tag_directive_prefix=function(e){var r,i;if(i=this.scan_tag_uri("directive",e), +r=this.peek(),c.call(n+"\0 ",r)<0)throw new t.ScannerError("while scanning a directive",e,"expected ' ' but found "+r,this.get_mark());return i},e.prototype.scan_directive_ignored_line=function(e){for(var r,i;" "===this.peek();)this.forward();if("#"===this.peek())for(;i=this.peek(),c.call(n+"\0",i)<0;)this.forward();if(r=this.peek(),c.call(n+"\0",r)<0)throw new t.ScannerError("while scanning a directive",e,"expected a comment or a line break but found "+r,this.get_mark());return this.scan_line_break()},e.prototype.scan_anchor=function(e){var r,i,o,a,s,u;for(s=this.get_mark(),i=this.peek(),a="*"===i?"alias":"anchor",this.forward(),o=0,r=this.peek(o);"0"<=r&&r<="9"||"A"<=r&&r<="Z"||"a"<=r&&r<="z"||c.call("-_",r)>=0;)o++,r=this.peek(o);if(0===o)throw new t.ScannerError("while scanning an "+a,s,"expected alphabetic or numeric character but found '"+r+"'",this.get_mark());if(u=this.prefix(o),this.forward(o),r=this.peek(),c.call(n+l+"\0?:,]}%@`",r)<0)throw new t.ScannerError("while scanning an "+a,s,"expected alphabetic or numeric character but found '"+r+"'",this.get_mark());return new e(u,s,this.get_mark())},e.prototype.scan_tag=function(){var e,r,o,a,s,u;if(a=this.get_mark(),e=this.peek(1),"<"===e){if(r=null,this.forward(2),s=this.scan_tag_uri("tag",a),">"!==this.peek())throw new t.ScannerError("while parsing a tag",a,"expected '>' but found "+this.peek(),this.get_mark());this.forward()}else if(c.call(n+l+"\0",e)>=0)r=null,s="!",this.forward();else{for(o=1,u=!1;c.call(n+"\0 ",e)<0;){if("!"===e){u=!0;break}o++,e=this.peek(o)}u?r=this.scan_tag_handle("tag",a):(r="!",this.forward()),s=this.scan_tag_uri("tag",a)}if(e=this.peek(),c.call(n+"\0 ",e)<0)throw new t.ScannerError("while scanning a tag",a,"expected ' ' but found "+e,this.get_mark());return new i.TagToken([r,s],a,this.get_mark())},e.prototype.scan_block_scalar=function(e){var t,r,a,s,u,l,p,f,h,d,m,y,v,g,_,b,x,w,k,S;for(u=">"===e,a=[],S=this.get_mark(),this.forward(),v=this.scan_block_scalar_indicators(S),r=v[0],l=v[1],this.scan_block_scalar_ignored_line(S),y=this.indent+1,y<1&&(y=1),null==l?(g=this.scan_block_scalar_indentation(),t=g[0],m=g[1],s=g[2],p=Math.max(y,m)):(p=y+l-1,_=this.scan_block_scalar_breaks(p),t=_[0],s=_[1]),d="";this.column===p&&"\0"!==this.peek();){for(a=a.concat(t),b=this.peek(),f=c.call(" \t",b)<0,h=0;x=this.peek(h),c.call(n+"\0",x)<0;)h++;if(a.push(this.prefix(h)),this.forward(h),d=this.scan_line_break(),w=this.scan_block_scalar_breaks(p),t=w[0],s=w[1],this.column!==p||"\0"===this.peek())break;u&&"\n"===d&&f&&(k=this.peek(),c.call(" \t",k)<0)?o.is_empty(t)&&a.push(" "):a.push(d)}return r!==!1&&a.push(d),r===!0&&(a=a.concat(t)),new i.ScalarToken(a.join(""),!1,S,s,e)},e.prototype.scan_block_scalar_indicators=function(e){var r,i,o;if(i=null,o=null,r=this.peek(),c.call("+-",r)>=0){if(i="+"===r,this.forward(),r=this.peek(),c.call(a,r)>=0){if(o=parseInt(r),0===o)throw new t.ScannerError("while scanning a block scalar",e,"expected indentation indicator in the range 1-9 but found 0",this.get_mark());this.forward()}}else if(c.call(a,r)>=0){if(o=parseInt(r),0===o)throw new t.ScannerError("while scanning a block scalar",e,"expected indentation indicator in the range 1-9 but found 0",this.get_mark());this.forward(),r=this.peek(),c.call("+-",r)>=0&&(i="+"===r,this.forward())}if(r=this.peek(),c.call(n+"\0 ",r)<0)throw new t.ScannerError("while scanning a block scalar",e,"expected chomping or indentation indicators, but found "+r,this.get_mark());return[i,o]},e.prototype.scan_block_scalar_ignored_line=function(e){for(var r,i;" "===this.peek();)this.forward();if("#"===this.peek())for(;i=this.peek(),c.call(n+"\0",i)<0;)this.forward();if(r=this.peek(),c.call(n+"\0",r)<0)throw new t.ScannerError("while scanning a block scalar",e,"expected a comment or a line break but found "+r,this.get_mark());return this.scan_line_break()},e.prototype.scan_block_scalar_indentation=function(){var e,t,r,i;for(e=[],r=0,t=this.get_mark();i=this.peek(),c.call(n+" ",i)>=0;)" "!==this.peek()?(e.push(this.scan_line_break()),t=this.get_mark()):(this.forward(),this.column>r&&(r=this.column));return[e,r,t]},e.prototype.scan_block_scalar_breaks=function(e){var t,r,i;for(t=[],r=this.get_mark();this.column=0;)for(t.push(this.scan_line_break()),r=this.get_mark();this.column=0)o.push(i),this.forward();else{if(!e||"\\"!==i)return o;if(this.forward(),i=this.peek(),i in f)o.push(f[i]),this.forward();else if(i in p){for(d=p[i],this.forward(),h=u=0,y=d;0<=y?uy;h=0<=y?++u:--u)if(v=this.peek(h),c.call(a+"ABCDEFabcdef",v)<0)throw new t.ScannerError("while scanning a double-quoted scalar",r,"expected escape sequence of "+d+" hexadecimal numbers, but found "+this.peek(h),this.get_mark());s=parseInt(this.prefix(d),16),o.push(String.fromCharCode(s)),this.forward(d)}else{if(!(c.call(n,i)>=0))throw new t.ScannerError("while scanning a double-quoted scalar",r,"found unknown escape character "+i,this.get_mark());this.scan_line_break(),o=o.concat(this.scan_flow_scalar_breaks(e,r))}}else o.push("'"),this.forward(2)}},e.prototype.scan_flow_scalar_spaces=function(e,r){var i,o,a,s,u,p,f;for(a=[],s=0;p=this.peek(s),c.call(l,p)>=0;)s++;if(f=this.prefix(s),this.forward(s),o=this.peek(),"\0"===o)throw new t.ScannerError("while scanning a quoted scalar",r,"found unexpected end of stream",this.get_mark());return c.call(n,o)>=0?(u=this.scan_line_break(),i=this.scan_flow_scalar_breaks(e,r),"\n"!==u?a.push(u):0===i.length&&a.push(" "),a=a.concat(i)):a.push(f),a},e.prototype.scan_flow_scalar_breaks=function(e,r){var i,o,a,s,u;for(i=[];;){if(o=this.prefix(3),"---"===o||"..."===o&&(a=this.peek(3),c.call(n+l+"\0",a)>=0))throw new t.ScannerError("while scanning a quoted scalar",r,"found unexpected document separator",this.get_mark());for(;s=this.peek(),c.call(l,s)>=0;)this.forward();if(u=this.peek(),!(c.call(n,u)>=0))return i;i.push(this.scan_line_break())}},e.prototype.scan_plain=function(){var e,r,o,a,s,u,p,f,h;for(r=[],h=o=this.get_mark(),a=this.indent+1,f=[];;){if(s=0,"#"===this.peek())break;for(;;){if(e=this.peek(s),c.call(n+l+"\0",e)>=0||0===this.flow_level&&":"===e&&(u=this.peek(s+1),c.call(n+l+"\0",u)>=0)||0!==this.flow_level&&c.call(",:?[]{}",e)>=0)break;s++}if(0!==this.flow_level&&":"===e&&(p=this.peek(s+1),c.call(n+l+"\0,[]{}",p)<0))throw this.forward(s),new t.ScannerError("while scanning a plain scalar",h,"found unexpected ':'",this.get_mark(),"Please check http://pyyaml.org/wiki/YAMLColonInFlowContext");if(0===s)break;if(this.allow_simple_key=!1,r=r.concat(f),r.push(this.prefix(s)),this.forward(s),o=this.get_mark(),f=this.scan_plain_spaces(a,h),null==f||0===f.length||"#"===this.peek()||0===this.flow_level&&this.column=0;)a++;if(m=this.prefix(a),this.forward(a),i=this.peek(),c.call(n,i)>=0){if(s=this.scan_line_break(),this.allow_simple_key=!0,u=this.prefix(3),"---"===u||"..."===u&&(f=this.peek(3),c.call(n+l+"\0",f)>=0))return;for(r=[];d=this.peek(),c.call(n+" ",d)>=0;)if(" "===this.peek())this.forward();else if(r.push(this.scan_line_break()),u=this.prefix(3),"---"===u||"..."===u&&(h=this.peek(3),c.call(n+l+"\0",h)>=0))return;"\n"!==s?o.push(s):0===r.length&&o.push(" "),o=o.concat(r)}else m&&o.push(m);return o},e.prototype.scan_tag_handle=function(e,n){var r,i,o;if(r=this.peek(),"!"!==r)throw new t.ScannerError("while scanning a "+e,n,"expected '!' but found "+r,this.get_mark());if(i=1,r=this.peek(i)," "!==r){for(;"0"<=r&&r<="9"||"A"<=r&&r<="Z"||"a"<=r&&r<="z"||c.call("-_",r)>=0;)i++,r=this.peek(i);if("!"!==r)throw this.forward(i),new t.ScannerError("while scanning a "+e,n,"expected '!' but found "+r,this.get_mark());i++}return o=this.prefix(i),this.forward(i),o},e.prototype.scan_tag_uri=function(e,n){var r,i,o;for(i=[],o=0,r=this.peek(o);"0"<=r&&r<="9"||"A"<=r&&r<="Z"||"a"<=r&&r<="z"||c.call("-;/?:@&=+$,_.!~*'()[]%",r)>=0;)"%"===r?(i.push(this.prefix(o)),this.forward(o),o=0,i.push(this.scan_uri_escapes(e,n))):o++,r=this.peek(o);if(0!==o&&(i.push(this.prefix(o)),this.forward(o),o=0),0===i.length)throw new t.ScannerError("while parsing a "+e,n,"expected URI but found "+r,this.get_mark());return i.join("")},e.prototype.scan_uri_escapes=function(e,n){var r,i,o,a;for(r=[],a=this.get_mark();"%"===this.peek();){for(this.forward(),o=i=0;i<=2;o=++i)throw new t.ScannerError("while scanning a "+e,n,"expected URI escape sequence of 2 hexadecimal numbers but found "+this.peek(o),this.get_mark());r.push(String.fromCharCode(parseInt(this.prefix(2),16))),this.forward(2)}return r.join("")},e.prototype.scan_line_break=function(){var e;return e=this.peek(),c.call("\r\n…",e)>=0?("\r\n"===this.prefix(2)?this.forward(2):this.forward(),"\n"):c.call("\u2028\u2029",e)>=0?(this.forward(),e):""},e}()}).call(this)},function(e,t){(function(){var e=function(e,n){function r(){this.constructor=e}for(var i in n)t.call(n,i)&&(e[i]=n[i]);return r.prototype=n.prototype,e.prototype=new r,e.__super__=n.prototype,e},t={}.hasOwnProperty;this.Token=function(){function e(e,t){this.start_mark=e,this.end_mark=t}return e}(),this.DirectiveToken=function(t){function n(e,t,n,r){this.name=e,this.value=t,this.start_mark=n,this.end_mark=r}return e(n,t),n.prototype.id="",n}(this.Token),this.DocumentStartToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id="",n}(this.Token),this.DocumentEndToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id="",n}(this.Token),this.StreamStartToken=function(t){function n(e,t,n){this.start_mark=e,this.end_mark=t,this.encoding=n}return e(n,t),n.prototype.id="",n}(this.Token),this.StreamEndToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id="",n}(this.Token),this.BlockSequenceStartToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id="",n}(this.Token),this.BlockMappingStartToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id="",n}(this.Token),this.BlockEndToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id="",n}(this.Token),this.FlowSequenceStartToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id="[",n}(this.Token),this.FlowMappingStartToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id="{",n}(this.Token),this.FlowSequenceEndToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id="]",n}(this.Token),this.FlowMappingEndToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id="}",n}(this.Token),this.KeyToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id="?",n}(this.Token),this.ValueToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id=":",n}(this.Token),this.BlockEntryToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id="-",n}(this.Token),this.FlowEntryToken=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return e(n,t),n.prototype.id=",",n}(this.Token),this.AliasToken=function(t){function n(e,t,n){this.value=e,this.start_mark=t,this.end_mark=n}return e(n,t),n.prototype.id="",n}(this.Token),this.AnchorToken=function(t){function n(e,t,n){this.value=e,this.start_mark=t,this.end_mark=n}return e(n,t),n.prototype.id="",n}(this.Token),this.TagToken=function(t){function n(e,t,n){this.value=e,this.start_mark=t,this.end_mark=n}return e(n,t),n.prototype.id="",n}(this.Token),this.ScalarToken=function(t){function n(e,t,n,r,i){this.value=e,this.plain=t,this.start_mark=n,this.end_mark=r,this.style=i}return e(n,t),n.prototype.id="",n}(this.Token)}).call(this)},function(e,t,n){(function(){var e,r,i,o=function(e,t){function n(){this.constructor=e}for(var r in t)a.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},a={}.hasOwnProperty,s=[].slice;r=n(855),e=n(856).MarkedYAMLError,i=n(871),this.ParserError=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return o(t,e),t}(e),this.Parser=function(){function e(){this.current_event=null,this.yaml_version=null,this.tag_handles={},this.states=[],this.marks=[],this.state="parse_stream_start"}var n;return n={"!":"!","!!":"tag:yaml.org,2002:"},e.prototype.dispose=function(){return this.states=[],this.state=null},e.prototype.check_event=function(){var e,t,n,r;if(t=1<=arguments.length?s.call(arguments,0):[],null===this.current_event&&null!=this.state&&(this.current_event=this[this.state]()),null!==this.current_event){if(0===t.length)return!0;for(n=0,r=t.length;n', but found "+this.peek_token().id,this.peek_token().start_mark);u=this.get_token(),e=u.end_mark,n=new r.DocumentStartEvent(a,e,!0,c,s),this.states.push("parse_document_end"),this.state="parse_document_content"}return n},e.prototype.parse_document_end=function(){var e,t,n,o,a;return a=this.peek_token(),o=e=a.start_mark,n=!1,this.check_token(i.DocumentEndToken)&&(a=this.get_token(),e=a.end_mark,n=!0),t=new r.DocumentEndEvent(o,e,n),this.state="parse_document_start",t},e.prototype.parse_document_content=function(){var e;return this.check_token(i.DirectiveToken,i.DocumentStartToken,i.DocumentEndToken,i.StreamEndToken)?(e=this.process_empty_scalar(this.peek_token().start_mark),this.state=this.states.pop(),e):this.parse_block_node()},e.prototype.process_directives=function(){var e,r,o,s,u,c,l,p,f,h;for(this.yaml_version=null,this.tag_handles={};this.check_token(i.DirectiveToken);)if(f=this.get_token(),"YAML"===f.name){if(null!==this.yaml_version)throw new t.ParserError(null,null,"found duplicate YAML directive",f.start_mark);if(u=f.value,r=u[0],o=u[1],1!==r)throw new t.ParserError(null,null,"found incompatible YAML document (version 1.* is required)",f.start_mark);this.yaml_version=f.value}else if("TAG"===f.name){if(c=f.value,e=c[0],s=c[1],e in this.tag_handles)throw new t.ParserError(null,null,"duplicate tag handle "+e,f.start_mark);this.tag_handles[e]=s}p=null,l=this.tag_handles;for(e in l)a.call(l,e)&&(s=l[e],null==p&&(p={}),p[e]=s);h=[this.yaml_version,p];for(e in n)a.call(n,e)&&(s=n[e],s in this.tag_handles||(this.tag_handles[e]=s));return h},e.prototype.parse_block_node=function(){return this.parse_node(!0)},e.prototype.parse_flow_node=function(){return this.parse_node()},e.prototype.parse_block_node_or_indentless_sequence=function(){return this.parse_node(!0,!0)},e.prototype.parse_node=function(e,n){var o,a,s,u,c,l,p,f,h,d,m;if(null==e&&(e=!1),null==n&&(n=!1),this.check_token(i.AliasToken))m=this.get_token(),s=new r.AliasEvent(m.value,m.start_mark,m.end_mark),this.state=this.states.pop();else{if(o=null,h=null,p=a=d=null,this.check_token(i.AnchorToken)?(m=this.get_token(),p=m.start_mark,a=m.end_mark,o=m.value,this.check_token(i.TagToken)&&(m=this.get_token(),d=m.start_mark,a=m.end_mark,h=m.value)):this.check_token(i.TagToken)&&(m=this.get_token(),p=d=m.start_mark,a=m.end_mark,h=m.value,this.check_token(i.AnchorToken)&&(m=this.get_token(),a=m.end_mark,o=m.value)),null!==h)if(u=h[0],f=h[1],null!==u){if(!(u in this.tag_handles))throw new t.ParserError("while parsing a node",p,"found undefined tag handle "+u,d);h=this.tag_handles[u]+f}else h=f;if(null===p&&(p=a=this.peek_token().start_mark),s=null,c=null===h||"!"===h,n&&this.check_token(i.BlockEntryToken))a=this.peek_token().end_mark,s=new r.SequenceStartEvent(o,h,c,p,a),this.state="parse_indentless_sequence_entry";else if(this.check_token(i.ScalarToken))m=this.get_token(),a=m.end_mark,c=m.plain&&null===h||"!"===h?[!0,!1]:null===h?[!1,!0]:[!1,!1],s=new r.ScalarEvent(o,h,c,m.value,p,a,m.style),this.state=this.states.pop();else if(this.check_token(i.FlowSequenceStartToken))a=this.peek_token().end_mark,s=new r.SequenceStartEvent(o,h,c,p,a,!0),this.state="parse_flow_sequence_first_entry";else if(this.check_token(i.FlowMappingStartToken))a=this.peek_token().end_mark,s=new r.MappingStartEvent(o,h,c,p,a,!0),this.state="parse_flow_mapping_first_key";else if(e&&this.check_token(i.BlockSequenceStartToken))a=this.peek_token().end_mark,s=new r.SequenceStartEvent(o,h,c,p,a,!1),this.state="parse_block_sequence_first_entry";else if(e&&this.check_token(i.BlockMappingStartToken))a=this.peek_token().end_mark,s=new r.MappingStartEvent(o,h,c,p,a,!1),this.state="parse_block_mapping_first_key";else{if(null===o&&null===h)throw l=e?"block":"flow",m=this.peek_token(),new t.ParserError("while parsing a "+l+" node",p,"expected the node content, but found "+m.id,m.start_mark);s=new r.ScalarEvent(o,h,[c,!1],"",p,a),this.state=this.states.pop()}}return s},e.prototype.parse_block_sequence_first_entry=function(){var e;return e=this.get_token(),this.marks.push(e.start_mark),this.parse_block_sequence_entry()},e.prototype.parse_block_sequence_entry=function(){var e,n;if(this.check_token(i.BlockEntryToken))return n=this.get_token(),this.check_token(i.BlockEntryToken,i.BlockEndToken)?(this.state="parse_block_sequence_entry",this.process_empty_scalar(n.end_mark)):(this.states.push("parse_block_sequence_entry"),this.parse_block_node());if(!this.check_token(i.BlockEndToken))throw n=this.peek_token(),new t.ParserError("while parsing a block collection",this.marks.slice(-1)[0],"expected , but found "+n.id,n.start_mark);return n=this.get_token(),e=new r.SequenceEndEvent(n.start_mark,n.end_mark),this.state=this.states.pop(),this.marks.pop(),e},e.prototype.parse_indentless_sequence_entry=function(){var e,t;return this.check_token(i.BlockEntryToken)?(t=this.get_token(),this.check_token(i.BlockEntryToken,i.KeyToken,i.ValueToken,i.BlockEndToken)?(this.state="parse_indentless_sequence_entry",this.process_empty_scalar(t.end_mark)):(this.states.push("parse_indentless_sequence_entry"),this.parse_block_node())):(t=this.peek_token(),e=new r.SequenceEndEvent(t.start_mark,t.start_mark),this.state=this.states.pop(),e)},e.prototype.parse_block_mapping_first_key=function(){var e;return e=this.get_token(),this.marks.push(e.start_mark),this.parse_block_mapping_key()},e.prototype.parse_block_mapping_key=function(){var e,n;if(this.check_token(i.KeyToken))return n=this.get_token(),this.check_token(i.KeyToken,i.ValueToken,i.BlockEndToken)?(this.state="parse_block_mapping_value",this.process_empty_scalar(n.end_mark)):(this.states.push("parse_block_mapping_value"),this.parse_block_node_or_indentless_sequence());if(!this.check_token(i.BlockEndToken))throw n=this.peek_token(),new t.ParserError("while parsing a block mapping",this.marks.slice(-1)[0],"expected , but found "+n.id,n.start_mark);return n=this.get_token(),e=new r.MappingEndEvent(n.start_mark,n.end_mark),this.state=this.states.pop(),this.marks.pop(),e},e.prototype.parse_block_mapping_value=function(){var e;return this.check_token(i.ValueToken)?(e=this.get_token(),this.check_token(i.KeyToken,i.ValueToken,i.BlockEndToken)?(this.state="parse_block_mapping_key",this.process_empty_scalar(e.end_mark)):(this.states.push("parse_block_mapping_key"),this.parse_block_node_or_indentless_sequence())):(this.state="parse_block_mapping_key",e=this.peek_token(),this.process_empty_scalar(e.start_mark))},e.prototype.parse_flow_sequence_first_entry=function(){var e;return e=this.get_token(),this.marks.push(e.start_mark),this.parse_flow_sequence_entry(!0)},e.prototype.parse_flow_sequence_entry=function(e){var n,o;if(null==e&&(e=!1),!this.check_token(i.FlowSequenceEndToken)){if(!e){if(!this.check_token(i.FlowEntryToken))throw o=this.peek_token(),new t.ParserError("while parsing a flow sequence",this.marks.slice(-1)[0],"expected ',' or ']', but got "+o.id,o.start_mark);this.get_token()}if(this.check_token(i.KeyToken))return o=this.peek_token(),n=new r.MappingStartEvent(null,null,!0,o.start_mark,o.end_mark,!0),this.state="parse_flow_sequence_entry_mapping_key",n;if(!this.check_token(i.FlowSequenceEndToken))return this.states.push("parse_flow_sequence_entry"),this.parse_flow_node()}return o=this.get_token(),n=new r.SequenceEndEvent(o.start_mark,o.end_mark),this.state=this.states.pop(),this.marks.pop(),n},e.prototype.parse_flow_sequence_entry_mapping_key=function(){var e;return e=this.get_token(),this.check_token(i.ValueToken,i.FlowEntryToken,i.FlowSequenceEndToken)?(this.state="parse_flow_sequence_entry_mapping_value",this.process_empty_scalar(e.end_mark)):(this.states.push("parse_flow_sequence_entry_mapping_value"),this.parse_flow_node())},e.prototype.parse_flow_sequence_entry_mapping_value=function(){var e;return this.check_token(i.ValueToken)?(e=this.get_token(),this.check_token(i.FlowEntryToken,i.FlowSequenceEndToken)?(this.state="parse_flow_sequence_entry_mapping_end",this.process_empty_scalar(e.end_mark)):(this.states.push("parse_flow_sequence_entry_mapping_end"),this.parse_flow_node())):(this.state="parse_flow_sequence_entry_mapping_end",e=this.peek_token(),this.process_empty_scalar(e.start_mark))},e.prototype.parse_flow_sequence_entry_mapping_end=function(){var e;return this.state="parse_flow_sequence_entry",e=this.peek_token(),new r.MappingEndEvent(e.start_mark,e.start_mark)},e.prototype.parse_flow_mapping_first_key=function(){var e;return e=this.get_token(),this.marks.push(e.start_mark),this.parse_flow_mapping_key(!0)},e.prototype.parse_flow_mapping_key=function(e){var n,o;if(null==e&&(e=!1),!this.check_token(i.FlowMappingEndToken)){if(!e){if(!this.check_token(i.FlowEntryToken))throw o=this.peek_token(),new t.ParserError("while parsing a flow mapping",this.marks.slice(-1)[0],"expected ',' or '}', but got "+o.id,o.start_mark);this.get_token()}if(this.check_token(i.KeyToken))return o=this.get_token(),this.check_token(i.ValueToken,i.FlowEntryToken,i.FlowMappingEndToken)?(this.state="parse_flow_mapping_value",this.process_empty_scalar(o.end_mark)):(this.states.push("parse_flow_mapping_value"),this.parse_flow_node());if(!this.check_token(i.FlowMappingEndToken))return this.states.push("parse_flow_mapping_empty_value"),this.parse_flow_node()}return o=this.get_token(),n=new r.MappingEndEvent(o.start_mark,o.end_mark),this.state=this.states.pop(),this.marks.pop(),n},e.prototype.parse_flow_mapping_value=function(){var e;return this.check_token(i.ValueToken)?(e=this.get_token(),this.check_token(i.FlowEntryToken,i.FlowMappingEndToken)?(this.state="parse_flow_mapping_key",this.process_empty_scalar(e.end_mark)):(this.states.push("parse_flow_mapping_key"),this.parse_flow_node())):(this.state="parse_flow_mapping_key",e=this.peek_token(),this.process_empty_scalar(e.start_mark))},e.prototype.parse_flow_mapping_empty_value=function(){return this.state="parse_flow_mapping_key",this.process_empty_scalar(this.peek_token().start_mark)},e.prototype.process_empty_scalar=function(e){return new r.ScalarEvent(null,null,[!0,!1],"",e,e)},e}()}).call(this)},function(e,t,n){function r(e){return n(i(e))}function i(e){return o[e]||function(){throw new Error("Cannot find module '"+e+"'.")}()}var o={"./composer":854,"./composer.js":854,"./constructor":858,"./constructor.js":858,"./dumper":863,"./dumper.js":863,"./emitter":864,"./emitter.js":864,"./errors":856,"./errors.js":856,"./events":855,"./events.js":855,"./loader":868,"./loader.js":868,"./nodes":857,"./nodes.js":857,"./parser":872,"./parser.js":872,"./reader":869,"./reader.js":869,"./representer":866,"./representer.js":866,"./resolver":867,"./resolver.js":867,"./scanner":870,"./scanner.js":870,"./serializer":865,"./serializer.js":865,"./tokens":871,"./tokens.js":871,"./util":859,"./util.js":859,"./yaml":853,"./yaml.js":853};r.keys=function(){return Object.keys(o)},r.resolve=i,e.exports=r,r.id=873},function(e,t){},function(e,t,n){var r=n(876),i=n(877),o=r(i);e.exports=o},function(e,t,n){function r(e){return function(t,n,r){var s=Object(t);if(!o(t)){var u=i(n,3);t=a(t),n=function(e){return u(s[e],e,s)}}var c=e(t,n,r);return c>-1?s[u?t[c]:c]:void 0}}var i=n(400),o=n(437),a=n(421);e.exports=r},function(e,t,n){function r(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var u=null==n?0:a(n);return u<0&&(u=s(r+u,0)),i(e,o(t,3),u)}var i=n(878),o=n(400),a=n(879),s=Math.max;e.exports=r},function(e,t){function n(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o2&&void 0!==arguments[2]?arguments[2]:"";return(e.operationId||"").replace(/\s/g,"").length?b(e.operationId):o(t,n)}function o(e,t){return""+_(t)+b(e)}function a(e,t){return _(t)+"-"+e}function s(e,t){return e&&e.paths?u(e,function(e){var n=e.pathName,r=e.method,o=e.operation;if(!o||"object"!==(void 0===o?"undefined":(0,y.default)(o)))return!1;var s=o.operationId;return[i(o,n,r),a(n,r),s].some(function(e){return e&&e===t})}):null}function u(e,t){return c(e,t,!0)||null}function c(e,t,n){if(!e||"object"!==(void 0===e?"undefined":(0,y.default)(e))||!e.paths||"object"!==(0,y.default)(e.paths))return null;var r=e.paths;for(var i in r)for(var o in r[i])if("PARAMETERS"!==o.toUpperCase()){var a=r[i][o];if(a&&"object"===(void 0===a?"undefined":(0,y.default)(a))){var s={spec:e,pathName:i,method:o.toUpperCase(),operation:a},u=t(s);if(n&&u)return s}}}function l(e){var t=e.spec,n=t.paths,r={};if(!n)return e;for(var o in n){var a=n[o];if((0,g.default)(a)){var s=a.parameters;for(var u in a)!function(e){var n=a[e];if(!(0,g.default)(n))return"continue";var u=i(n,o,e);if(u&&(r[u]?r[u].push(n):r[u]=[n],(0,d.default)(r).forEach(function(e){if(r[e].length>1)r[e].forEach(function(t,n){t.__originalOperationId=t.__originalOperationId||t.operationId,t.operationId=""+e+(n+1)});else if(void 0!==n.operationId){var t=r[e][0];t.__originalOperationId=t.__originalOperationId||n.operationId,t.operationId=e}})),"parameters"!==e){var c=[],l={};for(var p in t)"produces"!==p&&"consumes"!==p&&"security"!==p||(l[p]=t[p],c.push(l));if(s&&(l.parameters=s,c.push(l)),c.length){var h=!0,m=!1,y=void 0;try{for(var v,_=(0,f.default)(c);!(h=(v=_.next()).done);h=!0){var b=v.value;for(var x in b)if(n[x]){if("parameters"===x){var w=!0,k=!1,S=void 0;try{for(var E,C=(0,f.default)(b[x]);!(w=(E=C.next()).done);w=!0)!function(){var e=E.value;n[x].some(function(t){return t.name===e.name})||n[x].push(e)}()}catch(e){k=!0,S=e}finally{try{!w&&C.return&&C.return()}finally{if(k)throw S}}}}else n[x]=b[x]}}catch(e){m=!0,y=e}finally{try{!h&&_.return&&_.return()}finally{if(m)throw y}}}}}(u)}}return e}Object.defineProperty(t,"__esModule",{value:!0});var p=n(11),f=r(p),h=n(0),d=r(h),m=n(5),y=r(m);t.opId=i,t.idFromPathMethod=o, +t.legacyIdFromPathMethod=a,t.getOperationRaw=s,t.findOperation=u,t.eachOperation=c,t.normalizeSwagger=l;var v=n(40),g=r(v),_=function(e){return String.prototype.toLowerCase.call(e)},b=function(e){return e.replace(/[^\w]/gi,"_")}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){if(n=n||{},t=(0,q.default)({},t,{path:t.path&&o(t.path)}),"merge"===t.op){var r=s(t.path);W.default.apply(e,[r]),(0,q.default)(r.value,t.value)}else if("mergeDeep"===t.op){var i=s(t.path);W.default.apply(e,[i]),(0,J.default)(i.value,t.value)}else if(W.default.apply(e,[t]),n.allowMetaPatches&&t.meta&&M(t)&&(Array.isArray(t.value)||S(t.value))){var a=s(t.path);W.default.apply(e,[a]),(0,q.default)(a.value,t.meta)}return e}function o(e){return Array.isArray(e)?e.length<1?"":"/"+e.map(function(e){return(e+"").replace(/~/g,"~0").replace(/\//g,"~1")}).join("/"):e}function a(e,t){return{op:"add",path:e,value:t}}function s(e){return{op:"_get",path:e}}function u(e,t,n){return{op:"replace",path:e,value:t,meta:n}}function c(e,t){return{op:"remove",path:e}}function l(e,t){return{type:"mutation",op:"merge",path:e,value:t}}function p(e,t){return{type:"mutation",op:"mergeDeep",path:e,value:t}}function f(e,t){return{type:"context",path:e,value:t}}function h(e,t){try{return m(e,v,t)}catch(e){return e}}function d(e,t){try{return m(e,y,t)}catch(e){return e}}function m(e,t,n){return k(w(e.filter(M).map(function(e){return t(e.value,n,e.path)})||[]))}function y(e,t,n){return n=n||[],Array.isArray(e)?e.map(function(e,r){return y(e,t,n.concat(r))}):S(e)?(0,L.default)(e).map(function(r){return y(e[r],t,n.concat(r))}):t(e,n[n.length-1],n)}function v(e,t,n){n=n||[];var r=[];if(n.length>0){var i=t(e,n[n.length-1],n);i&&(r=r.concat(i))}if(Array.isArray(e)){var o=e.map(function(e,r){return v(e,t,n.concat(r))});o&&(r=r.concat(o))}else if(S(e)){var a=(0,L.default)(e).map(function(r){return v(e[r],t,n.concat(r))});a&&(r=r.concat(a))}return r=w(r)}function g(e,t){if(!Array.isArray(t))return!1;for(var n=0,r=t.length;n1&&void 0!==arguments[1]?arguments[1]:{};return"object"===(void 0===e?"undefined":(0,b.default)(e))&&(t=e,e=t.url),t.headers=t.headers||{},T.mergeInQueryOrForm(t),t.requestInterceptor&&(t=t.requestInterceptor(t)||t),/multipart\/form-data/i.test(t.headers["content-type"]||t.headers["Content-Type"])&&(delete t.headers["content-type"],delete t.headers["Content-Type"]),fetch(t.url,t).then(function(n){var r=T.serializeRes(n,e,t).then(function(e){return t.responseInterceptor&&(e=t.responseInterceptor(e)||e),e});if(!n.ok){var i=new Error(n.statusText);return i.statusCode=i.status=n.status,r.then(function(e){throw i.response=e,i},function(e){throw i.responseError=e,i})}return r})}function o(e){return/json/.test(e)||/xml/.test(e)||/yaml/.test(e)||/text/.test(e)}function a(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.loadSpec,i=void 0!==r&&r,a={ok:e.ok,url:e.url||t,status:e.status,statusText:e.statusText,headers:s(e.headers)},u=i||o(a.headers["content-type"]);return(u?e.text:e.blob||e.buffer).call(e).then(function(e){if(a.text=e,a.data=e,u)try{var t=S.default.safeLoad(e);a.body=t,a.obj=t}catch(e){a.parseError=e}return a})}function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={};return"function"==typeof e.forEach?(e.forEach(function(e,n){void 0!==t[n]?(t[n]=Array.isArray(t[n])?t[n]:[t[n]],t[n].push(e)):t[n]=e}),t):t}function u(e){return"undefined"!=typeof File?e instanceof File:null!==e&&"object"===(void 0===e?"undefined":(0,b.default)(e))&&"function"==typeof e.pipe}function c(e,t){var n=e.value,r=e.collectionFormat,i=e.allowEmptyValue,o={csv:",",ssv:"%20",tsv:"%09",pipes:"|"};if(void 0===n&&i)return"";if(u(n))return n;var a=encodeURIComponent;return t&&(a=(0,A.default)(n)?function(e){return e}:function(e){return(0,g.default)(e)}),n&&!Array.isArray(n)?a(n):Array.isArray(n)&&!r?n.map(a).join(","):"multi"===r?n.map(a):n.map(a).join(o[r])}function l(e){var t=(0,y.default)(e).reduce(function(t,n){var r=e[n],i=encodeURIComponent(n),o=function(e){return e&&"object"===(void 0===e?"undefined":(0,b.default)(e))}(r)&&!Array.isArray(r);return t[i]=c(o?r:{value:r}),t},{});return w.default.stringify(t,{encode:!1,indices:!1})||""}function p(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.url,r=void 0===t?"":t,i=e.query,o=e.form;if(o){var a=(0,y.default)(o).some(function(e){return u(o[e].value)}),s=e.headers["content-type"]||e.headers["Content-Type"];if(a||/multipart\/form-data/i.test(s)){var p=n(35);e.body=new p,(0,y.default)(o).forEach(function(t){e.body.append(t,c(o[t],!0))})}else e.body=l(o);delete e.form}if(i){var f=r.split("?"),h=(0,d.default)(f,2),m=h[0],v=h[1],g="";if(v){var _=w.default.parse(v);(0,y.default)(i).forEach(function(e){return delete _[e]}),g=w.default.stringify(_,{encode:!0})}var b=function(){for(var e=arguments.length,t=Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof e?n.url=e:n=e,!(this instanceof i))return new i(n);(0,c.default)(this,n);var r=this.resolve().then(function(){return t.disableInterfaces||(0,c.default)(t,i.makeApisTagOperation(t)),t});return r.client=this,r}var o=n(4),a=r(o),s=n(37),u=(r(s),n(8)),c=r(u),l=n(6),p=r(l),f=n(20),h=r(f),d=n(9),m=r(d),y=n(19),v=n(18),g=n(2);i.http=p.default,i.makeHttp=l.makeHttp.bind(null,i.http),i.resolve=h.default,i.execute=v.execute,i.serializeRes=l.serializeRes,i.serializeHeaders=l.serializeHeaders,i.clearCache=f.clearCache,i.parameterBuilders=v.PARAMETER_BUILDERS,i.makeApisTagOperation=y.makeApisTagOperation,i.buildRequest=v.buildRequest,i.helpers={opId:g.opId},e.exports=i,i.prototype={http:p.default,execute:function(e){return this.applyDefaults(),i.execute((0,a.default)({spec:this.spec,http:this.http.bind(this),securities:{authorized:this.authorizations}},e))},resolve:function(){var e=this;return i.resolve({spec:this.spec,url:this.url,allowMetaPatches:this.allowMetaPatches}).then(function(t){return e.originalSpec=e.spec,e.spec=t.spec,e.errors=t.errors,e})}},i.prototype.applyDefaults=function(){var e=this.spec,t=this.url;if(t&&t.startsWith("http")){var n=m.default.parse(t);e.host||(e.host=n.host),e.schemes||(e.schemes=[n.protocol.replace(":","")]),e.basePath||(e.basePath="/")}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=e.http,n=e.fetch,r=e.spec,i=e.operationId,o=e.pathName,a=e.method,s=e.parameters,u=e.securities,c=(0,b.default)(e,["http","fetch","spec","operationId","pathName","method","parameters","securities"]);t=t||n||R.default,o&&a&&!i&&(i=(0,N.legacyIdFromPathMethod)(o,a));var l=q.buildRequest((0,g.default)({spec:r,operationId:i,parameters:s,securities:u},c));return l.body&&((0,A.default)(l.body)||(0,O.default)(l.body))&&(l.body=(0,y.default)(l.body)),t(l)}function o(e){var t=e.spec,n=e.operationId,r=e.parameters,i=e.securities,o=e.requestContentType,a=e.responseContentType,s=e.parameterBuilders,u=e.scheme,c=e.requestInterceptor,l=e.responseInterceptor,h=e.contextUrl;s=s||U;var d={url:p({spec:t,scheme:u,contextUrl:h}),credentials:"same-origin",headers:{}};if(c&&(d.requestInterceptor=c),l&&(d.responseInterceptor=l),!n)return d;var m=(0,N.getOperationRaw)(t,n);if(!m)throw new z("Operation "+n+" not found");var y=m.operation,v=void 0===y?{}:y,g=m.method,_=m.pathName;d.url+=_,d.method=(""+g).toUpperCase(),r=r||{};var b=t.paths[_]||{};return a&&(d.headers.accept=a),L(v.parameters).concat(L(b.parameters)).forEach(function(e){var n=s[e.in],i=void 0;if("body"===e.in&&e.schema&&e.schema.properties&&(i=r),i=e&&e.name&&r[e.name],void 0!==e.default&&void 0===i&&(i=e.default),void 0===i&&e.required&&!e.allowEmptyValue)throw new Error("Required parameter "+e.name+" is not provided");n&&n({req:d,parameter:e,value:i,operation:v,spec:t})}),d=f({request:d,securities:i,operation:v,spec:t}),(d.body||d.form)&&(o?d.headers["content-type"]=o:Array.isArray(v.consumes)?d.headers["content-type"]=v.consumes[0]:Array.isArray(t.consumes)?d.headers["content-type"]=t.consumes[0]:v.parameters.filter(function(e){return"file"===e.type}).length?d.headers["content-type"]="multipart/form-data":v.parameters.filter(function(e){return"formData"===e.in}).length&&(d.headers["content-type"]="application/x-www-form-urlencoded")),(0,j.mergeInQueryOrForm)(d),d}function a(e){var t=e.req,n=e.value;t.body=n}function s(e){var t=e.req,n=e.value,r=e.parameter;t.form=t.form||{},(n||r.allowEmptyValue)&&(t.form[r.name]={value:n,allowEmptyValue:r.allowEmptyValue,collectionFormat:r.collectionFormat})}function u(e){var t=e.req,n=e.parameter,r=e.value;t.headers=t.headers||{},void 0!==r&&(t.headers[n.name]=r)}function c(e){var t=e.req,n=e.value,r=e.parameter;t.url=t.url.replace("{"+r.name+"}",encodeURIComponent(n))}function l(e){var t=e.req,n=e.value,r=e.parameter;if(t.query=t.query||{},n)t.query[r.name]={collectionFormat:r.collectionFormat,value:n};else if(r.allowEmptyValue){var i=r.name;t.query[i]=t.query[i]||{},t.query[i].allowEmptyValue=!0}}function p(e){var t=e.spec,n=e.scheme,r=e.contextUrl,i=void 0===r?"":r,o=I.default.parse(i),a=Array.isArray(t.schemes)?t.schemes[0]:null,s=n||a||W(o.protocol)||"http",u=t.host||o.host||"",c=t.basePath||"";if(s&&u){var l=s+"://"+(u+c);return"/"===l[l.length-1]?l.slice(0,-1):l}return""}function f(e){var t=e.request,n=e.securities,r=void 0===n?{}:n,i=e.operation,o=void 0===i?{}:i,a=e.spec,s=(0,S.default)({},t),u=r.authorized,c=void 0===u?{}:u,l=r.specSecurity,p=void 0===l?[]:l,f=o.security||p,h=c&&!!(0,d.default)(c).length,m=a.securityDefinitions;return s.headers=s.headers||{},s.query=s.query||{},(0,d.default)(r).length&&h&&f&&(!Array.isArray(o.security)||o.security.length)?(f.forEach(function(e,t){for(var n in e){var r=c[n];if(r){var i=r.token,o=r.value||r,a=m[n],u=a.type,l=i&&i.access_token,p=i&&i.token_type;if(r)if("apiKey"===u){var f="query"===a.in?"query":"headers";s[f]=s[f]||{},s[f][a.name]=o}else"basic"===u?o.header?s.headers.authorization=o.header:(o.base64=(0,M.default)(o.username+":"+o.password),s.headers.authorization="Basic "+o.base64):"oauth2"===u&&(s.headers.authorization=(p||"Bearer")+" "+l)}}}),s):t}Object.defineProperty(t,"__esModule",{value:!0}),t.PARAMETER_BUILDERS=t.self=void 0;var h=n(0),d=r(h),m=n(7),y=r(m),v=n(4),g=r(v),_=n(29),b=r(_),x=n(1),w=r(x);t.execute=i,t.buildRequest=o,t.bodyBuilder=a,t.formDataBuilder=s,t.headerBuilder=u,t.pathBuilder=c,t.queryBuilder=l,t.baseUrl=p,t.applySecurities=f;var k=n(8),S=r(k),E=n(38),C=(r(E),n(41)),A=r(C),T=n(39),O=r(T),D=n(32),M=r(D),P=n(9),I=r(P),j=n(6),R=r(j),N=n(2),F=n(10),B=r(F),L=function(e){return Array.isArray(e)?e:[]},z=(0,B.default)("OperationNotFoundError",function(e,t,n){this.originalError=n,(0,w.default)(this,t||{})}),q=t.self={buildRequest:o},U=t.PARAMETER_BUILDERS={body:a,header:u,query:l,path:c,formData:s},W=function(e){return e?e.replace(/\W/g,""):null}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var n=t.pathName,r=t.method,i=t.operationId;return function(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.execute((0,c.default)({spec:e.spec},(0,p.default)(e,"requestInterceptor","responseInterceptor"),{pathName:n,method:r,parameters:t,operationId:i},o))}}}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=m.makeExecute(e),n=m.mapTagOperations({spec:e.spec,cb:t}),r={};for(var i in n){r[i]={operations:{}};for(var o in n[i])r[i].operations[o]={execute:n[i][o]}}return{apis:r}}function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=m.makeExecute(e);return{apis:m.mapTagOperations({spec:e.spec,cb:t})}}function s(e){var t=e.spec,n=e.cb,r=void 0===n?h:n,i=e.defaultTag,o=void 0===i?"default":i,a={},s={};return(0,f.eachOperation)(t,function(e){var n=e.pathName,i=e.method,u=e.operation;(u.tags?d(u.tags):[o]).forEach(function(e){if("string"==typeof e){var o=s[e]=s[e]||{},c=(0,f.opId)(u,n,i),l=r({spec:t,pathName:n,method:i,operation:u,operationId:c});if(a[c])a[c]=a[c]+1,o[""+c+a[c]]=l;else if(void 0!==o[c]){var p=a[c]||1;a[c]=p+1,o[""+c+a[c]]=l;var h=o[c];delete o[c],o[""+c+p]=h}else o[c]=l}})}),s}Object.defineProperty(t,"__esModule",{value:!0}),t.self=void 0;var u=n(4),c=r(u);t.makeExecute=i,t.makeApisTagOperationsOperationExecute=o,t.makeApisTagOperation=a,t.mapTagOperations=s;var l=n(43),p=r(l),f=n(2),h=function(){return null},d=function(e){return Array.isArray(e)?e:[e]},m=t.self={mapTagOperations:s,makeExecute:i}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return function(t){return e({url:t,loadSpec:!0,headers:{Accept:"application/json"},credentials:"same-origin"}).then(function(e){return e.body})}}function o(){c.plugins.refs.clearCache()}function a(e){function t(e){s&&(c.plugins.refs.docCache[s]=e),c.plugins.refs.fetchJSON=i(n);var t=[c.plugins.refs];return"function"==typeof y&&t.push(c.plugins.parameters),"function"==typeof m&&t.push(c.plugins.properties),"strict"!==f&&t.push(c.plugins.allOf),(0,l.default)({spec:e,context:{baseDoc:s},plugins:t,allowMetaPatches:d,parameterMacro:y,modelPropertyMacro:m}).then(p.normalizeSwagger)}var n=e.http,r=e.fetch,o=e.spec,a=e.url,s=e.baseDoc,f=e.mode,h=e.allowMetaPatches,d=void 0===h||h,m=e.modelPropertyMacro,y=e.parameterMacro;return s=s||a,n=r||n||u.default,o?t(o):i(n)(s).then(t)}Object.defineProperty(t,"__esModule",{value:!0}),t.makeFetchJSON=i,t.clearCache=o,t.default=a;var s=n(6),u=r(s),c=n(21),l=r(c),p=n(2)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return new R(e).dispatch()}Object.defineProperty(t,"__esModule",{value:!0}),t.plugins=t.SpecMap=void 0;var o=n(7),a=r(o),s=n(12),u=r(s),c=n(15),l=r(c),p=n(0),f=r(p),h=n(11),d=r(h),m=n(27),y=r(m),v=n(1),g=r(v),_=n(13),b=r(_),x=n(14),w=r(x);t.default=i;var k=n(3),S=r(k),E=n(26),C=r(E),A=n(22),T=r(A),O=n(24),D=r(O),M=n(25),P=r(M),I=n(23),j=r(I),R=function(){function e(t){(0,b.default)(this,e),(0,g.default)(this,{spec:"",debugLevel:"info",plugins:[],pluginHistory:{},errors:[],mutations:[],promisedPatches:[],state:{},patches:[],context:{},contextTree:new j.default,showDebug:!1,allPatches:[],pluginProp:"specMap",libMethods:(0,g.default)((0,y.default)(this),S.default),allowMetaPatches:!1},t),this.get=this._get.bind(this),this.getContext=this._getContext.bind(this),this.hasRun=this._hasRun.bind(this),this.wrappedPlugins=this.plugins.map(this.wrapPlugin.bind(this)).filter(S.default.isFunction),this.patches.push(S.default.add([],this.spec)),this.patches.push(S.default.context([],this.context)),this.updatePatches(this.patches)}return(0,w.default)(e,[{key:"debug",value:function(e){if(this.debugLevel===e){for(var t,n=arguments.length,r=Array(n>1?n-1:0),i=1;i1?n-1:0),i=1;i0})}},{key:"nextPromisedPatch",value:function(){if(this.promisedPatches.length>0)return u.default.race(this.promisedPatches.map(function(e){return e.value}))}},{key:"getPluginHistory",value:function(e){var t=this.getPluginName(e);return this.pluginHistory[t]||[]}},{key:"getPluginRunCount",value:function(e){return this.getPluginHistory(e).length}},{key:"getPluginHistoryTip",value:function(e){var t=this.getPluginHistory(e);return t&&t[t.length-1]||{}}},{key:"getPluginMutationIndex",value:function(e){var t=this.getPluginHistoryTip(e).mutationIndex;return"number"!=typeof t?-1:t}},{key:"getPluginName",value:function(e){return e.pluginName}},{key:"updatePluginHistory",value:function(e,t){var n=this.getPluginName(e);(this.pluginHistory[n]=this.pluginHistory[n]||[]).push(t)}},{key:"updatePatches",value:function(e,t){var n=this;S.default.normalizeArray(e).forEach(function(e){if(e instanceof Error)return void n.errors.push(e);try{if(!S.default.isObject(e))return void n.debug("updatePatches","Got a non-object patch",e);if(n.showDebug&&n.allPatches.push(e),S.default.isPromise(e.value))return n.promisedPatches.push(e),void n.promisedPatchThen(e);if(S.default.isContextPatch(e))return void n.setContext(e.path,e.value);if(S.default.isMutation(e))return void n.updateMutations(e)}catch(e){n.errors.push(e)}})}},{key:"updateMutations",value:function(e){S.default.applyPatch(this.state,e,{allowMetaPatches:this.allowMetaPatches})&&this.mutations.push(e)}},{key:"removePromisedPatch",value:function(e){var t=this.promisedPatches.indexOf(e);return t<0?void this.debug("Tried to remove a promisedPatch that isn't there!"):void this.promisedPatches.splice(t,1)}},{key:"promisedPatchThen",value:function(e){var t=this;return e.value=e.value.then(function(n){var r=(0,g.default)({},e,{value:n});t.removePromisedPatch(e),t.updatePatches(r)}).catch(function(n){t.removePromisedPatch(e),t.updatePatches(n)})}},{key:"getMutations",value:function(e,t){return e=e||0,"number"!=typeof t&&(t=this.mutations.length),this.mutations.slice(e,t)}},{key:"getCurrentMutations",value:function(){return this.getMutationsForPlugin(this.getCurrentPlugin())}},{key:"getMutationsForPlugin",value:function(e){var t=this.getPluginMutationIndex(e);return this.getMutations(t+1)}},{key:"getCurrentPlugin",value:function(){return this.currentPlugin}},{key:"getPatchesOfType",value:function(e,t){return e.filter(t)}},{key:"getLib",value:function(){return this.libMethods}},{key:"_get",value:function(e){return S.default.getIn(this.state,e)}},{key:"_getContext",value:function(e){return this.contextTree.get(e)}},{key:"setContext",value:function(e,t){return this.contextTree.set(e,t)}},{key:"_hasRun",value:function(e){return this.getPluginRunCount(this.getCurrentPlugin())>(e||0)}},{key:"_clone",value:function(e){return JSON.parse((0,a.default)(e))}},{key:"dispatch",value:function(){function e(e){e&&(e=S.default.fullyNormalizeArray(e),n.updatePatches(e,r))}var t=this,n=this,r=this.nextPlugin();if(!r){var i=this.nextPromisedPatch();if(i)return i.then(function(){return t.dispatch()}).catch(function(){return t.dispatch()});var o={spec:this.state,errors:this.errors};return this.showDebug&&(o.patches=this.allPatches),u.default.resolve(o)}if(n.pluginCount=n.pluginCount||{},n.pluginCount[r]=(n.pluginCount[r]||0)+1,n.pluginCount[r]>100)return u.default.resolve({spec:n.state,errors:n.errors.concat(new Error("We've reached a hard limit of 100 plugin runs"))});if(r!==this.currentPlugin&&this.promisedPatches.length){var a=this.promisedPatches.map(function(e){return e.value});return u.default.all(a.map(function(e){return e.then(Function,Function)})).then(function(){return t.dispatch()})}return function(){n.currentPlugin=r;var t=n.getCurrentMutations(),i=n.mutations.length-1;try{if(r.isGenerator){var o=!0,a=!1,s=void 0;try{for(var u,c=(0,d.default)(r(t,n.getLib()));!(o=(u=c.next()).done);o=!0)e(u.value)}catch(e){a=!0,s=e}finally{try{!o&&c.return&&c.return()}finally{if(a)throw s}}}else e(r(t,n.getLib()))}catch(t){e([(0,g.default)((0,y.default)(t),{plugin:r})])}finally{n.updatePluginHistory(r,{mutationIndex:i})}return n.dispatch()}()}}]),e}(),N={refs:C.default,allOf:T.default,parameters:D.default,properties:P.default};t.SpecMap=R,t.plugins=N},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={key:"allOf",plugin:function(e,t,n,r,i){if(!i.meta||!i.meta.$$ref){if(!Array.isArray(e)){var o=new TypeError("allOf must be an array");return o.fullPath=n,o}var a=n.slice(0,-1),s=!1;return[r.replace(a,{})].concat(e.map(function(e,t){if(!r.isObject(e)){if(s)return null;s=!0;var i=new TypeError("Elements in allOf must be objects");return i.fullPath=n,i}return r.mergeDeep(a,e)}))}}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){return o({children:{}},e,t)}function o(e,t,n){return e.value=t||{},e.protoValue=n?(0,c.default)({},n.protoValue,e.value):e.value,(0,s.default)(e.children).forEach(function(t){var n=e.children[t];e.children[t]=o(n,n.value,e)}),e}Object.defineProperty(t,"__esModule",{value:!0});var a=n(0),s=r(a),u=n(4),c=r(u),l=n(13),p=r(l),f=n(14),h=r(f),d=function(){function e(t){(0,p.default)(this,e),this.root=i(t||{})}return(0,h.default)(e,[{key:"set",value:function(e,t){var n=this.getParent(e,!0);if(!n)return void o(this.root,t,null);var r=e[e.length-1],a=n.children;return a[r]?void o(a[r],t,n):void(a[r]=i(t,n))}},{key:"get",value:function(e){if(e=e||[],e.length<1)return this.root.value;for(var t=this.root,n=void 0,r=void 0,i=0;i")+"#"+e;if(t==r.contextTree.get([]).baseDoc&&y(o,e))return!0;var s="";return!!n.some(function(e){return s=s+"/"+d(e),i[s]&&i[s].some(function(e){return y(e,a)||y(a,e)})})||void(i[o]=(i[o]||[]).concat(a))}function g(e,t){function n(e){return j.default.isObject(e)&&(r.indexOf(e)>=0||(0,w.default)(e).some(function(t){return n(e[t])}))}var r=[e];return t.path.reduce(function(e,t){return r.push(e[t]),e[t]},e),n(t.value)}Object.defineProperty(t,"__esModule",{value:!0});var _=n(5),b=r(_),x=n(0),w=r(x),k=n(12),S=r(k),E=n(28),C=r(E),A=n(1),T=r(A),O=n(16),D=r(O),M=n(9),P=r(M),I=n(3),j=r(I),R=n(10),N=r(R),F=new RegExp("^([a-z]+://|//)","i"),B=(0,N.default)("JSONRefError",function(e,t,n){this.originalError=n,(0,T.default)(this,t||{})}),L={},z=new C.default,q={key:"$ref",plugin:function(e,t,n,r){var u=n.slice(0,-1),c=r.getContext(n).baseDoc;if("string"!=typeof e)return new B("$ref: must be a string (JSON-Ref)",{$ref:e,baseDoc:c,fullPath:n});var l=a(e),p=l[0],h=l[1]||"",d=void 0;try{d=c||p?i(p,c):null}catch(t){return o(t,{pointer:h,$ref:e,basePath:d,fullPath:n})}var m=void 0,y=void 0;if(!v(h,d,u,r)){if(null==d?(y=f(h),void 0===(m=r.get(y))&&(m=new B("Could not resolve reference: "+e,{pointer:h,$ref:e,baseDoc:c,fullPath:n}))):(m=s(d,h),m=null!=m.__value?m.__value:m.catch(function(t){throw o(t,{pointer:h,$ref:e,baseDoc:c,fullPath:n})})),m instanceof Error)return[j.default.remove(n),m];var _=j.default.replace(u,m,{$$ref:e});return d&&d!==c?[_,j.default.context(u,{baseDoc:d})]:g(r.state,_)?void 0:_}}},U=(0,T.default)(q,{docCache:L,absoluteify:i,clearCache:u,JSONRefError:B,wrapError:o,getDoc:c,split:a,extractFromDoc:s,fetchJSON:l,extract:p,jsonPointerToArray:f,unescapeJsonPointerToken:h});t.default=U;var W=function(e){return!e||"/"===e||"#"===e}},function(e,t){e.exports=n(1038)},function(e,t){e.exports=n(1041)},function(e,t){e.exports=n(1049)},function(e,t){e.exports=n(1050)},function(e,t){e.exports=n(1054)},function(e,t){e.exports=n(1059)},function(e,t){e.exports=n(298)},function(e,t){e.exports=n(1060)},function(e,t){e.exports=n(1061)},function(e,t){e.exports=n(583)},function(e,t){e.exports=n(1062)},function(e,t){e.exports=n(1130)},function(e,t){e.exports=n(1e3)},function(e,t){e.exports=n(981)},function(e,t){e.exports=n(1141)},function(e,t){e.exports=n(1142)},function(e,t){e.exports=n(1143)},function(e,t){e.exports=n(1151)},function(e,t,n){e.exports=n(17)}])},function(e,t,n){e.exports={default:n(886),__esModule:!0}},function(e,t,n){n(887),e.exports=n(907).Object.keys},[1416,888,890,905],[1414,889],35,[1395,891,904],[1396,892,893,896,900],5,[1397,894,889],[1398,895],34,[1399,893,897,899],[1400,898],38,[1401,898],[1402,901,903],[1389,902],4,19,41,[1413,906,907,916],function(e,t,n){var r=n(902),i=n(907),o=n(908),a=n(910),s="prototype",u=function(e,t,n){var c,l,p,f=e&u.F,h=e&u.G,d=e&u.S,m=e&u.P,y=e&u.B,v=e&u.W,g=h?i:i[t]||(i[t]={}),_=g[s],b=h?r:d?r[t]:(r[t]||{})[s];h&&(n=t);for(c in n)l=!f&&b&&void 0!==b[c],l&&c in g||(p=l?b[c]:n[c],g[c]=h&&"function"!=typeof b[c]?n[c]:y&&l?o(p,r):v&&b[c]==p?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t[s]=e[s],t}(p):m&&"function"==typeof p?o(Function.call,p):p,m&&((g.virtual||(g.virtual={}))[c]=p,e&u.R&&_&&!_[c]&&a(_,c,p)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u; +},9,[1387,909],21,[1381,911,919,915],[1382,912,914,918,915],[1383,913],13,[1384,915,916,917],[1380,916],7,[1385,913,902],[1386,913],17,function(e,t,n){e.exports={default:n(921),__esModule:!0}},function(e,t,n){n(922),e.exports=n(907).Object.assign},[1417,906,923],[1418,890,924,925,888,894,916],43,44,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(920),o=r(i);t.default=o.default||function(e){for(var t=1;t1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,s&&o(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++r0){if(++t>=r)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var r=500,i=16,o=Date.now;e.exports=n},[1484,967,990,992,981],[1475,980,991],431,428,435,[1471,995,1001,990],function(e,t,n){function r(e,t){var n=a(e)||o(e)?i(e.length,String):[],r=n.length,u=!!r;for(var l in e)!t&&!c.call(e,l)||u&&("length"==l||s(l,r))||n.push(l);return n}var i=n(996),o=n(997),a=n(1e3),s=n(992),u=Object.prototype,c=u.hasOwnProperty;e.exports=r},423,function(e,t,n){function r(e){return i(e)&&s.call(e,"callee")&&(!c.call(e,"callee")||u.call(e)==o)}var i=n(998),o="[object Arguments]",a=Object.prototype,s=a.hasOwnProperty,u=a.toString,c=a.propertyIsEnumerable;e.exports=r},function(e,t,n){function r(e){return o(e)&&i(e)}var i=n(990),o=n(999);e.exports=r},315,346,[1473,993,1002],[1474,1003],314,function(e,t,n){"use strict";function r(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function i(e,t,n){if(e&&c.isObject(e)&&e instanceof r)return e;var i=new r;return i.parse(e,t,n),i}function o(e){return c.isString(e)&&(e=i(e)),e instanceof r?e.format():r.prototype.format.call(e)}function a(e,t){return i(e,!1,!0).resolve(t)}function s(e,t){return e?i(e,!1,!0).resolveObject(t):t}var u=n(1005),c=n(1006);t.parse=i,t.resolve=a,t.resolveObject=s,t.format=o,t.Url=r;var l=/^([a-z0-9.+-]+:)/i,p=/:[0-9]*$/,f=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,h=["<",">",'"',"`"," ","\r","\n","\t"],d=["{","}","|","\\","^","`"].concat(h),m=["'"].concat(d),y=["%","/","?",";","#"].concat(m),v=["/","?","#"],g=255,_=/^[+a-z0-9A-Z_-]{0,63}$/,b=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,x={javascript:!0,"javascript:":!0},w={javascript:!0,"javascript:":!0},k={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},S=n(1007);r.prototype.parse=function(e,t,n){if(!c.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e.indexOf("?"),i=r!==-1&&r127?"x":j[N];if(!R.match(_)){var B=P.slice(0,A),L=P.slice(A+1),z=j.match(b);z&&(B.push(z[1]),L.unshift(z[2])),L.length&&(s="/"+L.join(".")+s),this.hostname=B.join(".");break}}}this.hostname.length>g?this.hostname="":this.hostname=this.hostname.toLowerCase(),M||(this.hostname=u.toASCII(this.hostname));var q=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+q,this.href+=this.host,M&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!x[d])for(var A=0,I=m.length;A0)&&n.host.split("@");E&&(n.auth=E.shift(),n.host=n.hostname=E.shift())}return n.search=e.search,n.query=e.query,c.isNull(n.pathname)&&c.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!x.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var C=x.slice(-1)[0],A=(n.host||e.host||x.length>1)&&("."===C||".."===C)||""===C,T=0,O=x.length;O>=0;O--)C=x[O],"."===C?x.splice(O,1):".."===C?(x.splice(O,1),T++):T&&(x.splice(O,1),T--);if(!_&&!b)for(;T--;T)x.unshift("..");!_||""===x[0]||x[0]&&"/"===x[0].charAt(0)||x.unshift(""),A&&"/"!==x.join("/").substr(-1)&&x.push("");var D=""===x[0]||x[0]&&"/"===x[0].charAt(0);if(S){n.hostname=n.host=D?"":x.length?x.shift():"";var E=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");E&&(n.auth=E.shift(),n.host=n.hostname=E.shift())}return _=_||n.host&&x.length,_&&!D&&x.unshift(""),x.length?n.pathname=x.join("/"):(n.pathname=null,n.path=null),c.isNull(n.pathname)&&c.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},r.prototype.parseHost=function(){var e=this.host,t=p.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){var r;(function(e,i){!function(o){function a(e){throw RangeError(P[e])}function s(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function u(e,t){var n=e.split("@"),r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(M,".");var i=e.split("."),o=s(i,t).join(".");return r+o}function c(e){for(var t,n,r=[],i=0,o=e.length;i=55296&&t<=56319&&i65535&&(e-=65536,t+=R(e>>>10&1023|55296),e=56320|1023&e),t+=R(e)}).join("")}function p(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:x}function f(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function h(e,t,n){var r=0;for(e=n?j(e/E):e>>1,e+=j(e/t);e>I*k>>1;r+=x)e=j(e/I);return j(r+(I+1)*e/(e+S))}function d(e){var t,n,r,i,o,s,u,c,f,d,m=[],y=e.length,v=0,g=A,_=C;for(n=e.lastIndexOf(T),n<0&&(n=0),r=0;r=128&&a("not-basic"),m.push(e.charCodeAt(r));for(i=n>0?n+1:0;i=y&&a("invalid-input"),c=p(e.charCodeAt(i++)),(c>=x||c>j((b-v)/s))&&a("overflow"),v+=c*s,f=u<=_?w:u>=_+k?k:u-_,!(cj(b/d)&&a("overflow"),s*=d;t=m.length+1,_=h(v-o,t,0==o),j(v/t)>b-g&&a("overflow"),g+=j(v/t),v%=t,m.splice(v++,0,g)}return l(m)}function m(e){var t,n,r,i,o,s,u,l,p,d,m,y,v,g,_,S=[];for(e=c(e),y=e.length,t=A,n=0,o=C,s=0;s=t&&mj((b-n)/v)&&a("overflow"),n+=(u-t)*v,t=u,s=0;sb&&a("overflow"),m==t){for(l=n,p=x;d=p<=o?w:p>=o+k?k:p-o,!(l= 0x80 (not a basic code point)","invalid-input":"Invalid input"},I=x-w,j=Math.floor,R=String.fromCharCode;_={version:"1.3.2",ucs2:{decode:c,encode:l},decode:d,encode:m,toASCII:v,toUnicode:y},r=function(){return _}.call(t,n,t,e),!(void 0!==r&&(e.exports=r))}(this)}).call(t,n(318)(e),function(){return this}())},function(e,t){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){"use strict";t.decode=t.parse=n(1008),t.encode=t.stringify=n(1009)},function(e,t){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,r,i){t=t||"&",r=r||"=";var o={};if("string"!=typeof e||0===e.length)return o;var a=/\+/g;e=e.split(t);var s=1e3;i&&"number"==typeof i.maxKeys&&(s=i.maxKeys);var u=e.length;s>0&&u>s&&(u=s);for(var c=0;c=0?(l=d.substr(0,m),p=d.substr(m+1)):(l=d,p=""),f=decodeURIComponent(l),h=decodeURIComponent(p),n(o,f)?Array.isArray(o[f])?o[f].push(h):o[f]=[o[f],h]:o[f]=h}return o}},function(e,t){"use strict";var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,r,i){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map(function(i){var o=encodeURIComponent(n(i))+r;return Array.isArray(e[i])?e[i].map(function(e){return o+encodeURIComponent(n(e))}).join(t):o+encodeURIComponent(n(e[i]))}).join(t):i?encodeURIComponent(n(i))+r+encodeURIComponent(n(e)):""}},function(e,t,n){e.exports={default:n(1011),__esModule:!0}},function(e,t,n){n(943),n(930),e.exports=n(1012)},function(e,t,n){var r=n(912),i=n(1013);e.exports=n(907).getIterator=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return r(t.call(e))}},[1428,1014,941,935,907],[1419,895,941],function(e,t,n){e.exports={default:n(1016),__esModule:!0}},function(e,t,n){n(959),n(930),n(943),n(1017),e.exports=n(907).Promise},[1434,933,902,908,1014,906,913,909,1018,1019,1022,1023,1025,941,1026,940,1027,907,1028],205,[1435,908,1020,1021,912,897,1013],[1425,912],[1426,935,941],[1436,912,909,941],[1437,908,1024,939,917,902,895],78,[1438,902,1023,895],function(e,t,n){var r=n(910);e.exports=function(e,t,n){for(var i in t)n&&e[i]?e[i]=t[i]:r(e,i,t[i]);return e}},function(e,t,n){"use strict";var r=n(902),i=n(907),o=n(911),a=n(915),s=n(941)("species");e.exports=function(e){var t="function"==typeof i[e]?i[e]:r[e];a&&t&&!t[s]&&o.f(t,s,{configurable:!0,get:function(){return this}})}},[1429,941],function(e,t){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(1031),o=r(i);t.default=function(){function e(e,t){for(var n=0;n=0,o=i&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n(293),i)r.regeneratorRuntime=o;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}}).call(t,function(){return this}())},function(e,t,n){n(1037),e.exports=self.fetch.bind(self)},function(e,t){!function(e){"use strict";function t(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function n(e){return"string"!=typeof e&&(e=String(e)),e}function r(e){this.map={},e instanceof r?e.forEach(function(e,t){this.append(t,e)},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function i(e){return e.bodyUsed?Promise.reject(new TypeError("Already read")):void(e.bodyUsed=!0)}function o(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function a(e){var t=new FileReader;return t.readAsArrayBuffer(e),o(t)}function s(e){var t=new FileReader;return t.readAsText(e),o(t)}function u(){return this.bodyUsed=!1,this._initBody=function(e){if(this._bodyInit=e,"string"==typeof e)this._bodyText=e;else if(d.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(d.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(e){if(!d.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(e))throw new Error("unsupported BodyInit type")}else this._bodyText="";this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type&&this.headers.set("content-type",this._bodyBlob.type))},d.blob?(this.blob=function(){var e=i(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this.blob().then(a)},this.text=function(){var e=i(this);if(e)return e;if(this._bodyBlob)return s(this._bodyBlob);if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)}):this.text=function(){var e=i(this);return e?e:Promise.resolve(this._bodyText)},d.formData&&(this.formData=function(){return this.text().then(p)}),this.json=function(){return this.text().then(JSON.parse)},this}function c(e){var t=e.toUpperCase();return m.indexOf(t)>-1?t:e}function l(e,t){t=t||{};var n=t.body;if(l.prototype.isPrototypeOf(e)){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new r(e.headers)),this.method=e.method,this.mode=e.mode,n||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=e;if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new r(t.headers)),this.method=c(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function p(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}}),t}function f(e){var t=new r,n=(e.getAllResponseHeaders()||"").trim().split("\n");return n.forEach(function(e){var n=e.trim().split(":"),r=n.shift().trim(),i=n.join(":").trim();t.append(r,i)}),t}function h(e,t){t||(t={}),this.type="default",this.status=t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText,this.headers=t.headers instanceof r?t.headers:new r(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){r.prototype.append=function(e,r){e=t(e),r=n(r);var i=this.map[e];i||(i=[],this.map[e]=i),i.push(r)},r.prototype.delete=function(e){delete this.map[t(e)]},r.prototype.get=function(e){var n=this.map[t(e)];return n?n[0]:null},r.prototype.getAll=function(e){return this.map[t(e)]||[]},r.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},r.prototype.set=function(e,r){this.map[t(e)]=[n(r)]},r.prototype.forEach=function(e,t){Object.getOwnPropertyNames(this.map).forEach(function(n){this.map[n].forEach(function(r){e.call(t,r,n,this)},this)},this)};var d={blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e},m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];l.prototype.clone=function(){return new l(this)},u.call(l.prototype),u.call(h.prototype),h.prototype.clone=function(){return new h(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new r(this.headers),url:this.url})},h.error=function(){var e=new h(null,{status:0,statusText:""});return e.type="error",e};var y=[301,302,303,307,308];h.redirect=function(e,t){if(y.indexOf(t)===-1)throw new RangeError("Invalid status code");return new h(null,{status:t,headers:{location:e}})},e.Headers=r,e.Request=l,e.Response=h,e.fetch=function(e,t){return new Promise(function(n,r){function i(){return"responseURL"in a?a.responseURL:/^X-Request-URL:/m.test(a.getAllResponseHeaders())?a.getResponseHeader("X-Request-URL"):void 0}var o;o=l.prototype.isPrototypeOf(e)&&!t?e:new l(e,t);var a=new XMLHttpRequest;a.onload=function(){var e=1223===a.status?204:a.status;if(e<100||e>599)return void r(new TypeError("Network request failed"));var t={status:e,statusText:a.statusText,headers:f(a),url:i()},o="response"in a?a.response:a.responseText;n(new h(o,t))},a.onerror=function(){r(new TypeError("Network request failed"))},a.ontimeout=function(){r(new TypeError("Network request failed"))},a.open(o.method,o.url,!0),"include"===o.credentials&&(a.withCredentials=!0),"responseType"in a&&d.blob&&(a.responseType="blob"),o.headers.forEach(function(e,t){a.setRequestHeader(t,e)}),a.send("undefined"==typeof o._bodyInit?null:o._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!=typeof self?self:this)},function(e,t,n){e.exports={default:n(1039),__esModule:!0}},function(e,t,n){n(1040);var r=n(907).Object;e.exports=function(e,t){return r.create(e,t)}},[1411,906,937],function(e,t,n){e.exports={default:n(1042),__esModule:!0}},function(e,t,n){n(959),n(943),n(1043),e.exports=n(907).WeakMap},[1439,1044,934,951,923,1047,913,1048],[1430,908,894,888,897,1045],[1431,1046],[1432,913,955,941],[1440,1026,951,912,913,1018,1019,1044,892],function(e,t,n){"use strict";var r=n(902),i=n(906),o=n(951),a=n(916),s=n(910),u=n(1026),c=n(1019),l=n(1018),p=n(913),f=n(940),h=n(911).f,d=n(1044)(0),m=n(915);e.exports=function(e,t,n,y,v,g){var _=r[e],b=_,x=v?"set":"add",w=b&&b.prototype,k={};return m&&"function"==typeof b&&(g||w.forEach&&!a(function(){(new b).entries().next()}))?(b=t(function(t,n){l(t,b,e,"_c"),t._c=new _,void 0!=n&&c(n,v,t[x],t)}),d("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(e){var t="add"==e||"set"==e;e in w&&(!g||"clear"!=e)&&s(b.prototype,e,function(n,r){if(l(this,b,e),!t&&g&&!p(n))return"get"==e&&void 0;var i=this._c[e](0===n?0:n,r);return t?this:i})}),"size"in w&&h(b.prototype,"size",{get:function(){return this._c.size}})):(b=y.getConstructor(t,e,v,x),u(b.prototype,n),o.NEED=!0),f(b,e),k[e]=b,i(i.G+i.W+i.F,k),g||y.setStrong(b,e,v),b}},function(e,t){"use strict";t.__esModule=!0,t.default=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(1051),o=r(i),a=n(1010),s=r(a);t.default=function(){function e(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=(0,s.default)(e);!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(i)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if((0,o.default)(Object(t)))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},function(e,t,n){e.exports={default:n(1052),__esModule:!0}},function(e,t,n){n(943),n(930),e.exports=n(1053)},function(e,t,n){var r=n(1014),i=n(941)("iterator"),o=n(935);e.exports=n(907).isIterable=function(e){var t=Object(e);return void 0!==t[i]||"@@iterator"in t||o.hasOwnProperty(r(t))}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=n(1055),o=r(i);t.default=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&(e.patches=[],e.callback&&e.callback(i)),i}function l(e,t,r,i){if(t!==e){"function"==typeof t.toJSON&&(t=t.toJSON());for(var o=g(t),a=g(e),u=!1,c=!1,p=a.length-1;p>=0;p--){var f=a[p],h=e[f];if(!t.hasOwnProperty(f)||void 0===t[f]&&void 0!==h&&E(t)===!1)r.push({op:"remove",path:i+"/"+n(f)}),c=!0;else{var d=t[f];"object"==typeof h&&null!=h&&"object"==typeof d&&null!=d?l(h,d,r,i+"/"+n(f)):h!==d&&(u=!0,r.push({op:"replace",path:i+"/"+n(f),value:s(d)}))}}if(c||o.length!=a.length)for(var p=0;p=48&&t<=57))return!1;n++}}return!0}function f(e,t,n){for(var r,i,o=[],a=0,s=t.length;a=h){o.push(x[r.op].call(r,l,i,e));break}if(E(l)){if("-"===i)i=l.length;else{if(n&&!p(i))throw new C("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",a-1,r.path,r);i=parseInt(i,10)}if(f>=h){if(n&&"add"===r.op&&i>l.length)throw new C("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",a-1,r.path,r);o.push(b[r.op].call(r,l,i,e));break}}else if(i&&i.indexOf("~")!=-1&&(i=i.replace(/~1/g,"/").replace(/~0/g,"~")),f>=h){o.push(_[r.op].call(r,l,i,e));break}l=l[i]}}return o}function h(e,t){var n=[];return l(e,t,n,""),n}function d(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function m(e){if(void 0===e)return!0;if(e)if(E(e)){for(var t=0,n=e.length;t0)throw new C('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",n,t,r);if(("move"===t.op||"copy"===t.op)&&"string"!=typeof t.from)throw new C("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",n,t,r);if(("add"===t.op||"replace"===t.op||"test"===t.op)&&void 0===t.value)throw new C("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",n,t,r);if(("add"===t.op||"replace"===t.op||"test"===t.op)&&m(t.value))throw new C("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",n,t,r);if(r)if("add"==t.op){var o=t.path.split("/").length,a=i.split("/").length;if(o!==a+1&&o!==a)throw new C("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",n,t,r)}else if("replace"===t.op||"remove"===t.op||"_get"===t.op){if(t.path!==i)throw new C("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",n,t,r)}else if("move"===t.op||"copy"===t.op){var s={op:"_get",path:t.from,value:void 0},u=e.validate([s],r);if(u&&"OPERATION_PATH_UNRESOLVABLE"===u.name)throw new C("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",n,t,r)}}function v(e,t){try{if(!E(e))throw new C("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)t=JSON.parse(JSON.stringify(t)),f.call(this,t,e,!0);else for(var n=0;n=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122?n+=t.charAt(i):o<128?n+=r[o]:o<2048?n+=r[192|o>>6]+r[128|63&o]:o<55296||o>=57344?n+=r[224|o>>12]+r[128|o>>6&63]+r[128|63&o]:(i+=1,o=65536+((1023&o)<<10|1023&t.charCodeAt(i)),n+=r[240|o>>18]+r[128|o>>12&63]+r[128|o>>6&63]+r[128|63&o])}return n},t.compact=function(e,n){if("object"!=typeof e||null===e)return e;var r=n||[],i=r.indexOf(e);if(i!==-1)return r[i];if(r.push(e),Array.isArray(e)){for(var o=[],a=0;a=0&&n.parseArrays&&a<=n.arrayLimit?(r=[],r[a]=s(e,t,n)):r[o]=s(e,t,n)}return r},u=function(e,t,n){if(e){var r=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,u=o.exec(r),c=u?r.slice(0,u.index):r,l=[];if(c){if(!n.plainObjects&&i.call(Object.prototype,c)&&!n.allowPrototypes)return;l.push(c)}for(var p=0;null!==(u=a.exec(r))&&pp?d=p:this.setState({position:a,resized:!0}),this.props.onChange&&this.props.onChange(d),this.setState({draggedSize:d}),n.setState({size:d})}}}}},{key:"onMouseUp",value:function(){this.props.allowResize&&this.state.active&&("function"==typeof this.props.onDragFinished&&this.props.onDragFinished(this.state.draggedSize),this.setState({active:!1}))}},{key:"setSize",value:function(e,t){var n="first"===this.props.primary?this.pane1:this.pane2,r=void 0;n&&(r=e.size||t&&t.draggedSize||e.defaultSize||e.minSize,n.setState({size:r}),e.size!==t.draggedSize&&this.setState({draggedSize:r}))}},{key:"render",value:function(){var e=this,t=this.props,n=t.split,r=t.allowResize,i=r?"":"disabled",o=u({},this.props.style||{},{display:"flex",flex:1,position:"relative",outline:"none",overflow:"hidden",MozUserSelect:"text",WebkitUserSelect:"text",msUserSelect:"text",userSelect:"text"});"vertical"===n?u(o,{flexDirection:"row",height:"100%",position:"absolute",left:0,right:0}):u(o,{flexDirection:"column",height:"100%",minHeight:"100%",position:"absolute",top:0,bottom:0,width:"100%"});var a=this.props.children,s=["SplitPane",this.props.className,n,i],c=this.props.prefixer.prefix(u({},this.props.paneStyle||{},this.props.pane1Style||{})),l=this.props.prefixer.prefix(u({},this.props.paneStyle||{},this.props.pane2Style||{}));return p.default.createElement("div",{className:s.join(" "),style:this.props.prefixer.prefix(o),ref:function(t){e.splitPane=t}},p.default.createElement(_.default,{ref:function(t){e.pane1=t},key:"pane1",className:"Pane1",style:c,split:n,size:"first"===this.props.primary?this.props.size||this.props.defaultSize||this.props.minSize:void 0},a[0]),p.default.createElement(x.default,{ref:function(t){e.resizer=t},key:"resizer",className:i,resizerClassName:this.props.resizerClassName,onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,onTouchEnd:this.onMouseUp,style:this.props.resizerStyle||{},split:n}),p.default.createElement(_.default,{ref:function(t){e.pane2=t},key:"pane2",className:"Pane2",style:l,split:n,size:"second"===this.props.primary?this.props.size||this.props.defaultSize||this.props.minSize:void 0},a[1]))}}]),t}(l.Component);k.propTypes={primary:l.PropTypes.oneOf(["first","second"]),minSize:l.PropTypes.oneOfType([p.default.PropTypes.string,p.default.PropTypes.number]),maxSize:l.PropTypes.oneOfType([p.default.PropTypes.string,p.default.PropTypes.number]),defaultSize:l.PropTypes.oneOfType([p.default.PropTypes.string,p.default.PropTypes.number]),size:l.PropTypes.oneOfType([p.default.PropTypes.string,p.default.PropTypes.number]),allowResize:l.PropTypes.bool,split:l.PropTypes.oneOf(["vertical","horizontal"]),onDragStarted:l.PropTypes.func,onDragFinished:l.PropTypes.func,onChange:l.PropTypes.func,prefixer:l.PropTypes.instanceOf(m.default).isRequired,style:v.default,resizerStyle:v.default,paneStyle:v.default,pane1Style:v.default,pane2Style:v.default,className:l.PropTypes.string,resizerClassName:l.PropTypes.string,children:l.PropTypes.arrayOf(l.PropTypes.node).isRequired},k.defaultProps={split:"vertical",minSize:50,allowResize:!0,prefixer:new m.default({userAgent:w}),primary:"first"},t.default=k,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],n=arguments[2],r=arguments[3];Object.keys(t).forEach(function(i){var o=e[i];Array.isArray(o)?[].concat(t[i]).forEach(function(t){e[i].indexOf(t)===-1&&e[i].splice(o.indexOf(n),r?0:1,t)}):e[i]=t[i]})}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n=t._browserInfo.version}).reduce(function(e,t){return e[t]=!0,e},{}),this._hasPropsRequiringPrefix=Object.keys(this._requiresPrefix).length>0):this._usePrefixAllFallback=!0}return a(e,[{key:"prefix",value:function(e){var t=this;return this._usePrefixAllFallback?(0,u.default)(e):this._hasPropsRequiringPrefix?(Object.keys(e).forEach(function(n){var r=e[n];r instanceof Object&&!Array.isArray(r)?e[n]=t.prefix(r):t._requiresPrefix[n]&&(e[t.jsPrefix+(0,d.default)(n)]=r,t._keepUnprefixed||delete e[n])}),Object.keys(e).forEach(function(n){[].concat(e[n]).forEach(function(r){L.forEach(function(i){o(e,i({property:n,value:r,styles:e,browserInfo:t._browserInfo,prefix:{js:t.jsPrefix,css:t.cssPrefix,keyframes:t.prefixedKeyframes},keepUnprefixed:t._keepUnprefixed,requiresPrefix:t._requiresPrefix}),r,t._keepUnprefixed)})})}),(0,y.default)(e)):e}}],[{key:"prefixAll",value:function(e){return(0,u.default)(e)}}]),e}();t.default=z,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return Object.keys(e).forEach(function(t){var n=e[t];n instanceof Object&&!Array.isArray(n)?e[t]=i(n):Object.keys(s.default).forEach(function(r){var i=s.default[r];i[t]&&(e[r+(0,c.default)(t)]=n)})}),Object.keys(e).forEach(function(t){[].concat(e[t]).forEach(function(n,r){D.forEach(function(r){return o(e,r(t,n))})})}),(0,p.default)(e)}function o(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];Object.keys(t).forEach(function(n){var r=e[n];Array.isArray(r)?[].concat(t[n]).forEach(function(t){var i=r.indexOf(t);i>-1&&e[n].splice(i,1),e[n].push(t)}):e[n]=t[n]})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(1171),s=r(a),u=n(1172),c=r(u),l=n(1173),p=r(l),f=n(1175),h=r(f),d=n(1176),m=r(d),y=n(1179),v=r(y),g=n(1180),_=r(g),b=n(1181),x=r(b),w=n(1182),k=r(w),S=n(1183),E=r(S),C=n(1185),A=r(C),T=n(1186),O=r(T),D=[h.default,m.default,v.default,x.default,k.default,E.default,A.default,O.default,_.default];e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={Webkit:{transform:!0,transformOrigin:!0,transformOriginX:!0,transformOriginY:!0,backfaceVisibility:!0,perspective:!0,perspectiveOrigin:!0,transformStyle:!0,transformOriginZ:!0,animation:!0,animationDelay:!0,animationDirection:!0,animationFillMode:!0,animationDuration:!0,animationIterationCount:!0,animationName:!0,animationPlayState:!0,animationTimingFunction:!0,appearance:!0,userSelect:!0,fontKerning:!0,textEmphasisPosition:!0,textEmphasis:!0,textEmphasisStyle:!0,textEmphasisColor:!0,boxDecorationBreak:!0,clipPath:!0,maskImage:!0,maskMode:!0,maskRepeat:!0,maskPosition:!0,maskClip:!0,maskOrigin:!0,maskSize:!0,maskComposite:!0,mask:!0,maskBorderSource:!0,maskBorderMode:!0,maskBorderSlice:!0,maskBorderWidth:!0,maskBorderOutset:!0,maskBorderRepeat:!0,maskBorder:!0,maskType:!0,textDecorationStyle:!0,textDecorationSkip:!0,textDecorationLine:!0,textDecorationColor:!0,filter:!0,fontFeatureSettings:!0,breakAfter:!0,breakBefore:!0,breakInside:!0,columnCount:!0,columnFill:!0,columnGap:!0,columnRule:!0,columnRuleColor:!0,columnRuleStyle:!0,columnRuleWidth:!0,columns:!0,columnSpan:!0,columnWidth:!0,flex:!0,flexBasis:!0,flexDirection:!0,flexGrow:!0,flexFlow:!0,flexShrink:!0,flexWrap:!0,alignContent:!0,alignItems:!0,alignSelf:!0,justifyContent:!0,order:!0,transition:!0,transitionDelay:!0,transitionDuration:!0,transitionProperty:!0,transitionTimingFunction:!0,backdropFilter:!0,scrollSnapType:!0,scrollSnapPointsX:!0,scrollSnapPointsY:!0,scrollSnapDestination:!0,scrollSnapCoordinate:!0,shapeImageThreshold:!0,shapeImageMargin:!0,shapeImageOutside:!0,hyphens:!0,flowInto:!0,flowFrom:!0,regionFragment:!0,textSizeAdjust:!0},Moz:{appearance:!0,userSelect:!0,boxSizing:!0,textAlignLast:!0,textDecorationStyle:!0,textDecorationSkip:!0,textDecorationLine:!0,textDecorationColor:!0,tabSize:!0,hyphens:!0,fontFeatureSettings:!0,breakAfter:!0,breakBefore:!0,breakInside:!0,columnCount:!0,columnFill:!0,columnGap:!0,columnRule:!0,columnRuleColor:!0,columnRuleStyle:!0,columnRuleWidth:!0,columns:!0,columnSpan:!0,columnWidth:!0},ms:{flex:!0,flexBasis:!1,flexDirection:!0,flexGrow:!1,flexFlow:!0,flexShrink:!1,flexWrap:!0,alignContent:!1,alignItems:!1,alignSelf:!1,justifyContent:!1,order:!1,transform:!0,transformOrigin:!0,transformOriginX:!0,transformOriginY:!0,userSelect:!0,wrapFlow:!0,wrapThrough:!0,wrapMargin:!0,scrollSnapType:!0,scrollSnapPointsX:!0,scrollSnapPointsY:!0,scrollSnapDestination:!0,scrollSnapCoordinate:!0,touchAction:!0,hyphens:!0,flowInto:!0,flowFrom:!0,breakBefore:!0,breakAfter:!0,breakInside:!0,regionFragment:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridTemplate:!0,gridAutoColumns:!0,gridAutoRows:!0,gridAutoFlow:!0,grid:!0,gridRowStart:!0,gridColumnStart:!0,gridRowEnd:!0,gridRow:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnGap:!0,gridRowGap:!0,gridArea:!0,gridGap:!0,textSizeAdjust:!0}},e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return Object.keys(e).sort(function(e,t){return(0,a.default)(e)&&!(0,a.default)(t)?-1:!(0,a.default)(e)&&(0,a.default)(t)?1:0}).reduce(function(t,n){return t[n]=e[n],t},{})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var o=n(1174),a=r(o);e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return null!==e.match(/^(Webkit|Moz|O|ms)/)},e.exports=t.default},function(e,t){"use strict";function n(e,t){if("position"===e&&"sticky"===t)return{position:["-webkit-sticky","sticky"]}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if("string"==typeof t&&!(0,u.default)(t)&&t.indexOf("calc(")>-1)return(0,a.default)(e,t,function(e,t){return t.replace(/calc\(/g,e+"calc(")})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var o=n(1177),a=r(o),s=n(1178),u=r(s);e.exports=t.default},function(e,t){"use strict";function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r=arguments.length<=2||void 0===arguments[2]?function(e,t){return e+t}:arguments[2];return n({},e,["-webkit-","-moz-",""].map(function(e){return r(e,t)}))},e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return Array.isArray(e)&&(e=e.join(",")),null!==e.match(/-webkit-|-moz-|-ms-/)},e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if("cursor"===e&&s[t])return(0,a.default)(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var o=n(1177),a=r(o),s={"zoom-in":!0,"zoom-out":!0,grab:!0,grabbing:!0};e.exports=t.default},function(e,t){"use strict";function n(e,t){if("display"===e&&r[t])return{display:["-webkit-box","-moz-box","-ms-"+t+"box","-webkit-"+t,t]}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;var r={flex:!0,"inline-flex":!0};e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(s[e]&&u[t])return(0,a.default)(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var o=n(1177),a=r(o),s={maxHeight:!0,maxWidth:!0,width:!0,height:!0,columnWidth:!0,minWidth:!0,minHeight:!0},u={"min-content":!0,"max-content":!0,"fill-available":!0,"fit-content":!0,"contain-floats":!0};e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if("string"==typeof t&&!(0,u.default)(t)&&null!==t.match(c))return(0,a.default)(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var o=n(1177),a=r(o),s=n(1178),u=r(s),c=/linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/;e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if("string"==typeof t&&m[e]){var n,r=a(t),o=r.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function(e){return null===e.match(/-moz-|-ms-/)}).join(",");return e.indexOf("Webkit")>-1?i({},e,o):(n={},i(n,"Webkit"+(0,l.default)(e),o),i(n,e,r),n)}}function a(e){if((0,f.default)(e))return e;var t=e.split(/,(?![^()]*(?:\([^()]*\))?\))/g);return t.forEach(function(e,n){t[n]=Object.keys(d.default).reduce(function(t,n){var r="-"+n.toLowerCase()+"-";return Object.keys(d.default[n]).forEach(function(n){var i=(0,u.default)(n);e.indexOf(i)>-1&&"order"!==i&&(t=e.replace(i,r+i)+","+t)}),t},e)}),t.join(",")}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var s=n(1184),u=r(s),c=n(1172),l=r(c),p=n(1178),f=r(p),h=n(1171),d=r(h),m={transition:!0,transitionProperty:!0,WebkitTransition:!0,WebkitTransitionProperty:!0};e.exports=t.default},function(e,t){"use strict";function n(e){return e in o?o[e]:o[e]=e.replace(r,"-$&").toLowerCase().replace(i,"-ms-")}var r=/[A-Z]/g,i=/^ms-/,o={};e.exports=n},function(e,t){"use strict";function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){if(o[e])return n({},o[e],i[t]||t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i={"space-around":"distribute","space-between":"justify","flex-start":"start","flex-end":"end"},o={alignContent:"msFlexLinePack",alignSelf:"msFlexItemAlign",alignItems:"msFlexAlign",justifyContent:"msFlexPack",order:"msFlexOrder",flexGrow:"msFlexPositive",flexShrink:"msFlexNegative",flexBasis:"msPreferredSize"};e.exports=t.default},function(e,t){"use strict";function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){return"flexDirection"===e&&"string"==typeof t?{WebkitBoxOrient:t.indexOf("column")>-1?"vertical":"horizontal",WebkitBoxDirection:t.indexOf("reverse")>-1?"reverse":"normal"}:o[e]?n({},o[e],i[t]||t):void 0}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i={"space-around":"justify","space-between":"justify","flex-start":"start","flex-end":"end","wrap-reverse":"multiple",wrap:"multiple"},o={alignItems:"WebkitBoxAlign",justifyContent:"WebkitBoxPack",flexWrap:"WebkitBoxLines"};e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(1188),o=r(i),a={Webkit:["chrome","safari","ios","android","phantom","opera","webos","blackberry","bada","tizen","chromium","vivaldi"],Moz:["firefox","seamonkey","sailfish"],ms:["msie","msedge"]},s={chrome:[["chrome"],["chromium"]],safari:[["safari"]],firefox:[["firefox"]],edge:[["msedge"]],opera:[["opera"],["vivaldi"]],ios_saf:[["ios","mobile"],["ios","tablet"]],ie:[["msie"]],op_mini:[["opera","mobile"],["opera","tablet"]],and_uc:[["android","mobile"],["android","tablet"]],android:[["android","mobile"],["android","tablet"]]},u=function(e){if(e.firefox)return"firefox";var t="";return Object.keys(s).forEach(function(n){s[n].forEach(function(r){var i=0;r.forEach(function(t){e[t]&&(i+=1)}),r.length===i&&(t=n)})}),t};t.default=function(e){if(!e)return!1;var t=o.default._detect(e);return Object.keys(a).forEach(function(e){a[e].forEach(function(n){t[n]&&(t.prefix={inline:e,css:"-"+e.toLowerCase()+"-"})})}),t.browser=u(t),t.version=t.version?parseFloat(t.version):parseInt(parseFloat(t.osversion),10),t.osversion=parseFloat(t.osversion),"ios_saf"===t.browser&&t.version>t.osversion&&(t.version=t.osversion,t.safari=!0),"android"===t.browser&&t.chrome&&t.version>37&&(t.browser="and_chr"),"android"===t.browser&&t.osversion<5&&(t.version=t.osversion),t},e.exports=t.default},function(e,t,n){/*! + * Bowser - a browser detector + * https://github.com/ded/bowser + * MIT License | (c) Dustin Diaz 2015 + */ +!function(t,r,i){"undefined"!=typeof e&&e.exports?e.exports=i():n(1189)(r,i)}(this,"bowser",function(){function e(e){function t(t){var n=e.match(t);return n&&n.length>1&&n[1]||""}function n(t){var n=e.match(t);return n&&n.length>1&&n[2]||""}function r(e){switch(e){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}var i,o=t(/(ipod|iphone|ipad)/i).toLowerCase(),s=/like android/i.test(e),u=!s&&/android/i.test(e),c=/nexus\s*[0-6]\s*/i.test(e),l=!c&&/nexus\s*[0-9]+/i.test(e),p=/CrOS/.test(e),f=/silk/i.test(e),h=/sailfish/i.test(e),d=/tizen/i.test(e),m=/(web|hpw)os/i.test(e),y=/windows phone/i.test(e),v=(/SamsungBrowser/i.test(e),!y&&/windows/i.test(e)),g=!o&&!f&&/macintosh/i.test(e),_=!u&&!h&&!d&&!m&&/linux/i.test(e),b=t(/edge\/(\d+(\.\d+)?)/i),x=t(/version\/(\d+(\.\d+)?)/i),w=/tablet/i.test(e),k=!w&&/[^-]mobi/i.test(e),S=/xbox/i.test(e);/opera/i.test(e)?i={name:"Opera",opera:a,version:x||t(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr|opios/i.test(e)?i={name:"Opera",opera:a,version:t(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||x}:/SamsungBrowser/i.test(e)?i={name:"Samsung Internet for Android",samsungBrowser:a,version:x||t(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/coast/i.test(e)?i={name:"Opera Coast",coast:a,version:x||t(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(e)?i={name:"Yandex Browser",yandexbrowser:a,version:x||t(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(e)?i={name:"UC Browser",ucbrowser:a,version:t(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(e)?i={name:"Maxthon",maxthon:a,version:t(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(e)?i={name:"Epiphany",epiphany:a,version:t(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(e)?i={name:"Puffin",puffin:a,version:t(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(e)?i={name:"Sleipnir",sleipnir:a,version:t(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(e)?i={name:"K-Meleon",kMeleon:a,version:t(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:y?(i={name:"Windows Phone",windowsphone:a},b?(i.msedge=a,i.version=b):(i.msie=a,i.version=t(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(e)?i={name:"Internet Explorer",msie:a,version:t(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:p?i={name:"Chrome",chromeos:a,chromeBook:a,chrome:a,version:t(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/chrome.+? edge/i.test(e)?i={name:"Microsoft Edge",msedge:a,version:b}:/vivaldi/i.test(e)?i={name:"Vivaldi",vivaldi:a,version:t(/vivaldi\/(\d+(\.\d+)?)/i)||x}:h?i={name:"Sailfish",sailfish:a,version:t(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(e)?i={name:"SeaMonkey",seamonkey:a,version:t(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(e)?(i={name:"Firefox",firefox:a,version:t(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(e)&&(i.firefoxos=a)):f?i={name:"Amazon Silk",silk:a,version:t(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(e)?i={name:"PhantomJS",phantom:a,version:t(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(e)?i={name:"SlimerJS",slimer:a,version:t(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(e)||/rim\stablet/i.test(e)?i={name:"BlackBerry",blackberry:a,version:x||t(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:m?(i={name:"WebOS",webos:a,version:x||t(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(e)&&(i.touchpad=a)):/bada/i.test(e)?i={name:"Bada",bada:a,version:t(/dolfin\/(\d+(\.\d+)?)/i)}:d?i={name:"Tizen",tizen:a,version:t(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||x}:/qupzilla/i.test(e)?i={name:"QupZilla",qupzilla:a,version:t(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||x}:/chromium/i.test(e)?i={name:"Chromium",chromium:a,version:t(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||x}:/chrome|crios|crmo/i.test(e)?i={name:"Chrome",chrome:a,version:t(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:u?i={name:"Android",version:x}:/safari|applewebkit/i.test(e)?(i={name:"Safari",safari:a},x&&(i.version=x)):o?(i={name:"iphone"==o?"iPhone":"ipad"==o?"iPad":"iPod"},x&&(i.version=x)):i=/googlebot/i.test(e)?{name:"Googlebot",googlebot:a,version:t(/googlebot\/(\d+(\.\d+))/i)||x}:{name:t(/^(.*)\/(.*) /),version:n(/^(.*)\/(.*) /)},!i.msedge&&/(apple)?webkit/i.test(e)?(/(apple)?webkit\/537\.36/i.test(e)?(i.name=i.name||"Blink",i.blink=a):(i.name=i.name||"Webkit",i.webkit=a),!i.version&&x&&(i.version=x)):!i.opera&&/gecko\//i.test(e)&&(i.name=i.name||"Gecko",i.gecko=a,i.version=i.version||t(/gecko\/(\d+(\.\d+)?)/i)),i.windowsphone||i.msedge||!u&&!i.silk?i.windowsphone||i.msedge||!o?g?i.mac=a:S?i.xbox=a:v?i.windows=a:_&&(i.linux=a):(i[o]=a,i.ios=a):i.android=a;var E="";i.windows?E=r(t(/Windows ((NT|XP)( \d\d?.\d)?)/i)):i.windowsphone?E=t(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):i.mac?(E=t(/Mac OS X (\d+([_\.\s]\d+)*)/i),E=E.replace(/[_\s]/g,".")):o?(E=t(/os (\d+([_\s]\d+)*) like mac os x/i),E=E.replace(/[_\s]/g,".")):u?E=t(/android[ \/-](\d+(\.\d+)*)/i):i.webos?E=t(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):i.blackberry?E=t(/rim\stablet\sos\s(\d+(\.\d+)*)/i):i.bada?E=t(/bada\/(\d+(\.\d+)*)/i):i.tizen&&(E=t(/tizen[\/\s](\d+(\.\d+)*)/i)),E&&(i.osversion=E);var C=!i.windows&&E.split(".")[0];return w||l||"ipad"==o||u&&(3==C||C>=4&&!k)||i.silk?i.tablet=a:(k||"iphone"==o||"ipod"==o||u||c||i.blackberry||i.webos||i.bada)&&(i.mobile=a),i.msedge||i.msie&&i.version>=10||i.yandexbrowser&&i.version>=15||i.vivaldi&&i.version>=1||i.chrome&&i.version>=20||i.samsungBrowser&&i.version>=4||i.firefox&&i.version>=20||i.safari&&i.version>=6||i.opera&&i.version>=10||i.ios&&i.osversion&&i.osversion.split(".")[0]>=6||i.blackberry&&i.version>=10.1||i.chromium&&i.version>=20?i.a=a:i.msie&&i.version<10||i.chrome&&i.version<20||i.firefox&&i.version<20||i.safari&&i.version<6||i.opera&&i.version<10||i.ios&&i.osversion&&i.osversion.split(".")[0]<6||i.chromium&&i.version<20?i.c=a:i.x=a,i}function t(e){return e.split(".").length}function n(e,t){var n,r=[];if(Array.prototype.map)return Array.prototype.map.call(e,t);for(n=0;n=0;){if(i[0][r]>i[1][r])return 1;if(i[0][r]!==i[1][r])return-1;if(0===r)return 0}}function i(t,n,i){var o=s;"string"==typeof n&&(i=n,n=void 0),void 0===n&&(n=!1),i&&(o=e(i));var a=""+o.version;for(var u in t)if(t.hasOwnProperty(u)&&o[u]){if("string"!=typeof t[u])throw new Error("Browser version in the minVersion map should be a string: "+u+": "+String(t));return r([a,t[u]])<0}return n}function o(e,t,n){return!i(e,t,n)}var a=!0,s=e("undefined"!=typeof navigator?navigator.userAgent||"":"");return s.test=function(e){for(var t=0;t-1&&("firefox"===o&&a<15||"chrome"===o&&a<25||"safari"===o&&a<6.1||"ios_saf"===o&&a<7))return i({},t,(0,s.default)(n.replace(/calc\(/g,u+"calc("),n,c))}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a=n(1193),s=r(a);e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=e.property,n=e.value,r=e.browserInfo,i=r.browser,o=r.version,u=e.prefix.css,c=e.keepUnprefixed;if("cursor"===t&&s[n]&&("firefox"===i&&o<24||"chrome"===i&&o<37||"safari"===i&&o<9||"opera"===i&&o<24))return{cursor:(0,a.default)(u+n,n,c)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var o=n(1193),a=r(o),s={"zoom-in":!0,"zoom-out":!0};e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=e.property,n=e.value,r=e.browserInfo.browser,i=e.prefix.css,o=e.keepUnprefixed;if("cursor"===t&&s[n]&&("firefox"===r||"chrome"===r||"safari"===r||"opera"===r))return{cursor:(0,a.default)(i+n,n,o)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var o=n(1193),a=r(o),s={grab:!0,grabbing:!0};e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=e.property,n=e.value,r=e.browserInfo,i=r.browser,o=r.version,u=e.prefix.css,c=e.keepUnprefixed;if("display"===t&&s[n]&&("chrome"===i&&o<29&&o>20||("safari"===i||"ios_saf"===i)&&o<9&&o>6||"opera"===i&&(15==o||16==o)))return{display:(0,a.default)(u+n,n,c)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var o=n(1193),a=r(o),s={flex:!0,"inline-flex":!0};e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){var t=e.property,n=e.value,r=e.prefix.css,o=e.keepUnprefixed;if(u[t]&&c[n])return i({},t,(0,s.default)(r+n,n,o))}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a=n(1193),s=r(a),u={maxHeight:!0,maxWidth:!0,width:!0,height:!0,columnWidth:!0,minWidth:!0,minHeight:!0},c={"min-content":!0,"max-content":!0,"fill-available":!0,"fit-content":!0,"contain-floats":!0};e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){var t=e.property,n=e.value,r=e.browserInfo,o=r.browser,a=r.version,c=e.prefix.css,l=e.keepUnprefixed;if("string"==typeof n&&null!==n.match(u)&&("firefox"===o&&a<16||"chrome"===o&&a<26||("safari"===o||"ios_saf"===o)&&a<7||("opera"===o||"op_mini"===o)&&a<12.1||"android"===o&&a<4.4||"and_uc"===o))return i({},t,(0,s.default)(c+n,n,l))}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a=n(1193),s=r(a),u=/linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/;e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){var t=e.property,n=e.value,r=e.prefix.css,o=e.requiresPrefix,s=e.keepUnprefixed,c=(0,l.default)(t);if("string"==typeof n&&p[c]){var f=function(){var e=Object.keys(o).map(function(e){return(0,u.default)(e)}),a=n.split(/,(?![^()]*(?:\([^()]*\))?\))/g);return e.forEach(function(e){a.forEach(function(t,n){t.indexOf(e)>-1&&"order"!==e&&(a[n]=t.replace(e,r+e)+(s?","+t:""))})}),{v:i({},t,a.join(","))}}();if("object"===("undefined"==typeof f?"undefined":a(f)))return f.v}}Object.defineProperty(t,"__esModule",{value:!0});var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};t.default=o;var s=n(1184),u=r(s),c=n(1201),l=r(c),p={transition:!0,transitionProperty:!0};e.exports=t.default},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.replace(/^(ms|Webkit|Moz|O)/,"");return t.charAt(0).toLowerCase()+t.slice(1)},e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){var t=e.property,n=e.value,r=e.styles,o=e.browserInfo,a=o.browser,l=o.version,p=e.prefix.css,f=e.keepUnprefixed;if((c[t]||"display"===t&&"string"==typeof n&&n.indexOf("flex")>-1)&&("ie_mob"===a||"ie"===a)&&10==l){if(f||Array.isArray(r[t])||delete r[t],"display"===t&&u[n])return{display:(0,s.default)(p+u[n],n,f)};if(c[t])return i({},c[t],u[n]||n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a=n(1193),s=r(a),u={"space-around":"distribute","space-between":"justify","flex-start":"start","flex-end":"end",flex:"flexbox","inline-flex":"inline-flexbox"},c={alignContent:"msFlexLinePack",alignSelf:"msFlexItemAlign",alignItems:"msFlexAlign",justifyContent:"msFlexPack",order:"msFlexOrder",flexGrow:"msFlexPositive",flexShrink:"msFlexNegative",flexBasis:"msPreferredSize"};e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){var t=e.property,n=e.value,r=e.styles,o=e.browserInfo,a=o.browser,l=o.version,f=e.prefix.css,h=e.keepUnprefixed;if((p.indexOf(t)>-1||"display"===t&&"string"==typeof n&&n.indexOf("flex")>-1)&&("firefox"===a&&l<22||"chrome"===a&&l<21||("safari"===a||"ios_saf"===a)&&l<=6.1||"android"===a&&l<4.4||"and_uc"===a)){if(h||Array.isArray(r[t])||delete r[t],"flexDirection"===t&&"string"==typeof n)return{WebkitBoxOrient:n.indexOf("column")>-1?"vertical":"horizontal",WebkitBoxDirection:n.indexOf("reverse")>-1?"reverse":"normal"};if("display"===t&&u[n])return{display:(0,s.default)(f+u[n],n,h)};if(c[t])return i({},c[t],u[n]||n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a=n(1193),s=r(a),u={"space-around":"justify","space-between":"justify","flex-start":"start","flex-end":"end","wrap-reverse":"multiple",wrap:"multiple",flex:"box","inline-flex":"inline-box"},c={alignItems:"WebkitBoxAlign",justifyContent:"WebkitBoxPack",flexWrap:"WebkitBoxLines"},l=["alignContent","alignSelf","order","flexGrow","flexShrink","flexBasis","flexDirection"],p=Object.keys(c).concat(l);e.exports=t.default},function(e,t,n){var r=n(1205),i=n(621);e.exports=function(e,t,n){var i=e[t];if(i){var o=[];if(Object.keys(i).forEach(function(e){r.indexOf(e)===-1&&o.push(e)}),o.length)throw new Error("Prop "+t+" passed to "+n+". Has invalid keys "+o.join(", "))}},e.exports.isRequired=function(t,n,r){if(!t[n])throw new Error("Prop "+n+" passed to "+r+" is required");return e.exports(t,n,r)},e.exports.supportingArrays=i.PropTypes.oneOfType([i.PropTypes.arrayOf(e.exports),e.exports])},function(e,t){e.exports=["alignContent","MozAlignContent","WebKitAlignContent","MSAlignContent","OAlignContent","alignItems","MozAlignItems","WebKitAlignItems","MSAlignItems","OAlignItems","alignSelf","MozAlignSelf","WebKitAlignSelf","MSAlignSelf","OAlignSelf","all","MozAll","WebKitAll","MSAll","OAll","animation","MozAnimation","WebKitAnimation","MSAnimation","OAnimation","animationDelay","MozAnimationDelay","WebKitAnimationDelay","MSAnimationDelay","OAnimationDelay","animationDirection","MozAnimationDirection","WebKitAnimationDirection","MSAnimationDirection","OAnimationDirection","animationDuration","MozAnimationDuration","WebKitAnimationDuration","MSAnimationDuration","OAnimationDuration","animationFillMode","MozAnimationFillMode","WebKitAnimationFillMode","MSAnimationFillMode","OAnimationFillMode","animationIterationCount","MozAnimationIterationCount","WebKitAnimationIterationCount","MSAnimationIterationCount","OAnimationIterationCount","animationName","MozAnimationName","WebKitAnimationName","MSAnimationName","OAnimationName","animationPlayState","MozAnimationPlayState","WebKitAnimationPlayState","MSAnimationPlayState","OAnimationPlayState","animationTimingFunction","MozAnimationTimingFunction","WebKitAnimationTimingFunction","MSAnimationTimingFunction","OAnimationTimingFunction","backfaceVisibility","MozBackfaceVisibility","WebKitBackfaceVisibility","MSBackfaceVisibility","OBackfaceVisibility","background","MozBackground","WebKitBackground","MSBackground","OBackground","backgroundAttachment","MozBackgroundAttachment","WebKitBackgroundAttachment","MSBackgroundAttachment","OBackgroundAttachment","backgroundBlendMode","MozBackgroundBlendMode","WebKitBackgroundBlendMode","MSBackgroundBlendMode","OBackgroundBlendMode","backgroundClip","MozBackgroundClip","WebKitBackgroundClip","MSBackgroundClip","OBackgroundClip","backgroundColor","MozBackgroundColor","WebKitBackgroundColor","MSBackgroundColor","OBackgroundColor","backgroundImage","MozBackgroundImage","WebKitBackgroundImage","MSBackgroundImage","OBackgroundImage","backgroundOrigin","MozBackgroundOrigin","WebKitBackgroundOrigin","MSBackgroundOrigin","OBackgroundOrigin","backgroundPosition","MozBackgroundPosition","WebKitBackgroundPosition","MSBackgroundPosition","OBackgroundPosition","backgroundRepeat","MozBackgroundRepeat","WebKitBackgroundRepeat","MSBackgroundRepeat","OBackgroundRepeat","backgroundSize","MozBackgroundSize","WebKitBackgroundSize","MSBackgroundSize","OBackgroundSize","blockSize","MozBlockSize","WebKitBlockSize","MSBlockSize","OBlockSize","border","MozBorder","WebKitBorder","MSBorder","OBorder","borderBlockEnd","MozBorderBlockEnd","WebKitBorderBlockEnd","MSBorderBlockEnd","OBorderBlockEnd","borderBlockEndColor","MozBorderBlockEndColor","WebKitBorderBlockEndColor","MSBorderBlockEndColor","OBorderBlockEndColor","borderBlockEndStyle","MozBorderBlockEndStyle","WebKitBorderBlockEndStyle","MSBorderBlockEndStyle","OBorderBlockEndStyle","borderBlockEndWidth","MozBorderBlockEndWidth","WebKitBorderBlockEndWidth","MSBorderBlockEndWidth","OBorderBlockEndWidth","borderBlockStart","MozBorderBlockStart","WebKitBorderBlockStart","MSBorderBlockStart","OBorderBlockStart","borderBlockStartColor","MozBorderBlockStartColor","WebKitBorderBlockStartColor","MSBorderBlockStartColor","OBorderBlockStartColor","borderBlockStartStyle","MozBorderBlockStartStyle","WebKitBorderBlockStartStyle","MSBorderBlockStartStyle","OBorderBlockStartStyle","borderBlockStartWidth","MozBorderBlockStartWidth","WebKitBorderBlockStartWidth","MSBorderBlockStartWidth","OBorderBlockStartWidth","borderBottom","MozBorderBottom","WebKitBorderBottom","MSBorderBottom","OBorderBottom","borderBottomColor","MozBorderBottomColor","WebKitBorderBottomColor","MSBorderBottomColor","OBorderBottomColor","borderBottomLeftRadius","MozBorderBottomLeftRadius","WebKitBorderBottomLeftRadius","MSBorderBottomLeftRadius","OBorderBottomLeftRadius","borderBottomRightRadius","MozBorderBottomRightRadius","WebKitBorderBottomRightRadius","MSBorderBottomRightRadius","OBorderBottomRightRadius","borderBottomStyle","MozBorderBottomStyle","WebKitBorderBottomStyle","MSBorderBottomStyle","OBorderBottomStyle","borderBottomWidth","MozBorderBottomWidth","WebKitBorderBottomWidth","MSBorderBottomWidth","OBorderBottomWidth","borderCollapse","MozBorderCollapse","WebKitBorderCollapse","MSBorderCollapse","OBorderCollapse","borderColor","MozBorderColor","WebKitBorderColor","MSBorderColor","OBorderColor","borderImage","MozBorderImage","WebKitBorderImage","MSBorderImage","OBorderImage","borderImageOutset","MozBorderImageOutset","WebKitBorderImageOutset","MSBorderImageOutset","OBorderImageOutset","borderImageRepeat","MozBorderImageRepeat","WebKitBorderImageRepeat","MSBorderImageRepeat","OBorderImageRepeat","borderImageSlice","MozBorderImageSlice","WebKitBorderImageSlice","MSBorderImageSlice","OBorderImageSlice","borderImageSource","MozBorderImageSource","WebKitBorderImageSource","MSBorderImageSource","OBorderImageSource","borderImageWidth","MozBorderImageWidth","WebKitBorderImageWidth","MSBorderImageWidth","OBorderImageWidth","borderInlineEnd","MozBorderInlineEnd","WebKitBorderInlineEnd","MSBorderInlineEnd","OBorderInlineEnd","borderInlineEndColor","MozBorderInlineEndColor","WebKitBorderInlineEndColor","MSBorderInlineEndColor","OBorderInlineEndColor","borderInlineEndStyle","MozBorderInlineEndStyle","WebKitBorderInlineEndStyle","MSBorderInlineEndStyle","OBorderInlineEndStyle","borderInlineEndWidth","MozBorderInlineEndWidth","WebKitBorderInlineEndWidth","MSBorderInlineEndWidth","OBorderInlineEndWidth","borderInlineStart","MozBorderInlineStart","WebKitBorderInlineStart","MSBorderInlineStart","OBorderInlineStart","borderInlineStartColor","MozBorderInlineStartColor","WebKitBorderInlineStartColor","MSBorderInlineStartColor","OBorderInlineStartColor","borderInlineStartStyle","MozBorderInlineStartStyle","WebKitBorderInlineStartStyle","MSBorderInlineStartStyle","OBorderInlineStartStyle","borderInlineStartWidth","MozBorderInlineStartWidth","WebKitBorderInlineStartWidth","MSBorderInlineStartWidth","OBorderInlineStartWidth","borderLeft","MozBorderLeft","WebKitBorderLeft","MSBorderLeft","OBorderLeft","borderLeftColor","MozBorderLeftColor","WebKitBorderLeftColor","MSBorderLeftColor","OBorderLeftColor","borderLeftStyle","MozBorderLeftStyle","WebKitBorderLeftStyle","MSBorderLeftStyle","OBorderLeftStyle","borderLeftWidth","MozBorderLeftWidth","WebKitBorderLeftWidth","MSBorderLeftWidth","OBorderLeftWidth","borderRadius","MozBorderRadius","WebKitBorderRadius","MSBorderRadius","OBorderRadius","borderRight","MozBorderRight","WebKitBorderRight","MSBorderRight","OBorderRight","borderRightColor","MozBorderRightColor","WebKitBorderRightColor","MSBorderRightColor","OBorderRightColor","borderRightStyle","MozBorderRightStyle","WebKitBorderRightStyle","MSBorderRightStyle","OBorderRightStyle","borderRightWidth","MozBorderRightWidth","WebKitBorderRightWidth","MSBorderRightWidth","OBorderRightWidth","borderSpacing","MozBorderSpacing","WebKitBorderSpacing","MSBorderSpacing","OBorderSpacing","borderStyle","MozBorderStyle","WebKitBorderStyle","MSBorderStyle","OBorderStyle","borderTop","MozBorderTop","WebKitBorderTop","MSBorderTop","OBorderTop","borderTopColor","MozBorderTopColor","WebKitBorderTopColor","MSBorderTopColor","OBorderTopColor","borderTopLeftRadius","MozBorderTopLeftRadius","WebKitBorderTopLeftRadius","MSBorderTopLeftRadius","OBorderTopLeftRadius","borderTopRightRadius","MozBorderTopRightRadius","WebKitBorderTopRightRadius","MSBorderTopRightRadius","OBorderTopRightRadius","borderTopStyle","MozBorderTopStyle","WebKitBorderTopStyle","MSBorderTopStyle","OBorderTopStyle","borderTopWidth","MozBorderTopWidth","WebKitBorderTopWidth","MSBorderTopWidth","OBorderTopWidth","borderWidth","MozBorderWidth","WebKitBorderWidth","MSBorderWidth","OBorderWidth","bottom","MozBottom","WebKitBottom","MSBottom","OBottom","boxDecorationBreak","MozBoxDecorationBreak","WebKitBoxDecorationBreak","MSBoxDecorationBreak","OBoxDecorationBreak","boxShadow","MozBoxShadow","WebKitBoxShadow","MSBoxShadow","OBoxShadow","boxSizing","MozBoxSizing","WebKitBoxSizing","MSBoxSizing","OBoxSizing","breakAfter","MozBreakAfter","WebKitBreakAfter","MSBreakAfter","OBreakAfter","breakBefore","MozBreakBefore","WebKitBreakBefore","MSBreakBefore","OBreakBefore","breakInside","MozBreakInside","WebKitBreakInside","MSBreakInside","OBreakInside","captionSide","MozCaptionSide","WebKitCaptionSide","MSCaptionSide","OCaptionSide","ch","MozCh","WebKitCh","MSCh","OCh","clear","MozClear","WebKitClear","MSClear","OClear","clip","MozClip","WebKitClip","MSClip","OClip","clipPath","MozClipPath","WebKitClipPath","MSClipPath","OClipPath","cm","MozCm","WebKitCm","MSCm","OCm","color","MozColor","WebKitColor","MSColor","OColor","columnCount","MozColumnCount","WebKitColumnCount","MSColumnCount","OColumnCount","columnFill","MozColumnFill","WebKitColumnFill","MSColumnFill","OColumnFill","columnGap","MozColumnGap","WebKitColumnGap","MSColumnGap","OColumnGap","columnRule","MozColumnRule","WebKitColumnRule","MSColumnRule","OColumnRule","columnRuleColor","MozColumnRuleColor","WebKitColumnRuleColor","MSColumnRuleColor","OColumnRuleColor","columnRuleStyle","MozColumnRuleStyle","WebKitColumnRuleStyle","MSColumnRuleStyle","OColumnRuleStyle","columnRuleWidth","MozColumnRuleWidth","WebKitColumnRuleWidth","MSColumnRuleWidth","OColumnRuleWidth","columnSpan","MozColumnSpan","WebKitColumnSpan","MSColumnSpan","OColumnSpan","columnWidth","MozColumnWidth","WebKitColumnWidth","MSColumnWidth","OColumnWidth","columns","MozColumns","WebKitColumns","MSColumns","OColumns","content","MozContent","WebKitContent","MSContent","OContent","counterIncrement","MozCounterIncrement","WebKitCounterIncrement","MSCounterIncrement","OCounterIncrement","counterReset","MozCounterReset","WebKitCounterReset","MSCounterReset","OCounterReset","cursor","MozCursor","WebKitCursor","MSCursor","OCursor","deg","MozDeg","WebKitDeg","MSDeg","ODeg","direction","MozDirection","WebKitDirection","MSDirection","ODirection","display","MozDisplay","WebKitDisplay","MSDisplay","ODisplay","dpcm","MozDpcm","WebKitDpcm","MSDpcm","ODpcm","dpi","MozDpi","WebKitDpi","MSDpi","ODpi","dppx","MozDppx","WebKitDppx","MSDppx","ODppx","em","MozEm","WebKitEm","MSEm","OEm","emptyCells","MozEmptyCells","WebKitEmptyCells","MSEmptyCells","OEmptyCells","ex","MozEx","WebKitEx","MSEx","OEx","filter","MozFilter","WebKitFilter","MSFilter","OFilter","flex","MozFlex","WebKitFlex","MSFlex","OFlex","flexBasis","MozFlexBasis","WebKitFlexBasis","MSFlexBasis","OFlexBasis","flexDirection","MozFlexDirection","WebKitFlexDirection","MSFlexDirection","OFlexDirection","flexFlow","MozFlexFlow","WebKitFlexFlow","MSFlexFlow","OFlexFlow","flexGrow","MozFlexGrow","WebKitFlexGrow","MSFlexGrow","OFlexGrow","flexShrink","MozFlexShrink","WebKitFlexShrink","MSFlexShrink","OFlexShrink","flexWrap","MozFlexWrap","WebKitFlexWrap","MSFlexWrap","OFlexWrap","float","MozFloat","WebKitFloat","MSFloat","OFloat","font","MozFont","WebKitFont","MSFont","OFont","fontFamily","MozFontFamily","WebKitFontFamily","MSFontFamily","OFontFamily","fontFeatureSettings","MozFontFeatureSettings","WebKitFontFeatureSettings","MSFontFeatureSettings","OFontFeatureSettings","fontKerning","MozFontKerning","WebKitFontKerning","MSFontKerning","OFontKerning","fontLanguageOverride","MozFontLanguageOverride","WebKitFontLanguageOverride","MSFontLanguageOverride","OFontLanguageOverride","fontSize","MozFontSize","WebKitFontSize","MSFontSize","OFontSize","fontSizeAdjust","MozFontSizeAdjust","WebKitFontSizeAdjust","MSFontSizeAdjust","OFontSizeAdjust","fontStretch","MozFontStretch","WebKitFontStretch","MSFontStretch","OFontStretch","fontStyle","MozFontStyle","WebKitFontStyle","MSFontStyle","OFontStyle","fontSynthesis","MozFontSynthesis","WebKitFontSynthesis","MSFontSynthesis","OFontSynthesis","fontVariant","MozFontVariant","WebKitFontVariant","MSFontVariant","OFontVariant","fontVariantAlternates","MozFontVariantAlternates","WebKitFontVariantAlternates","MSFontVariantAlternates","OFontVariantAlternates","fontVariantCaps","MozFontVariantCaps","WebKitFontVariantCaps","MSFontVariantCaps","OFontVariantCaps","fontVariantEastAsian","MozFontVariantEastAsian","WebKitFontVariantEastAsian","MSFontVariantEastAsian","OFontVariantEastAsian","fontVariantLigatures","MozFontVariantLigatures","WebKitFontVariantLigatures","MSFontVariantLigatures","OFontVariantLigatures","fontVariantNumeric","MozFontVariantNumeric","WebKitFontVariantNumeric","MSFontVariantNumeric","OFontVariantNumeric","fontVariantPosition","MozFontVariantPosition","WebKitFontVariantPosition","MSFontVariantPosition","OFontVariantPosition","fontWeight","MozFontWeight","WebKitFontWeight","MSFontWeight","OFontWeight","grad","MozGrad","WebKitGrad","MSGrad","OGrad","grid","MozGrid","WebKitGrid","MSGrid","OGrid","gridArea","MozGridArea","WebKitGridArea","MSGridArea","OGridArea","gridAutoColumns","MozGridAutoColumns","WebKitGridAutoColumns","MSGridAutoColumns","OGridAutoColumns","gridAutoFlow","MozGridAutoFlow","WebKitGridAutoFlow","MSGridAutoFlow","OGridAutoFlow","gridAutoRows","MozGridAutoRows","WebKitGridAutoRows","MSGridAutoRows","OGridAutoRows","gridColumn","MozGridColumn","WebKitGridColumn","MSGridColumn","OGridColumn","gridColumnEnd","MozGridColumnEnd","WebKitGridColumnEnd","MSGridColumnEnd","OGridColumnEnd","gridColumnGap","MozGridColumnGap","WebKitGridColumnGap","MSGridColumnGap","OGridColumnGap","gridColumnStart","MozGridColumnStart","WebKitGridColumnStart","MSGridColumnStart","OGridColumnStart","gridGap","MozGridGap","WebKitGridGap","MSGridGap","OGridGap","gridRow","MozGridRow","WebKitGridRow","MSGridRow","OGridRow","gridRowEnd","MozGridRowEnd","WebKitGridRowEnd","MSGridRowEnd","OGridRowEnd","gridRowGap","MozGridRowGap","WebKitGridRowGap","MSGridRowGap","OGridRowGap","gridRowStart","MozGridRowStart","WebKitGridRowStart","MSGridRowStart","OGridRowStart","gridTemplate","MozGridTemplate","WebKitGridTemplate","MSGridTemplate","OGridTemplate","gridTemplateAreas","MozGridTemplateAreas","WebKitGridTemplateAreas","MSGridTemplateAreas","OGridTemplateAreas","gridTemplateColumns","MozGridTemplateColumns","WebKitGridTemplateColumns","MSGridTemplateColumns","OGridTemplateColumns","gridTemplateRows","MozGridTemplateRows","WebKitGridTemplateRows","MSGridTemplateRows","OGridTemplateRows","height","MozHeight","WebKitHeight","MSHeight","OHeight","hyphens","MozHyphens","WebKitHyphens","MSHyphens","OHyphens","hz","MozHz","WebKitHz","MSHz","OHz","imageOrientation","MozImageOrientation","WebKitImageOrientation","MSImageOrientation","OImageOrientation","imageRendering","MozImageRendering","WebKitImageRendering","MSImageRendering","OImageRendering","imageResolution","MozImageResolution","WebKitImageResolution","MSImageResolution","OImageResolution","imeMode","MozImeMode","WebKitImeMode","MSImeMode","OImeMode","in","MozIn","WebKitIn","MSIn","OIn","inherit","MozInherit","WebKitInherit","MSInherit","OInherit","initial","MozInitial","WebKitInitial","MSInitial","OInitial","inlineSize","MozInlineSize","WebKitInlineSize","MSInlineSize","OInlineSize","isolation","MozIsolation","WebKitIsolation","MSIsolation","OIsolation","justifyContent","MozJustifyContent","WebKitJustifyContent","MSJustifyContent","OJustifyContent","khz","MozKhz","WebKitKhz","MSKhz","OKhz","left","MozLeft","WebKitLeft","MSLeft","OLeft","letterSpacing","MozLetterSpacing","WebKitLetterSpacing","MSLetterSpacing","OLetterSpacing","lineBreak","MozLineBreak","WebKitLineBreak","MSLineBreak","OLineBreak","lineHeight","MozLineHeight","WebKitLineHeight","MSLineHeight","OLineHeight","listStyle","MozListStyle","WebKitListStyle","MSListStyle","OListStyle","listStyleImage","MozListStyleImage","WebKitListStyleImage","MSListStyleImage","OListStyleImage","listStylePosition","MozListStylePosition","WebKitListStylePosition","MSListStylePosition","OListStylePosition","listStyleType","MozListStyleType","WebKitListStyleType","MSListStyleType","OListStyleType","margin","MozMargin","WebKitMargin","MSMargin","OMargin","marginBlockEnd","MozMarginBlockEnd","WebKitMarginBlockEnd","MSMarginBlockEnd","OMarginBlockEnd","marginBlockStart","MozMarginBlockStart","WebKitMarginBlockStart","MSMarginBlockStart","OMarginBlockStart","marginBottom","MozMarginBottom","WebKitMarginBottom","MSMarginBottom","OMarginBottom","marginInlineEnd","MozMarginInlineEnd","WebKitMarginInlineEnd","MSMarginInlineEnd","OMarginInlineEnd","marginInlineStart","MozMarginInlineStart","WebKitMarginInlineStart","MSMarginInlineStart","OMarginInlineStart","marginLeft","MozMarginLeft","WebKitMarginLeft","MSMarginLeft","OMarginLeft","marginRight","MozMarginRight","WebKitMarginRight","MSMarginRight","OMarginRight","marginTop","MozMarginTop","WebKitMarginTop","MSMarginTop","OMarginTop","mask","MozMask","WebKitMask","MSMask","OMask","maskClip","MozMaskClip","WebKitMaskClip","MSMaskClip","OMaskClip","maskComposite","MozMaskComposite","WebKitMaskComposite","MSMaskComposite","OMaskComposite","maskImage","MozMaskImage","WebKitMaskImage","MSMaskImage","OMaskImage","maskMode","MozMaskMode","WebKitMaskMode","MSMaskMode","OMaskMode","maskOrigin","MozMaskOrigin","WebKitMaskOrigin","MSMaskOrigin","OMaskOrigin","maskPosition","MozMaskPosition","WebKitMaskPosition","MSMaskPosition","OMaskPosition","maskRepeat","MozMaskRepeat","WebKitMaskRepeat","MSMaskRepeat","OMaskRepeat","maskSize","MozMaskSize","WebKitMaskSize","MSMaskSize","OMaskSize","maskType","MozMaskType","WebKitMaskType","MSMaskType","OMaskType","maxBlockSize","MozMaxBlockSize","WebKitMaxBlockSize","MSMaxBlockSize","OMaxBlockSize","maxHeight","MozMaxHeight","WebKitMaxHeight","MSMaxHeight","OMaxHeight","maxInlineSize","MozMaxInlineSize","WebKitMaxInlineSize","MSMaxInlineSize","OMaxInlineSize","maxWidth","MozMaxWidth","WebKitMaxWidth","MSMaxWidth","OMaxWidth","minBlockSize","MozMinBlockSize","WebKitMinBlockSize","MSMinBlockSize","OMinBlockSize","minHeight","MozMinHeight","WebKitMinHeight","MSMinHeight","OMinHeight","minInlineSize","MozMinInlineSize","WebKitMinInlineSize","MSMinInlineSize","OMinInlineSize","minWidth","MozMinWidth","WebKitMinWidth","MSMinWidth","OMinWidth","mixBlendMode","MozMixBlendMode","WebKitMixBlendMode","MSMixBlendMode","OMixBlendMode","mm","MozMm","WebKitMm","MSMm","OMm","ms","MozMs","WebKitMs","MSMs","OMs","objectFit","MozObjectFit","WebKitObjectFit","MSObjectFit","OObjectFit","objectPosition","MozObjectPosition","WebKitObjectPosition","MSObjectPosition","OObjectPosition","offsetBlockEnd","MozOffsetBlockEnd","WebKitOffsetBlockEnd","MSOffsetBlockEnd","OOffsetBlockEnd","offsetBlockStart","MozOffsetBlockStart","WebKitOffsetBlockStart","MSOffsetBlockStart","OOffsetBlockStart","offsetInlineEnd","MozOffsetInlineEnd","WebKitOffsetInlineEnd","MSOffsetInlineEnd","OOffsetInlineEnd","offsetInlineStart","MozOffsetInlineStart","WebKitOffsetInlineStart","MSOffsetInlineStart","OOffsetInlineStart","opacity","MozOpacity","WebKitOpacity","MSOpacity","OOpacity","order","MozOrder","WebKitOrder","MSOrder","OOrder","orphans","MozOrphans","WebKitOrphans","MSOrphans","OOrphans","outline","MozOutline","WebKitOutline","MSOutline","OOutline","outlineColor","MozOutlineColor","WebKitOutlineColor","MSOutlineColor","OOutlineColor","outlineOffset","MozOutlineOffset","WebKitOutlineOffset","MSOutlineOffset","OOutlineOffset","outlineStyle","MozOutlineStyle","WebKitOutlineStyle","MSOutlineStyle","OOutlineStyle","outlineWidth","MozOutlineWidth","WebKitOutlineWidth","MSOutlineWidth","OOutlineWidth","overflow","MozOverflow","WebKitOverflow","MSOverflow","OOverflow","overflowWrap","MozOverflowWrap","WebKitOverflowWrap","MSOverflowWrap","OOverflowWrap","overflowX","MozOverflowX","WebKitOverflowX","MSOverflowX","OOverflowX","overflowY","MozOverflowY","WebKitOverflowY","MSOverflowY","OOverflowY","padding","MozPadding","WebKitPadding","MSPadding","OPadding","paddingBlockEnd","MozPaddingBlockEnd","WebKitPaddingBlockEnd","MSPaddingBlockEnd","OPaddingBlockEnd","paddingBlockStart","MozPaddingBlockStart","WebKitPaddingBlockStart","MSPaddingBlockStart","OPaddingBlockStart","paddingBottom","MozPaddingBottom","WebKitPaddingBottom","MSPaddingBottom","OPaddingBottom","paddingInlineEnd","MozPaddingInlineEnd","WebKitPaddingInlineEnd","MSPaddingInlineEnd","OPaddingInlineEnd","paddingInlineStart","MozPaddingInlineStart","WebKitPaddingInlineStart","MSPaddingInlineStart","OPaddingInlineStart","paddingLeft","MozPaddingLeft","WebKitPaddingLeft","MSPaddingLeft","OPaddingLeft","paddingRight","MozPaddingRight","WebKitPaddingRight","MSPaddingRight","OPaddingRight","paddingTop","MozPaddingTop","WebKitPaddingTop","MSPaddingTop","OPaddingTop","pageBreakAfter","MozPageBreakAfter","WebKitPageBreakAfter","MSPageBreakAfter","OPageBreakAfter","pageBreakBefore","MozPageBreakBefore","WebKitPageBreakBefore","MSPageBreakBefore","OPageBreakBefore","pageBreakInside","MozPageBreakInside","WebKitPageBreakInside","MSPageBreakInside","OPageBreakInside","pc","MozPc","WebKitPc","MSPc","OPc","perspective","MozPerspective","WebKitPerspective","MSPerspective","OPerspective","perspectiveOrigin","MozPerspectiveOrigin","WebKitPerspectiveOrigin","MSPerspectiveOrigin","OPerspectiveOrigin","pointerEvents","MozPointerEvents","WebKitPointerEvents","MSPointerEvents","OPointerEvents","position","MozPosition","WebKitPosition","MSPosition","OPosition","pt","MozPt","WebKitPt","MSPt","OPt","px","MozPx","WebKitPx","MSPx","OPx","q","MozQ","WebKitQ","MSQ","OQ","quotes","MozQuotes","WebKitQuotes","MSQuotes","OQuotes","rad","MozRad","WebKitRad","MSRad","ORad","rem","MozRem","WebKitRem","MSRem","ORem","resize","MozResize","WebKitResize","MSResize","OResize","revert","MozRevert","WebKitRevert","MSRevert","ORevert","right","MozRight","WebKitRight","MSRight","ORight","rubyAlign","MozRubyAlign","WebKitRubyAlign","MSRubyAlign","ORubyAlign","rubyMerge","MozRubyMerge","WebKitRubyMerge","MSRubyMerge","ORubyMerge","rubyPosition","MozRubyPosition","WebKitRubyPosition","MSRubyPosition","ORubyPosition","s","MozS","WebKitS","MSS","OS","scrollBehavior","MozScrollBehavior","WebKitScrollBehavior","MSScrollBehavior","OScrollBehavior","scrollSnapCoordinate","MozScrollSnapCoordinate","WebKitScrollSnapCoordinate","MSScrollSnapCoordinate","OScrollSnapCoordinate","scrollSnapDestination","MozScrollSnapDestination","WebKitScrollSnapDestination","MSScrollSnapDestination","OScrollSnapDestination","scrollSnapType","MozScrollSnapType","WebKitScrollSnapType","MSScrollSnapType","OScrollSnapType","shapeImageThreshold","MozShapeImageThreshold","WebKitShapeImageThreshold","MSShapeImageThreshold","OShapeImageThreshold","shapeMargin","MozShapeMargin","WebKitShapeMargin","MSShapeMargin","OShapeMargin","shapeOutside","MozShapeOutside","WebKitShapeOutside","MSShapeOutside","OShapeOutside","tabSize","MozTabSize","WebKitTabSize","MSTabSize","OTabSize","tableLayout","MozTableLayout","WebKitTableLayout","MSTableLayout","OTableLayout","textAlign","MozTextAlign","WebKitTextAlign","MSTextAlign","OTextAlign","textAlignLast","MozTextAlignLast","WebKitTextAlignLast","MSTextAlignLast","OTextAlignLast","textCombineUpright","MozTextCombineUpright","WebKitTextCombineUpright","MSTextCombineUpright","OTextCombineUpright","textDecoration","MozTextDecoration","WebKitTextDecoration","MSTextDecoration","OTextDecoration","textDecorationColor","MozTextDecorationColor","WebKitTextDecorationColor","MSTextDecorationColor","OTextDecorationColor","textDecorationLine","MozTextDecorationLine","WebKitTextDecorationLine","MSTextDecorationLine","OTextDecorationLine","textDecorationStyle","MozTextDecorationStyle","WebKitTextDecorationStyle","MSTextDecorationStyle","OTextDecorationStyle","textEmphasis","MozTextEmphasis","WebKitTextEmphasis","MSTextEmphasis","OTextEmphasis","textEmphasisColor","MozTextEmphasisColor","WebKitTextEmphasisColor","MSTextEmphasisColor","OTextEmphasisColor","textEmphasisPosition","MozTextEmphasisPosition","WebKitTextEmphasisPosition","MSTextEmphasisPosition","OTextEmphasisPosition","textEmphasisStyle","MozTextEmphasisStyle","WebKitTextEmphasisStyle","MSTextEmphasisStyle","OTextEmphasisStyle","textIndent","MozTextIndent","WebKitTextIndent","MSTextIndent","OTextIndent","textOrientation","MozTextOrientation","WebKitTextOrientation","MSTextOrientation","OTextOrientation","textOverflow","MozTextOverflow","WebKitTextOverflow","MSTextOverflow","OTextOverflow","textRendering","MozTextRendering","WebKitTextRendering","MSTextRendering","OTextRendering","textShadow","MozTextShadow","WebKitTextShadow","MSTextShadow","OTextShadow","textTransform","MozTextTransform","WebKitTextTransform","MSTextTransform","OTextTransform","textUnderlinePosition","MozTextUnderlinePosition","WebKitTextUnderlinePosition","MSTextUnderlinePosition","OTextUnderlinePosition","top","MozTop","WebKitTop","MSTop","OTop","touchAction","MozTouchAction","WebKitTouchAction","MSTouchAction","OTouchAction","transform","MozTransform","WebKitTransform","MSTransform","OTransform","transformBox","MozTransformBox","WebKitTransformBox","MSTransformBox","OTransformBox","transformOrigin","MozTransformOrigin","WebKitTransformOrigin","MSTransformOrigin","OTransformOrigin","transformStyle","MozTransformStyle","WebKitTransformStyle","MSTransformStyle","OTransformStyle","transition","MozTransition","WebKitTransition","MSTransition","OTransition","transitionDelay","MozTransitionDelay","WebKitTransitionDelay","MSTransitionDelay","OTransitionDelay","transitionDuration","MozTransitionDuration","WebKitTransitionDuration","MSTransitionDuration","OTransitionDuration","transitionProperty","MozTransitionProperty","WebKitTransitionProperty","MSTransitionProperty","OTransitionProperty","transitionTimingFunction","MozTransitionTimingFunction","WebKitTransitionTimingFunction","MSTransitionTimingFunction","OTransitionTimingFunction","turn","MozTurn","WebKitTurn","MSTurn","OTurn","unicodeBidi","MozUnicodeBidi","WebKitUnicodeBidi","MSUnicodeBidi","OUnicodeBidi","unset","MozUnset","WebKitUnset","MSUnset","OUnset","verticalAlign","MozVerticalAlign","WebKitVerticalAlign","MSVerticalAlign","OVerticalAlign","vh","MozVh","WebKitVh","MSVh","OVh","visibility","MozVisibility","WebKitVisibility","MSVisibility","OVisibility","vmax","MozVmax","WebKitVmax","MSVmax","OVmax","vmin","MozVmin","WebKitVmin","MSVmin","OVmin","vw","MozVw","WebKitVw","MSVw","OVw","whiteSpace","MozWhiteSpace","WebKitWhiteSpace","MSWhiteSpace","OWhiteSpace","widows","MozWidows","WebKitWidows","MSWidows","OWidows","width","MozWidth","WebKitWidth","MSWidth","OWidth","willChange","MozWillChange","WebKitWillChange","MSWillChange","OWillChange","wordBreak","MozWordBreak","WebKitWordBreak","MSWordBreak","OWordBreak","wordSpacing","MozWordSpacing","WebKitWordSpacing","MSWordSpacing","OWordSpacing","wordWrap","MozWordWrap","WebKitWordWrap","MSWordWrap","OWordWrap","writingMode","MozWritingMode","WebKitWritingMode","MSWritingMode","OWritingMode","zIndex","MozZIndex","WebKitZIndex","MSZIndex","OZIndex","fontSize","MozFontSize","WebKitFontSize","MSFontSize","OFontSize"]; +},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t=0&&_.splice(t,1)}function s(e){var t=document.createElement("style");return t.type="text/css",o(e,t),t}function u(e){var t=document.createElement("link");return t.rel="stylesheet",o(e,t),t}function c(e,t){var n,r,i;if(t.singleton){var o=g++;n=v||(v=s(t)),r=l.bind(null,n,o,!1),i=l.bind(null,n,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=u(t),r=f.bind(null,n),i=function(){a(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(t),r=p.bind(null,n),i=function(){a(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}function l(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=b(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}function p(e,t){var n=t.css,r=t.media;t.sourceMap;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function f(e,t){var n=t.css,r=(t.media,t.sourceMap);r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var i=new Blob([n],{type:"text/css"}),o=e.href;e.href=URL.createObjectURL(i),o&&URL.revokeObjectURL(o)}var h={},d=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},m=d(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),y=d(function(){return document.head||document.getElementsByTagName("head")[0]}),v=null,g=0,_=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=m()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var n=i(e);return r(n,t),function(e){for(var o=[],a=0;a=400?(a.updateLoadingStatus("failed"),i.newThrownErr(new Error(t.statusText+" "+e))):(a.updateLoadingStatus("success"),a.updateSpec(t.text),void a.updateUrl(e))}var i=n.errActions,o=n.specSelectors,a=n.specActions,s=t.fetch;e=e||o.url(),a.updateLoadingStatus("loading"),s({url:e,loadSpec:!0,credentials:"same-origin",headers:{Accept:"application/json,*/*"}}).then(r,r)}},updateLoadingStatus:function(e){var t=[null,"loading","failed","success","failedConfig"];return t.indexOf(e)===-1&&console.error("Error: "+e+" is not one of "+JSON.stringify(t)),{type:"spec_update_loading_status",payload:e}}},r={spec_update_loading_status:function(e,t){return"string"==typeof t.payload?e.set("loadingStatus",t.payload):e}},a={loadingStatus:(0,i.createSelector)(function(e){return e||(0,o.Map)()},function(e){return e.get("loadingStatus")||null})};return{statePlugins:{spec:{actions:n,reducers:r,selectors:a}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(575),o=n(325)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n6?s-6:0),c=6;c5?c-5:0),p=5;p5?a-5:0),u=5;u key("+l[p]+")"].concat(s));if(h instanceof Error)return h}}return i(t)}function u(e){return a(e,"List",b.List.isList)}function c(e,t,n,r){function o(){for(var i=arguments.length,o=Array(i),u=0;u5?s-5:0),c=5;c5?c-5:0),p=5;p>",w={listOf:u,mapOf:l,orderedMapOf:p,setOf:f,orderedSetOf:h,stackOf:d,iterableOf:m,recordOf:y,shape:g,contains:g,mapContains:_,list:o("List",b.List.isList),map:o("Map",b.Map.isMap),orderedMap:o("OrderedMap",b.OrderedMap.isOrderedMap),set:o("Set",b.Set.isSet),orderedSet:o("OrderedSet",b.OrderedSet.isOrderedSet),stack:o("Stack",b.Stack.isStack),seq:o("Seq",b.Seq.isSeq),record:o("Record",function(e){return e instanceof b.Record}),iterable:o("Iterable",b.Iterable.isIterable)};e.exports=w},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n-1&&e.setState({scopes:e.state.scopes.filter(function(e){return e!==i})})},this.onInputChange=function(t){var n=t.target,r=n.dataset.name,o=n.value,a=i({},r,o);e.setState(a)},this.logout=function(t){t.preventDefault();var n=e.props,r=n.authActions,i=n.errActions,o=n.name;i.clear({authId:o,type:"auth",source:"auth"}),r.logout([o])}};t.default=v},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=e.auth,n=e.authActions,r=e.errActions,i=e.configs,o=e.authConfigs,u=void 0===o?{}:o,c=t.schema,l=t.scopes,p=t.name,f=t.clientId,h=c.get("flow"),d=[];switch(h){case"password":return void n.authorizePassword(t);case"application":return void n.authorizeApplication(t);case"accessCode":d.push("response_type=code");break;case"implicit":d.push("response_type=token")}"string"==typeof f&&d.push("client_id="+encodeURIComponent(f));var m=i.oauth2RedirectUrl;if("undefined"==typeof m)return void r.newAuthErr({authId:p,source:"validation",level:"error",message:"oauth2RedirectUri configuration is not passed. Oauth2 authorization cannot be performed."});if(d.push("redirect_uri="+encodeURIComponent(m)),Array.isArray(l)&&0=0||this.state.url.indexOf("127.0.0.1")>=0?null:l.default.createElement("span",{style:{float:"right"}},l.default.createElement("a",{target:"_blank",href:this.state.validatorUrl+"/debug?url="+this.state.url},l.default.createElement(f,{src:this.state.validatorUrl+"?url="+this.state.url,alt:"Online validator badge"})))}}]),t}(l.default.Component);p.propTypes={getComponent:c.PropTypes.func.isRequired,getConfigs:c.PropTypes.func.isRequired,specSelectors:c.PropTypes.object.isRequired},t.default=p;var f=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={loaded:!1,error:!1},n}return a(t,e),u(t,[{key:"componentDidMount",value:function(){var e=this,t=new Image;t.onload=function(){e.setState({loaded:!0})},t.onerror=function(){e.setState({error:!0})},t.src=this.props.src}},{key:"componentWillReceiveProps",value:function(e){var t=this;if(e.src!==this.props.src){var n=new Image;n.onload=function(){t.setState({loaded:!0})},n.onerror=function(){t.setState({error:!0})},n.src=e.src}}},{key:"render",value:function(){return this.state.error?l.default.createElement("img",{alt:"Error"}):this.state.loaded?l.default.createElement("img",{src:this.props.src,alt:this.props.alt}):l.default.createElement("img",{alt:"Loading..."})}}]),t}(l.default.Component);f.propTypes={src:c.PropTypes.string,alt:c.PropTypes.string}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t0){var B=!k.get(String(s.get("status")));s=s.set("notDocumented",B)}var L=this.state.tryItOutEnabled,z=this.isShown(),q=[r,i];return l.default.createElement("div",{className:x?"opblock opblock-deprecated":z?"opblock opblock-"+i+" is-open":"opblock opblock-"+i,id:t},l.default.createElement("div",{className:"opblock-summary opblock-summary-"+i,onClick:this.toggleShown},l.default.createElement("span",{className:"opblock-summary-method"},i.toUpperCase()),l.default.createElement("span",{className:x?"opblock-summary-path__deprecated":"opblock-summary-path"},l.default.createElement("span",null,r),l.default.createElement(j,{path:n})),a?l.default.createElement("div",{className:"opblock-summary-description"},_):null,p&&T?l.default.createElement("span",{className:"opblock-summary-operation-id"},T):null,S&&S.count()?l.default.createElement(I,{authActions:v,security:S,authSelectors:g}):null),l.default.createElement(R,{isOpened:z,animated:!0},l.default.createElement("div",{className:"opblock-body"},x&&l.default.createElement("h4",{className:"opblock-title_normal"}," Warning: Deprecated"),b&&l.default.createElement("div",{className:"opblock-description-wrapper"},l.default.createElement("div",{className:"opblock-description"},l.default.createElement(N,{source:b}))),w&&w.get("url")?l.default.createElement("div",{className:"opblock-external-docs-wrapper"},l.default.createElement("h4",{className:"opblock-title_normal"},"Find more details"),l.default.createElement("div",{className:"opblock-external-docs"},l.default.createElement("span",{className:"opblock-external-docs__description"},w.get("description")),l.default.createElement("a",{className:"opblock-external-docs__link",href:w.get("url")},w.get("url")))):null,l.default.createElement(D,{parameters:A,onChangeKey:q,onTryoutClick:this.onTryoutClick,onCancelClick:this.onCancelClick,tryItOutEnabled:L,allowTryItOut:c,fn:f,getComponent:d,specActions:m,specSelectors:y,pathMethod:[r,i]}),L&&c&&C&&C.size?l.default.createElement("div",{className:"opblock-schemes"},l.default.createElement(F,{schemes:C,path:r,method:i,specActions:m})):null,l.default.createElement("div",{className:L&&s&&c?"btn-group":"execute-wrapper"},L&&c?l.default.createElement(M,{getComponent:d,operation:o,specActions:m,specSelectors:y,path:r,method:i,onExecute:this.onExecute}):null,L&&s&&c?l.default.createElement(P,{onClick:this.onClearClick,specActions:m,path:r,method:i}):null),this.state.executeInProgress?l.default.createElement("div",{className:"loading-container"},l.default.createElement("div",{className:"loading"})):null,k?l.default.createElement(O,{responses:k,request:u,tryItOutResponse:s,getComponent:d,specSelectors:y,specActions:m,produces:E,producesValue:o.get("produces_value"),pathMethod:[r,i],fn:f}):null)))}}]),t}(l.default.Component);y.propTypes={path:c.PropTypes.string.isRequired,method:c.PropTypes.string.isRequired,operation:c.PropTypes.object.isRequired,showSummary:c.PropTypes.bool,isShownKey:m.arrayOrString.isRequired,jumpToKey:m.arrayOrString.isRequired,allowTryItOut:c.PropTypes.bool,displayOperationId:c.PropTypes.bool,response:c.PropTypes.object,request:c.PropTypes.object,getComponent:c.PropTypes.func.isRequired,authActions:c.PropTypes.object,authSelectors:c.PropTypes.object,specActions:c.PropTypes.object.isRequired,specSelectors:c.PropTypes.object.isRequired,layoutActions:c.PropTypes.object.isRequired,layoutSelectors:c.PropTypes.object.isRequired,fn:c.PropTypes.object.isRequired,getConfigs:c.PropTypes.func.isRequired},y.defaultProps={showSummary:!0,response:null,allowTryItOut:!0,displayOperationId:!1},t.default=y},function(e,t,n){e.exports=n(1230)},function(e,t,n){"use strict";function r(e,t,n){return!i(e.props,t)||!i(e.state,n)}var i=n(736);e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.objectWithFuncs=t.arrayOrString=void 0;var r=n(621),i=function(e,t){return r.PropTypes.shape(e.reduce(function(e,n){return e[n]=t,e},{}))};t.arrayOrString=r.PropTypes.oneOfType([r.PropTypes.arrayOf(r.PropTypes.string),r.PropTypes.string]),t.objectWithFuncs=function(e){return i(e,r.PropTypes.func.isRequired)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n1&&(_=x[1])}p=c.default.createElement("div",null,c.default.createElement("a",{href:v,download:_},"Download file"))}else p=c.default.createElement("pre",null,"Download headers detected but your browser does not support downloading binary via XHR (Blob).")}else p="string"==typeof t?c.default.createElement(s,{value:t}):c.default.createElement("div",null,"Unknown response type");return p?c.default.createElement("div",null,c.default.createElement("h5",null,"Response body"),p):null}}]),t}(c.default.Component);h.propTypes={content:u.PropTypes.any.isRequired,contentType:u.PropTypes.string.isRequired,getComponent:u.PropTypes.func.isRequired,headers:u.PropTypes.object,url:u.PropTypes.string},t.default=h},function(e,t,n){var r=n(356),i=r(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()});e.exports=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t-1)return this.renderFixed();var m=this.renderStatic,y=this.state.height,v=parseFloat(y).toFixed(1);y>-1&&m&&(this.renderStatic=!1);var g=s.default.createElement(p.default,{onHeightReady:this.onHeightReady},a);if(m){var _=n?{height:"auto"}:{overflow:"hidden",height:0};return!n&&y>-1?l?s.default.createElement("div",o({style:o({height:0,overflow:"hidden"},r)},d),g):null:s.default.createElement("div",o({style:o({},_,r)},d),g)}return s.default.createElement(c.Motion,{defaultStyle:{height:Math.max(0,y)},onRest:f,style:{height:this.getMotionHeight(y)}},function(t){if(e.height=h(t.height),!n&&"0.0"===e.height)return l?s.default.createElement("div",o({style:o({height:0,overflow:"hidden"},r)},d),g):null;var i=n&&e.height===v?{height:"auto"}:{height:t.height,overflow:"hidden"};return s.default.createElement("div",o({style:o({},i,r)},d),g)})}});t.default=d},function(e,t,n){"use strict";var r=n(1230),i={shouldComponentUpdate:function(e,t){return r(this,e,t)}};e.exports=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e.default:e}t.__esModule=!0;var i=n(1246);t.Motion=r(i);var o=n(1254);t.StaggeredMotion=r(o);var a=n(1255);t.TransitionMotion=r(a);var s=n(1257);t.spring=r(s);var u=n(1258);t.presets=r(u);var c=n(1259);t.reorderKeys=r(c)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var i=Object.assign||function(e){for(var t=1;t10*_&&(e.accumulatedTime=0),0===e.accumulatedTime)return e.animationID=null,void e.startAnimationIfNecessary();var i=(e.accumulatedTime-Math.floor(e.accumulatedTime/_)*_)/_,o=Math.floor(e.accumulatedTime/_),a={},s={},u={},c={};for(var p in t)if(t.hasOwnProperty(p)){var h=t[p];if("number"==typeof h)u[p]=h,c[p]=0,a[p]=h,s[p]=0;else{for(var d=e.state.lastIdealStyle[p],m=e.state.lastIdealVelocity[p],v=0;v10*b&&(e.accumulatedTime=0),0===e.accumulatedTime)return e.animationID=null,void e.startAnimationIfNecessary();for(var o=(e.accumulatedTime-Math.floor(e.accumulatedTime/b)*b)/b,a=Math.floor(e.accumulatedTime/b),s=[],u=[],c=[],l=[],f=0;f10*S&&(e.accumulatedTime=0),0===e.accumulatedTime)return e.animationID=null,void e.startAnimationIfNecessary();for(var u=(e.accumulatedTime-Math.floor(e.accumulatedTime/S)*S)/S,c=Math.floor(e.accumulatedTime/S),l=a(e.props.willEnter,e.props.willLeave,e.state.mergedPropsStyles,n,e.state.currentStyles,e.state.currentVelocities,e.state.lastIdealStyles,e.state.lastIdealVelocities),p=l[0],f=l[1],d=l[2],m=l[3],y=l[4],g=0;gr[l])return-1;if(i>o[l]&&ur[l])return 1;if(a>o[l]&&s=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(){for(var e=arguments.length,t=Array(e),n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;tl,collapsedContent:S},f.default.createElement("span",{className:"brace-open object"},y),r?f.default.createElement(w,{name:n}):null,f.default.createElement("span",{className:"inner-object"},f.default.createElement("table",{className:"model",style:{marginLeft:"2em"}},f.default.createElement("tbody",null,h?f.default.createElement("tr",{style:{color:"#999",fontStyle:"italic"}},f.default.createElement("td",null,"description:"),f.default.createElement("td",null,f.default.createElement(x,{source:h}))):null,d&&d.size?d.entrySeq().map(function(e){var t=c(e,2),r=t[0],i=t[1],l=m.List.isList(b)&&b.contains(r),p={verticalAlign:"top",paddingRight:"0.2em"};return l&&(p.fontWeight="bold"),f.default.createElement("tr",{key:r},f.default.createElement("td",{style:p},r,":"),f.default.createElement("td",{style:{verticalAlign:"top"}},f.default.createElement(k,u({key:"object-"+n+"-"+r+"_"+i},s,{required:l,getComponent:o,schema:i,depth:a+1}))))}).toArray():null,g&&g.size?f.default.createElement("tr",null,f.default.createElement("td",null,"< * >:"),f.default.createElement("td",null,f.default.createElement(k,u({},s,{required:!1,getComponent:o,schema:g,depth:a+1})))):null))),f.default.createElement("span",{className:"brace-close"},v)))}}]),t}(p.Component);b.propTypes={schema:p.PropTypes.object.isRequired,getComponent:p.PropTypes.func.isRequired,specSelectors:p.PropTypes.object.isRequired,name:p.PropTypes.string,isRef:p.PropTypes.bool,expandDepth:p.PropTypes.number,depth:p.PropTypes.number};var x=function(e){function t(){return o(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return s(t,e),l(t,[{key:"render",value:function(){var e=this.props,t=e.schema,n=e.getComponent,r=e.required;if(!t||!t.get)return f.default.createElement("div",null);var i=t.get("type"),o=t.get("format"),a=t.get("xml"),s=t.get("enum"),u=t.get("description"),l=t.filter(function(e,t){return["enum","type","format","description","$$ref"].indexOf(t)===-1}),p=r?{fontWeight:"bold"}:{},h=n("Markdown");return f.default.createElement("span",{className:"prop"},f.default.createElement("span",{className:"prop-type",style:p},i)," ",r&&f.default.createElement("span",{style:{color:"red"}},"*"),o&&f.default.createElement("span",{className:"prop-format"},"($",o,")"),l.size?l.entrySeq().map(function(e){var t=c(e,2),n=t[0],r=t[1];return f.default.createElement("span",{key:n+"-"+r,style:g},f.default.createElement("br",null),n,": ",String(r))}):null,u?f.default.createElement(h,{source:u}):null,a&&a.size?f.default.createElement("span",null,f.default.createElement("br",null),f.default.createElement("span",{style:g},"xml:"),a.entrySeq().map(function(e){var t=c(e,2),n=t[0],r=t[1];return f.default.createElement("span",{key:n+"-"+r,style:g},f.default.createElement("br",null),"   ",n,": ",String(r))}).toArray()):null,s&&f.default.createElement(_,{value:s}))}}]),t}(p.Component);x.propTypes={schema:p.PropTypes.object.isRequired,getComponent:p.PropTypes.func.isRequired,required:p.PropTypes.bool};var w=function(e){function t(){return o(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return s(t,e),l(t,[{key:"render",value:function(){var e=this.props,t=e.required,n=e.schema,r=e.depth,i=e.expandDepth,o=n.get("items"),a=n.filter(function(e,t){return["type","items","$$ref"].indexOf(t)===-1});return f.default.createElement("span",{className:"model"},f.default.createElement("span",{className:"model-title"},f.default.createElement("span",{className:"model-title__text"},n.get("title"))),f.default.createElement(E,{collapsed:r>i,collapsedContent:"[...]"},"[",f.default.createElement("span",null,f.default.createElement(k,u({},this.props,{schema:o,required:!1}))),"]",a.size?f.default.createElement("span",null,a.entrySeq().map(function(e){var t=c(e,2),n=t[0],r=t[1];return f.default.createElement("span",{key:n+"-"+r,style:g},f.default.createElement("br",null),n+":",String(r))}),f.default.createElement("br",null)):null),t&&f.default.createElement("span",{style:{color:"red"}},"*"))}}]),t}(p.Component);w.propTypes={schema:p.PropTypes.object.isRequired,getComponent:p.PropTypes.func.isRequired,specSelectors:p.PropTypes.object.isRequired,name:p.PropTypes.string,required:p.PropTypes.bool,expandDepth:p.PropTypes.number,depth:p.PropTypes.number};var k=function(e){function t(){var e,n,r,i;o(this,t);for(var s=arguments.length,u=Array(s),c=0;c=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!==(65535&e)&&65534!==(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function c(e){if(e>65535){e-=65536;var t=55296+(e>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}function l(e,t){var n=0;return o(g,t)?g[t]:35===t.charCodeAt(0)&&v.test(t)&&(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10),u(n))?c(n):e}function p(e){return e.indexOf("&")<0?e:e.replace(y,l)}function f(e){return x[e]}function h(e){return _.test(e)?e.replace(b,f):e}var d=Object.prototype.hasOwnProperty,m=/\\([\\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g,y=/&([a-z#][a-z0-9]{1,31});/gi,v=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,g=n(1284),_=/[&<>"]/,b=/[&<>"]/g,x={"&":"&","<":"<",">":">",'"':"""};t.assign=a,t.isString=i,t.has=o,t.unescapeMd=s,t.isValidEntityCode=u,t.fromCodePoint=c,t.replaceEntities=p,t.escapeHtml=h},function(e,t){"use strict";e.exports={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴", +blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",GT:">",Gt:"≫",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",LT:"<",Lt:"≪",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}},function(e,t,n){"use strict";function r(){this.rules=i.assign({},o),this.getBreak=o.getBreak}var i=n(1283),o=n(1286);e.exports=r,r.prototype.renderInline=function(e,t,n){for(var r=this.rules,i=e.length,o=0,a="";i--;)a+=r[e[o].type](e,o++,t,n,this);return a},r.prototype.render=function(e,t,n){for(var r=this.rules,i=e.length,o=-1,a="";++o=e.length-2?t:"paragraph_open"===e[t].type&&e[t].tight&&"inline"===e[t+1].type&&0===e[t+1].content.length&&"paragraph_close"===e[t+2].type&&e[t+2].tight?r(e,t+2):t}var i=n(1283).has,o=n(1283).unescapeMd,a=n(1283).replaceEntities,s=n(1283).escapeHtml,u={};u.blockquote_open=function(){return"
\n"},u.blockquote_close=function(e,t){return"
"+c(e,t)},u.code=function(e,t){return e[t].block?"
"+s(e[t].content)+"
"+c(e,t):""+s(e[t].content)+""},u.fence=function(e,t,n,r,u){var l,p,f,h=e[t],d="",m=n.langPrefix,y="";if(h.params){if(l=h.params.split(/\s+/g),p=l.join(" "),i(u.rules.fence_custom,l[0]))return u.rules.fence_custom[l[0]](e,t,n,r,u);y=s(a(o(p))),d=' class="'+m+y+'"'}return f=n.highlight?n.highlight.apply(n.highlight,[h.content].concat(l))||s(h.content):s(h.content),"
"+f+"
"+c(e,t)},u.fence_custom={},u.heading_open=function(e,t){return""},u.heading_close=function(e,t){return"\n"},u.hr=function(e,t,n){return(n.xhtmlOut?"
":"
")+c(e,t)},u.bullet_list_open=function(){return"
    \n"},u.bullet_list_close=function(e,t){return"
"+c(e,t)},u.list_item_open=function(){return"
  • "},u.list_item_close=function(){return"
  • \n"},u.ordered_list_open=function(e,t){var n=e[t],r=n.order>1?' start="'+n.order+'"':"";return"\n"},u.ordered_list_close=function(e,t){return""+c(e,t)},u.paragraph_open=function(e,t){return e[t].tight?"":"

    "},u.paragraph_close=function(e,t){var n=!(e[t].tight&&t&&"inline"===e[t-1].type&&!e[t-1].content);return(e[t].tight?"":"

    ")+(n?c(e,t):"")},u.link_open=function(e,t,n){var r=e[t].title?' title="'+s(a(e[t].title))+'"':"",i=n.linkTarget?' target="'+n.linkTarget+'"':"";return'"},u.link_close=function(){return""},u.image=function(e,t,n){var r=' src="'+s(e[t].src)+'"',i=e[t].title?' title="'+s(a(e[t].title))+'"':"",u=' alt="'+(e[t].alt?s(a(o(e[t].alt))):"")+'"',c=n.xhtmlOut?" /":"";return""},u.table_open=function(){return"\n"},u.table_close=function(){return"
    \n"},u.thead_open=function(){return"\n"},u.thead_close=function(){return"\n"},u.tbody_open=function(){return"\n"},u.tbody_close=function(){return"\n"},u.tr_open=function(){return""},u.tr_close=function(){return"\n"},u.th_open=function(e,t){var n=e[t];return""},u.th_close=function(){return""},u.td_open=function(e,t){var n=e[t];return""},u.td_close=function(){return""},u.strong_open=function(){return""},u.strong_close=function(){return""},u.em_open=function(){return""},u.em_close=function(){return""},u.del_open=function(){return""},u.del_close=function(){return""},u.ins_open=function(){return""},u.ins_close=function(){return""},u.mark_open=function(){return""},u.mark_close=function(){return""},u.sub=function(e,t){return""+s(e[t].content)+""},u.sup=function(e,t){return""+s(e[t].content)+""},u.hardbreak=function(e,t,n){return n.xhtmlOut?"
    \n":"
    \n"},u.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?"
    \n":"
    \n":"\n"},u.text=function(e,t){return s(e[t].content)},u.htmlblock=function(e,t){return e[t].content},u.htmltag=function(e,t){return e[t].content},u.abbr_open=function(e,t){return''},u.abbr_close=function(){return""},u.footnote_ref=function(e,t){var n=Number(e[t].id+1).toString(),r="fnref"+n;return e[t].subId>0&&(r+=":"+e[t].subId),'['+n+"]"},u.footnote_block_open=function(e,t,n){var r=n.xhtmlOut?'
    \n':'
    \n';return r+'
    \n
      \n'},u.footnote_block_close=function(){return"
    \n
    \n"},u.footnote_open=function(e,t){var n=Number(e[t].id+1).toString();return'
  • '},u.footnote_close=function(){return"
  • \n"},u.footnote_anchor=function(e,t){var n=Number(e[t].id+1).toString(),r="fnref"+n;return e[t].subId>0&&(r+=":"+e[t].subId),' ↩'},u.dl_open=function(){return"
    \n"},u.dt_open=function(){return"
    "},u.dd_open=function(){return"
    "},u.dl_close=function(){return"
    \n"},u.dt_close=function(){return"\n"},u.dd_close=function(){return"\n"};var c=u.getBreak=function(e,t){return t=r(e,t),t8&&n<14);)if(92===n&&t+11))break;if(41===n&&(o--,o<0))break;t++}return s!==t&&(a=i(e.src.slice(s,t)),!!e.parser.validateLink(a)&&(e.linkContent=a,e.pos=t,!0))}},function(e,t,n){"use strict";var r=n(1283).replaceEntities;e.exports=function(e){var t=r(e);try{t=decodeURI(t)}catch(e){}return encodeURI(t)}},function(e,t,n){"use strict";var r=n(1283).unescapeMd;e.exports=function(e,t){var n,i=t,o=e.posMax,a=e.src.charCodeAt(t);if(34!==a&&39!==a&&40!==a)return!1;for(t++,40===a&&(a=41);t0?a[t].count:1,r=0;r=0;t--)if(s=a[t],"text"===s.type){for(l=0,u=s.content,f.lastIndex=0,p=s.level,c=[];h=f.exec(u);)f.lastIndex>l&&c.push({type:"text",content:u.slice(l,h.index+h[1].length),level:p}),c.push({type:"abbr_open",title:e.env.abbreviations[":"+h[2]],level:p++}),c.push({type:"text",content:h[2],level:p}),c.push({type:"abbr_close",level:--p}),l=f.lastIndex-h[3].length;c.length&&(l=0;s--)if("inline"===e.tokens[s].type)for(a=e.tokens[s].children,t=a.length-1;t>=0;t--)i=a[t],"text"===i.type&&(o=i.content,o=n(o),r.test(o)&&(o=o.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---([^-]|$)/gm,"$1—$2").replace(/(^|\s)--(\s|$)/gm,"$1–$2").replace(/(^|[^-\s])--([^-\s]|$)/gm,"$1–$2")),i.content=o)}},function(e,t){"use strict";function n(e,t){return!(t<0||t>=e.length)&&!a.test(e[t])}function r(e,t,n){return e.substr(0,t)+n+e.substr(t+1)}var i=/['"]/,o=/['"]/g,a=/[-\s()\[\]]/,s="’";e.exports=function(e){var t,a,u,c,l,p,f,h,d,m,y,v,g,_,b,x,w;if(e.options.typographer)for(w=[],b=e.tokens.length-1;b>=0;b--)if("inline"===e.tokens[b].type)for(x=e.tokens[b].children,w.length=0,t=0;t=0&&!(w[g].level<=f);g--);w.length=g+1,u=a.content,l=0,p=u.length;e:for(;l=0&&(m=w[g],!(w[g].level\s]/i.test(e)}function i(e){return/^<\/a\s*>/i.test(e)}function o(){var e=[],t=new a({stripPrefix:!1,url:!0,email:!0,twitter:!1,replaceFn:function(t,n){switch(n.getType()){case"url":e.push({text:n.matchedText,url:n.getUrl()});break;case"email":e.push({text:n.matchedText,url:"mailto:"+n.getEmail().replace(/^mailto:/i,"")})}return!1}});return{links:e,autolinker:t}}var a=n(1304),s=/www|@|\:\/\//;e.exports=function(e){var t,n,a,u,c,l,p,f,h,d,m,y,v,g=e.tokens,_=null;if(e.options.linkify)for(n=0,a=g.length;n=0;t--)if(c=u[t],"link_close"!==c.type){if("htmltag"===c.type&&(r(c.content)&&m>0&&m--,i(c.content)&&m++),!(m>0)&&"text"===c.type&&s.test(c.content)){if(_||(_=o(),y=_.links,v=_.autolinker),l=c.content,y.length=0,v.link(l),!y.length)continue;for(p=[],d=c.level,f=0;f + * MIT Licensed. http://www.opensource.org/licenses/mit-license.php + * + * https://github.com/gregjacobs/Autolinker.js + */ +var e=function(t){e.Util.assign(this,t)};return e.prototype={constructor:e,urls:!0,email:!0,twitter:!0,newWindow:!0,stripPrefix:!0,truncate:void 0,className:"",htmlParser:void 0,matchParser:void 0,tagBuilder:void 0,link:function(e){for(var t=this.getHtmlParser(),n=t.parse(e),r=0,i=[],o=0,a=n.length;ot&&(n=null==n?"..":n,e=e.substring(0,t-n.length)+n),e},indexOf:function(e,t){if(Array.prototype.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n",this.getInnerHtml(),""].join("")},buildAttrsStr:function(){if(!this.attrs)return"";var e=this.getAttrs(),t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n+'="'+e[n]+'"');return t.join(" ")}}),e.AnchorTagBuilder=e.Util.extend(Object,{constructor:function(t){e.Util.assign(this,t)},build:function(t){var n=new e.HtmlTag({tagName:"a",attrs:this.createAttrs(t.getType(),t.getAnchorHref()),innerHtml:this.processAnchorText(t.getAnchorText())});return n},createAttrs:function(e,t){var n={href:t},r=this.createCssClass(e);return r&&(n.class=r),this.newWindow&&(n.target="_blank"),n},createCssClass:function(e){var t=this.className;return t?t+" "+t+"-"+e:""},processAnchorText:function(e){return e=this.doTruncate(e)},doTruncate:function(t){return e.Util.ellipsis(t,this.truncate||Number.POSITIVE_INFINITY)}}),e.htmlParser.HtmlParser=e.Util.extend(Object,{htmlRegex:function(){var e=/[0-9a-zA-Z][0-9a-zA-Z:]*/,t=/[^\s\0"'>\/=\x01-\x1F\x7F]+/,n=/(?:"[^"]*?"|'[^']*?'|[^'"=<>`\s]+)/,r=t.source+"(?:\\s*=\\s*"+n.source+")?";return new RegExp(["(?:","<(!DOCTYPE)","(?:","\\s+","(?:",r,"|",n.source+")",")*",">",")","|","(?:","<(/)?","("+e.source+")","(?:","\\s+",r,")*","\\s*/?",">",")"].join(""),"gi")}(),htmlCharacterEntitiesRegex:/( | |<|<|>|>|"|"|')/gi,parse:function(e){for(var t,n,r=this.htmlRegex,i=0,o=[];null!==(t=r.exec(e));){var a=t[0],s=t[1]||t[3],u=!!t[2],c=e.substring(i,t.index);c&&(n=this.parseTextAndEntityNodes(c),o.push.apply(o,n)),o.push(this.createElementNode(a,s,u)),i=t.index+a.length}if(i=n))&&!(e.tShift[s]=0&&(e=e.replace(s,function(t,n){var r;return 10===e.charCodeAt(n)?(a=n+1,l=0,t):(r=" ".slice((n-a-l)%4),l=n-a+1,r)})),i=new o(e,this,t,n,r),void this.tokenize(i,i.line,i.lineMax)):[]},e.exports=r},function(e,t){"use strict";function n(e,t,n,r,i){var o,a,s,u,c,l,p;for(this.src=e,this.parser=t,this.options=n,this.env=r,this.tokens=i,this.bMarks=[],this.eMarks=[],this.tShift=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.parentType="root",this.ddIndent=-1,this.level=0,this.result="",a=this.src,l=0,p=!1,s=u=l=0,c=a.length;u=this.eMarks[e]},n.prototype.skipEmptyLines=function(e){for(var t=this.lineMax;en;)if(t!==this.src.charCodeAt(--e))return e+1;return e},n.prototype.getLines=function(e,t,n,r){var i,o,a,s,u,c=e;if(e>=t)return"";if(c+1===t)return o=this.bMarks[c]+Math.min(this.tShift[c],n),a=r?this.eMarks[c]+1:this.eMarks[c],this.src.slice(o,a);for(s=new Array(t-e),i=0;cn&&(u=n),u<0&&(u=0),o=this.bMarks[c]+u,a=c+1=4))break;r++,i=r}return e.line=r,e.tokens.push({type:"code",content:e.getLines(t,i,4+e.blkIndent,!0),block:!0,lines:[t,e.line],level:e.level}),!0}},function(e,t){"use strict";e.exports=function(e,t,n,r){var i,o,a,s,u,c=!1,l=e.bMarks[t]+e.tShift[t],p=e.eMarks[t];if(l+3>p)return!1;if(i=e.src.charCodeAt(l),126!==i&&96!==i)return!1;if(u=l,l=e.skipChars(l,i),o=l-u,o<3)return!1;if(a=e.src.slice(l,p).trim(),a.indexOf("`")>=0)return!1;if(r)return!0;for(s=t;(s++,!(s>=n))&&(l=u=e.bMarks[s]+e.tShift[s],p=e.eMarks[s],!(l=4||(l=e.skipChars(l,i),l-uy)return!1;if(62!==e.src.charCodeAt(m++))return!1;if(e.level>=e.options.maxNesting)return!1;if(r)return!0;for(32===e.src.charCodeAt(m)&&m++,u=e.blkIndent,e.blkIndent=0,s=[e.bMarks[t]],e.bMarks[t]=m,m=m=y,a=[e.tShift[t]],e.tShift[t]=m-e.bMarks[t],p=e.parser.ruler.getRules("blockquote"),i=t+1;i=y));i++)if(62!==e.src.charCodeAt(m++)){if(o)break;for(d=!1,f=0,h=p.length;f=y,a.push(e.tShift[i]),e.tShift[i]=m-e.bMarks[i];for(c=e.parentType,e.parentType="blockquote",e.tokens.push({type:"blockquote_open",lines:l=[t,0],level:e.level++}),e.parser.tokenize(e,t,i),e.tokens.push({type:"blockquote_close",level:--e.level}),e.parentType=c,l[1]=e.line,f=0;fu)return!1;if(i=e.src.charCodeAt(s++),42!==i&&45!==i&&95!==i)return!1;for(o=1;s=i?-1:(n=e.src.charCodeAt(r++),42!==n&&45!==n&&43!==n?-1:r=i)return-1;if(n=e.src.charCodeAt(r++),n<48||n>57)return-1;for(;;){if(r>=i)return-1;if(n=e.src.charCodeAt(r++),!(n>=48&&n<=57)){if(41===n||46===n)break;return-1}}return r=0)_=!0;else{if(!((d=n(e,t))>=0))return!1;_=!1}if(e.level>=e.options.maxNesting)return!1;if(g=e.src.charCodeAt(d-1),a)return!0;for(x=e.tokens.length,_?(h=e.bMarks[t]+e.tShift[t],v=Number(e.src.substr(h,d-h-1)),e.tokens.push({type:"ordered_list_open",order:v,lines:k=[t,0],level:e.level++})):e.tokens.push({type:"bullet_list_open",lines:k=[t,0],level:e.level++}),s=t,w=!1,E=e.parser.ruler.getRules("list");!(!(s=m?1:b-d,y>4&&(y=1),y<1&&(y=1),u=d-e.bMarks[s]+y,e.tokens.push({type:"list_item_open",lines:S=[t,0],level:e.level++}),l=e.blkIndent,p=e.tight,c=e.tShift[t],f=e.parentType,e.tShift[t]=b-e.bMarks[t],e.blkIndent=u,e.tight=!0,e.parentType="list",e.parser.tokenize(e,t,o,!0),e.tight&&!w||(O=!1),w=e.line-t>1&&e.isEmpty(e.line-1),e.blkIndent=l,e.tShift[t]=c,e.tight=p,e.parentType=f,e.tokens.push({type:"list_item_close",level:--e.level}),s=t=e.line,S[1]=s,b=e.bMarks[t],s>=o)||e.isEmpty(s)||e.tShift[s]l)return!1;if(91!==e.src.charCodeAt(c))return!1;if(94!==e.src.charCodeAt(c+1))return!1;if(e.level>=e.options.maxNesting)return!1;for(s=c+2;s=l||58!==e.src.charCodeAt(++s))&&(!!r||(s++,e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.refs||(e.env.footnotes.refs={}),u=e.src.slice(c+2,s-2),e.env.footnotes.refs[":"+u]=-1,e.tokens.push({type:"footnote_reference_open",label:u,level:e.level++}),i=e.bMarks[t],o=e.tShift[t],a=e.parentType,e.tShift[t]=e.skipSpaces(s)-s,e.bMarks[t]=s,e.blkIndent+=4,e.parentType="footnote",e.tShift[t]=u)return!1;if(i=e.src.charCodeAt(s),35!==i||s>=u)return!1;for(o=1,i=e.src.charCodeAt(++s);35===i&&s6||ss&&32===e.src.charCodeAt(a-1)&&(u=a),e.line=t+1,e.tokens.push({type:"heading_open",hLevel:o,lines:[t,e.line],level:e.level}),s=n)&&(!(e.tShift[a]3)&&(i=e.bMarks[a]+e.tShift[a],o=e.eMarks[a],!(i>=o)&&(r=e.src.charCodeAt(i),(45===r||61===r)&&(i=e.skipChars(i,r),i=e.skipSpaces(i),!(i=97&&t<=122}var i=n(1316),o=/^<([a-zA-Z]{1,15})[\s\/>]/,a=/^<\/([a-zA-Z]{1,15})[\s>]/;e.exports=function(e,t,n,s){var u,c,l,p=e.bMarks[t],f=e.eMarks[t],h=e.tShift[t];if(p+=h,!e.options.html)return!1;if(h>3||p+2>=f)return!1;if(60!==e.src.charCodeAt(p))return!1;if(u=e.src.charCodeAt(p+1),33===u||63===u){if(s)return!0}else{if(47!==u&&!r(u))return!1;if(47===u){if(c=e.src.slice(p,f).match(a),!c)return!1}else if(c=e.src.slice(p,f).match(o),!c)return!1;if(i[c[1].toLowerCase()]!==!0)return!1;if(s)return!0}for(l=t+1;lr)return!1;if(c=t+1,e.tShift[c]=e.eMarks[c])return!1;if(o=e.src.charCodeAt(s),124!==o&&45!==o&&58!==o)return!1;if(a=n(e,t+1),!/^[-:| ]+$/.test(a))return!1;if(l=a.split("|"),l<=2)return!1;for(f=[],u=0;u=o?-1:(r=e.src.charCodeAt(i++),126!==r&&58!==r?-1:(n=e.skipSpaces(i),i===n?-1:n>=o?-1:n))}function r(e,t){var n,r,i=e.level+2;for(n=t+2,r=e.tokens.length-2;n=0;if(f=t+1,e.isEmpty(f)&&++f>i)return!1;if(e.tShift[f]=e.options.maxNesting)return!1;p=e.tokens.length,e.tokens.push({type:"dl_open",lines:l=[t,0],level:e.level++}),u=t,s=f;e:for(;;){for(_=!0,g=!1,e.tokens.push({type:"dt_open",lines:[u,u],level:e.level++}),e.tokens.push({type:"inline",content:e.getLines(u,u+1,e.blkIndent,!1).trim(),level:e.level+1,lines:[u,u],children:[]}),e.tokens.push({type:"dt_close",level:--e.level});;){if(e.tokens.push({type:"dd_open",lines:c=[f,0],level:e.level++}),v=e.tight,d=e.ddIndent,h=e.blkIndent,y=e.tShift[s],m=e.parentType,e.blkIndent=e.ddIndent=e.tShift[s]+2,e.tShift[s]=a-e.bMarks[s],e.tight=!0,e.parentType="deflist",e.parser.tokenize(e,s,i,!0),e.tight&&!g||(_=!1),g=e.line-s>1&&e.isEmpty(e.line-1),e.tShift[s]=y,e.tight=v,e.parentType=m,e.blkIndent=h,e.ddIndent=d,e.tokens.push({type:"dd_close",level:--e.level}),c[1]=f=e.line,f>=i)break e;if(e.tShift[f]=i)break;if(u=f,e.isEmpty(u))break;if(e.tShift[u]=i)break;if(e.isEmpty(s)&&s++,s>=i)break;if(e.tShift[s]3)){for(i=!1,o=0,a=s.length;o0)return void(e.pos=n);for(t=0;t=o)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},r.prototype.parse=function(e,t,n,r){var i=new a(e,this,t,n,r);this.tokenize(i)},e.exports=r},function(e,t){"use strict";function n(e){switch(e){case 10:case 92:case 96:case 42:case 95:case 94:case 91:case 93:case 33:case 38:case 60:case 62:case 123:case 125:case 36:case 37:case 64:case 126:case 43:case 61:case 58:return!0;default:return!1}}e.exports=function(e,t){for(var r=e.pos;r=0&&32===e.pending.charCodeAt(n))if(n>=1&&32===e.pending.charCodeAt(n-1)){for(var o=n-2;o>=0;o--)if(32!==e.pending.charCodeAt(o)){e.pending=e.pending.substring(0,o+1);break}e.push({type:"hardbreak",level:e.level})}else e.pending=e.pending.slice(0,-1),e.push({type:"softbreak",level:e.level});else e.push({type:"softbreak",level:e.level});for(i++;i?@[]^_`{|}~-".split("").forEach(function(e){n[e.charCodeAt(0)]=1}),e.exports=function(e,t){var r,i=e.pos,o=e.posMax;if(92!==e.src.charCodeAt(i))return!1;if(i++,i=s)return!1;if(126!==e.src.charCodeAt(u+1))return!1;if(e.level>=e.options.maxNesting)return!1;if(o=u>0?e.src.charCodeAt(u-1):-1,a=e.src.charCodeAt(u+2),126===o)return!1;if(126===a)return!1;if(32===a||10===a)return!1;for(r=u+2;ru+3)return e.pos+=r-u,t||(e.pending+=e.src.slice(u,r)),!0;for(e.pos=u+2,i=1;e.pos+1=s)return!1;if(43!==e.src.charCodeAt(u+1))return!1;if(e.level>=e.options.maxNesting)return!1; +if(o=u>0?e.src.charCodeAt(u-1):-1,a=e.src.charCodeAt(u+2),43===o)return!1;if(43===a)return!1;if(32===a||10===a)return!1;for(r=u+2;r=s)return!1;if(61!==e.src.charCodeAt(u+1))return!1;if(e.level>=e.options.maxNesting)return!1;if(o=u>0?e.src.charCodeAt(u-1):-1,a=e.src.charCodeAt(u+2),61===o)return!1;if(61===a)return!1;if(32===a||10===a)return!1;for(r=u+2;r=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122}function r(e,t){var r,i,o,a=t,s=!0,u=!0,c=e.posMax,l=e.src.charCodeAt(t);for(r=t>0?e.src.charCodeAt(t-1):-1;a=c&&(s=!1),o=a-t,o>=4?s=u=!1:(i=a=e.options.maxNesting)return!1;for(e.pos=p+n,u=[n];e.pos?@[\]^_`{|}~-])/g;e.exports=function(e,t){var r,i,o=e.posMax,a=e.pos;if(126!==e.src.charCodeAt(a))return!1;if(t)return!1;if(a+2>=o)return!1;if(e.level>=e.options.maxNesting)return!1;for(e.pos=a+1;e.pos?@[\]^_`{|}~-])/g;e.exports=function(e,t){var r,i,o=e.posMax,a=e.pos;if(94!==e.src.charCodeAt(a))return!1;if(t)return!1;if(a+2>=o)return!1;if(e.level>=e.options.maxNesting)return!1;for(e.pos=a+1;e.pos=e.options.maxNesting)return!1;if(n=v+1,s=r(e,v),s<0)return!1;if(p=s+1,p=y)return!1;for(v=p,i(e,p)?(c=e.linkContent,p=e.pos):c="",v=p;p=y||41!==e.src.charCodeAt(p))return e.pos=m,!1;p++}else{if(e.linkLevel>0)return!1;for(;p=0?u=e.src.slice(v,p++):p=v-1),u||("undefined"==typeof u&&(p=s+1),u=e.src.slice(n,s)),f=e.env.references[a(u)],!f)return e.pos=m,!1;c=f.href,l=f.title}return t||(e.pos=n,e.posMax=s,d?e.push({type:"image",src:c,title:l,alt:e.src.substr(n,s-n),level:e.level}):(e.push({type:"link_open",href:c,title:l,level:e.level++}),e.linkLevel++,e.parser.tokenize(e),e.linkLevel--,e.push({type:"link_close",level:--e.level}))),e.pos=p,e.posMax=y,!0}},function(e,t,n){"use strict";var r=n(1292);e.exports=function(e,t){var n,i,o,a,s=e.posMax,u=e.pos;return!(u+2>=s)&&(94===e.src.charCodeAt(u)&&(91===e.src.charCodeAt(u+1)&&(!(e.level>=e.options.maxNesting)&&(n=u+2,i=r(e,u+1),!(i<0)&&(t||(e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.list||(e.env.footnotes.list=[]),o=e.env.footnotes.list.length,e.pos=n,e.posMax=i,e.push({type:"footnote_ref",id:o,level:e.level}),e.linkLevel++,a=e.tokens.length,e.parser.tokenize(e),e.env.footnotes.list[o]={tokens:e.tokens.splice(a)},e.linkLevel--),e.pos=i+1,e.posMax=s,!0)))))}},function(e,t){"use strict";e.exports=function(e,t){var n,r,i,o,a=e.posMax,s=e.pos;if(s+3>a)return!1;if(!e.env.footnotes||!e.env.footnotes.refs)return!1;if(91!==e.src.charCodeAt(s))return!1;if(94!==e.src.charCodeAt(s+1))return!1;if(e.level>=e.options.maxNesting)return!1;for(r=s+2;r=a)&&(r++,n=e.src.slice(s+2,r-1),"undefined"!=typeof e.env.footnotes.refs[":"+n]&&(t||(e.env.footnotes.list||(e.env.footnotes.list=[]),e.env.footnotes.refs[":"+n]<0?(i=e.env.footnotes.list.length,e.env.footnotes.list[i]={label:n,count:0},e.env.footnotes.refs[":"+n]=i):i=e.env.footnotes.refs[":"+n],o=e.env.footnotes.list[i].count,e.env.footnotes.list[i].count++,e.push({type:"footnote_ref",id:i,subId:o,level:e.level})),e.pos=r,e.posMax=a,!0)))}},function(e,t,n){"use strict";var r=n(1335),i=n(1295),o=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,a=/^<([a-zA-Z.\-]{1,25}):([^<>\x00-\x20]*)>/;e.exports=function(e,t){var n,s,u,c,l,p=e.pos;return 60===e.src.charCodeAt(p)&&(n=e.src.slice(p),!(n.indexOf(">")<0)&&((s=n.match(a))?!(r.indexOf(s[1].toLowerCase())<0)&&(c=s[0].slice(1,-1),l=i(c),!!e.parser.validateLink(c)&&(t||(e.push({type:"link_open",href:l,level:e.level}),e.push({type:"text",content:c,level:e.level+1}),e.push({type:"link_close",level:e.level})),e.pos+=s[0].length,!0)):(u=n.match(o),!!u&&(c=u[0].slice(1,-1),l=i("mailto:"+c),!!e.parser.validateLink(l)&&(t||(e.push({type:"link_open",href:l,level:e.level}),e.push({type:"text",content:c,level:e.level+1}),e.push({type:"link_close",level:e.level})),e.pos+=u[0].length,!0)))))}},function(e,t){"use strict";e.exports=["coap","doi","javascript","aaa","aaas","about","acap","cap","cid","crid","data","dav","dict","dns","file","ftp","geo","go","gopher","h323","http","https","iax","icap","im","imap","info","ipp","iris","iris.beep","iris.xpc","iris.xpcs","iris.lwz","ldap","mailto","mid","msrp","msrps","mtqp","mupdate","news","nfs","ni","nih","nntp","opaquelocktoken","pop","pres","rtsp","service","session","shttp","sieve","sip","sips","sms","snmp","soap.beep","soap.beeps","tag","tel","telnet","tftp","thismessage","tn3270","tip","tv","urn","vemmi","ws","wss","xcon","xcon-userid","xmlrpc.beep","xmlrpc.beeps","xmpp","z39.50r","z39.50s","adiumxtra","afp","afs","aim","apt","attachment","aw","beshare","bitcoin","bolo","callto","chrome","chrome-extension","com-eventbrite-attendee","content","cvs","dlna-playsingle","dlna-playcontainer","dtn","dvb","ed2k","facetime","feed","finger","fish","gg","git","gizmoproject","gtalk","hcp","icon","ipn","irc","irc6","ircs","itms","jar","jms","keyparc","lastfm","ldaps","magnet","maps","market","message","mms","ms-help","msnim","mumble","mvn","notes","oid","palm","paparazzi","platform","proxy","psyc","query","res","resource","rmi","rsync","rtmp","secondlife","sftp","sgn","skype","smb","soldat","spotify","ssh","steam","svn","teamspeak","things","udp","unreal","ut2004","ventrilo","view-source","webcal","wtai","wyciwyg","xfire","xri","ymsgr"]},function(e,t,n){"use strict";function r(e){var t=32|e;return t>=97&&t<=122}var i=n(1337).HTML_TAG_RE;e.exports=function(e,t){var n,o,a,s=e.pos;return!!e.options.html&&(a=e.posMax,!(60!==e.src.charCodeAt(s)||s+2>=a)&&(n=e.src.charCodeAt(s+1),!(33!==n&&63!==n&&47!==n&&!r(n))&&(!!(o=e.src.slice(s).match(i))&&(t||e.push({type:"htmltag",content:e.src.slice(s,s+o[0].length),level:e.level}),e.pos+=o[0].length,!0))))}},function(e,t){"use strict";function n(e,t){return e=e.source,t=t||"",function n(r,i){return r?(i=i.source||i,e=e.replace(r,i),n):new RegExp(e,t)}}var r=/[a-zA-Z_:][a-zA-Z0-9:._-]*/,i=/[^"'=<>`\x00-\x20]+/,o=/'[^']*'/,a=/"[^"]*"/,s=n(/(?:unquoted|single_quoted|double_quoted)/)("unquoted",i)("single_quoted",o)("double_quoted",a)(),u=n(/(?:\s+attr_name(?:\s*=\s*attr_value)?)/)("attr_name",r)("attr_value",s)(),c=n(/<[A-Za-z][A-Za-z0-9]*attribute*\s*\/?>/)("attribute",u)(),l=/<\/[A-Za-z][A-Za-z0-9]*\s*>/,p=//,f=/<[?].*?[?]>/,h=/]*>/,d=/])*\]\]>/,m=n(/^(?:open_tag|close_tag|comment|processing|declaration|cdata)/)("open_tag",c)("close_tag",l)("comment",p)("processing",f)("declaration",h)("cdata",d)();e.exports.HTML_TAG_RE=m},function(e,t,n){"use strict";var r=n(1284),i=n(1283).has,o=n(1283).isValidEntityCode,a=n(1283).fromCodePoint,s=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,u=/^&([a-z][a-z0-9]{1,31});/i;e.exports=function(e,t){var n,c,l,p=e.pos,f=e.posMax;if(38!==e.src.charCodeAt(p))return!1;if(p+1/g,">").replace(/\"/g,""")}function f(e,n){n=n.replace(/[\x00-\x20]+/g,""),n=n.replace(/<\!\-\-.*?\-\-\>/g,"");var r=n.match(/^([a-zA-Z]+)\:/);if(!r)return!!n.match(/^\/\//)&&!t.allowProtocolRelative;var o=r[1].toLowerCase();return i(t.allowedSchemesByTag,e)?t.allowedSchemesByTag[e].indexOf(o)===-1:!t.allowedSchemes||t.allowedSchemes.indexOf(o)===-1}function h(e,t){return t?(e=e.split(/\s+/),e.filter(function(e){return t.indexOf(e)!==-1}).join(" ")):e}var d="";t?(t=s(o.defaults,t),t.parser?t.parser=s(c,t.parser):t.parser=c):(t=o.defaults,t.parser=c);var m,y,v=t.nonTextTags||["script","style","textarea"];t.allowedAttributes&&(m={},y={},r(t.allowedAttributes,function(e,t){m[t]=[];var n=[];e.forEach(function(e){e.indexOf("*")>=0?n.push(u(e).replace(/\\\*/g,".*")):m[t].push(e)}),y[t]=new RegExp("^("+n.join("|")+")$")}));var g={};r(t.allowedClasses,function(e,t){m&&(i(m,t)||(m[t]=[]),m[t].push("class")),g[t]=e});var _,b={};r(t.transformTags,function(e,t){var n;"function"==typeof e?n=e:"string"==typeof e&&(n=o.simpleTransform(e)),"*"===t?_=n:b[t]=n});var x=0,w=[],k={},S={},E=!1,C=0,A=new a.Parser({onopentag:function(e,n){if(E)return void C++;var o=new l(e,n);w.push(o);var a,s=!1,u=!!o.text;i(b,e)&&(a=b[e](e,n),o.attribs=n=a.attribs,void 0!==a.text&&(o.innerText=a.text),e!==a.tagName&&(o.name=e=a.tagName,S[x]=a.tagName)),_&&(a=_(e,n),o.attribs=n=a.attribs,e!==a.tagName&&(o.name=e=a.tagName,S[x]=a.tagName)),t.allowedTags&&t.allowedTags.indexOf(e)===-1&&(s=!0,v.indexOf(e)!==-1&&(E=!0,C=1),k[x]=!0),x++,s||(d+="<"+e,(!m||i(m,e)||m["*"])&&r(n,function(t,n){if(!m||i(m,e)&&m[e].indexOf(n)!==-1||m["*"]&&m["*"].indexOf(n)!==-1||i(y,e)&&y[e].test(n)||y["*"]&&y["*"].test(n)){if(("href"===n||"src"===n)&&f(e,t))return void delete o.attribs[n];if("class"===n&&(t=h(t,g[e]),!t.length))return void delete o.attribs[n];d+=" "+n,t.length&&(d+='="'+p(t)+'"')}else delete o.attribs[n]}),t.selfClosing.indexOf(e)!==-1?d+=" />":(d+=">",!o.innerText||u||t.textFilter||(d+=o.innerText)))},ontext:function(e){if(!E){var n,r=w[w.length-1];if(r&&(n=r.tag,e=void 0!==r.innerText?r.innerText:e),"script"===n||"style"===n)d+=e;else{var i=p(e);d+=t.textFilter?t.textFilter(i):i}if(w.length){var o=w[w.length-1];o.text+=e}}},onclosetag:function(e){if(E){if(C--,C)return;E=!1}var n=w.pop();if(n){if(E=!1,x--,k[x])return delete k[x],void n.updateParentNodeText();if(S[x]&&(e=S[x],delete S[x]),t.exclusiveFilter&&t.exclusiveFilter(n))return void(d=d.substr(0,n.tagPosition));n.updateParentNodeText(),t.selfClosing.indexOf(e)===-1&&(d+="")}}},t.parser);return A.write(e),A.end(),d}var a=n(1343),s=n(1373),u=n(1374);e.exports=o;var c={decodeEntities:!0};o.defaults={allowedTags:["h3","h4","h5","h6","blockquote","p","a","ul","ol","nl","li","b","i","strong","em","strike","code","hr","br","div","table","thead","caption","tbody","tr","th","td","pre"],allowedAttributes:{a:["href","name","target"],img:["src"]},selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto"],allowedSchemesByTag:{},allowProtocolRelative:!0},o.simpleTransform=function(e,t,n){return n=void 0===n||n,t=t||{},function(r,i){var o;if(n)for(o in t)i[o]=t[o];else i=t;return{tagName:e,attribs:i}}}},function(e,t,n){function r(t,n){return delete e.exports[t],e.exports[t]=n,n}var i=n(1344),o=n(1351);e.exports={Parser:i,Tokenizer:n(1345),ElementType:n(1352),DomHandler:o,get FeedHandler(){return r("FeedHandler",n(1355))},get Stream(){return r("Stream",n(1356))},get WritableStream(){return r("WritableStream",n(1357))},get ProxyHandler(){return r("ProxyHandler",n(1359))},get DomUtils(){return r("DomUtils",n(1360))},get CollectingHandler(){return r("CollectingHandler",n(1372))},DefaultHandler:o,get RssHandler(){return r("RssHandler",this.FeedHandler)},parseDOM:function(e,t){var n=new o(t);return new i(n,t).end(e),n.dom},parseFeed:function(t,n){var r=new e.exports.FeedHandler(n);return new i(r,n).end(t),r.dom},createDomStream:function(e,t,n){var r=new o(e,t,n);return new i(r,t)},EVENTS:{attribute:2,cdatastart:0,cdataend:0,text:1,processinginstruction:2,comment:1,commentend:0,closetag:1,opentag:2,opentagname:1,error:1,end:0}}},function(e,t,n){function r(e,t){this._options=t||{},this._cbs=e||{},this._tagname="",this._attribname="",this._attribvalue="",this._attribs=null,this._stack=[],this.startIndex=0,this.endIndex=null,this._lowerCaseTagNames="lowerCaseTags"in this._options?!!this._options.lowerCaseTags:!this._options.xmlMode,this._lowerCaseAttributeNames="lowerCaseAttributeNames"in this._options?!!this._options.lowerCaseAttributeNames:!this._options.xmlMode,this._options.Tokenizer&&(i=this._options.Tokenizer),this._tokenizer=new i(this._options,this),this._cbs.onparserinit&&this._cbs.onparserinit(this)}var i=n(1345),o={input:!0,option:!0,optgroup:!0,select:!0,button:!0,datalist:!0,textarea:!0},a={tr:{tr:!0,th:!0,td:!0},th:{th:!0},td:{thead:!0,th:!0,td:!0},body:{head:!0,link:!0,script:!0},li:{li:!0},p:{p:!0},h1:{p:!0},h2:{p:!0},h3:{p:!0},h4:{p:!0},h5:{p:!0},h6:{p:!0},select:o,input:o,output:o,button:o,datalist:o,textarea:o,option:{option:!0},optgroup:{optgroup:!0}},s={__proto__:null,area:!0,base:!0,basefont:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,isindex:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,path:!0,circle:!0,ellipse:!0,line:!0,rect:!0,use:!0,stop:!0,polyline:!0,polygon:!0},u=/\s|\//;n(474)(r,n(473).EventEmitter),r.prototype._updatePosition=function(e){null===this.endIndex?this._tokenizer._sectionStart<=e?this.startIndex=0:this.startIndex=this._tokenizer._sectionStart-e:this.startIndex=this.endIndex+1,this.endIndex=this._tokenizer.getAbsoluteIndex()},r.prototype.ontext=function(e){this._updatePosition(1),this.endIndex--,this._cbs.ontext&&this._cbs.ontext(e)},r.prototype.onopentagname=function(e){if(this._lowerCaseTagNames&&(e=e.toLowerCase()),this._tagname=e,!this._options.xmlMode&&e in a)for(var t;(t=this._stack[this._stack.length-1])in a[e];this.onclosetag(t));!this._options.xmlMode&&e in s||this._stack.push(e),this._cbs.onopentagname&&this._cbs.onopentagname(e),this._cbs.onopentag&&(this._attribs={})},r.prototype.onopentagend=function(){this._updatePosition(1),this._attribs&&(this._cbs.onopentag&&this._cbs.onopentag(this._tagname,this._attribs),this._attribs=null),!this._options.xmlMode&&this._cbs.onclosetag&&this._tagname in s&&this._cbs.onclosetag(this._tagname),this._tagname=""},r.prototype.onclosetag=function(e){if(this._updatePosition(1),this._lowerCaseTagNames&&(e=e.toLowerCase()),!this._stack.length||e in s&&!this._options.xmlMode)this._options.xmlMode||"br"!==e&&"p"!==e||(this.onopentagname(e),this._closeCurrentTag());else{var t=this._stack.lastIndexOf(e);if(t!==-1)if(this._cbs.onclosetag)for(t=this._stack.length-t;t--;)this._cbs.onclosetag(this._stack.pop());else this._stack.length=t;else"p"!==e||this._options.xmlMode||(this.onopentagname(e),this._closeCurrentTag())}},r.prototype.onselfclosingtag=function(){this._options.xmlMode||this._options.recognizeSelfClosing?this._closeCurrentTag():this.onopentagend()},r.prototype._closeCurrentTag=function(){var e=this._tagname;this.onopentagend(),this._stack[this._stack.length-1]===e&&(this._cbs.onclosetag&&this._cbs.onclosetag(e),this._stack.pop())},r.prototype.onattribname=function(e){this._lowerCaseAttributeNames&&(e=e.toLowerCase()),this._attribname=e},r.prototype.onattribdata=function(e){this._attribvalue+=e},r.prototype.onattribend=function(){this._cbs.onattribute&&this._cbs.onattribute(this._attribname,this._attribvalue),this._attribs&&!Object.prototype.hasOwnProperty.call(this._attribs,this._attribname)&&(this._attribs[this._attribname]=this._attribvalue),this._attribname="",this._attribvalue=""},r.prototype._getInstructionName=function(e){var t=e.search(u),n=t<0?e:e.substr(0,t);return this._lowerCaseTagNames&&(n=n.toLowerCase()),n},r.prototype.ondeclaration=function(e){if(this._cbs.onprocessinginstruction){var t=this._getInstructionName(e);this._cbs.onprocessinginstruction("!"+t,"!"+e)}},r.prototype.onprocessinginstruction=function(e){if(this._cbs.onprocessinginstruction){var t=this._getInstructionName(e);this._cbs.onprocessinginstruction("?"+t,"?"+e)}},r.prototype.oncomment=function(e){this._updatePosition(4),this._cbs.oncomment&&this._cbs.oncomment(e),this._cbs.oncommentend&&this._cbs.oncommentend()},r.prototype.oncdata=function(e){this._updatePosition(1),this._options.xmlMode||this._options.recognizeCDATA?(this._cbs.oncdatastart&&this._cbs.oncdatastart(),this._cbs.ontext&&this._cbs.ontext(e),this._cbs.oncdataend&&this._cbs.oncdataend()):this.oncomment("[CDATA["+e+"]]")},r.prototype.onerror=function(e){this._cbs.onerror&&this._cbs.onerror(e)},r.prototype.onend=function(){if(this._cbs.onclosetag)for(var e=this._stack.length;e>0;this._cbs.onclosetag(this._stack[--e]));this._cbs.onend&&this._cbs.onend()},r.prototype.reset=function(){this._cbs.onreset&&this._cbs.onreset(),this._tokenizer.reset(),this._tagname="",this._attribname="",this._attribs=null,this._stack=[],this._cbs.onparserinit&&this._cbs.onparserinit(this)},r.prototype.parseComplete=function(e){this.reset(),this.end(e)},r.prototype.write=function(e){this._tokenizer.write(e)},r.prototype.end=function(e){this._tokenizer.end(e)},r.prototype.pause=function(){this._tokenizer.pause()},r.prototype.resume=function(){this._tokenizer.resume()},r.prototype.parseChunk=r.prototype.write,r.prototype.done=r.prototype.end,e.exports=r},function(e,t,n){function r(e){return" "===e||"\n"===e||"\t"===e||"\f"===e||"\r"===e}function i(e,t){return function(n){n===e&&(this._state=t)}}function o(e,t,n){var r=e.toLowerCase();return e===r?function(e){e===r?this._state=t:(this._state=n,this._index--)}:function(i){i===r||i===e?this._state=t:(this._state=n,this._index--)}}function a(e,t){var n=e.toLowerCase();return function(r){r===n||r===e?this._state=t:(this._state=m,this._index--)}}function s(e,t){this._state=h,this._buffer="",this._sectionStart=0,this._index=0,this._bufferOffset=0,this._baseState=h,this._special=me,this._cbs=t,this._running=!0,this._ended=!1,this._xmlMode=!(!e||!e.xmlMode),this._decodeEntities=!(!e||!e.decodeEntities)}e.exports=s;var u=n(1346),c=n(1348),l=n(1349),p=n(1350),f=0,h=f++,d=f++,m=f++,y=f++,v=f++,g=f++,_=f++,b=f++,x=f++,w=f++,k=f++,S=f++,E=f++,C=f++,A=f++,T=f++,O=f++,D=f++,M=f++,P=f++,I=f++,j=f++,R=f++,N=f++,F=f++,B=f++,L=f++,z=f++,q=f++,U=f++,W=f++,K=f++,V=f++,H=f++,J=f++,G=f++,X=f++,Y=f++,$=f++,Z=f++,Q=f++,ee=f++,te=f++,ne=f++,re=f++,ie=f++,oe=f++,ae=f++,se=f++,ue=f++,ce=f++,le=f++,pe=f++,fe=f++,he=f++,de=0,me=de++,ye=de++,ve=de++;s.prototype._stateText=function(e){"<"===e?(this._index>this._sectionStart&&this._cbs.ontext(this._getSection()),this._state=d,this._sectionStart=this._index):this._decodeEntities&&this._special===me&&"&"===e&&(this._index>this._sectionStart&&this._cbs.ontext(this._getSection()),this._baseState=h,this._state=ce,this._sectionStart=this._index)},s.prototype._stateBeforeTagName=function(e){"/"===e?this._state=v:"<"===e?(this._cbs.ontext(this._getSection()),this._sectionStart=this._index):">"===e||this._special!==me||r(e)?this._state=h:"!"===e?(this._state=A,this._sectionStart=this._index+1):"?"===e?(this._state=O,this._sectionStart=this._index+1):(this._state=this._xmlMode||"s"!==e&&"S"!==e?m:W,this._sectionStart=this._index)},s.prototype._stateInTagName=function(e){("/"===e||">"===e||r(e))&&(this._emitToken("onopentagname"),this._state=b,this._index--)},s.prototype._stateBeforeCloseingTagName=function(e){r(e)||(">"===e?this._state=h:this._special!==me?"s"===e||"S"===e?this._state=K:(this._state=h,this._index--):(this._state=g,this._sectionStart=this._index))},s.prototype._stateInCloseingTagName=function(e){(">"===e||r(e))&&(this._emitToken("onclosetag"),this._state=_,this._index--)},s.prototype._stateAfterCloseingTagName=function(e){">"===e&&(this._state=h,this._sectionStart=this._index+1)},s.prototype._stateBeforeAttributeName=function(e){">"===e?(this._cbs.onopentagend(),this._state=h,this._sectionStart=this._index+1):"/"===e?this._state=y:r(e)||(this._state=x,this._sectionStart=this._index)},s.prototype._stateInSelfClosingTag=function(e){">"===e?(this._cbs.onselfclosingtag(),this._state=h,this._sectionStart=this._index+1):r(e)||(this._state=b,this._index--)},s.prototype._stateInAttributeName=function(e){("="===e||"/"===e||">"===e||r(e))&&(this._cbs.onattribname(this._getSection()),this._sectionStart=-1,this._state=w,this._index--)},s.prototype._stateAfterAttributeName=function(e){"="===e?this._state=k:"/"===e||">"===e?(this._cbs.onattribend(),this._state=b,this._index--):r(e)||(this._cbs.onattribend(),this._state=x,this._sectionStart=this._index)},s.prototype._stateBeforeAttributeValue=function(e){'"'===e?(this._state=S,this._sectionStart=this._index+1):"'"===e?(this._state=E,this._sectionStart=this._index+1):r(e)||(this._state=C,this._sectionStart=this._index,this._index--)},s.prototype._stateInAttributeValueDoubleQuotes=function(e){'"'===e?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=b):this._decodeEntities&&"&"===e&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=ce,this._sectionStart=this._index)},s.prototype._stateInAttributeValueSingleQuotes=function(e){"'"===e?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=b):this._decodeEntities&&"&"===e&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=ce,this._sectionStart=this._index)},s.prototype._stateInAttributeValueNoQuotes=function(e){r(e)||">"===e?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=b,this._index--):this._decodeEntities&&"&"===e&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=ce,this._sectionStart=this._index)},s.prototype._stateBeforeDeclaration=function(e){this._state="["===e?j:"-"===e?D:T},s.prototype._stateInDeclaration=function(e){">"===e&&(this._cbs.ondeclaration(this._getSection()),this._state=h,this._sectionStart=this._index+1)},s.prototype._stateInProcessingInstruction=function(e){">"===e&&(this._cbs.onprocessinginstruction(this._getSection()),this._state=h,this._sectionStart=this._index+1)},s.prototype._stateBeforeComment=function(e){"-"===e?(this._state=M,this._sectionStart=this._index+1):this._state=T},s.prototype._stateInComment=function(e){"-"===e&&(this._state=P)},s.prototype._stateAfterComment1=function(e){"-"===e?this._state=I:this._state=M},s.prototype._stateAfterComment2=function(e){">"===e?(this._cbs.oncomment(this._buffer.substring(this._sectionStart,this._index-2)),this._state=h,this._sectionStart=this._index+1):"-"!==e&&(this._state=M)},s.prototype._stateBeforeCdata1=o("C",R,T),s.prototype._stateBeforeCdata2=o("D",N,T),s.prototype._stateBeforeCdata3=o("A",F,T),s.prototype._stateBeforeCdata4=o("T",B,T),s.prototype._stateBeforeCdata5=o("A",L,T),s.prototype._stateBeforeCdata6=function(e){"["===e?(this._state=z,this._sectionStart=this._index+1):(this._state=T,this._index--)},s.prototype._stateInCdata=function(e){"]"===e&&(this._state=q)},s.prototype._stateAfterCdata1=i("]",U),s.prototype._stateAfterCdata2=function(e){">"===e?(this._cbs.oncdata(this._buffer.substring(this._sectionStart,this._index-2)),this._state=h,this._sectionStart=this._index+1):"]"!==e&&(this._state=z)},s.prototype._stateBeforeSpecial=function(e){"c"===e||"C"===e?this._state=V:"t"===e||"T"===e?this._state=te:(this._state=m,this._index--)},s.prototype._stateBeforeSpecialEnd=function(e){this._special!==ye||"c"!==e&&"C"!==e?this._special!==ve||"t"!==e&&"T"!==e?this._state=h:this._state=oe:this._state=Y},s.prototype._stateBeforeScript1=a("R",H),s.prototype._stateBeforeScript2=a("I",J),s.prototype._stateBeforeScript3=a("P",G),s.prototype._stateBeforeScript4=a("T",X),s.prototype._stateBeforeScript5=function(e){("/"===e||">"===e||r(e))&&(this._special=ye),this._state=m,this._index--},s.prototype._stateAfterScript1=o("R",$,h),s.prototype._stateAfterScript2=o("I",Z,h),s.prototype._stateAfterScript3=o("P",Q,h),s.prototype._stateAfterScript4=o("T",ee,h),s.prototype._stateAfterScript5=function(e){">"===e||r(e)?(this._special=me,this._state=g,this._sectionStart=this._index-6,this._index--):this._state=h},s.prototype._stateBeforeStyle1=a("Y",ne),s.prototype._stateBeforeStyle2=a("L",re),s.prototype._stateBeforeStyle3=a("E",ie),s.prototype._stateBeforeStyle4=function(e){("/"===e||">"===e||r(e))&&(this._special=ve),this._state=m,this._index--},s.prototype._stateAfterStyle1=o("Y",ae,h),s.prototype._stateAfterStyle2=o("L",se,h),s.prototype._stateAfterStyle3=o("E",ue,h),s.prototype._stateAfterStyle4=function(e){">"===e||r(e)?(this._special=me,this._state=g,this._sectionStart=this._index-5,this._index--):this._state=h},s.prototype._stateBeforeEntity=o("#",le,pe),s.prototype._stateBeforeNumericEntity=o("X",he,fe),s.prototype._parseNamedEntityStrict=function(){if(this._sectionStart+16&&(t=6);t>=2;){var n=this._buffer.substr(e,t);if(l.hasOwnProperty(n))return this._emitPartial(l[n]),void(this._sectionStart+=t+1);t--}},s.prototype._stateInNamedEntity=function(e){";"===e?(this._parseNamedEntityStrict(),this._sectionStart+1"z")&&(e<"A"||e>"Z")&&(e<"0"||e>"9")&&(this._xmlMode||this._sectionStart+1===this._index||(this._baseState!==h?"="!==e&&this._parseNamedEntityStrict():this._parseLegacyEntity()),this._state=this._baseState,this._index--)},s.prototype._decodeNumericEntity=function(e,t){var n=this._sectionStart+e;if(n!==this._index){var r=this._buffer.substring(n,this._index),i=parseInt(r,t);this._emitPartial(u(i)),this._sectionStart=this._index}else this._sectionStart--;this._state=this._baseState},s.prototype._stateInNumericEntity=function(e){";"===e?(this._decodeNumericEntity(2,10),this._sectionStart++):(e<"0"||e>"9")&&(this._xmlMode?this._state=this._baseState:this._decodeNumericEntity(2,10),this._index--)},s.prototype._stateInHexEntity=function(e){";"===e?(this._decodeNumericEntity(3,16),this._sectionStart++):(e<"a"||e>"f")&&(e<"A"||e>"F")&&(e<"0"||e>"9")&&(this._xmlMode?this._state=this._baseState:this._decodeNumericEntity(3,16),this._index--)},s.prototype._cleanup=function(){this._sectionStart<0?(this._buffer="",this._bufferOffset+=this._index,this._index=0):this._running&&(this._state===h?(this._sectionStart!==this._index&&this._cbs.ontext(this._buffer.substr(this._sectionStart)),this._buffer="",this._bufferOffset+=this._index,this._index=0):this._sectionStart===this._index?(this._buffer="",this._bufferOffset+=this._index,this._index=0):(this._buffer=this._buffer.substr(this._sectionStart),this._index-=this._sectionStart,this._bufferOffset+=this._sectionStart),this._sectionStart=0)},s.prototype.write=function(e){this._ended&&this._cbs.onerror(Error(".write() after done!")),this._buffer+=e,this._parse()},s.prototype._parse=function(){for(;this._index=55296&&e<=57343||e>1114111)return"�";e in i&&(e=i[e]);var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e)}var i=n(1347);e.exports=r},function(e,t){e.exports={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376}},function(e,t){e.exports={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}},function(e,t){e.exports={Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",amp:"&",AMP:"&",Aring:"Å",aring:"å",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",brvbar:"¦",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",iquest:"¿",Iuml:"Ï",iuml:"ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",Ntilde:"Ñ",ntilde:"ñ",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",Ograve:"Ò",ograve:"ò",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",Ouml:"Ö",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",THORN:"Þ",thorn:"þ",times:"×",Uacute:"Ú",uacute:"ú",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",Uuml:"Ü",uuml:"ü",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ"}},function(e,t){e.exports={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}},function(e,t,n){function r(e,t,n){"object"==typeof e?(n=t,t=e,e=null):"function"==typeof t&&(n=t,t=u),this._callback=e,this._options=t||u,this._elementCB=n,this.dom=[],this._done=!1,this._tagStack=[],this._parser=this._parser||null}var i=n(1352),o=/\s+/g,a=n(1353),s=n(1354),u={normalizeWhitespace:!1,withStartIndices:!1,withEndIndices:!1};r.prototype.onparserinit=function(e){this._parser=e},r.prototype.onreset=function(){r.call(this,this._callback,this._options,this._elementCB)},r.prototype.onend=function(){this._done||(this._done=!0,this._parser=null,this._handleCallback(null))},r.prototype._handleCallback=r.prototype.onerror=function(e){if("function"==typeof this._callback)this._callback(e,this.dom);else if(e)throw e},r.prototype.onclosetag=function(){var e=this._tagStack.pop();this._options.withEndIndices&&(e.endIndex=this._parser.endIndex),this._elementCB&&this._elementCB(e)},r.prototype._createDomElement=function(e){if(!this._options.withDomLvl1)return e;var t;t="tag"===e.type?Object.create(s):Object.create(a);for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},r.prototype._addDomElement=function(e){var t=this._tagStack[this._tagStack.length-1],n=t?t.children:this.dom,r=n[n.length-1];e.next=null,this._options.withStartIndices&&(e.startIndex=this._parser.startIndex),this._options.withEndIndices&&(e.endIndex=this._parser.endIndex),r?(e.prev=r,r.next=e):e.prev=null,n.push(e),e.parent=t||null},r.prototype.onopentag=function(e,t){var n={type:"script"===e?i.Script:"style"===e?i.Style:i.Tag,name:e,attribs:t,children:[]},r=this._createDomElement(n);this._addDomElement(r),this._tagStack.push(r)},r.prototype.ontext=function(e){var t,n=this._options.normalizeWhitespace||this._options.ignoreWhitespace;if(!this._tagStack.length&&this.dom.length&&(t=this.dom[this.dom.length-1]).type===i.Text)n?t.data=(t.data+e).replace(o," "):t.data+=e;else if(this._tagStack.length&&(t=this._tagStack[this._tagStack.length-1])&&(t=t.children[t.children.length-1])&&t.type===i.Text)n?t.data=(t.data+e).replace(o," "):t.data+=e;else{n&&(e=e.replace(o," "));var r=this._createDomElement({data:e,type:i.Text});this._addDomElement(r)}},r.prototype.oncomment=function(e){var t=this._tagStack[this._tagStack.length-1];if(t&&t.type===i.Comment)return void(t.data+=e);var n={data:e,type:i.Comment},r=this._createDomElement(n);this._addDomElement(r),this._tagStack.push(r)},r.prototype.oncdatastart=function(){var e={children:[{data:"",type:i.Text}],type:i.CDATA},t=this._createDomElement(e);this._addDomElement(t),this._tagStack.push(t)},r.prototype.oncommentend=r.prototype.oncdataend=function(){this._tagStack.pop()},r.prototype.onprocessinginstruction=function(e,t){var n=this._createDomElement({name:e,data:t,type:i.Directive});this._addDomElement(n)},e.exports=r},function(e,t){e.exports={Text:"text",Directive:"directive",Comment:"comment",Script:"script",Style:"style",Tag:"tag",CDATA:"cdata",Doctype:"doctype",isTag:function(e){return"tag"===e.type||"script"===e.type||"style"===e.type}}},function(e,t){var n=e.exports={get firstChild(){var e=this.children;return e&&e[0]||null},get lastChild(){var e=this.children;return e&&e[e.length-1]||null},get nodeType(){return i[this.type]||i.element}},r={tagName:"name",childNodes:"children",parentNode:"parent",previousSibling:"prev",nextSibling:"next",nodeValue:"data"},i={element:1,text:3,cdata:4,comment:8};Object.keys(r).forEach(function(e){var t=r[e];Object.defineProperty(n,e,{get:function(){return this[t]||null},set:function(e){return this[t]=e,e}})})},function(e,t,n){var r=n(1353),i=e.exports=Object.create(r),o={tagName:"name"};Object.keys(o).forEach(function(e){var t=o[e];Object.defineProperty(i,e,{ +get:function(){return this[t]||null},set:function(e){return this[t]=e,e}})})},function(e,t,n){function r(e,t){this.init(e,t)}function i(e,t){return l.getElementsByTagName(e,t,!0)}function o(e,t){return l.getElementsByTagName(e,t,!0,1)[0]}function a(e,t,n){return l.getText(l.getElementsByTagName(e,t,n,1)).trim()}function s(e,t,n,r,i){var o=a(n,r,i);o&&(e[t]=o)}var u=n(1343),c=u.DomHandler,l=u.DomUtils;n(474)(r,c),r.prototype.init=c;var p=function(e){return"rss"===e||"feed"===e||"rdf:RDF"===e};r.prototype.onend=function(){var e,t,n={},r=o(p,this.dom);r&&("feed"===r.name?(t=r.children,n.type="atom",s(n,"id","id",t),s(n,"title","title",t),(e=o("link",t))&&(e=e.attribs)&&(e=e.href)&&(n.link=e),s(n,"description","subtitle",t),(e=a("updated",t))&&(n.updated=new Date(e)),s(n,"author","email",t,!0),n.items=i("entry",t).map(function(e){var t,n={};return e=e.children,s(n,"id","id",e),s(n,"title","title",e),(t=o("link",e))&&(t=t.attribs)&&(t=t.href)&&(n.link=t),(t=a("summary",e)||a("content",e))&&(n.description=t),(t=a("updated",e))&&(n.pubDate=new Date(t)),n})):(t=o("channel",r.children).children,n.type=r.name.substr(0,3),n.id="",s(n,"title","title",t),s(n,"link","link",t),s(n,"description","description",t),(e=a("lastBuildDate",t))&&(n.updated=new Date(e)),s(n,"author","managingEditor",t,!0),n.items=i("item",r.children).map(function(e){var t,n={};return e=e.children,s(n,"id","guid",e),s(n,"title","title",e),s(n,"link","link",e),s(n,"description","description",e),(t=a("pubDate",e))&&(n.pubDate=new Date(t)),n}))),this.dom=n,c.prototype._handleCallback.call(this,r?null:Error("couldn't find root of feed"))},e.exports=r},function(e,t,n){function r(e){o.call(this,new i(this),e)}function i(e){this.scope=e}e.exports=r;var o=n(1357);n(474)(r,o),r.prototype.readable=!0;var a=n(1343).EVENTS;Object.keys(a).forEach(function(e){if(0===a[e])i.prototype["on"+e]=function(){this.scope.emit(e)};else if(1===a[e])i.prototype["on"+e]=function(t){this.scope.emit(e,t)};else{if(2!==a[e])throw Error("wrong number of arguments!");i.prototype["on"+e]=function(t,n){this.scope.emit(e,t,n)}}})},function(e,t,n){function r(e,t){var n=this._parser=new i(e,t),r=this._decoder=new a;o.call(this,{decodeStrings:!1}),this.once("finish",function(){n.end(r.end())})}e.exports=r;var i=n(1344),o=n(472).Writable||n(1358).Writable,a=n(488).StringDecoder,s=n(299).Buffer;n(474)(r,o),o.prototype._write=function(e,t,n){e instanceof s&&(e=this._decoder.write(e)),this._parser.write(e),n()}},481,function(e,t,n){function r(e){this._cbs=e||{}}e.exports=r;var i=n(1343).EVENTS;Object.keys(i).forEach(function(e){if(0===i[e])e="on"+e,r.prototype[e]=function(){this._cbs[e]&&this._cbs[e]()};else if(1===i[e])e="on"+e,r.prototype[e]=function(t){this._cbs[e]&&this._cbs[e](t)};else{if(2!==i[e])throw Error("wrong number of arguments");e="on"+e,r.prototype[e]=function(t,n){this._cbs[e]&&this._cbs[e](t,n)}}})},function(e,t,n){var r=e.exports;[n(1361),n(1367),n(1368),n(1369),n(1370),n(1371)].forEach(function(e){Object.keys(e).forEach(function(t){r[t]=e[t].bind(r)})})},function(e,t,n){function r(e,t){return e.children?e.children.map(function(e){return a(e,t)}).join(""):""}function i(e){return Array.isArray(e)?e.map(i).join(""):s(e)?"br"===e.name?"\n":i(e.children):e.type===o.CDATA?i(e.children):e.type===o.Text?e.data:""}var o=n(1352),a=n(1362),s=o.isTag;e.exports={getInnerHTML:r,getOuterHTML:a,getText:i}},function(e,t,n){function r(e,t){if(e){var n,r="";for(var i in e)n=e[i],r&&(r+=" "),r+=!n&&p[i]?i:i+'="'+(t.decodeEntities?l.encodeXML(n):n)+'"';return r}}function i(e,t){"svg"===e.name&&(t={decodeEntities:t.decodeEntities,xmlMode:!0});var n="<"+e.name,i=r(e.attribs,t);return i&&(n+=" "+i),!t.xmlMode||e.children&&0!==e.children.length?(n+=">",e.children&&(n+=d(e.children,t)),h[e.name]&&!t.xmlMode||(n+="")):n+="/>",n}function o(e){return"<"+e.data+">"}function a(e,t){var n=e.data||"";return!t.decodeEntities||e.parent&&e.parent.name in f||(n=l.encodeXML(n)),n}function s(e){return""}function u(e){return""}var c=n(1363),l=n(1364),p={__proto__:null,allowfullscreen:!0,async:!0,autofocus:!0,autoplay:!0,checked:!0,controls:!0,default:!0,defer:!0,disabled:!0,hidden:!0,ismap:!0,loop:!0,multiple:!0,muted:!0,open:!0,readonly:!0,required:!0,reversed:!0,scoped:!0,seamless:!0,selected:!0,typemustmatch:!0},f={__proto__:null,style:!0,script:!0,xmp:!0,iframe:!0,noembed:!0,noframes:!0,plaintext:!0,noscript:!0},h={__proto__:null,area:!0,base:!0,basefont:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,isindex:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},d=e.exports=function(e,t){Array.isArray(e)||e.cheerio||(e=[e]),t=t||{};for(var n="",r=0;r0&&(o=i(e,o,n,r),a=a.concat(o),r-=o.length,r<=0)));s++);return a}function o(e,t){for(var n=0,r=t.length;n0&&(n=a(e,t[r].children)));return n}function s(e,t){for(var n=0,r=t.length;n0&&s(e,t[n].children)))return!0;return!1}function u(e,t){for(var n=[],r=[t];r.length;){for(var i=r.pop(),o=0,a=i.length;o0;)i[a].children&&i[a].children.length>0&&r.push(i[a].children)}return n}var c=n(1352).isTag;e.exports={filter:r,find:i,findOneChild:o,findOne:a,existsOne:s,findAll:u}},function(e,t,n){function r(e,t){return"function"==typeof t?function(n){return n.attribs&&t(n.attribs[e])}:function(n){return n.attribs&&n.attribs[e]===t}}function i(e,t){return function(n){return e(n)||t(n)}}var o=n(1352),a=t.isTag=o.isTag;t.testElement=function(e,t){for(var n in e)if(e.hasOwnProperty(n)){if("tag_name"===n){if(!a(t)||!e.tag_name(t.name))return!1}else if("tag_type"===n){if(!e.tag_type(t.type))return!1}else if("tag_contains"===n){if(a(t)||!e.tag_contains(t.data))return!1}else if(!t.attribs||!e[n](t.attribs[n]))return!1}else;return!0};var s={tag_name:function(e){return"function"==typeof e?function(t){return a(t)&&e(t.name)}:"*"===e?a:function(t){return a(t)&&t.name===e}},tag_type:function(e){return"function"==typeof e?function(t){return e(t.type)}:function(t){return t.type===e}},tag_contains:function(e){return"function"==typeof e?function(t){return!a(t)&&e(t.data)}:function(t){return!a(t)&&t.data===e}}};t.getElements=function(e,t,n,o){var a=Object.keys(e).map(function(t){var n=e[t];return t in s?s[t](n):r(t,n)});return 0===a.length?[]:this.filter(a.reduce(i),t,n,o)},t.getElementById=function(e,t,n){return Array.isArray(t)||(t=[t]),this.findOne(r("id",e),t,n!==!1)},t.getElementsByTagName=function(e,t,n,r){return this.filter(s.tag_name(e),t,n,r)},t.getElementsByTagType=function(e,t,n,r){return this.filter(s.tag_type(e),t,n,r)}},function(e,t){t.removeSubsets=function(e){for(var t,n,r,i=e.length;--i>-1;){for(t=n=e[i],e[i]=null,r=!0;n;){if(e.indexOf(n)>-1){r=!1,e.splice(i,1);break}n=n.parent}r&&(e[i]=t)}return e};var n={DISCONNECTED:1,PRECEDING:2,FOLLOWING:4,CONTAINS:8,CONTAINED_BY:16},r=t.compareDocumentPosition=function(e,t){var r,i,o,a,s,u,c=[],l=[];if(e===t)return 0;for(r=e;r;)c.unshift(r),r=r.parent;for(r=t;r;)l.unshift(r),r=r.parent;for(u=0;c[u]===l[u];)u++;return 0===u?n.DISCONNECTED:(i=c[u-1],o=i.children,a=c[u],s=l[u],o.indexOf(a)>o.indexOf(s)?i===t?n.FOLLOWING|n.CONTAINED_BY:n.FOLLOWING:i===e?n.PRECEDING|n.CONTAINS:n.PRECEDING)};t.uniqueSort=function(e){var t,i,o=e.length;for(e=e.slice();--o>-1;)t=e[o],i=e.indexOf(t),i>-1&&ii;)Se(e,n=r[i++],t[n]);return e},Ce=function(e,t){return void 0===t?Q(e):Ee(Q(e),t)},Ae=function(e){var t=he.call(this,e=$(e,!0));return!(this===ve&&j(me,e)&&!j(ye,e))&&(!(t||!j(this,e)||!j(me,e)||j(this,pe)&&this[pe][e])||t)},Te=function(e,t){if(e=Y(e),t=$(t,!0),e!==ve||!j(me,t)||j(ye,t)){var n=ie(e,t);return!n||!j(me,t)||j(e,pe)&&e[pe][t]||(n.enumerable=!0),n}},Oe=function(e){for(var t,n=ae(Y(e)),r=[],i=0;n.length>i;)j(me,t=n[i++])||t==pe||t==B||r.push(t);return r},De=function(e){for(var t,n=e===ve,r=ae(n?ye:Y(e)),i=[],o=0;r.length>o;)!j(me,t=r[o++])||n&&!j(ve,t)||i.push(me[t]);return i};ge||(se=function(){if(this instanceof se)throw TypeError("Symbol is not a constructor!");var e=U(arguments.length>0?arguments[0]:void 0),t=function(n){this===ve&&t.call(ye,n),j(this,pe)&&j(this[pe],e)&&(this[pe][e]=!1),xe(this,e,Z(1,n))};return R&&be&&xe(ve,e,{configurable:!0,set:t}),we(e)},F(se[le],"toString",function(){return this._k}),te.f=Te,ne.f=Se,n(T).f=ee.f=Oe,n(O).f=Ae,n(D).f=De,R&&!n(M)&&F(ve,"propertyIsEnumerable",Ae,!0),K.f=function(e){return we(W(e))}),N(N.G+N.W+N.F*!ge,{Symbol:se});for(var Me="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Pe=0;Me.length>Pe;)W(Me[Pe++]);for(var Me=re(W.store),Pe=0;Me.length>Pe;)V(Me[Pe++]);N(N.S+N.F*!ge,"Symbol",{for:function(e){return j(de,e+="")?de[e]:de[e]=se(e)},keyFor:function(e){if(ke(e))return H(de,e);throw TypeError(e+" is not a symbol!")},useSetter:function(){be=!0},useSimple:function(){be=!1}}),N(N.S+N.F*!ge,"Object",{create:Ce,defineProperty:Se,defineProperties:Ee,getOwnPropertyDescriptor:Te,getOwnPropertyNames:Oe,getOwnPropertySymbols:De}),ue&&N(N.S+N.F*(!ge||L(function(){var e=se();return"[null]"!=ce([e])||"{}"!=ce({a:e})||"{}"!=ce(Object(e))})),"JSON",{stringify:function(e){if(void 0!==e&&!ke(e)){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);return t=r[1],"function"==typeof t&&(n=t),!n&&G(t)||(t=function(e,t){if(n&&(t=n.call(this,e,t)),!ke(t))return t}),r[1]=t,ce.apply(ue,r)}}}),se[le][fe]||n(P)(se[le],fe,se[le].valueOf),q(se,"Symbol"),q(Math,"Math",!0),q(I.JSON,"JSON",!0)},function(e,t,n,r){e.exports=!n(r)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,n,r,i,o){var a=n(r),s=n(i);e.exports=n(o)?function(e,t,n){return a.f(e,t,s(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n,r,i,o,a){var s=n(r),u=n(i),c=n(o),l=Object.defineProperty;t.f=n(a)?Object.defineProperty:function(e,t,n){if(s(e),t=c(t,!0),s(n),u)try{return l(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n,r){var i=n(r);e.exports=function(e){if(!i(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n,r,i,o){e.exports=!n(r)&&!n(i)(function(){return 7!=Object.defineProperty(n(o)("div"),"a",{get:function(){return 7}}).a})},function(e,t,n,r,i){var o=n(r),a=n(i).document,s=o(a)&&o(a.createElement);e.exports=function(e){return s?a.createElement(e):{}}},function(e,t,n,r){var i=n(r);e.exports=function(e,t){if(!i(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!i(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!i(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e,t,n,r){var i=n(r);e.exports=function(e,t,n){if(i(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t,n,r,i,o,a,s){var u=n(r)("meta"),c=n(i),l=n(o),p=n(a).f,f=0,h=Object.isExtensible||function(){return!0},d=!n(s)(function(){return h(Object.preventExtensions({}))}),m=function(e){p(e,u,{value:{i:"O"+ ++f,w:{}}})},y=function(e,t){if(!c(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!l(e,u)){if(!h(e))return"F";if(!t)return"E";m(e)}return e[u].i},v=function(e,t){if(!l(e,u)){if(!h(e))return!0;if(!t)return!1;m(e)}return e[u].w},g=function(e){return d&&_.NEED&&h(e)&&!l(e,u)&&m(e),e},_=e.exports={KEY:u,NEED:!1,fastKey:y,getWeak:v,onFreeze:g}},function(e,t,n,r){var i=n(r),o="__core-js_shared__",a=i[o]||(i[o]={});e.exports=function(e){return a[e]||(a[e]={})}},function(e,t,n,r,i,o){var a=n(r).f,s=n(i),u=n(o)("toStringTag");e.exports=function(e,t,n){e&&!s(e=n?e:e.prototype,u)&&a(e,u,{configurable:!0,value:t})}},function(e,t,n,r,i,o){var a=n(r)("wks"),s=n(i),u=n(o).Symbol,c="function"==typeof u,l=e.exports=function(e){return a[e]||(a[e]=c&&u[e]||(c?u:s)("Symbol."+e))};l.store=a},function(e,t,n,r){t.f=n(r)},function(e,t,n,r,i,o,a,s){var u=n(r),c=n(i),l=n(o),p=n(a),f=n(s).f;e.exports=function(e){var t=c.Symbol||(c.Symbol=l?{}:u.Symbol||{});"_"==e.charAt(0)||e in t||f(t,e,{value:p.f(e)})}},function(e,t,n,r,i){var o=n(r),a=n(i);e.exports=function(e,t){for(var n,r=a(e),i=o(r),s=i.length,u=0;s>u;)if(r[n=i[u++]]===t)return n}},function(e,t,n,r,i){var o=n(r),a=n(i);e.exports=Object.keys||function(e){return o(e,a)}},function(e,t,n,r,i,o,a){var s=n(r),u=n(i),c=n(o)(!1),l=n(a)("IE_PROTO");e.exports=function(e,t){var n,r=u(e),i=0,o=[];for(n in r)n!=l&&s(r,n)&&o.push(n);for(;t.length>i;)s(r,n=t[i++])&&(~c(o,n)||o.push(n));return o}},function(e,t,n,r,i){var o=n(r),a=n(i);e.exports=function(e){return o(a(e))}},function(e,t,n,r){var i=n(r);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==i(e)?e.split(""):Object(e)}},function(e,t,n,r,i,o){var a=n(r),s=n(i),u=n(o);e.exports=function(e){return function(t,n,r){var i,o=a(t),c=s(o.length),l=u(r,c);if(e&&n!=n){for(;c>l;)if(i=o[l++],i!=i)return!0}else for(;c>l;l++)if((e||l in o)&&o[l]===n)return e||l||0;return!e&&-1}}},function(e,t,n,r){var i=n(r),o=Math.min;e.exports=function(e){return e>0?o(i(e),9007199254740991):0}},function(e,t,n,r){var i=n(r),o=Math.max,a=Math.min;e.exports=function(e,t){return e=i(e),e<0?o(e+t,0):a(e,t)}},function(e,t,n,r,i){var o=n(r)("keys"),a=n(i);e.exports=function(e){return o[e]||(o[e]=a(e))}},function(e,t,n,r,i,o){var a=n(r),s=n(i),u=n(o);e.exports=function(e){var t=a(e),n=s.f;if(n)for(var r,i=n(e),o=u.f,c=0;i.length>c;)o.call(e,r=i[c++])&&t.push(r);return t}},function(e,t,n,r){var i=n(r);e.exports=Array.isArray||function(e){return"Array"==i(e)}},function(e,t,n,r,i,o,a,s,u){var c=n(r),l=n(i),p=n(o),f=n(a)("IE_PROTO"),h=function(){},d="prototype",m=function(){var e,t=n(s)("iframe"),r=p.length,i="<",o=">";for(t.style.display="none",n(u).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write(i+"script"+o+"document.F=Object"+i+"/script"+o),e.close(),m=e.F;r--;)delete m[d][p[r]];return m()};e.exports=Object.create||function(e,t){var n;return null!==e?(h[d]=c(e),n=new h,h[d]=null,n[f]=e):n=m(),void 0===t?n:l(n,t)}},function(e,t,n,r,i,o,a){var s=n(r),u=n(i),c=n(o);e.exports=n(a)?Object.defineProperties:function(e,t){u(e);for(var n,r=c(t),i=r.length,o=0;i>o;)s.f(e,n=r[o++],t[n]);return e}},function(e,t,n,r){e.exports=n(r).document&&document.documentElement},function(e,t,n,r,i){var o=n(r),a=n(i).f,s={}.toString,u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],c=function(e){try{return a(e)}catch(e){return u.slice()}};e.exports.f=function(e){return u&&"[object Window]"==s.call(e)?c(e):a(o(e))}},function(e,t,n,r,i){var o=n(r),a=n(i).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return o(e,a)}},function(e,t,n,r,i,o,a,s,u,c){var l=n(r),p=n(i),f=n(o),h=n(a),d=n(s),m=n(u),y=Object.getOwnPropertyDescriptor;t.f=n(c)?y:function(e,t){if(e=f(e),t=h(t,!0),m)try{return y(e,t)}catch(e){}if(d(e,t))return p(!l.f.call(e,t),e[t])}},function(e,t,n,r,i){var o=n(r);o(o.S,"Object",{create:n(i)})},function(e,t,n,r,i,o){var a=n(r);a(a.S+a.F*!n(i),"Object",{defineProperty:n(o).f})},function(e,t,n,r,i,o){var a=n(r),s=n(i),u=n(o);e.exports=function(e,t){var n=(s.Object||{})[e]||Object[e],r={};r[e]=t(n),a(a.S+a.F*u(function(){n(1)}),"Object",r)}},function(e,t,n,r){var i=n(r);e.exports=function(e){return Object(i(e))}},function(e,t,n,r,i,o){var a=n(r),s=n(i),u=n(o)("IE_PROTO"),c=Object.prototype; +e.exports=Object.getPrototypeOf||function(e){return e=s(e),a(e,u)?e[u]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?c:null}},function(e,t,n,r,i,o){var a=n(r),s=n(i);n(o)("keys",function(){return function(e){return s(a(e))}})},function(e,t,n,r,i){var o=n(r);o(o.S+o.F,"Object",{assign:n(i)})},function(e,t,n,r,i,o,a,s,u){"use strict";var c=n(r),l=n(i),p=n(o),f=n(a),h=n(s),d=Object.assign;e.exports=!d||n(u)(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=d({},e)[n]||Object.keys(d({},t)).join("")!=r})?function(e,t){for(var n=f(e),r=arguments.length,i=1,o=l.f,a=p.f;r>i;)for(var s,u=h(arguments[i++]),d=o?c(u).concat(o(u)):c(u),m=d.length,y=0;m>y;)a.call(u,s=d[y++])&&(n[s]=u[s]);return n}:d},function(e,t,n,r,i){var o=n(r),a=n(i)("toStringTag"),s="Arguments"==o(function(){return arguments}()),u=function(e,t){try{return e[t]}catch(e){}};e.exports=function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=u(t=Object(e),a))?n:s?o(t):"Object"==(r=o(t))&&"function"==typeof t.callee?"Arguments":r}},function(e,t,n,r,i){"use strict";var o=n(r)(!0);n(i)(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=o(t,n),this._i+=e.length,{value:e,done:!1})})},function(e,t,n,r,i){var o=n(r),a=n(i);e.exports=function(e){return function(t,n){var r,i,s=String(a(t)),u=o(n),c=s.length;return u<0||u>=c?e?"":void 0:(r=s.charCodeAt(u),r<55296||r>56319||u+1===c||(i=s.charCodeAt(u+1))<56320||i>57343?e?s.charAt(u):r:e?s.slice(u,u+2):(r-55296<<10)+(i-56320)+65536)}}},function(e,t,n,r,i,o,a,s,u,c,l,p,f){"use strict";var h=n(r),d=n(i),m=n(o),y=n(a),v=n(s),g=n(u),_=n(c),b=n(l),x=n(p),w=n(f)("iterator"),k=!([].keys&&"next"in[].keys()),S="@@iterator",E="keys",C="values",A=function(){return this};e.exports=function(e,t,n,r,i,o,a){_(n,t,r);var s,u,c,l=function(e){if(!k&&e in O)return O[e];switch(e){case E:return function(){return new n(this,e)};case C:return function(){return new n(this,e)}}return function(){return new n(this,e)}},p=t+" Iterator",f=i==C,T=!1,O=e.prototype,D=O[w]||O[S]||i&&O[i],M=D||l(i),P=i?f?l("entries"):M:void 0,I="Array"==t?O.entries||D:D;if(I&&(c=x(I.call(new e)),c!==Object.prototype&&(b(c,p,!0),h||v(c,w)||y(c,w,A))),f&&D&&D.name!==C&&(T=!0,M=function(){return D.call(this)}),h&&!a||!k&&!T&&O[w]||y(O,w,M),g[t]=M,g[p]=A,i)if(s={values:f?M:l(C),keys:o?M:l(E),entries:P},a)for(u in s)u in O||m(O,u,s[u]);else d(d.P+d.F*(k||T),t,s);return s}},function(e,t,n,r,i,o,a,s){"use strict";var u=n(r),c=n(i),l=n(o),p={};n(a)(p,n(s)("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=u(p,{next:c(1,n)}),l(e,t+" Iterator")}},function(e,t,n,r,i,o,a,s,u,c,l,p){"use strict";var f=n(r),h=n(i),d=n(o),m=n(a),y=n(s),v=n(u),g=n(c),_=n(l);h(h.S+h.F*!n(p)(function(e){Array.from(e)}),"Array",{from:function(e){var t,n,r,i,o=d(e),a="function"==typeof this?this:Array,s=arguments.length,u=s>1?arguments[1]:void 0,c=void 0!==u,l=0,p=_(o);if(c&&(u=f(u,s>2?arguments[2]:void 0,2)),void 0==p||a==Array&&y(p))for(t=v(o.length),n=new a(t);t>l;l++)g(n,l,c?u(o[l],l):o[l]);else for(i=p.call(o),n=new a;!(r=i.next()).done;l++)g(n,l,c?m(i,u,[r.value,l],!0):r.value);return n.length=l,n}})},function(e,t,n,r){var i=n(r);e.exports=function(e,t,n,r){try{return r?t(i(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&i(o.call(e)),t}}},function(e,t,n,r,i){var o=n(r),a=n(i)("iterator"),s=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||s[a]===e)}},function(e,t,n,r,i){"use strict";var o=n(r),a=n(i);e.exports=function(e,t,n){t in e?o.f(e,t,a(0,n)):e[t]=n}},function(e,t,n,r,i,o,a){var s=n(r),u=n(i)("iterator"),c=n(o);e.exports=n(a).getIteratorMethod=function(e){if(void 0!=e)return e[u]||e["@@iterator"]||c[s(e)]}},function(e,t,n,r){var i=n(r)("iterator"),o=!1;try{var a=[7][i]();a.return=function(){o=!0},Array.from(a,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var r=[7],a=r[i]();a.next=function(){return{done:n=!0}},r[i]=function(){return a},e(r)}catch(e){}return n}},function(e,t,n,r,i,o,a,s){var u=n(r),c=n(i),l=n(o),p=n(a),f=n(s);e.exports=function(e,t){var n=1==e,r=2==e,i=3==e,o=4==e,a=6==e,s=5==e||a,h=t||f;return function(t,f,d){for(var m,y,v=l(t),g=c(v),_=u(f,d,3),b=p(g.length),x=0,w=n?h(t,b):r?h(t,0):void 0;b>x;x++)if((s||x in g)&&(m=g[x],y=_(m,x,v),e))if(n)w[x]=y;else if(y)switch(e){case 3:return!0;case 5:return m;case 6:return x;case 2:w.push(m)}else if(o)return!1;return a?-1:i||o?o:w}}},function(e,t,n,r){var i=n(r);e.exports=function(e,t){return new(i(e))(t)}},function(e,t,n,r,i,o){var a=n(r),s=n(i),u=n(o)("species");e.exports=function(e){var t;return s(e)&&(t=e.constructor,"function"!=typeof t||t!==Array&&!s(t.prototype)||(t=void 0),a(t)&&(t=t[u],null===t&&(t=void 0))),void 0===t?Array:t}},function(e,t,n,r,i,o,a,s){"use strict";var u=n(r),c=n(i),l=n(o),p=n(a);e.exports=n(s)(Array,"Array",function(e,t){this._t=p(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,c(1)):"keys"==t?c(0,n):"values"==t?c(0,e[n]):c(0,[n,e[n]])},"values"),l.Arguments=l.Array,u("keys"),u("values"),u("entries")},function(e,t,n,r,i,o,a,s,u,c,l,p,f,h,d,m,y,v,g,_,b){"use strict";var x,w,k,S=n(r),E=n(i),C=n(o),A=n(a),T=n(s),O=n(u),D=n(c),M=n(l),P=n(p),I=n(f),j=n(h).set,R=n(d)(),N="Promise",F=E.TypeError,B=E.process,L=E[N],B=E.process,z="process"==A(B),q=function(){},U=!!function(){try{var e=L.resolve(1),t=(e.constructor={})[n(m)("species")]=function(e){e(q,q)};return(z||"function"==typeof PromiseRejectionEvent)&&e.then(q)instanceof t}catch(e){}}(),W=function(e,t){return e===t||e===L&&t===k},K=function(e){var t;return!(!O(e)||"function"!=typeof(t=e.then))&&t},V=function(e){return W(L,e)?new H(e):new w(e)},H=w=function(e){var t,n;this.promise=new e(function(e,r){if(void 0!==t||void 0!==n)throw F("Bad Promise constructor");t=e,n=r}),this.resolve=D(t),this.reject=D(n)},J=function(e){try{e()}catch(e){return{error:e}}},G=function(e,t){if(!e._n){e._n=!0;var n=e._c;R(function(){for(var r=e._v,i=1==e._s,o=0,a=function(t){var n,o,a=i?t.ok:t.fail,s=t.resolve,u=t.reject,c=t.domain;try{a?(i||(2==e._h&&$(e),e._h=1),a===!0?n=r:(c&&c.enter(),n=a(r),c&&c.exit()),n===t.promise?u(F("Promise-chain cycle")):(o=K(n))?o.call(n,s,u):s(n)):u(r)}catch(e){u(e)}};n.length>o;)a(n[o++]);e._c=[],e._n=!1,t&&!e._h&&X(e)})}},X=function(e){j.call(E,function(){var t,n,r,i=e._v;if(Y(e)&&(t=J(function(){z?B.emit("unhandledRejection",i,e):(n=E.onunhandledrejection)?n({promise:e,reason:i}):(r=E.console)&&r.error&&r.error("Unhandled promise rejection",i)}),e._h=z||Y(e)?2:1),e._a=void 0,t)throw t.error})},Y=function(e){if(1==e._h)return!1;for(var t,n=e._a||e._c,r=0;n.length>r;)if(t=n[r++],t.fail||!Y(t.promise))return!1;return!0},$=function(e){j.call(E,function(){var t;z?B.emit("rejectionHandled",e):(t=E.onrejectionhandled)&&t({promise:e,reason:e._v})})},Z=function(e){var t=this;t._d||(t._d=!0,t=t._w||t,t._v=e,t._s=2,t._a||(t._a=t._c.slice()),G(t,!0))},Q=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw F("Promise can't be resolved itself");(t=K(e))?R(function(){var r={_w:n,_d:!1};try{t.call(e,C(Q,r,1),C(Z,r,1))}catch(e){Z.call(r,e)}}):(n._v=e,n._s=1,G(n,!1))}catch(e){Z.call({_w:n,_d:!1},e)}}};U||(L=function(e){M(this,L,N,"_h"),D(e),x.call(this);try{e(C(Q,this,1),C(Z,this,1))}catch(e){Z.call(this,e)}},x=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},x.prototype=n(y)(L.prototype,{then:function(e,t){var n=V(I(this,L));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=z?B.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&G(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),H=function(){var e=new x;this.promise=e,this.resolve=C(Q,e,1),this.reject=C(Z,e,1)}),T(T.G+T.W+T.F*!U,{Promise:L}),n(v)(L,N),n(g)(N),k=n(_)[N],T(T.S+T.F*!U,N,{reject:function(e){var t=V(this),n=t.reject;return n(e),t.promise}}),T(T.S+T.F*(S||!U),N,{resolve:function(e){if(e instanceof L&&W(e.constructor,this))return e;var t=V(this),n=t.resolve;return n(e),t.promise}}),T(T.S+T.F*!(U&&n(b)(function(e){L.all(e).catch(q)})),N,{all:function(e){var t=this,n=V(t),r=n.resolve,i=n.reject,o=J(function(){var n=[],o=0,a=1;P(e,!1,function(e){var s=o++,u=!1;n.push(void 0),a++,t.resolve(e).then(function(e){u||(u=!0,n[s]=e,--a||r(n))},i)}),--a||r(n)});return o&&i(o.error),n.promise},race:function(e){var t=this,n=V(t),r=n.reject,i=J(function(){P(e,!1,function(e){t.resolve(e).then(n.resolve,r)})});return i&&r(i.error),n.promise}})},function(e,t,n,r,i,o,a,s,u){var c=n(r),l=n(i),p=n(o),f=n(a),h=n(s),d=n(u),m={},y={},t=e.exports=function(e,t,n,r,i){var o,a,s,u,v=i?function(){return e}:d(e),g=c(n,r,t?2:1),_=0;if("function"!=typeof v)throw TypeError(e+" is not iterable!");if(p(v)){for(o=h(e.length);o>_;_++)if(u=t?g(f(a=e[_])[0],a[1]):g(e[_]),u===m||u===y)return u}else for(s=v.call(e);!(a=s.next()).done;)if(u=l(s,g,a.value,t),u===m||u===y)return u};t.BREAK=m,t.RETURN=y},function(e,t,n,r,i,o){var a=n(r),s=n(i),u=n(o)("species");e.exports=function(e,t){var n,r=a(e).constructor;return void 0===r||void 0==(n=a(r)[u])?t:s(n)}},function(e,t,n,r,i,o,a,s,u){var c,l,p,f=n(r),h=n(i),d=n(o),m=n(a),y=n(s),v=y.process,g=y.setImmediate,_=y.clearImmediate,b=y.MessageChannel,x=0,w={},k="onreadystatechange",S=function(){var e=+this;if(w.hasOwnProperty(e)){var t=w[e];delete w[e],t()}},E=function(e){S.call(e.data)};g&&_||(g=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return w[++x]=function(){h("function"==typeof e?e:Function(e),t)},c(x),x},_=function(e){delete w[e]},"process"==n(u)(v)?c=function(e){v.nextTick(f(S,e,1))}:b?(l=new b,p=l.port2,l.port1.onmessage=E,c=f(p.postMessage,p,1)):y.addEventListener&&"function"==typeof postMessage&&!y.importScripts?(c=function(e){y.postMessage(e+"","*")},y.addEventListener("message",E,!1)):c=k in m("script")?function(e){d.appendChild(m("script"))[k]=function(){d.removeChild(this),S.call(e)}}:function(e){setTimeout(f(S,e,1),0)}),e.exports={set:g,clear:_}},function(e,t,n,r,i,o){var a=n(r),s=n(i).set,u=a.MutationObserver||a.WebKitMutationObserver,c=a.process,l=a.Promise,p="process"==n(o)(c);e.exports=function(){var e,t,n,r=function(){var r,i;for(p&&(r=c.domain)&&r.exit();e;){i=e.fn,e=e.next;try{i()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(p)n=function(){c.nextTick(r)};else if(u){var i=!0,o=document.createTextNode("");new u(r).observe(o,{characterData:!0}),n=function(){o.data=i=!i}}else if(l&&l.resolve){var f=l.resolve();n=function(){f.then(r)}}else n=function(){s.call(a,r)};return function(r){var i={fn:r,next:void 0};t&&(t.next=i),e||(e=i,n()),t=i}}},function(e,t,n,r,i,o,a,s,u,c){"use strict";var l,p=n(r)(0),f=n(i),h=n(o),d=n(a),m=n(s),y=n(u),v=h.getWeak,g=Object.isExtensible,_=m.ufstore,b={},x=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},w={get:function(e){if(y(e)){var t=v(e);return t===!0?_(this).get(e):t?t[this._i]:void 0}},set:function(e,t){return m.def(this,e,t)}},k=e.exports=n(c)("WeakMap",x,w,m,!0,!0);7!=(new k).set((Object.freeze||Object)(b),7).get(b)&&(l=m.getConstructor(x),d(l.prototype,w),h.NEED=!0,p(["delete","has","get","set"],function(e){var t=k.prototype,n=t[e];f(t,e,function(t,r){if(y(t)&&!g(t)){this._f||(this._f=new l);var i=this._f[e](t,r);return"set"==e?this:i}return n.call(this,t,r)})}))},function(e,t,n,r,i,o,a,s,u,c,l){"use strict";var p=n(r),f=n(i).getWeak,h=n(o),d=n(a),m=n(s),y=n(u),v=n(c),g=n(l),_=v(5),b=v(6),x=0,w=function(e){return e._l||(e._l=new k)},k=function(){this.a=[]},S=function(e,t){return _(e.a,function(e){return e[0]===t})};k.prototype={get:function(e){var t=S(this,e);if(t)return t[1]},has:function(e){return!!S(this,e)},set:function(e,t){var n=S(this,e);n?n[1]=t:this.a.push([e,t])},delete:function(e){var t=b(this.a,function(t){return t[0]===e});return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,r){var i=e(function(e,o){m(e,i,t,"_i"),e._i=x++,e._l=void 0,void 0!=o&&y(o,n,e[r],e)});return p(i.prototype,{delete:function(e){if(!d(e))return!1;var t=f(e);return t===!0?w(this).delete(e):t&&g(t,this._i)&&delete t[this._i]},has:function(e){if(!d(e))return!1;var t=f(e);return t===!0?w(this).has(e):t&&g(t,this._i)}}),i},def:function(e,t,n){var r=f(h(t),!0);return r===!0?w(e).set(t,n):r[e._i]=n,e},ufstore:w}},function(e,t,n,r){n(r)("asyncIterator")},function(e,t,n,r){n(r)("observable")},function(e,t,n,r){var i=n(r),o=i.Symbol;e.exports=o},function(e,t,n,r){var i=n(r),o="object"==typeof self&&self&&self.Object===Object&&self,a=i||o||Function("return this")();e.exports=a},function(e,t,n,r){var i=n(r),o=i(Object.getPrototypeOf,Object);e.exports=o},function(e,t,n,r,i,o){function a(){this.size=0,this.__data__={hash:new s,map:new(c||u),string:new s}}var s=n(r),u=n(i),c=n(o);e.exports=a},function(e,t,n,r){function i(){this.__data__=o?o(null):{},this.size=0}var o=n(r);e.exports=i},function(e,t,n,r){var i=n(r),o=i(Object,"create");e.exports=o},function(e,t,n,r,i){function o(e,t){var n=s(e,t);return a(n)?n:void 0}var a=n(r),s=n(i);e.exports=o},function(e,t,n,r,i,o,a){function s(e){if(!l(e)||c(e))return!1;var t=u(e)?g:h;return t.test(p(e))}var u=n(r),c=n(i),l=n(o),p=n(a),f=/[\\^$.*+?()[\]{}|]/g,h=/^\[object .+?Constructor\]$/,d=Function.prototype,m=Object.prototype,y=d.toString,v=m.hasOwnProperty,g=RegExp("^"+y.call(v).replace(f,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=s},function(e,t,n,r){function i(e){return!!a&&a in e}var o=n(r),a=function(){var e=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=i},function(e,t,n,r){var i=n(r),o=i["__core-js_shared__"];e.exports=o},function(e,t,n,r){function i(e){var t=this.__data__;if(o){var n=t[e];return n===a?void 0:n}return u.call(t,e)?t[e]:void 0}var o=n(r),a="__lodash_hash_undefined__",s=Object.prototype,u=s.hasOwnProperty;e.exports=i},function(e,t,n,r){function i(e){var t=this.__data__;return o?void 0!==t[e]:s.call(t,e)}var o=n(r),a=Object.prototype,s=a.hasOwnProperty;e.exports=i},function(e,t,n,r){function i(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=o&&void 0===t?a:t,this}var o=n(r),a="__lodash_hash_undefined__";e.exports=i},function(e,t,n,r){function i(e){var t=this.__data__,n=o(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():s.call(t,n,1),--this.size,!0}var o=n(r),a=Array.prototype,s=a.splice;e.exports=i},function(e,t,n,r){function i(e,t){for(var n=e.length;n--;)if(o(e[n][0],t))return n;return-1}var o=n(r);e.exports=i},function(e,t,n,r){function i(e){var t=this.__data__,n=o(t,e);return n<0?void 0:t[n][1]}var o=n(r);e.exports=i},function(e,t,n,r){function i(e){return o(this.__data__,e)>-1}var o=n(r);e.exports=i},function(e,t,n,r){function i(e,t){var n=this.__data__,r=o(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var o=n(r);e.exports=i},function(e,t,n,r,i){var o=n(r),a=n(i),s=o(a,"Map");e.exports=s},function(e,t,n,r){function i(e){var t=o(this,e).delete(e);return this.size-=t?1:0,t}var o=n(r);e.exports=i},function(e,t,n,r){function i(e,t){var n=e.__data__;return o(t)?n["string"==typeof t?"string":"hash"]:n.map}var o=n(r);e.exports=i},function(e,t,n,r){function i(e){return o(this,e).get(e)}var o=n(r);e.exports=i},function(e,t,n,r){function i(e){return o(this,e).has(e)}var o=n(r);e.exports=i},function(e,t,n,r){function i(e,t){var n=o(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var o=n(r);e.exports=i},function(e,t,n,r,i,o,a,s,u){function c(e){var t=this.__data__=new l(e);this.size=t.size}var l=n(r),p=n(i),f=n(o),h=n(a),d=n(s),m=n(u);c.prototype.clear=p,c.prototype.delete=f,c.prototype.get=h,c.prototype.has=d,c.prototype.set=m,e.exports=c},function(e,t,n,r){function i(){this.__data__=new o,this.size=0}var o=n(r);e.exports=i},function(e,t,n,r,i,o){function a(e,t){var n=this.__data__;if(n instanceof s){var r=n.__data__;if(!u||r.length0&&n(l)?t>1?o(l,t-1,n,r,i):a(i,l):r||(i[i.length]=l)}return i}var a=n(r),s=n(i);e.exports=o},function(e,t,n,r,i,o){function a(e){return c(e)||u(e)||!!(l&&e&&e[l])}var s=n(r),u=n(i),c=n(o),l=s?s.isConcatSpreadable:void 0;e.exports=a},function(e,t,n,r){function i(e,t,n){return t=a(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=a(r.length-t,0),u=Array(s);++i1){for(var g=Array(m),x=0;x1){for(var D=Array(y),b=0;blabel{font-size:12px;font-weight:700;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin:-20px 15px 0 0;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .scheme-container .schemes>label select{min-width:130px;text-transform:uppercase}.swagger-ui .loading-container{padding:40px 0 60px}.swagger-ui .loading-container .loading{position:relative}.swagger-ui .loading-container .loading:after{font-size:10px;font-weight:700;position:absolute;top:50%;left:50%;content:\"loading\";-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);text-transform:uppercase;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .loading-container .loading:before{position:absolute;top:50%;left:50%;display:block;width:60px;height:60px;margin:-30px;content:\"\";-webkit-animation:rotation 1s infinite linear,opacity .5s;animation:rotation 1s infinite linear,opacity .5s;opacity:1;border:2px solid rgba(85,85,85,.1);border-top-color:rgba(0,0,0,.6);border-radius:100%;-webkit-backface-visibility:hidden;backface-visibility:hidden}@-webkit-keyframes rotation{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes rotation{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes blinker{50%{opacity:0}}@keyframes blinker{50%{opacity:0}}.swagger-ui .btn{font-size:14px;font-weight:700;padding:5px 23px;transition:all .3s;border:2px solid #888;border-radius:4px;background:transparent;box-shadow:0 1px 2px rgba(0,0,0,.1);font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .btn[disabled]{cursor:not-allowed;opacity:.3}.swagger-ui .btn:hover{box-shadow:0 0 5px rgba(0,0,0,.3)}.swagger-ui .btn.cancel{border-color:#ff6060;font-family:Titillium Web,sans-serif;color:#ff6060}.swagger-ui .btn.authorize{line-height:1;display:inline;color:#49cc90;border-color:#49cc90}.swagger-ui .btn.authorize span{float:left;padding:4px 20px 0 0}.swagger-ui .btn.authorize svg{fill:#49cc90}.swagger-ui .btn.execute{-webkit-animation:swagger-ui-pulse 2s infinite;animation:swagger-ui-pulse 2s infinite;color:#fff;border-color:#4990e2}@-webkit-keyframes swagger-ui-pulse{0%{color:#fff;background:#4990e2;box-shadow:0 0 0 0 rgba(73,144,226,.8)}70%{box-shadow:0 0 0 5px rgba(73,144,226,0)}to{color:#fff;background:#4990e2;box-shadow:0 0 0 0 rgba(73,144,226,0)}}@keyframes swagger-ui-pulse{0%{color:#fff;background:#4990e2;box-shadow:0 0 0 0 rgba(73,144,226,.8)}70%{box-shadow:0 0 0 5px rgba(73,144,226,0)}to{color:#fff;background:#4990e2;box-shadow:0 0 0 0 rgba(73,144,226,0)}}.swagger-ui .btn-group{display:-webkit-box;display:-ms-flexbox;display:flex;padding:30px}.swagger-ui .btn-group .btn{-webkit-box-flex:1;-ms-flex:1;flex:1}.swagger-ui .btn-group .btn:first-child{border-radius:4px 0 0 4px}.swagger-ui .btn-group .btn:last-child{border-radius:0 4px 4px 0}.swagger-ui .authorization__btn{padding:0 10px;border:none;background:none}.swagger-ui .authorization__btn.locked{opacity:1}.swagger-ui .authorization__btn.unlocked{opacity:.4}.swagger-ui .expand-methods,.swagger-ui .expand-operation{border:none;background:none}.swagger-ui .expand-methods svg,.swagger-ui .expand-operation svg{width:20px;height:20px}.swagger-ui .expand-methods{padding:0 10px}.swagger-ui .expand-methods:hover svg{fill:#444}.swagger-ui .expand-methods svg{transition:all .3s;fill:#777}.swagger-ui button{cursor:pointer;outline:none}.swagger-ui select{font-size:14px;font-weight:700;padding:5px 40px 5px 10px;border:2px solid #41444e;border-radius:4px;background:#f7f7f7 url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAyMCI+ICAgIDxwYXRoIGQ9Ik0xMy40MTggNy44NTljLjI3MS0uMjY4LjcwOS0uMjY4Ljk3OCAwIC4yNy4yNjguMjcyLjcwMSAwIC45NjlsLTMuOTA4IDMuODNjLS4yNy4yNjgtLjcwNy4yNjgtLjk3OSAwbC0zLjkwOC0zLjgzYy0uMjctLjI2Ny0uMjctLjcwMSAwLS45NjkuMjcxLS4yNjguNzA5LS4yNjguOTc4IDBMMTAgMTFsMy40MTgtMy4xNDF6Ii8+PC9zdmc+) right 10px center no-repeat;background-size:20px;box-shadow:0 1px 2px 0 rgba(0,0,0,.25);font-family:Titillium Web,sans-serif;color:#3b4151;-webkit-appearance:none;-moz-appearance:none;appearance:none}.swagger-ui select[multiple]{margin:5px 0;padding:5px;background:#f7f7f7}.swagger-ui .opblock-body select{min-width:230px}.swagger-ui label{font-size:12px;font-weight:700;margin:0 0 5px;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui input[type=email],.swagger-ui input[type=password],.swagger-ui input[type=search],.swagger-ui input[type=text]{min-width:100px;margin:5px 0;padding:8px 10px;border:1px solid #d9d9d9;border-radius:4px;background:#fff}.swagger-ui input[type=email].invalid,.swagger-ui input[type=password].invalid,.swagger-ui input[type=search].invalid,.swagger-ui input[type=text].invalid{-webkit-animation:shake .4s 1;animation:shake .4s 1;border-color:#f93e3e;background:#feebeb}@-webkit-keyframes shake{10%,90%{-webkit-transform:translate3d(-1px,0,0);transform:translate3d(-1px,0,0)}20%,80%{-webkit-transform:translate3d(2px,0,0);transform:translate3d(2px,0,0)}30%,50%,70%{-webkit-transform:translate3d(-4px,0,0);transform:translate3d(-4px,0,0)}40%,60%{-webkit-transform:translate3d(4px,0,0);transform:translate3d(4px,0,0)}}@keyframes shake{10%,90%{-webkit-transform:translate3d(-1px,0,0);transform:translate3d(-1px,0,0)}20%,80%{-webkit-transform:translate3d(2px,0,0);transform:translate3d(2px,0,0)}30%,50%,70%{-webkit-transform:translate3d(-4px,0,0);transform:translate3d(-4px,0,0)}40%,60%{-webkit-transform:translate3d(4px,0,0);transform:translate3d(4px,0,0)}}.swagger-ui textarea{font-size:12px;width:100%;min-height:280px;padding:10px;border:none;border-radius:4px;outline:none;background:hsla(0,0%,100%,.8);font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui textarea:focus{border:2px solid #61affe}.swagger-ui textarea.curl{font-size:12px;min-height:100px;margin:0;padding:10px;resize:none;border-radius:4px;background:#41444e;font-family:Source Code Pro,monospace;font-weight:600;color:#fff}.swagger-ui .checkbox{padding:5px 0 10px;transition:opacity .5s;color:#333}.swagger-ui .checkbox label{display:-webkit-box;display:-ms-flexbox;display:flex}.swagger-ui .checkbox p{font-weight:400!important;font-style:italic;margin:0!important;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui .checkbox input[type=checkbox]{display:none}.swagger-ui .checkbox input[type=checkbox]+label>.item{position:relative;top:3px;display:inline-block;width:16px;height:16px;margin:0 8px 0 0;padding:5px;cursor:pointer;border-radius:1px;background:#e8e8e8;box-shadow:0 0 0 2px #e8e8e8;-webkit-box-flex:0;-ms-flex:none;flex:none}.swagger-ui .checkbox input[type=checkbox]+label>.item:active{-webkit-transform:scale(.9);transform:scale(.9)}.swagger-ui .checkbox input[type=checkbox]:checked+label>.item{background:#e8e8e8 url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='10' height='8' viewBox='3 7 10 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%2341474E' fill-rule='evenodd' d='M6.333 15L3 11.667l1.333-1.334 2 2L11.667 7 13 8.333z'/%3E%3C/svg%3E\") 50% no-repeat}.swagger-ui .dialog-ux{position:fixed;z-index:9999;top:0;right:0;bottom:0;left:0}.swagger-ui .dialog-ux .backdrop-ux{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.8)}.swagger-ui .dialog-ux .modal-ux{position:absolute;z-index:9999;top:50%;left:50%;width:100%;min-width:300px;max-width:650px;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);border:1px solid #ebebeb;border-radius:4px;background:#fff;box-shadow:0 10px 30px 0 rgba(0,0,0,.2)}.swagger-ui .dialog-ux .modal-ux-content{overflow-y:auto;max-height:540px;padding:20px}.swagger-ui .dialog-ux .modal-ux-content p{font-size:12px;margin:0 0 5px;color:#41444e;font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .dialog-ux .modal-ux-content h4{font-size:18px;font-weight:600;margin:15px 0 0;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .dialog-ux .modal-ux-header{display:-webkit-box;display:-ms-flexbox;display:flex;padding:12px 0;border-bottom:1px solid #ebebeb;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.swagger-ui .dialog-ux .modal-ux-header .close-modal{padding:0 10px;border:none;background:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.swagger-ui .dialog-ux .modal-ux-header h3{font-size:20px;font-weight:600;margin:0;padding:0 20px;-webkit-box-flex:1;-ms-flex:1;flex:1;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .model{font-size:12px;font-weight:300;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui .model-toggle{font-size:10px;position:relative;top:6px;display:inline-block;margin:auto .3em;cursor:pointer;transition:-webkit-transform .15s ease-in;transition:transform .15s ease-in;transition:transform .15s ease-in,-webkit-transform .15s ease-in;-webkit-transform:rotate(90deg);transform:rotate(90deg);-webkit-transform-origin:50% 50%;transform-origin:50% 50%}.swagger-ui .model-toggle.collapsed{-webkit-transform:rotate(0deg);transform:rotate(0deg)}.swagger-ui .model-toggle:after{display:block;width:20px;height:20px;content:\"\";background:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z'/%3E%3C/svg%3E\") 50% no-repeat;background-size:100%}.swagger-ui .model-jump-to-path{position:relative;cursor:pointer}.swagger-ui .model-jump-to-path .view-line-link{position:absolute;top:-.4em;cursor:pointer}.swagger-ui .model-title{position:relative}.swagger-ui .model-title:hover .model-hint{visibility:visible}.swagger-ui .model-hint{position:absolute;top:-1.8em;visibility:hidden;padding:.1em .5em;white-space:nowrap;color:#ebebeb;border-radius:4px;background:rgba(0,0,0,.7)}.swagger-ui section.models{margin:30px 0;border:1px solid rgba(59,65,81,.3);border-radius:4px}.swagger-ui section.models.is-open{padding:0 0 20px}.swagger-ui section.models.is-open h4{margin:0 0 5px;border-bottom:1px solid rgba(59,65,81,.3)}.swagger-ui section.models.is-open h4 svg{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.swagger-ui section.models h4{font-size:16px;display:-webkit-box;display:-ms-flexbox;display:flex;margin:0;padding:10px 20px 10px 10px;cursor:pointer;transition:all .2s;font-family:Titillium Web,sans-serif;color:#777;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.swagger-ui section.models h4 svg{transition:all .4s}.swagger-ui section.models h4 span{-webkit-box-flex:1;-ms-flex:1;flex:1}.swagger-ui section.models h4:hover{background:rgba(0,0,0,.02)}.swagger-ui section.models h5{font-size:16px;margin:0 0 10px;font-family:Titillium Web,sans-serif;color:#777}.swagger-ui section.models .model-jump-to-path{position:relative;top:5px}.swagger-ui section.models .model-container{margin:0 20px 15px;transition:all .5s;border-radius:4px;background:rgba(0,0,0,.05)}.swagger-ui section.models .model-container:hover{background:rgba(0,0,0,.07)}.swagger-ui section.models .model-container:first-of-type{margin:20px}.swagger-ui section.models .model-container:last-of-type{margin:0 20px}.swagger-ui section.models .model-box{background:none}.swagger-ui .model-box{padding:10px;border-radius:4px;background:rgba(0,0,0,.1)}.swagger-ui .model-box .model-jump-to-path{position:relative;top:4px}.swagger-ui .model-title{font-size:16px;font-family:Titillium Web,sans-serif;color:#555}.swagger-ui span>span.model,.swagger-ui span>span.model .brace-close{padding:0 0 0 10px}.swagger-ui .prop-type{color:#55a}.swagger-ui .prop-enum{display:block}.swagger-ui .prop-format{color:#999}.swagger-ui table{width:100%;padding:0 10px;border-collapse:collapse}.swagger-ui table.model tbody tr td{padding:0;vertical-align:top}.swagger-ui table.model tbody tr td:first-of-type{width:100px;padding:0}.swagger-ui table.headers td{font-size:12px;font-weight:300;vertical-align:middle;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui table tbody tr td{padding:10px 0 0;vertical-align:top}.swagger-ui table tbody tr td:first-of-type{width:20%;padding:10px 0}.swagger-ui table thead tr td,.swagger-ui table thead tr th{font-size:12px;font-weight:700;padding:12px 0;text-align:left;border-bottom:1px solid rgba(59,65,81,.2);font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .parameters-col_description p{font-size:14px;margin:0;font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .parameters-col_description input[type=text]{width:100%;max-width:340px}.swagger-ui .parameter__name{font-size:16px;font-weight:400;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .parameter__name.required{font-weight:700}.swagger-ui .parameter__name.required:after{font-size:10px;position:relative;top:-6px;padding:5px;content:\"required\";color:rgba(255,0,0,.6)}.swagger-ui .parameter__in{font-size:12px;font-style:italic;font-family:Source Code Pro,monospace;font-weight:600;color:#888}.swagger-ui .table-container{padding:20px}.swagger-ui .topbar{padding:8px 30px;background-color:#89bf04}.swagger-ui .topbar .topbar-wrapper{-ms-flex-align:center}.swagger-ui .topbar .topbar-wrapper,.swagger-ui .topbar a{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;align-items:center}.swagger-ui .topbar a{font-size:1.5em;font-weight:700;max-width:300px;text-decoration:none;-webkit-box-flex:1;-ms-flex:1;flex:1;-ms-flex-align:center;font-family:Titillium Web,sans-serif;color:#fff}.swagger-ui .topbar a span{margin:0;padding:0 10px}.swagger-ui .topbar .download-url-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:3;-ms-flex:3;flex:3}.swagger-ui .topbar .download-url-wrapper input[type=text]{width:100%;min-width:350px;margin:0;border:2px solid #547f00;border-radius:4px 0 0 4px;outline:none}.swagger-ui .topbar .download-url-wrapper .download-url-button{font-size:16px;font-weight:700;padding:4px 40px;border:none;border-radius:0 4px 4px 0;background:#547f00;font-family:Titillium Web,sans-serif;color:#fff}.swagger-ui .info{margin:50px 0}.swagger-ui .info hgroup.main{margin:0 0 20px}.swagger-ui .info hgroup.main a{font-size:12px}.swagger-ui .info li,.swagger-ui .info p,.swagger-ui .info table{font-size:14px;font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .info h1,.swagger-ui .info h2,.swagger-ui .info h3,.swagger-ui .info h4,.swagger-ui .info h5{font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .info code{padding:3px 5px;border-radius:4px;background:rgba(0,0,0,.05);font-family:Source Code Pro,monospace;font-weight:600;color:#9012fe}.swagger-ui .info a{font-size:14px;transition:all .4s;font-family:Open Sans,sans-serif;color:#4990e2}.swagger-ui .info a:hover{color:#1f69c0}.swagger-ui .info>div{margin:0 0 5px}.swagger-ui .info .base-url{font-size:12px;font-weight:300!important;margin:0;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui .info .title{font-size:36px;margin:0;font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .info .title small{font-size:10px;position:relative;top:-5px;display:inline-block;margin:0 0 0 5px;padding:2px 4px;vertical-align:super;border-radius:57px;background:#7d8492}.swagger-ui .info .title small pre{margin:0;font-family:Titillium Web,sans-serif;color:#fff}.swagger-ui .auth-btn-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;padding:10px 0;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.swagger-ui .auth-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.swagger-ui .auth-wrapper .authorize{padding-right:20px}.swagger-ui .auth-container{margin:0 0 10px;padding:10px 20px;border-bottom:1px solid #ebebeb}.swagger-ui .auth-container:last-of-type{margin:0;padding:10px 20px;border:0}.swagger-ui .auth-container h4{margin:5px 0 15px!important}.swagger-ui .auth-container .wrapper{margin:0;padding:0}.swagger-ui .auth-container input[type=password],.swagger-ui .auth-container input[type=text]{min-width:230px}.swagger-ui .auth-container .errors{font-size:12px;padding:10px;border-radius:4px;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui .scopes h2{font-size:14px;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .scope-def{padding:0 0 20px}.swagger-ui .errors-wrapper{margin:20px;padding:10px 20px;-webkit-animation:scaleUp .5s;animation:scaleUp .5s;border:2px solid #f93e3e;border-radius:4px;background:rgba(249,62,62,.1)}.swagger-ui .errors-wrapper .error-wrapper{margin:0 0 10px}.swagger-ui .errors-wrapper .errors h4{font-size:14px;margin:0;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui .errors-wrapper .errors small{color:#666}.swagger-ui .errors-wrapper hgroup{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.swagger-ui .errors-wrapper hgroup h4{font-size:20px;margin:0;-webkit-box-flex:1;-ms-flex:1;flex:1;font-family:Titillium Web,sans-serif;color:#3b4151}@-webkit-keyframes scaleUp{0%{-webkit-transform:scale(.8);transform:scale(.8);opacity:0}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes scaleUp{0%{-webkit-transform:scale(.8);transform:scale(.8);opacity:0}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}",""]); +},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t=0&&D.splice(t,1)}function a(e){var t=document.createElement("style");return t.type="text/css",s(e,t),t}function u(e){var t=document.createElement("link");return t.rel="stylesheet",s(e,t),t}function c(e,t){var r,i,n;if(t.singleton){var s=y++;r=x||(x=a(t)),i=l.bind(null,r,s,!1),n=l.bind(null,r,s,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(r=u(t),i=p.bind(null,r),n=function(){o(r),r.href&&URL.revokeObjectURL(r.href)}):(r=a(t),i=h.bind(null,r),n=function(){o(r)});return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else n()}}function l(e,t,r,i){var n=r?"":i.css;if(e.styleSheet)e.styleSheet.cssText=b(t,n);else{var s=document.createTextNode(n),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(s,o[t]):e.appendChild(s)}}function h(e,t){var r=t.css,i=t.media;t.sourceMap;if(i&&e.setAttribute("media",i),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}function p(e,t){var r=t.css,i=(t.media,t.sourceMap);i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var n=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(n),s&&URL.revokeObjectURL(s)}var f={},d=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},m=d(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),g=d(function(){return document.head||document.getElementsByTagName("head")[0]}),x=null,y=0,D=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=m()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var r=n(e);return i(r,t),function(e){for(var s=[],o=0;o=400?(n.updateLoadingStatus("failedConfig"),n.updateLoadingStatus("failedConfig"),n.updateUrl(""),console.error(r.statusText+" "+e),t(null)):t(c(r.text))}var n=r.specActions;if(e)return n.downloadConfig(e).then(i,i)}}},i={getLocalConfig:function(){return c(u.default)}};return{statePlugins:{spec:{actions:r,selectors:i}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;var s=r(41),o=i(s),a=r(76),u=i(a),c=function(e,t){try{return o.default.safeLoad(e)}catch(e){return t&&t.errActions.newThrownErr(new Error(e)),{}}}},function(e,t,r){"use strict";var i=r(42);e.exports=i},function(e,t,r){"use strict";function i(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}var n=r(43),s=r(75);e.exports.Type=r(49),e.exports.Schema=r(48),e.exports.FAILSAFE_SCHEMA=r(52),e.exports.JSON_SCHEMA=r(51),e.exports.CORE_SCHEMA=r(50),e.exports.DEFAULT_SAFE_SCHEMA=r(47),e.exports.DEFAULT_FULL_SCHEMA=r(70),e.exports.load=n.load,e.exports.loadAll=n.loadAll,e.exports.safeLoad=n.safeLoad,e.exports.safeLoadAll=n.safeLoadAll,e.exports.dump=s.dump,e.exports.safeDump=s.safeDump,e.exports.YAMLException=r(45),e.exports.MINIMAL_SCHEMA=r(52),e.exports.SAFE_SCHEMA=r(47),e.exports.DEFAULT_SCHEMA=r(70),e.exports.scan=i("scan"),e.exports.parse=i("parse"),e.exports.compose=i("compose"),e.exports.addConstructor=i("addConstructor")},function(e,t,r){"use strict";function i(e){return 10===e||13===e}function n(e){return 9===e||32===e}function s(e){return 9===e||32===e||10===e||13===e}function o(e){return 44===e||91===e||93===e||123===e||125===e}function a(e){var t;return 48<=e&&e<=57?e-48:(t=32|e,97<=t&&t<=102?t-97+10:-1)}function u(e){return 120===e?2:117===e?4:85===e?8:0}function c(e){return 48<=e&&e<=57?e-48:-1}function l(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e?"\t":9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function h(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function p(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Y,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function f(e,t){return new j(t,new X(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function d(e,t){throw f(e,t)}function m(e,t){e.onWarning&&e.onWarning.call(null,f(e,t))}function g(e,t,r,i){var n,s,o,a;if(t1&&(e.result+=z.repeat("\n",t-1))}function E(e,t,r){var a,u,c,l,h,p,f,d,m,x=e.kind,y=e.result;if(m=e.input.charCodeAt(e.position),s(m)||o(m)||35===m||38===m||42===m||33===m||124===m||62===m||39===m||34===m||37===m||64===m||96===m)return!1;if((63===m||45===m)&&(u=e.input.charCodeAt(e.position+1),s(u)||r&&o(u)))return!1;for(e.kind="scalar",e.result="",c=l=e.position,h=!1;0!==m;){if(58===m){if(u=e.input.charCodeAt(e.position+1),s(u)||r&&o(u))break}else if(35===m){if(a=e.input.charCodeAt(e.position-1),s(a))break}else{if(e.position===e.lineStart&&v(e)||r&&o(m))break;if(i(m)){if(p=e.line,f=e.lineStart,d=e.lineIndent,b(e,!1,-1),e.lineIndent>=t){h=!0,m=e.input.charCodeAt(e.position);continue}e.position=l,e.line=p,e.lineStart=f,e.lineIndent=d;break}}h&&(g(e,c,l,!1),w(e,e.line-p),c=l=e.position,h=!1),n(m)||(l=e.position+1),m=e.input.charCodeAt(++e.position)}return g(e,c,l,!1),!!e.result||(e.kind=x,e.result=y,!1)}function k(e,t){var r,n,s;if(r=e.input.charCodeAt(e.position),39!==r)return!1;for(e.kind="scalar",e.result="",e.position++,n=s=e.position;0!==(r=e.input.charCodeAt(e.position));)if(39===r){if(g(e,n,e.position,!0),r=e.input.charCodeAt(++e.position),39!==r)return!0;n=e.position,e.position++,s=e.position}else i(r)?(g(e,n,s,!0),w(e,b(e,!1,t)),n=s=e.position):e.position===e.lineStart&&v(e)?d(e,"unexpected end of the document within a single quoted scalar"):(e.position++,s=e.position);d(e,"unexpected end of the stream within a single quoted scalar")}function C(e,t){var r,n,s,o,c,l;if(l=e.input.charCodeAt(e.position),34!==l)return!1;for(e.kind="scalar",e.result="",e.position++,r=n=e.position;0!==(l=e.input.charCodeAt(e.position));){if(34===l)return g(e,r,e.position,!0),e.position++,!0;if(92===l){if(g(e,r,e.position,!0),l=e.input.charCodeAt(++e.position),i(l))b(e,!1,t);else if(l<256&&ne[l])e.result+=se[l],e.position++;else if((c=u(l))>0){for(s=c,o=0;s>0;s--)l=e.input.charCodeAt(++e.position),(c=a(l))>=0?o=(o<<4)+c:d(e,"expected hexadecimal character");e.result+=h(o),e.position++}else d(e,"unknown escape sequence");r=n=e.position}else i(l)?(g(e,r,n,!0),w(e,b(e,!1,t)),r=n=e.position):e.position===e.lineStart&&v(e)?d(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}d(e,"unexpected end of the stream within a double quoted scalar")}function A(e,t){var r,i,n,o,a,u,c,l,h,p,f,m=!0,g=e.tag,x=e.anchor,D={};if(f=e.input.charCodeAt(e.position),91===f)o=93,c=!1,i=[];else{if(123!==f)return!1;o=125,c=!0,i={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=i),f=e.input.charCodeAt(++e.position);0!==f;){if(b(e,!0,t),f=e.input.charCodeAt(e.position),f===o)return e.position++,e.tag=g,e.anchor=x,e.kind=c?"mapping":"sequence",e.result=i,!0;m||d(e,"missed comma between flow collection entries"),h=l=p=null,a=u=!1,63===f&&(n=e.input.charCodeAt(e.position+1),s(n)&&(a=u=!0,e.position++,b(e,!0,t))),r=e.line,P(e,t,W,!1,!0),h=e.tag,l=e.result,b(e,!0,t),f=e.input.charCodeAt(e.position),!u&&e.line!==r||58!==f||(a=!0,f=e.input.charCodeAt(++e.position),b(e,!0,t),P(e,t,W,!1,!0),p=e.result),c?y(e,i,D,h,l,p):a?i.push(y(e,null,D,h,l,p)):i.push(l),b(e,!0,t),f=e.input.charCodeAt(e.position),44===f?(m=!0,f=e.input.charCodeAt(++e.position)):m=!1}d(e,"unexpected end of the stream within a flow collection")}function S(e,t){var r,s,o,a,u=V,l=!1,h=!1,p=t,f=0,m=!1;if(a=e.input.charCodeAt(e.position),124===a)s=!1;else{if(62!==a)return!1;s=!0}for(e.kind="scalar",e.result="";0!==a;)if(a=e.input.charCodeAt(++e.position),43===a||45===a)V===u?u=43===a?Z:$:d(e,"repeat of a chomping mode identifier");else{if(!((o=c(a))>=0))break;0===o?d(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):h?d(e,"repeat of an indentation width identifier"):(p=t+o-1,h=!0)}if(n(a)){do a=e.input.charCodeAt(++e.position);while(n(a));if(35===a)do a=e.input.charCodeAt(++e.position);while(!i(a)&&0!==a)}for(;0!==a;){for(D(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!h||e.lineIndentp&&(p=e.lineIndent),i(a))f++;else{if(e.lineIndentt)&&0!==n)d(e,"bad indentation of a sequence entry");else if(e.lineIndentt)&&(P(e,t,G,!0,o)&&(D?g=e.result:x=e.result),D||(y(e,p,f,m,g,x,a,u),m=g=x=null),b(e,!0,-1),c=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==c)d(e,"bad indentation of a mapping entry");else if(e.lineIndentt?f=1:e.lineIndent===t?f=0:e.lineIndentt?f=1:e.lineIndent===t?f=0:e.lineIndent tag; it should be "'+l.kind+'", not "'+e.kind+'"'),l.resolve(e.result)?(e.result=l.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):d(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):d(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||g}function M(e){var t,r,o,a,u=e.position,c=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(a=e.input.charCodeAt(e.position))&&(b(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==a));){for(c=!0,a=e.input.charCodeAt(++e.position),t=e.position;0!==a&&!s(a);)a=e.input.charCodeAt(++e.position);for(r=e.input.slice(t,e.position),o=[],r.length<1&&d(e,"directive name must not be less than one character in length");0!==a;){for(;n(a);)a=e.input.charCodeAt(++e.position);if(35===a){do a=e.input.charCodeAt(++e.position);while(0!==a&&!i(a));break}if(i(a))break;for(t=e.position;0!==a&&!s(a);)a=e.input.charCodeAt(++e.position);o.push(e.input.slice(t,e.position))}0!==a&&D(e),K.call(ae,r)?ae[r](e,r,o):m(e,'unknown document directive "'+r+'"')}return b(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,b(e,!0,-1)):c&&d(e,"directives end mark is expected"),P(e,e.lineIndent-1,G,!1,!0),b(e,!0,-1),e.checkLineBreaks&&ee.test(e.input.slice(u,e.position))&&m(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&v(e)?void(46===e.input.charCodeAt(e.position)&&(e.position+=3,b(e,!0,-1))):void(e.position0&&"\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(i-1))===-1;)if(i-=1,this.position-i>t/2-1){r=" ... ",i+=5;break}for(s="",o=this.position;ot/2-1){s=" ... ",o-=5;break}return a=this.buffer.slice(i,o),n.repeat(" ",e)+r+a+s+"\n"+n.repeat(" ",e+this.position-i+r.length)+"^"},i.prototype.toString=function(e){var t,r="";return this.name&&(r+='in "'+this.name+'" '),r+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet(),t&&(r+=":\n"+t)),r},e.exports=i},function(e,t,r){"use strict";var i=r(48);e.exports=new i({include:[r(50)],implicit:[r(60),r(61)],explicit:[r(62),r(67),r(68),r(69)]})},function(e,t,r){"use strict";function i(e,t,r){var n=[];return e.include.forEach(function(e){r=i(e,t,r)}),e[t].forEach(function(e){r.forEach(function(t,r){t.tag===e.tag&&t.kind===e.kind&&n.push(r)}),r.push(e)}),r.filter(function(e,t){return n.indexOf(t)===-1})}function n(){function e(e){i[e.kind][e.tag]=i.fallback[e.tag]=e}var t,r,i={scalar:{},sequence:{},mapping:{},fallback:{}};for(t=0,r=arguments.length;t=0&&(t=t.slice(1)),".inf"===t?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:t.indexOf(":")>=0?(t.split(":").forEach(function(e){n.unshift(parseFloat(e,10))}),t=0,i=1,n.forEach(function(e){t+=e*i,i*=60}),r*t):r*parseFloat(t,10)}function s(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(a.isNegativeZero(e))return"-0.0";return r=e.toString(10),l.test(r)?r.replace("e",".e"):r}function o(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!==0||a.isNegativeZero(e))}var a=r(44),u=r(49),c=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),l=/^[-+]?[0-9]+e/;e.exports=new u("tag:yaml.org,2002:float",{kind:"scalar",resolve:i,construct:n,predicate:o,represent:s,defaultStyle:"lowercase"})},function(e,t,r){"use strict";function i(e){return null!==e&&(null!==a.exec(e)||null!==u.exec(e))}function n(e){var t,r,i,n,s,o,c,l,h,p,f=0,d=null;if(t=a.exec(e),null===t&&(t=u.exec(e)),null===t)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,n=+t[3],!t[4])return new Date(Date.UTC(r,i,n));if(s=+t[4],o=+t[5],c=+t[6],t[7]){for(f=t[7].slice(0,3);f.length<3;)f+="0";f=+f}return t[9]&&(l=+t[10],h=+(t[11]||0),d=6e4*(60*l+h),"-"===t[9]&&(d=-d)),p=new Date(Date.UTC(r,i,n,s,o,c,f)),d&&p.setTime(p.getTime()-d),p}function s(e){return e.toISOString()}var o=r(49),a=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),u=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");e.exports=new o("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:i,construct:n,instanceOf:Date,represent:s})},function(e,t,r){"use strict";function i(e){return"<<"===e||null===e}var n=r(49);e.exports=new n("tag:yaml.org,2002:merge",{kind:"scalar",resolve:i})},function(e,t,r){function i(e){if(null===e)return!1;var t,r,i=0,n=e.length,s=c;for(r=0;r64)){if(t<0)return!1;i+=6}return i%8===0}function n(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,s=c,o=0,u=[];for(t=0;t>16&255),u.push(o>>8&255),u.push(255&o)),o=o<<6|s.indexOf(i.charAt(t));return r=n%4*6,0===r?(u.push(o>>16&255),u.push(o>>8&255),u.push(255&o)):18===r?(u.push(o>>10&255),u.push(o>>2&255)):12===r&&u.push(o>>4&255),a?a.from?a.from(u):new a(u):u}function s(e){var t,r,i="",n=0,s=e.length,o=c;for(t=0;t>18&63],i+=o[n>>12&63],i+=o[n>>6&63],i+=o[63&n]),n=(n<<8)+e[t];return r=s%3,0===r?(i+=o[n>>18&63],i+=o[n>>12&63],i+=o[n>>6&63],i+=o[63&n]):2===r?(i+=o[n>>10&63],i+=o[n>>4&63],i+=o[n<<2&63],i+=o[64]):1===r&&(i+=o[n>>2&63],i+=o[n<<4&63],i+=o[64],i+=o[64]),i}function o(e){return a&&a.isBuffer(e)}var a;try{a=r(63).Buffer}catch(e){}var u=r(49),c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new u("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i,construct:n,predicate:o,represent:s})},function(e,t,r){(function(e){/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +"use strict";function i(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}function n(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(n()=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|e}function g(e){return+e!=e&&(e=0),o.alloc(+e)}function x(e,t){if(o.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return K(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return q(e).length;default:if(i)return K(e).length;t=(""+t).toLowerCase(),i=!0}}function y(e,t,r){var i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,r);case"utf8":case"utf-8":return T(this,t,r);case"ascii":return N(this,t,r);case"latin1":case"binary":return I(this,t,r);case"base64":return F(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,r);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function D(e,t,r){var i=e[t];e[t]=e[r],e[r]=i}function b(e,t,r,i,n){if(0===e.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return-1;r=e.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof t&&(t=o.from(t,i)),o.isBuffer(t))return 0===t.length?-1:v(e,t,r,i,n);if("number"==typeof t)return t&=255,o.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,i,n);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,i,n){function s(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}var o=1,a=e.length,u=t.length;if(void 0!==i&&(i=String(i).toLowerCase(),"ucs2"===i||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;o=2,a/=2,u/=2,r/=2}var c;if(n){var l=-1;for(c=r;ca&&(r=a-u),c=r;c>=0;c--){for(var h=!0,p=0;pn&&(i=n)):i=n;var s=t.length;if(s%2!==0)throw new TypeError("Invalid hex string");i>s/2&&(i=s/2);for(var o=0;o239?4:s>223?3:s>191?2:1;if(n+a<=r){var u,c,l,h;switch(a){case 1:s<128&&(o=s);break;case 2:u=e[n+1],128===(192&u)&&(h=(31&s)<<6|63&u,h>127&&(o=h));break;case 3:u=e[n+1],c=e[n+2],128===(192&u)&&128===(192&c)&&(h=(15&s)<<12|(63&u)<<6|63&c,h>2047&&(h<55296||h>57343)&&(o=h));break;case 4:u=e[n+1],c=e[n+2],l=e[n+3],128===(192&u)&&128===(192&c)&&128===(192&l)&&(h=(15&s)<<18|(63&u)<<12|(63&c)<<6|63&l,h>65535&&h<1114112&&(o=h))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,i.push(o>>>10&1023|55296),o=56320|1023&o),i.push(o),n+=a}return B(i)}function B(e){var t=e.length;if(t<=ee)return String.fromCharCode.apply(String,e);for(var r="",i=0;ii)&&(r=i);for(var n="",s=t;sr)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,r,i,n,s){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||te.length)throw new RangeError("Index out of range")}function R(e,t,r,i){t<0&&(t=65535+t+1);for(var n=0,s=Math.min(e.length-r,2);n>>8*(i?n:1-n)}function U(e,t,r,i){t<0&&(t=4294967295+t+1);for(var n=0,s=Math.min(e.length-r,4);n>>8*(i?n:3-n)&255}function _(e,t,r,i,n,s){if(r+i>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function z(e,t,r,i,n){return n||_(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),Z.write(e,t,r,i,23,4),r+4}function j(e,t,r,i,n){return n||_(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),Z.write(e,t,r,i,52,8),r+8}function X(e){if(e=J(e).replace(te,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function J(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Y(e){return e<16?"0"+e.toString(16):e.toString(16)}function K(e,t){t=t||1/0;for(var r,i=e.length,n=null,s=[],o=0;o55295&&r<57344){if(!n){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(o+1===i){(t-=3)>-1&&s.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),n=r;continue}r=(n-55296<<10|r-56320)+65536}else n&&(t-=3)>-1&&s.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function W(e){for(var t=[],r=0;r>8,n=r%256,s.push(n),s.push(i);return s}function q(e){return $.toByteArray(X(e))}function G(e,t,r,i){for(var n=0;n=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function V(e){return e!==e}var $=r(64),Z=r(65),Q=r(66);t.Buffer=o,t.SlowBuffer=g,t.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:i(),t.kMaxLength=n(),o.poolSize=8192,o._augment=function(e){return e.__proto__=o.prototype,e},o.from=function(e,t,r){return a(null,e,t,r)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(e,t,r){return c(null,e,t,r)},o.allocUnsafe=function(e){return l(null,e)},o.allocUnsafeSlow=function(e){return l(null,e)},o.isBuffer=function(e){return!(null==e||!e._isBuffer)},o.compare=function(e,t){if(!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,i=t.length,n=0,s=Math.min(r,i);n0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},o.prototype.compare=function(e,t,r,i,n){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),t<0||r>e.length||i<0||n>this.length)throw new RangeError("out of range index");if(i>=n&&t>=r)return 0;if(i>=n)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,i>>>=0,n>>>=0,this===e)return 0;for(var s=n-i,a=r-t,u=Math.min(s,a),c=this.slice(i,n),l=e.slice(t,r),h=0;hn)&&(r=n),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var s=!1;;)switch(i){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return E(this,e,t,r);case"ascii":return k(this,e,t,r);case"latin1":case"binary":return C(this,e,t,r);case"base64":return A(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ee=4096;o.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),t0&&(n*=256);)i+=this[e+--t]*n;return i},o.prototype.readUInt8=function(e,t){return t||O(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return t||O(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return t||O(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUInt32BE=function(e,t){return t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||O(e,t,this.length);for(var i=this[e],n=1,s=0;++s=n&&(i-=Math.pow(2,8*t)),i},o.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||O(e,t,this.length);for(var i=t,n=1,s=this[e+--i];i>0&&(n*=256);)s+=this[e+--i]*n;return n*=128,s>=n&&(s-=Math.pow(2,8*t)),s},o.prototype.readInt8=function(e,t){return t||O(e,1,this.length),128&this[e]?(255-this[e]+1)*-1:this[e]},o.prototype.readInt16LE=function(e,t){t||O(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt16BE=function(e,t){t||O(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt32LE=function(e,t){return t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return t||O(e,4,this.length),Z.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return t||O(e,4,this.length),Z.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return t||O(e,8,this.length),Z.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return t||O(e,8,this.length),Z.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,r,i){if(e=+e,t|=0,r|=0,!i){var n=Math.pow(2,8*r)-1;L(this,e,t,r,n,0)}var s=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+s]=e/o&255;return t+r},o.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,1,255,0),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},o.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},o.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):U(this,e,t,!0),t+4},o.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):U(this,e,t,!1),t+4},o.prototype.writeIntLE=function(e,t,r,i){if(e=+e,t|=0,!i){var n=Math.pow(2,8*r-1);L(this,e,t,r,n-1,-n)}var s=0,o=1,a=0;for(this[t]=255&e;++s>0)-a&255;return t+r},o.prototype.writeIntBE=function(e,t,r,i){if(e=+e,t|=0,!i){var n=Math.pow(2,8*r-1);L(this,e,t,r,n-1,-n)}var s=r-1,o=1,a=0;for(this[t+s]=255&e;--s>=0&&(o*=256);)e<0&&0===a&&0!==this[t+s+1]&&(a=1),this[t+s]=(e/o>>0)-a&255;return t+r},o.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,1,127,-128),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},o.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},o.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):U(this,e,t,!0),t+4},o.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):U(this,e,t,!1),t+4},o.prototype.writeFloatLE=function(e,t,r){return z(this,e,t,!0,r)},o.prototype.writeFloatBE=function(e,t,r){return z(this,e,t,!1,r)},o.prototype.writeDoubleLE=function(e,t,r){return j(this,e,t,!0,r)},o.prototype.writeDoubleBE=function(e,t,r){return j(this,e,t,!1,r)},o.prototype.copy=function(e,t,r,i){if(r||(r=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t=0;--n)e[n+t]=this[n+r];else if(s<1e3||!o.TYPED_ARRAY_SUPPORT)for(n=0;n>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var s;if("number"==typeof e)for(s=t;s0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function i(e){return 3*e.length/4-r(e)}function n(e){var t,i,n,s,o,a,u=e.length;o=r(e),a=new l(3*u/4-o),n=o>0?u-4:u;var h=0;for(t=0,i=0;t>16&255,a[h++]=s>>8&255,a[h++]=255&s;return 2===o?(s=c[e.charCodeAt(t)]<<2|c[e.charCodeAt(t+1)]>>4,a[h++]=255&s):1===o&&(s=c[e.charCodeAt(t)]<<10|c[e.charCodeAt(t+1)]<<4|c[e.charCodeAt(t+2)]>>2,a[h++]=s>>8&255,a[h++]=255&s),a}function s(e){return u[e>>18&63]+u[e>>12&63]+u[e>>6&63]+u[63&e]}function o(e,t,r){for(var i,n=[],o=t;ol?l:c+a));return 1===i?(t=e[r-1],n+=u[t>>2],n+=u[t<<4&63],n+="=="):2===i&&(t=(e[r-2]<<8)+e[r-1],n+=u[t>>10],n+=u[t>>4&63],n+=u[t<<2&63],n+="="),s.push(n),s.join("")}t.byteLength=i,t.toByteArray=n,t.fromByteArray=a;for(var u=[],c=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,f=h.length;p>1,l=-7,h=r?n-1:0,p=r?-1:1,f=e[t+h];for(h+=p,s=f&(1<<-l)-1,f>>=-l,l+=a;l>0;s=256*s+e[t+h],h+=p,l-=8);for(o=s&(1<<-l)-1,s>>=-l,l+=i;l>0;o=256*o+e[t+h],h+=p,l-=8);if(0===s)s=1-c;else{if(s===u)return o?NaN:(f?-1:1)*(1/0);o+=Math.pow(2,i),s-=c}return(f?-1:1)*o*Math.pow(2,s-i)},t.write=function(e,t,r,i,n,s){var o,a,u,c=8*s-n-1,l=(1<>1,p=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:s-1,d=i?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),t+=o+h>=1?p/u:p*Math.pow(2,1-h),t*u>=2&&(o++,u/=2),o+h>=l?(a=0,o=l):o+h>=1?(a=(t*u-1)*Math.pow(2,n),o+=h):(a=t*Math.pow(2,h-1)*Math.pow(2,n),o=0));n>=8;e[r+f]=255&a,f+=d,a/=256,n-=8);for(o=o<0;e[r+f]=255&o,f+=d,o/=256,c-=8);e[r+f-d]|=128*m}},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){"use strict";function i(e){if(null===e)return!0;var t,r,i,n,s,u=[],c=e;for(t=0,r=c.length;t3)return!1;if("/"!==t[t.length-i.length-1])return!1}return!0}function n(e){var t=e,r=/\/([gim]*)$/.exec(e),i="";return"/"===t[0]&&(r&&(i=r[1]),t=t.slice(1,t.length-i.length-1)),new RegExp(t,i)}function s(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function o(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var a=r(49);e.exports=new a("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:i,construct:n,predicate:o,represent:s})},function(e,t,r){function i(e){if(null===e)return!1;try{var t="("+e+")",r=a.parse(t,{range:!0});return"Program"===r.type&&1===r.body.length&&"ExpressionStatement"===r.body[0].type&&"FunctionExpression"===r.body[0].expression.type}catch(e){return!1}}function n(e){var t,r="("+e+")",i=a.parse(r,{range:!0}),n=[];if("Program"!==i.type||1!==i.body.length||"ExpressionStatement"!==i.body[0].type||"FunctionExpression"!==i.body[0].expression.type)throw new Error("Failed to resolve function");return i.body[0].expression.params.forEach(function(e){n.push(e.name)}),t=i.body[0].expression.body.range,new Function(n,r.slice(t[0]+1,t[1]-1))}function s(e){return e.toString()}function o(e){return"[object Function]"===Object.prototype.toString.call(e)}var a;try{a=r(74)}catch(e){"undefined"!=typeof window&&(a=window.esprima)}var u=r(49);e.exports=new u("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:i,construct:n,predicate:o,represent:s})},function(e,t,r){!function(t,r){e.exports=r()}(this,function(){return function(e){function t(i){if(r[i])return r[i].exports;var n=r[i]={exports:{},id:i,loaded:!1};return e[i].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){"use strict";function i(e,t,r){var i=null,n=function(e,t){r&&r(e,t),i&&i.visit(e,t)},u="function"==typeof r?n:null,c=!1;if(t){c="boolean"==typeof t.comment&&t.comment;var l="boolean"==typeof t.attachComment&&t.attachComment;(c||l)&&(i=new s.CommentHandler,i.attach=l,t.comment=!0,u=n)}var h;h=t&&"boolean"==typeof t.jsx&&t.jsx?new a.JSXParser(e,t,u):new o.Parser(e,t,u);var p=h.parseProgram();return c&&(p.comments=i.comments),h.config.tokens&&(p.tokens=h.tokens),h.config.tolerant&&(p.errors=h.errorHandler.errors),p}function n(e,t,r){var i,n=new u.Tokenizer(e,t);i=[];try{for(;;){var s=n.getNextToken();if(!s)break;r&&(s=r(s)),i.push(s)}}catch(e){n.errorHandler.tolerate(e)}return n.errorHandler.tolerant&&(i.errors=n.errors()),i}var s=r(1),o=r(3),a=r(11),u=r(15);t.parse=i,t.tokenize=n;var c=r(2);t.Syntax=c.Syntax,t.version="3.1.3"},function(e,t,r){"use strict";var i=r(2),n=function(){function e(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return e.prototype.insertInnerComments=function(e,t){if(e.type===i.Syntax.BlockStatement&&0===e.body.length){for(var r=[],n=this.leading.length-1;n>=0;--n){var s=this.leading[n];t.end.offset>=s.start&&(r.unshift(s.comment),this.leading.splice(n,1),this.trailing.splice(n,1))}r.length&&(e.innerComments=r)}},e.prototype.findTrailingComments=function(e,t){var r=[];if(this.trailing.length>0){for(var i=this.trailing.length-1;i>=0;--i){var n=this.trailing[i];n.start>=t.end.offset&&r.unshift(n.comment)}return this.trailing.length=0,r}var s=this.stack[this.stack.length-1];if(s&&s.node.trailingComments){var o=s.node.trailingComments[0];o&&o.range[0]>=t.end.offset&&(r=s.node.trailingComments,delete s.node.trailingComments)}return r},e.prototype.findLeadingComments=function(e,t){for(var r,i=[];this.stack.length>0;){var n=this.stack[this.stack.length-1];if(!(n&&n.start>=t.start.offset))break;r=this.stack.pop().node}if(r){for(var s=r.leadingComments?r.leadingComments.length:0,o=s-1;o>=0;--o){var a=r.leadingComments[o];a.range[1]<=t.start.offset&&(i.unshift(a),r.leadingComments.splice(o,1))}return r.leadingComments&&0===r.leadingComments.length&&delete r.leadingComments,i}for(var o=this.leading.length-1;o>=0;--o){var n=this.leading[o];n.start<=t.start.offset&&(i.unshift(n.comment),this.leading.splice(o,1))}return i},e.prototype.visitNode=function(e,t){if(!(e.type===i.Syntax.Program&&e.body.length>0)){this.insertInnerComments(e,t);var r=this.findTrailingComments(e,t),n=this.findLeadingComments(e,t);n.length>0&&(e.leadingComments=n),r.length>0&&(e.trailingComments=r),this.stack.push({node:e,start:t.start.offset})}},e.prototype.visitComment=function(e,t){var r="L"===e.type[0]?"Line":"Block",i={type:r,value:e.value};if(e.range&&(i.range=e.range),e.loc&&(i.loc=e.loc),this.comments.push(i),this.attach){var n={comment:{type:r,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};e.loc&&(n.comment.loc=e.loc),e.type=r,this.leading.push(n),this.trailing.push(n)}},e.prototype.visit=function(e,t){"LineComment"===e.type?this.visitComment(e,t):"BlockComment"===e.type?this.visitComment(e,t):this.attach&&this.visitNode(e,t)},e}();t.CommentHandler=n},function(e,t){"use strict";t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,r){"use strict";var i=r(4),n=r(5),s=r(6),o=r(7),a=r(8),u=r(2),c=r(10),l="ArrowParameterPlaceHolder",h=function(){function e(e,t,r){void 0===t&&(t={}),this.config={range:"boolean"==typeof t.range&&t.range,loc:"boolean"==typeof t.loc&&t.loc,source:null,tokens:"boolean"==typeof t.tokens&&t.tokens,comment:"boolean"==typeof t.comment&&t.comment,tolerant:"boolean"==typeof t.tolerant&&t.tolerant},this.config.loc&&t.source&&null!==t.source&&(this.config.source=String(t.source)),this.delegate=r,this.errorHandler=new s.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new a.Scanner(e,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3, +"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.sourceType=t&&"module"===t.sourceType?"module":"script",this.lookahead=null,this.hasLineTerminator=!1,this.context={allowIn:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:"module"===this.sourceType},this.tokens=[],this.startMarker={index:0,lineNumber:this.scanner.lineNumber,lineStart:0},this.lastMarker={index:0,lineNumber:this.scanner.lineNumber,lineStart:0},this.nextToken(),this.lastMarker={index:this.scanner.index,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart}}return e.prototype.throwError=function(e){for(var t=[],r=1;r0&&this.delegate)for(var t=0;t>="===e||">>>="===e||"&="===e||"^="===e||"|="===e},e.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement,r=this.context.isAssignmentTarget,i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var n=e.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=r,this.context.firstCoverInitializedNameError=i,n},e.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement,r=this.context.isAssignmentTarget,i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var n=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&r,this.context.firstCoverInitializedNameError=i||this.context.firstCoverInitializedNameError,n},e.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(this.lookahead.type===o.Token.EOF||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.lineNumber=this.startMarker.lineNumber,this.lastMarker.lineStart=this.startMarker.lineStart)},e.prototype.parsePrimaryExpression=function(){var e,t,r,i,s=this.createNode();switch(this.lookahead.type){case o.Token.Identifier:"module"===this.sourceType&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),e=this.finalize(s,new c.Identifier(this.nextToken().value));break;case o.Token.NumericLiteral:case o.Token.StringLiteral:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,n.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,r=this.nextToken(),i=this.getTokenRaw(r),e=this.finalize(s,new c.Literal(r.value,i));break;case o.Token.BooleanLiteral:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,r=this.nextToken(),r.value="true"===r.value,i=this.getTokenRaw(r),e=this.finalize(s,new c.Literal(r.value,i));break;case o.Token.NullLiteral:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,r=this.nextToken(),r.value=null,i=this.getTokenRaw(r),e=this.finalize(s,new c.Literal(r.value,i));break;case o.Token.Template:e=this.parseTemplateLiteral();break;case o.Token.Punctuator:switch(t=this.lookahead.value){case"(":this.context.isBindingElement=!1,e=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":e=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":e=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,r=this.nextRegexToken(),i=this.getTokenRaw(r),e=this.finalize(s,new c.RegexLiteral(r.value,i,r.regex));break;default:this.throwUnexpectedToken(this.nextToken())}break;case o.Token.Keyword:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?e=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?e=this.finalize(s,new c.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?e=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),e=this.finalize(s,new c.ThisExpression)):this.matchKeyword("class")?e=this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:this.throwUnexpectedToken(this.nextToken())}return e},e.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new c.SpreadElement(t))},e.prototype.parseArrayInitializer=function(){var e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){var r=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(r)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new c.ArrayExpression(t))},e.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var t=this.context.strict,r=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,r},e.prototype.parsePropertyMethodFunction=function(){var e=!1,t=this.createNode(),r=this.context.allowYield;this.context.allowYield=!1;var i=this.parseFormalParameters(),n=this.parsePropertyMethod(i);return this.context.allowYield=r,this.finalize(t,new c.FunctionExpression(null,i.params,n,e))},e.prototype.parseObjectPropertyKey=function(){var e=this.createNode(),t=this.nextToken(),r=null;switch(t.type){case o.Token.StringLiteral:case o.Token.NumericLiteral:this.context.strict&&t.octal&&this.tolerateUnexpectedToken(t,n.Messages.StrictOctalLiteral);var i=this.getTokenRaw(t);r=this.finalize(e,new c.Literal(t.value,i));break;case o.Token.Identifier:case o.Token.BooleanLiteral:case o.Token.NullLiteral:case o.Token.Keyword:r=this.finalize(e,new c.Identifier(t.value));break;case o.Token.Punctuator:"["===t.value?(r=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):this.throwUnexpectedToken(t);break;default:this.throwUnexpectedToken(t)}return r},e.prototype.isPropertyKey=function(e,t){return e.type===u.Syntax.Identifier&&e.name===t||e.type===u.Syntax.Literal&&e.value===t},e.prototype.parseObjectProperty=function(e){var t,r,i,s=this.createNode(),a=this.lookahead,u=!1,l=!1,h=!1;a.type===o.Token.Identifier?(this.nextToken(),r=this.finalize(s,new c.Identifier(a.value))):this.match("*")?this.nextToken():(u=this.match("["),r=this.parseObjectPropertyKey());var p=this.qualifiedPropertyName(this.lookahead);if(a.type===o.Token.Identifier&&"get"===a.value&&p)t="get",u=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,i=this.parseGetterMethod();else if(a.type===o.Token.Identifier&&"set"===a.value&&p)t="set",u=this.match("["),r=this.parseObjectPropertyKey(),i=this.parseSetterMethod();else if(a.type===o.Token.Punctuator&&"*"===a.value&&p)t="init",u=this.match("["),r=this.parseObjectPropertyKey(),i=this.parseGeneratorMethod(),l=!0;else if(r||this.throwUnexpectedToken(this.lookahead),t="init",this.match(":"))!u&&this.isPropertyKey(r,"__proto__")&&(e.value&&this.tolerateError(n.Messages.DuplicateProtoProperty),e.value=!0),this.nextToken(),i=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))i=this.parsePropertyMethodFunction(),l=!0;else if(a.type===o.Token.Identifier){var f=this.finalize(s,new c.Identifier(a.value));if(this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),h=!0;var d=this.isolateCoverGrammar(this.parseAssignmentExpression);i=this.finalize(s,new c.AssignmentPattern(f,d))}else h=!0,i=f}else this.throwUnexpectedToken(this.nextToken());return this.finalize(s,new c.Property(t,r,u,i,l,h))},e.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");for(var t=[],r={value:!1};!this.match("}");)t.push(this.parseObjectProperty(r)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(e,new c.ObjectExpression(t))},e.prototype.parseTemplateHead=function(){i.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode(),t=this.nextToken(),r={raw:t.value.raw,cooked:t.value.cooked};return this.finalize(e,new c.TemplateElement(r,t.tail))},e.prototype.parseTemplateElement=function(){this.lookahead.type!==o.Token.Template&&this.throwUnexpectedToken();var e=this.createNode(),t=this.nextToken(),r={raw:t.value.raw,cooked:t.value.cooked};return this.finalize(e,new c.TemplateElement(r,t.tail))},e.prototype.parseTemplateLiteral=function(){var e=this.createNode(),t=[],r=[],i=this.parseTemplateHead();for(r.push(i);!i.tail;)t.push(this.parseExpression()),i=this.parseTemplateElement(),r.push(i);return this.finalize(e,new c.TemplateLiteral(r,t))},e.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case u.Syntax.Identifier:case u.Syntax.MemberExpression:case u.Syntax.RestElement:case u.Syntax.AssignmentPattern:break;case u.Syntax.SpreadElement:e.type=u.Syntax.RestElement,this.reinterpretExpressionAsPattern(e.argument);break;case u.Syntax.ArrayExpression:e.type=u.Syntax.ArrayPattern;for(var t=0;t")||this.expect("=>"),e={type:l,params:[]};else{var t=this.lookahead,r=[];if(this.match("..."))e=this.parseRestElement(r),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:l,params:[e]};else{var i=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var n=[];for(this.context.isAssignmentTarget=!1,n.push(e);this.startMarker.index")||this.expect("=>"),this.context.isBindingElement=!1;for(var s=0;s")&&(e.type===u.Syntax.Identifier&&"yield"===e.name&&(i=!0,e={type:l,params:[e]}),!i)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),e.type===u.Syntax.SequenceExpression)for(var s=0;s0){this.nextToken(),r.prec=i,this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var n=[e,this.lookahead],s=t,o=this.isolateCoverGrammar(this.parseExponentiationExpression),a=[s,r,o];;){if(i=this.binaryPrecedence(this.lookahead),i<=0)break;for(;a.length>2&&i<=a[a.length-2].prec;){o=a.pop();var u=a.pop().value;s=a.pop(),n.pop();var l=this.startNode(n[n.length-1]);a.push(this.finalize(l,new c.BinaryExpression(u,s,o)))}r=this.nextToken(),r.prec=i,a.push(r),n.push(this.lookahead),a.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var h=a.length-1;for(t=a[h],n.pop();h>1;){var l=this.startNode(n.pop());t=this.finalize(l,new c.BinaryExpression(a[h-1].value,a[h-2],t)),h-=2}}return t},e.prototype.parseConditionalExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var r=this.context.allowIn;this.context.allowIn=!0;var i=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=r,this.expect(":");var n=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new c.ConditionalExpression(t,i,n)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return t},e.prototype.checkPatternParam=function(e,t){switch(t.type){case u.Syntax.Identifier:this.validateParam(e,t,t.name);break;case u.Syntax.RestElement:this.checkPatternParam(e,t.argument);break;case u.Syntax.AssignmentPattern:this.checkPatternParam(e,t.left);break;case u.Syntax.ArrayPattern:for(var r=0;r")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var i=this.reinterpretAsCoverFormalsList(e);if(i){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var s=this.context.strict,o=this.context.allowYield;this.context.allowYield=!0;var a=this.startNode(t);this.expect("=>");var h=this.match("{")?this.parseFunctionSourceElements():this.isolateCoverGrammar(this.parseAssignmentExpression),p=h.type!==u.Syntax.BlockStatement;this.context.strict&&i.firstRestricted&&this.throwUnexpectedToken(i.firstRestricted,i.message),this.context.strict&&i.stricted&&this.tolerateUnexpectedToken(i.stricted,i.message),e=this.finalize(a,new c.ArrowFunctionExpression(i.params,h,p)),this.context.strict=s,this.context.allowYield=o}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(n.Messages.InvalidLHSInAssignment),this.context.strict&&e.type===u.Syntax.Identifier){var f=e;this.scanner.isRestrictedWord(f.name)&&this.tolerateUnexpectedToken(r,n.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(f.name)&&this.tolerateUnexpectedToken(r,n.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1),r=this.nextToken();var d=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new c.AssignmentExpression(r.value,e,d)),this.context.firstCoverInitializedNameError=null}}return e},e.prototype.parseExpression=function(){var e=this.lookahead,t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var r=[];for(r.push(t);this.startMarker.index",t.TokenName[r.Identifier]="Identifier",t.TokenName[r.Keyword]="Keyword",t.TokenName[r.NullLiteral]="Null",t.TokenName[r.NumericLiteral]="Numeric",t.TokenName[r.Punctuator]="Punctuator",t.TokenName[r.StringLiteral]="String",t.TokenName[r.RegularExpression]="RegularExpression",t.TokenName[r.Template]="Template"},function(e,t,r){"use strict";function i(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function n(e){return"01234567".indexOf(e)}var s=r(4),o=r(5),a=r(9),u=r(7),c=function(){function e(e,t){this.source=e,this.errorHandler=t,this.trackComment=!1,this.length=e.length,this.index=0,this.lineNumber=e.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return e.prototype.eof=function(){return this.index>=this.length},e.prototype.throwUnexpectedToken=function(e){void 0===e&&(e=o.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.tolerateUnexpectedToken=function(){this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,o.Messages.UnexpectedTokenIllegal)},e.prototype.skipSingleLineComment=function(e){var t,r,i;for(this.trackComment&&(t=[],r=this.index-e,i={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){var n=this.source.charCodeAt(this.index);if(++this.index,a.Character.isLineTerminator(n)){if(this.trackComment){i.end={line:this.lineNumber,column:this.index-this.lineStart-1};var s={multiLine:!1,slice:[r+e,this.index-1],range:[r,this.index-1],loc:i};t.push(s)}return 13===n&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t}}if(this.trackComment){i.end={line:this.lineNumber,column:this.index-this.lineStart};var s={multiLine:!1,slice:[r+e,this.index],range:[r,this.index],loc:i};t.push(s)}return t},e.prototype.skipMultiLineComment=function(){var e,t,r;for(this.trackComment&&(e=[],t=this.index-2,r={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var i=this.source.charCodeAt(this.index);if(a.Character.isLineTerminator(i))13===i&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===i){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart};var n={multiLine:!0,slice:[t+2,this.index-2],range:[t,this.index],loc:r};e.push(n)}return e}++this.index}else++this.index}if(this.trackComment){r.end={line:this.lineNumber,column:this.index-this.lineStart};var n={multiLine:!0,slice:[t+2,this.index],range:[t,this.index],loc:r};e.push(n)}return this.tolerateUnexpectedToken(),e},e.prototype.scanComments=function(){var e;this.trackComment&&(e=[]);for(var t=0===this.index;!this.eof();){var r=this.source.charCodeAt(this.index);if(a.Character.isWhiteSpace(r))++this.index;else if(a.Character.isLineTerminator(r))++this.index,13===r&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(47===r)if(r=this.source.charCodeAt(this.index+1),47===r){this.index+=2;var i=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(i)),t=!0}else{if(42!==r)break;this.index+=2;var i=this.skipMultiLineComment();this.trackComment&&(e=e.concat(i))}else if(t&&45===r){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3;var i=this.skipSingleLineComment(3);this.trackComment&&(e=e.concat(i))}else{if(60!==r)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4;var i=this.skipSingleLineComment(4);this.trackComment&&(e=e.concat(i))}}return e},e.prototype.isFutureReservedWord=function(e){switch(e){case"enum":case"export":case"import":case"super":return!0;default:return!1}},e.prototype.isStrictModeReservedWord=function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},e.prototype.isRestrictedWord=function(e){return"eval"===e||"arguments"===e},e.prototype.isKeyword=function(e){switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}},e.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){var r=this.source.charCodeAt(e+1);if(r>=56320&&r<=57343){var i=t;t=1024*(i-55296)+r-56320+65536}}return t},e.prototype.scanHexEscape=function(e){for(var t="u"===e?4:2,r=0,n=0;n1114111||"}"!==e)&&this.throwUnexpectedToken(),a.Character.fromCodePoint(t)},e.prototype.getIdentifier=function(){for(var e=this.index++;!this.eof();){var t=this.source.charCodeAt(this.index);if(92===t)return this.index=e,this.getComplexIdentifier();if(t>=55296&&t<57343)return this.index=e,this.getComplexIdentifier();if(!a.Character.isIdentifierPart(t))break;++this.index}return this.source.slice(e,this.index)},e.prototype.getComplexIdentifier=function(){var e=this.codePointAt(this.index),t=a.Character.fromCodePoint(e);this.index+=t.length;var r;for(92===e&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,r=this.scanUnicodeCodePointEscape()):(r=this.scanHexEscape("u"),e=r.charCodeAt(0),r&&"\\"!==r&&a.Character.isIdentifierStart(e)||this.throwUnexpectedToken()),t=r);!this.eof()&&(e=this.codePointAt(this.index),a.Character.isIdentifierPart(e));)r=a.Character.fromCodePoint(e),t+=r,this.index+=r.length,92===e&&(t=t.substr(0,t.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,r=this.scanUnicodeCodePointEscape()):(r=this.scanHexEscape("u"),e=r.charCodeAt(0),r&&"\\"!==r&&a.Character.isIdentifierPart(e)||this.throwUnexpectedToken()),t+=r);return t},e.prototype.octalToDecimal=function(e){var t="0"!==e,r=n(e);return!this.eof()&&a.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,r=8*r+n(this.source[this.index++]),"0123".indexOf(e)>=0&&!this.eof()&&a.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(r=8*r+n(this.source[this.index++]))),{code:r,octal:t}},e.prototype.scanIdentifier=function(){var e,t=this.index,r=92===this.source.charCodeAt(t)?this.getComplexIdentifier():this.getIdentifier();return e=1===r.length?u.Token.Identifier:this.isKeyword(r)?u.Token.Keyword:"null"===r?u.Token.NullLiteral:"true"===r||"false"===r?u.Token.BooleanLiteral:u.Token.Identifier,{type:e,value:r,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.scanPunctuator=function(){var e={type:u.Token.Punctuator,value:"",lineNumber:this.lineNumber,lineStart:this.lineStart,start:this.index,end:this.index},t=this.source[this.index];switch(t){case"(":case"{":"{"===t&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,t="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:t=this.source.substr(this.index,4),">>>="===t?this.index+=4:(t=t.substr(0,3),"==="===t||"!=="===t||">>>"===t||"<<="===t||">>="===t||"**="===t?this.index+=3:(t=t.substr(0,2),"&&"===t||"||"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t||"**"===t?this.index+=2:(t=this.source[this.index],"<>=!+-*%&|^/".indexOf(t)>=0&&++this.index)))}return this.index===e.start&&this.throwUnexpectedToken(),e.end=this.index,e.value=t,e},e.prototype.scanHexLiteral=function(e){for(var t="";!this.eof()&&a.Character.isHexDigit(this.source.charCodeAt(this.index));)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),a.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:u.Token.NumericLiteral,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanBinaryLiteral=function(e){for(var t,r="";!this.eof()&&(t=this.source[this.index],"0"===t||"1"===t);)r+=this.source[this.index++];return 0===r.length&&this.throwUnexpectedToken(),this.eof()||(t=this.source.charCodeAt(this.index),(a.Character.isIdentifierStart(t)||a.Character.isDecimalDigit(t))&&this.throwUnexpectedToken()),{type:u.Token.NumericLiteral,value:parseInt(r,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanOctalLiteral=function(e,t){var r="",i=!1;for(a.Character.isOctalDigit(e.charCodeAt(0))?(i=!0,r="0"+this.source[this.index++]):++this.index;!this.eof()&&a.Character.isOctalDigit(this.source.charCodeAt(this.index));)r+=this.source[this.index++];return i||0!==r.length||this.throwUnexpectedToken(),(a.Character.isIdentifierStart(this.source.charCodeAt(this.index))||a.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:u.Token.NumericLiteral,value:parseInt(r,8),octal:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1;e=0&&(i=i.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(e,t,i){var s=parseInt(t||i,16);return s>1114111&&n.throwUnexpectedToken(o.Messages.InvalidRegExp),s<=65535?String.fromCharCode(s):r}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,r));try{RegExp(i)}catch(e){this.throwUnexpectedToken(o.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(e){return null}},e.prototype.scanRegExpBody=function(){var e=this.source[this.index];s.assert("/"===e,"Regular expression literal must start with a slash");for(var t=this.source[this.index++],r=!1,i=!1;!this.eof();)if(e=this.source[this.index++],t+=e,"\\"===e)e=this.source[this.index++],a.Character.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(o.Messages.UnterminatedRegExp),t+=e;else if(a.Character.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(o.Messages.UnterminatedRegExp);else if(r)"]"===e&&(r=!1);else{if("/"===e){i=!0;break}"["===e&&(r=!0)}i||this.throwUnexpectedToken(o.Messages.UnterminatedRegExp);var n=t.substr(1,t.length-2);return{value:n,literal:t}},e.prototype.scanRegExpFlags=function(){for(var e="",t="";!this.eof();){var r=this.source[this.index];if(!a.Character.isIdentifierPart(r.charCodeAt(0)))break;if(++this.index,"\\"!==r||this.eof())t+=r,e+=r;else if(r=this.source[this.index],"u"===r){++this.index;var i=this.index;if(r=this.scanHexEscape("u"))for(t+=r,e+="\\u";i=55296&&e<57343&&a.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},e}();t.Scanner=c},function(e,t){"use strict";var r={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/ +};t.Character={fromCodePoint:function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&r.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&r.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return e>=48&&e<=57},isHexDigit:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},isOctalDigit:function(e){return e>=48&&e<=55}}},function(e,t,r){"use strict";var i=r(2),n=function(){function e(e){this.type=i.Syntax.ArrayExpression,this.elements=e}return e}();t.ArrayExpression=n;var s=function(){function e(e){this.type=i.Syntax.ArrayPattern,this.elements=e}return e}();t.ArrayPattern=s;var o=function(){function e(e,t,r){this.type=i.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=r}return e}();t.ArrowFunctionExpression=o;var a=function(){function e(e,t,r){this.type=i.Syntax.AssignmentExpression,this.operator=e,this.left=t,this.right=r}return e}();t.AssignmentExpression=a;var u=function(){function e(e,t){this.type=i.Syntax.AssignmentPattern,this.left=e,this.right=t}return e}();t.AssignmentPattern=u;var c=function(){function e(e,t,r){var n="||"===e||"&&"===e;this.type=n?i.Syntax.LogicalExpression:i.Syntax.BinaryExpression,this.operator=e,this.left=t,this.right=r}return e}();t.BinaryExpression=c;var l=function(){function e(e){this.type=i.Syntax.BlockStatement,this.body=e}return e}();t.BlockStatement=l;var h=function(){function e(e){this.type=i.Syntax.BreakStatement,this.label=e}return e}();t.BreakStatement=h;var p=function(){function e(e,t){this.type=i.Syntax.CallExpression,this.callee=e,this.arguments=t}return e}();t.CallExpression=p;var f=function(){function e(e,t){this.type=i.Syntax.CatchClause,this.param=e,this.body=t}return e}();t.CatchClause=f;var d=function(){function e(e){this.type=i.Syntax.ClassBody,this.body=e}return e}();t.ClassBody=d;var m=function(){function e(e,t,r){this.type=i.Syntax.ClassDeclaration,this.id=e,this.superClass=t,this.body=r}return e}();t.ClassDeclaration=m;var g=function(){function e(e,t,r){this.type=i.Syntax.ClassExpression,this.id=e,this.superClass=t,this.body=r}return e}();t.ClassExpression=g;var x=function(){function e(e,t){this.type=i.Syntax.MemberExpression,this.computed=!0,this.object=e,this.property=t}return e}();t.ComputedMemberExpression=x;var y=function(){function e(e,t,r){this.type=i.Syntax.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=r}return e}();t.ConditionalExpression=y;var D=function(){function e(e){this.type=i.Syntax.ContinueStatement,this.label=e}return e}();t.ContinueStatement=D;var b=function(){function e(){this.type=i.Syntax.DebuggerStatement}return e}();t.DebuggerStatement=b;var v=function(){function e(e,t){this.type=i.Syntax.ExpressionStatement,this.expression=e,this.directive=t}return e}();t.Directive=v;var w=function(){function e(e,t){this.type=i.Syntax.DoWhileStatement,this.body=e,this.test=t}return e}();t.DoWhileStatement=w;var E=function(){function e(){this.type=i.Syntax.EmptyStatement}return e}();t.EmptyStatement=E;var k=function(){function e(e){this.type=i.Syntax.ExportAllDeclaration,this.source=e}return e}();t.ExportAllDeclaration=k;var C=function(){function e(e){this.type=i.Syntax.ExportDefaultDeclaration,this.declaration=e}return e}();t.ExportDefaultDeclaration=C;var A=function(){function e(e,t,r){this.type=i.Syntax.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=r}return e}();t.ExportNamedDeclaration=A;var S=function(){function e(e,t){this.type=i.Syntax.ExportSpecifier,this.exported=t,this.local=e}return e}();t.ExportSpecifier=S;var F=function(){function e(e){this.type=i.Syntax.ExpressionStatement,this.expression=e}return e}();t.ExpressionStatement=F;var T=function(){function e(e,t,r){this.type=i.Syntax.ForInStatement,this.left=e,this.right=t,this.body=r,this.each=!1}return e}();t.ForInStatement=T;var B=function(){function e(e,t,r){this.type=i.Syntax.ForOfStatement,this.left=e,this.right=t,this.body=r}return e}();t.ForOfStatement=B;var N=function(){function e(e,t,r,n){this.type=i.Syntax.ForStatement,this.init=e,this.test=t,this.update=r,this.body=n}return e}();t.ForStatement=N;var I=function(){function e(e,t,r,n){this.type=i.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=r,this.generator=n,this.expression=!1}return e}();t.FunctionDeclaration=I;var P=function(){function e(e,t,r,n){this.type=i.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=r,this.generator=n,this.expression=!1}return e}();t.FunctionExpression=P;var M=function(){function e(e){this.type=i.Syntax.Identifier,this.name=e}return e}();t.Identifier=M;var O=function(){function e(e,t,r){this.type=i.Syntax.IfStatement,this.test=e,this.consequent=t,this.alternate=r}return e}();t.IfStatement=O;var L=function(){function e(e,t){this.type=i.Syntax.ImportDeclaration,this.specifiers=e,this.source=t}return e}();t.ImportDeclaration=L;var R=function(){function e(e){this.type=i.Syntax.ImportDefaultSpecifier,this.local=e}return e}();t.ImportDefaultSpecifier=R;var U=function(){function e(e){this.type=i.Syntax.ImportNamespaceSpecifier,this.local=e}return e}();t.ImportNamespaceSpecifier=U;var _=function(){function e(e,t){this.type=i.Syntax.ImportSpecifier,this.local=e,this.imported=t}return e}();t.ImportSpecifier=_;var z=function(){function e(e,t){this.type=i.Syntax.LabeledStatement,this.label=e,this.body=t}return e}();t.LabeledStatement=z;var j=function(){function e(e,t){this.type=i.Syntax.Literal,this.value=e,this.raw=t}return e}();t.Literal=j;var X=function(){function e(e,t){this.type=i.Syntax.MetaProperty,this.meta=e,this.property=t}return e}();t.MetaProperty=X;var J=function(){function e(e,t,r,n,s){this.type=i.Syntax.MethodDefinition,this.key=e,this.computed=t,this.value=r,this.kind=n,this.static=s}return e}();t.MethodDefinition=J;var Y=function(){function e(e,t){this.type=i.Syntax.NewExpression,this.callee=e,this.arguments=t}return e}();t.NewExpression=Y;var K=function(){function e(e){this.type=i.Syntax.ObjectExpression,this.properties=e}return e}();t.ObjectExpression=K;var W=function(){function e(e){this.type=i.Syntax.ObjectPattern,this.properties=e}return e}();t.ObjectPattern=W;var H=function(){function e(e,t){this.type=i.Syntax.Program,this.body=e,this.sourceType=t}return e}();t.Program=H;var q=function(){function e(e,t,r,n,s,o){this.type=i.Syntax.Property,this.key=t,this.computed=r,this.value=n,this.kind=e,this.method=s,this.shorthand=o}return e}();t.Property=q;var G=function(){function e(e,t,r){this.type=i.Syntax.Literal,this.value=e,this.raw=t,this.regex=r}return e}();t.RegexLiteral=G;var V=function(){function e(e){this.type=i.Syntax.RestElement,this.argument=e}return e}();t.RestElement=V;var $=function(){function e(e){this.type=i.Syntax.ReturnStatement,this.argument=e}return e}();t.ReturnStatement=$;var Z=function(){function e(e){this.type=i.Syntax.SequenceExpression,this.expressions=e}return e}();t.SequenceExpression=Z;var Q=function(){function e(e){this.type=i.Syntax.SpreadElement,this.argument=e}return e}();t.SpreadElement=Q;var ee=function(){function e(e,t){this.type=i.Syntax.MemberExpression,this.computed=!1,this.object=e,this.property=t}return e}();t.StaticMemberExpression=ee;var te=function(){function e(){this.type=i.Syntax.Super}return e}();t.Super=te;var re=function(){function e(e,t){this.type=i.Syntax.SwitchCase,this.test=e,this.consequent=t}return e}();t.SwitchCase=re;var ie=function(){function e(e,t){this.type=i.Syntax.SwitchStatement,this.discriminant=e,this.cases=t}return e}();t.SwitchStatement=ie;var ne=function(){function e(e,t){this.type=i.Syntax.TaggedTemplateExpression,this.tag=e,this.quasi=t}return e}();t.TaggedTemplateExpression=ne;var se=function(){function e(e,t){this.type=i.Syntax.TemplateElement,this.value=e,this.tail=t}return e}();t.TemplateElement=se;var oe=function(){function e(e,t){this.type=i.Syntax.TemplateLiteral,this.quasis=e,this.expressions=t}return e}();t.TemplateLiteral=oe;var ae=function(){function e(){this.type=i.Syntax.ThisExpression}return e}();t.ThisExpression=ae;var ue=function(){function e(e){this.type=i.Syntax.ThrowStatement,this.argument=e}return e}();t.ThrowStatement=ue;var ce=function(){function e(e,t,r){this.type=i.Syntax.TryStatement,this.block=e,this.handler=t,this.finalizer=r}return e}();t.TryStatement=ce;var le=function(){function e(e,t){this.type=i.Syntax.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0}return e}();t.UnaryExpression=le;var he=function(){function e(e,t,r){this.type=i.Syntax.UpdateExpression,this.operator=e,this.argument=t,this.prefix=r}return e}();t.UpdateExpression=he;var pe=function(){function e(e,t){this.type=i.Syntax.VariableDeclaration,this.declarations=e,this.kind=t}return e}();t.VariableDeclaration=pe;var fe=function(){function e(e,t){this.type=i.Syntax.VariableDeclarator,this.id=e,this.init=t}return e}();t.VariableDeclarator=fe;var de=function(){function e(e,t){this.type=i.Syntax.WhileStatement,this.test=e,this.body=t}return e}();t.WhileStatement=de;var me=function(){function e(e,t){this.type=i.Syntax.WithStatement,this.object=e,this.body=t}return e}();t.WithStatement=me;var ge=function(){function e(e,t){this.type=i.Syntax.YieldExpression,this.argument=e,this.delegate=t}return e}();t.YieldExpression=ge},function(e,t,r){"use strict";function i(e){var t;switch(e.type){case l.JSXSyntax.JSXIdentifier:var r=e;t=r.name;break;case l.JSXSyntax.JSXNamespacedName:var n=e;t=i(n.namespace)+":"+i(n.name);break;case l.JSXSyntax.JSXMemberExpression:var s=e;t=i(s.object)+"."+i(s.property)}return t}var n,s=this&&this.__extends||function(e,t){function r(){this.constructor=e}for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},o=r(9),a=r(7),u=r(3),c=r(12),l=r(13),h=r(10),p=r(14);!function(e){e[e.Identifier=100]="Identifier",e[e.Text=101]="Text"}(n||(n={})),a.TokenName[n.Identifier]="JSXIdentifier",a.TokenName[n.Text]="JSXText";var f=function(e){function t(t,r,i){e.call(this,t,r,i)}return s(t,e),t.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():e.prototype.parsePrimaryExpression.call(this)},t.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.lineNumber,this.scanner.lineStart=this.startMarker.lineStart},t.prototype.finishJSX=function(){this.nextToken()},t.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},t.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.scanXHTMLEntity=function(e){for(var t="&",r=!0,i=!1,n=!1,s=!1;!this.scanner.eof()&&r&&!i;){var a=this.scanner.source[this.scanner.index];if(a===e)break;if(i=";"===a,t+=a,++this.scanner.index,!i)switch(t.length){case 2:n="#"===a;break;case 3:n&&(s="x"===a,r=s||o.Character.isDecimalDigit(a.charCodeAt(0)),n=n&&!s);break;default:r=r&&!(n&&!o.Character.isDecimalDigit(a.charCodeAt(0))),r=r&&!(s&&!o.Character.isHexDigit(a.charCodeAt(0)))}}if(r&&i&&t.length>2){var u=t.substr(1,t.length-2);n&&u.length>1?t=String.fromCharCode(parseInt(u.substr(1),10)):s&&u.length>2?t=String.fromCharCode(parseInt("0"+u.substr(1),16)):n||s||!c.XHTMLEntities[u]||(t=c.XHTMLEntities[u])}return t},t.prototype.lexJSX=function(){var e=this.scanner.source.charCodeAt(this.scanner.index);if(60===e||62===e||47===e||58===e||61===e||123===e||125===e){var t=this.scanner.source[this.scanner.index++];return{type:a.Token.Punctuator,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index}}if(34===e||39===e){for(var r=this.scanner.index,i=this.scanner.source[this.scanner.index++],s="";!this.scanner.eof();){var u=this.scanner.source[this.scanner.index++];if(u===i)break;s+="&"===u?this.scanXHTMLEntity(i):u}return{type:a.Token.StringLiteral,value:s,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:r,end:this.scanner.index}}if(46===e){var c=this.scanner.source.charCodeAt(this.scanner.index+1),l=this.scanner.source.charCodeAt(this.scanner.index+2),t=46===c&&46===l?"...":".",r=this.scanner.index;return this.scanner.index+=t.length,{type:a.Token.Punctuator,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:r,end:this.scanner.index}}if(96===e)return{type:a.Token.Template,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(o.Character.isIdentifierStart(e)&&92!==e){var r=this.scanner.index;for(++this.scanner.index;!this.scanner.eof();){var u=this.scanner.source.charCodeAt(this.scanner.index);if(o.Character.isIdentifierPart(u)&&92!==u)++this.scanner.index;else{if(45!==u)break;++this.scanner.index}}var h=this.scanner.source.slice(r,this.scanner.index);return{type:n.Identifier,value:h,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:r,end:this.scanner.index}}this.scanner.throwUnexpectedToken()},t.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.lineNumber=this.scanner.lineNumber,this.startMarker.lineStart=this.scanner.lineStart;var e=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(e)),e},t.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.lineNumber=this.scanner.lineNumber,this.startMarker.lineStart=this.scanner.lineStart;for(var e=this.scanner.index,t="";!this.scanner.eof();){var r=this.scanner.source[this.scanner.index];if("{"===r||"<"===r)break;++this.scanner.index,t+=r,o.Character.isLineTerminator(r.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===r&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart;var i={type:n.Text,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};return t.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(i)),i},t.prototype.peekJSXToken=function(){var e=this.scanner.index,t=this.scanner.lineNumber,r=this.scanner.lineStart;this.scanner.scanComments();var i=this.lexJSX();return this.scanner.index=e,this.scanner.lineNumber=t,this.scanner.lineStart=r,i},t.prototype.expectJSX=function(e){var t=this.nextJSXToken();t.type===a.Token.Punctuator&&t.value===e||this.throwUnexpectedToken(t)},t.prototype.matchJSX=function(e){var t=this.peekJSXToken();return t.type===a.Token.Punctuator&&t.value===e},t.prototype.parseJSXIdentifier=function(){var e=this.createJSXNode(),t=this.nextJSXToken();return t.type!==n.Identifier&&this.throwUnexpectedToken(t),this.finalize(e,new p.JSXIdentifier(t.value))},t.prototype.parseJSXElementName=function(){var e=this.createJSXNode(),t=this.parseJSXIdentifier();if(this.matchJSX(":")){var r=t;this.expectJSX(":");var i=this.parseJSXIdentifier();t=this.finalize(e,new p.JSXNamespacedName(r,i))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var n=t;this.expectJSX(".");var s=this.parseJSXIdentifier();t=this.finalize(e,new p.JSXMemberExpression(n,s))}return t},t.prototype.parseJSXAttributeName=function(){var e,t=this.createJSXNode(),r=this.parseJSXIdentifier();if(this.matchJSX(":")){var i=r;this.expectJSX(":");var n=this.parseJSXIdentifier();e=this.finalize(t,new p.JSXNamespacedName(i,n))}else e=r;return e},t.prototype.parseJSXStringLiteralAttribute=function(){var e=this.createJSXNode(),t=this.nextJSXToken();t.type!==a.Token.StringLiteral&&this.throwUnexpectedToken(t);var r=this.getTokenRaw(t);return this.finalize(e,new h.Literal(t.value,r))},t.prototype.parseJSXExpressionAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new p.JSXExpressionContainer(t))},t.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},t.prototype.parseJSXNameValueAttribute=function(){var e=this.createJSXNode(),t=this.parseJSXAttributeName(),r=null;return this.matchJSX("=")&&(this.expectJSX("="),r=this.parseJSXAttributeValue()),this.finalize(e,new p.JSXAttribute(t,r))},t.prototype.parseJSXSpreadAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new p.JSXSpreadAttribute(t))},t.prototype.parseJSXAttributes=function(){for(var e=[];!this.matchJSX("/")&&!this.matchJSX(">");){var t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();e.push(t)}return e},t.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName(),r=this.parseJSXAttributes(),i=this.matchJSX("/");return i&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new p.JSXOpeningElement(t,i,r))},t.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(e,new p.JSXClosingElement(t))}var r=this.parseJSXElementName(),i=this.parseJSXAttributes(),n=this.matchJSX("/");return n&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new p.JSXOpeningElement(r,n,i))},t.prototype.parseJSXEmptyExpression=function(){var e=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.lineNumber=this.scanner.lineNumber,this.lastMarker.lineStart=this.scanner.lineStart,this.finalize(e,new p.JSXEmptyExpression)},t.prototype.parseJSXExpressionContainer=function(){var e=this.createJSXNode();this.expectJSX("{");var t;return this.matchJSX("}")?(t=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),t=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(e,new p.JSXExpressionContainer(t))},t.prototype.parseJSXChildren=function(){for(var e=[];!this.scanner.eof();){var t=this.createJSXChildNode(),r=this.nextJSXText();if(r.start0))break;var o=this.finalize(e.node,new p.JSXElement(e.opening,e.children,e.closing));e=t.pop(),e.children.push(o)}}return e},t.prototype.parseJSXElement=function(){var e=this.createJSXNode(),t=this.parseJSXOpeningElement(),r=[],i=null;if(!t.selfClosing){var n=this.parseComplexJSXElement({node:e,opening:t,closing:i,children:r});r=n.children,i=n.closing}return this.finalize(e,new p.JSXElement(t,r,i))},t.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var e=this.parseJSXElement();return this.finishJSX(),e},t}(u.Parser);t.JSXParser=f},function(e,t){"use strict";t.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",lang:"⟨",rang:"⟩"}},function(e,t){"use strict";t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,r){"use strict";var i=r(13),n=function(){function e(e){this.type=i.JSXSyntax.JSXClosingElement,this.name=e}return e}();t.JSXClosingElement=n;var s=function(){function e(e,t,r){this.type=i.JSXSyntax.JSXElement,this.openingElement=e,this.children=t,this.closingElement=r}return e}();t.JSXElement=s;var o=function(){function e(){this.type=i.JSXSyntax.JSXEmptyExpression}return e}();t.JSXEmptyExpression=o;var a=function(){function e(e){this.type=i.JSXSyntax.JSXExpressionContainer,this.expression=e}return e}();t.JSXExpressionContainer=a;var u=function(){function e(e){this.type=i.JSXSyntax.JSXIdentifier,this.name=e}return e}();t.JSXIdentifier=u;var c=function(){function e(e,t){this.type=i.JSXSyntax.JSXMemberExpression,this.object=e,this.property=t}return e}();t.JSXMemberExpression=c;var l=function(){function e(e,t){this.type=i.JSXSyntax.JSXAttribute,this.name=e,this.value=t}return e}();t.JSXAttribute=l;var h=function(){function e(e,t){this.type=i.JSXSyntax.JSXNamespacedName,this.namespace=e,this.name=t}return e}();t.JSXNamespacedName=h;var p=function(){function e(e,t,r){this.type=i.JSXSyntax.JSXOpeningElement,this.name=e,this.selfClosing=t,this.attributes=r}return e}();t.JSXOpeningElement=p;var f=function(){function e(e){this.type=i.JSXSyntax.JSXSpreadAttribute,this.argument=e}return e}();t.JSXSpreadAttribute=f;var d=function(){function e(e,t){this.type=i.JSXSyntax.JSXText,this.value=e,this.raw=t}return e}();t.JSXText=d},function(e,t,r){"use strict";var i=r(8),n=r(6),s=r(7),o=function(){function e(){this.values=[],this.curly=this.paren=-1}return e.prototype.beforeFunctionExpression=function(e){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)>=0},e.prototype.isRegexStart=function(){var e=this.values[this.values.length-1],t=null!==e;switch(e){case"this":case"]":t=!1;break;case")":var r=this.values[this.paren-1];t="if"===r||"while"===r||"for"===r||"with"===r;break;case"}":if(t=!1,"function"===this.values[this.curly-3]){var i=this.values[this.curly-4];t=!!i&&!this.beforeFunctionExpression(i)}else if("function"===this.values[this.curly-4]){var n=this.values[this.curly-5];t=!n||!this.beforeFunctionExpression(n)}}return t},e.prototype.push=function(e){e.type===s.Token.Punctuator||e.type===s.Token.Keyword?("{"===e.value?this.curly=this.values.length:"("===e.value&&(this.paren=this.values.length),this.values.push(e.value)):this.values.push(null)},e}(),a=function(){function e(e,t){this.errorHandler=new n.ErrorHandler,this.errorHandler.tolerant=!!t&&("boolean"==typeof t.tolerant&&t.tolerant),this.scanner=new i.Scanner(e,this.errorHandler),this.scanner.trackComment=!!t&&("boolean"==typeof t.comment&&t.comment),this.trackRange=!!t&&("boolean"==typeof t.range&&t.range),this.trackLoc=!!t&&("boolean"==typeof t.loc&&t.loc),this.buffer=[],this.reader=new o}return e.prototype.errors=function(){return this.errorHandler.errors},e.prototype.getNextToken=function(){if(0===this.buffer.length){var e=this.scanner.scanComments();if(this.scanner.trackComment)for(var t=0;ti&&" "!==e[d+1],d=s);else if(!l(o))return le;m=m&&h(o)}u=u||f&&s-d-1>i&&" "!==e[d+1]}return a||u?" "===e[0]&&r>9?le:u?ce:ue:m&&!n(e)?oe:ae}function d(e,t,r,i){e.dump=function(){function n(t){return u(e,t)}if(0===t.length)return"''";if(!e.noCompatMode&&se.indexOf(t)!==-1)return"'"+t+"'";var s=e.indent*Math.max(1,r),a=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),c=i||e.flowLevel>-1&&r>=e.flowLevel;switch(f(t,c,e.indent,a,n)){case oe:return t;case ae:return"'"+t.replace(/'/g,"''")+"'";case ue:return"|"+m(t,e.indent)+g(o(t,s));case ce:return">"+m(t,e.indent)+g(o(x(t,a),s));case le:return'"'+D(t,a)+'"';default:throw new N("impossible error: invalid scalar style")}}()}function m(e,t){var r=" "===e[0]?String(t):"",i="\n"===e[e.length-1],n=i&&("\n"===e[e.length-2]||"\n"===e),s=n?"+":i?"":"-";return r+s+"\n"}function g(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function x(e,t){for(var r,i,n=/(\n+)([^\n]*)/g,s=function(){var r=e.indexOf("\n");return r=r!==-1?r:e.length,n.lastIndex=r,y(e.slice(0,r),t)}(),o="\n"===e[0]||" "===e[0];i=n.exec(e);){var a=i[1],u=i[2];r=" "===u[0],s+=a+(o||r||""===u?"":"\n")+y(u,t),o=r}return s}function y(e,t){if(""===e||" "===e[0])return e;for(var r,i,n=/ [^ ]/g,s=0,o=0,a=0,u="";r=n.exec(e);)a=r.index,a-s>t&&(i=o>s?o:a,u+="\n"+e.slice(s,i),s=i+1),o=a;return u+="\n",u+=e.length-s>t&&o>s?e.slice(s,o)+"\n"+e.slice(o+1):e.slice(s),u.slice(1)}function D(e){for(var t,r,i="",s=0;s1024&&(a+="? "),a+=e.dump+": ",C(e,t,o,!1,!1)&&(a+=e.dump,u+=a));e.tag=c,e.dump="{"+u+"}"}function E(e,t,r,i){var n,s,o,u,c,l,h="",p=e.tag,f=Object.keys(r);if(e.sortKeys===!0)f.sort();else if("function"==typeof e.sortKeys)f.sort(e.sortKeys);else if(e.sortKeys)throw new N("sortKeys must be a boolean or a function"); +for(n=0,s=f.length;n1024,c&&(l+=e.dump&&R===e.dump.charCodeAt(0)?"?":"? "),l+=e.dump,c&&(l+=a(e,t)),C(e,t+1,u,!0,c)&&(l+=e.dump&&R===e.dump.charCodeAt(0)?":":": ",l+=e.dump,h+=l));e.tag=p,e.dump=h||"{}"}function k(e,t,r){var i,n,s,o,a,u;for(n=r?e.explicitTypes:e.implicitTypes,s=0,o=n.length;s tag resolver accepts not "'+u+'" style');i=a.represent[u](t,u)}e.dump=i}return!0}return!1}function C(e,t,r,i,n,s){e.tag=null,e.dump=r,k(e,r,!1)||k(e,r,!0);var o=M.call(e.dump);i&&(i=e.flowLevel<0||e.flowLevel>t);var a,u,c="[object Object]"===o||"[object Array]"===o;if(c&&(a=e.duplicates.indexOf(r),u=a!==-1),(null!==e.tag&&"?"!==e.tag||u||2!==e.indent&&t>0)&&(n=!1),u&&e.usedDuplicates[a])e.dump="*ref_"+a;else{if(c&&u&&!e.usedDuplicates[a]&&(e.usedDuplicates[a]=!0),"[object Object]"===o)i&&0!==Object.keys(e.dump).length?(E(e,t,e.dump,n),u&&(e.dump="&ref_"+a+e.dump)):(w(e,t,e.dump),u&&(e.dump="&ref_"+a+" "+e.dump));else if("[object Array]"===o)i&&0!==e.dump.length?(v(e,t,e.dump,n),u&&(e.dump="&ref_"+a+e.dump)):(b(e,t,e.dump),u&&(e.dump="&ref_"+a+" "+e.dump));else{if("[object String]"!==o){if(e.skipInvalid)return!1;throw new N("unacceptable kind of an object to dump "+o)}"?"!==e.tag&&d(e,e.dump,t,s)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function A(e,t){var r,i,n=[],s=[];for(S(e,n,s),r=0,i=s.length;rlabel{font-size:12px;font-weight:700;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin:-20px 15px 0 0;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .scheme-container .schemes>label select{min-width:130px;text-transform:uppercase}.swagger-ui .loading-container{padding:40px 0 60px}.swagger-ui .loading-container .loading{position:relative}.swagger-ui .loading-container .loading:after{font-size:10px;font-weight:700;position:absolute;top:50%;left:50%;content:"loading";-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);text-transform:uppercase;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .loading-container .loading:before{position:absolute;top:50%;left:50%;display:block;width:60px;height:60px;margin:-30px;content:"";-webkit-animation:rotation 1s infinite linear,opacity .5s;animation:rotation 1s infinite linear,opacity .5s;opacity:1;border:2px solid rgba(85,85,85,.1);border-top-color:rgba(0,0,0,.6);border-radius:100%;-webkit-backface-visibility:hidden;backface-visibility:hidden}@-webkit-keyframes rotation{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes rotation{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes blinker{50%{opacity:0}}@keyframes blinker{50%{opacity:0}}.swagger-ui .btn{font-size:14px;font-weight:700;padding:5px 23px;transition:all .3s;border:2px solid #888;border-radius:4px;background:transparent;box-shadow:0 1px 2px rgba(0,0,0,.1);font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .btn[disabled]{cursor:not-allowed;opacity:.3}.swagger-ui .btn:hover{box-shadow:0 0 5px rgba(0,0,0,.3)}.swagger-ui .btn.cancel{border-color:#ff6060;font-family:Titillium Web,sans-serif;color:#ff6060}.swagger-ui .btn.authorize{line-height:1;display:inline;color:#49cc90;border-color:#49cc90}.swagger-ui .btn.authorize span{float:left;padding:4px 20px 0 0}.swagger-ui .btn.authorize svg{fill:#49cc90}.swagger-ui .btn.execute{-webkit-animation:swagger-ui-pulse 2s infinite;animation:swagger-ui-pulse 2s infinite;color:#fff;border-color:#4990e2}@-webkit-keyframes swagger-ui-pulse{0%{color:#fff;background:#4990e2;box-shadow:0 0 0 0 rgba(73,144,226,.8)}70%{box-shadow:0 0 0 5px rgba(73,144,226,0)}to{color:#fff;background:#4990e2;box-shadow:0 0 0 0 rgba(73,144,226,0)}}@keyframes swagger-ui-pulse{0%{color:#fff;background:#4990e2;box-shadow:0 0 0 0 rgba(73,144,226,.8)}70%{box-shadow:0 0 0 5px rgba(73,144,226,0)}to{color:#fff;background:#4990e2;box-shadow:0 0 0 0 rgba(73,144,226,0)}}.swagger-ui .btn-group{display:-webkit-box;display:-ms-flexbox;display:flex;padding:30px}.swagger-ui .btn-group .btn{-webkit-box-flex:1;-ms-flex:1;flex:1}.swagger-ui .btn-group .btn:first-child{border-radius:4px 0 0 4px}.swagger-ui .btn-group .btn:last-child{border-radius:0 4px 4px 0}.swagger-ui .authorization__btn{padding:0 10px;border:none;background:none}.swagger-ui .authorization__btn.locked{opacity:1}.swagger-ui .authorization__btn.unlocked{opacity:.4}.swagger-ui .expand-methods,.swagger-ui .expand-operation{border:none;background:none}.swagger-ui .expand-methods svg,.swagger-ui .expand-operation svg{width:20px;height:20px}.swagger-ui .expand-methods{padding:0 10px}.swagger-ui .expand-methods:hover svg{fill:#444}.swagger-ui .expand-methods svg{transition:all .3s;fill:#777}.swagger-ui button{cursor:pointer;outline:none}.swagger-ui select{font-size:14px;font-weight:700;padding:5px 40px 5px 10px;border:2px solid #41444e;border-radius:4px;background:#f7f7f7 url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAyMCI+ICAgIDxwYXRoIGQ9Ik0xMy40MTggNy44NTljLjI3MS0uMjY4LjcwOS0uMjY4Ljk3OCAwIC4yNy4yNjguMjcyLjcwMSAwIC45NjlsLTMuOTA4IDMuODNjLS4yNy4yNjgtLjcwNy4yNjgtLjk3OSAwbC0zLjkwOC0zLjgzYy0uMjctLjI2Ny0uMjctLjcwMSAwLS45NjkuMjcxLS4yNjguNzA5LS4yNjguOTc4IDBMMTAgMTFsMy40MTgtMy4xNDF6Ii8+PC9zdmc+) right 10px center no-repeat;background-size:20px;box-shadow:0 1px 2px 0 rgba(0,0,0,.25);font-family:Titillium Web,sans-serif;color:#3b4151;-webkit-appearance:none;-moz-appearance:none;appearance:none}.swagger-ui select[multiple]{margin:5px 0;padding:5px;background:#f7f7f7}.swagger-ui .opblock-body select{min-width:230px}.swagger-ui label{font-size:12px;font-weight:700;margin:0 0 5px;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui input[type=email],.swagger-ui input[type=password],.swagger-ui input[type=search],.swagger-ui input[type=text]{min-width:100px;margin:5px 0;padding:8px 10px;border:1px solid #d9d9d9;border-radius:4px;background:#fff}.swagger-ui input[type=email].invalid,.swagger-ui input[type=password].invalid,.swagger-ui input[type=search].invalid,.swagger-ui input[type=text].invalid{-webkit-animation:shake .4s 1;animation:shake .4s 1;border-color:#f93e3e;background:#feebeb}@-webkit-keyframes shake{10%,90%{-webkit-transform:translate3d(-1px,0,0);transform:translate3d(-1px,0,0)}20%,80%{-webkit-transform:translate3d(2px,0,0);transform:translate3d(2px,0,0)}30%,50%,70%{-webkit-transform:translate3d(-4px,0,0);transform:translate3d(-4px,0,0)}40%,60%{-webkit-transform:translate3d(4px,0,0);transform:translate3d(4px,0,0)}}@keyframes shake{10%,90%{-webkit-transform:translate3d(-1px,0,0);transform:translate3d(-1px,0,0)}20%,80%{-webkit-transform:translate3d(2px,0,0);transform:translate3d(2px,0,0)}30%,50%,70%{-webkit-transform:translate3d(-4px,0,0);transform:translate3d(-4px,0,0)}40%,60%{-webkit-transform:translate3d(4px,0,0);transform:translate3d(4px,0,0)}}.swagger-ui textarea{font-size:12px;width:100%;min-height:280px;padding:10px;border:none;border-radius:4px;outline:none;background:hsla(0,0%,100%,.8);font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui textarea:focus{border:2px solid #61affe}.swagger-ui textarea.curl{font-size:12px;min-height:100px;margin:0;padding:10px;resize:none;border-radius:4px;background:#41444e;font-family:Source Code Pro,monospace;font-weight:600;color:#fff}.swagger-ui .checkbox{padding:5px 0 10px;transition:opacity .5s;color:#333}.swagger-ui .checkbox label{display:-webkit-box;display:-ms-flexbox;display:flex}.swagger-ui .checkbox p{font-weight:400!important;font-style:italic;margin:0!important;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui .checkbox input[type=checkbox]{display:none}.swagger-ui .checkbox input[type=checkbox]+label>.item{position:relative;top:3px;display:inline-block;width:16px;height:16px;margin:0 8px 0 0;padding:5px;cursor:pointer;border-radius:1px;background:#e8e8e8;box-shadow:0 0 0 2px #e8e8e8;-webkit-box-flex:0;-ms-flex:none;flex:none}.swagger-ui .checkbox input[type=checkbox]+label>.item:active{-webkit-transform:scale(.9);transform:scale(.9)}.swagger-ui .checkbox input[type=checkbox]:checked+label>.item{background:#e8e8e8 url("data:image/svg+xml;charset=utf-8,%3Csvg width='10' height='8' viewBox='3 7 10 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%2341474E' fill-rule='evenodd' d='M6.333 15L3 11.667l1.333-1.334 2 2L11.667 7 13 8.333z'/%3E%3C/svg%3E") 50% no-repeat}.swagger-ui .dialog-ux{position:fixed;z-index:9999;top:0;right:0;bottom:0;left:0}.swagger-ui .dialog-ux .backdrop-ux{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.8)}.swagger-ui .dialog-ux .modal-ux{position:absolute;z-index:9999;top:50%;left:50%;width:100%;min-width:300px;max-width:650px;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);border:1px solid #ebebeb;border-radius:4px;background:#fff;box-shadow:0 10px 30px 0 rgba(0,0,0,.2)}.swagger-ui .dialog-ux .modal-ux-content{overflow-y:auto;max-height:540px;padding:20px}.swagger-ui .dialog-ux .modal-ux-content p{font-size:12px;margin:0 0 5px;color:#41444e;font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .dialog-ux .modal-ux-content h4{font-size:18px;font-weight:600;margin:15px 0 0;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .dialog-ux .modal-ux-header{display:-webkit-box;display:-ms-flexbox;display:flex;padding:12px 0;border-bottom:1px solid #ebebeb;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.swagger-ui .dialog-ux .modal-ux-header .close-modal{padding:0 10px;border:none;background:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.swagger-ui .dialog-ux .modal-ux-header h3{font-size:20px;font-weight:600;margin:0;padding:0 20px;-webkit-box-flex:1;-ms-flex:1;flex:1;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .model{font-size:12px;font-weight:300;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui .model-toggle{font-size:10px;position:relative;top:6px;display:inline-block;margin:auto .3em;cursor:pointer;transition:-webkit-transform .15s ease-in;transition:transform .15s ease-in;transition:transform .15s ease-in,-webkit-transform .15s ease-in;-webkit-transform:rotate(90deg);transform:rotate(90deg);-webkit-transform-origin:50% 50%;transform-origin:50% 50%}.swagger-ui .model-toggle.collapsed{-webkit-transform:rotate(0deg);transform:rotate(0deg)}.swagger-ui .model-toggle:after{display:block;width:20px;height:20px;content:"";background:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z'/%3E%3C/svg%3E") 50% no-repeat;background-size:100%}.swagger-ui .model-jump-to-path{position:relative;cursor:pointer}.swagger-ui .model-jump-to-path .view-line-link{position:absolute;top:-.4em;cursor:pointer}.swagger-ui .model-title{position:relative}.swagger-ui .model-title:hover .model-hint{visibility:visible}.swagger-ui .model-hint{position:absolute;top:-1.8em;visibility:hidden;padding:.1em .5em;white-space:nowrap;color:#ebebeb;border-radius:4px;background:rgba(0,0,0,.7)}.swagger-ui section.models{margin:30px 0;border:1px solid rgba(59,65,81,.3);border-radius:4px}.swagger-ui section.models.is-open{padding:0 0 20px}.swagger-ui section.models.is-open h4{margin:0 0 5px;border-bottom:1px solid rgba(59,65,81,.3)}.swagger-ui section.models.is-open h4 svg{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.swagger-ui section.models h4{font-size:16px;display:-webkit-box;display:-ms-flexbox;display:flex;margin:0;padding:10px 20px 10px 10px;cursor:pointer;transition:all .2s;font-family:Titillium Web,sans-serif;color:#777;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.swagger-ui section.models h4 svg{transition:all .4s}.swagger-ui section.models h4 span{-webkit-box-flex:1;-ms-flex:1;flex:1}.swagger-ui section.models h4:hover{background:rgba(0,0,0,.02)}.swagger-ui section.models h5{font-size:16px;margin:0 0 10px;font-family:Titillium Web,sans-serif;color:#777}.swagger-ui section.models .model-jump-to-path{position:relative;top:5px}.swagger-ui section.models .model-container{margin:0 20px 15px;transition:all .5s;border-radius:4px;background:rgba(0,0,0,.05)}.swagger-ui section.models .model-container:hover{background:rgba(0,0,0,.07)}.swagger-ui section.models .model-container:first-of-type{margin:20px}.swagger-ui section.models .model-container:last-of-type{margin:0 20px}.swagger-ui section.models .model-box{background:none}.swagger-ui .model-box{padding:10px;border-radius:4px;background:rgba(0,0,0,.1)}.swagger-ui .model-box .model-jump-to-path{position:relative;top:4px}.swagger-ui .model-title{font-size:16px;font-family:Titillium Web,sans-serif;color:#555}.swagger-ui span>span.model,.swagger-ui span>span.model .brace-close{padding:0 0 0 10px}.swagger-ui .prop-type{color:#55a}.swagger-ui .prop-enum{display:block}.swagger-ui .prop-format{color:#999}.swagger-ui table{width:100%;padding:0 10px;border-collapse:collapse}.swagger-ui table.model tbody tr td{padding:0;vertical-align:top}.swagger-ui table.model tbody tr td:first-of-type{width:100px;padding:0}.swagger-ui table.headers td{font-size:12px;font-weight:300;vertical-align:middle;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui table tbody tr td{padding:10px 0 0;vertical-align:top}.swagger-ui table tbody tr td:first-of-type{width:20%;padding:10px 0}.swagger-ui table thead tr td,.swagger-ui table thead tr th{font-size:12px;font-weight:700;padding:12px 0;text-align:left;border-bottom:1px solid rgba(59,65,81,.2);font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .parameters-col_description p{font-size:14px;margin:0;font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .parameters-col_description input[type=text]{width:100%;max-width:340px}.swagger-ui .parameter__name{font-size:16px;font-weight:400;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .parameter__name.required{font-weight:700}.swagger-ui .parameter__name.required:after{font-size:10px;position:relative;top:-6px;padding:5px;content:"required";color:rgba(255,0,0,.6)}.swagger-ui .parameter__in{font-size:12px;font-style:italic;font-family:Source Code Pro,monospace;font-weight:600;color:#888}.swagger-ui .table-container{padding:20px}.swagger-ui .topbar{padding:8px 30px;background-color:#89bf04}.swagger-ui .topbar .topbar-wrapper{-ms-flex-align:center}.swagger-ui .topbar .topbar-wrapper,.swagger-ui .topbar a{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;align-items:center}.swagger-ui .topbar a{font-size:1.5em;font-weight:700;max-width:300px;text-decoration:none;-webkit-box-flex:1;-ms-flex:1;flex:1;-ms-flex-align:center;font-family:Titillium Web,sans-serif;color:#fff}.swagger-ui .topbar a span{margin:0;padding:0 10px}.swagger-ui .topbar .download-url-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:3;-ms-flex:3;flex:3}.swagger-ui .topbar .download-url-wrapper input[type=text]{width:100%;min-width:350px;margin:0;border:2px solid #547f00;border-radius:4px 0 0 4px;outline:none}.swagger-ui .topbar .download-url-wrapper .download-url-button{font-size:16px;font-weight:700;padding:4px 40px;border:none;border-radius:0 4px 4px 0;background:#547f00;font-family:Titillium Web,sans-serif;color:#fff}.swagger-ui .info{margin:50px 0}.swagger-ui .info hgroup.main{margin:0 0 20px}.swagger-ui .info hgroup.main a{font-size:12px}.swagger-ui .info li,.swagger-ui .info p,.swagger-ui .info table{font-size:14px;font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .info h1,.swagger-ui .info h2,.swagger-ui .info h3,.swagger-ui .info h4,.swagger-ui .info h5{font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .info code{padding:3px 5px;border-radius:4px;background:rgba(0,0,0,.05);font-family:Source Code Pro,monospace;font-weight:600;color:#9012fe}.swagger-ui .info a{font-size:14px;transition:all .4s;font-family:Open Sans,sans-serif;color:#4990e2}.swagger-ui .info a:hover{color:#1f69c0}.swagger-ui .info>div{margin:0 0 5px}.swagger-ui .info .base-url{font-size:12px;font-weight:300!important;margin:0;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui .info .title{font-size:36px;margin:0;font-family:Open Sans,sans-serif;color:#3b4151}.swagger-ui .info .title small{font-size:10px;position:relative;top:-5px;display:inline-block;margin:0 0 0 5px;padding:2px 4px;vertical-align:super;border-radius:57px;background:#7d8492}.swagger-ui .info .title small pre{margin:0;font-family:Titillium Web,sans-serif;color:#fff}.swagger-ui .auth-btn-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;padding:10px 0;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.swagger-ui .auth-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.swagger-ui .auth-wrapper .authorize{padding-right:20px}.swagger-ui .auth-container{margin:0 0 10px;padding:10px 20px;border-bottom:1px solid #ebebeb}.swagger-ui .auth-container:last-of-type{margin:0;padding:10px 20px;border:0}.swagger-ui .auth-container h4{margin:5px 0 15px!important}.swagger-ui .auth-container .wrapper{margin:0;padding:0}.swagger-ui .auth-container input[type=password],.swagger-ui .auth-container input[type=text]{min-width:230px}.swagger-ui .auth-container .errors{font-size:12px;padding:10px;border-radius:4px;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui .scopes h2{font-size:14px;font-family:Titillium Web,sans-serif;color:#3b4151}.swagger-ui .scope-def{padding:0 0 20px}.swagger-ui .errors-wrapper{margin:20px;padding:10px 20px;-webkit-animation:scaleUp .5s;animation:scaleUp .5s;border:2px solid #f93e3e;border-radius:4px;background:rgba(249,62,62,.1)}.swagger-ui .errors-wrapper .error-wrapper{margin:0 0 10px}.swagger-ui .errors-wrapper .errors h4{font-size:14px;margin:0;font-family:Source Code Pro,monospace;font-weight:600;color:#3b4151}.swagger-ui .errors-wrapper .errors small{color:#666}.swagger-ui .errors-wrapper hgroup{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.swagger-ui .errors-wrapper hgroup h4{font-size:20px;margin:0;-webkit-box-flex:1;-ms-flex:1;flex:1;font-family:Titillium Web,sans-serif;color:#3b4151}@-webkit-keyframes scaleUp{0%{-webkit-transform:scale(.8);transform:scale(.8);opacity:0}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes scaleUp{0%{-webkit-transform:scale(.8);transform:scale(.8);opacity:0}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}.swagger-ui .Resizer.vertical.disabled{display:none} +/*# sourceMappingURL=swagger-ui.css.map*/ \ No newline at end of file diff --git a/fineract-provider/src/main/resources/swagger-ui/swagger-ui.css.map b/fineract-provider/src/main/resources/swagger-ui/swagger-ui.css.map new file mode 100644 index 000000000..dbf47ea6d --- /dev/null +++ b/fineract-provider/src/main/resources/swagger-ui/swagger-ui.css.map @@ -0,0 +1 @@ +{"version":3,"file":"swagger-ui.css","sources":[],"mappings":"","sourceRoot":""} \ No newline at end of file diff --git a/fineract-provider/src/main/resources/swagger-ui/swagger-ui.js b/fineract-provider/src/main/resources/swagger-ui/swagger-ui.js new file mode 100644 index 000000000..e005fe943 --- /dev/null +++ b/fineract-provider/src/main/resources/swagger-ui/swagger-ui.js @@ -0,0 +1,15 @@ +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("babel-polyfill"),require("deep-extend"),require("redux"),require("immutable"),require("redux-immutable"),require("serialize-error"),require("base64-js"),require("ieee754"),require("isarray"),require("shallowequal"),require("xml"),require("memoizee"),require("reselect"),require("js-yaml"),require("url-parse"),require("react"),require("react-dom"),require("react-redux"),require("yaml-js"),require("swagger-client"),require("react-split-pane"),require("react-immutable-proptypes"),require("react-addons-shallow-compare"),require("react-collapse"),require("react-remarkable"),require("sanitize-html")):"function"==typeof define&&define.amd?define(["babel-polyfill","deep-extend","redux","immutable","redux-immutable","serialize-error","base64-js","ieee754","isarray","shallowequal","xml","memoizee","reselect","js-yaml","url-parse","react","react-dom","react-redux","yaml-js","swagger-client","react-split-pane","react-immutable-proptypes","react-addons-shallow-compare","react-collapse","react-remarkable","sanitize-html"],t):"object"==typeof exports?exports.SwaggerUICore=t(require("babel-polyfill"),require("deep-extend"),require("redux"),require("immutable"),require("redux-immutable"),require("serialize-error"),require("base64-js"),require("ieee754"),require("isarray"),require("shallowequal"),require("xml"),require("memoizee"),require("reselect"),require("js-yaml"),require("url-parse"),require("react"),require("react-dom"),require("react-redux"),require("yaml-js"),require("swagger-client"),require("react-split-pane"),require("react-immutable-proptypes"),require("react-addons-shallow-compare"),require("react-collapse"),require("react-remarkable"),require("sanitize-html")):e.SwaggerUICore=t(e["babel-polyfill"],e["deep-extend"],e.redux,e.immutable,e["redux-immutable"],e["serialize-error"],e["base64-js"],e.ieee754,e.isarray,e.shallowequal,e.xml,e.memoizee,e.reselect,e["js-yaml"],e["url-parse"],e.react,e["react-dom"],e["react-redux"],e["yaml-js"],e["swagger-client"],e["react-split-pane"],e["react-immutable-proptypes"],e["react-addons-shallow-compare"],e["react-collapse"],e["react-remarkable"],e["sanitize-html"])}(this,function(e,t,r,n,o,a,u,i,s,l,c,f,p,d,h,y,m,v,b,g,_,E,w,j,P,O){return function(e){function t(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return e[n].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var r={};return t.m=e,t.c=r,t.p="/dist",t(0)}(function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))switch(typeof e[t]){case"function":break;case"object":e[t]=function(t){var r=t.slice(1),n=e[t[0]];return function(e,t,o){n.apply(this,[e,t,o].concat(r))}}(e[t]);break;default:e[t]=e[e[t]]}return e}([function(e,t,r){r(1),r(2),e.exports=r(3)},function(e,t){e.exports=require("babel-polyfill")},function(e,t){},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function o(e){return e&&e.__esModule?e:{default:e}}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u=r(4),i=o(u),s=r(5),l=o(s),c=r(11),f=o(c),p=r(157),d=o(p),h=r(316),y=n(h),m=r(12),v=["url","spec","validatorUrl","onComplete","onFailure","authorizations","docExpansion","apisSorter","operationsSorter","supportedSubmitMethods","dom_id","defaultModelRendering","oauth2RedirectUrl","showRequestHeaders","custom","modelPropertyMacro","parameterMacro","displayOperationId"],b={PACKAGE_VERSION:"3.0.16",GIT_COMMIT:"gafcb7d3",GIT_DIRTY:!1},g=b.GIT_DIRTY,_=b.GIT_COMMIT,E=b.PACKAGE_VERSION;e.exports=function(e){f.default.versions=f.default.versions||{},f.default.versions.swaggerUi=E+"/"+(_||"unknown")+(g?"-dirty":"");var t={dom_id:null,spec:{},url:"",layout:"BaseLayout",docExpansion:"list",validatorUrl:"https://online.swagger.io/validator",configs:{},custom:{},displayOperationId:!1,presets:[],plugins:[],fn:{},components:{},state:{},store:{}},r=(0,i.default)({},t,e),n=(0,i.default)({},r.store,{system:{configs:r.configs},plugins:r.presets,state:{layout:{layout:r.layout},spec:{spec:"",url:r.url}}}),o=function(){return{fn:r.fn,components:r.components,state:r.state}},u=new l.default(n);u.register([r.plugins,o]);var s=u.getSystem(),c=(0,m.parseSeach)();s.initOAuth=s.authActions.configureAuth;var p=function(e){if("object"!==("undefined"==typeof r?"undefined":a(r)))return s;var t=s.specSelectors.getLocalConfig?s.specSelectors.getLocalConfig():{},n=(0,i.default)({},t,r,e||{},c);return u.setConfigs((0,m.filterConfigs)(n,v)),null!==e&&(!c.url&&"object"===a(n.spec)&&Object.keys(n.spec).length?(s.specActions.updateUrl(""),s.specActions.updateLoadingStatus("success"),s.specActions.updateSpec(JSON.stringify(n.spec))):s.specActions.download&&n.url&&(s.specActions.updateUrl(n.url),s.specActions.download(n.url))),n.dom_id?s.render(n.dom_id,"App"):console.error("Skipped rendering: no `dom_id` was specified"),s},d=c.config||r.configUrl;if(!d||!s.specActions.getConfigByUrl||s.specActions.getConfigByUrl&&!s.specActions.getConfigByUrl(d,p))return p()},e.exports.presets={apis:d.default},e.exports.plugins=y},function(e,t){e.exports=require("deep-extend")},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t,r){var n=[(0,O.systemThunkMiddleware)(r)],o=P.default.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||h.compose;return(0,h.createStore)(e,t,o(h.applyMiddleware.apply(void 0,n)))}function i(e,t){return(0,O.isObject)(e)&&!(0,O.isArray)(e)?e:(0,O.isFunc)(e)?i(e(t),t):(0,O.isArray)(e)?e.map(function(e){return i(e,t)}).reduce(s,{}):{}}function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(0,O.isObject)(e))return{};if(!(0,O.isObject)(t))return e;var r=e.statePlugins;if((0,O.isObject)(r))for(var n in r){var o=r[n];if((0,O.isObject)(o)&&(0,O.isObject)(o.wrapActions)){var a=o.wrapActions;for(var u in a){var i=a[u];Array.isArray(i)||(i=[i],a[u]=i),t&&t.statePlugins&&t.statePlugins[n]&&t.statePlugins[n].wrapActions&&t.statePlugins[n].wrapActions[u]&&(t.statePlugins[n].wrapActions[u]=a[u].concat(t.statePlugins[n].wrapActions[u]))}}}return(0,b.default)(e,t)}function l(e){var t=(0,O.objMap)(e,function(e){return e.reducers});return c(t)}function c(e){var t=Object.keys(e).reduce(function(t,r){return t[r]=f(e[r]),t},{});return Object.keys(t).length?(0,g.combineReducers)(t):T}function f(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new y.Map,r=arguments[1];if(!e)return t;var n=e[r.type];return n?n(t,r):t}}function p(e,t,r){var n=u(e,t,r);return n}Object.defineProperty(t,"__esModule",{value:!0});var d=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};a(this,e),(0,b.default)(this,{state:{},plugins:[],system:{configs:{},fn:{},components:{},rootInjects:{},statePlugins:{}},boundSystem:{},toolbox:{}},t),this.getSystem=this._getSystem.bind(this),this.store=p(T,(0,y.fromJS)(this.state),this.getSystem),this.buildSystem(!1),this.register(this.plugins)}return d(e,[{key:"getStore",value:function(){return this.store}},{key:"register",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=i(e,this.getSystem());s(this.system,r),t&&this.buildSystem()}},{key:"buildSystem",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.getStore().dispatch,r=this.getStore().getState;this.boundSystem=Object.assign({},this.getRootInjects(),this.getWrappedAndBoundActions(t),this.getBoundSelectors(r,this.getSystem),this.getStateThunks(r),this.getFn(),this.getConfigs()),e&&this.rebuildReducer()}},{key:"_getSystem",value:function(){return this.boundSystem}},{key:"getRootInjects",value:function(){return Object.assign({getSystem:this.getSystem,getStore:this.getStore.bind(this),getComponents:this.getComponents.bind(this),getState:this.getStore().getState,getConfigs:this._getConfigs.bind(this),Im:m.default},this.system.rootInjects||{})}},{key:"_getConfigs",value:function(){return this.system.configs}},{key:"getConfigs",value:function(){return{configs:this.system.configs}}},{key:"setConfigs",value:function(e){this.system.configs=e}},{key:"rebuildReducer",value:function(){this.store.replaceReducer(l(this.system.statePlugins))}},{key:"getType",value:function(e){var t=e[0].toUpperCase()+e.slice(1);return(0,O.objReduce)(this.system.statePlugins,function(r,n){var a=r[e];if(a)return o({},n+t,a)})}},{key:"getSelectors",value:function(){return this.getType("selectors")}},{key:"getActions",value:function(){var e=this.getType("actions");return(0,O.objMap)(e,function(e){return(0,O.objReduce)(e,function(e,t){if((0,O.isFn)(e))return o({},t,e)})})}},{key:"getWrappedAndBoundActions",value:function(e){var t=this,r=this.getBoundActions(e);return(0,O.objMap)(r,function(e,r){var n=t.system.statePlugins[r.slice(0,-7)].wrapActions;return n?(0,O.objMap)(e,function(e,r){var o=n[r];return o?(Array.isArray(o)||(o=[o]),o.reduce(function(e,r){var n=function(){return r(e,t.getSystem()).apply(void 0,arguments)};if(!(0,O.isFn)(n))throw new TypeError("wrapActions needs to return a function that returns a new function (ie the wrapped action)");return n},e||Function.prototype)):e}):e})}},{key:"getStates",value:function(e){return Object.keys(this.system.statePlugins).reduce(function(t,r){return t[r]=e.get(r),t},{})}},{key:"getStateThunks",value:function(e){return Object.keys(this.system.statePlugins).reduce(function(t,r){return t[r]=function(){return e().get(r)},t},{})}},{key:"getFn",value:function(){return{fn:this.system.fn}}},{key:"getComponents",value:function(e){return"undefined"!=typeof e?this.system.components[e]:this.system.components}},{key:"getBoundSelectors",value:function(e,t){return(0,O.objMap)(this.getSelectors(),function(r,n){var o=[n.slice(0,-9)],a=function(){return e().getIn(o)};return(0,O.objMap)(r,function(e){return function(){for(var r=arguments.length,n=Array(r),o=0;o0&&void 0!==arguments[0]?arguments[0]:{};return{type:y,payload:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.CLEAR=t.NEW_AUTH_ERR=t.NEW_SPEC_ERR=t.NEW_THROWN_ERR_BATCH=t.NEW_THROWN_ERR=void 0,t.newThrownErr=o,t.newThrownErrBatch=a,t.newSpecErr=u,t.newAuthErr=i,t.clear=s;var l=r(9),c=n(l),f=t.NEW_THROWN_ERR="err_new_thrown_err",p=t.NEW_THROWN_ERR_BATCH="err_new_thrown_err_batch",d=t.NEW_SPEC_ERR="err_new_spec_err",h=t.NEW_AUTH_ERR="err_new_auth_err",y=t.CLEAR="err_clear"},function(e,t){"use strict";function r(){var e={location:{},history:{},open:function(){},close:function(){},File:function(){}};if("undefined"==typeof window)return e;try{e=window;var t=["File","Blob","FormData"],r=!0,n=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var i=a.value;i in window&&(e[i]=window[i])}}catch(e){n=!0,o=e}finally{try{!r&&u.return&&u.return()}finally{if(n)throw o}}}catch(e){console.error(e)}return e}e.exports=r()},function(e,t,r){(function(e){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){return c(e)?V(e)?e.toObject():e:{}}function a(e){return e?e.toArray?e.toArray():s(e):[]}function u(e){return V(e)?e:e instanceof F.default.File?e:c(e)?Array.isArray(e)?S.default.Seq(e).map(u).toList():S.default.Seq(e).map(u).toOrderedMap():e}function i(e,t){var r={};return Object.keys(e).filter(function(t){return"function"==typeof e[t]}).forEach(function(n){return r[n]=e[n].bind(null,t)}),r}function s(e){return Array.isArray(e)?e:[e]}function l(e){return"function"==typeof e}function c(e){return!!e&&"object"===("undefined"==typeof e?"undefined":O(e))}function f(e){return"function"==typeof e}function p(e){return Array.isArray(e)}function d(e,t){return Object.keys(e).reduce(function(r,n){return r[n]=t(e[n],n),r},{})}function h(e,t){return Object.keys(e).reduce(function(r,n){var o=t(e[n],n);return o&&"object"===("undefined"==typeof o?"undefined":O(o))&&Object.assign(r,o),r},{})}function y(e){return function(t){t.dispatch,t.getState;return function(t){return function(r){return"function"==typeof r?r(e()):t(r)}}}}function m(e){var t=e.keySeq();return t.contains(J)?J:t.filter(function(e){return"2"===(e+"")[0]}).sort().first()}function v(e,t){if(!S.default.Iterable.isIterable(e))return S.default.List();var r=e.getIn(Array.isArray(t)?t:[t]);return S.default.List.isList(r)?r:S.default.List()}function b(e){var t,r,n,o,a,u,i,s,l,c,f,p;for(c=/(>)(<)(\/*)/g,p=/[ ]*(.*)[ ]+\n/g,t=/(<.+>)(.+\n)/g,e=e.replace(/\r\n/g,"\n").replace(c,"$1\n$2$3").replace(p,"$1\n").replace(t,"$1\n$2"),n="",s=e.split("\n"),o=0,u="other",f={"single->single":0,"single->closing":-1,"single->opening":0,"single->other":0,"closing->single":0,"closing->closing":-1,"closing->opening":0,"closing->other":0,"opening->single":1,"opening->closing":0,"opening->opening":1,"opening->other":1,"other->single":0,"other->closing":-1,"other->opening":0,"other->other":0},r=function(e){var t,r,a,i,s,l;s={single:Boolean(e.match(/<.+\/>/)),closing:Boolean(e.match(/<\/.+>/)),opening:Boolean(e.match(/<[^!?].*>/))},i=function(){var e;e=[];for(r in s)l=s[r],l&&e.push(r);return e}()[0],i=void 0===i?"other":i,t=u+"->"+i,u=i,a="",o+=f[t],a=function(){var e,t,r,n;for(r=[],n=e=0,t=o;0<=t?et;n=0<=t?++e:--e)r.push(" ");return r}().join(""),"opening->closing"===t?n=n.substr(0,n.length-1)+e+"\n":n+=a+e+"\n"},a=0,i=s.length;at)return e.textContent;var a=function(e){for(var t,a,u,i,s,l=e.textContent,c=0,f=l[0],p=1,d=e.innerHTML="",h=0;a=t,t=h<7&&"\\"==t?1:p;){if(p=f,f=l[++c],i=d.length>1,!p||h>8&&"\n"==p||[/\S/[o](p),1,1,!/[$\w]/[o](p),("/"==t||"\n"==t)&&i,'"'==t&&i,"'"==t&&i,l[c-4]+a+t=="-->",a+t=="*/"][h])for(d&&(e[n](s=r.createElement("span")).setAttribute("style",["color: #555; font-weight: bold;","","","color: #555;",""][h?h<3?2:h>6?4:h>3?3:+/^(a(bstract|lias|nd|rguments|rray|s(m|sert)?|uto)|b(ase|egin|ool(ean)?|reak|yte)|c(ase|atch|har|hecked|lass|lone|ompl|onst|ontinue)|de(bugger|cimal|clare|f(ault|er)?|init|l(egate|ete)?)|do|double|e(cho|ls?if|lse(if)?|nd|nsure|num|vent|x(cept|ec|p(licit|ort)|te(nds|nsion|rn)))|f(allthrough|alse|inal(ly)?|ixed|loat|or(each)?|riend|rom|unc(tion)?)|global|goto|guard|i(f|mp(lements|licit|ort)|n(it|clude(_once)?|line|out|stanceof|t(erface|ernal)?)?|s)|l(ambda|et|ock|ong)|m(icrolight|odule|utable)|NaN|n(amespace|ative|ext|ew|il|ot|ull)|o(bject|perator|r|ut|verride)|p(ackage|arams|rivate|rotected|rotocol|ublic)|r(aise|e(adonly|do|f|gister|peat|quire(_once)?|scue|strict|try|turn))|s(byte|ealed|elf|hort|igned|izeof|tatic|tring|truct|ubscript|uper|ynchronized|witch)|t(emplate|hen|his|hrows?|ransient|rue|ry|ype(alias|def|id|name|of))|u(n(checked|def(ined)?|ion|less|signed|til)|se|sing)|v(ar|irtual|oid|olatile)|w(char_t|hen|here|hile|ith)|xor|yield)$/[o](d):0]),s[n](r.createTextNode(d))),u=h&&h<7?h:u,d="",h=11;![1,/[\/{}[(\-+*=<>:;|\\.,?!&@~]/[o](p),/[\])]/[o](p),/[$\w]/[o](p),"/"==p&&u<2&&"<"!=t,'"'==p,"'"==p,p+f+l[c+1]+l[c+2]=="':null;var n=e.$$ref.match(/\S*\/(\S+)$/);e.xml.name=n[1]}return(0,L.memoizedCreateXMLExample)(e,r)}return JSON.stringify((0,L.memoizedSampleFromSchema)(e,r),null,2)},t.parseSeach=function(){var e={},t=window.location.search;if(""!=t){var r=t.substr(1).split("&");for(var n in r)n=r[n].split("="),e[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}return e},t.btoa=function(t){var r=void 0;return r=t instanceof e?t:new e(t.toString(),"utf-8"),r.toString("base64")},t.sorters={operationsSorter:{alpha:function(e,t){return e.get("path").localeCompare(t.get("path"))},method:function(e,t){return e.get("method").localeCompare(t.get("method"))}}},t.buildFormData=function(e){var t=[];for(var r in e){var n=e[r];void 0!==n&&""!==n&&t.push([r,"=",encodeURIComponent(n).replace(/%20/g,"+")].join(""))}return t.join("&")},t.filterConfigs=function(e,t){var r=void 0,n={};for(r in e)t.indexOf(r)!==-1&&(n[r]=e[r]);return n}}).call(t,r(13).Buffer)},function(e,t,r){(function(e){/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +"use strict";function n(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}function o(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(o()=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function m(e){return+e!=e&&(e=0),u.alloc(+e)}function v(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return W(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return $(e).length;default:if(n)return W(e).length;t=(""+t).toLowerCase(),n=!0}}function b(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return q(this,t,r);case"utf8":case"utf-8":return C(this,t,r);case"ascii":return R(this,t,r);case"latin1":case"binary":return k(this,t,r);case"base64":return x(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function g(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function _(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:E(e,t,r,n,o);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):E(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function E(e,t,r,n,o){function a(e,t){return 1===u?e[t]:e.readUInt16BE(t*u)}var u=1,i=e.length,s=t.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;u=2,i/=2,s/=2,r/=2}var l;if(o){var c=-1;for(l=r;li&&(r=i-s),l=r;l>=0;l--){for(var f=!0,p=0;po&&(n=o)):n=o;var a=t.length;if(a%2!==0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var u=0;u239?4:a>223?3:a>191?2:1;if(o+i<=r){var s,l,c,f;switch(i){case 1:a<128&&(u=a);break;case 2:s=e[o+1],128===(192&s)&&(f=(31&a)<<6|63&s,f>127&&(u=f));break;case 3:s=e[o+1],l=e[o+2],128===(192&s)&&128===(192&l)&&(f=(15&a)<<12|(63&s)<<6|63&l,f>2047&&(f<55296||f>57343)&&(u=f));break;case 4:s=e[o+1],l=e[o+2],c=e[o+3],128===(192&s)&&128===(192&l)&&128===(192&c)&&(f=(15&a)<<18|(63&s)<<12|(63&l)<<6|63&c,f>65535&&f<1114112&&(u=f))}}null===u?(u=65533,i=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),o+=i}return A(n)}function A(e){var t=e.length;if(t<=ee)return String.fromCharCode.apply(String,e);for(var r="",n=0;nn)&&(r=n);for(var o="",a=t;ar)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,r,n,o,a){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function U(e,t,r,n){t<0&&(t=65535+t+1);for(var o=0,a=Math.min(e.length-r,2);o>>8*(n?o:1-o)}function z(e,t,r,n){t<0&&(t=4294967295+t+1);for(var o=0,a=Math.min(e.length-r,4);o>>8*(n?o:3-o)&255}function D(e,t,r,n,o,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(e,t,r,n,o){return o||D(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),Z.write(e,t,r,n,23,4),r+4}function B(e,t,r,n,o){return o||D(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),Z.write(e,t,r,n,52,8),r+8}function F(e){if(e=J(e).replace(te,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function J(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function V(e){return e<16?"0"+e.toString(16):e.toString(16)}function W(e,t){t=t||1/0;for(var r,n=e.length,o=null,a=[],u=0;u55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(u+1===n){(t-=3)>-1&&a.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),o=r;continue}r=(o-55296<<10|r-56320)+65536}else o&&(t-=3)>-1&&a.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function H(e){for(var t=[],r=0;r>8,o=r%256,a.push(o),a.push(n);return a}function $(e){return G.toByteArray(F(e))}function K(e,t,r,n){for(var o=0;o=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function X(e){return e!==e}var G=r(14),Z=r(15),Q=r(16);t.Buffer=u,t.SlowBuffer=m,t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:n(),t.kMaxLength=o(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,r){return i(null,e,t,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,r){return l(null,e,t,r)},u.allocUnsafe=function(e){return c(null,e)},u.allocUnsafeSlow=function(e){return c(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,o=0,a=Math.min(r,n);o0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),""},u.prototype.compare=function(e,t,r,n,o){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,o>>>=0,this===e)return 0;for(var a=o-n,i=r-t,s=Math.min(a,i),l=this.slice(n,o),c=e.slice(t,r),f=0;fo)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return j(this,e,t,r);case"ascii":return P(this,e,t,r);case"latin1":case"binary":return O(this,e,t,r);case"base64":return T(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ee=4096;u.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),t0&&(o*=256);)n+=this[e+--t]*o;return n},u.prototype.readUInt8=function(e,t){return t||N(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||N(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||N(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||N(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||N(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||N(e,t,this.length);for(var n=this[e],o=1,a=0;++a=o&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||N(e,t,this.length);for(var n=t,o=1,a=this[e+--n];n>0&&(o*=256);)a+=this[e+--n]*o;return o*=128,a>=o&&(a-=Math.pow(2,8*t)),a},u.prototype.readInt8=function(e,t){return t||N(e,1,this.length),128&this[e]?(255-this[e]+1)*-1:this[e]},u.prototype.readInt16LE=function(e,t){t||N(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){t||N(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return t||N(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||N(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||N(e,4,this.length),Z.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||N(e,4,this.length),Z.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||N(e,8,this.length),Z.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||N(e,8,this.length),Z.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t|=0,r|=0,!n){var o=Math.pow(2,8*r)-1;I(this,e,t,r,o,0)}var a=1,u=0;for(this[t]=255&e;++u=0&&(u*=256);)this[t+a]=e/u&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):U(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):U(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):z(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):z(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);I(this,e,t,r,o-1,-o)}var a=0,u=1,i=0;for(this[t]=255&e;++a>0)-i&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var o=Math.pow(2,8*r-1);I(this,e,t,r,o-1,-o)}var a=r-1,u=1,i=0;for(this[t+a]=255&e;--a>=0&&(u*=256);)e<0&&0===i&&0!==this[t+a+1]&&(i=1),this[t+a]=(e/u>>0)-i&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):U(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):U(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):z(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):z(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return B(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return B(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--o)e[o+t]=this[o+r];else if(a<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var a;if("number"==typeof e)for(a=t;a=n?e:o(e,t,r)}var o=r(35);e.exports=n},function(e,t){function r(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),r=r>o?o:r,r<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(o);++n-1}var o=r(70);e.exports=n},function(e,t,r){function n(e,t){var r=this.__data__,n=o(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var o=r(70);e.exports=n},function(e,t,r){var n=r(55),o=r(23),a=n(o,"Map");e.exports=a},function(e,t,r){function n(e){var t=o(this,e).delete(e);return this.size-=t?1:0,t}var o=r(77);e.exports=n},function(e,t,r){function n(e,t){var r=e.__data__;return o(t)?r["string"==typeof t?"string":"hash"]:r.map}var o=r(78);e.exports=n},function(e,t){function r(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}e.exports=r},function(e,t,r){function n(e){return o(this,e).get(e)}var o=r(77);e.exports=n},function(e,t,r){function n(e){return o(this,e).has(e)}var o=r(77);e.exports=n},function(e,t,r){function n(e,t){var r=o(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var o=r(77);e.exports=n},function(e,t,r){function n(e,t,r){var n=i(e)?o:u;return r&&s(e,t,r)&&(t=void 0), +n(e,a(t,3))}var o=r(83),a=r(84),u=r(147),i=r(26),s=r(153);e.exports=n},function(e,t){function r(e,t){for(var r=-1,n=null==e?0:e.length;++rp))return!1;var h=c.get(e);if(h&&c.get(t))return h==t;var y=-1,m=!0,v=r&s?new o:void 0;for(c.set(e,t),c.set(t,e);++y-1&&e%1==0&&e-1&&e%1==0&&e<=n}var n=9007199254740991;e.exports=r},function(e,t){function r(e){return function(t){return e(t)}}e.exports=r},function(e,t,r){(function(e){var n=r(24),o="object"==typeof t&&t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,u=a&&a.exports===o,i=u&&n.process,s=function(){try{return i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=s}).call(t,r(111)(e))},function(e,t,r){function n(e){if(!o(e))return a(e);var t=[];for(var r in Object(e))i.call(e,r)&&"constructor"!=r&&t.push(r);return t}var o=r(120),a=r(121),u=Object.prototype,i=u.hasOwnProperty;e.exports=n},function(e,t){function r(e){var t=e&&e.constructor,r="function"==typeof t&&t.prototype||n;return e===r}var n=Object.prototype;e.exports=r},function(e,t,r){var n=r(122),o=n(Object.keys,Object);e.exports=o},function(e,t){function r(e,t){return function(r){return e(t(r))}}e.exports=r},function(e,t,r){function n(e){return null!=e&&a(e.length)&&!o(e)}var o=r(57),a=r(116);e.exports=n},function(e,t,r){var n=r(125),o=r(75),a=r(126),u=r(127),i=r(128),s=r(28),l=r(61),c="[object Map]",f="[object Object]",p="[object Promise]",d="[object Set]",h="[object WeakMap]",y="[object DataView]",m=l(n),v=l(o),b=l(a),g=l(u),_=l(i),E=s;(n&&E(new n(new ArrayBuffer(1)))!=y||o&&E(new o)!=c||a&&E(a.resolve())!=p||u&&E(new u)!=d||i&&E(new i)!=h)&&(E=function(e){var t=s(e),r=t==f?e.constructor:void 0,n=r?l(r):"";if(n)switch(n){case m:return y;case v:return c;case b:return p;case g:return d;case _:return h}return t}),e.exports=E},function(e,t,r){var n=r(55),o=r(23),a=n(o,"DataView");e.exports=a},function(e,t,r){var n=r(55),o=r(23),a=n(o,"Promise");e.exports=a},function(e,t,r){var n=r(55),o=r(23),a=n(o,"Set");e.exports=a},function(e,t,r){var n=r(55),o=r(23),a=n(o,"WeakMap");e.exports=a},function(e,t,r){function n(e){for(var t=a(e),r=t.length;r--;){var n=t[r],u=e[n];t[r]=[n,u,o(u)]}return t}var o=r(130),a=r(105);e.exports=n},function(e,t,r){function n(e){return e===e&&!o(e)}var o=r(58);e.exports=n},function(e,t){function r(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}e.exports=r},function(e,t,r){function n(e,t){return i(e)&&s(t)?l(c(e),t):function(r){var n=a(r,e);return void 0===n&&n===t?u(r,e):o(t,n,f|p)}}var o=r(93),a=r(133),u=r(140),i=r(136),s=r(130),l=r(131),c=r(139),f=1,p=2;e.exports=n},function(e,t,r){function n(e,t,r){var n=null==e?void 0:o(e,t);return void 0===n?r:n}var o=r(134);e.exports=n},function(e,t,r){function n(e,t){t=o(t,e);for(var r=0,n=t.length;null!=e&&r1&&void 0!==arguments[1]?arguments[1]:{},n=(0,a.objectify)(t),o=n.type,u=n.example,i=n.properties,s=n.additionalProperties,l=n.items,c=r.includeReadOnly;if(void 0!==u)return u;if(!o)if(i)o="object";else{if(!l)return;o="array"}if("object"===o){var p=(0,a.objectify)(i),d={};for(var h in p)p[h].readOnly&&!c||(d[h]=e(p[h],{includeReadOnly:c}));if(s===!0)d.additionalProp1={};else if(s)for(var y=(0,a.objectify)(s),m=e(y,{includeReadOnly:c}),v=1;v<4;v++)d["additionalProp"+v]=m;return d}return"array"===o?[e(l,{includeReadOnly:c})]:t.enum?t.default?t.default:(0,a.normalizeArray)(t.enum)[0]:f(t)},d=(t.inferSchema=function(e){return e.schema&&(e=e.schema),e.properties&&(e.type="object"),e},t.sampleXmlFromSchema=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,a.objectify)(t),o=n.type,u=n.properties,i=n.additionalProperties,s=n.items,l=n.example,c=r.includeReadOnly,p=n.default,d={},h={},y=t.xml,m=y.name,v=y.prefix,b=y.namespace,g=n.enum,_=void 0,E=void 0;if(!o)if(u||i)o="object";else{if(!s)return;o="array"}if(m=m||"notagname",_=(v?v+":":"")+m,b){var w=v?"xmlns:"+v:"xmlns";h[w]=b}if("array"===o&&s){if(s.xml=s.xml||y||{},s.xml.name=s.xml.name||y.name,y.wrapped)return d[_]=[],Array.isArray(l)?l.forEach(function(t){s.example=t,d[_].push(e(s,r))}):Array.isArray(p)?p.forEach(function(t){s.default=t,d[_].push(e(s,r))}):d[_]=[e(s,r)],h&&d[_].push({_attr:h}),d;var j=[];return Array.isArray(l)?(l.forEach(function(t){s.example=t,j.push(e(s,r))}),j):Array.isArray(p)?(p.forEach(function(t){s.default=t,j.push(e(s,r))}),j):e(s,r)}if("object"===o){var P=(0,a.objectify)(u);d[_]=[],l=l||{};for(var O in P)if(!P[O].readOnly||c)if(P[O].xml=P[O].xml||{},P[O].xml.attribute){var T=Array.isArray(P[O].enum)&&P[O].enum[0],S=P[O].example,x=P[O].default;h[P[O].xml.name||O]=void 0!==S&&S||void 0!==l[O]&&l[O]||void 0!==x&&x||T||f(P[O])}else{P[O].xml.name=P[O].xml.name||O,P[O].example=void 0!==P[O].example?P[O].example:l[O];var C=e(P[O]);Array.isArray(C)?d[_]=d[_].concat(C):d[_].push(C)}return i===!0?d[_].push({additionalProp:"Anything can be here"}):i&&d[_].push({additionalProp:f(i)}),h&&d[_].push({_attr:h}),d}return E=void 0!==l?l:void 0!==p?p:Array.isArray(g)?g[0]:f(t),d[_]=h?[{_attr:h},E]:E,d});t.memoizedCreateXMLExample=(0,l.default)(o),t.memoizedSampleFromSchema=(0,l.default)(p)},function(e,t){e.exports=require("xml")},function(e,t){e.exports=require("memoizee")},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(){return[u.default]}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var a=r(158),u=n(a)},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e={components:{App:A.default,authorizationPopup:k.default,authorizeBtn:M.default,authorizeOperationBtn:I.default,auths:z.default,authError:L.default,oauth2:H.default,apiKeyAuth:F.default,basicAuth:V.default,clear:$.default,liveResponse:X.default,info:Te.default,onlineValidatorBadge:Z.default,operations:ee.default,operation:re.default,highlightCode:oe.default,responses:ue.default,response:se.default,responseBody:ce.default,parameters:pe.default,parameterRow:he.default,execute:me.default,headers:be.default,errors:_e.default,contentType:we.default,overview:Pe.default,footer:xe.default,ParamBody:Ae.default,curl:ke.default,schemes:Me.default,modelExample:Ie.default,model:ze.default,models:Le.default,TryItOutButton:Fe.default,Markdown:Ve.default,BaseLayout:He.default}},t={components:$e},r={components:Xe};return[P.default,m.default,p.default,c.default,u.default,s.default,h.default,e,t,_.default,r,w.default,b.default,T.default,x.default]};var a=r(159),u=o(a),i=r(174),s=o(i),l=r(178),c=o(l),f=r(185),p=o(f),d=r(240),h=o(d),y=r(241),m=o(y),v=r(242),b=o(v),g=r(253),_=o(g),E=r(255),w=o(E),j=r(260),P=o(j),O=r(262),T=o(O),S=r(268),x=o(S),C=r(269),A=o(C),R=r(270),k=o(R),q=r(271),M=o(q),N=r(272),I=o(N),U=r(274),z=o(U),D=r(275),L=o(D),B=r(276),F=o(B),J=r(277),V=o(J),W=r(278),H=o(W),Y=r(280),$=o(Y),K=r(281),X=o(K),G=r(282),Z=o(G),Q=r(283),ee=o(Q),te=r(284),re=o(te),ne=r(287),oe=o(ne),ae=r(288),ue=o(ae),ie=r(289),se=o(ie),le=r(290),ce=o(le),fe=r(292),pe=o(fe),de=r(293),he=o(de),ye=r(294),me=o(ye),ve=r(295),be=o(ve),ge=r(296),_e=o(ge),Ee=r(298),we=o(Ee),je=r(299),Pe=o(je),Oe=r(301),Te=o(Oe),Se=r(302),xe=o(Se),Ce=r(303),Ae=o(Ce),Re=r(304),ke=o(Re),qe=r(306),Me=o(qe),Ne=r(307),Ie=o(Ne),Ue=r(308),ze=o(Ue),De=r(309),Le=o(De),Be=r(310),Fe=o(Be),Je=r(311),Ve=o(Je),We=r(314),He=o(We),Ye=r(300),$e=n(Ye),Ke=r(315),Xe=n(Ke)},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return{statePlugins:{err:{reducers:(0,u.default)(e),actions:s,selectors:c}}}};var a=r(160),u=o(a),i=r(10),s=n(i),l=r(172),c=n(l)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;return t={},o(t,a.NEW_THROWN_ERR,function(t,r){var n=r.payload,o=Object.assign(p,n,{type:"thrown"});return t.update("errors",function(e){return(e||(0,s.List)()).push((0,s.fromJS)(o))}).update("errors",function(t){return(0,f.default)(t,e.getSystem())})}),o(t,a.NEW_THROWN_ERR_BATCH,function(t,r){var n=r.payload;return n=n.map(function(e){return(0,s.fromJS)(Object.assign(p,e,{type:"thrown"}))}),t.update("errors",function(e){return(e||(0,s.List)()).concat((0,s.fromJS)(n))}).update("errors",function(t){return(0,f.default)(t,e.getSystem())})}),o(t,a.NEW_SPEC_ERR,function(t,r){var n=r.payload,o=(0,s.fromJS)(n);return o=o.set("type","spec"),t.update("errors",function(e){return(e||(0,s.List)()).push((0,s.fromJS)(o)).sortBy(function(e){return e.get("line")})}).update("errors",function(t){return(0,f.default)(t,e.getSystem())})}),o(t,a.NEW_AUTH_ERR,function(t,r){var n=r.payload,o=(0,s.fromJS)(Object.assign({},n));return o=o.set("type","auth"),t.update("errors",function(e){return(e||(0,s.List)()).push((0,s.fromJS)(o))}).update("errors",function(t){return(0,f.default)(t,e.getSystem())})}),o(t,a.CLEAR,function(e,t){var r=t.payload;if(r){var n=l.default.fromJS((0,i.default)((e.get("errors")||(0,s.List)()).toJS(),r));return e.merge({errors:n})}}),t};var a=r(10),u=r(161),i=n(u),s=r(7),l=n(s),c=r(165),f=n(c),p={line:0,level:"error",message:"Unknown error"}},function(e,t,r){function n(e,t){var r=i(e)?o:a;return r(e,s(u(t,3)))}var o=r(162),a=r(163),u=r(84),i=r(26),s=r(164);e.exports=n},function(e,t){function r(e,t){for(var r=-1,n=null==e?0:e.length,o=0,a=[];++r-1||l.push({name:a(e).replace(".js","").replace("./",""),transform:s(e).transform}))})},function(e,t,r){function n(e,t,r){var n=s(e)?o:i,l=arguments.length<3;return n(e,u(t,4),r,l,a)}var o=r(41),a=r(148),u=r(84),i=r(167),s=r(26);e.exports=n},function(e,t){function r(e,t,r,n,o){return o(e,function(e,o,a){r=n?(n=!1,e):t(r,e,o,a)}),r}e.exports=r},function(e,t,r){function n(e){return r(o(e))}function o(e){return a[e]||function(){throw new Error("Cannot find module '"+e+"'.")}()}var a={"./not-of-type.js":169,"./parameter-oneof.js":170,"./strip-instance.js":171};n.keys=function(){return Object.keys(a)},n.resolve=o,e.exports=n,n.id=168},function(e,t){"use strict";function r(e){return e.map(function(e){var t="is not of a type(s)",r=e.get("message").indexOf(t);if(r>-1){var o=e.get("message").slice(r+t.length).split(",");return e.set("message",e.get("message").slice(0,r)+n(o))}return e})}function n(e){return e.reduce(function(e,t,r,n){return r===n.length-1&&n.length>1?e+"or "+t:n[r+1]&&n.length>2?e+t+", ":n[r+1]?e+t+" ":e+t},"should be a")}Object.defineProperty(t,"__esModule",{value:!0}),t.transform=r},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){t.jsSpec;return e}Object.defineProperty(t,"__esModule",{value:!0}),t.transform=o;var a=r(133);n(a),r(7)},function(e,t){"use strict";function r(e){return e.map(function(e){return e.set("message",n(e.get("message"),"instance."))})}function n(e,t){return e.replace(new RegExp(t,"g"),"")}Object.defineProperty(t,"__esModule",{value:!0}),t.transform=r},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lastError=t.allErrors=void 0;var n=r(7),o=r(173),a=function(e){return e},u=t.allErrors=(0,o.createSelector)(a,function(e){return e.get("errors",(0,n.List)())});t.lastError=(0,o.createSelector)(u,function(e){return e.last()})},function(e,t){e.exports=require("reselect")},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{statePlugins:{layout:{reducers:u.default,actions:s,selectors:c}}}};var a=r(175),u=o(a),i=r(176),s=n(i),l=r(177),c=n(l)},function(e,t,r){"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(t,"__esModule",{value:!0});var o,a=r(176);t.default=(o={},n(o,a.UPDATE_LAYOUT,function(e,t){return e.set("layout",t.payload)}),n(o,a.SHOW,function(e,t){var r=t.payload.thing,n=t.payload.shown;return e.setIn(["shown"].concat(r),n)}),n(o,a.UPDATE_MODE,function(e,t){var r=t.payload.thing,n=t.payload.mode;return e.setIn(["modes"].concat(r),(n||"")+"")}),o)},function(e,t,r){"use strict";function n(e){return{type:i,payload:e}}function o(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e=(0,u.normalizeArray)(e),{type:l,payload:{thing:e,shown:t}}}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e=(0,u.normalizeArray)(e),{type:s,payload:{thing:e,mode:t}}}Object.defineProperty(t,"__esModule",{value:!0}),t.SHOW=t.UPDATE_MODE=t.UPDATE_LAYOUT=void 0,t.updateLayout=n,t.show=o,t.changeMode=a;var u=r(12),i=t.UPDATE_LAYOUT="layout_update_layout",s=t.UPDATE_MODE="layout_update_mode",l=t.SHOW="layout_show"},function(e,t,r){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t2&&void 0!==arguments[2]?arguments[2]:"";return t=(0,a.normalizeArray)(t),e.getIn(["modes"].concat(n(t)),r)},t.showSummary=(0,o.createSelector)(u,function(e){return!i(e,"editor")})},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{statePlugins:{spec:{wrapActions:p,reducers:u.default,actions:s,selectors:c}}}};var a=r(179),u=o(a),i=r(180),s=n(i),l=r(183),c=n(l),f=r(184),p=n(f)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function a(e){return e instanceof Error?{type:O,error:!0,payload:e}:"string"==typeof e?{type:O,payload:e.replace(/\t/g," ")||""}:{type:O,payload:""}}function u(e){return{type:U,payload:e}}function i(e){return{type:T,payload:e}}function s(e){if(!e||"object"!==("undefined"==typeof e?"undefined":b(e)))throw new Error("updateJson must only accept a simple JSON object");return{type:S,payload:e}}function l(e,t,r,n){return{type:x,payload:{path:e,value:r,paramName:t,isXml:n}}}function c(e){return{type:C,payload:{pathMethod:e}}}function f(e){return{type:N,payload:{pathMethod:e}}}function p(e,t){return{type:I,payload:{path:e,value:t,key:"consumes_value"}}}function d(e,t){return{type:I,payload:{path:e,value:t,key:"produces_value"}}}function h(e,t){return{type:q,payload:{path:e,method:t}}}function y(e,t){return{type:M,payload:{path:e,method:t}}}function m(e,t,r){return{type:z,payload:{scheme:e,path:t,method:r}}}Object.defineProperty(t,"__esModule",{value:!0}),t.execute=t.executeRequest=t.logRequest=t.setRequest=t.setResponse=t.formatIntoYaml=t.resolveSpec=t.parseToJson=t.SET_SCHEME=t.UPDATE_RESOLVED=t.UPDATE_OPERATION_VALUE=t.ClEAR_VALIDATE_PARAMS=t.CLEAR_REQUEST=t.CLEAR_RESPONSE=t.LOG_REQUEST=t.SET_REQUEST=t.SET_RESPONSE=t.VALIDATE_PARAMS=t.UPDATE_PARAM=t.UPDATE_JSON=t.UPDATE_URL=t.UPDATE_SPEC=void 0;var v=Object.assign||function(e){for(var t=1;t0){var o=r.map(function(e){return console.error(e),e.line=e.fullPath?h(y,e.fullPath):null,e.path=e.fullPath?e.fullPath.join("."):null,e.level="error",e.type="thrown",e.source="resolver",Object.defineProperty(e,"message",{enumerable:!0,value:e.message}),e});a.newThrownErrBatch(o)}return n.updateResolved(t)})}},t.formatIntoYaml=function(){return function(e){var t=e.specActions,r=e.specSelectors,n=r.specStr,o=t.updateSpec;try{var a=_.default.safeDump(_.default.safeLoad(n()),{indent:2});o(a)}catch(e){o(e)}}},t.setResponse=function(e,t,r){return{payload:{path:e,method:t,res:r},type:A}},t.setRequest=function(e,t,r){return{payload:{path:e,method:t,req:r},type:R}},t.logRequest=function(e){return{payload:e,type:k}},t.executeRequest=function(e){return function(t){var r=t.fn,n=t.specActions,o=t.specSelectors,a=e.pathName,u=e.method,i=e.operation,s=i.toJS();e.contextUrl=(0,w.default)(o.url()).toString(),s&&s.operationId?e.operationId=s.operationId:s&&a&&u&&(e.operationId=r.opId(s,a,u));var l=Object.assign({},e);return l=r.buildRequest(l),n.setRequest(e.pathName,e.method,l),r.execute(e).then(function(t){return n.setResponse(e.pathName,e.method,t)}).catch(function(t){return n.setResponse(e.pathName,e.method,{error:!0,err:(0,P.default)(t)})})}},function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.path,r=e.method,n=o(e,["path","method"]);return function(e){var o=e.fn.fetch,a=e.specSelectors,u=e.specActions,i=a.spec().toJS(),s=a.operationScheme(t,r),l=a.contentTypeValues([t,r]).toJS(),c=l.requestContentType,f=l.responseContentType,p=/xml/i.test(c),d=a.parameterValues([t,r],p).toJS();return u.executeRequest(v({fetch:o,spec:i,pathName:t,method:r,parameters:d,requestContentType:c,scheme:s,responseContentType:f},n))}});t.execute=D},function(e,t){e.exports=require("js-yaml")},function(e,t){e.exports=require("url-parse")},function(e,t,r){"use strict";function n(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:"";if(d.List.isList(e))return e.some(function(e){return d.Map.isMap(e)&&e.get("in")===t})}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(d.List.isList(e))return e.some(function(e){return d.Map.isMap(e)&&e.get("type")===t})}function s(e,t){var r=b(e).getIn(["paths"].concat(n(t)),(0,d.fromJS)({})),o=r.get("parameters")||new d.List,a=i(o,"file")?"multipart/form-data":u(o,"formData")?"application/x-www-form-urlencoded":r.get("consumes_value");return(0,d.fromJS)({requestContentType:a,responseContentType:r.get("produces_value")})}function l(e,t){return b(e).getIn(["paths"].concat(n(t),["consumes"]),(0,d.fromJS)({}))}function c(e){return d.Map.isMap(e)?e:new d.Map}Object.defineProperty(t,"__esModule",{value:!0}),t.validateBeforeExecute=t.canExecuteScheme=t.operationScheme=t.hasHost=t.allowTryItOutFor=t.requestFor=t.responseFor=t.requests=t.responses=t.taggedOperations=t.operationsWithTags=t.tagDetails=t.tags=t.operationsWithRootInherited=t.schemes=t.host=t.basePath=t.definitions=t.findDefinition=t.securityDefinitions=t.security=t.produces=t.consumes=t.operations=t.paths=t.semver=t.version=t.externalDocs=t.info=t.spec=t.specResolved=t.specJson=t.specSource=t.specStr=t.url=t.lastError=void 0,t.getParameter=o,t.parameterValues=a,t.parametersIncludeIn=u,t.parametersIncludeType=i,t.contentTypeValues=s,t.operationConsumes=l;var f=r(173),p=r(12),d=r(7),h="default",y=["get","put","post","delete","options","head","patch"],m=function(e){return e||(0,d.Map)()},v=(t.lastError=(0,f.createSelector)(m,function(e){return e.get("lastError")}),t.url=(0,f.createSelector)(m,function(e){return e.get("url")}),t.specStr=(0,f.createSelector)(m,function(e){return e.get("spec")||""}),t.specSource=(0,f.createSelector)(m,function(e){return e.get("specSource")||"not-editor"}),t.specJson=(0,f.createSelector)(m,function(e){return e.get("json",(0,d.Map)())}),t.specResolved=(0,f.createSelector)(m,function(e){return e.get("resolved",(0,d.Map)())})),b=t.spec=function(e){var t=v(e);return t},g=t.info=(0,f.createSelector)(b,function(e){return c(e&&e.get("info"))}),_=(t.externalDocs=(0,f.createSelector)(b,function(e){return c(e&&e.get("externalDocs"))}),t.version=(0,f.createSelector)(g,function(e){return e&&e.get("version")})),E=(t.semver=(0,f.createSelector)(_,function(e){return/v?([0-9]*)\.([0-9]*)\.([0-9]*)/i.exec(e).slice(1)}),t.paths=(0,f.createSelector)(b,function(e){return e.get("paths")})),w=t.operations=(0,f.createSelector)(E,function(e){if(!e||e.size<1)return(0,d.List)();var t=(0,d.List)();return e&&e.forEach?(e.forEach(function(e,r){return e&&e.forEach?void e.forEach(function(e,n){y.indexOf(n)!==-1&&(t=t.push((0,d.fromJS)({path:r,method:n,operation:e,id:n+"-"+r})))}):{}}),t):(0,d.List)()}),j=t.consumes=(0,f.createSelector)(b,function(e){return(0,d.Set)(e.get("consumes"))}),P=t.produces=(0,f.createSelector)(b,function(e){return(0,d.Set)(e.get("produces"))}),O=(t.security=(0,f.createSelector)(b,function(e){return e.get("security",(0,d.List)())}),t.securityDefinitions=(0,f.createSelector)(b,function(e){return e.get("securityDefinitions")}),t.findDefinition=function(e,t){return v(e).getIn(["definitions",t],null)},t.definitions=(0,f.createSelector)(b,function(e){return e.get("definitions")||(0,d.Map)()}),t.basePath=(0,f.createSelector)(b,function(e){return e.get("basePath")}),t.host=(0,f.createSelector)(b,function(e){return e.get("host")}),t.schemes=(0,f.createSelector)(b,function(e){return e.get("schemes",(0,d.Map)())}),t.operationsWithRootInherited=(0,f.createSelector)(w,j,P,function(e,t,r){return e.map(function(e){return e.update("operation",function(e){if(e){if(!d.Map.isMap(e))return;return e.withMutations(function(e){return e.get("consumes")||e.update("consumes",function(e){return(0,d.Set)(e).merge(t)}),e.get("produces")||e.update("produces",function(e){return(0,d.Set)(e).merge(r)}),e})}return(0,d.Map)()})})})),T=t.tags=(0,f.createSelector)(b,function(e){return e.get("tags",(0,d.List)())}),S=t.tagDetails=function(e,t){var r=T(e)||(0,d.List)();return r.filter(d.Map.isMap).find(function(e){return e.get("name")===t},(0,d.Map)())},x=t.operationsWithTags=(0,f.createSelector)(O,function(e){return e.reduce(function(e,t){var r=(0,d.Set)(t.getIn(["operation","tags"]));return r.count()<1?e.update(h,(0,d.List)(),function(e){return e.push(t)}):r.reduce(function(e,r){return e.update(r,(0,d.List)(),function(e){return e.push(t)})},e)},(0,d.Map)())}),C=(t.taggedOperations=function(e){return function(t){var r=t.getConfigs,n=r(),o=n.operationsSorter;return x(e).map(function(t,r){var n="function"==typeof o?o:p.sorters.operationsSorter[o],a=n?t.sort(n):t;return(0,d.Map)({tagDetails:S(e,r),operations:a})})}},t.responses=(0,f.createSelector)(m,function(e){return e.get("responses",(0,d.Map)())})),A=t.requests=(0,f.createSelector)(m,function(e){return e.get("requests",(0,d.Map)())}),R=(t.responseFor=function(e,t,r){return C(e).getIn([t,r],null)},t.requestFor=function(e,t,r){return A(e).getIn([t,r],null)},t.allowTryItOutFor=function(){return!0},t.hasHost=(0,f.createSelector)(b,function(e){var t=e.get("host");return"string"==typeof t&&t.length>0&&"/"!==t[0]}),t.operationScheme=function(e,t,r){var n=e.get("url"),o=n.match(/^([a-z][a-z0-9+\-.]*):/),a=Array.isArray(o)?o[1]:null;return e.getIn(["scheme",t,r])||e.getIn(["scheme","_defaultScheme"])||a||""});t.canExecuteScheme=function(e,t,r){return["http","https"].indexOf(R(e,t,r))>-1},t.validateBeforeExecute=function(e,t){var r=b(e).getIn(["paths"].concat(n(t),["parameters"]),(0,d.fromJS)([])),o=!0;return r.forEach(function(e){var t=e.get("errors");t&&t.count()&&(o=!1)}),o}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.updateSpec=function(e,t){var r=t.specActions;return function(){e.apply(void 0,arguments),r.parseToJson.apply(r,arguments)}},t.updateJsonSpec=function(e,t){var r=t.specActions;return function(){e.apply(void 0,arguments),r.resolveSpec.apply(r,arguments)}},t.executeRequest=function(e,t){var r=t.specActions;return function(t){return r.logRequest(t),e(t)}}},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.getComponents,r=e.getStore,n=e.getSystem,o=a.getComponent,i=a.render,s=a.makeMappedContainer,l=(0,u.memoize)(o.bind(null,n,r,t)),c=(0,u.memoize)(s.bind(null,n,r,l,t));return{rootInjects:{getComponent:l,makeMappedContainer:c,render:i.bind(null,n,r,o,t)}}};var o=r(186),a=n(o),u=r(12)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.getComponent=t.render=t.makeMappedContainer=void 0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=Object.assign||function(e){for(var t=1;t1),t}),i(e,l(e),r),s&&(r=o(r,c|f|p));for(var d=t.length;d--;)a(r,t[d]);return r});e.exports=d},function(e,t,r){function n(e,t,r,S,x,C){var A,q=t&j,M=t&P,I=t&O;if(r&&(A=x?r(e,S,x,C):r(e)),void 0!==A)return A;if(!E(e))return e;var U=g(e);if(U){if(A=m(e),!q)return c(e,A)}else{var z=y(e),D=z==R||z==k;if(_(e))return l(e,q);if(z==N||z==T||D&&!x){if(A=M||D?{}:b(e),!q)return M?p(e,s(A,e)):f(e,i(A,e))}else{if(!Z[z])return x?e:{};A=v(e,z,n,q)}}C||(C=new o);var L=C.get(e);if(L)return L;C.set(e,A);var B=I?M?h:d:M?keysIn:w,F=U?void 0:B(e);return a(F||e,function(o,a){F&&(a=o,o=e[a]),u(A,a,n(o,t,r,a,e,C))}),A}var o=r(87),a=r(192),u=r(193),i=r(196),s=r(198),l=r(202),c=r(203),f=r(204),p=r(207),d=r(211),h=r(213),y=r(124),m=r(214),v=r(215),b=r(225),g=r(26),_=r(110),E=r(58),w=r(105),j=1,P=2,O=4,T="[object Arguments]",S="[object Array]",x="[object Boolean]",C="[object Date]",A="[object Error]",R="[object Function]",k="[object GeneratorFunction]",q="[object Map]",M="[object Number]",N="[object Object]",I="[object RegExp]",U="[object Set]",z="[object String]",D="[object Symbol]",L="[object WeakMap]",B="[object ArrayBuffer]",F="[object DataView]",J="[object Float32Array]",V="[object Float64Array]",W="[object Int8Array]",H="[object Int16Array]",Y="[object Int32Array]",$="[object Uint8Array]",K="[object Uint8ClampedArray]",X="[object Uint16Array]",G="[object Uint32Array]",Z={};Z[T]=Z[S]=Z[B]=Z[F]=Z[x]=Z[C]=Z[J]=Z[V]=Z[W]=Z[H]=Z[Y]=Z[q]=Z[M]=Z[N]=Z[I]=Z[U]=Z[z]=Z[D]=Z[$]=Z[K]=Z[X]=Z[G]=!0,Z[A]=Z[R]=Z[L]=!1,e.exports=n},function(e,t){function r(e,t){for(var r=-1,n=null==e?0:e.length;++r0&&r(c)?t>1?n(c,t-1,r,u,i):o(i,c):u||(i[i.length]=c)}return i}var o=r(209),a=r(233);e.exports=n},function(e,t,r){function n(e){return u(e)||a(e)||!!(i&&e&&e[i])}var o=r(22),a=r(108),u=r(26),i=o?o.isConcatSpreadable:void 0;e.exports=n},function(e,t,r){function n(e,t,r){return t=a(void 0===t?e.length-1:t,0),function(){for(var n=arguments,u=-1,i=a(n.length-t,0),s=Array(i);++u0){if(++t>=n)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var n=800,o=16,a=Date.now;e.exports=r},function(e,t,r){"use strict";function n(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{fn:a}};var o=r(154),a=n(o)},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(e){for(var t,r=arguments.length,n=Array(r>1?r-1:0),a=1;a=u&&(t=console)[e].apply(t,n)}var r=e.configs,n={debug:0,info:1,log:2,warn:3,error:4},o=function(e){return n[e]||-1},a=r.logLevel,u=o(a);return t.warn=t.bind(null,"warn"),t.error=t.bind(null,"error"),t.info=t.bind(null,"info"),t.debug=t.bind(null,"debug"),{rootInjects:{log:t}}}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return{fn:{AST:u},components:{JumpToPath:s.default}}};var a=r(243),u=o(a),i=r(252),s=n(i)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){function r(e,t,o){if(!e)return o&&o.start_mark?o.start_mark.line:0;if(t.length&&e.tag===v)for(n=0;n=t.column:t.line===e.start_mark.line?t.column>=e.start_mark.column:t.line===e.end_mark.line?t.column<=e.end_mark.column:e.start_mark.linet.line}var a=0;if(!e||[v,b].indexOf(e.tag)===-1)return o;if(e.tag===v)for(a=0;a-1?i[s?t[l]:l]:void 0}}var o=r(84),a=r(123),u=r(105);e.exports=n},function(e,t,r){function n(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var s=null==r?0:u(r);return s<0&&(s=i(n+s,0)),o(e,a(t,3),s)}var o=r(248),a=r(84),u=r(249),i=Math.max;e.exports=n},function(e,t){function r(e,t,r,n){for(var o=e.length,a=r+(n?1:-1);n?a--:++a=400?(u.updateLoadingStatus("failed"),o.newThrownErr(new Error(t.statusText+" "+e))):(u.updateLoadingStatus("success"),u.updateSpec(t.text),void u.updateUrl(e))}var o=r.errActions,a=r.specSelectors,u=r.specActions,i=t.fetch;e=e||a.url(),u.updateLoadingStatus("loading"),i({url:e,loadSpec:!0,credentials:"same-origin",headers:{Accept:"application/json,*/*"}}).then(n,n)}},updateLoadingStatus:function(e){var t=[null,"loading","failed","success","failedConfig"];return t.indexOf(e)===-1&&console.error("Error: "+e+" is not one of "+JSON.stringify(t)),{type:"spec_update_loading_status",payload:e}}},n={spec_update_loading_status:function(e,t){return"string"==typeof t.payload?e.set("loadingStatus",t.payload):e}},u={loadingStatus:(0,o.createSelector)(function(e){return e||(0,a.Map)()},function(e){return e.get("loadingStatus")||null})};return{statePlugins:{spec:{actions:r,reducers:n,selectors:u}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;var o=r(173),a=r(7)},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r-1&&e.setState({scopes:e.state.scopes.filter(function(e){return e!==o})})},this.onInputChange=function(t){var r=t.target,n=r.dataset.name,a=r.value,u=o({},n,a);e.setState(u)},this.logout=function(t){t.preventDefault();var r=e.props,n=r.authActions,o=r.errActions,a=r.name;o.clear({authId:a,type:"auth",source:"auth"}),n.logout([a])}};t.default=v},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=e.auth,r=e.authActions,n=e.errActions,o=e.configs,a=e.authConfigs,s=void 0===a?{}:a,l=t.schema,c=t.scopes,f=t.name,p=t.clientId,d=l.get("flow"),h=[];switch(d){case"password":return void r.authorizePassword(t);case"application":return void r.authorizeApplication(t);case"accessCode":h.push("response_type=code");break;case"implicit":h.push("response_type=token")}"string"==typeof p&&h.push("client_id="+encodeURIComponent(p));var y=o.oauth2RedirectUrl;if("undefined"==typeof y)return void n.newAuthErr({authId:f,source:"validation",level:"error",message:"oauth2RedirectUri configuration is not passed. Oauth2 authorization cannot be performed."});if(h.push("redirect_uri="+encodeURIComponent(y)),Array.isArray(c)&&0=0||this.state.url.indexOf("127.0.0.1")>=0?null:c.default.createElement("span",{style:{float:"right"}},c.default.createElement("a",{target:"_blank",href:this.state.validatorUrl+"/debug?url="+this.state.url},c.default.createElement(p,{src:this.state.validatorUrl+"?url="+this.state.url,alt:"Online validator badge"})))}}]),t}(c.default.Component);f.propTypes={getComponent:l.PropTypes.func.isRequired,getConfigs:l.PropTypes.func.isRequired,specSelectors:l.PropTypes.object.isRequired},t.default=f;var p=function(e){function t(e){o(this,t);var r=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.state={loaded:!1,error:!1},r}return u(t,e),s(t,[{key:"componentDidMount",value:function(){var e=this,t=new Image;t.onload=function(){e.setState({loaded:!0})},t.onerror=function(){e.setState({error:!0})},t.src=this.props.src}},{key:"componentWillReceiveProps",value:function(e){var t=this;if(e.src!==this.props.src){var r=new Image;r.onload=function(){t.setState({loaded:!0})},r.onerror=function(){t.setState({error:!0})},r.src=e.src}}},{key:"render",value:function(){return this.state.error?c.default.createElement("img",{alt:"Error"}):this.state.loaded?c.default.createElement("img",{src:this.props.src,alt:this.props.alt}):c.default.createElement("img",{alt:"Loading..."})}}]),t}(c.default.Component);p.propTypes={src:l.PropTypes.string,alt:l.PropTypes.string}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=Object.assign||function(e){for(var t=1;t0){var z=!j.get(String(i.get("status")));i=i.set("notDocumented",z)}var D=this.state.tryItOutEnabled,L=this.isShown(),B=[n,o];return c.default.createElement("div",{className:E?"opblock opblock-deprecated":L?"opblock opblock-"+o+" is-open":"opblock opblock-"+o,id:t},c.default.createElement("div",{className:"opblock-summary opblock-summary-"+o,onClick:this.toggleShown},c.default.createElement("span",{className:"opblock-summary-method"},o.toUpperCase()),c.default.createElement("span",{className:E?"opblock-summary-path__deprecated":"opblock-summary-path"},c.default.createElement("span",null,n),c.default.createElement(M,{path:r})),u?c.default.createElement("div",{className:"opblock-summary-description"},g):null,f&&x?c.default.createElement("span",{className:"opblock-summary-operation-id"},x):null,P&&P.count()?c.default.createElement(q,{authActions:v,security:P,authSelectors:b}):null),c.default.createElement(N,{isOpened:L,animated:!0},c.default.createElement("div",{className:"opblock-body"},E&&c.default.createElement("h4",{className:"opblock-title_normal"}," Warning: Deprecated"),_&&c.default.createElement("div",{className:"opblock-description-wrapper"},c.default.createElement("div",{className:"opblock-description"},c.default.createElement(I,{source:_}))),w&&w.get("url")?c.default.createElement("div",{className:"opblock-external-docs-wrapper"},c.default.createElement("h4",{className:"opblock-title_normal"},"Find more details"),c.default.createElement("div",{className:"opblock-external-docs"},c.default.createElement("span",{className:"opblock-external-docs__description"},w.get("description")),c.default.createElement("a",{className:"opblock-external-docs__link",href:w.get("url")},w.get("url")))):null,c.default.createElement(A,{parameters:S,onChangeKey:B,onTryoutClick:this.onTryoutClick,onCancelClick:this.onCancelClick,tryItOutEnabled:D,allowTryItOut:l,fn:p,getComponent:h,specActions:y,specSelectors:m,pathMethod:[n,o]}),D&&l&&T&&T.size?c.default.createElement("div",{className:"opblock-schemes"},c.default.createElement(U,{schemes:T,path:n,method:o,specActions:y})):null,c.default.createElement("div",{className:D&&i&&l?"btn-group":"execute-wrapper"},D&&l?c.default.createElement(R,{getComponent:h,operation:a,specActions:y,specSelectors:m,path:n,method:o,onExecute:this.onExecute}):null,D&&i&&l?c.default.createElement(k,{onClick:this.onClearClick,specActions:y,path:n,method:o}):null),this.state.executeInProgress?c.default.createElement("div",{className:"loading-container"},c.default.createElement("div",{className:"loading"})):null,j?c.default.createElement(C,{responses:j,request:s,tryItOutResponse:i,getComponent:h,specSelectors:m,specActions:y,produces:O,producesValue:a.get("produces_value"),pathMethod:[n,o],fn:p}):null)))}}]),t}(c.default.Component);m.propTypes={path:l.PropTypes.string.isRequired,method:l.PropTypes.string.isRequired,operation:l.PropTypes.object.isRequired,showSummary:l.PropTypes.bool,isShownKey:y.arrayOrString.isRequired,jumpToKey:y.arrayOrString.isRequired,allowTryItOut:l.PropTypes.bool,displayOperationId:l.PropTypes.bool,response:l.PropTypes.object,request:l.PropTypes.object,getComponent:l.PropTypes.func.isRequired,authActions:l.PropTypes.object,authSelectors:l.PropTypes.object,specActions:l.PropTypes.object.isRequired,specSelectors:l.PropTypes.object.isRequired,layoutActions:l.PropTypes.object.isRequired,layoutSelectors:l.PropTypes.object.isRequired,fn:l.PropTypes.object.isRequired,getConfigs:l.PropTypes.func.isRequired},m.defaultProps={showSummary:!0,response:null,allowTryItOut:!0,displayOperationId:!1},t.default=m},function(e,t){e.exports=require("react-addons-shallow-compare")},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.objectWithFuncs=t.arrayOrString=void 0;var n=r(187),o=function(e,t){return n.PropTypes.shape(e.reduce(function(e,r){return e[r]=t,e},{}))};t.arrayOrString=n.PropTypes.oneOfType([n.PropTypes.arrayOf(n.PropTypes.string),n.PropTypes.string]),t.objectWithFuncs=function(e){return o(e,n.PropTypes.func.isRequired)}},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r1&&(g=E[1])}f=l.default.createElement("div",null,l.default.createElement("a",{href:v,download:g},"Download file"))}else f=l.default.createElement("pre",null,"Download headers detected but your browser does not support downloading binary via XHR (Blob).")}else f="string"==typeof t?l.default.createElement(i,{value:t}):l.default.createElement("div",null,"Unknown response type");return f?l.default.createElement("div",null,l.default.createElement("h5",null,"Response body"),f):null}}]),t}(l.default.Component);d.propTypes={content:s.PropTypes.any.isRequired,contentType:s.PropTypes.string.isRequired,getComponent:s.PropTypes.func.isRequired,headers:s.PropTypes.object,url:s.PropTypes.string},t.default=d},function(e,t,r){var n=r(40),o=n(function(e,t,r){return e+(r?" ":"")+t.toLowerCase()});e.exports=o},function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var r=0;r=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(){for(var e=arguments.length,t=Array(e),r=0;r=0||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;tc,collapsedContent:P},p.default.createElement("span",{className:"brace-open object"},m),n?p.default.createElement(w,{name:r}):null,p.default.createElement("span",{className:"inner-object"},p.default.createElement("table",{className:"model",style:{marginLeft:"2em"}},p.default.createElement("tbody",null,d?p.default.createElement("tr",{style:{color:"#999",fontStyle:"italic"}},p.default.createElement("td",null,"description:"),p.default.createElement("td",null,p.default.createElement(E,{source:d}))):null,h&&h.size?h.entrySeq().map(function(e){var t=l(e,2),n=t[0],o=t[1],c=y.List.isList(_)&&_.contains(n),f={verticalAlign:"top",paddingRight:"0.2em"};return c&&(f.fontWeight="bold"),p.default.createElement("tr",{key:n},p.default.createElement("td",{style:f},n,":"),p.default.createElement("td",{style:{verticalAlign:"top"}},p.default.createElement(j,s({key:"object-"+r+"-"+n+"_"+o},i,{required:c,getComponent:a,schema:o,depth:u+1}))))}).toArray():null,b&&b.size?p.default.createElement("tr",null,p.default.createElement("td",null,"< * >:"),p.default.createElement("td",null,p.default.createElement(j,s({},i,{required:!1,getComponent:a,schema:b,depth:u+1})))):null))),p.default.createElement("span",{className:"brace-close"},v)))}}]),t}(f.Component);_.propTypes={schema:f.PropTypes.object.isRequired,getComponent:f.PropTypes.func.isRequired,specSelectors:f.PropTypes.object.isRequired,name:f.PropTypes.string,isRef:f.PropTypes.bool,expandDepth:f.PropTypes.number,depth:f.PropTypes.number};var E=function(e){function t(){return a(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),c(t,[{key:"render",value:function(){var e=this.props,t=e.schema,r=e.getComponent,n=e.required;if(!t||!t.get)return p.default.createElement("div",null);var o=t.get("type"),a=t.get("format"),u=t.get("xml"),i=t.get("enum"),s=t.get("description"),c=t.filter(function(e,t){return["enum","type","format","description","$$ref"].indexOf(t)===-1}),f=n?{fontWeight:"bold"}:{},d=r("Markdown");return p.default.createElement("span",{className:"prop"},p.default.createElement("span",{className:"prop-type",style:f},o)," ",n&&p.default.createElement("span",{style:{color:"red"}},"*"),a&&p.default.createElement("span",{className:"prop-format"},"($",a,")"),c.size?c.entrySeq().map(function(e){var t=l(e,2),r=t[0],n=t[1];return p.default.createElement("span",{key:r+"-"+n,style:b},p.default.createElement("br",null),r,": ",String(n))}):null,s?p.default.createElement(d,{source:s}):null,u&&u.size?p.default.createElement("span",null,p.default.createElement("br",null),p.default.createElement("span",{style:b},"xml:"),u.entrySeq().map(function(e){var t=l(e,2),r=t[0],n=t[1];return p.default.createElement("span",{key:r+"-"+n,style:b},p.default.createElement("br",null),"   ",r,": ",String(n))}).toArray()):null,i&&p.default.createElement(g,{value:i}))}}]),t}(f.Component);E.propTypes={schema:f.PropTypes.object.isRequired,getComponent:f.PropTypes.func.isRequired,required:f.PropTypes.bool};var w=function(e){function t(){return a(this,t),u(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,e),c(t,[{key:"render",value:function(){var e=this.props,t=e.required,r=e.schema,n=e.depth,o=e.expandDepth,a=r.get("items"),u=r.filter(function(e,t){return["type","items","$$ref"].indexOf(t)===-1});return p.default.createElement("span",{className:"model"},p.default.createElement("span",{className:"model-title"},p.default.createElement("span",{className:"model-title__text"},r.get("title"))),p.default.createElement(O,{collapsed:n>o,collapsedContent:"[...]"},"[",p.default.createElement("span",null,p.default.createElement(j,s({},this.props,{schema:a,required:!1}))),"]",u.size?p.default.createElement("span",null,u.entrySeq().map(function(e){var t=l(e,2),r=t[0],n=t[1];return p.default.createElement("span",{key:r+"-"+n,style:b},p.default.createElement("br",null),r+":",String(n))}),p.default.createElement("br",null)):null),t&&p.default.createElement("span",{style:{color:"red"}},"*"))}}]),t}(f.Component);w.propTypes={schema:f.PropTypes.object.isRequired,getComponent:f.PropTypes.func.isRequired,specSelectors:f.PropTypes.object.isRequired,name:f.PropTypes.string,required:f.PropTypes.bool,expandDepth:f.PropTypes.number,depth:f.PropTypes.number};var j=function(e){function t(){var e,r,n,o;a(this,t);for(var i=arguments.length,s=Array(i),l=0;l Date: Sun, 18 Mar 2018 01:43:21 +0530 Subject: [PATCH 2/4] Gci swagger integration (#33) * Swagger Documentation of StandingInstructionApiResource.java * Swagger Documentation of StandingInstructionHistoryApiResource.java * Swagger Documentation for ChargesApiResource.java * Swagger Documentation of EntityFieldConfigurationApiResources.java and LoanChargesApiResource.java * Swagger Documentation for CollateralsApiResource.java and InterestRateChartsApiResource.java (#5) * Swagger Documentation for InterestRateChartSlabsApiResource.java (#8) * Swagger Documentation for FundsApiResource.java (#9) * Swagger Documentation for LoansApiResource.java (#10) * Swagger Documentation for TaxGroupApiResource.java (#12) * Swagger Documentation for FixedDepositAccountsApiResource.java (#13) * Swagger Documentation for FixedDepositAccountsApiResource.java * Added Example Request in GET Endpoint {accountId} Added Example Request in GET Endpoint in "fixeddepositaccounts/{accountId}" * Swagger Documentation for AccountTransfersApiResource.java (#14) * Swagger Documentation for CollectionSheetApiResource.java and FloatingRatesApiResource.java (#15) * Swagger Documentation for CentersApiResource.java (#16) * Swagger documentation for GroupsApiResource.java (#11) * Swagger Documentation for SelfBeneficiariesTPTApiResource.java and SelfAuthenticationApiResource.java (#21) * Swagger Documentation for SelfClientsApiResource.java (#20) * Swagger Documentation for AccountsApiResource.java (#19) * Swagger Documentation for SelfUserApiResource.java, TaxComponentApiResource.java & SelfUserDetailsApiResource.java (#18) * Swagger Documentation for FixedDepositProductsApiResource.java (#22) * Swagger Documentation for SelfSavingsApiResource.java (#23) * Swagger Documentation for RecurringDepositAccountsApiResource.java (#24) * Swagger Documentation for SelfLoansApiResource.java (#17) * Swagger Documentation for SelfLoansApiResource.java * Added documentation for POST endpoint * Swagger Documentation for SavingsAccountsApiResource.java (#26) * Swagger Documentation for RecurringDepositAccountTransactionsApiResource.java (#29) * Swagger Documentation for LoanProductsApiResource.java and NotesApiResource,java (#25) * Swagger Documentation for RecurringDepositProductsApiResource.java & SavingAccountChargesApiResource.java (#27) * Swagger Documenatation for LoanScheduleApiResource.java & LoanTransactionsApiResource.java (#28) * Swagger Documentation for PaymentTypeApiResource.java and ProductsApiResource.java (#31) * Swagger Documentation for SavingsProductsApiResource.java (#30) * Swagger Documentation for Clients API (#32) * Swagger Documentation for Clients API * Changed the file name * Fixed minor bugs/errors * Requested Changes * Some more changes --- .../api/AccountTransfersApiResource.java | 64 +- .../AccountTransfersApiResourceSwagger.java | 572 +++++++++ .../api/StandingInstructionApiResource.java | 110 +- ...StandingInstructionApiResourceSwagger.java | 549 ++++++++ ...StandingInstructionHistoryApiResource.java | 37 +- ...gInstructionHistoryApiResourceSwagger.java | 123 ++ .../accounts/api/AccountsApiResource.java | 52 +- .../api/AccountsApiResourceSwagger.java | 529 ++++++++ .../EntityFieldConfigurationApiResources.java | 34 +- ...FieldConfigurationApiResourcesSwagger.java | 52 + .../charge/api/ChargesApiResource.java | 50 +- .../charge/api/ChargesApiResourceSwagger.java | 230 ++++ .../client/api/ClientAddressApiResources.java | 49 +- .../api/ClientAddressApiResourcesSwagger.java | 127 ++ .../client/api/ClientChargesApiResource.java | 59 +- .../api/ClientChargesApiResourceSwagger.java | 196 +++ .../api/ClientIdentifiersApiResource.java | 65 +- .../ClientIdentifiersApiResourceSwagger.java | 144 +++ .../api/ClientTransactionsApiResource.java | 41 +- .../ClientTransactionsApiResourceSwagger.java | 133 ++ .../client/api/ClientsApiResource.java | 100 +- .../client/api/ClientsApiResourceSwagger.java | 464 +++++++ .../api/CollateralsApiResource.java | 54 +- .../api/CollateralsApiResourceSwagger.java | 147 +++ .../CollectionSheetApiResourceSwagger.java | 90 ++ .../api/CollectionSheetApiResourse.java | 24 +- .../api/FloatingRatesApiResource.java | 45 +- .../api/FloatingRatesApiResourceSwagger.java | 171 +++ .../portfolio/fund/api/FundsApiResource.java | 43 +- .../fund/api/FundsApiResourceSwagger.java | 78 ++ .../group/api/CentersApiResource.java | 82 +- .../group/api/CentersApiResourceSwagger.java | 343 +++++ .../group/api/GroupsApiResource.java | 93 +- .../group/api/GroupsApiResourceSwagger.java | 529 ++++++++ .../InterestRateChartSlabsApiResource.java | 67 +- ...erestRateChartSlabsApiResourceSwagger.java | 195 +++ .../api/InterestRateChartsApiResource.java | 65 +- .../InterestRateChartsApiResourceSwagger.java | 157 +++ .../api/LoanChargesApiResource.java | 92 +- .../api/LoanChargesApiResourceSwagger.java | 277 ++++ .../api/LoanScheduleApiResource.java | 27 +- .../api/LoanScheduleApiResourceSwagger.java | 56 + .../api/LoanTransactionsApiResource.java | 53 +- .../LoanTransactionsApiResourceSwagger.java | 191 +++ .../loanaccount/api/LoansApiResource.java | 93 +- .../api/LoansApiResourceSwagger.java | 692 ++++++++++ .../api/LoanProductsApiResource.java | 47 +- .../api/LoanProductsApiResourceSwagger.java | 1109 +++++++++++++++++ .../portfolio/note/api/NotesApiResource.java | 60 +- .../note/api/NotesApiResourceSwagger.java | 157 +++ .../api/PaymentTypeApiResource.java | 42 +- .../api/PaymentTypeApiResourceSwagger.java | 121 ++ .../products/api/ProductsApiResource.java | 45 +- .../api/ProductsApiResourceSwagger.java | 597 +++++++++ .../api/FixedDepositAccountsApiResource.java | 84 +- ...ixedDepositAccountsApiResourceSwagger.java | 523 ++++++++ .../api/FixedDepositProductsApiResource.java | 55 +- ...ixedDepositProductsApiResourceSwagger.java | 583 +++++++++ ...DepositAccountTransactionsApiResource.java | 56 +- ...AccountTransactionsApiResourceSwagger.java | 279 +++++ .../RecurringDepositAccountsApiResource.java | 80 +- ...ringDepositAccountsApiResourceSwagger.java | 516 ++++++++ .../RecurringDepositProductsApiResource.java | 55 +- ...ringDepositProductsApiResourceSwagger.java | 612 +++++++++ .../api/SavingsAccountChargesApiResource.java | 76 +- ...vingsAccountChargesApiResourceSwagger.java | 323 +++++ .../api/SavingsAccountsApiResource.java | 81 +- .../SavingsAccountsApiResourceSwagger.java | 359 ++++++ .../api/SavingsProductsApiResource.java | 56 +- .../SavingsProductsApiResourceSwagger.java | 737 +++++++++++ .../api/SelfBeneficiariesTPTApiResource.java | 48 +- ...elfBeneficiariesTPTApiResourceSwagger.java | 141 +++ .../client/api/SelfClientsApiResource.java | 86 +- .../api/SelfClientsApiResourceSwagger.java | 439 +++++++ .../loanaccount/api/SelfLoansApiResource.java | 71 +- .../api/SelfLoansApiResourceSwagger.java | 845 +++++++++++++ .../savings/api/SelfSavingsApiResource.java | 42 +- .../api/SelfSavingsApiResourceSwagger.java | 358 ++++++ .../api/SelfAuthenticationApiResource.java | 20 +- .../SelfAuthenticationApiResourceSwagger.java | 88 ++ .../security/api/SelfUserApiResource.java | 25 +- .../api/SelfUserApiResourceSwagger.java | 62 + .../api/SelfUserDetailsApiResource.java | 18 +- .../SelfUserDetailsApiResourceSwagger.java | 88 ++ .../tax/api/TaxComponentApiResource.java | 37 +- .../api/TaxComponentApiResourceSwagger.java | 149 +++ .../tax/api/TaxGroupApiResource.java | 37 +- .../tax/api/TaxGroupApiResourceSwagger.java | 157 +++ 88 files changed, 15616 insertions(+), 1192 deletions(-) create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/AccountTransfersApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionHistoryApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/api/AccountsApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/address/api/EntityFieldConfigurationApiResourcesSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/api/ChargesApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientAddressApiResourcesSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientChargesApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientIdentifiersApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientTransactionsApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientsApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/api/CollateralsApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/api/CollectionSheetApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/floatingrates/api/FloatingRatesApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/api/FundsApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/CentersApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/GroupsApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartSlabsApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartsApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanChargesApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanScheduleApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanTransactionsApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/api/LoanProductsApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/note/api/NotesApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/paymenttype/api/PaymentTypeApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/products/api/ProductsApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositAccountsApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositProductsApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositAccountTransactionsApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositAccountsApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositProductsApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountChargesApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountsApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsProductsApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/self/account/api/SelfBeneficiariesTPTApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/self/client/api/SelfClientsApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/self/loanaccount/api/SelfLoansApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/self/savings/api/SelfSavingsApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/self/security/api/SelfAuthenticationApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/self/security/api/SelfUserApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/self/security/api/SelfUserDetailsApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/api/TaxComponentApiResourceSwagger.java create mode 100644 fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/api/TaxGroupApiResourceSwagger.java diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/AccountTransfersApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/AccountTransfersApiResource.java index 84fa436bc..12556664b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/AccountTransfersApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/AccountTransfersApiResource.java @@ -18,17 +18,7 @@ */ package org.apache.fineract.portfolio.account.api; -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - +import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -45,9 +35,15 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; + @Path("/accounttransfers") @Component @Scope("singleton") +@Api(value = "Account Transfers", description = "Ability to be able to transfer monetary funds from one account to another.\n\n" + "\n\n" + "Note: At present only savings account to savings account transfers are supported.") public class AccountTransfersApiResource { private final PlatformSecurityContext context; @@ -73,11 +69,13 @@ public class AccountTransfersApiResource { @Path("template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String template(@QueryParam("fromOfficeId") final Long fromOfficeId, @QueryParam("fromClientId") final Long fromClientId, - @QueryParam("fromAccountId") final Long fromAccountId, @QueryParam("fromAccountType") final Integer fromAccountType, - @QueryParam("toOfficeId") final Long toOfficeId, @QueryParam("toClientId") final Long toClientId, - @QueryParam("toAccountId") final Long toAccountId, @QueryParam("toAccountType") final Integer toAccountType, - @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve Account Transfer Template", httpMethod = "GET", notes = "This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\n" + "\n\n" + "Field Defaults\n\n" + "Allowed Value Lists\n\n" + "Example Requests:\n\n" + "\n\n" + "accounttransfers/template?fromAccountType=2&fromOfficeId=1\n\n" + "\n\n" + "accounttransfers/template?fromAccountType=2&fromOfficeId=1&fromClientId=1\n\n" + "\n\n" + "accounttransfers/template?fromClientId=1&fromAccountType=2&fromAccountId=1") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = AccountTransfersApiResourceSwagger.GetAccountTransfersTemplateResponse.class)}) + public String template(@QueryParam("fromOfficeId") @ApiParam(value = "fromOfficeId") final Long fromOfficeId, @QueryParam("fromClientId") @ApiParam(value = "fromClientId") final Long fromClientId, + @QueryParam("fromAccountId") @ApiParam(value = "fromAccountId") final Long fromAccountId, @QueryParam("fromAccountType") @ApiParam(value = "fromAccountType") final Integer fromAccountType, + @QueryParam("toOfficeId") @ApiParam(value = "toOfficeId") final Long toOfficeId, @QueryParam("toClientId") @ApiParam(value = "toClientId") final Long toClientId, + @QueryParam("toAccountId") @ApiParam(value = "toAccountId") final Long toAccountId, @QueryParam("toAccountType") @ApiParam(value = "toAccountType") final Integer toAccountType, + @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(AccountTransfersApiConstants.ACCOUNT_TRANSFER_RESOURCE_NAME); @@ -91,7 +89,10 @@ public class AccountTransfersApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String create(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Create new Transfer", httpMethod = "POST", notes = "Ability to create new transfer of monetary funds from one account to another.") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = AccountTransfersApiResourceSwagger.PostAccountTransfersRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = AccountTransfersApiResourceSwagger.PostAccountTransfersResponse.class)}) + public String create(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createAccountTransfer().withJson(apiRequestBodyAsJson).build(); @@ -103,10 +104,12 @@ public class AccountTransfersApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveAll(@Context final UriInfo uriInfo, @QueryParam("sqlSearch") final String sqlSearch, - @QueryParam("externalId") final String externalId, @QueryParam("offset") final Integer offset, - @QueryParam("limit") final Integer limit, @QueryParam("orderBy") final String orderBy, - @QueryParam("sortOrder") final String sortOrder,@QueryParam("accountDetailId") final Long accountDetailId) { + @ApiOperation(value = "List account transfers", httpMethod = "GET", notes = "Lists account's transfers\n\n" + "Example Requests:\n\n" + "\n\n" + "accounttransfers") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = AccountTransfersApiResourceSwagger.GetAccountTransfersResponse.class)}) + public String retrieveAll(@Context final UriInfo uriInfo, @QueryParam("sqlSearch") @ApiParam(value = "sqlSearch") final String sqlSearch, + @QueryParam("externalId") @ApiParam(value = "externalId") final String externalId, @QueryParam("offset") @ApiParam(value = "offset") final Integer offset, + @QueryParam("limit") @ApiParam(example = "limit") final Integer limit, @QueryParam("orderBy") @ApiParam(value = "orderBy") final String orderBy, + @QueryParam("sortOrder") @ApiParam(value = "sortOrder") final String sortOrder,@QueryParam("accountDetailId") @ApiParam(value = "accountDetailId") final Long accountDetailId) { this.context.authenticatedUser().validateHasReadPermission(AccountTransfersApiConstants.ACCOUNT_TRANSFER_RESOURCE_NAME); @@ -123,7 +126,9 @@ public class AccountTransfersApiResource { @Path("{transferId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveOne(@PathParam("transferId") final Long transferId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve account transfer", httpMethod = "GET", notes = "Retrieves account transfer\n\n" + "Example Requests :\n\n" + "\n\n" + "accounttransfers/1") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = AccountTransfersApiResourceSwagger.GetAccountTransfersResponse.GetAccountTransfersPageItems.class)}) + public String retrieveOne(@PathParam("transferId") @ApiParam(value = "transferId") final Long transferId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(AccountTransfersApiConstants.ACCOUNT_TRANSFER_RESOURCE_NAME); @@ -137,10 +142,12 @@ public class AccountTransfersApiResource { @Path("templateRefundByTransfer") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String templateRefundByTransfer(@QueryParam("fromOfficeId") final Long fromOfficeId, @QueryParam("fromClientId") final Long fromClientId, - @QueryParam("fromAccountId") final Long fromAccountId, @QueryParam("fromAccountType") final Integer fromAccountType, - @QueryParam("toOfficeId") final Long toOfficeId, @QueryParam("toClientId") final Long toClientId, - @QueryParam("toAccountId") final Long toAccountId, @QueryParam("toAccountType") final Integer toAccountType, + @ApiOperation(value = "Retrieve Refund of an Active Loan by Transfer Template", httpMethod = "GET", notes = "Retrieves Refund of an Active Loan by Transfer Template" + "Example Requests :\n\n" + "\n\n" + "accounttransfers/templateRefundByTransfer?fromAccountId=2&fromAccountType=1& toAccountId=1&toAccountType=2&toClientId=1&toOfficeId=1") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = AccountTransfersApiResourceSwagger.GetAccountTransfersTemplateRefundByTransferResponse.class)}) + public String templateRefundByTransfer(@QueryParam("fromOfficeId") @ApiParam(value = "fromOfficeId") final Long fromOfficeId, @QueryParam("fromClientId") @ApiParam(value = "fromClientId") final Long fromClientId, + @QueryParam("fromAccountId") @ApiParam(value = "fromAccountId") final Long fromAccountId, @QueryParam("fromAccountType") @ApiParam(value = "fromAccountType") final Integer fromAccountType, + @QueryParam("toOfficeId") @ApiParam(value = "toOfficeId") final Long toOfficeId, @QueryParam("toClientId") @ApiParam(value = "toClientId") final Long toClientId, + @QueryParam("toAccountId") @ApiParam(value = "toAccountId") final Long toAccountId, @QueryParam("toAccountType") @ApiParam(value = "toAccountType") final Integer toAccountType, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(AccountTransfersApiConstants.ACCOUNT_TRANSFER_RESOURCE_NAME); @@ -156,7 +163,10 @@ public class AccountTransfersApiResource { @Path("refundByTransfer") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String templateRefundByTransferPost(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Refund of an Active Loan by Transfer", httpMethod = "POST", notes = "Ability to refund an active loan by transferring to a savings account.") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = AccountTransfersApiResourceSwagger.PostAccountTransfersRefundByTransferRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = AccountTransfersApiResourceSwagger.PostAccountTransfersRefundByTransferResponse.class)}) + public String templateRefundByTransferPost(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().refundByTransfer().withJson(apiRequestBodyAsJson).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/AccountTransfersApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/AccountTransfersApiResourceSwagger.java new file mode 100644 index 000000000..a417c30ba --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/AccountTransfersApiResourceSwagger.java @@ -0,0 +1,572 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.account.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.time.LocalDate; +import java.util.Set; + +/** + * Created by Chirag Gupta on 12/16/17. + */ +final class AccountTransfersApiResourceSwagger { + private AccountTransfersApiResourceSwagger() { + } + + @ApiModel(value = "GetAccountTransfersTemplateResponse") + public final static class GetAccountTransfersTemplateResponse { + private GetAccountTransfersTemplateResponse() { + } + + final class GetAccountTransfersFromOffice { + private GetAccountTransfersFromOffice() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "HO") + public String name; + @ApiModelProperty(example = "HO") + public String nameDecorated; + @ApiModelProperty(example = "1") + public Integer externalId; + @ApiModelProperty(example = "[2009, 1, 1]") + public LocalDate openingDate; + @ApiModelProperty(example = ".") + public String hierarchy; + } + + final class GetAccountTransfersFromAccountType { + private GetAccountTransfersFromAccountType() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "accountType.savings") + public String code; + @ApiModelProperty(example = "Savings Account") + public String value; + } + + final class GetAccountTransfersFromOfficeOptions { + private GetAccountTransfersFromOfficeOptions() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "HO") + public String name; + @ApiModelProperty(example = "HO") + public String nameDecorated; + } + + final class GetAccountTransfersFromClientOptions { + private GetAccountTransfersFromClientOptions() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "Small shop") + public String displayName; + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "HO") + public String officeName; + } + + final class GetAccountTransfersFromAccountTypeOptions { + private GetAccountTransfersFromAccountTypeOptions() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "accountType.savings") + public String code; + @ApiModelProperty(example = "Savings Account") + public String value; + } + + final class GetAccountTransfersToOfficeOptions { + private GetAccountTransfersToOfficeOptions() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "HO") + public String name; + @ApiModelProperty(example = "HO") + public String nameDecorated; + } + + final class GetAccountTransfersToAccountTypeOptions { + private GetAccountTransfersToAccountTypeOptions() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "accountType.savings") + public String code; + @ApiModelProperty(example = "Savings Account") + public String value; + } + + @ApiModelProperty(example = "0") + public Long transferAmount; + @ApiModelProperty(example = "[2013, 8, 15]") + public LocalDate transferDate; + public GetAccountTransfersFromOffice fromOffice; + public GetAccountTransfersFromAccountType fromAccountType; + public Set fromOfficeOptions; + public Set fromClientOptions; + public Set fromAccountTypeOptions; + public Set toOfficeOptions; + public Set toAccountTypeOptions; + } + + @ApiModel(value = "PostAccountTransfersRequest") + public final static class PostAccountTransfersRequest { + private PostAccountTransfersRequest() { + } + + @ApiModelProperty(example = "1") + public Integer fromOfficeId; + @ApiModelProperty(example = "1") + public Integer fromClientId; + @ApiModelProperty(example = "2") + public Integer fromAccountType; + @ApiModelProperty(example = "1") + public Integer fromAccountId; + @ApiModelProperty(example = "1") + public Integer toOfficeId; + @ApiModelProperty(example = "1") + public Integer toClientId; + @ApiModelProperty(example = "2") + public Integer toAccountType; + @ApiModelProperty(example = "2") + public Integer toAccountId; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "01 August 2011") + public String transferDate; + @ApiModelProperty(example = "112.45") + public Float transferAmount; + @ApiModelProperty(example = "A description of the transfer") + public String transferDescription; + } + + @ApiModel(value = "PostAccountTransfersResponse") + public final static class PostAccountTransfersResponse { + private PostAccountTransfersResponse() { + } + + @ApiModelProperty(example = "1") + public Integer savingsId; + @ApiModelProperty(example = "1") + public Integer resourceId; + } + + @ApiModel(value = "GetAccountTransfersResponse") + public final static class GetAccountTransfersResponse { + private GetAccountTransfersResponse() { + } + + final class GetAccountTransfersPageItems { + private GetAccountTransfersPageItems() { + } + + final class GetAccountTransfersPageItemsCurrency { + private GetAccountTransfersPageItemsCurrency() { + } + + @ApiModelProperty(example = "USD") + public String code; + @ApiModelProperty(example = "US Dollar") + public String name; + @ApiModelProperty(example = "2") + public Integer decimalPlaces; + @ApiModelProperty(example = "$") + public String displaySymbol; + @ApiModelProperty(example = "currency.USD") + public String nameCode; + @ApiModelProperty(example = "US Dollar ($)") + public String displayLabel; + } + + final class GetAccountTransfersPageItemsFromOffice { + private GetAccountTransfersPageItemsFromOffice() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "HO") + public String name; + } + + final class GetAccountTransfersPageItemsFromAccount { + private GetAccountTransfersPageItemsFromAccount() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "000000001") + public Long accountNo; + } + + final class GetAccountTransfersPageItemsToAccountType { + private GetAccountTransfersPageItemsToAccountType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "accountType.loan") + public String code; + @ApiModelProperty(example = "Loan Account") + public String value; + } + + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "false") + public Boolean reversed; + public GetAccountTransfersPageItemsCurrency currency; + @ApiModelProperty(example = "200") + public Float transferAmount; + @ApiModelProperty(example = "[2013, 4, 1]") + public LocalDate transferDate; + @ApiModelProperty(example = "pay off loan from savings.") + public String transferDescription; + public GetAccountTransfersPageItemsFromOffice fromOffice; + public GetAccountTransfersTemplateResponse.GetAccountTransfersFromClientOptions fromClient; + public GetAccountTransfersTemplateResponse.GetAccountTransfersFromAccountType fromAccountType; + public GetAccountTransfersPageItemsFromAccount fromAccount; + public GetAccountTransfersPageItemsFromOffice toOffice; + public GetAccountTransfersTemplateResponse.GetAccountTransfersFromClientOptions toClient; + public GetAccountTransfersPageItemsToAccountType toAccountType; + public GetAccountTransfersPageItemsFromAccount toAccount; + } + + @ApiModelProperty(example = "4") + public Integer totalFilteredRecords; + public Set pageItems; + } + + @ApiModel(value = "GetAccountTransfersTemplateRefundByTransferResponse") + public static final class GetAccountTransfersTemplateRefundByTransferResponse { + private GetAccountTransfersTemplateRefundByTransferResponse() { + } + + final class GetAccountTransfersTemplateRefundByTransferCurrency { + private GetAccountTransfersTemplateRefundByTransferCurrency() { + } + + @ApiModelProperty(example = "USD") + public String code; + @ApiModelProperty(example = "US Dollar") + public String name; + @ApiModelProperty(example = "0") + public Integer decimalPlaces; + @ApiModelProperty(example = "0") + public Integer inMultiplesOf; + @ApiModelProperty(example = "$") + public String displaySymbol; + @ApiModelProperty(example = "currency.USD") + public String nameCode; + @ApiModelProperty(example = "US Dollar ($)") + public String displayLabel; + } + + final class GetAccountTransfersTemplateRefundByTransferFromOffice { + private GetAccountTransfersTemplateRefundByTransferFromOffice() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "Head Office") + public String name; + @ApiModelProperty(example = "Head Office") + public String nameDecorated; + @ApiModelProperty(example = "1") + public Integer externalId; + @ApiModelProperty(example = "[2009, 1, 1]") + public LocalDate openingDate; + @ApiModelProperty(example = ".") + public String hierarchy; + } + + final class GetAccountTransfersTemplateRefundByTransferFromClient { + private GetAccountTransfersTemplateRefundByTransferFromClient() { + } + + final class GetAccountTransfersStatus { + private GetAccountTransfersStatus() { + } + + @ApiModelProperty(example = "300") + public Integer id; + @ApiModelProperty(example = "clientStatusType.active") + public String code; + @ApiModelProperty(example = "Active") + public String value; + } + + final class GetAccountTransfersGender { + private GetAccountTransfersGender() { + } + } + + final class GetAccountTransfersClientType { + private GetAccountTransfersClientType() { + } + } + + final class GetAccountTransfersClientClassification { + private GetAccountTransfersClientClassification() { + } + } + + final class GetAccountTransfersTimeline { + private GetAccountTransfersTimeline() { + } + + @ApiModelProperty(example = "[2012, 2, 1]") + public LocalDate submittedOnDate; + @ApiModelProperty(example = "mifos") + public String submittedByUsername; + @ApiModelProperty(example = "App") + public String submittedByFirstname; + @ApiModelProperty(example = "Administrator") + public String submittedByLastname; + @ApiModelProperty(example = "[2012, 2, 1]") + public LocalDate activatedOnDate; + @ApiModelProperty(example = "mifos") + public String activatedByUsername; + @ApiModelProperty(example = "App") + public String activatedByFirstname; + @ApiModelProperty(example = "Administrator") + public String activatedByLastname; + } + + final class GetAccountTransfersGroups { + private GetAccountTransfersGroups() { + } + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "000000001") + public Long accountNo; + public GetAccountTransfersStatus status; + @ApiModelProperty(example = "true") + public Boolean active; + @ApiModelProperty(example = "[2012, 2, 1]") + public LocalDate activationDate; + @ApiModelProperty(example = "Daniel") + public String firstname; + @ApiModelProperty(example = "Owusu") + public String lastname; + @ApiModelProperty(example = "Daniel Owusu") + public String displayName; + public GetAccountTransfersGender gender; + public GetAccountTransfersClientType clientType; + public GetAccountTransfersClientClassification clientClassification; + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "Head Office") + public String officeName; + public GetAccountTransfersTimeline timeline; + public GetAccountTransfersGroups groups; + } + + final class GetAccountTransfersTemplateRefundByTransferFromAccount { + private GetAccountTransfersTemplateRefundByTransferFromAccount() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "000000002") + public Long accountNo; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "Daniel Owusu") + public String clientName; + @ApiModelProperty(example = "1") + public Integer productId; + @ApiModelProperty(example = "CTRL") + public String productName; + @ApiModelProperty(example = "0") + public Integer fieldOfficerId; + public GetAccountTransfersTemplateRefundByTransferCurrency currency; + @ApiModelProperty(example = "130") + public Float amtForTransfer; + } + + final class GetAccountTransfersTemplateRefundByTransferToClient { + private GetAccountTransfersTemplateRefundByTransferToClient() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "Daniel Owusu") + public String displayName; + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "Head Office") + public String officeName; + } + + final class GetAccountTransfersTemplateRefundByTransferToAccount { + private GetAccountTransfersTemplateRefundByTransferToAccount() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "000000001") + public Long accountNo; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "Daniel Owusu") + public String clientName; + @ApiModelProperty(example = "1") + public Integer productId; + @ApiModelProperty(example = "TEST") + public String productName; + @ApiModelProperty(example = "0") + public Integer fieldOfficerId; + public GetAccountTransfersTemplateRefundByTransferCurrency currency; + } + + final class GetAccountTransfersTemplateRefundByTransferFromOfficeOptions { + private GetAccountTransfersTemplateRefundByTransferFromOfficeOptions() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "Head Office") + public String name; + @ApiModelProperty(example = "Head Office") + public String nameDecorated; + } + + final class GetAccountTransfersTemplateRefundByTransferFromClientOptions { + private GetAccountTransfersTemplateRefundByTransferFromClientOptions() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "Daniel Owusu") + public String displayName; + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "Head Office") + public String officeName; + } + + final class GetAccountTransfersTemplateRefundByTransferFromAccountOptions { + private GetAccountTransfersTemplateRefundByTransferFromAccountOptions() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "000000002") + public Long accountNo; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "Daniel Owusu") + public String clientName; + @ApiModelProperty(example = "1") + public Integer productId; + @ApiModelProperty(example = "CTRL") + public String productName; + @ApiModelProperty(example = "0") + public Integer fieldOfficerId; + public GetAccountTransfersTemplateRefundByTransferCurrency currency; + } + + public GetAccountTransfersTemplateRefundByTransferCurrency currency; + @ApiModelProperty(example = "130") + public Float transferAmount; + @ApiModelProperty(example = "[2014, 11, 1]") + public LocalDate transferDate; + public GetAccountTransfersTemplateRefundByTransferFromOffice fromOffice; + public GetAccountTransfersTemplateRefundByTransferFromClient fromClient; + public GetAccountTransfersResponse.GetAccountTransfersPageItems.GetAccountTransfersPageItemsToAccountType fromAccountType; + public GetAccountTransfersTemplateRefundByTransferFromAccount fromAccount; + public GetAccountTransfersTemplateRefundByTransferFromOffice toOffice; + public GetAccountTransfersTemplateRefundByTransferToClient toClient; + public GetAccountTransfersTemplateResponse.GetAccountTransfersFromAccountType toAccountType; + public GetAccountTransfersTemplateRefundByTransferToAccount toAccount; + public Set fromOfficeOptions; + public Set fromClientOptions; + public Set fromAccountTypeOptions; + public Set fromAccountOptions; + public Set toOfficeOptions; + public Set toClientOptions; + public Set toAccountTypeOptions; + public Set toAccountOptions; + } + + @ApiModel(value = "PostAccountTransfersRefundByTransferRequest") + public static final class PostAccountTransfersRefundByTransferRequest { + private PostAccountTransfersRefundByTransferRequest() { + } + + @ApiModelProperty(example = "2") + public Integer fromAccountId; + @ApiModelProperty(example = "1") + public Integer fromAccountType; + @ApiModelProperty(example = "1") + public Integer toOfficeId; + @ApiModelProperty(example = "1") + public Integer toClientId; + @ApiModelProperty(example = "2") + public Integer toAccountType; + @ApiModelProperty(example = "1") + public Integer toAccountId; + @ApiModelProperty(example = "130") + public Float transferAmount; + @ApiModelProperty(example = "31 October 2014") + public String transferDate; + @ApiModelProperty(example = "Transfer refund to my savings account") + public String transferDescription; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "1") + public Integer fromClientId; + @ApiModelProperty(example = "1") + public Integer fromOfficeId; + } + + @ApiModel(value = "PostAccountTransfersRefundByTransferResponse") + public final static class PostAccountTransfersRefundByTransferResponse { + private PostAccountTransfersRefundByTransferResponse() { + } + + @ApiModelProperty(example = "1") + public Integer savingsId; + @ApiModelProperty(example = "1") + public Integer resourceId; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionApiResource.java index 2d780e054..f2efc19ab 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionApiResource.java @@ -6,9 +6,7 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * * http://www.apache.org/licenses/LICENSE-2.0 - * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -18,22 +16,7 @@ */ package org.apache.fineract.portfolio.account.api; -import java.util.Arrays; -import java.util.Date; -import java.util.Set; - -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - +import io.swagger.annotations.*; import org.apache.commons.lang.StringUtils; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; @@ -56,9 +39,18 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; +import java.util.Arrays; +import java.util.Date; +import java.util.Set; + @Path("/standinginstructions") @Component @Scope("singleton") +@Api(value = "Standing Instructions", description = "Standing instructions (or standing orders) refer to instructions a bank account holder (\"the payer\") gives to his or her bank to pay a set amount at regular intervals to another's (\"the payee's\") account.\n" + "\n" + "Note: At present only savings account to savings account and savings account to Loan account transfers are permitted.") public class StandingInstructionApiResource { private final PlatformSecurityContext context; @@ -70,11 +62,11 @@ public class StandingInstructionApiResource { @Autowired public StandingInstructionApiResource(final PlatformSecurityContext context, - final DefaultToApiJsonSerializer toApiJsonSerializer, - final PortfolioCommandSourceWritePlatformService commandsSourceWritePlatformService, - final ApiRequestParameterHelper apiRequestParameterHelper, - final StandingInstructionReadPlatformService standingInstructionReadPlatformService, - final AccountTransfersReadPlatformService accountTransfersReadPlatformService) { + final DefaultToApiJsonSerializer toApiJsonSerializer, + final PortfolioCommandSourceWritePlatformService commandsSourceWritePlatformService, + final ApiRequestParameterHelper apiRequestParameterHelper, + final StandingInstructionReadPlatformService standingInstructionReadPlatformService, + final AccountTransfersReadPlatformService accountTransfersReadPlatformService) { this.context = context; this.toApiJsonSerializer = toApiJsonSerializer; this.commandsSourceWritePlatformService = commandsSourceWritePlatformService; @@ -85,13 +77,15 @@ public class StandingInstructionApiResource { @GET @Path("template") - @Consumes({ MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_JSON }) - public String template(@QueryParam("fromOfficeId") final Long fromOfficeId, @QueryParam("fromClientId") final Long fromClientId, - @QueryParam("fromAccountId") final Long fromAccountId, @QueryParam("fromAccountType") final Integer fromAccountType, - @QueryParam("toOfficeId") final Long toOfficeId, @QueryParam("toClientId") final Long toClientId, - @QueryParam("toAccountId") final Long toAccountId, @QueryParam("toAccountType") final Integer toAccountType, - @QueryParam("transferType") final Integer transferType, @Context final UriInfo uriInfo) { + @Consumes({MediaType.APPLICATION_JSON}) + @Produces({MediaType.APPLICATION_JSON}) + @ApiOperation(value = "Retrieve Standing Instruction Template", httpMethod = "GET", notes = "This is a convenience resource. " + "It can be useful when building maintenance user interface screens for client applications. " + "The template data returned consists of any or all of:\n" + "\n" + "Field Defaults\n" + "Allowed Value Lists\n" + "Example Requests:\n" + "\n" + "standinginstructions/template?fromAccountType=2&fromOfficeId=1\n" + "\n" + "standinginstructions/template?fromAccountType=2&fromOfficeId=1&fromClientId=1&transferType=1\n" + "\n" + "standinginstructions/template?fromClientId=1&fromAccountType=2&fromAccountId=1&transferType=1") + @ApiResponses(@ApiResponse(code = 200, message = "OK", response = StandingInstructionApiResourceSwagger.GetStandingInstructionsTemplateResponse.class)) + public String template(@QueryParam("fromOfficeId") @ApiParam(value = "fromOfficeId") final Long fromOfficeId, @QueryParam("fromClientId") @ApiParam(value = "fromClientId") final Long fromClientId, + @QueryParam("fromAccountId") @ApiParam(value = "fromAccountId") final Long fromAccountId, @QueryParam("fromAccountType") @ApiParam(value = "fromAccountType") final Integer fromAccountType, + @QueryParam("toOfficeId") @ApiParam(value = "toOfficeId") final Long toOfficeId, @QueryParam("toClientId") @ApiParam(value = "toClientId") final Long toClientId, + @QueryParam("toAccountId") @ApiParam(value = "toAccountId") final Long toAccountId, @QueryParam("toAccountType") @ApiParam(value = "toAccountType") final Integer toAccountType, + @QueryParam("transferType") @ApiParam(value = "transferType") final Integer transferType, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(StandingInstructionApiConstants.STANDING_INSTRUCTION_RESOURCE_NAME); @@ -104,9 +98,12 @@ public class StandingInstructionApiResource { } @POST - @Consumes({ MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_JSON }) - public String create(final String apiRequestBodyAsJson) { + @Consumes({MediaType.APPLICATION_JSON}) + @Produces({MediaType.APPLICATION_JSON}) + @ApiOperation(value = "Create new Standing Instruction", httpMethod = "POST", notes = "Ability to create new instruction for transfer of monetary funds from one account to another") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = StandingInstructionApiResourceSwagger.PostStandingInstructionsRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = StandingInstructionApiResourceSwagger.PostStandingInstructionsResponse.class)}) + public String create(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createStandingInstruction().withJson(apiRequestBodyAsJson) .build(); @@ -118,10 +115,13 @@ public class StandingInstructionApiResource { @PUT @Path("{standingInstructionId}") - @Consumes({ MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_JSON }) - public String update(@PathParam("standingInstructionId") final Long standingInstructionId, final String apiRequestBodyAsJson, - @QueryParam("command") final String commandParam) { + @Consumes({MediaType.APPLICATION_JSON}) + @Produces({MediaType.APPLICATION_JSON}) + @ApiOperation(value = "Update Standing Instruction | Delete Standing Instruction", httpMethod = "PUT", notes = "Ability to modify existing instruction for transfer of monetary funds from one account to another.\n" + "\n" + "PUT https://DomainName/api/v1/standinginstructions/1?command=update\n" + "\n\n" + "Ability to modify existing instruction for transfer of monetary funds from one account to another.\n" + "\n" + "PUT https://DomainName/api/v1/standinginstructions/1?command=delete") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = false, paramType = "body", dataType = "body", format = "body", dataTypeClass = StandingInstructionApiResourceSwagger.PutStandingInstructionsStandingInstructionIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = StandingInstructionApiResourceSwagger.PutStandingInstructionsStandingInstructionIdResponse.class)}) + public String update(@PathParam("standingInstructionId") @ApiParam(value = "standingInstructionId") final Long standingInstructionId, @ApiParam(hidden = true) final String apiRequestBodyAsJson, + @QueryParam("command") @ApiParam(value = "command") final String commandParam) { CommandWrapper commandRequest = null; if (is(commandParam, "update")) { @@ -132,7 +132,9 @@ public class StandingInstructionApiResource { .build(); } - if (commandRequest == null) { throw new UnrecognizedQueryParamException("command", commandParam); } + if (commandRequest == null) { + throw new UnrecognizedQueryParamException("command", commandParam); + } final CommandProcessingResult result = this.commandsSourceWritePlatformService.logCommandSource(commandRequest); return this.toApiJsonSerializer.serialize(result); @@ -144,14 +146,16 @@ public class StandingInstructionApiResource { } @GET - @Consumes({ MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveAll(@Context final UriInfo uriInfo, @QueryParam("sqlSearch") final String sqlSearch, - @QueryParam("externalId") final String externalId, @QueryParam("offset") final Integer offset, - @QueryParam("limit") final Integer limit, @QueryParam("orderBy") final String orderBy, - @QueryParam("sortOrder") final String sortOrder, @QueryParam("transferType") final Integer transferType, - @QueryParam("clientName") final String clientName, @QueryParam("clientId") final Long clientId, - @QueryParam("fromAccountId") final Long fromAccount, @QueryParam("fromAccountType") final Integer fromAccountType) { + @Consumes({MediaType.APPLICATION_JSON}) + @Produces({MediaType.APPLICATION_JSON}) + @ApiOperation(value = "List Standing Instructions", httpMethod = "GET", notes = "Example Requests:\n" + "\n" + "standinginstructions") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = StandingInstructionApiResourceSwagger.GetStandingInstructionsResponse.class)}) + public String retrieveAll(@Context final UriInfo uriInfo, @QueryParam("sqlSearch") @ApiParam(value = "sqlSearch") final String sqlSearch, + @QueryParam("externalId") @ApiParam(value = "externalId") final String externalId, @QueryParam("offset") @ApiParam(value = "offset") final Integer offset, + @QueryParam("limit") @ApiParam(value = "limit") final Integer limit, @QueryParam("orderBy") @ApiParam(value = "orderBy") final String orderBy, + @QueryParam("sortOrder") @ApiParam(value = "sortOrder") final String sortOrder, @QueryParam("transferType") @ApiParam(value = "transferType") final Integer transferType, + @QueryParam("clientName") @ApiParam(value = "clientName") final String clientName, @QueryParam("clientId") @ApiParam(value = "clientId") final Long clientId, + @QueryParam("fromAccountId") @ApiParam(value = "fromAccountId") final Long fromAccount, @QueryParam("fromAccountType") @ApiParam(value = "fromAccountType") final Integer fromAccountType) { this.context.authenticatedUser().validateHasReadPermission(StandingInstructionApiConstants.STANDING_INSTRUCTION_RESOURCE_NAME); @@ -171,12 +175,14 @@ public class StandingInstructionApiResource { @GET @Path("{standingInstructionId}") - @Consumes({ MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveOne(@PathParam("standingInstructionId") final Long standingInstructionId, @Context final UriInfo uriInfo, - @QueryParam("sqlSearch") final String sqlSearch, @QueryParam("externalId") final String externalId, - @QueryParam("offset") final Integer offset, @QueryParam("limit") final Integer limit, - @QueryParam("orderBy") final String orderBy, @QueryParam("sortOrder") final String sortOrder) { + @Consumes({MediaType.APPLICATION_JSON}) + @Produces({MediaType.APPLICATION_JSON}) + @ApiOperation(value = "Retrieve Standing Instruction", httpMethod = "GET", notes = "Example Requests :\n" + "\n" + "standinginstructions/1") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = StandingInstructionApiResourceSwagger.GetStandingInstructionsStandingInstructionIdResponse.class)}) + public String retrieveOne(@PathParam("standingInstructionId") @ApiParam(value = "standingInstructionId") final Long standingInstructionId, @Context final UriInfo uriInfo, + @QueryParam("sqlSearch") @ApiParam(value = "sqlSearch") final String sqlSearch, @QueryParam("externalId") @ApiParam(value = "externalId") final String externalId, + @QueryParam("offset") @ApiParam(value = "offset") final Integer offset, @QueryParam("limit") @ApiParam(value = "limit") final Integer limit, + @QueryParam("orderBy") @ApiParam(value = "orderBy") final String orderBy, @QueryParam("sortOrder") @ApiParam(value = "sortOrder") final String sortOrder) { this.context.authenticatedUser().validateHasReadPermission(StandingInstructionApiConstants.STANDING_INSTRUCTION_RESOURCE_NAME); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionApiResourceSwagger.java new file mode 100644 index 000000000..2022f19c2 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionApiResourceSwagger.java @@ -0,0 +1,549 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.account.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.time.LocalDate; +import java.util.Set; + +/** + * Created by Chirag Gupta on 11/29/17. + */ +final class StandingInstructionApiResourceSwagger { + + private StandingInstructionApiResourceSwagger() { + // this class is only for Swagger Live Documentation + } + + @ApiModel(value = "GetStandingInstructionsTemplateResponse") + public static final class GetStandingInstructionsTemplateResponse { + private GetStandingInstructionsTemplateResponse() { + } + + final class GetFromOfficeResponseStandingInstructionSwagger { + private GetFromOfficeResponseStandingInstructionSwagger() { + } + + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "Head Office") + public String name; + @ApiModelProperty(example = "Head Office") + public String decoratedName; + @ApiModelProperty(example = "1") + public Integer externalId; + @ApiModelProperty(example = "[2009, 1, 1]") + public LocalDate openingDate; + @ApiModelProperty(example = ".") + public String hierarchy; + } + + final class GetFromAccountTypeResponseStandingInstructionSwagger { + private GetFromAccountTypeResponseStandingInstructionSwagger() { + } + + @ApiModelProperty(example = "2") + public Long id; + @ApiModelProperty(example = "accountType.savings") + public String code; + @ApiModelProperty(example = "Savings Account") + public String value; + } + + final class GetFromOfficeOptionsResponseStandingInstructionSwagger { + private GetFromOfficeOptionsResponseStandingInstructionSwagger() { + } + + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "Head Office") + public String name; + @ApiModelProperty(example = "Head Office") + public String nameDecorated; + } + + final class GetFromClientOptionsResponseStandingInstructionSwagger { + private GetFromClientOptionsResponseStandingInstructionSwagger() { + } + + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "Client_FirstName_2VRAG Client_LastName_9QCY") + public String displayName; + @ApiModelProperty(example = "1") + public Long officeId; + @ApiModelProperty(example = "Head Office") + public String officeName; + } + + final class GetFromAccountTypeOptionsResponseStandingInstructionSwagger { + private GetFromAccountTypeOptionsResponseStandingInstructionSwagger() { + } + + @ApiModelProperty(example = "2") + public Long id; + @ApiModelProperty(example = "accountType.savings") + public String code; + @ApiModelProperty(example = "Savings Account") + public String value; + } + + final class GetToOfficeOptionsResponseStandingInstructionSwagger { + private GetToOfficeOptionsResponseStandingInstructionSwagger() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "Head Office") + public String name; + @ApiModelProperty(example = "Head Office") + public String nameDecorated; + } + + final class GetToAccountTypeOptionsResponseStandingInstructionSwagger { + private GetToAccountTypeOptionsResponseStandingInstructionSwagger() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "accountType.loan") + public String code; + @ApiModelProperty(example = "Loan Account") + public String value; + } + + final class GetTransferTypeOptionsResponseStandingInstructionSwagger { + private GetTransferTypeOptionsResponseStandingInstructionSwagger() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "accountTransferType.account.transfer") + public String code; + @ApiModelProperty(example = "Account Transfer") + public String value; + } + + final class GetStatusOptionsResponseStandingInstructionSwagger { + private GetStatusOptionsResponseStandingInstructionSwagger() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "standingInstructionStatus.active") + public String code; + @ApiModelProperty(example = "Active") + public String value; + } + + final class GetInstructionTypeOptionsResponseStandingInstructionSwagger { + private GetInstructionTypeOptionsResponseStandingInstructionSwagger() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "standingInstructionType.fixed") + public String code; + @ApiModelProperty(example = "Fixed") + public String value; + } + + final class GetPriorityOptionsResponseStandingInstructionSwagger { + private GetPriorityOptionsResponseStandingInstructionSwagger() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "standingInstructionPriority.urgent") + public String code; + @ApiModelProperty(example = "Urgent Priority") + public String value; + } + + final class GetRecurrenceTypeOptionsResponseStandingInstructionSwagger { + private GetRecurrenceTypeOptionsResponseStandingInstructionSwagger() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "accountTransferRecurrenceType.periodic") + public String code; + @ApiModelProperty(example = "Periodic Recurrence") + public String value; + } + + final class GetRecurrenceFrequencyOptionsResponseStandingInstructionSwagger { + private GetRecurrenceFrequencyOptionsResponseStandingInstructionSwagger() { + } + + @ApiModelProperty(example = "0") + public Integer id; + @ApiModelProperty(example = "frequencyperiodFrequencyType.days") + public String code; + @ApiModelProperty(example = "Days") + public String value; + } + + public GetFromOfficeResponseStandingInstructionSwagger fromOffice; + public GetFromAccountTypeResponseStandingInstructionSwagger fromAccountType; + public Set fromOfficeOptions; + public Set fromClientOptions; + public Set fromAccountTypeOptions; + public Set toOfficeOptions; + public Set toAccountTypeOptions; + public Set transferTypeOptions; + public Set statusOptions; + public Set instructionTypeOptions; + public Set priorityOptions; + public Set recurrenceTypeOptions; + public Set recurrenceFrequencyOptions; + } + + @ApiModel(value = "PostStandingInstructionsResponse") + public static final class PostStandingInstructionsResponse { + private PostStandingInstructionsResponse() { + } + + @ApiModelProperty(example = "1") + public Long clientId; + @ApiModelProperty(example = "65") + public Integer resourceId; + } + + @ApiModel(value = "GetStandingInstructionsResponse") + public static final class GetStandingInstructionsResponse { + private GetStandingInstructionsResponse() { + } + + final class GetPageItemsStandingInstructionSwagger { + final class GetFromOfficeStandingInstructionSwagger { + private GetFromOfficeStandingInstructionSwagger() { + } + + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "Head Office") + public String name; + } + + final class GetFromClientStandingInstructionSwagger { + private GetFromClientStandingInstructionSwagger() { + } + + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "Test test") + public String displayName; + @ApiModelProperty(example = "1") + public Long officeId; + @ApiModelProperty(example = "Head Office") + public String officeName; + } + + final class GetFromAccountTypeStandingInstructionSwagger { + private GetFromAccountTypeStandingInstructionSwagger() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "accountType.savings") + public String code; + @ApiModelProperty(example = "Savings Account") + public String value; + } + + final class GetFromAccountStandingInstructionSwagger { + private GetFromAccountStandingInstructionSwagger() { + } + + @ApiModelProperty(example = "14") + public Long id; + @ApiModelProperty(example = "000000014") + public Long accountNo; + @ApiModelProperty(example = "1") + public Long productId; + @ApiModelProperty(example = "savings old") + public String productName; + } + + final class GetToOfficeStandingInstructionSwagger { + private GetToOfficeStandingInstructionSwagger() { + } + + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "Head Office") + public String name; + } + + final class GetToClientStandingInstructionSwagger { + private GetToClientStandingInstructionSwagger() { + } + + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "Test test") + public String displayName; + @ApiModelProperty(example = "1") + public Long officeId; + @ApiModelProperty(example = "Head Office") + public String officeName; + } + + final class GetToAccountTypeStandingInstructionSwagger { + private GetToAccountTypeStandingInstructionSwagger() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "accountType.savings") + public String code; + @ApiModelProperty(example = "Savings Account") + public String value; + } + + final class GetToAccountStandingInstructionSwagger { + private GetToAccountStandingInstructionSwagger() { + } + + @ApiModelProperty(example = "3") + public Long id; + @ApiModelProperty(example = "000000003") + public Long accountNo; + @ApiModelProperty(example = "4") + public Long productId; + @ApiModelProperty(example = "account overdraft") + public String productName; + } + + final class GetTransferTypeStandingInstructionSwagger { + private GetTransferTypeStandingInstructionSwagger() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "accountTransferType.account.transfer") + public String code; + @ApiModelProperty(example = "Account Transfer") + public String value; + } + + final class GetPriorityStandingInstructionSwagger { + private GetPriorityStandingInstructionSwagger() { + } + + @ApiModelProperty(example = "3") + public Integer id; + @ApiModelProperty(example = "standingInstructionPriority.medium") + public String code; + @ApiModelProperty(example = "Medium Priority") + public String value; + } + + final class GetInstructionTypeStandingInstructionSwagger { + private GetInstructionTypeStandingInstructionSwagger() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "standingInstructionType.fixed") + public String code; + @ApiModelProperty(example = "Fixed") + public String value; + } + + final class GetStatusStandingInstructionSwagger { + private GetStatusStandingInstructionSwagger() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "standingInstructionStatus.deleted") + public String code; + @ApiModelProperty(example = "Deleted") + public String value; + } + + final class GetRecurrenceTypeStandingInstructionSwagger { + private GetRecurrenceTypeStandingInstructionSwagger() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "accountTransferRecurrenceType.periodic") + public String code; + @ApiModelProperty(example = "Periodic Recurrence") + public String value; + } + + final class GetRecurrenceFrequencyStandingInstructionSwagger { + private GetRecurrenceFrequencyStandingInstructionSwagger() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "frequencyperiodFrequencyType.months") + public String code; + @ApiModelProperty(example = "Months") + public String value; + } + + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "6") + public Long accountDetailId; + @ApiModelProperty(example = "test standing") + public String name; + public GetFromOfficeStandingInstructionSwagger fromOffice; + public GetFromClientStandingInstructionSwagger fromClient; + public GetFromAccountTypeStandingInstructionSwagger fromAccountType; + public GetFromAccountStandingInstructionSwagger fromAccount; + public GetToOfficeStandingInstructionSwagger toOffice; + public GetToClientStandingInstructionSwagger toClient; + public GetToAccountTypeStandingInstructionSwagger toAccountType; + public GetToAccountStandingInstructionSwagger toAccount; + public GetTransferTypeStandingInstructionSwagger transferType; + public GetPriorityStandingInstructionSwagger priority; + public GetInstructionTypeStandingInstructionSwagger instructionType; + public GetStatusStandingInstructionSwagger status; + @ApiModelProperty(example = "150.000000") + public float amount; + @ApiModelProperty(example = "[2014, 4, 3]") + public LocalDate validFrom; + public GetRecurrenceTypeStandingInstructionSwagger recurrenceType; + public GetRecurrenceFrequencyStandingInstructionSwagger recurrenceFrequency; + @ApiModelProperty(example = "1") + public Integer recurrenceInterval; + @ApiModelProperty(example = "[4, 3]") + public LocalDate recurrenceOnMonthDay; + } + + @ApiModelProperty(example = "2") + public Integer totalFilteredRecords; + public Set pageItems; + } + + @ApiModel(value = "PostStandingInstructionsRequest") + public static final class PostStandingInstructionsRequest { + private PostStandingInstructionsRequest() { + } + + @ApiModelProperty(example = "1") + public Long fromOfficeId; + @ApiModelProperty(example = "1") + public Long fromClientId; + @ApiModelProperty(example = "2") + public Integer fromAccountType; + @ApiModelProperty(example = "standing instruction") + public String name; + @ApiModelProperty(example = "1") + public Integer transferType; + @ApiModelProperty(example = "2") + public Integer priority; + @ApiModelProperty(example = "1") + public Integer status; + @ApiModelProperty(example = "1") + public Long fromAccountId; + @ApiModelProperty(example = "1") + public Long toOfficeId; + @ApiModelProperty(example = "1") + public Long toClientId; + @ApiModelProperty(example = "2") + public Integer toAccountType; + @ApiModelProperty(example = "3") + public Long toAccountId; + @ApiModelProperty(example = "1") + public Integer instructionType; + @ApiModelProperty(example = "221") + public Integer amount; + @ApiModelProperty(example = "08 April 2014") + public String validFrom; + @ApiModelProperty(example = "1") + public Integer recurrenceType; + @ApiModelProperty(example = "1") + public Integer recurrenceInterval; + @ApiModelProperty(example = "2") + public Integer recurrenceFrequency; + @ApiModelProperty(value = "en") + public String locale; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "02 April") + public String recurrenceOnMonthDay; + @ApiModelProperty(example = "dd MMMM") + public String monthDayFormat; + } + + @ApiModel(value = "GetStandingInstructionsStandingInstructionIdResponse") + public static final class GetStandingInstructionsStandingInstructionIdResponse { + private GetStandingInstructionsStandingInstructionIdResponse() { + } + + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "6") + public Long accountDetailId; + @ApiModelProperty(example = "test standing") + public String name; + public GetStandingInstructionsResponse.GetPageItemsStandingInstructionSwagger.GetFromOfficeStandingInstructionSwagger fromOffice; + public GetStandingInstructionsResponse.GetPageItemsStandingInstructionSwagger.GetFromClientStandingInstructionSwagger fromClient; + public GetStandingInstructionsResponse.GetPageItemsStandingInstructionSwagger.GetFromAccountTypeStandingInstructionSwagger fromAccountType; + public GetStandingInstructionsResponse.GetPageItemsStandingInstructionSwagger.GetFromAccountStandingInstructionSwagger fromAccount; + public GetStandingInstructionsResponse.GetPageItemsStandingInstructionSwagger.GetToOfficeStandingInstructionSwagger toOffice; + public GetStandingInstructionsResponse.GetPageItemsStandingInstructionSwagger.GetToClientStandingInstructionSwagger toClient; + public GetStandingInstructionsResponse.GetPageItemsStandingInstructionSwagger.GetToAccountTypeStandingInstructionSwagger toAccountType; + public GetStandingInstructionsResponse.GetPageItemsStandingInstructionSwagger.GetToAccountStandingInstructionSwagger toAccount; + public GetStandingInstructionsResponse.GetPageItemsStandingInstructionSwagger.GetTransferTypeStandingInstructionSwagger transferType; + public GetStandingInstructionsResponse.GetPageItemsStandingInstructionSwagger.GetPriorityStandingInstructionSwagger priority; + public GetStandingInstructionsResponse.GetPageItemsStandingInstructionSwagger.GetInstructionTypeStandingInstructionSwagger instructionType; + public GetStandingInstructionsResponse.GetPageItemsStandingInstructionSwagger.GetStatusStandingInstructionSwagger status; + @ApiModelProperty(example = "150.000000") + public float amount; + @ApiModelProperty(example = "[2014, 4, 3]") + public LocalDate validFrom; + public GetStandingInstructionsResponse.GetPageItemsStandingInstructionSwagger.GetRecurrenceTypeStandingInstructionSwagger recurrenceType; + public GetStandingInstructionsResponse.GetPageItemsStandingInstructionSwagger.GetRecurrenceFrequencyStandingInstructionSwagger recurrenceFrequency; + @ApiModelProperty(example = "1") + public Integer recurrenceInterval; + @ApiModelProperty(example = "[4, 3]") + public LocalDate recurrenceOnMonthDay; + } + + @ApiModel(value = "PutStandingInstructionsStandingInstructionIdResponse") + public static final class PutStandingInstructionsStandingInstructionIdResponse { + private PutStandingInstructionsStandingInstructionIdResponse() { + } + final class PutUpdateStandingInstructionChanges{ + @ApiModelProperty(example = "2") + public Integer recurrenceInterval; + } + @ApiModelProperty(example = "20") + public Integer resourceId; + public PutUpdateStandingInstructionChanges changes; + } + + @ApiModel(value = "PutStandingInstructionsStandingInstructionIdRequest") + public static final class PutStandingInstructionsStandingInstructionIdRequest{ + private PutStandingInstructionsStandingInstructionIdRequest(){} + @ApiModelProperty(example = "2") + public Integer recurrenceInterval; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionHistoryApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionHistoryApiResource.java index 616cf050f..a5e9867f0 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionHistoryApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionHistoryApiResource.java @@ -18,17 +18,7 @@ */ package org.apache.fineract.portfolio.account.api; -import java.util.Date; - -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - +import io.swagger.annotations.*; import org.apache.fineract.accounting.journalentry.api.DateParam; import org.apache.fineract.infrastructure.core.api.ApiRequestParameterHelper; import org.apache.fineract.infrastructure.core.serialization.ApiRequestJsonSerializationSettings; @@ -43,9 +33,16 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; +import java.util.Date; + @Path("/standinginstructionrunhistory") @Component @Scope("singleton") +@Api(value = "Standing Instructions History", description = "The list capability of history can support pagination and sorting.") public class StandingInstructionHistoryApiResource { private final PlatformSecurityContext context; @@ -67,14 +64,16 @@ public class StandingInstructionHistoryApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveAll(@Context final UriInfo uriInfo, @QueryParam("sqlSearch") final String sqlSearch, - @QueryParam("externalId") final String externalId, @QueryParam("offset") final Integer offset, - @QueryParam("limit") final Integer limit, @QueryParam("orderBy") final String orderBy, - @QueryParam("sortOrder") final String sortOrder, @QueryParam("transferType") final Integer transferType, - @QueryParam("clientName") final String clientName, @QueryParam("clientId") final Long clientId, - @QueryParam("fromAccountId") final Long fromAccount, @QueryParam("fromAccountType") final Integer fromAccountType, - @QueryParam("locale") final String locale, @QueryParam("dateFormat") final String dateFormat, - @QueryParam("fromDate") final DateParam fromDateParam, @QueryParam("toDate") final DateParam toDateParam) { + @ApiOperation(value = "Standing Instructions Logged History", httpMethod = "GET", notes = "The list capability of history can support pagination and sorting \n\n" +"Example Requests :\n" + "\n" + "standinginstructionrunhistory\n" + "\n" + "standinginstructionrunhistory?orderBy=name&sortOrder=DESC\n" + "\n" + "standinginstructionrunhistory?offset=10&limit=50") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = StandingInstructionHistoryApiResourceSwagger.GetStandingInstructionRunHistoryResponse.class)}) + public String retrieveAll(@Context final UriInfo uriInfo, @QueryParam("sqlSearch") @ApiParam(value = "sqlSearch") final String sqlSearch, + @QueryParam("externalId") @ApiParam(value = "externalId") final String externalId, @QueryParam("offset") @ApiParam(value = "offset") final Integer offset, + @QueryParam("limit") @ApiParam(value = "limit") final Integer limit, @QueryParam("orderBy") @ApiParam(value = "orderBy") final String orderBy, + @QueryParam("sortOrder") @ApiParam(value = "sortOrder") final String sortOrder, @QueryParam("transferType") @ApiParam(value = "transferType") final Integer transferType, + @QueryParam("clientName") @ApiParam(value = "clientName") final String clientName, @QueryParam("clientId") @ApiParam(value = "clientId") final Long clientId, + @QueryParam("fromAccountId") @ApiParam(value = "fromAccountId") final Long fromAccount, @QueryParam("fromAccountType") @ApiParam(value = "fromAccountType") final Integer fromAccountType, + @QueryParam("locale") @ApiParam(value = "locale") final String locale, @QueryParam("dateFormat") @ApiParam(value = "dateFormat") final String dateFormat, + @QueryParam("fromDate") @ApiParam(value = "fromDate") final DateParam fromDateParam, @QueryParam("toDate") @ApiParam(value = "toDate") final DateParam toDateParam) { this.context.authenticatedUser().validateHasReadPermission(StandingInstructionApiConstants.STANDING_INSTRUCTION_RESOURCE_NAME); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionHistoryApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionHistoryApiResourceSwagger.java new file mode 100644 index 000000000..521b2f901 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionHistoryApiResourceSwagger.java @@ -0,0 +1,123 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.account.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.time.LocalDate; +import java.util.Set; + +/** + * Created by Chirag Gupta on 12/01/17. + */ +final class StandingInstructionHistoryApiResourceSwagger { + private StandingInstructionHistoryApiResourceSwagger() { + } + + @ApiModel(value = "GetStandingInstructionRunHistoryResponse") + public final static class GetStandingInstructionRunHistoryResponse { + private GetStandingInstructionRunHistoryResponse() { + } + + final class GetStandingInstructionHistoryPageItemsResponse { + + final class GetStandingInstructionHistoryPageItemsFromClient { + private GetStandingInstructionHistoryPageItemsFromClient() { + } + + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "Test client") + public String displayName; + @ApiModelProperty(example = "1") + public Long officeId; + @ApiModelProperty(example = "Head Office") + public String officeName; + } + + final class GetStandingInstructionHistoryFromAccount { + private GetStandingInstructionHistoryFromAccount() { + } + + @ApiModelProperty(example = "2") + public Long id; + @ApiModelProperty(example = "000000002") + public Long accountNo; + @ApiModelProperty(example = "1") + public Long productId; + @ApiModelProperty(example = "General Savings") + public String productName; + } + + final class GetStandingInstructionHistoryToAccount { + private GetStandingInstructionHistoryToAccount() { + } + + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "000000001") + public Long accountNo; + @ApiModelProperty(example = "1") + public Long productId; + @ApiModelProperty(example = "General Savings") + public String productName; + } + + final class GetStandingInstructionHistoryToClient { + private GetStandingInstructionHistoryToClient() { + } + + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "Test client") + public String displayName; + @ApiModelProperty(example = "1") + public Long officeId; + @ApiModelProperty(example = "Head Office") + public String officeName; + } + + @ApiModelProperty(example = "1") + public Long standingInstructionId; + @ApiModelProperty(example = "ACC Transfer") + public String name; + public StandingInstructionApiResourceSwagger.GetStandingInstructionsResponse.GetPageItemsStandingInstructionSwagger.GetFromOfficeStandingInstructionSwagger fromOffice; + public GetStandingInstructionHistoryPageItemsFromClient fromClient; + public StandingInstructionApiResourceSwagger.GetStandingInstructionsResponse.GetPageItemsStandingInstructionSwagger.GetFromAccountTypeStandingInstructionSwagger fromAccountType; + public GetStandingInstructionHistoryFromAccount fromAccount; + public StandingInstructionApiResourceSwagger.GetStandingInstructionsResponse.GetPageItemsStandingInstructionSwagger.GetToAccountTypeStandingInstructionSwagger toAccountType; + public GetStandingInstructionHistoryToAccount toAccount; + public StandingInstructionApiResourceSwagger.GetStandingInstructionsResponse.GetPageItemsStandingInstructionSwagger.GetToOfficeStandingInstructionSwagger toOffice; + public GetStandingInstructionHistoryToClient toClient; + @ApiModelProperty(example = "10") + public Float amount; + @ApiModelProperty(example = "success") + public String status; + @ApiModelProperty(example = "[2014, 6, 30]") + public LocalDate executionTime; + @ApiModelProperty(example = " ") + public String errorLog; + } + + @ApiModelProperty(example = "2") + public Integer totalFilteredRecords; + public Set pageItems; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/api/AccountsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/api/AccountsApiResource.java index f627c89a3..16f410d2f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/api/AccountsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/api/AccountsApiResource.java @@ -18,18 +18,7 @@ */ package org.apache.fineract.portfolio.accounts.api; -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - +import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -49,10 +38,16 @@ import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; + @Path("/accounts/{type}") @Component @Scope("singleton") +@Api(value = "Share Account", description = "Share accounts are instances of a praticular share product created for an individual. An application process around the creation of accounts is also supported.") public class AccountsApiResource { private final ApplicationContext applicationContext ; @@ -78,9 +73,11 @@ public class AccountsApiResource { @Path("template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String template(@PathParam("type") final String accountType, @QueryParam("clientId") final Long clientId, - @QueryParam("productId") final Long productId, - @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve Share Account Template", httpMethod = "GET", notes = "This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n" + "\n" + "Field Defaults\n" + "Allowed Value Lists\n\n" + "Example Requests:\n" + "\n" + "accounts/share/template?clientId=1\n" + "\n" + "\n" + "accounts/share/template?clientId=1&productId=1") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = AccountsApiResourceSwagger.GetAccountsTypeTemplateResponse.class)}) + public String template(@PathParam("type") @ApiParam(value = "type") final String accountType, @QueryParam("clientId") @ApiParam(value = "clientId") final Long clientId, + @QueryParam("productId") @ApiParam(value = "productId") final Long productId, + @Context final UriInfo uriInfo) { try { this.platformSecurityContext.authenticatedUser() ; String serviceName = accountType+AccountsApiConstants.READPLATFORM_NAME ; @@ -97,7 +94,9 @@ public class AccountsApiResource { @Path("{accountId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveAccount(@PathParam("accountId") final Long accountId, @PathParam("type") final String accountType, + @ApiOperation(value = "Retrieve a share application/account", httpMethod = "GET", notes = "Retrieves a share application/account\n\n" + "Example Requests :\n" + "\n" + "shareaccount/1") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = AccountsApiResourceSwagger.GetAccountsTypeAccountIdResponse.class)}) + public String retrieveAccount(@PathParam("accountId") @ApiParam(value = "accountId") final Long accountId, @PathParam("type") @ApiParam(value = "type") final String accountType, @Context final UriInfo uriInfo) { try { String serviceName = accountType+AccountsApiConstants.READPLATFORM_NAME ; @@ -113,7 +112,9 @@ public class AccountsApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveAllAccounts(@PathParam("type") final String accountType, @QueryParam("offset") final Integer offset, @QueryParam("limit") final Integer limit, @Context final UriInfo uriInfo) { + @ApiOperation(value = "List share applications/accounts", httpMethod = "GET", notes = "Lists share applications/accounts\n\n" + "Example Requests:\n" + "\n" + "shareaccount") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = AccountsApiResourceSwagger.GetAccountsTypeResponse.class)}) + public String retrieveAllAccounts(@PathParam("type") @ApiParam(value = "type") final String accountType, @QueryParam("offset") @ApiParam(value = "offset") final Integer offset, @QueryParam("limit") @ApiParam(value = "limit") final Integer limit, @Context final UriInfo uriInfo) { try { String serviceName = accountType+AccountsApiConstants.READPLATFORM_NAME ; AccountReadPlatformService service = (AccountReadPlatformService) this.applicationContext.getBean(serviceName) ; @@ -128,7 +129,10 @@ public class AccountsApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String createAccount(@PathParam("type") final String accountType, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Submit new share application", httpMethod = "POST", notes = "Submits new share application\n\n" + "Mandatory Fields: clientId, productId, submittedDate, savingsAccountId, requestedShares, applicationDate\n\n" + "Optional Fields: accountNo, externalId\n\n" + "Inherited from Product (if not provided): minimumActivePeriod, minimumActivePeriodFrequencyType, lockinPeriodFrequency, lockinPeriodFrequencyType") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = AccountsApiResourceSwagger.PostAccountsTypeRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = AccountsApiResourceSwagger.PostAccountsTypeResponse.class)}) + public String createAccount(@PathParam("type") @ApiParam(value = "type") final String accountType, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { CommandWrapper commandWrapper = null; this.platformSecurityContext.authenticatedUser(); commandWrapper = new CommandWrapperBuilder().createAccount(accountType).withJson(apiRequestBodyAsJson).build(); @@ -140,8 +144,11 @@ public class AccountsApiResource { @Path("{accountId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String handleCommands(@PathParam("type") final String accountType, @PathParam("accountId") final Long accountId, @QueryParam("command") final String commandParam, - final String apiRequestBodyAsJson) { + @ApiOperation(value = "Approve share application | Undo approval share application | Reject share application | Activate a share account | Close a share account | Apply additional shares on a share account | Approve additional shares request on a share account | Reject additional shares request on a share account | Redeem shares on a share account", httpMethod = "POST", notes = "Approve share application:\n\n" + "Approves share application so long as its in 'Submitted and pending approval' state.\n\n" + "Undo approval share application:\n\n" + "Will move 'approved' share application back to 'Submitted and pending approval' state.\n\n" + "Reject share application:\n\n" + "Rejects share application so long as its in 'Submitted and pending approval' state.\n\n" + "Activate a share account:\n\n" + "Results in an approved share application being converted into an 'active' share account.\n\n" + "Close a share account:\n\n" + "Results in an Activated share application being converted into an 'closed' share account.\n" + "\n" + "closedDate is closure date of share account\n\n" + "Mandatory Fields: dateFormat,locale,closedDate\n\n" + "Apply additional shares on a share account:\n\n" + "requestedDate is requsted date of share purchase\n" + "\n" + "requestedShares is number of shares to be purchase\n\n" + "Mandatory Fields: dateFormat,locale,requestedDate, requestedShares\n\n" + "Approve additional shares request on a share account\n\n" + "requestedShares is Share purchase transaction ids\n\n" + "Mandatory Fields: requestedShares\n\n" + "Reject additional shares request on a share account:\n\n" + "requestedShares is Share purchase transaction ids\n\n" + "Mandatory Fields: requestedShares\n\n" + "Redeem shares on a share account:\n\n" + "Results redeem some/all shares from share account.\n" + "\n" + "requestedDate is requsted date of shares redeem\n" + "\n" + "requestedShares is number of shares to be redeemed\n\n" + "Mandatory Fields: dateFormat,locale,requestedDate,requestedShares\n\n" + "Showing request/response for 'Reject additional shares request on a share account'\n\n" + "For more info visit this link - https://demo.openmf.org/api-docs/apiLive.htm#shareaccounts") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = AccountsApiResourceSwagger.PostAccountsTypeAccountIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = AccountsApiResourceSwagger.PostAccountsTypeAccountIdResponse.class)}) + public String handleCommands(@PathParam("type") @ApiParam(value = "type") final String accountType, @PathParam("accountId") @ApiParam(value = "accountId") final Long accountId, @QueryParam("command") @ApiParam(value = "command") final String commandParam, + @ApiParam(hidden = true) final String apiRequestBodyAsJson) { CommandWrapper commandWrapper = null; this.platformSecurityContext.authenticatedUser(); commandWrapper = new CommandWrapperBuilder().createAccountCommand(accountType, accountId, commandParam).withJson(apiRequestBodyAsJson).build(); @@ -153,7 +160,10 @@ public class AccountsApiResource { @Path("{accountId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String updateAccount(@PathParam("type") final String accountType, @PathParam("accountId") final Long accountId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Modify a share application", httpMethod = "PUT", notes = "Share application can only be modified when in 'Submitted and pending approval' state. Once the application is approved, the details cannot be changed using this method. Specific api endpoints will be created to allow change of interest detail such as rate, compounding period, posting period etc") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = AccountsApiResourceSwagger.PutAccountsTypeAccountIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = AccountsApiResourceSwagger.PutAccountsTypeAccountIdResponse.class)}) + public String updateAccount(@PathParam("type") @ApiParam(value = "type") final String accountType, @PathParam("accountId") @ApiParam(value = "accountId") final Long accountId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { this.platformSecurityContext.authenticatedUser(); final CommandWrapper commandRequest = new CommandWrapperBuilder().updateAccount(accountType, accountId) .withJson(apiRequestBodyAsJson).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/api/AccountsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/api/AccountsApiResourceSwagger.java new file mode 100644 index 000000000..bafb26106 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/api/AccountsApiResourceSwagger.java @@ -0,0 +1,529 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.accounts.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.time.LocalDate; +import java.util.List; +import java.util.Set; + +/** + * Created by Chirag Gupta on 12/20/17. + */ +final class AccountsApiResourceSwagger { + private AccountsApiResourceSwagger() { + } + + @ApiModel(value = "GetAccountsTypeTemplateResponse") + public final static class GetAccountsTypeTemplateResponse { + private GetAccountsTypeTemplateResponse() { + } + + final class GetAccountsTypeProductOptions { + private GetAccountsTypeProductOptions() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "Share Product") + public String name; + @ApiModelProperty(example = "SP") + public String shortName; + @ApiModelProperty(example = "100") + public Long totalShares; + } + + @ApiModelProperty(example = "7") + public Integer clientId; + @ApiModelProperty(example = "Client Name") + public String clientName; + public Set productOptions; + } + + @ApiModel(value = "GetAccountsTypeAccountIdResponse") + public final static class GetAccountsTypeAccountIdResponse { + private GetAccountsTypeAccountIdResponse() { + } + + final class GetAccountsStatus { + private GetAccountsStatus() { + } + + @ApiModelProperty(example = "300") + public Integer id; + @ApiModelProperty(example = "shareAccountStatusType.active") + public String code; + @ApiModelProperty(example = "Active") + public String value; + @ApiModelProperty(example = "false") + public Boolean submittedAndPendingApproval; + @ApiModelProperty(example = "false") + public Boolean approved; + @ApiModelProperty(example = "false") + public Boolean rejected; + @ApiModelProperty(example = "true") + public Boolean active; + @ApiModelProperty(example = "false") + public Boolean closed; + } + + final class GetAccountsTimeline { + private GetAccountsTimeline() { + } + + @ApiModelProperty(example = "[2016, 4, 1]") + public LocalDate submittedOnDate; + @ApiModelProperty(example = "mifos") + public String submittedByUsername; + @ApiModelProperty(example = "App") + public String submittedByFirstname; + @ApiModelProperty(example = "Administrator") + public String submittedByLastname; + @ApiModelProperty(example = "[2016, 4, 1]") + public LocalDate approvedDate; + @ApiModelProperty(example = "mifos") + public String approvedByUsername; + @ApiModelProperty(example = "App") + public String approvedByFirstname; + @ApiModelProperty(example = "Administrator") + public String approvedByLastname; + @ApiModelProperty(example = "[2016, 4, 1]") + public LocalDate activatedDate; + } + + final class GetAccountsCurrency { + private GetAccountsCurrency() { + } + + @ApiModelProperty(example = "USD") + public String code; + @ApiModelProperty(example = "US Dollar") + public String name; + @ApiModelProperty(example = "2") + public Integer decimalPlaces; + @ApiModelProperty(example = "100") + public Integer inMultiplesOf; + @ApiModelProperty(example = "$") + public String displaySymbol; + @ApiModelProperty(example = "currency.USD") + public String nameCode; + @ApiModelProperty(example = "US Dollar ($)") + public String displayLabel; + } + + final class GetAccountsSummary { + private GetAccountsSummary() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "000000002") + public Long accountNo; + @ApiModelProperty(example = "1") + public Integer totalApprovedShares; + @ApiModelProperty(example = "0") + public Integer totalPendingForApprovalShares; + @ApiModelProperty(example = "1") + public Integer productId; + @ApiModelProperty(example = "Conflux Share Product") + public String productName; + public GetAccountsStatus status; + public GetAccountsTimeline timeline; + public GetAccountsCurrency currency; + } + + final class GetAccountsPurchasedShares { + private GetAccountsPurchasedShares() { + } + + final class GetAccountsPurchasedSharesStatus { + private GetAccountsPurchasedSharesStatus() { + } + + @ApiModelProperty(example = "300") + public Integer id; + @ApiModelProperty(example = "purchasedSharesStatusType.approved") + public String code; + @ApiModelProperty(example = "Approved") + public String value; + } + + final class GetAccountsPurchasedSharesType { + private GetAccountsPurchasedSharesType() { + } + + @ApiModelProperty(example = "500") + public Integer id; + @ApiModelProperty(example = "purchasedSharesType.purchased") + public String code; + @ApiModelProperty(example = "Purchase") + public String value; + } + + @ApiModelProperty(example = "6") + public Integer id; + @ApiModelProperty(example = "2") + public Integer accountId; + @ApiModelProperty(example = "[2016, 4, 1]") + public LocalDate purchasedDate; + @ApiModelProperty(example = "10") + public Integer numberOfShares; + @ApiModelProperty(example = "0.5") + public Double purchasedPrice; + public GetAccountsPurchasedSharesStatus status; + public GetAccountsPurchasedSharesType type; + @ApiModelProperty(example = "5.05") + public Double amount; + @ApiModelProperty(example = "0.05") + public Double chargeAmount; + @ApiModelProperty(example = "5.05") + public Double amountPaid; + } + + final class GetAccountsLockPeriodTypeEnum { + private GetAccountsLockPeriodTypeEnum() { + } + + @ApiModelProperty(example = "0") + public Integer id; + @ApiModelProperty(example = "savings.lockin.sharePeriodFrequencyType.days") + public String code; + @ApiModelProperty(example = "Days") + public String value; + } + + final class GetAccountsCharges { + private GetAccountsCharges() { + } + + final class GetAccountsChargeTimeType { + private GetAccountsChargeTimeType() { + } + + @ApiModelProperty(example = "13") + public Integer id; + @ApiModelProperty(example = "chargeTimeType.activation") + public String code; + @ApiModelProperty(example = "Share Account Activate") + public String value; + } + + final class GetAccountsChargeCalculationType { + private GetAccountsChargeCalculationType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "chargeCalculationType.flat") + public String code; + @ApiModelProperty(example = "Flat") + public String value; + } + + final class GetAccountsChargesCurrency { + private GetAccountsChargesCurrency() { + } + + @ApiModelProperty(example = "USD") + public String code; + @ApiModelProperty(example = "US Dollar") + public String name; + @ApiModelProperty(example = "2") + public Integer decimalPlaces; + @ApiModelProperty(example = "$") + public String displaySymbol; + @ApiModelProperty(example = "currency.USD") + public String nameCode; + @ApiModelProperty(example = "US Dollar ($)") + public String displayLabel; + } + + @ApiModelProperty(example = "9") + public Integer id; + @ApiModelProperty(example = "20") + public Integer chargeId; + @ApiModelProperty(example = "2") + public Integer accountId; + @ApiModelProperty(example = "Share Account Activation Flat") + public String name; + public GetAccountsChargeTimeType chargeTimeType; + public GetAccountsChargeCalculationType chargeCalculationType; + @ApiModelProperty(example = "0") + public Double percentage; + @ApiModelProperty(example = "0") + public Double amountPercentageAppliedTo; + public GetAccountsChargesCurrency currency; + @ApiModelProperty(example = "1") + public Float amount; + @ApiModelProperty(example = "1") + public Float amountPaid; + @ApiModelProperty(example = "0") + public Float amountWaived; + @ApiModelProperty(example = "0") + public Float amountWrittenOff; + @ApiModelProperty(example = "0") + public Float amountOutstanding; + @ApiModelProperty(example = "1") + public Float amountOrPercentage; + @ApiModelProperty(example = "true") + public Boolean isActive; + } + + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "000000002") + public Long accountNo; + @ApiModelProperty(example = "000000013") + public Long savingsAccountNumber; + @ApiModelProperty(example = "7") + public Integer clientId; + @ApiModelProperty(example = "Client_FirstName_2KX8C Client_LastName_NWNG") + public String clientName; + @ApiModelProperty(example = "1") + public Integer productId; + @ApiModelProperty(example = "Share Product") + public String productName; + public GetAccountsStatus status; + public GetAccountsTimeline timeline; + public GetAccountsCurrency currency; + public GetAccountsSummary summary; + public Set purchasedShares; + @ApiModelProperty(example = "13") + public Integer savingsAccountId; + @ApiModelProperty(example = "5") + public Integer currentMarketPrice; + @ApiModelProperty(example = "1") + public Integer lockinPeriod; + public GetAccountsLockPeriodTypeEnum lockPeriodTypeEnum; + @ApiModelProperty(example = "1") + public Integer minimumActivePeriod; + public GetAccountsLockPeriodTypeEnum minimumActivePeriodTypeEnum; + @ApiModelProperty(example = "true") + public Boolean allowDividendCalculationForInactiveClients; + public Set charges; + @ApiModelProperty(example = "") + public List dividends; + } + + @ApiModel(value = "GetAccountsTypeResponse") + public final static class GetAccountsTypeResponse { + private GetAccountsTypeResponse() { + } + + final class GetAccountsPageItems { + private GetAccountsPageItems() { + } + + final class GetAccountsTypeStatus { + private GetAccountsTypeStatus() { + } + + @ApiModelProperty(example = "100") + public Integer id; + @ApiModelProperty(example = "shareAccountStatusType.submitted.and.pending.approval") + public String code; + @ApiModelProperty(example = "Submitted and pending approval") + public String value; + @ApiModelProperty(example = "true") + public Boolean submittedAndPendingApproval; + @ApiModelProperty(example = "false") + public Boolean approved; + @ApiModelProperty(example = "false") + public Boolean rejected; + @ApiModelProperty(example = "false") + public Boolean active; + @ApiModelProperty(example = "false") + public Boolean closed; + } + + final class GetAccountsTypeTimeline { + private GetAccountsTypeTimeline() { + } + + @ApiModelProperty(example = "[2013, 3, 1]") + public LocalDate submittedOnDate; + } + + final class GetAccountsTypePurchasedShares { + private GetAccountsTypePurchasedShares() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "01 May 2013") + public String purchasedDate; + @ApiModelProperty(example = "10") + public Integer numberOfShares; + @ApiModelProperty(example = "5") + public Integer purchasedPrice; + } + + final class GetAccountsTypeSummary { + private GetAccountsTypeSummary() { + } + + public GetAccountsTypeAccountIdResponse.GetAccountsCharges.GetAccountsChargesCurrency currency; + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "000000001") + public Long accountNo; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "Client Name") + public String clientName; + @ApiModelProperty(example = "1") + public Integer productId; + @ApiModelProperty(example = "Share Product Name") + public String productName; + public GetAccountsTypeStatus status; + public GetAccountsTypeTimeline timeline; + public GetAccountsTypeAccountIdResponse.GetAccountsCharges.GetAccountsChargesCurrency currency; + public Set purchasedShares; + public GetAccountsTypeSummary summary; + } + + @ApiModelProperty(example = "1") + public Integer totalFilteredRecords; + public Set pageItems; + } + + @ApiModel(value = "PostAccountsTypeRequest") + public final static class PostAccountsTypeRequest { + private PostAccountsTypeRequest() { + } + + final class PostAccountsCharges { + private PostAccountsCharges() { + } + + @ApiModelProperty(example = "20") + public Integer chargeId; + @ApiModelProperty(example = "1") + public Integer amount; + } + + @ApiModelProperty(example = "7") + public Integer clientId; + @ApiModelProperty(example = "1") + public Integer productId; + @ApiModelProperty(example = "100") + public Integer requestedShares; + @ApiModelProperty(example = "1") + public Integer externalId; + @ApiModelProperty(example = "01 May 2016") + public String submittedDate; + @ApiModelProperty(example = "1") + public Integer minimumActivePeriod; + @ApiModelProperty(example = "0") + public Integer minimumActivePeriodFrequencyType; + @ApiModelProperty(example = "1") + public Integer lockinPeriodFrequency; + @ApiModelProperty(example = "0") + public Integer lockinPeriodFrequencyType; + @ApiModelProperty(example = "01 May 2016") + public String applicationDate; + @ApiModelProperty(example = "true") + public Boolean allowDividendCalculationForInactiveClients; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + public Set charges; + @ApiModelProperty(example = "13") + public Integer savingsAccountId; + } + + @ApiModel(value = "PostAccountsTypeResponse") + public final static class PostAccountsTypeResponse { + private PostAccountsTypeResponse() { + } + + @ApiModelProperty(example = "1") + public Integer resourceId; + } + + @ApiModel(value = "PostAccountsTypeAccountIdRequest") + public final static class PostAccountsTypeAccountIdRequest { + private PostAccountsTypeAccountIdRequest() { + } + + final class PostAccountsRequestedShares { + private PostAccountsRequestedShares() { + } + + @ApiModelProperty(example = "35") + public Integer id; + } + + public Set requestedShares; + } + + @ApiModel(value = "PostAccountsTypeAccountIdResponse") + public final static class PostAccountsTypeAccountIdResponse { + private PostAccountsTypeAccountIdResponse() { + } + + @ApiModelProperty(example = "5") + public Integer resourceId; + } + + @ApiModel(value = "PutAccountsTypeAccountIdRequest") + public final static class PutAccountsTypeAccountIdRequest { + private PutAccountsTypeAccountIdRequest() { + } + + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "01 April 2016") + public String applicationDate; + @ApiModelProperty(example = "20") + public Integer requestedShares; + } + + @ApiModel(value = "PutAccountsTypeAccountIdResponse") + public final static class PutAccountsTypeAccountIdResponse { + private PutAccountsTypeAccountIdResponse() { + } + + final class PutAccountsChanges { + private PutAccountsChanges() { + } + + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "01 April 2016") + public String applicationDate; + @ApiModelProperty(example = "20") + public Integer requestedShares; + @ApiModelProperty(example = "en") + public String locale; + } + + @ApiModelProperty(example = "1") + public Integer resourceId; + public PutAccountsChanges changes; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/api/EntityFieldConfigurationApiResources.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/api/EntityFieldConfigurationApiResources.java index 838e419fe..830557340 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/api/EntityFieldConfigurationApiResources.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/api/EntityFieldConfigurationApiResources.java @@ -18,40 +18,32 @@ */ package org.apache.fineract.portfolio.address.api; -import java.util.Arrays; -import java.util.Collection; -import java.util.HashSet; -import java.util.Set; - -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - -import org.apache.fineract.commands.domain.CommandWrapper; -import org.apache.fineract.commands.service.CommandWrapperBuilder; +import io.swagger.annotations.*; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; import org.apache.fineract.infrastructure.core.api.ApiRequestParameterHelper; -import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; import org.apache.fineract.infrastructure.core.serialization.ApiRequestJsonSerializationSettings; import org.apache.fineract.infrastructure.core.serialization.DefaultToApiJsonSerializer; import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; import org.apache.fineract.portfolio.address.data.AddressData; import org.apache.fineract.portfolio.address.data.FieldConfigurationData; -import org.apache.fineract.portfolio.address.service.AddressReadPlatformServiceImpl; import org.apache.fineract.portfolio.address.service.FieldConfigurationReadPlatformService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; + @Path("/fieldconfiguration/{entity}") @Component @Scope("singleton") +@Api(value = "Entity Field Configuration", description = "Entity Field configuration API is a generic and extensible \n" + "wherein various entities and subentities can be related.\n" + "Also it gives the user an ability to enable/disable fields,\n" + "add regular expression for validation") public class EntityFieldConfigurationApiResources { private final Set RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("clientAddressId", "client_id", @@ -83,7 +75,9 @@ public class EntityFieldConfigurationApiResources { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String getAddresses(@PathParam("entity") final String entityname, @Context final UriInfo uriInfo) { + @ApiOperation(httpMethod = "GET", value = "Retrieves the Entity Field Configuration", notes = "It retrieves all the Entity Field Configuration") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = EntityFieldConfigurationApiResourcesSwagger.GetFieldConfigurationEntityResponse.class, responseContainer = "List")}) + public String getAddresses(@PathParam("entity") @ApiParam(value = "entity") final String entityname, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); final Collection fldconfig = this.readPlatformServicefld diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/api/EntityFieldConfigurationApiResourcesSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/api/EntityFieldConfigurationApiResourcesSwagger.java new file mode 100644 index 000000000..9fb071469 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/api/EntityFieldConfigurationApiResourcesSwagger.java @@ -0,0 +1,52 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.address.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * Created by Chirag Gupta on 12/01/17. + */ +final class EntityFieldConfigurationApiResourcesSwagger { + private EntityFieldConfigurationApiResourcesSwagger() { + } + + @ApiModel(value = "GetFieldConfigurationEntityResponse") + public static final class GetFieldConfigurationEntityResponse { + private GetFieldConfigurationEntityResponse() { + } + + @ApiModelProperty(example = "1") + public Integer fieldConfigurationId; + @ApiModelProperty(example = "ADDRESS") + public String entity; + @ApiModelProperty(example = "CLIENT") + public String subentity; + @ApiModelProperty(example = "addressType") + public String field; + @ApiModelProperty(example = "true") + public String is_enabled; + @ApiModelProperty(example = "false") + public String is_mandatory; + @ApiModelProperty(example = " ") + public String validation_regex; + } +} + diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/api/ChargesApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/api/ChargesApiResource.java index eef68b3aa..3b115ad4f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/api/ChargesApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/api/ChargesApiResource.java @@ -18,23 +18,7 @@ */ package org.apache.fineract.portfolio.charge.api; -import java.util.Arrays; -import java.util.Collection; -import java.util.HashSet; -import java.util.Set; - -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - +import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -49,9 +33,19 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; + @Path("/charges") @Component @Scope("singleton") +@Api(value = "Charges", description = "Its typical for MFIs to add extra costs for their financial products. These are typically Fees or Penalties.\n" + "\n" + "A Charge on fineract platform is what we use to model both Fees and Penalties.\n" + "\n" + "At present we support defining charges for use with Client accounts and both loan and saving products.") public class ChargesApiResource { private final Set CHARGES_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "name", "amount", "currency", "penalty", "active", @@ -82,6 +76,8 @@ public class ChargesApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Retrieve Charges", httpMethod = "GET", notes = "Returns the list of defined charges.\n" + "\n" + "Example Requests:\n" + "\n" + "charges") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ChargesApiResourceSwagger.GetChargesResponse.class, responseContainer = "List")}) public String retrieveAllCharges(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -96,7 +92,9 @@ public class ChargesApiResource { @Path("{chargeId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveCharge(@PathParam("chargeId") final Long chargeId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve a Charge", httpMethod = "GET", notes = "Returns the details of a defined Charge.\n" + "\n" + "Example Requests:\n" + "\n" + "charges/1") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ChargesApiResourceSwagger.GetChargesResponse.class)}) + public String retrieveCharge(@PathParam("chargeId") @ApiParam(value = "chargeId") final Long chargeId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -115,6 +113,8 @@ public class ChargesApiResource { @Path("template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Retrieve Charge Template", httpMethod = "GET", notes = "This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n" + "\n" + "Field Defaults\n" + "Allowed Value Lists\n" + "Example Request:\n" + "\n" + "charges/template\n") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ChargesApiResourceSwagger.GetChargesTemplateResponse.class)}) public String retrieveNewChargeDetails(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -128,7 +128,10 @@ public class ChargesApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String createCharge(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Create/Define a Charge", httpMethod = "POST", notes = "Define a new charge that can later be associated with loans and savings through their respective product definitions or directly on each account instance.") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = ChargesApiResourceSwagger.PostChargesRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ChargesApiResourceSwagger.PostChargesResponse.class)}) + public String createCharge(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createCharge().withJson(apiRequestBodyAsJson).build(); @@ -141,7 +144,10 @@ public class ChargesApiResource { @Path("{chargeId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String updateCharge(@PathParam("chargeId") final Long chargeId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update a Charge", httpMethod = "PUT", notes = "Updates the details of a Charge.") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = ChargesApiResourceSwagger.PutChargesChargeIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ChargesApiResourceSwagger.PutChargesChargeIdResponse.class)}) + public String updateCharge(@PathParam("chargeId") @ApiParam(value = "chargeId") final Long chargeId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateCharge(chargeId).withJson(apiRequestBodyAsJson).build(); @@ -154,7 +160,9 @@ public class ChargesApiResource { @Path("{chargeId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String deleteCharge(@PathParam("chargeId") final Long chargeId) { + @ApiOperation(value = "Delete a Charge", httpMethod = "DELETE", notes = "Deletes a Charge.") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ChargesApiResourceSwagger.DeleteChargesChargeIdResponse.class)}) + public String deleteCharge(@PathParam("chargeId") @ApiParam(value = "chargeId") final Long chargeId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteCharge(chargeId).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/api/ChargesApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/api/ChargesApiResourceSwagger.java new file mode 100644 index 000000000..39abd4fa2 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/api/ChargesApiResourceSwagger.java @@ -0,0 +1,230 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.charge.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.Set; + +/** + * Created by Chirag Gupta on 12/01/17. + */ +final class ChargesApiResourceSwagger { + + @ApiModel(value = "GetChargesResponse") + public static final class GetChargesResponse { + private GetChargesResponse() { + } + + final class GetChargesCurrencyResponse { + @ApiModelProperty(example = "USD") + public String code; + @ApiModelProperty(example = "US Dollar") + public String name; + @ApiModelProperty(example = "2") + public Integer decimalPlaces; + @ApiModelProperty(example = "$") + public String displaySymbol; + @ApiModelProperty(example = "currency.USD") + public String nameCode; + @ApiModelProperty(example = "US Dollar ($)") + public String displayLabel; + } + + final class GetChargesTimeTypeResponse { + private GetChargesTimeTypeResponse() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "chargeTimeType.disbursement") + public String code; + @ApiModelProperty(example = "Disbursement") + public String value; + } + + final class GetChargesAppliesToResponse { + private GetChargesAppliesToResponse() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "chargeAppliesTo.loan") + public String code; + @ApiModelProperty(example = "Loan") + public String value; + } + + final class GetChargesCalculationTypeResponse { + private GetChargesCalculationTypeResponse() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "chargeCalculationType.flat") + public String code; + @ApiModelProperty(example = "Flat") + public String value; + } + + final class GetChargesPaymentModeResponse { + private GetChargesPaymentModeResponse() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "chargepaymentmode.accounttransfer") + public String code; + @ApiModelProperty(example = "Account Transfer") + public String value; + } + + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "Loan Service fee") + public String name; + @ApiModelProperty(example = "true") + public String active; + @ApiModelProperty(example = "false") + public String penalty; + public GetChargesCurrencyResponse currency; + @ApiModelProperty(example = "230.56") + public Float amount; + public GetChargesTimeTypeResponse chargeTimeType; + public GetChargesAppliesToResponse chargeAppliesTo; + public GetChargesCalculationTypeResponse chargeCalculationType; + public GetChargesPaymentModeResponse chargePaymentMode; + } + + @ApiModel(value = "PostChargesRequest") + public static final class PostChargesRequest { + private PostChargesRequest() { + } + + @ApiModelProperty(example = "Loan Service fee") + public String name; + @ApiModelProperty(example = "1") + public Integer chargeAppliesTo; + @ApiModelProperty(example = "USD") + public String currencyCode; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "230.56") + public Float amount; + @ApiModelProperty(example = "1") + public Integer chargeTimeType; + @ApiModelProperty(example = "1") + public Integer chargeCalculationType; + @ApiModelProperty(example = "1") + public Integer chargePaymentMode; + @ApiModelProperty(example = "true") + public String active; + } + + @ApiModel(value = "PostChargesResponse") + public static final class PostChargesResponse { + private PostChargesResponse() { + } + + @ApiModelProperty(example = "1") + public Integer resourceId; + } + + @ApiModel(value = "PutChargesChargeIdRequest") + public static final class PutChargesChargeIdRequest { + private PutChargesChargeIdRequest() { + } + + @ApiModelProperty(example = "Loan service fee(changed)") + public String name; + } + + @ApiModel(value = "PutChargesChargeIdResponse") + public static final class PutChargesChargeIdResponse { + private PutChargesChargeIdResponse() { + } + + @ApiModelProperty(example = "1") + public Integer resourceId; + public PutChargesChargeIdRequest changes; + } + + @ApiModel(value = "DeleteChargesChargeIdResponse") + public static final class DeleteChargesChargeIdResponse { + private DeleteChargesChargeIdResponse() { + } + + @ApiModelProperty(example = "1") + public Integer resourceId; + } + + @ApiModel(value = "GetChargesTemplateResponse") + public static final class GetChargesTemplateResponse { + private GetChargesTemplateResponse() { + } + + final class GetChargesTemplateLoanChargeCalculationTypeOptions { + private GetChargesTemplateLoanChargeCalculationTypeOptions() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "chargeCalculationType.flat") + public String code; + @ApiModelProperty(example = "Flat") + public String value; + } + + final class GetChargesTemplateLoanChargeTimeTypeOptions { + private GetChargesTemplateLoanChargeTimeTypeOptions() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "chargeTimeType.specifiedDueDate") + public String code; + @ApiModelProperty(example = "Specified due date") + public String value; + } + final class GetChargesTemplateFeeFrequencyOptions{ + private GetChargesTemplateFeeFrequencyOptions(){} + @ApiModelProperty(example = "0") + public Integer id; + @ApiModelProperty(example = "loanTermFrequency.periodFrequencyType.days") + public String code; + @ApiModelProperty(example = "Days") + public String value; + } + @ApiModelProperty(example = "false") + public String active; + @ApiModelProperty(example = "false") + public String penalty; + public Set currencyOptions; + public Set chargeCalculationTypeOptions; + public Set chargeAppliesToOptions; + public Set chargeTimeTypeOptions; + public Set chargePaymentModeOptions; + public Set loanChargeCalculationTypeOptions; + public Set loanChargeTimeTypeOptions; + public Set savingsChargeCalculationTypeOptions; + public Set savingsChargeTimeTypeOptions; + public Set feeFrequencyOptions; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientAddressApiResources.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientAddressApiResources.java index d4eb074ac..b0f675363 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientAddressApiResources.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientAddressApiResources.java @@ -18,23 +18,6 @@ */ package org.apache.fineract.portfolio.client.api; -import java.util.Arrays; -import java.util.Collection; -import java.util.HashSet; -import java.util.Set; - -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; @@ -46,12 +29,19 @@ import org.apache.fineract.infrastructure.core.serialization.DefaultToApiJsonSer import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; import org.apache.fineract.portfolio.address.data.AddressData; import org.apache.fineract.portfolio.address.service.AddressReadPlatformServiceImpl; -import org.apache.fineract.portfolio.client.data.ClientApiCollectionConstants; -import org.apache.fineract.portfolio.client.data.ClientData; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; + @Path("/client") @Component @Scope("singleton") @@ -102,9 +92,10 @@ public class ClientAddressApiResources { @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @ApiOperation(value = "Create an address for a Client", notes = "Mandatory Fields : \n" + "type and clientId") - @ApiResponses(value = { @ApiResponse(code = 200, message = "", response = CommandProcessingResult.class) }) - public String AddClientAddress(@QueryParam("type") final long addressTypeId, - @PathParam("clientid") final long clientid, final String apiRequestBodyAsJson) { + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = ClientAddressApiResourcesSwagger.PostClientClientIdAddressesRequest.class)}) + @ApiResponses({ @ApiResponse(code = 200, message = "OK", response = ClientAddressApiResourcesSwagger.PostClientClientIdAddressesResponse.class)}) + public String AddClientAddress(@QueryParam("type") @ApiParam(value = "type") final long addressTypeId, + @PathParam("clientid") @ApiParam(value = "clientId") final long clientid, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().addClientAddress(clientid, addressTypeId) .withJson(apiRequestBodyAsJson).build(); @@ -119,9 +110,9 @@ public class ClientAddressApiResources { @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @ApiOperation(value = "List all addresses for a Client", notes = "Example Requests:\n" + "\n" +"client/1/addresses\n" + "\n" + "\n" +"clients/1/addresses?status=false,true&&type=1,2,3" ) - @ApiResponses({@ApiResponse(code = 200, message = "", response = AddressData.class)}) - public String getAddresses(@QueryParam("status") final String status, @QueryParam("type") final long addressTypeId, - @PathParam("clientid") final long clientid, @Context final UriInfo uriInfo) { + @ApiResponses({@ApiResponse(code = 200, message = "OK", responseContainer = "List", response = ClientAddressApiResourcesSwagger.GetClientClientIdAddressesResponse.class)}) + public String getAddresses(@QueryParam("status") @ApiParam(value = "status") final String status, @QueryParam("type") @ApiParam(value = "type") final long addressTypeId, + @PathParam("clientid") @ApiParam(value = "clientId") final long clientid, @Context final UriInfo uriInfo) { Collection address; this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -146,10 +137,10 @@ public class ClientAddressApiResources { @Path("/{clientid}/addresses") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @ApiOperation(value = "update an address for a Client", notes = "All the address fields can be updated by using update client address API\n" + "\n" + "Mandatory Fields\n" + "type and addressId") - @ApiImplicitParams({@ApiImplicitParam(value = "body", dataType = "body", dataTypeClass = ClientApiConstants.class)}) - @ApiResponses(value = { @ApiResponse(code = 200, message = "", response = CommandProcessingResult.class) }) - public String UpdateClientAddress(@PathParam("clientid") final long clientid, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update an address for a Client", notes = "All the address fields can be updated by using update client address API\n" + "\n" + "Mandatory Fields\n" + "type and addressId") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = ClientAddressApiResourcesSwagger.PutClientClientIdAddressesRequest.class)}) + @ApiResponses(value = { @ApiResponse(code = 200, message = "OK", response = ClientAddressApiResourcesSwagger.PutClientClientIdAddressesResponse.class)}) + public String UpdateClientAddress(@PathParam("clientid") @ApiParam(value = "clientId") final long clientid, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateClientAddress(clientid) .withJson(apiRequestBodyAsJson).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientAddressApiResourcesSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientAddressApiResourcesSwagger.java new file mode 100644 index 000000000..8db0c8250 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientAddressApiResourcesSwagger.java @@ -0,0 +1,127 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.client.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * Created by Chirag Gupta on 01/12/18. + */ +final class ClientAddressApiResourcesSwagger { + private ClientAddressApiResourcesSwagger() { + } + + @ApiModel(value = "PostClientClientIdAddressesRequest") + public final static class PostClientClientIdAddressesRequest { + private PostClientClientIdAddressesRequest() { + } + + @ApiModelProperty(example = "Ipca") + public String street; + @ApiModelProperty(example = "Kandivali") + public String addressLine1; + @ApiModelProperty(example = "plot47") + public String addressLine2; + @ApiModelProperty(example = "charkop") + public String addressLine3; + @ApiModelProperty(example = "Mumbai") + public String city; + @ApiModelProperty(example = "800") + public Integer stateProvinceId; + @ApiModelProperty(example = "802") + public Integer countryId; + @ApiModelProperty(example = "400064") + public Long postalCode; + } + + @ApiModel(value = "PostClientClientIdAddressesResponse") + public final static class PostClientClientIdAddressesResponse { + private PostClientClientIdAddressesResponse() { + } + + @ApiModelProperty(example = "15") + public Integer resourceId; + } + + @ApiModel(value = "GetClientClientIdAddressesResponse") + public final static class GetClientClientIdAddressesResponse { + private GetClientClientIdAddressesResponse() { + } + + @ApiModelProperty(example = "111755") + public Long client_id; + @ApiModelProperty(example = "PERMANENT ADDRESS") + public String addressType; + @ApiModelProperty(example = "14") + public Integer addressId; + @ApiModelProperty(example = "804") + public Integer addressTypeId; + @ApiModelProperty(example = "false") + public Boolean isActive; + @ApiModelProperty(example = "anki's home") + public String street; + @ApiModelProperty(example = "test123") + public String addressLine1; + @ApiModelProperty(example = "iuyt") + public String addressLine2; + @ApiModelProperty(example = " ") + public String addressLine3; + @ApiModelProperty(example = " ") + public String townVillage; + @ApiModelProperty(example = "mumbai") + public String city; + @ApiModelProperty(example = " ") + public String countyDistrict; + @ApiModelProperty(example = "801") + public Integer stateProvinceId; + @ApiModelProperty(example = "UNITED STATES") + public String countryName; + @ApiModelProperty(example = "GUJRAT") + public String stateName; + @ApiModelProperty(example = "807") + public Integer countryId; + @ApiModelProperty(example = "400095") + public Long postalCode; + @ApiModelProperty(example = " ") + public String createdBy; + @ApiModelProperty(example = " ") + public String updatedBy; + } + + @ApiModel(value = "PutClientClientIdAddressesRequest") + public final static class PutClientClientIdAddressesRequest { + private PutClientClientIdAddressesRequest() { + } + + @ApiModelProperty(example = "67") + public Integer addressId; + @ApiModelProperty(example = "goldensource") + public String street; + } + + @ApiModel(value = "PutClientClientIdAddressesResponse") + public final static class PutClientClientIdAddressesResponse { + private PutClientClientIdAddressesResponse() { + } + + @ApiModelProperty(example = "67") + public Integer resourceId; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientChargesApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientChargesApiResource.java index 8baf881cc..4ccf4f2cd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientChargesApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientChargesApiResource.java @@ -18,23 +18,6 @@ */ package org.apache.fineract.portfolio.client.api; -import java.util.Arrays; -import java.util.Collection; -import java.util.Set; - -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.DefaultValue; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - import io.swagger.annotations.*; import org.apache.commons.lang.StringUtils; import org.apache.fineract.commands.domain.CommandWrapper; @@ -52,15 +35,21 @@ import org.apache.fineract.infrastructure.security.service.PlatformSecurityConte import org.apache.fineract.portfolio.charge.data.ChargeData; import org.apache.fineract.portfolio.charge.service.ChargeReadPlatformService; import org.apache.fineract.portfolio.client.data.ClientChargeData; -import org.apache.fineract.portfolio.client.data.ClientData; import org.apache.fineract.portfolio.client.data.ClientTransactionData; -import org.apache.fineract.portfolio.client.domain.ClientCharge; import org.apache.fineract.portfolio.client.service.ClientChargeReadPlatformService; import org.apache.fineract.portfolio.client.service.ClientTransactionReadPlatformService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; +import java.util.Arrays; +import java.util.Collection; +import java.util.Set; + @Path("/clients/{clientId}/charges") @Component @Api(value = "Client Charges", description = "It is typical for MFI's to directly associate charges with an implicit Client account. These can be either fees or penalties\n" + "\n" + "Client Charges are client specific instances of Charges. Refer Charges for documentation of the various properties of a charge, Only additional properties ( specific to the context of a Charge being associated with a Client account) are described here") @@ -94,11 +83,11 @@ public class ClientChargesApiResource { @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @ApiOperation(value = "List Client Charges", notes = "The list capability of client charges supports pagination." + "Example Requests:\n" + "clients/1/charges\n" + "\nclients/1/charges?offset=0&limit=5" ) - @ApiResponses(value = { @ApiResponse(code = 200, message = "", response = ClientCharge.class) }) - public String retrieveAllClientCharges(@PathParam("clientId") final Long clientId, - @DefaultValue(ClientApiConstants.CLIENT_CHARGE_QUERY_PARAM_STATUS_VALUE_ALL) @QueryParam(ClientApiConstants.CLIENT_CHARGE_QUERY_PARAM_STATUS) final String chargeStatus, - @QueryParam("pendingPayment") final Boolean pendingPayment, @Context final UriInfo uriInfo, - @QueryParam("limit") final Integer limit, @QueryParam("offset") final Integer offset) { + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ClientChargesApiResourceSwagger.GetClientsClientIdChargesResponse.class) }) + public String retrieveAllClientCharges(@PathParam("clientId") @ApiParam(value = "clientId") final Long clientId, + @DefaultValue(ClientApiConstants.CLIENT_CHARGE_QUERY_PARAM_STATUS_VALUE_ALL) @QueryParam(ClientApiConstants.CLIENT_CHARGE_QUERY_PARAM_STATUS) @ApiParam(value = "chargeStatus") final String chargeStatus, + @QueryParam("pendingPayment") @ApiParam(value = "pendingPayment") final Boolean pendingPayment, @Context final UriInfo uriInfo, + @QueryParam("limit") @ApiParam(value = "limit") final Integer limit, @QueryParam("offset") @ApiParam(value = "offset") final Integer offset) { this.context.authenticatedUser().validateHasReadPermission(ClientApiConstants.CLIENT_CHARGES_RESOURCE_NAME); final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters()); if (!(is(chargeStatus, ClientApiConstants.CLIENT_CHARGE_QUERY_PARAM_STATUS_VALUE_ALL) @@ -141,8 +130,8 @@ public class ClientChargesApiResource { @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @ApiOperation(value = "Retrieve a Client Charge", notes = "Example Requests:\n" + "clients/1/charges/1\n" + "\n" + "\n" + "clients/1/charges/1?fields=name,id" ) - @ApiResponses(value = { @ApiResponse(code = 200, message = "", response = ClientChargeData.class) }) - public String retrieveClientCharge(@PathParam("clientId") final Long clientId, @PathParam("chargeId") final Long chargeId, + @ApiResponses({@ApiResponse(code = 200, message = "", response = ClientChargesApiResourceSwagger.GetClientsClientIdChargesResponse.GetClientsChargesPageItems.class) }) + public String retrieveClientCharge(@PathParam("clientId") @ApiParam(value = "clientId") final Long clientId, @PathParam("chargeId") @ApiParam(value = "chargeId") final Long chargeId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(ClientApiConstants.CLIENT_CHARGES_RESOURCE_NAME); @@ -170,9 +159,9 @@ public class ClientChargesApiResource { @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @ApiOperation(value = "Add Client Charge", notes = " This API associates a Client charge with an implicit Client account\n" + "Mandatory Fields : \n" + "chargeId and dueDate \n" + "Optional Fields : \n" + "amount" ) - @ApiImplicitParams({@ApiImplicitParam(value = "body", dataType = "body", dataTypeClass = ClientData.class )}) - @ApiResponses(value = { @ApiResponse(code = 200, message = "", response = CommandProcessingResult.class) }) - public String applyClientCharge(@PathParam("clientId") final Long clientId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = ClientChargesApiResourceSwagger.PostClientsClientIdChargesRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "", response = ClientChargesApiResourceSwagger.PostClientsClientIdChargesResponse.class) }) + public String applyClientCharge(@PathParam("clientId") @ApiParam(value = "clientId") final Long clientId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createClientCharge(clientId).withJson(apiRequestBodyAsJson) .build(); @@ -186,9 +175,11 @@ public class ClientChargesApiResource { @Path("{chargeId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @ApiOperation(value = "Pay a Client Charge", notes = "Mandatory Fields\n" + "transactionDate and amount " + "" + "\"Pay either a part of or the entire due amount for a charge.(command=paycharge)\n" + "\n" + "Waive a Client Charge\n" + "\n" + "\n" + "This API provides the facility of waiving off the remaining amount on a client charge (command=waive)\n" ) - public String payOrWaiveClientCharge(@PathParam("clientId") final Long clientId, @PathParam("chargeId") final Long chargeId, - @QueryParam("command") final String commandParam, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Pay a Client Charge | Waive a Client Charge", notes = "Pay a Client Charge:\n\n" + "Mandatory Fields:" + "transactionDate and amount " + "" + "\"Pay either a part of or the entire due amount for a charge.(command=paycharge)\n" + "\n" + "Waive a Client Charge:\n" + "\n" + "\n" + "This API provides the facility of waiving off the remaining amount on a client charge (command=waive)\n\n" + "Showing request/response for 'Pay a Client Charge'" ) + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = ClientChargesApiResourceSwagger.PostClientsClientIdChargesChargeIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ClientChargesApiResourceSwagger.PostClientsClientIdChargesChargeIdResponse.class)}) + public String payOrWaiveClientCharge(@PathParam("clientId") @ApiParam(value = "clientId") final Long clientId, @PathParam("chargeId") @ApiParam(value = "chargeId") final Long chargeId, + @QueryParam("command") @ApiParam(value = "command") final String commandParam, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { String json = ""; if (is(commandParam, ClientApiConstants.CLIENT_CHARGE_COMMAND_WAIVE_CHARGE)) { @@ -224,8 +215,8 @@ public class ClientChargesApiResource { @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @ApiOperation(value = "Delete a Client Charge", notes = "Deletes a Client Charge on which no transactions have taken place (either payments or waivers). ") - @ApiResponses({@ApiResponse(code = 200, message = "", response = CommandProcessingResult.class)}) - public String deleteClientCharge(@PathParam("clientId") final Long clientId, @PathParam("chargeId") final Long chargeId) { + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ClientChargesApiResourceSwagger.DeleteClientsClientIdChargesChargeIdResponse.class)}) + public String deleteClientCharge(@PathParam("clientId") @ApiParam(value = "clientId") final Long clientId, @PathParam("chargeId") @ApiParam(value = "chargeId") final Long chargeId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteClientCharge(clientId, chargeId).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientChargesApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientChargesApiResourceSwagger.java new file mode 100644 index 000000000..7239dac31 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientChargesApiResourceSwagger.java @@ -0,0 +1,196 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.client.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.math.BigDecimal; +import java.time.LocalDate; +import java.util.Set; + +/** + * Created by Chirag Gupta on 01/12/18. + */ +final class ClientChargesApiResourceSwagger { + private ClientChargesApiResourceSwagger() { + } + + @ApiModel(value = "GetClientsClientIdChargesResponse") + public final static class GetClientsClientIdChargesResponse { + private GetClientsClientIdChargesResponse() { + } + + final class GetClientsChargesPageItems { + private GetClientsChargesPageItems() { + } + + final class GetClientChargeTimeType { + private GetClientChargeTimeType() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "chargeTimeType.specifiedDueDate") + public String code; + @ApiModelProperty(example = "Specified due date") + public String value; + } + + final class GetClientChargeCalculationType { + private GetClientChargeCalculationType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "chargeCalculationType.flat") + public String code; + @ApiModelProperty(example = "Flat") + public String value; + } + + final class GetClientChargeCurrency { + private GetClientChargeCurrency() { + } + + @ApiModelProperty(example = "USD") + public String code; + @ApiModelProperty(example = "US Dollar") + public String name; + @ApiModelProperty(example = "2") + public Integer decimalPlaces; + @ApiModelProperty(example = "$") + public String displaySymbol; + @ApiModelProperty(example = "currency.USD") + public String nameCode; + @ApiModelProperty(example = "US Dollar ($)") + public String displayLabel; + } + + @ApiModelProperty(example = "3") + public Integer id; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "5") + public Integer chargeId; + @ApiModelProperty(example = "Client Fee 1") + public String name; + public GetClientChargeTimeType chargeTimeType; + @ApiModelProperty(example = "[2015, 8, 17]") + public LocalDate dueDate; + public GetClientChargeCalculationType chargeCalculationType; + public GetClientChargeCurrency currency; + @ApiModelProperty(example = "100.000000") + public BigDecimal amount; + @ApiModelProperty(example = "0") + public BigDecimal amountPaid; + @ApiModelProperty(example = "100.000000") + public BigDecimal amountWaived; + @ApiModelProperty(example = "0") + public BigDecimal amountWrittenOff; + @ApiModelProperty(example = "0.000000") + public BigDecimal amountOutstanding; + @ApiModelProperty(example = "true") + public Boolean penalty; + @ApiModelProperty(example = "true") + public Boolean isActive; + @ApiModelProperty(example = "false") + public Boolean isPaid; + @ApiModelProperty(example = "true") + public Boolean isWaived; + } + + @ApiModelProperty(example = "4") + public Integer totalFilteredRecords; + public Set pageItems; + } + + @ApiModel(value = "PostClientsClientIdChargesRequest") + public final static class PostClientsClientIdChargesRequest { + private PostClientsClientIdChargesRequest() { + } + + @ApiModelProperty(example = "100") + public Integer amount; + @ApiModelProperty(example = "226") + public Integer chargeId; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "01 September 2015") + public String dueDate; + @ApiModelProperty(example = "en") + public String locale; + } + + @ApiModel(value = "PostClientsClientIdChargesResponse") + public final static class PostClientsClientIdChargesResponse { + private PostClientsClientIdChargesResponse() { + } + + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "189") + public Integer chargeId; + @ApiModelProperty(example = "164") + public Integer resourceId; + } + + @ApiModel(value = "PostClientsClientIdChargesChargeIdRequest") + public final static class PostClientsClientIdChargesChargeIdRequest { + private PostClientsClientIdChargesChargeIdRequest() { + } + + @ApiModelProperty(example = "200") + public Integer amount; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "01 September 2015") + public String transactionDate; + } + + @ApiModel(value = "PostClientsClientIdChargesChargeIdResponse") + public final static class PostClientsClientIdChargesChargeIdResponse { + private PostClientsClientIdChargesChargeIdResponse() { + } + + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "189") + public Integer clientId; + @ApiModelProperty(example = "157") + public Integer resourceId; + @ApiModelProperty(example = "221") + public Integer transactionId; + } + + @ApiModel(value = "DeleteClientsClientIdChargesChargeIdResponse") + public final static class DeleteClientsClientIdChargesChargeIdResponse { + private DeleteClientsClientIdChargesChargeIdResponse() { + } + + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "189") + public Integer clientId; + @ApiModelProperty(example = "164") + public Integer resourceId; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientIdentifiersApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientIdentifiersApiResource.java index 96c30ea32..cb28f5789 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientIdentifiersApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientIdentifiersApiResource.java @@ -18,23 +18,6 @@ */ package org.apache.fineract.portfolio.client.api; -import java.util.Arrays; -import java.util.Collection; -import java.util.HashSet; -import java.util.Set; - -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; @@ -48,7 +31,6 @@ import org.apache.fineract.infrastructure.core.serialization.DefaultToApiJsonSer import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; import org.apache.fineract.portfolio.client.data.ClientData; import org.apache.fineract.portfolio.client.data.ClientIdentifierData; -import org.apache.fineract.portfolio.client.domain.ClientIdentifier; import org.apache.fineract.portfolio.client.exception.DuplicateClientIdentifierException; import org.apache.fineract.portfolio.client.service.ClientIdentifierReadPlatformService; import org.apache.fineract.portfolio.client.service.ClientReadPlatformService; @@ -56,10 +38,19 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; + @Path("/clients/{clientId}/identifiers") @Component @Scope("singleton") -@Api(value = "Client Identifier Api", description = "Client Identifiers refer to documents that are used to uniquely identify a customer\n" + "Ex: Drivers License, Passport, Ration card etc ") +@Api(value = "Client Identifier", description = "Client Identifiers refer to documents that are used to uniquely identify a customer\n" + "Ex: Drivers License, Passport, Ration card etc ") public class ClientIdentifiersApiResource { private static final Set CLIENT_IDENTIFIER_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "clientId", @@ -95,8 +86,8 @@ public class ClientIdentifiersApiResource { @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @ApiOperation(value = "List all Identifiers for a Client", notes = "Example Requests:\n" + "clients/1/identifiers\n" + "\n" + "\n" + "clients/1/identifiers?fields=documentKey,documentType,description") - @ApiResponses({@ApiResponse(code = 200, message = "", response = ClientIdentifierData.class)}) - public String retrieveAllClientIdentifiers(@Context final UriInfo uriInfo, @PathParam("clientId") final Long clientId) { + @ApiResponses({@ApiResponse(code = 200, message = "OK", responseContainer = "List", response = ClientIdentifiersApiResourceSwagger.GetClientsClientIdIdentifiersResponse.class)}) + public String retrieveAllClientIdentifiers(@Context final UriInfo uriInfo, @PathParam("clientId") @ApiParam(value = "clientId") final Long clientId) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -112,7 +103,7 @@ public class ClientIdentifiersApiResource { @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @ApiOperation(value = "Retrieve Client Identifier Details Template", notes = "This is a convenience resource useful for building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n" + "\n" + " Field Defaults\n" + " Allowed Value Lists\n" + "\n\nExample Request:\n" + "clients/1/identifiers/template" ) - @ApiResponses({@ApiResponse(code = 200, message = "", response = ClientIdentifierData.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ClientIdentifiersApiResourceSwagger.GetClientsClientIdIdentifiersTemplateResponse.class)}) public String newClientIdentifierDetails(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -128,9 +119,9 @@ public class ClientIdentifiersApiResource { @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @ApiOperation(value = "Create an Identifier for a Client", notes = "Mandatory Fields\n" + "documentKey, documentTypeId " ) - @ApiImplicitParams({@ApiImplicitParam(value = "body", dataType = "body", dataTypeClass = ClientData.class)}) - @ApiResponses({@ApiResponse(code = 200, message = "", response = CommandProcessingResult.class)}) - public String createClientIdentifier(@PathParam("clientId") final Long clientId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = ClientIdentifiersApiResourceSwagger.PostClientsClientIdIdentifiersRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ClientIdentifiersApiResourceSwagger.PostClientsClientIdIdentifiersResponse.class)}) + public String createClientIdentifier(@PathParam("clientId") @ApiParam(value = "clientId") final Long clientId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { try { final CommandWrapper commandRequest = new CommandWrapperBuilder().createClientIdentifier(clientId) @@ -157,9 +148,9 @@ public class ClientIdentifiersApiResource { @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @ApiOperation(value = "Retrieve a Client Identifier", notes = "Example Requests:\n" + "clients/1/identifier/2\n" + "\n" + "\n" + "clients/1/identifier/2?template=true\n" + "\n" + "clients/1/identifiers/2?fields=documentKey,documentType,description" ) - @ApiResponses({@ApiResponse(code = 200, message = "", response = ClientIdentifierData.class)}) - public String retrieveClientIdentifiers(@PathParam("clientId") final Long clientId, - @PathParam("identifierId") final Long clientIdentifierId, @Context final UriInfo uriInfo) { + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ClientIdentifiersApiResourceSwagger.GetClientsClientIdIdentifiersResponse.class)}) + public String retrieveClientIdentifiers(@PathParam("clientId") @ApiParam(value = "clientId") final Long clientId, + @PathParam("identifierId") @ApiParam(value = "identifierId") final Long clientIdentifierId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -179,11 +170,11 @@ public class ClientIdentifiersApiResource { @Path("{identifierId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @ApiOperation(value = "Update a Client Identifier") - @ApiImplicitParams({@ApiImplicitParam(value = "body", dataType = "body", dataTypeClass = ClientData.class)}) - @ApiResponses({@ApiResponse(code = 200, message = "", response = CommandProcessingResult.class)}) - public String updateClientIdentifer(@PathParam("clientId") final Long clientId, - @PathParam("identifierId") final Long clientIdentifierId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update a Client Identifier", notes = "Updates a Client Identifier") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = ClientIdentifiersApiResourceSwagger.PutClientsClientIdIdentifiersIdentifierIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ClientIdentifiersApiResourceSwagger.PutClientsClientIdIdentifiersIdentifierIdResponse.class)}) + public String updateClientIdentifer(@PathParam("clientId") @ApiParam(value = "clientId") final Long clientId, + @PathParam("identifierId") @ApiParam(value = "identifierId") final Long clientIdentifierId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { try { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateClientIdentifier(clientId, clientIdentifierId) @@ -208,10 +199,10 @@ public class ClientIdentifiersApiResource { @Path("{identifierId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @ApiOperation(value = "Delete a Client Identifier") - @ApiResponses({@ApiResponse(code = 200, message = "", response = CommandProcessingResult.class)}) - public String deleteClientIdentifier(@PathParam("clientId") final Long clientId, - @PathParam("identifierId") final Long clientIdentifierId) { + @ApiOperation(value = "Delete a Client Identifier", notes = "Deletes a Client Identifier") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ClientIdentifiersApiResourceSwagger.DeleteClientsClientIdIdentifiersIdentifierIdResponse.class)}) + public String deleteClientIdentifier(@PathParam("clientId") @ApiParam(value = "clientId") final Long clientId, + @PathParam("identifierId") @ApiParam(value = "identifierId") final Long clientIdentifierId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteClientIdentifier(clientId, clientIdentifierId).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientIdentifiersApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientIdentifiersApiResourceSwagger.java new file mode 100644 index 000000000..c55970917 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientIdentifiersApiResourceSwagger.java @@ -0,0 +1,144 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.client.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.Set; + +/** + * Created by Chirag Gupta on 01/13/18. + */ +final class ClientIdentifiersApiResourceSwagger { + private ClientIdentifiersApiResourceSwagger() { + } + + @ApiModel(value = "GetClientsClientIdIdentifiersResponse") + public final static class GetClientsClientIdIdentifiersResponse { + private GetClientsClientIdIdentifiersResponse() { + } + + final class GetClientsDocumentType { + private GetClientsDocumentType() { + } + + @ApiModelProperty(example = "3") + public Integer id; + @ApiModelProperty(example = "Drivers License") + public String name; + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "1") + public Integer clientId; + public GetClientsDocumentType documentType; + @ApiModelProperty(example = "12345") + public String documentKey; + @ApiModelProperty(example = "Issued in the year 2--7") + public String description; + } + + @ApiModel(value = "GetClientsClientIdIdentifiersTemplateResponse") + public final static class GetClientsClientIdIdentifiersTemplateResponse { + private GetClientsClientIdIdentifiersTemplateResponse() { + } + + final class GetClientsAllowedDocumentTypes { + private GetClientsAllowedDocumentTypes() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "Passport") + public String name; + @ApiModelProperty(example = "0") + public Integer position; + } + + public Set allowedDocumentTypes; + } + + @ApiModel(value = "PostClientsClientIdIdentifiersRequest") + public final static class PostClientsClientIdIdentifiersRequest { + private PostClientsClientIdIdentifiersRequest() { + } + + @ApiModelProperty(example = "1") + public Integer documentTypeId; + @ApiModelProperty(example = "KA-54677") + public String documentKey; + @ApiModelProperty(example = "Document has been verified") + public String description; + } + + @ApiModel(value = "PutClientsClientIdIdentifiersIdentifierIdRequest") + public final static class PutClientsClientIdIdentifiersIdentifierIdRequest { + private PutClientsClientIdIdentifiersIdentifierIdRequest() { + } + + @ApiModelProperty(example = "4") + public Integer documentTypeId; + @ApiModelProperty(example = "KA-94667") + public String documentKey; + @ApiModelProperty(example = "Document has been updated") + public String description; + } + + @ApiModel(value = "PutClientsClientIdIdentifiersIdentifierIdResponse") + public final static class PutClientsClientIdIdentifiersIdentifierIdResponse { + private PutClientsClientIdIdentifiersIdentifierIdResponse() { + } + + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "3") + public Integer resourceId; + public PutClientsClientIdIdentifiersIdentifierIdRequest changes; + } + + @ApiModel(value = "PostClientsClientIdIdentifiersResponse") + public final static class PostClientsClientIdIdentifiersResponse { + private PostClientsClientIdIdentifiersResponse() { + } + + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "3") + public Integer resourceId; + } + + @ApiModel(value = "DeleteClientsClientIdIdentifiersIdentifierIdResponse") + public final static class DeleteClientsClientIdIdentifiersIdentifierIdResponse { + private DeleteClientsClientIdIdentifiersIdentifierIdResponse() { + } + + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "3") + public Integer resourceId; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientTransactionsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientTransactionsApiResource.java index ddcc76ee3..196cb5afa 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientTransactionsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientTransactionsApiResource.java @@ -18,17 +18,6 @@ */ package org.apache.fineract.portfolio.client.api; -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - import io.swagger.annotations.*; import org.apache.commons.lang.StringUtils; import org.apache.fineract.commands.domain.CommandWrapper; @@ -42,13 +31,16 @@ import org.apache.fineract.infrastructure.core.serialization.DefaultToApiJsonSer import org.apache.fineract.infrastructure.core.service.Page; import org.apache.fineract.infrastructure.core.service.SearchParameters; import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; -import org.apache.fineract.portfolio.client.data.ClientData; import org.apache.fineract.portfolio.client.data.ClientTransactionData; -import org.apache.fineract.portfolio.client.domain.ClientTransaction; import org.apache.fineract.portfolio.client.service.ClientTransactionReadPlatformService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; + @Path("/clients/{clientId}/transactions") @Component @Api(value = "Client Transaction", description = "Client Transactions refer to transactions made directly againt a Client's internal account. Currently, these transactions are only created as a result of charge payments/waivers. You are allowed to undo a transaction, however you cannot explicitly create one. ") @@ -76,10 +68,10 @@ public class ClientTransactionsApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @ApiOperation(value = "List Client Transactions", notes = "The list capability of client transaction can support pagination." + "\n\nMandatory Arguments : " + "offset\n" + " Integer Mandatory, defaults to 0 \n" + " Indicates the result from which pagination starts\n" + "limit\n" + " Integer Mandatory, defaults to 200 \n" + " Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1\n" + "\n" + "\n\n" + "Example Requests:\n" + "clients/189/transactions\n" + "clients/189/transactions?offset=10&limit=50" ) - @ApiResponses({@ApiResponse(code = 200, message = "", response = ClientTransactionData.class)}) - public String retrieveAllClientTransactions(@PathParam("clientId") final Long clientId, @Context final UriInfo uriInfo, - @QueryParam("offset") final Integer offset, @QueryParam("limit") final Integer limit) { + @ApiOperation(value = "List Client Transactions", notes = "The list capability of client transaction can support pagination." + "\n\n" + "Example Requests:\n\n" + "clients/189/transactions\n\n" + "clients/189/transactions?offset=10&limit=50" ) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ClientTransactionsApiResourceSwagger.GetClientsClientIdTransactionsResponse.class)}) + public String retrieveAllClientTransactions(@PathParam("clientId") @ApiParam(value = "clientId") final Long clientId, @Context final UriInfo uriInfo, + @QueryParam("offset") @ApiParam(value = "offset") final Integer offset, @QueryParam("limit") @ApiParam(value = "limit") final Integer limit) { this.context.authenticatedUser().validateHasReadPermission(ClientApiConstants.CLIENT_CHARGES_RESOURCE_NAME); SearchParameters searchParameters = SearchParameters.forPagination(offset, limit); @@ -96,9 +88,9 @@ public class ClientTransactionsApiResource { @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @ApiOperation(value = "Retrieve a Client Transaction", notes = "Example Requests:\n" + "clients/1/transactions/1\n" + "\n" + "\n" + "clients/1/transactions/1?fields=id,officeName" ) - @ApiResponses({@ApiResponse(code = 200, message = "", response = ClientTransactionData.class)}) - public String retrieveClientTransaction(@PathParam("clientId") final Long clientId, - @PathParam("transactionId") final Long transactionId, @Context final UriInfo uriInfo) { + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ClientTransactionsApiResourceSwagger.GetClientsClientIdTransactionsTransactionIdResponse.class)}) + public String retrieveClientTransaction(@PathParam("clientId") @ApiParam(value = "clientId") final Long clientId, + @PathParam("transactionId") @ApiParam(value = "transactionId") final Long transactionId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(ClientApiConstants.CLIENT_CHARGES_RESOURCE_NAME); @@ -114,11 +106,10 @@ public class ClientTransactionsApiResource { @Path("{transactionId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @ApiOperation(value = "Undo a Client Transaction") - @ApiImplicitParams({@ApiImplicitParam(value = "body", dataType = "body", dataTypeClass = ClientData.class)}) - @ApiResponses({@ApiResponse(code = 200, message = "", response = CommandProcessingResult.class)}) - public String undoClientTransaction(@PathParam("clientId") final Long clientId, @PathParam("transactionId") final Long transactionId, - @QueryParam("command") final String commandParam, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { + @ApiOperation(value = "Undo a Client Transaction", notes = "Undoes a Client Transaction") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ClientTransactionsApiResourceSwagger.PostClientsClientIdTransactionsTransactionIdResponse.class)}) + public String undoClientTransaction(@PathParam("clientId") @ApiParam(value = "clientId") final Long clientId, @PathParam("transactionId") @ApiParam(value = "transactionId") final Long transactionId, + @QueryParam("command") @ApiParam(value = "command") final String commandParam, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { String json = ""; if (is(commandParam, ClientApiConstants.CLIENT_TRANSACTION_COMMAND_UNDO)) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientTransactionsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientTransactionsApiResourceSwagger.java new file mode 100644 index 000000000..c8ef2ff48 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientTransactionsApiResourceSwagger.java @@ -0,0 +1,133 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.client.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.math.BigDecimal; +import java.time.LocalDate; +import java.util.Set; + +/** + * Created by Chirag Gupta on 01/13/18. + */ +final class ClientTransactionsApiResourceSwagger { + private ClientTransactionsApiResourceSwagger() { + } + + @ApiModel(value = "GetClientsClientIdTransactionsResponse") + public final static class GetClientsClientIdTransactionsResponse { + private GetClientsClientIdTransactionsResponse() { + } + + final class GetClientsPageItems { + private GetClientsPageItems() { + } + + final class GetClientsClientIdTransactionsType { + private GetClientsClientIdTransactionsType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "clientTransactionType.payCharge") + public String code; + @ApiModelProperty(example = "PAY_CHARGE") + public String value; + } + + final class GetClientTransactionsCurrency { + private GetClientTransactionsCurrency() { + } + + @ApiModelProperty(example = "USD") + public String code; + @ApiModelProperty(example = "US Dollar") + public String name; + @ApiModelProperty(example = "2") + public Integer decimalPlaces; + @ApiModelProperty(example = "$") + public String displaySymbol; + @ApiModelProperty(example = "currency.USD") + public String nameCode; + @ApiModelProperty(example = "US Dollar ($)") + public String displayLabel; + } + + @ApiModelProperty(example = "226") + public Integer id; + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "Head Office") + public String officeName; + public GetClientsClientIdTransactionsType type; + @ApiModelProperty(example = "[2015, 9, 2]") + public LocalDate date; + public GetClientTransactionsCurrency currency; + @ApiModelProperty(example = "22") + public Double amount; + @ApiModelProperty(example = "[2015, 9, 2]") + public LocalDate submittedOnDate; + @ApiModelProperty(example = "false") + public Boolean reversed; + } + + @ApiModelProperty(example = "20") + public Integer totalFilteredRecords; + public Set pageItems; + } + + @ApiModel(value = "GetClientsClientIdTransactionsTransactionIdResponse") + public final static class GetClientsClientIdTransactionsTransactionIdResponse { + private GetClientsClientIdTransactionsTransactionIdResponse() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "Head Office") + public String officeName; + public GetClientsClientIdTransactionsResponse.GetClientsPageItems.GetClientsClientIdTransactionsType type; + @ApiModelProperty(example = "[2015, 8, 17]") + public LocalDate date; + public GetClientsClientIdTransactionsResponse.GetClientsPageItems.GetClientTransactionsCurrency currency; + @ApiModelProperty(example = "60.000000") + public BigDecimal amount; + @ApiModelProperty(example = "[2015, 8, 17]") + public LocalDate submittedOnDate; + @ApiModelProperty(example = "true") + public Boolean reversed; + } + + + @ApiModel(value = "PostClientsClientIdTransactionsTransactionIdResponse") + public final static class PostClientsClientIdTransactionsTransactionIdResponse { + private PostClientsClientIdTransactionsTransactionIdResponse() { + } + + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "189") + public Integer clientId; + @ApiModelProperty(example = "222") + public Integer resourceId; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientsApiResource.java index a457bca73..b5786cfcf 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientsApiResource.java @@ -18,26 +18,6 @@ */ package org.apache.fineract.portfolio.client.api; -import java.lang.reflect.Array; -import java.util.Arrays; -import java.util.Collection; -import java.util.HashSet; -import java.util.Set; - -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.DefaultValue; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - import io.swagger.annotations.*; import org.apache.commons.lang.StringUtils; import org.apache.fineract.commands.domain.CommandWrapper; @@ -61,10 +41,19 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; + @Path("/clients") @Component @Scope("singleton") -@Api(value = "Client Api", description = "Clients are people and businesses that have applied (or may apply) to an MFI for loans.\n" + "\n" + "Clients can be created in Pending or straight into Active state.") +@Api(value = "Client", description = "Clients are people and businesses that have applied (or may apply) to an MFI for loans.\n" + "\n" + "Clients can be created in Pending or straight into Active state.") public class ClientsApiResource { private final PlatformSecurityContext context; @@ -98,11 +87,10 @@ public class ClientsApiResource { @Path("template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @ApiOperation(value = "Retrieve Client Details Template", notes = "This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n" + "\n" + "Field Defaults\n" + "Allowed Value Lists" + "Example Request:\n" + "\n" + "clients/template") - @ApiResponses(value = { @ApiResponse(code = 200, message = "", response = ClientData.class) }) - public String retrieveTemplate(@Context final UriInfo uriInfo, @ApiParam(value = "optional") @QueryParam("officeId") final Long officeId, - @ApiParam(value = "optional If commandParam=close retrieves all closureReasons which are associated with \"ClientClosureReason\" value.", defaultValue = "false") @QueryParam("commandParam") final String commandParam, - @DefaultValue("false") @ApiParam(value = "optional Defaults to false if not provided. If staffInSelectedOfficeOnly=true only staff who are associated with the selected branch are returned.") @QueryParam("staffInSelectedOfficeOnly") final boolean staffInSelectedOfficeOnly) { + @ApiOperation(value = "Retrieve Client Details Template", notes = "This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n" + "\n" + "Field Defaults\n" + "Allowed Value Lists\n\n" + "Example Request:\n" + "\n" + "clients/template") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ClientsApiResourceSwagger.GetClientsTemplateResponse.class)}) + public String retrieveTemplate(@Context final UriInfo uriInfo, @ApiParam(value = "officeId") @QueryParam("officeId") final Long officeId, @QueryParam("commandParam") @ApiParam(value = "commandParam") final String commandParam, + @DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") @ApiParam(value = "staffInSelectedOfficeOnly")final boolean staffInSelectedOfficeOnly) { this.context.authenticatedUser().validateHasReadPermission(ClientApiConstants.CLIENT_RESOURCE_NAME); @@ -127,16 +115,15 @@ public class ClientsApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @ApiOperation(value = "List Clients", - notes = "Example Requests:\n" + "\n" + "clients\n" + "\n" + "clients?fields=displayName,officeName,timeline\n" + "\n" + "clients?offset=10&limit=50\n" + "\n" + "clients?orderBy=displayName&sortOrder=DESC" ) - @ApiResponses({@ApiResponse(code = 200, message = "", response = ClientData.class)}) - public String retrieveAll(@Context final UriInfo uriInfo, @QueryParam("sqlSearch") final String sqlSearch, - @QueryParam("officeId") final Long officeId, @QueryParam("externalId") final String externalId, - @QueryParam("displayName") final String displayName, @QueryParam("firstName") final String firstname, - @QueryParam("lastName") final String lastname, @QueryParam("underHierarchy") final String hierarchy, - @QueryParam("offset") final Integer offset, @QueryParam("limit") final Integer limit, - @QueryParam("orderBy") final String orderBy, @QueryParam("sortOrder") final String sortOrder, - @QueryParam("orphansOnly") final Boolean orphansOnly) { + @ApiOperation(value = "List Clients", notes = "The list capability of clients can support pagination and sorting.\n\n" + "Example Requests:\n" + "\n" + "clients\n" + "\n" + "clients?fields=displayName,officeName,timeline\n" + "\n" + "clients?offset=10&limit=50\n" + "\n" + "clients?orderBy=displayName&sortOrder=DESC" ) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ClientsApiResourceSwagger.GetClientsResponse.class)}) + public String retrieveAll(@Context final UriInfo uriInfo, @QueryParam("sqlSearch") @ApiParam(value = "sqlSearch") final String sqlSearch, + @QueryParam("officeId") @ApiParam(value = "officeId") final Long officeId, @QueryParam("externalId") @ApiParam(value = "externalId") final String externalId, + @QueryParam("displayName") @ApiParam(value = "displayName") final String displayName, @QueryParam("firstName") @ApiParam(value = "firstName") final String firstname, + @QueryParam("lastName") @ApiParam(value = "lastName") final String lastname, @QueryParam("underHierarchy") @ApiParam(value = "underHierarchy") final String hierarchy, + @QueryParam("offset") @ApiParam(value = "offset") final Integer offset, @QueryParam("limit") @ApiParam(value = "limit") final Integer limit, + @QueryParam("orderBy") @ApiParam(value = "orderBy") final String orderBy, @QueryParam("sortOrder") @ApiParam(value = "sortOrder") final String sortOrder, + @QueryParam("orphansOnly") @ApiParam(value = "orphansOnly") final Boolean orphansOnly) { return this.retrieveAll(uriInfo, sqlSearch, officeId, externalId, displayName, firstname, lastname, hierarchy, offset, limit, orderBy, sortOrder, orphansOnly, false); @@ -166,9 +153,9 @@ public class ClientsApiResource { @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @ApiOperation(value = "Retrieve a Client", notes = "Example Requests:\n" + "\n" + "clients/1\n" +"\n" + "\n" + "clients/1?template=true\n" + "\n" + "\n" + "clients/1?fields=id,displayName,officeName" ) - @ApiResponses({@ApiResponse(code = 200, message = "", response = ClientData.class)}) - public String retrieveOne(@PathParam("clientId") final Long clientId, @Context final UriInfo uriInfo, - @DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") final boolean staffInSelectedOfficeOnly) { + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ClientsApiResourceSwagger.GetClientsClientIdResponse.class)}) + public String retrieveOne(@PathParam("clientId") @ApiParam(value = "clientId") final Long clientId, @Context final UriInfo uriInfo, + @DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") @ApiParam(value = "staffInSelectedOfficeOnly") final boolean staffInSelectedOfficeOnly) { this.context.authenticatedUser().validateHasReadPermission(ClientApiConstants.CLIENT_RESOURCE_NAME); @@ -191,9 +178,9 @@ public class ClientsApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @ApiOperation(value = "Create a Client", httpMethod = "POST", notes = "Note:" + "\n" + "1. You can enter either:firstname/middlename/lastname - for a person (middlename is optional) OR fullname - for a business or organisation (or person known by one name).\n" + "\n" + "2.If address is enable(enable-address=true), then additional field called address has to be passed.", response = CommandProcessingResult.class, consumes="application/json") - @ApiImplicitParams({@ApiImplicitParam( paramType = "body", dataType = "ClientData", required = true, type = "body", dataTypeClass = ClientData.class)}) - @ApiResponses(value = { @ApiResponse(code = 200, message = "Successfully Client Created", response = CommandProcessingResult.class) }) + @ApiOperation(value = "Create a Client", httpMethod = "POST", notes = "Note:\n\n" + "1. You can enter either:firstname/middlename/lastname - for a person (middlename is optional) OR fullname - for a business or organisation (or person known by one name).\n" + "\n" + "2.If address is enable(enable-address=true), then additional field called address has to be passed.\n\n" + "Mandatory Fields: firstname and lastname OR fullname, officeId, active=true and activationDate OR active=false, if(address enabled) address\n\n" + "Optional Fields: groupId, externalId, accountNo, staffId, mobileNo, savingsProductId, genderId, clientTypeId, clientClassificationId") + @ApiImplicitParams({@ApiImplicitParam(paramType = "body", dataType = "ClientData", required = true, type = "body", dataTypeClass = ClientsApiResourceSwagger.PostClientsRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ClientsApiResourceSwagger.PostClientsResponse.class) }) public String create(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { @@ -211,10 +198,10 @@ public class ClientsApiResource { @Path("{clientId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @ApiOperation(value = "Update a Client", notes = "You can update any of the basic attributes of a client (but not its associations) using this API.\n" + "\n" + "Changing the relationship between a client and its office is not supported through this API. An API specific to handling transfers of clients between offices is available for the same.\n" + "\n" + "The relationship between a client and a group must be removed through the Groups API." ) - @ApiImplicitParams({@ApiImplicitParam( paramType = "body", dataType = "ClientData", required = true, type = "body", dataTypeClass = ClientData.class)}) - @ApiResponses(value = { @ApiResponse(code = 200, message = "", response = CommandProcessingResult.class) }) - public String update(@ApiParam(value = "ClientId") @PathParam("clientId") final Long clientId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update a Client", notes = "Note: You can update any of the basic attributes of a client (but not its associations) using this API.\n" + "\n" + "Changing the relationship between a client and its office is not supported through this API. An API specific to handling transfers of clients between offices is available for the same.\n" + "\n" + "The relationship between a client and a group must be removed through the Groups API." ) + @ApiImplicitParams({@ApiImplicitParam( paramType = "body", dataType = "ClientData", required = true, type = "body", dataTypeClass = ClientsApiResourceSwagger.PutClientsClientIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ClientsApiResourceSwagger.PutClientsClientIdResponse.class) }) + public String update(@ApiParam(value = "clientId") @PathParam("clientId") final Long clientId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // .updateClient(clientId) // @@ -231,8 +218,9 @@ public class ClientsApiResource { @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @ApiOperation(value = "Delete a Client", notes = "If a client is in Pending state, you are allowed to Delete it. The delete is a 'hard delete' and cannot be recovered from. Once clients become active or have loans or savings associated with them, you cannot delete the client but you may Close the client if they have left the program.") - @ApiResponses(value = {@ApiResponse(code = 200, message = "", response = CommandProcessingResult.class) }) - public String delete(@PathParam("clientId") final Long clientId) { + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = ClientsApiResourceSwagger.DeleteClientsClientIdRequest.class)}) + @ApiResponses(value = {@ApiResponse(code = 200, message = "OK", response = ClientsApiResourceSwagger.DeleteClientsClientIdResponse.class) }) + public String delete(@PathParam("clientId") @ApiParam(value = "clientId") final Long clientId) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // .deleteClient(clientId) // @@ -247,11 +235,11 @@ public class ClientsApiResource { @Path("{clientId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @ApiOperation(value = "Activate a Client | Close a Client | Reject a Client | Withdraw a Client | Reactivate a Client | UndoReject a Client | UndoWithdraw a Client | Assign a Staff | Unassign a Staff | Update Default Savings Account | Propose a Client Transfer | Withdraw a Client Transfer | Reject a Client Transfer | Accept a Client Transfer | Propose and Accept a Client Transfer | ", - notes = "\n[Reject a Client] Mandatory Fields : rejectionDate, rejectionReasonId\n" + "\n[Withdraw a Client] Mandatory Fields : withdrawalDate, withdrawalReasonId\n" + "\n[Reactivate a Client] Mandatory Fields : reactivationDate\n" + "\n[UndoReject a Client] Mandatory Fields : reopenedDate\n" + "\n[UndoWithdraw a Client]Mandatory Fields : reopenedDate\n" ) - @ApiImplicitParams({@ApiImplicitParam( paramType = "body", dataType = "body", required = true, type = "body")}) - public String activate(@PathParam("clientId") final Long clientId, @QueryParam("command") final String commandParam, - final String apiRequestBodyAsJson) { + @ApiOperation(value = "Activate a Client | Close a Client | Reject a Client | Withdraw a Client | Reactivate a Client | UndoReject a Client | UndoWithdraw a Client | Assign a Staff | Unassign a Staff | Update Default Savings Account | Propose a Client Transfer | Withdraw a Client Transfer | Reject a Client Transfer | Accept a Client Transfer | Propose and Accept a Client Transfer", notes = "Activate a Client:\n\n" + "Clients can be created in a Pending state. This API exists to enable client activation (for when a client becomes an approved member of the financial Institution).\n" + "\n" + "If the client happens to be already active this API will result in an error.\n\n" + "Close a Client:\n\n" + "Clients can be closed if they do not have any non-closed loans/savingsAccount. This API exists to close a client .\n" + "\n" + "If the client have any active loans/savingsAccount this API will result in an error.\n\n" + "Reject a Client:\n\n" + "Clients can be rejected when client is in pending for activation status.\n" + "\n" + "If the client is any other status, this API throws an error.\n\n" + "Mandatory Fields: rejectionDate, rejectionReasonId\n\n" + "Withdraw a Client:\n\n" + "Client applications can be withdrawn when client is in a pending for activation status.\n" + "\n" + "If the client is any other status, this API throws an error.\n\n" + "Mandatory Fields: withdrawalDate, withdrawalReasonId\n\n" + "Reactivate a Client: Clients can be reactivated after they have been closed.\n" + "\n" + "Trying to reactivate a client in any other state throws an error.\n\n" + "Mandatory Fields: reactivationDate\n\n" + "UndoReject a Client:\n\n" + "Clients can be reactivated after they have been rejected.\n" + "\n" + "Trying to reactivate a client in any other state throws an error.\n\n" + "Mandatory Fields: reopenedDate" + "UndoWithdraw a Client:\n\n" + "Clients can be reactivated after they have been withdrawn.\n" + "\n" + "Trying to reactivate a client in any other state throws an error.\n\n" + "Mandatory Fields: reopenedDate\n\n" + "Assign a Staff:\n\n" + "Allows you to assign a Staff for existed Client.\n" + "\n" + "The selected Staff should belong to the same office (or an officer higher up in the hierarchy) as the Client he manages.\n\n" + "Unassign a Staff:\n\n" + "Allows you to unassign the Staff assigned to a Client.\n\n" + "Update Default Savings Account:\n\n" + "Allows you to modify or assign a default savings account for an existing Client.\n" + "\n" + "The selected savings account should be one among the existing savings account for a particular customer.\n\n" + "Propose a Client Transfer:\n\n" + "Allows you to propose the transfer of a Client to a different Office.\n\n" + "Withdraw a Client Transfer:\n\n" + "Allows you to withdraw the proposed transfer of a Client to a different Office.\n" + "\n" + "Withdrawal can happen only if the destination Branch (to which the transfer was proposed) has not already accepted the transfer proposal\n\n" + "Reject a Client Transfer:\n\n" + "Allows the Destination Branch to reject the proposed Client Transfer.\n\n" + "Accept a Client Transfer:\n\n" + "Allows the Destination Branch to accept the proposed Client Transfer.\n" + "\n" + "The destination branch may also choose to link this client to a group (in which case, any existing active JLG loan of the client is rescheduled to match the meeting frequency of the group) and loan Officer at the time of accepting the transfer\n\n" + "Propose and Accept a Client Transfer:\n\n" + "Abstraction over the Propose and Accept Client Transfer API's which enable a user with Data Scope over both the Target and Destination Branches to directly transfer a Client to the destination Office.\n\n" + "Showing request/response for 'Reject a Client Transfer'") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = ClientsApiResourceSwagger.PostClientsClientIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK",response = ClientsApiResourceSwagger.PostClientsClientIdResponse.class)}) + public String activate(@PathParam("clientId") @ApiParam(value = "clientId") final Long clientId, @QueryParam("command") @ApiParam(value = "command") final String commandParam, + @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapperBuilder builder = new CommandWrapperBuilder().withJson(apiRequestBodyAsJson); @@ -322,11 +310,11 @@ public class ClientsApiResource { @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @ApiOperation(value = "Retrieve client accounts overview", notes = "An example of how a loan portfolio summary can be provided. This is requested in a specific use case of the community application.\n" + "It is quite reasonable to add resources like this to simplify User Interface development.\n" + "\n" + "Example Requests:\n " + "\n" + "clients/1/accounts\n"+ "\n" + "clients/1/accounts?fields=loanAccounts,savingsAccounts" ) - @ApiResponses(value = { - @ApiResponse(code = 200, message = "", response = AccountSummaryCollectionData.class), + @ApiResponses({ + @ApiResponse(code = 200, message = "OK", response = ClientsApiResourceSwagger.GetClientsClientIdAccountsResponse.class), @ApiResponse(code = 400, message = "Bad Request") }) - public String retrieveAssociatedAccounts(@PathParam("clientId") final Long clientId, @Context final UriInfo uriInfo) { + public String retrieveAssociatedAccounts(@PathParam("clientId") @ApiParam(value = "clientId") final Long clientId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(ClientApiConstants.CLIENT_RESOURCE_NAME); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientsApiResourceSwagger.java new file mode 100644 index 000000000..8ced9a833 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientsApiResourceSwagger.java @@ -0,0 +1,464 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.client.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.time.LocalDate; +import java.util.List; +import java.util.Set; + +/** + * Created by Chirag Gupta on 01/13/18. + */ +final class ClientsApiResourceSwagger { + private ClientsApiResourceSwagger() { + } + + @ApiModel(value = "GetClientsTemplateResponse") + public final static class GetClientsTemplateResponse { + private GetClientsTemplateResponse() { + } + + final class GetClientsOfficeOptions { + private GetClientsOfficeOptions() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "Head Office") + public String name; + @ApiModelProperty(example = "Head Office") + public String nameDecorated; + } + + final class GetClientsStaffOptions { + private GetClientsStaffOptions() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "xyz") + public String firstname; + @ApiModelProperty(example = "sjs") + public String lastname; + @ApiModelProperty(example = "sjs, xyz") + public String displayName; + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "Head Office") + public String officeName; + @ApiModelProperty(example = "true") + public Boolean isLoanOfficer; + @ApiModelProperty(example = "true") + public Boolean isActive; + } + + final class GetClientsSavingProductOptions { + private GetClientsSavingProductOptions() { + } + + @ApiModelProperty(example = "4") + public Integer id; + @ApiModelProperty(example = "account overdraft") + public String name; + @ApiModelProperty(example = "false") + public Boolean withdrawalFeeForTransfers; + @ApiModelProperty(example = "false") + public Boolean allowOverdraft; + } + + final class GetClientsDataTables { + private GetClientsDataTables() { + } + + final class GetClientsColumnHeaderData { + private GetClientsColumnHeaderData() { + } + + @ApiModelProperty(example = "client_id") + public String columnName; + @ApiModelProperty(example = "bigint") + public String columnType; + @ApiModelProperty(example = "0") + public Integer columnLength; + @ApiModelProperty(example = "INTEGER") + public String columnDisplayType; + @ApiModelProperty(example = "false") + public Boolean isColumnNullable; + @ApiModelProperty(example = "true") + public Boolean isColumnPrimaryKey; + @ApiModelProperty(example = "[]") + public List columnValues; + } + + @ApiModelProperty(example = "m_client") + public String applicationTableName; + @ApiModelProperty(example = "Address Details") + public String registeredTableName; + public Set columnHeaderData; + } + + @ApiModelProperty(example = "[2014, 3, 4]") + public LocalDate activationDate; + @ApiModelProperty(example = "1") + public Integer officeId; + public Set officeOptions; + public Set staffOptions; + public Set savingProductOptions; + public Set datatables; + } + + @ApiModel(value = "GetClientsResponse") + public final static class GetClientsResponse { + private GetClientsResponse() { + } + + final class GetClientsPageItemsResponse { + private GetClientsPageItemsResponse() { + } + + final class GetClientStatus { + private GetClientStatus() { + } + + @ApiModelProperty(example = "100") + public Integer id; + @ApiModelProperty(example = "clientStatusType.pending") + public String code; + @ApiModelProperty(example = "Pending") + public String value; + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "000000002") + public String accountNo; + public GetClientStatus status; + @ApiModelProperty(example = "false") + public Boolean active; + @ApiModelProperty(example = "Home Farm Produce") + public String fullname; + @ApiModelProperty(example = "Home Farm Produce") + public String displayName; + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "Head Office") + public String officeName; + } + + @ApiModelProperty(example = "2") + public Integer totalFilteredRecords; + public Set pageItems; + } + + @ApiModel(value = "GetClientsClientIdResponse") + public final static class GetClientsClientIdResponse { + private GetClientsClientIdResponse() { + } + + final class GetClientsClientIdStatus { + private GetClientsClientIdStatus() { + } + + @ApiModelProperty(example = "300") + public Integer id; + @ApiModelProperty(example = "clientStatusType.active") + public String code; + @ApiModelProperty(example = "Active") + public String value; + } + + final class GetClientsTimeline { + private GetClientsTimeline() { + } + + @ApiModelProperty(example = "[2013, 1, 1]") + public LocalDate submittedOnDate; + @ApiModelProperty(example = "mifos") + public String submittedByUsername; + @ApiModelProperty(example = "App") + public String submittedByFirstname; + @ApiModelProperty(example = "Administrator") + public String submittedByLastname; + @ApiModelProperty(example = "[2013, 1, 1]") + public LocalDate activatedOnDate; + @ApiModelProperty(example = "mifos") + public String activatedByUsername; + @ApiModelProperty(example = "App") + public String activatedByFirstname; + @ApiModelProperty(example = "Administrator") + public String activatedByLastname; + + } + + @ApiModelProperty(example = "27") + public Integer id; + @ApiModelProperty(example = "000000027") + public Long accountNo; + public GetClientsClientIdStatus status; + @ApiModelProperty(example = "true") + public Boolean active; + @ApiModelProperty(example = "[2013, 1, 1]") + public LocalDate activationDate; + @ApiModelProperty(example = "savings") + public String firstname; + @ApiModelProperty(example = "test") + public String lastname; + @ApiModelProperty(example = "savings test") + public String displayName; + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "Head Office") + public String officeName; + public GetClientsTimeline timeline; + @ApiModelProperty(example = "4") + public Integer savingsProductId; + @ApiModelProperty(example = "account overdraft") + public String savingsProductName; + @ApiModelProperty(example = "[]") + public List groups; + } + + @ApiModel(value = "PostClientsRequest") + public final static class PostClientsRequest { + private PostClientsRequest() { + } + + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "Client of group") + public String fullname; + @ApiModelProperty(example = "1") + public Integer groupId; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "true") + public Boolean active; + @ApiModelProperty(example = "04 March 2009") + public String activationDate; + } + + @ApiModel(value = "PostClientsResponse") + public final static class PostClientsResponse { + private PostClientsResponse() { + } + + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "1") + public Integer groupId; + @ApiModelProperty(example = "2") + public Integer clientId; + @ApiModelProperty(example = "2") + public Integer resourceId; + } + + @ApiModel(value = "PutClientsClientIdRequest") + public final static class PutClientsClientIdRequest { + private PutClientsClientIdRequest() { + } + + @ApiModelProperty(example = "786444UUUYYH7") + public String externalId; + } + + @ApiModel(value = "PutClientsClientIdResponse") + public final static class PutClientsClientIdResponse { + private PutClientsClientIdResponse() { + } + + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "1") + public Integer resourceId; + public PutClientsClientIdRequest changes; + } + + @ApiModel(value = "DeleteClientsClientIdRequest") + public final static class DeleteClientsClientIdRequest { + private DeleteClientsClientIdRequest() { + } + } + + @ApiModel(value = "DeleteClientsClientIdResponse") + public final static class DeleteClientsClientIdResponse { + private DeleteClientsClientIdResponse() { + } + + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "3") + public Integer clientId; + @ApiModelProperty(example = "3") + public Integer resourceId; + } + + @ApiModel(value = "PostClientsClientIdRequest") + public final static class PostClientsClientIdRequest { + private PostClientsClientIdRequest() { + } + + @ApiModelProperty(example = "We cannot accept transfers of clients having loans with less than 1 repayment left") + public String note; + } + + @ApiModel(value = "PostClientsClientIdResponse") + public final static class PostClientsClientIdResponse { + private PostClientsClientIdResponse() { + } + + @ApiModelProperty(example = "2") + public Integer clientId; + @ApiModelProperty(example = "2") + public Integer resourceId; + } + + @ApiModel(value = "GetClientsClientIdAccountsResponse") + public final static class GetClientsClientIdAccountsResponse { + private GetClientsClientIdAccountsResponse() { + } + + final class GetClientsLoanAccounts { + private GetClientsLoanAccounts() { + } + + final class GetClientsLoanAccountsStatus { + private GetClientsLoanAccountsStatus() { + } + + @ApiModelProperty(example = "300") + public Integer id; + @ApiModelProperty(example = "loanStatusType.active") + public String code; + @ApiModelProperty(example = "Active") + public String value; + @ApiModelProperty(example = "false") + public Boolean pendingApproval; + @ApiModelProperty(example = "false") + public Boolean waitingForDisbursal; + @ApiModelProperty(example = "true") + public Boolean active; + @ApiModelProperty(example = "false") + public Boolean closedObligationsMet; + @ApiModelProperty(example = "false") + public Boolean closedWrittenOff; + @ApiModelProperty(example = "false") + public Boolean closedRescheduled; + @ApiModelProperty(example = "false") + public Boolean closed; + @ApiModelProperty(example = "false") + public Boolean overpaid; + } + + final class GetClientsLoanAccountsType { + private GetClientsLoanAccountsType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "loanType.individual") + public String code; + @ApiModelProperty(example = "Individual") + public String value; + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "000000001") + public Long accountNo; + @ApiModelProperty(example = "456") + public Integer externalId; + @ApiModelProperty(example = "1") + public Integer productId; + @ApiModelProperty(example = "TestOne") + public String productName; + public GetClientsLoanAccountsStatus status; + public GetClientsLoanAccountsType loanType; + @ApiModelProperty(example = "1") + public Integer loanCycle; + } + + final class GetClientsSavingsAccounts { + private GetClientsSavingsAccounts() { + } + + final class GetClientsSavingsAccountsCurrency { + private GetClientsSavingsAccountsCurrency() { + } + + @ApiModelProperty(example = "USD") + public String code; + @ApiModelProperty(example = "US Dollar") + public String name; + @ApiModelProperty(example = "2") + public Integer decimalPlaces; + @ApiModelProperty(example = "$") + public String displaySymbol; + @ApiModelProperty(example = "currency.USD") + public String nameCode; + @ApiModelProperty(example = "US Dollar ($)") + public String displayLabel; + } + + final class GetClientsSavingsAccountsStatus { + private GetClientsSavingsAccountsStatus() { + } + + @ApiModelProperty(example = "100") + public Integer id; + @ApiModelProperty(example = "savingsAccountStatusType.submitted.and.pending.approval") + public String code; + @ApiModelProperty(example = "Submitted and pending approval") + public String value; + @ApiModelProperty(example = "true") + public Boolean submittedAndPendingApproval; + @ApiModelProperty(example = "false") + public Boolean approved; + @ApiModelProperty(example = "false") + public Boolean rejected; + @ApiModelProperty(example = "false") + public Boolean withdrawnByApplicant; + @ApiModelProperty(example = "false") + public Boolean active; + @ApiModelProperty(example = "false") + public Boolean closed; + } + + @ApiModelProperty(example = "7") + public Integer id; + @ApiModelProperty(example = "000000007") + public Long accountNo; + @ApiModelProperty(example = "2") + public Integer productId; + @ApiModelProperty(example = "Other product") + public String productName; + public GetClientsSavingsAccountsStatus status; + public GetClientsSavingsAccountsCurrency currency; + } + + public Set loanAccounts; + public Set savingsAccounts; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/api/CollateralsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/api/CollateralsApiResource.java index 569a2ceaa..9266dc191 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/api/CollateralsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/api/CollateralsApiResource.java @@ -18,24 +18,7 @@ */ package org.apache.fineract.portfolio.collateral.api; -import java.util.Arrays; -import java.util.Collection; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - +import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -52,9 +35,16 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; +import java.util.*; + @Path("/loans/{loanId}/collaterals") @Component @Scope("singleton") +@Api(value = "Loan Collateral", description = "In lending agreements, collateral is a borrower's pledge of specific property to a lender, to secure repayment of a loan. The collateral serves as protection for a lender against a borrower's default - that is, any borrower failing to pay the principal and interest under the terms of a loan obligation. If a borrower does default on a loan (due to insolvency or other event), that borrower forfeits (gives up) the property pledged as collateral - and the lender then becomes the owner of the collateral") public class CollateralsApiResource { private static final Set RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "type", "value", "description", @@ -87,6 +77,8 @@ public class CollateralsApiResource { @Path("template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Retrieve Collateral Details Template", httpMethod = "GET", notes = "This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n" + "\n" + "Field Defaults\n" + "Allowed Value Lists\n" + "Example Request:\n" + "\n" + "loans/1/collaterals/template") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = CollateralsApiResourceSwagger.GetLoansLoanIdCollateralsTemplateResponse.class)}) public String newCollateralTemplate(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermission); @@ -102,7 +94,9 @@ public class CollateralsApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveCollateralDetails(@Context final UriInfo uriInfo, @PathParam("loanId") final Long loanId) { + @ApiOperation(value = "List Loan Collaterals", httpMethod = "GET", notes = "Example Requests:\n" + "\n" + "loans/1/collaterals\n" + "\n" + "\n" + "loans/1/collaterals?fields=value,description") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = CollateralsApiResourceSwagger.GetLoansLoanIdCollateralsResponse.class, responseContainer = "List")}) + public String retrieveCollateralDetails(@Context final UriInfo uriInfo, @PathParam("loanId") @ApiParam(value = "loanId") final Long loanId) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermission); final List CollateralDatas = this.collateralReadPlatformService.retrieveCollateralsForValidLoan(loanId); @@ -116,8 +110,10 @@ public class CollateralsApiResource { @Path("{collateralId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveCollateralDetails(@Context final UriInfo uriInfo, @PathParam("loanId") final Long loanId, - @PathParam("collateralId") final Long CollateralId) { + @ApiOperation(value = "Retrieve a Collateral", httpMethod = "GET", notes = "Example Requests:\n" + "\n" + "/loans/1/collaterals/1\n" + "\n" + "\n" + "/loans/1/collaterals/1?fields=value,description") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = CollateralsApiResourceSwagger.GetLoansLoanIdCollateralsResponse.class)}) + public String retrieveCollateralDetails(@Context final UriInfo uriInfo, @PathParam("loanId") @ApiParam(value = "loanId")final Long loanId, + @PathParam("collateralId") @ApiParam(value = "collateralId") final Long CollateralId) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermission); CollateralData CollateralData = this.collateralReadPlatformService.retrieveCollateral(loanId, CollateralId); @@ -135,7 +131,10 @@ public class CollateralsApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String createCollateral(@PathParam("loanId") final Long loanId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Create a Collateral", httpMethod = "POST", notes = "Note: Currently, Collaterals may be added only before a Loan is approved") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = CollateralsApiResourceSwagger.PostLoansLoanIdCollateralsRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = CollateralsApiResourceSwagger.PostLoansLoanIdCollateralsResponse.class)}) + public String createCollateral(@PathParam("loanId") @ApiParam(value = "loanId") final Long loanId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createCollateral(loanId).withJson(apiRequestBodyAsJson).build(); @@ -148,8 +147,11 @@ public class CollateralsApiResource { @Path("{collateralId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String updateCollateral(@PathParam("loanId") final Long loanId, @PathParam("collateralId") final Long collateralId, - final String jsonRequestBody) { + @ApiOperation(value = "Update a Collateral", httpMethod = "PUT") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = CollateralsApiResourceSwagger.PutLoansLoandIdCollateralsCollateralIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = CollateralsApiResourceSwagger.PutLoansLoanIdCollateralsCollateralIdResponse.class)}) + public String updateCollateral(@PathParam("loanId") @ApiParam(value = "loanId") final Long loanId, @PathParam("collateralId") @ApiParam(value = "collateralId") final Long collateralId, + @ApiParam(hidden = true) final String jsonRequestBody) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateCollateral(loanId, collateralId).withJson(jsonRequestBody) .build(); @@ -162,7 +164,9 @@ public class CollateralsApiResource { @Path("{collateralId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String deleteCollateral(@PathParam("loanId") final Long loanId, @PathParam("collateralId") final Long collateralId) { + @ApiOperation(value = "Remove a Collateral", httpMethod = "DELETE", notes = "Note: A collateral can only be removed from Loans that are not yet approved.") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = CollateralsApiResourceSwagger.DeleteLoansLoanIdCollateralsCollateralIdResponse.class)}) + public String deleteCollateral(@PathParam("loanId") @ApiParam(value = "loanId") final Long loanId, @PathParam("collateralId") @ApiParam(value = "collateralId")final Long collateralId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteCollateral(loanId, collateralId).build(); final CommandProcessingResult result = this.commandsSourceWritePlatformService.logCommandSource(commandRequest); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/api/CollateralsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/api/CollateralsApiResourceSwagger.java new file mode 100644 index 000000000..0eb00f88e --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/api/CollateralsApiResourceSwagger.java @@ -0,0 +1,147 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.collateral.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.Set; + +/** + * Created by Chirag Gupta on 12/01/17. + */ +final class CollateralsApiResourceSwagger { + private CollateralsApiResourceSwagger() { + } + + @ApiModel(value = "GetLoansLoanIdCollateralsResponse") + public static final class GetLoansLoanIdCollateralsResponse { + private GetLoansLoanIdCollateralsResponse() { + } + + final class GetCollateralTypeResponse { + private GetCollateralTypeResponse() { + } + + @ApiModelProperty(example = "8") + public Integer id; + @ApiModelProperty(example = "Gold") + public String name; + } + + final class GetCollateralCurrencyResponse { + private GetCollateralCurrencyResponse() { + } + + @ApiModelProperty(example = "USD") + public String code; + @ApiModelProperty(example = "US Dollar") + public String name; + @ApiModelProperty(example = "2") + public Integer decimalPlaces; + @ApiModelProperty(example = "$") + public String displaySymbol; + @ApiModelProperty(example = "currency.USD") + public String nameCode; + @ApiModelProperty(example = "US Dollar ($)") + public String displayLabel; + } + + @ApiModelProperty(example = "12") + public Integer id; + public GetCollateralTypeResponse type; + @ApiModelProperty(example = "50000") + public Long value; + @ApiModelProperty(example = "24 Carat Gold chain weighing 12 grams") + public String description; + public GetCollateralCurrencyResponse currency; + } + + @ApiModel(value = "PostLoansLoanIdCollateralsRequest") + public static final class PostLoansLoanIdCollateralsRequest { + private PostLoansLoanIdCollateralsRequest() { + } + + @ApiModelProperty(example = "9") + public Integer collateralTypeId; + } + + @ApiModel(value = "PostLoansLoanIdCollateralsResponse") + public static final class PostLoansLoanIdCollateralsResponse { + private PostLoansLoanIdCollateralsResponse() { + } + + @ApiModelProperty(example = "1") + public Integer loanId; + @ApiModelProperty(example = "12") + public Integer resourceId; + } + + @ApiModel(value = "PutLoansLoandIdCollateralsCollateralIdRequest") + public static final class PutLoansLoandIdCollateralsCollateralIdRequest { + private PutLoansLoandIdCollateralsCollateralIdRequest() { + } + + @ApiModelProperty(example = "22 Carat Gold chain weighing 12 grams") + public String description; + } + + @ApiModel(value = "PutLoansLoanIdCollateralsCollateralIdResponse") + public static final class PutLoansLoanIdCollateralsCollateralIdResponse { + private PutLoansLoanIdCollateralsCollateralIdResponse() { + } + + @ApiModelProperty(example = "1") + public Integer loanId; + @ApiModelProperty(example = "12") + public Integer resourceId; + public PutLoansLoandIdCollateralsCollateralIdRequest changes; + } + + @ApiModel(value = "GetLoansLoanIdCollateralsTemplateResponse") + public static final class GetLoansLoanIdCollateralsTemplateResponse { + private GetLoansLoanIdCollateralsTemplateResponse() { + } + + final class GetCollateralsTemplateAllowedTypes { + private GetCollateralsTemplateAllowedTypes() { + } + + @ApiModelProperty(example = "9") + public Integer id; + @ApiModelProperty(example = "Silver") + public String name; + @ApiModelProperty(example = "0") + public Integer position; + } + + public Set allowedCollateralTypes; + } + + @ApiModel(value = "DeleteLoansLoanIdCollateralsCollateralIdResponse") + public static final class DeleteLoansLoanIdCollateralsCollateralIdResponse { + private DeleteLoansLoanIdCollateralsCollateralIdResponse() { + } + + @ApiModelProperty(example = "1") + public Integer loanId; + @ApiModelProperty(example = "12") + public Integer resourceId; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/api/CollectionSheetApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/api/CollectionSheetApiResourceSwagger.java new file mode 100644 index 000000000..a04cce6ba --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/api/CollectionSheetApiResourceSwagger.java @@ -0,0 +1,90 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.collectionsheet.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; + +/** + * Created by Chirag Gupta on 12/17/17. + */ +final class CollectionSheetApiResourceSwagger { + private CollectionSheetApiResourceSwagger() { + } + + @ApiModel(value = "PostCollectionSheetRequest") + public final static class PostCollectionSheetRequest { + private PostCollectionSheetRequest() { + } + + final class PostCollectionSheetBulkRepaymentTransactions { + private PostCollectionSheetBulkRepaymentTransactions() { + } + + @ApiModelProperty(example = "10") + public Integer loanId; + @ApiModelProperty(example = "1221.36") + public Double transactionAmount; + @ApiModelProperty(example = "19") + public Integer paymentTypeId; + @ApiModelProperty(example = "1245356") + public Long receiptNumber; + } + + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "04 May 2014") + public String transactionDate; + @ApiModelProperty(example = "04 May 2014") + public String actualDisbursementDate; + public List bulkDisbursementTransactions; + public PostCollectionSheetBulkRepaymentTransactions bulkRepaymentTransactions; + public List bulkSavingsDueTransactions; + } + + @ApiModel(value = "PostCollectionSheetResponse") + public final static class PostCollectionSheetResponse { + private PostCollectionSheetResponse() { + } + + final class PostCollectionSheetChanges { + private PostCollectionSheetChanges() { + } + + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "[15]") + public List loanTransactions; + @ApiModelProperty(example = "[]") + public List SavingsTransactions; + } + + @ApiModelProperty(example = "10") + public Integer groupId; + @ApiModelProperty(example = "10") + public Integer resourceId; + public PostCollectionSheetChanges changes; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/api/CollectionSheetApiResourse.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/api/CollectionSheetApiResourse.java index 3de8b57da..16f3a7d41 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/api/CollectionSheetApiResourse.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/api/CollectionSheetApiResourse.java @@ -18,15 +18,8 @@ */ package org.apache.fineract.portfolio.collectionsheet.api; -import javax.ws.rs.Consumes; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - +import com.google.gson.JsonElement; +import io.swagger.annotations.*; import org.apache.commons.lang.StringUtils; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; @@ -45,11 +38,15 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; -import com.google.gson.JsonElement; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; @Path("/collectionsheet") @Component @Scope("singleton") +@Api(value = "Collection Sheet", description = "") public class CollectionSheetApiResourse { private final CollectionSheetReadPlatformService collectionSheetReadPlatformService; @@ -75,8 +72,11 @@ public class CollectionSheetApiResourse { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String generateCollectionSheet(@QueryParam("command") final String commandParam, final String apiRequestBodyAsJson, - @Context final UriInfo uriInfo) { + @ApiOperation(value = "Generate Individual Collection Sheet | Save Collection Sheet", httpMethod = "POST", notes = "Generate Individual Collection Sheet:\n\n" + "This Api retrieves repayment details of all individual loans under a office as on a specified meeting date.\n\n" + "Save Collection Sheet:\n\n" + "This Api allows the loan officer to perform bulk repayments of individual loans and deposit of mandatory savings on a given meeting date.") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = CollectionSheetApiResourceSwagger.PostCollectionSheetRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = CollectionSheetApiResourceSwagger.PostCollectionSheetResponse.class)}) + public String generateCollectionSheet(@QueryParam("command") @ApiParam(value = "command") final String commandParam, @ApiParam(hidden = true) final String apiRequestBodyAsJson, + @Context final UriInfo uriInfo) { final CommandWrapperBuilder builder = new CommandWrapperBuilder().withJson(apiRequestBodyAsJson); CommandProcessingResult result = null; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/floatingrates/api/FloatingRatesApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/floatingrates/api/FloatingRatesApiResource.java index d94c1161e..c9bdae783 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/floatingrates/api/FloatingRatesApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/floatingrates/api/FloatingRatesApiResource.java @@ -18,22 +18,7 @@ */ package org.apache.fineract.portfolio.floatingrates.api; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - +import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -48,9 +33,19 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; +import java.util.Arrays; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + @Path("/floatingrates") @Component @Scope("singleton") +@Api(value = "Floating Rates", description = "It lets you create, list, retrieve and upload the floating rates") public class FloatingRatesApiResource { private static final String RESOURCE_NAME = "FLOATINGRATE"; @@ -84,7 +79,10 @@ public class FloatingRatesApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String createFloatingRate(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Create a new Floating Rate", httpMethod = "POST", notes = "Creates a new Floating Rate\n" + "Mandatory Fields: name\n" + "Optional Fields: isBaseLendingRate, isActive, ratePeriods") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = FloatingRatesApiResourceSwagger.PostFloatingRatesRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = FloatingRatesApiResourceSwagger.PostFloatingRatesResponse.class)}) + public String createFloatingRate(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() .createFloatingRate().withJson(apiRequestBodyAsJson).build(); @@ -96,6 +94,8 @@ public class FloatingRatesApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "List Floating Rates", httpMethod = "GET", notes = "Lists Floating Rates") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = FloatingRatesApiResourceSwagger.GetFloatingRatesResponse.class, responseContainer = "List")}) public String retrieveAll(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission( RESOURCE_NAME); @@ -111,8 +111,10 @@ public class FloatingRatesApiResource { @Path("{floatingRateId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Retrieve Floating Rate", httpMethod = "GET", notes = "Retrieves Floating Rate") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = FloatingRatesApiResourceSwagger.GetFloatingRatesFloatingRateIdResponse.class)}) public String retrieveOne( - @PathParam("floatingRateId") final Long floatingRateId, + @PathParam("floatingRateId") @ApiParam(value = "floatingRateId") final Long floatingRateId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission( RESOURCE_NAME); @@ -128,9 +130,12 @@ public class FloatingRatesApiResource { @Path("{floatingRateId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Update Floating Rate", httpMethod = "PUT", notes = "Updates new Floating Rate. Rate Periods in the past cannot be modified. All the future rateperiods would be replaced with the new ratePeriods data sent.") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = FloatingRatesApiResourceSwagger.PutFloatingRatesFloatingRateIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = FloatingRatesApiResourceSwagger.PutFloatingRatesFloatingRateIdResponse.class)}) public String updateFloatingRate( - @PathParam("floatingRateId") final Long floatingRateId, - final String apiRequestBodyAsJson) { + @PathParam("floatingRateId") @ApiParam(value = "floatingRateId") final Long floatingRateId, + @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() .updateFloatingRate(floatingRateId) .withJson(apiRequestBodyAsJson).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/floatingrates/api/FloatingRatesApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/floatingrates/api/FloatingRatesApiResourceSwagger.java new file mode 100644 index 000000000..258a91312 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/floatingrates/api/FloatingRatesApiResourceSwagger.java @@ -0,0 +1,171 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.floatingrates.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.Set; + +/** + * Created by Chirag Gupta on 12/17/17. + */ +final class FloatingRatesApiResourceSwagger { + private FloatingRatesApiResourceSwagger() { + } + + @ApiModel(value = "PostFloatingRatesRequest") + public final static class PostFloatingRatesRequest { + private PostFloatingRatesRequest() { + } + + final class PostFloatingRatesRatePeriods { + private PostFloatingRatesRatePeriods() { + } + + @ApiModelProperty(example = "19 November 2015") + public String fromDate; + @ApiModelProperty(example = "10") + public Double interestRate; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + } + + @ApiModelProperty(example = "Floating Rate 1") + public String name; + @ApiModelProperty(example = "true") + public Boolean isBaseLendingRate; + @ApiModelProperty(example = "true") + public Boolean isActive; + public Set ratePeriods; + } + + @ApiModel(value = "PostFloatingRatesResponse") + public final static class PostFloatingRatesResponse { + private PostFloatingRatesResponse() { + } + + @ApiModelProperty(example = "1") + public Integer resourceId; + } + + @ApiModel(value = "GetFloatingRatesResponse") + public final static class GetFloatingRatesResponse { + private GetFloatingRatesResponse() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "Floating Rate 1") + public String name; + @ApiModelProperty(example = "true") + public Boolean isBaseLendingRate; + @ApiModelProperty(example = "true") + public Boolean isActive; + @ApiModelProperty(example = "mifos") + public String createdBy; + @ApiModelProperty(example = "Nov 18, 2015") + public String createdOn; + @ApiModelProperty(example = "mifos") + public String modifiedBy; + @ApiModelProperty(example = "Nov 18, 2015") + public String modifiedOn; + } + + @ApiModel(value = "GetFloatingRatesFloatingRateIdResponse") + public final static class GetFloatingRatesFloatingRateIdResponse { + private GetFloatingRatesFloatingRateIdResponse() { + } + + final class GetFloatingRatesRatePeriods { + private GetFloatingRatesRatePeriods() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "Dec 15, 2015") + public String fromDate; + @ApiModelProperty(example = "11") + public Double interestRate; + @ApiModelProperty(example = "false") + public Boolean isDifferentialToBaseLendingRate; + @ApiModelProperty(example = "true") + public Boolean isActive; + @ApiModelProperty(example = "mifos") + public String createdBy; + @ApiModelProperty(example = "Nov 18, 2015") + public String createdOn; + @ApiModelProperty(example = "mifos") + public String modifiedBy; + @ApiModelProperty(example = "Nov 18, 2015") + public String modifiedOn; + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "Floating Rate 1") + public String name; + @ApiModelProperty(example = "true") + public Boolean isBaseLendingRate; + @ApiModelProperty(example = "true") + public Boolean isActive; + @ApiModelProperty(example = "mifos") + public String createdBy; + @ApiModelProperty(example = "Nov 18, 2015") + public String createdOn; + @ApiModelProperty(example = "mifos") + public String modifiedBy; + @ApiModelProperty(example = "Nov 18, 2015") + public String modifiedOn; + public Set ratePeriods; + } + + @ApiModel(value = "PutFloatingRatesFloatingRateIdRequest") + public final static class PutFloatingRatesFloatingRateIdRequest { + private PutFloatingRatesFloatingRateIdRequest() { + } + + @ApiModelProperty(example = "Floating Rate 1") + public String name; + @ApiModelProperty(example = "true") + public Boolean isBaseLendingRate; + @ApiModelProperty(example = "true") + public Boolean isActive; + public Set ratePeriods; + } + + @ApiModel(value = "PutFloatingRatesFloatingRateIdResponse") + public final static class PutFloatingRatesFloatingRateIdResponse { + private PutFloatingRatesFloatingRateIdResponse() { + } + + final class PutFloatingRatesChanges { + private PutFloatingRatesChanges() { + } + + public Set ratePeriods; + } + + @ApiModelProperty(example = "1") + public Integer resourceId; + public PutFloatingRatesChanges changes; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/api/FundsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/api/FundsApiResource.java index f2967f8c6..4e0ae4cb9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/api/FundsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/api/FundsApiResource.java @@ -18,22 +18,7 @@ */ package org.apache.fineract.portfolio.fund.api; -import java.util.Arrays; -import java.util.Collection; -import java.util.HashSet; -import java.util.Set; - -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - +import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -49,9 +34,19 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; + @Path("/funds") @Component @Scope("singleton") +@Api(value = "Funds", description = "") public class FundsApiResource { /** @@ -81,6 +76,8 @@ public class FundsApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Retrieve Funds", httpMethod = "GET", notes = "Returns the list of funds.\n" + "\n" + "Example Requests:\n" + "\n" + "funds") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = FundsApiResourceSwagger.GetFundsResponse.class, responseContainer = "List")}) public String retrieveFunds(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -94,7 +91,10 @@ public class FundsApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String createFund(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Create a Fund", httpMethod = "POST", notes = "Creates a Fund") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = FundsApiResourceSwagger.PostFundsRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = FundsApiResourceSwagger.PostFundsResponse.class)}) + public String createFund(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createFund().withJson(apiRequestBodyAsJson).build(); @@ -107,7 +107,9 @@ public class FundsApiResource { @Path("{fundId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retreiveFund(@PathParam("fundId") final Long fundId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve a Fund", httpMethod = "GET", notes = "Returns the details of a Fund.\n" + "\n" + "Example Requests:\n" + "\n" + "funds/1") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = FundsApiResourceSwagger.GetFundsResponse.class)}) + public String retreiveFund(@PathParam("fundId") @ApiParam(value = "fundId") final Long fundId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -121,7 +123,10 @@ public class FundsApiResource { @Path("{fundId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String updateFund(@PathParam("fundId") final Long fundId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update a Fund", httpMethod = "PUT", notes = "Updates the details of a fund.") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = FundsApiResourceSwagger.PutFundsFundIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = FundsApiResourceSwagger.PutFundsFundIdResponse.class)}) + public String updateFund(@PathParam("fundId") @ApiParam(value = "fundId") final Long fundId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateFund(fundId).withJson(apiRequestBodyAsJson).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/api/FundsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/api/FundsApiResourceSwagger.java new file mode 100644 index 000000000..f15a6863c --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/api/FundsApiResourceSwagger.java @@ -0,0 +1,78 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.fund.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * Created by Chirag Gupta on 12/08/17. + */ +final class FundsApiResourceSwagger { + private FundsApiResourceSwagger() { + } + + @ApiModel(value = "GetFundsResponse") + public static final class GetFundsResponse { + private GetFundsResponse() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "EU Agri Fund") + public String name; + } + + @ApiModel(value = "PostFundsRequest") + public static final class PostFundsRequest { + private PostFundsRequest() { + } + + @ApiModelProperty(example = "EU Agri Fund") + public String name; + } + + @ApiModel(value = "PostFundsResponse") + public static final class PostFundsResponse { + private PostFundsResponse() { + } + + @ApiModelProperty(example = "1") + public Integer resourceId; + } + + @ApiModel(value = "PutFundsFundIdRequest") + public static final class PutFundsFundIdRequest { + private PutFundsFundIdRequest() { + } + + @ApiModelProperty(example = "EU Agri Fund (2010-2020)") + public String name; + } + + @ApiModel(value = "PutFundsFundIdResponse") + public static final class PutFundsFundIdResponse { + private PutFundsFundIdResponse() { + } + + @ApiModelProperty(example = "1") + public Integer resourceId; + public PutFundsFundIdRequest changes; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/CentersApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/CentersApiResource.java index 0195e99cd..b9633a917 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/CentersApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/CentersApiResource.java @@ -18,22 +18,8 @@ */ package org.apache.fineract.portfolio.group.api; -import java.util.*; - -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.DefaultValue; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - +import com.google.gson.JsonElement; +import io.swagger.annotations.*; import org.apache.commons.lang.StringUtils; import org.apache.fineract.accounting.journalentry.api.DateParam; import org.apache.fineract.commands.domain.CommandWrapper; @@ -73,11 +59,16 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; -import com.google.gson.JsonElement; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; +import java.util.*; @Path("/centers") @Component @Scope("singleton") +@Api(value = "Centers", description = "Centers along with Groups are used to provided a distinctive banking distribution channel used in microfinance. Its common in areas such as Southern Asia to use Centers and Group as administrative units in grameen style lending. Typically groups will contain one to five people and centers themselves will be made of anywhere between 2-10 groups.") public class CentersApiResource { private final PlatformSecurityContext context; @@ -123,9 +114,11 @@ public class CentersApiResource { @Path("template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveTemplate(@Context final UriInfo uriInfo, @QueryParam("command") final String commandParam, - @QueryParam("officeId") final Long officeId, - @DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") final boolean staffInSelectedOfficeOnly) { + @ApiOperation(value = "Retrieve a Center Template", httpMethod = "GET", notes = "Retrieves a Center Template\n\n" + "Example Requests:\n\n" + "\n\n" + "centers/template\n\n" + "\n\n" + "centers/template?officeId=2") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = CentersApiResourceSwagger.GetCentersTemplateResponse.class)}) + public String retrieveTemplate(@Context final UriInfo uriInfo, @QueryParam("command") @ApiParam(value = "command") final String commandParam, + @QueryParam("officeId") @ApiParam(value = "officeId") final Long officeId, + @DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") @ApiParam(value = "staffInSelectedOfficeOnly") final boolean staffInSelectedOfficeOnly) { this.context.authenticatedUser().validateHasReadPermission(GroupingTypesApiConstants.CENTER_RESOURCE_NAME); @@ -148,14 +141,16 @@ public class CentersApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveAll(@Context final UriInfo uriInfo, @QueryParam("sqlSearch") final String sqlSearch, - @QueryParam("officeId") final Long officeId, @QueryParam("staffId") final Long staffId, - @QueryParam("externalId") final String externalId, @QueryParam("name") final String name, - @QueryParam("underHierarchy") final String hierarchy, @QueryParam("paged") final Boolean paged, - @QueryParam("offset") final Integer offset, @QueryParam("limit") final Integer limit, - @QueryParam("orderBy") final String orderBy, @QueryParam("sortOrder") final String sortOrder, - @QueryParam("meetingDate") final DateParam meetingDateParam, @QueryParam("dateFormat") final String dateFormat, - @QueryParam("locale") final String locale) { + @ApiOperation(value = "List Centers", httpMethod = "GET", notes = "The default implementation supports pagination and sorting with the default pagination size set to 200 records. The parameter limit with value -1 will return all entries.\n\n" + "Example Requests:\n\n" + "\n\n" + "centers\n\n" + "\n\n" + "centers?fields=name,officeName,joinedDate\n\n" + "\n\n" + "centers?offset=10&limit=50\n\n" + "\n\n" + "centers?orderBy=name&sortOrder=DESC") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = CentersApiResourceSwagger.GetCentersResponse.class)}) + public String retrieveAll(@Context final UriInfo uriInfo, @QueryParam("sqlSearch") @ApiParam(value = "sqlSearch") final String sqlSearch, + @QueryParam("officeId") @ApiParam(value = "officeId") final Long officeId, @QueryParam("staffId") @ApiParam(value = "staffId") final Long staffId, + @QueryParam("externalId") @ApiParam(value = "externalId") final String externalId, @QueryParam("name") @ApiParam(value = "name") final String name, + @QueryParam("underHierarchy") @ApiParam(value = "underHierarchy") final String hierarchy, @QueryParam("paged") @ApiParam(value = "paged") final Boolean paged, + @QueryParam("offset") @ApiParam(value = "offset") final Integer offset, @QueryParam("limit") @ApiParam(value = "limit") final Integer limit, + @QueryParam("orderBy") @ApiParam(value = "orderBy") final String orderBy, @QueryParam("sortOrder") @ApiParam(value = "sortOrder") final String sortOrder, + @QueryParam("meetingDate") @ApiParam(value = "meetingDate") final DateParam meetingDateParam, @QueryParam("dateFormat") @ApiParam(value = "dateFormat") final String dateFormat, + @QueryParam("locale") @ApiParam(value = "locale") final String locale) { this.context.authenticatedUser().validateHasReadPermission(GroupingTypesApiConstants.CENTER_RESOURCE_NAME); final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters()); @@ -183,8 +178,10 @@ public class CentersApiResource { @Path("{centerId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveOne(@Context final UriInfo uriInfo, @PathParam("centerId") final Long centerId, - @DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") final boolean staffInSelectedOfficeOnly) { + @ApiOperation(value = "Retrieve a Center", httpMethod = "GET", notes = "Retrieves a Center\n\n" + "Example Requests:\n\n" + "\n\n" + "centers/1\n\n" + "\n\n" + "centers/1?associations=groupMembers") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = CentersApiResourceSwagger.GetCentersCenterIdResponse.class)}) + public String retrieveOne(@Context final UriInfo uriInfo, @PathParam("centerId") @ApiParam(value = "centerId") final Long centerId, + @DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") @ApiParam(value = "staffInSelectedOfficeOnly") final boolean staffInSelectedOfficeOnly) { this.context.authenticatedUser().validateHasReadPermission(GroupingTypesApiConstants.CENTER_RESOURCE_NAME); final Set associationParameters = ApiParameterHelper.extractAssociationsForResponseIfProvided(uriInfo.getQueryParameters()); @@ -232,7 +229,10 @@ public class CentersApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String create(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Create a Center", httpMethod = "POST", notes = "Creates a Center\n\n" + "Mandatory Fields: name, officeId, active, activationDate (if active=true)\n\n" + "Optional Fields: externalId, staffId, groupMembers") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = CentersApiResourceSwagger.PostCentersRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = CentersApiResourceSwagger.PostCentersResponse.class)}) + public String create(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // .createCenter() // @@ -247,7 +247,10 @@ public class CentersApiResource { @Path("{centerId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String update(@PathParam("centerId") final Long centerId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update a Center", httpMethod = "PUT", notes = "Updates a Center") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = CentersApiResourceSwagger.PutCentersCenterIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = CentersApiResourceSwagger.PutCentersCenterIdResponse.class)}) + public String update(@PathParam("centerId") @ApiParam(value = "centerId") final Long centerId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // .updateCenter(centerId) // @@ -261,7 +264,9 @@ public class CentersApiResource { @Path("{centerId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String delete(@PathParam("centerId") final Long centerId) { + @ApiOperation(value = "Delete a Center", httpMethod = "DELETE", notes = "A Center can be deleted if it is in pending state and has no association - groups, loans or savings") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = CentersApiResourceSwagger.DeleteCentersCenterIdResponse.class)}) + public String delete(@PathParam("centerId") @ApiParam(value = "centerId") final Long centerId) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // .deleteCenter(centerId) // @@ -274,8 +279,11 @@ public class CentersApiResource { @Path("{centerId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String activate(@PathParam("centerId") final Long centerId, @QueryParam("command") final String commandParam, - final String apiRequestBodyAsJson, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Activate a Center | Generate Collection Sheet | Save Collection Sheet | Close a Center | Associate Groups | Disassociate Groups", httpMethod = "POST", notes = "Activate a Center:\n\n" + "Centers can be created in a Pending state. This API exists to enable center activation. If the center happens to be already active, this API will result in an error.\n\n" + "Close a Center:\n\n" + "Centers can be closed if they don't have any non-closed groups or saving accounts. If the Center has any active groups or savings accounts, this API will result in an error.\n\n" + "Associate Groups:\n\n" + "This API allows associating existing groups to a center. The groups are listed from the office to which the center is associated. If group(s) is already associated with a center, this API will result in an error.\n\n" + "Disassociate Groups:\n\n" + "This API allows to disassociate groups from a center.\n\n" + "Generate Collection Sheet:\n\n" + "This Api retrieves repayment details of all jlg loans under a center as on a specified meeting date.\n\n" + "Save Collection Sheet:\n\n" + "This Api allows the loan officer to perform bulk repayments of JLG loans for a center on a given meeting date.\n\n" + "Showing Request/Response for Close a Center") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = CentersApiResourceSwagger.PostCentersCenterIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = CentersApiResourceSwagger.PostCentersCenterIdResponse.class)}) + public String activate(@PathParam("centerId") @ApiParam(value = "centerId") final Long centerId, @QueryParam("command") @ApiParam(value = "command") final String commandParam, + @ApiParam(hidden = true) final String apiRequestBodyAsJson, @Context final UriInfo uriInfo) { final CommandWrapperBuilder builder = new CommandWrapperBuilder().withJson(apiRequestBodyAsJson); @@ -322,7 +330,9 @@ public class CentersApiResource { @Path("{centerId}/accounts") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveGroupAccount(@PathParam("centerId") final Long centerId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve Center accounts overview", httpMethod = "GET", notes = "An example of how a savings summary for a Center can be provided. This is requested in a specific use case of the reference application.\n\n" + "It is quite reasonable to add resources like this to simplify User Interface development.\n\n" + "\n\n" + "Example Requests:\n\n" + "\n\n" + "centers/9/accounts") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = CentersApiResourceSwagger.GetCentersCenterIdAccountsResponse.class)}) + public String retrieveGroupAccount(@PathParam("centerId") @ApiParam(value = "centerId") final Long centerId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(GroupingTypesApiConstants.CENTER_RESOURCE_NAME); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/CentersApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/CentersApiResourceSwagger.java new file mode 100644 index 000000000..7a510c626 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/CentersApiResourceSwagger.java @@ -0,0 +1,343 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.group.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.time.LocalDate; +import java.util.Set; + +/** + * Created by Chirag Gupta on 12/18/17. + */ +final class CentersApiResourceSwagger { + private CentersApiResourceSwagger() { + } + + @ApiModel(value = "GetCentersTemplateResponse") + public final static class GetCentersTemplateResponse { + private GetCentersTemplateResponse() { + } + + final class GetCentersOfficeOptions { + private GetCentersOfficeOptions() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "Head Office") + public String name; + @ApiModelProperty(example = "Head Office") + public String nameDecorated; + } + + final class GetCentersStaffOptions { + private GetCentersStaffOptions() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "D, Mary") + public String displayName; + } + + + @ApiModelProperty(example = "false") + public Boolean active; + @ApiModelProperty(example = "[2013, 4, 18]") + public LocalDate activationDate; + @ApiModelProperty(example = "2") + public Integer officeId; + public Set officeOptions; + public Set staffOptions; + } + + @ApiModel(value = "GetCentersResponse") + public final static class GetCentersResponse { + private GetCentersResponse() { + } + + final class GetCentersPageItems { + private GetCentersPageItems() { + } + + final class GetCentersStatus { + private GetCentersStatus() { + } + + @ApiModelProperty(example = "100") + public Integer id; + @ApiModelProperty(example = "groupingStatusType.pending") + public String code; + @ApiModelProperty(example = "Pending") + public String value; + } + + @ApiModelProperty(example = "2") + public Integer id; + public GetCentersStatus status; + @ApiModelProperty(example = "false") + public Boolean active; + @ApiModelProperty(example = "Center 1") + public String name; + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "Head Office") + public String officeName; + @ApiModelProperty(example = ".2.") + public String hierarchy; + } + + @ApiModelProperty(example = "2") + public Integer totalFilteredRecords; + public Set pageItems; + } + + @ApiModel(value = "GetCentersCenterIdResponse") + public final static class GetCentersCenterIdResponse { + private GetCentersCenterIdResponse() { + } + + @ApiModelProperty(example = "8") + public Integer id; + public GetCentersResponse.GetCentersPageItems.GetCentersStatus status; + @ApiModelProperty(example = "false") + public Boolean active; + @ApiModelProperty(example = "First Center (No groups)") + public String name; + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "Head Office") + public String officeName; + @ApiModelProperty(example = ".8.") + public String hierarchy; + } + + @ApiModel(value = "PostCentersRequest") + public final static class PostCentersRequest { + private PostCentersRequest() { + } + + @ApiModelProperty(example = "First Center (No groups)") + public String name; + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "false") + public Boolean active; + } + + @ApiModel(value = "PostCentersResponse") + public final static class PostCentersResponse { + private PostCentersResponse() { + } + + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "8") + public Integer groupId; + @ApiModelProperty(example = "8") + public Integer resourceId; + } + + @ApiModel(value = "PutCentersCenterIdRequest") + public final static class PutCentersCenterIdRequest { + private PutCentersCenterIdRequest() { + } + + @ApiModelProperty(example = "First Center (No groups)") + public String name; + } + + @ApiModel(value = "PutCentersCenterIdResponse") + public final static class PutCentersCenterIdResponse { + private PutCentersCenterIdResponse() { + } + + final class PutCentersChanges { + private PutCentersChanges() { + } + + @ApiModelProperty(example = "First Center (No groups) - modified") + public String name; + } + + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "8") + public Integer groupId; + @ApiModelProperty(example = "8") + public Integer resourceId; + public PutCentersChanges changes; + } + + @ApiModel(value = "DeleteCentersCenterIdResponse") + public final static class DeleteCentersCenterIdResponse { + private DeleteCentersCenterIdResponse() { + } + + final class DeleteCentersChanges { + private DeleteCentersChanges() { + } + } + + @ApiModelProperty(example = "1") + public Integer resourceId; + public DeleteCentersChanges changes; + } + + @ApiModel(value = "PostCentersCenterIdRequest") + public final static class PostCentersCenterIdRequest { + private PostCentersCenterIdRequest() { + } + + @ApiModelProperty(example = "32") + public Integer closureReasonId; + @ApiModelProperty(example = "05 May 2014") + public String closureDate; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + } + + @ApiModel(value = "PostCentersCenterIdResponse") + public final static class PostCentersCenterIdResponse { + private PostCentersCenterIdResponse() { + } + + @ApiModelProperty(example = "1") + public Integer resourceId; + } + + @ApiModel(value = "GetCentersCenterIdAccountsResponse") + public final static class GetCentersCenterIdAccountsResponse { + private GetCentersCenterIdAccountsResponse() { + } + + final class GetCentersSavingsAccounts { + private GetCentersSavingsAccounts() { + } + + final class GetCentersCenterIdStatus { + private GetCentersCenterIdStatus() { + } + + @ApiModelProperty(example = "100") + public Integer id; + @ApiModelProperty(example = "savingsAccountStatusType.submitted.and.pending.approval") + public String code; + @ApiModelProperty(example = "Submitted and pending approval") + public String value; + @ApiModelProperty(example = "true") + public Boolean submittedAndPendingApproval; + @ApiModelProperty(example = "false") + public Boolean approved; + @ApiModelProperty(example = "false") + public Boolean rejected; + @ApiModelProperty(example = "false") + public Boolean withdrawnByApplicant; + @ApiModelProperty(example = "false") + public Boolean active; + @ApiModelProperty(example = "false") + public Boolean closed; + @ApiModelProperty(example = "false") + public Boolean prematureClosed; + @ApiModelProperty(example = "false") + public Boolean transferInProgress; + @ApiModelProperty(example = "false") + public Boolean transferOnHold; + } + + final class GetCentersCenterIdCurrency { + private GetCentersCenterIdCurrency() { + } + + @ApiModelProperty(example = "USD") + public String code; + @ApiModelProperty(example = "US Dollar") + public String name; + @ApiModelProperty(example = "2") + public Integer decimalPlaces; + @ApiModelProperty(example = "0") + public Integer inMultiplesOf; + @ApiModelProperty(example = "$") + public String displaySymbol; + @ApiModelProperty(example = "currency.USD") + public String nameCode; + @ApiModelProperty(example = "US Dollar ($)") + public String displayLabel; + } + + final class GetCentersAccountType { + private GetCentersAccountType() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "accountType.group") + public String code; + @ApiModelProperty(example = "Group") + public String value; + } + + final class GetCentersTimeline { + private GetCentersTimeline() { + } + + @ApiModelProperty(example = "[2014, 5, 1]") + public LocalDate submittedOnDate; + @ApiModelProperty(example = "mifos") + public String submittedByUsername; + @ApiModelProperty(example = "App") + public String submittedByFirstname; + @ApiModelProperty(example = "Administrator") + public String submittedByLastname; + } + + final class GetCentersDepositType { + private GetCentersDepositType() { + } + + @ApiModelProperty(example = "100") + public Integer id; + @ApiModelProperty(example = "depositAccountType.savingsDeposit") + public String code; + @ApiModelProperty(example = "Savings") + public String value; + } + + @ApiModelProperty(example = "16") + public Integer id; + @ApiModelProperty(example = "000000016") + public Long accountNo; + @ApiModelProperty(example = "1") + public Integer productId; + @ApiModelProperty(example = "Voluntary savings") + public String productName; + public GetCentersCenterIdStatus status; + public GetCentersCenterIdCurrency currency; + public GetCentersAccountType accountType; + public GetCentersTimeline timeline; + public GetCentersDepositType depositType; + } + + public Set savingsAccounts; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/GroupsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/GroupsApiResource.java index 96dc132a9..2d5059a37 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/GroupsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/GroupsApiResource.java @@ -18,26 +18,8 @@ */ package org.apache.fineract.portfolio.group.api; -import java.util.Arrays; -import java.util.Collection; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.DefaultValue; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - +import com.google.gson.JsonElement; +import io.swagger.annotations.*; import org.apache.commons.lang.StringUtils; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; @@ -81,11 +63,16 @@ import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; -import com.google.gson.JsonElement; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; +import java.util.*; @Path("/groups") @Component @Scope("singleton") +@Api(value = "Groups", description = "Groups are used to provide a distinctive banking distribution channel used in microfinances throughout the world. The Group is an administrative unit. It can contain as few as 5 people or as many as 40 depending on how its used.\n\n" + "\n\n" + "Different styles of group lending - Joint-Liability Group, Grameen Model (Center-Group), Self-Help Groups, Village/Communal Banks)") public class GroupsApiResource { private final PlatformSecurityContext context; @@ -141,10 +128,12 @@ public class GroupsApiResource { @Path("template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveTemplate(@Context final UriInfo uriInfo, @QueryParam("officeId") final Long officeId, - @QueryParam("center") final boolean isCenterGroup, @QueryParam("centerId") final Long centerId, - @QueryParam("command") final String commandParam, - @DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") final boolean staffInSelectedOfficeOnly) { + @ApiOperation(value = "Retrieve Group Template", httpMethod = "GET", notes = "This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\n" + "\n\n" + "Field Defaults\n\n" + "Allowed Value Lists\n\n" + "Example Requests:\n\n" + "\n\n" + "groups/template\n\n" + "\n\n" + "groups/template?officeId=2\n\n" + "\n\n" + "groups/template?centerId=1\n\n" + "\n\n" + "groups/template?centerId=1&staffInSelectedOfficeOnly=true") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = GroupsApiResourceSwagger.GetGroupsTemplateResponse.class)}) + public String retrieveTemplate(@Context final UriInfo uriInfo, @QueryParam("officeId") @ApiParam(value = "officeId") final Long officeId, + @QueryParam("center") @ApiParam(value = "center") final boolean isCenterGroup, @QueryParam("centerId") @ApiParam(value = "centerId") final Long centerId, + @QueryParam("command") @ApiParam(value = "command") final String commandParam, + @DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") @ApiParam(value = "staffInSelectedOfficeOnly") final boolean staffInSelectedOfficeOnly) { this.context.authenticatedUser().validateHasReadPermission(GroupingTypesApiConstants.GROUP_RESOURCE_NAME); @@ -177,13 +166,15 @@ public class GroupsApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveAll(@Context final UriInfo uriInfo, @QueryParam("sqlSearch") final String sqlSearch, - @QueryParam("officeId") final Long officeId, @QueryParam("staffId") final Long staffId, - @QueryParam("externalId") final String externalId, @QueryParam("name") final String name, - @QueryParam("underHierarchy") final String hierarchy, @QueryParam("paged") final Boolean paged, - @QueryParam("offset") final Integer offset, @QueryParam("limit") final Integer limit, - @QueryParam("orderBy") final String orderBy, @QueryParam("sortOrder") final String sortOrder, - @QueryParam("orphansOnly") final Boolean orphansOnly) { + @ApiOperation(value = "List Groups", httpMethod = "GET", notes = "The default implementation of listing Groups returns 200 entries with support for pagination and sorting. Using the parameter limit with value -1 returns all entries.\n\n" + "Example Requests:\n\n" + "\n\n" + "groups\n\n" + "\n\n" + "groups?fields=name,officeName,joinedDate\n\n" + "\n\n" + "groups?offset=10&limit=50\n\n" + "\n\n" + "groups?orderBy=name&sortOrder=DESC") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = GroupsApiResourceSwagger.GetGroupsResponse.class)}) + public String retrieveAll(@Context final UriInfo uriInfo, @QueryParam("sqlSearch") @ApiParam(value = "sqlSearch") final String sqlSearch, + @QueryParam("officeId") @ApiParam(value = "officeId") final Long officeId, @QueryParam("staffId") @ApiParam(value = "staffId") final Long staffId, + @QueryParam("externalId") @ApiParam(value = "externalId") final String externalId, @QueryParam("name") @ApiParam(value = "name") final String name, + @QueryParam("underHierarchy") @ApiParam(value = "underHierarchy") final String hierarchy, @QueryParam("paged") @ApiParam(value = "paged") final Boolean paged, + @QueryParam("offset")@ApiParam(value = "offset") final Integer offset, @QueryParam("limit") @ApiParam(value = "limit") final Integer limit, + @QueryParam("orderBy") @ApiParam(value = "orderBy") final String orderBy, @QueryParam("sortOrder") @ApiParam(value = "sortOrder") final String sortOrder, + @QueryParam("orphansOnly") @ApiParam(value = "orphansOnly") final Boolean orphansOnly) { this.context.authenticatedUser().validateHasReadPermission(GroupingTypesApiConstants.GROUP_RESOURCE_NAME); final PaginationParameters parameters = PaginationParameters.instance(paged, offset, limit, orderBy, sortOrder); @@ -204,9 +195,11 @@ public class GroupsApiResource { @Path("{groupId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveOne(@Context final UriInfo uriInfo, @PathParam("groupId") final Long groupId, - @DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") final boolean staffInSelectedOfficeOnly, - @QueryParam("roleId") final Long roleId) { + @ApiOperation(value = "Retrieve a Group", httpMethod = "GET", notes = "Retrieve group information.\n\n" + "Example Requests:\n\n" + "\n\n" + "groups/1\n\n" + "\n\n" + "groups/1?associations=clientMembers") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = GroupsApiResourceSwagger.GetGroupsGroupIdResponse.class)}) + public String retrieveOne(@Context final UriInfo uriInfo, @PathParam("groupId") @ApiParam(value = "groupId") final Long groupId, + @DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") @ApiParam(value = "staffInSelectedOfficeOnly") final boolean staffInSelectedOfficeOnly, + @QueryParam("roleId") @ApiParam(value = "roleId") final Long roleId) { this.context.authenticatedUser().validateHasReadPermission(GroupingTypesApiConstants.GROUP_RESOURCE_NAME); final Set associationParameters = ApiParameterHelper.extractAssociationsForResponseIfProvided(uriInfo.getQueryParameters()); @@ -301,7 +294,10 @@ public class GroupsApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String create(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Create a Group", httpMethod = "POST", notes = "Creates a Group\n\n" + "Mandatory Fields: name, officeId, active, activationDate (if active=true)\n\n" + "Optional Fields: externalId, staffId, clientMembers") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = GroupsApiResourceSwagger.PostGroupsRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = GroupsApiResourceSwagger.PostGroupsResponse.class)}) + public String create(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // .createGroup() // @@ -315,7 +311,10 @@ public class GroupsApiResource { @Path("{groupId}/command/unassign_staff") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String unassignLoanOfficer(@PathParam("groupId") final Long groupId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Unassign a Staff", httpMethod = "POST", notes = "Allows you to unassign the Staff.\n\n" + "Mandatory Fields: staffId") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = GroupsApiResourceSwagger.PostGroupsGroupIdCommandUnassignStaffRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = GroupsApiResourceSwagger.PostGroupsGroupIdCommandUnassignStaffResponse.class )}) + public String unassignLoanOfficer(@PathParam("groupId") @ApiParam(value = "groupId") final Long groupId,@ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // .unassignGroupStaff(groupId) // @@ -330,7 +329,10 @@ public class GroupsApiResource { @Path("{groupId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String update(@PathParam("groupId") final Long groupId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update a Group", httpMethod = "PUT", notes = "Updates a Group") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = GroupsApiResourceSwagger.PutGroupsGroupIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = GroupsApiResourceSwagger.PutGroupsGroupIdResponse.class)}) + public String update(@PathParam("groupId")@ApiParam(value = "groupId") final Long groupId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // .updateGroup(groupId) // @@ -344,7 +346,9 @@ public class GroupsApiResource { @Path("{groupId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String delete(@PathParam("groupId") final Long groupId) { + @ApiOperation(value = "Delete a Group", httpMethod = "DELETE", notes = "A group can be deleted if it is in pending state and has no associations - clients, loans or savings") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = GroupsApiResourceSwagger.DeleteGroupsGroupIdResponse.class)}) + public String delete(@PathParam("groupId") @ApiParam(value = "groupId") final Long groupId) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // .deleteGroup(groupId) // @@ -357,8 +361,11 @@ public class GroupsApiResource { @Path("{groupId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String activateOrGenerateCollectionSheet(@PathParam("groupId") final Long groupId, - @QueryParam("command") final String commandParam, @QueryParam("roleId") final Long roleId, final String apiRequestBodyAsJson, + @ApiOperation(value = "Activate a Group | Associate Clients | Disassociate Clients | Transfer Clients across groups | Generate Collection Sheet | Save Collection Sheet | Unassign a Staff | Assign a Staff | Close a Group | Unassign a Role | Update a Role", httpMethod = "POST", notes = "Activate a Group:\n\n" + "Groups can be created in a Pending state. This API exists to enable group activation.\n\n" + "\n\n" + "If the group happens to be already active this API will result in an error.\n\n" + "Mandatory Fields: activationDate\n\n" + "Associate Clients:\n\n" + "This API allows to associate existing clients to a group.\n\n" + "\n\n" + "The clients are listed from the office to which the group is associated.\n\n" + "\n\n" + "If client(s) is already associated with group then API will result in an error.\n\n" + "Mandatory Fields: clientMembers\n\n" + "Disassociate Clients:\n\n" + "This API allows to disassociate clients from a group.\n\n" + "\n\n" + "Disassociating a client with active joint liability group loans results in an error.\n\n" + "Mandatory Fields: clientMembers\n\n" + "Transfer Clients across groups:\n\n" + "This API allows to transfer clients from one group to another\n\n" + "Mandatory Fields: destinationGroupId and clients\n\n" + "Optional Fields: inheritDestinationGroupLoanOfficer (defaults to true) and transferActiveLoans (defaults to true)\n\n" + "Generate Collection Sheet:\n\n" + "This API retrieves repayment details of all jlg loans of all members of a group on a specified meeting date.\n\n" + "Mandatory Fields: calendarId and transactionDate\n\n" + "Save Collection Sheet:\n\n" + "This api allows the loan officer to perform bulk repayments of JLG loans for a group on its meeting date.\n\n" + "Mandatory Fields: calendarId, transactionDate, actualDisbursementDate\n\n" + "Optional Fields: clientsAttendance, bulkRepaymentTransaction, bulkDisbursementTransactions\n\n" + "Unassign a Staff:\n\n" + "Allows you to unassign the Staff.\n\n" + "Mandatory Fields: staffId\n\n" + "Assign a Staff:\n\n" + "Allows you to assign Staff to an existing Group.\n\n" + "\n\n" + "The selected Staff should be belong to the same office (or an office higher up in the hierarchy) as this group" + "Mandatory Fields: staffId\n\n" + "Optional Fields: inheritStaffForClientAccounts (Optional: Boolean if true all members of the group (i.e all clients with active loans and savings ) will inherit the staffId)\n\n" + "Close a Group:\n\n" + "This API exists to close a group. Groups can be closed if they don't have any non-closed clients/loans/savingsAccounts.\n\n" + "\n\n" + "If the group has any active clients/loans/savingsAccount, this API will result in an error." + "Assign a Role:\n\n" + "Allows you to assign a Role to an existing member of a group.\n\n" + "\n\n" + "We can define the different roles applicable to group members by adding code values to the pre-defined system code GROUPROLE. Example:Group leader etc.\n\n" + "Mandatory Fields: clientId, role\n\n" + "Unassign a Role:\n\n" + "Allows you to unassign Roles associated tp Group members.\n\n" + "Update a Role:\n\n" + "Allows you to update the member Role.\n\n" + "Mandatory Fields: role\n\n" + "Showing request/response for Transfer Clients across groups") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = GroupsApiResourceSwagger.PostGroupsGroupIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = GroupsApiResourceSwagger.PostGroupsGroupIdResponse.class)}) + public String activateOrGenerateCollectionSheet(@PathParam("groupId") @ApiParam(value = "groupId") final Long groupId, + @QueryParam("command") @ApiParam(value = "command") final String commandParam, @QueryParam("roleId") @ApiParam(value = "roleId") final Long roleId, @ApiParam(hidden = true) final String apiRequestBodyAsJson, @Context final UriInfo uriInfo) { final CommandWrapperBuilder builder = new CommandWrapperBuilder().withJson(apiRequestBodyAsJson); @@ -429,7 +436,9 @@ public class GroupsApiResource { @Path("{groupId}/accounts") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveAccounts(@PathParam("groupId") final Long groupId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve Group accounts overview", httpMethod = "GET", notes = "Retrieves details of all Loan and Savings accounts associated with this group.\n\n" + "\n\n" + "Example Requests:\n\n" + "\n\n" + "groups/1/accounts\n\n" + "\n\n" + "\n\n" + "groups/1/accounts?fields=loanAccounts,savingsAccounts,memberLoanAccounts,\n\n" + "memberSavingsAccounts") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = GroupsApiResourceSwagger.GetGroupsGroupIdAccountsResponse.class)}) + public String retrieveAccounts(@PathParam("groupId") @ApiParam(value = "groupId") final Long groupId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission("GROUP"); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/GroupsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/GroupsApiResourceSwagger.java new file mode 100644 index 000000000..23d0911ac --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/GroupsApiResourceSwagger.java @@ -0,0 +1,529 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.group.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.time.LocalDate; +import java.util.Set; + +/** + * Created by Chirag Gupta on 12/10/17. + */ +final class GroupsApiResourceSwagger { + private GroupsApiResourceSwagger() { + } + + @ApiModel(value = "GetGroupsTemplateResponse") + public final static class GetGroupsTemplateResponse { + private GetGroupsTemplateResponse() { + } + + final class GetGroupsTemplateOfficeOptions { + private GetGroupsTemplateOfficeOptions() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "Head Office") + public String name; + @ApiModelProperty(example = "Head Office") + public String nameDecorated; + } + + final class GetGroupsTemplateStaffOptions { + private GetGroupsTemplateStaffOptions() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "C, Mike") + public String displayName; + } + + final class GetGroupsTemplateClientOptions { + private GetGroupsTemplateClientOptions() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "Petra Yton") + public String displayName; + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "Head Office") + public String officeName; + } + + final class GetGroupsTemplateDatatables { + private GetGroupsTemplateDatatables() { + } + + final class GetGroupsTemplateColumnHeaderData { + private GetGroupsTemplateColumnHeaderData() { + } + + final class GetGroupsTemplateColumnValues { + private GetGroupsTemplateColumnValues() { + } + } + + @ApiModelProperty(example = "group_id") + public String columnName; + @ApiModelProperty(example = "bigint") + public String columnType; + @ApiModelProperty(example = "0") + public Integer columnLength; + @ApiModelProperty(example = "INTEGER") + public String columnDisplayType; + @ApiModelProperty(example = "false") + public Boolean isColumnNullable; + @ApiModelProperty(example = "true") + public Boolean isColumnPrimaryKey; + public Set columnValues; + } + + @ApiModelProperty(example = "m_group") + public String applicationTableName; + @ApiModelProperty(example = "Group Activation Data") + public String registeredTableName; + public Set columnHeaderData; + } + + @ApiModelProperty(example = "1") + public Integer officeId; + public Set officeOptions; + public Set staffOptions; + public Set clientOptions; + public Set datatables; + } + + @ApiModel(value = "GetGroupsResponse") + public static final class GetGroupsResponse { + private GetGroupsResponse() { + } + + final class GetGroupsPageItems { + private GetGroupsPageItems() { + } + + final class GetGroupsStatus { + private GetGroupsStatus() { + } + + @ApiModelProperty(example = "100") + public Integer id; + @ApiModelProperty(example = "clientStatusType.pending") + public String code; + @ApiModelProperty(example = "Pending") + public String value; + } + + @ApiModelProperty(example = "4") + public Integer id; + @ApiModelProperty(example = "AnotherGroup") + public String name; + public GetGroupsStatus status; + @ApiModelProperty(example = "false") + public Boolean active; + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "Head Office") + public String officeName; + @ApiModelProperty(example = ".4.") + public String hierarchy; + } + + @ApiModelProperty(example = "2") + public Integer totalFilteredRecords; + public Set pageItems; + } + + @ApiModel(value = "GetGroupsGroupIdResponse") + public final static class GetGroupsGroupIdResponse { + private GetGroupsGroupIdResponse() { + } + + final class GetGroupsGroupIdTimeline { + private GetGroupsGroupIdTimeline() { + } + + @ApiModelProperty(example = "[2013, 11, 14]") + public LocalDate activatedOnDate; + @ApiModelProperty(example = "mifos") + public String activatedByUsername; + @ApiModelProperty(example = "App") + public String activatedByFirstname; + @ApiModelProperty(example = "Administrator") + public String activatedByLastname; + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "First Group") + public String name; + @ApiModelProperty(example = "000-1A") + public String externalId; + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "Head Office") + public String officeName; + @ApiModelProperty(example = ".1.") + public String hierarchy; + public GetGroupsGroupIdTimeline timeline; + } + + @ApiModel(value = "PostGroupsRequest") + public final static class PostGroupsRequest { + private PostGroupsRequest() { + } + + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "Pending Group") + public String name; + @ApiModelProperty(example = "false") + public Boolean active; + } + + @ApiModel(value = "PostGroupsResponse") + public final static class PostGroupsResponse { + private PostGroupsResponse() { + } + + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "2") + public Integer groupId; + @ApiModelProperty(example = "2") + public Integer resourceId; + } + + @ApiModel(value = "DeleteGroupsGroupIdResponse") + public final static class DeleteGroupsGroupIdResponse { + private DeleteGroupsGroupIdResponse() { + } + + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "2") + public Integer groupId; + @ApiModelProperty(example = "2") + public Integer resourceId; + } + + @ApiModel(value = "PostGroupsGroupIdCommandUnassignStaffRequest") + public final static class PostGroupsGroupIdCommandUnassignStaffRequest { + private PostGroupsGroupIdCommandUnassignStaffRequest() { + } + + @ApiModelProperty(example = "1") + public Integer staffId; + } + + @ApiModel(value = "PostGroupsGroupIdCommandUnassignStaffResponse") + public final static class PostGroupsGroupIdCommandUnassignStaffResponse { + private PostGroupsGroupIdCommandUnassignStaffResponse() { + } + + final class PostGroupsGroupIdCommandUnassignStaffChanges { + private PostGroupsGroupIdCommandUnassignStaffChanges() { + } + } + + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "1") + public Integer groupId; + @ApiModelProperty(example = "1") + public Integer resourceId; + public PostGroupsGroupIdCommandUnassignStaffChanges changes; + } + + @ApiModel(value = "PutGroupsGroupIdRequest") + public final static class PutGroupsGroupIdRequest { + private PutGroupsGroupIdRequest() { + } + + @ApiModelProperty(example = "First Group (changed)") + public String name; + } + + @ApiModel(value = "PutGroupsGroupIdResponse") + public final static class PutGroupsGroupIdResponse { + private PutGroupsGroupIdResponse() { + } + + final class PutGroupsGroupIdChanges { + private PutGroupsGroupIdChanges() { + } + + @ApiModelProperty(example = "First Group (changed)") + public String name; + } + + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "1") + public Integer groupId; + @ApiModelProperty(example = "1") + public Integer resourceId; + public PutGroupsGroupIdChanges changes; + } + + @ApiModel(value = "GetGroupsGroupIdAccountsResponse") + public final static class GetGroupsGroupIdAccountsResponse { + private GetGroupsGroupIdAccountsResponse() { + } + + final class GetGroupsGroupIdAccountsLoanAccounts { + private GetGroupsGroupIdAccountsLoanAccounts() { + } + + final class GetGroupsGroupIdAccountsStatus { + private GetGroupsGroupIdAccountsStatus() { + } + + @ApiModelProperty(example = "100") + public Integer id; + @ApiModelProperty(example = "loanStatusType.submitted.and.pending.approval") + public String code; + @ApiModelProperty(example = "Submitted and pending approval") + public String value; + @ApiModelProperty(example = "true") + public Boolean pendingApproval; + @ApiModelProperty(example = "false") + public Boolean waitingForDisbursal; + @ApiModelProperty(example = "false") + public Boolean active; + @ApiModelProperty(example = "false") + public Boolean closedObligationsMet; + @ApiModelProperty(example = "false") + public Boolean closedWrittenOff; + @ApiModelProperty(example = "false") + public Boolean closedRescheduled; + @ApiModelProperty(example = "false") + public Boolean closed; + @ApiModelProperty(example = "false") + public Boolean overpaid; + } + + final class GetGroupsGroupIdAccountsLoanType { + private GetGroupsGroupIdAccountsLoanType() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "accountType.group") + public String code; + @ApiModelProperty(example = "Group") + public String value; + } + + @ApiModelProperty(example = "3") + public Integer id; + @ApiModelProperty(example = "000000003") + public Long accountNo; + @ApiModelProperty(example = "3") + public Integer productId; + @ApiModelProperty(example = "daily product") + public String productName; + public GetGroupsGroupIdAccountsStatus status; + public GetGroupsGroupIdAccountsLoanType loanType; + } + + final class GetGroupsGroupIdAccountsSavingAccounts { + private GetGroupsGroupIdAccountsSavingAccounts() { + } + + final class GetGroupsGroupIdAccountsSavingStatus { + private GetGroupsGroupIdAccountsSavingStatus() { + } + + @ApiModelProperty(example = "100") + public Integer id; + @ApiModelProperty(example = "savingsAccountStatusType.submitted.and.pending.approval") + public String code; + @ApiModelProperty(example = "Submitted and pending approval") + public String value; + @ApiModelProperty(example = "true") + public Boolean submittedAndPendingApproval; + @ApiModelProperty(example = "false") + public Boolean approved; + @ApiModelProperty(example = "false") + public Boolean rejected; + @ApiModelProperty(example = "false") + public Boolean withdrawnByApplicant; + @ApiModelProperty(example = "false") + public Boolean active; + @ApiModelProperty(example = "false") + public Boolean closed; + } + + final class GetGroupsGroupIdAccountsSavingCurrency { + private GetGroupsGroupIdAccountsSavingCurrency() { + } + + @ApiModelProperty(example = "USD") + public String code; + @ApiModelProperty(example = "US Dollar") + public String name; + @ApiModelProperty(example = "2") + public Integer decimalPlaces; + @ApiModelProperty(example = "$") + public String displaySymbol; + @ApiModelProperty(example = "currency.USD") + public String nameCode; + @ApiModelProperty(example = "US Dollar ($)") + public String displayLabel; + } + + final class GetGroupsGroupIdAccountsSavingAccountType { + private GetGroupsGroupIdAccountsSavingAccountType() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "accountType.group") + public String code; + @ApiModelProperty(example = "Group") + public String value; + } + + @ApiModelProperty(example = "9") + public Integer id; + @ApiModelProperty(example = "000000009") + public Long accountNo; + @ApiModelProperty(example = "1") + public Integer productId; + @ApiModelProperty(example = "p_sav") + public String productName; + public GetGroupsGroupIdAccountsSavingStatus status; + public GetGroupsGroupIdAccountsSavingCurrency currency; + public GetGroupsGroupIdAccountsSavingAccountType accountType; + } + + final class GetGroupsGroupIdAccountsMemberLoanAccounts { + private GetGroupsGroupIdAccountsMemberLoanAccounts() { + } + + final class GetGroupsGroupIdAccountsMemberLoanStatus { + private GetGroupsGroupIdAccountsMemberLoanStatus() { + } + + @ApiModelProperty(example = "200") + public Integer id; + @ApiModelProperty(example = "loanStatusType.approved") + public String code; + @ApiModelProperty(example = "Approved") + public String value; + @ApiModelProperty(example = "false") + public Boolean pendingApproval; + @ApiModelProperty(example = "true") + public Boolean waitingForDisbursal; + @ApiModelProperty(example = "false") + public Boolean active; + @ApiModelProperty(example = "false") + public Boolean closedObligationsMet; + @ApiModelProperty(example = "false") + public Boolean closedWrittenOff; + @ApiModelProperty(example = "false") + public Boolean closedRescheduled; + @ApiModelProperty(example = "false") + public Boolean closed; + @ApiModelProperty(example = "false") + public Boolean overpaid; + } + + final class GetGroupsGroupIdAccountsMemberLoanType { + private GetGroupsGroupIdAccountsMemberLoanType() { + } + + @ApiModelProperty(example = "3") + public Integer id; + @ApiModelProperty(example = "accountType.jlg") + public String code; + @ApiModelProperty(example = "JLG") + public String value; + } + + @ApiModelProperty(example = "4") + public Integer id; + @ApiModelProperty(example = "000000004") + public Long accountNo; + @ApiModelProperty(example = "1") + public Integer productId; + @ApiModelProperty(example = "testLoan") + public String productName; + public GetGroupsGroupIdAccountsMemberLoanStatus status; + public GetGroupsGroupIdAccountsMemberLoanType loanType; + } + + final class GetGroupsGroupIdAccountsMemberSavingsAccounts { + private GetGroupsGroupIdAccountsMemberSavingsAccounts() { + } + + + @ApiModelProperty(example = "3") + public Integer id; + @ApiModelProperty(example = "000000003") + public Long accountNo; + @ApiModelProperty(example = "1") + public Integer productId; + @ApiModelProperty(example = "p_sav") + public String productName; + public GetGroupsGroupIdAccountsSavingAccounts.GetGroupsGroupIdAccountsSavingStatus status; + public GetGroupsGroupIdAccountsSavingAccounts.GetGroupsGroupIdAccountsSavingCurrency currency; + public GetGroupsGroupIdAccountsMemberLoanAccounts.GetGroupsGroupIdAccountsMemberLoanType accountType; + } + + public Set loanAccounts; + public Set savingsAccounts; + public Set memberLoanAccounts; + public Set memberSavingsAccounts; + } + + @ApiModel(value = "PostGroupsGroupIdRequest") + public final static class PostGroupsGroupIdRequest { + private PostGroupsGroupIdRequest() { + } + + final class PostGroupsGroupIdClients { + private PostGroupsGroupIdClients() { + } + + @ApiModelProperty(example = "1") + public Integer id; + } + + @ApiModelProperty(example = "2") + public Integer destinationGroupId; + public Set clients; + } + + @ApiModel(value = "PostGroupsGroupIdResponse") + public final static class PostGroupsGroupIdResponse { + private PostGroupsGroupIdResponse() { + } + + @ApiModelProperty(example = "1") + public Integer resourceId; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartSlabsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartSlabsApiResource.java index d62878dfc..364be3d2a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartSlabsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartSlabsApiResource.java @@ -18,36 +18,7 @@ */ package org.apache.fineract.portfolio.interestratechart.api; -import static org.apache.fineract.portfolio.interestratechart.InterestRateChartSlabApiConstants.INTERESTRATE_CHART_SLAB_RESOURCE_NAME; - - -import static org.apache.fineract.portfolio.interestratechart.InterestRateChartSlabApiConstants.amountRangeFromParamName; -import static org.apache.fineract.portfolio.interestratechart.InterestRateChartSlabApiConstants.amountRangeToParamName; -import static org.apache.fineract.portfolio.interestratechart.InterestRateChartSlabApiConstants.annualInterestRateParamName; -import static org.apache.fineract.portfolio.interestratechart.InterestRateChartSlabApiConstants.currencyCodeParamName; -import static org.apache.fineract.portfolio.interestratechart.InterestRateChartSlabApiConstants.descriptionParamName; -import static org.apache.fineract.portfolio.interestratechart.InterestRateChartSlabApiConstants.fromPeriodParamName; -import static org.apache.fineract.portfolio.interestratechart.InterestRateChartSlabApiConstants.incentivesParamName; -import static org.apache.fineract.portfolio.interestratechart.InterestRateChartSlabApiConstants.periodTypeParamName; -import static org.apache.fineract.portfolio.interestratechart.InterestRateChartSlabApiConstants.toPeriodParamName; - -import java.util.Arrays; -import java.util.Collection; -import java.util.HashSet; -import java.util.Set; - -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - +import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -63,9 +34,21 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; + +import static org.apache.fineract.portfolio.interestratechart.InterestRateChartSlabApiConstants.*; + @Path("/interestratecharts/{chartId}/chartslabs") @Component @Scope("singleton") +@Api(value = "Interest Rate Slab (A.K.A interest bands)", description = "The slabs a.k.a interest bands are associated with Interest Rate Chart. These bands allow to define different interest rates for different deposit term periods.") public class InterestRateChartSlabsApiResource { private final InterestRateChartSlabReadPlatformService interestRateChartSlabReadPlatformService; @@ -105,7 +88,9 @@ public class InterestRateChartSlabsApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveAll(@PathParam("chartId") final Long chartId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve all Slabs", httpMethod = "GET", notes = "Retrieve list of slabs associated with a chart\n" + "\n" + "Example Requests:\n" + "\n" + "interestratecharts/1/chartslabs") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = InterestRateChartSlabsApiResourceSwagger.GetInterestRateChartsChartIdChartSlabsResponse.class, responseContainer = "List")}) + public String retrieveAll(@PathParam("chartId") @ApiParam(value = "chartId") final Long chartId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(INTERESTRATE_CHART_SLAB_RESOURCE_NAME); Collection chartSlabs = this.interestRateChartSlabReadPlatformService.retrieveAll(chartId); @@ -118,7 +103,9 @@ public class InterestRateChartSlabsApiResource { @Path("{chartSlabId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveOne(@PathParam("chartId") final Long chartId, @PathParam("chartSlabId") final Long chartSlabId, + @ApiOperation(value = "Retrieve a Slab", httpMethod = "GET", notes = "Retrieve a slab associated with an Interest rate chart\n" + "\n" + "Example Requests:\n" + "\n" + "interestratecharts/1/chartslabs/1\n") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = InterestRateChartSlabsApiResourceSwagger.GetInterestRateChartsChartIdChartSlabsResponse.class)}) + public String retrieveOne(@PathParam("chartId") @ApiParam(value = "chartId") final Long chartId, @PathParam("chartSlabId") @ApiParam(value = "chartSlabId") final Long chartSlabId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(INTERESTRATE_CHART_SLAB_RESOURCE_NAME); @@ -135,7 +122,10 @@ public class InterestRateChartSlabsApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String create(@PathParam("chartId") final Long chartId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Create a Slab", httpMethod = "POST", notes = "Creates a new interest rate slab for an interest rate chart.\n" + "Mandatory Fields\n" + "periodType, fromPeriod, annualInterestRate\n" + "Optional Fields\n" + "toPeriod and description\n" +"Example Requests:\n" + "\n" + "interestratecharts/1/chartslabs") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = InterestRateChartSlabsApiResourceSwagger.PostInterestRateChartsChartIdChartSlabsRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = InterestRateChartSlabsApiResourceSwagger.PostInterestRateChartsChartIdChartSlabsResponse.class)}) + public String create(@PathParam("chartId") @ApiParam(value = "chartId") final Long chartId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createInterestRateChartSlab(chartId) .withJson(apiRequestBodyAsJson).build(); @@ -149,8 +139,11 @@ public class InterestRateChartSlabsApiResource { @Path("{chartSlabId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String update(@PathParam("chartId") final Long chartId, @PathParam("chartSlabId") final Long chartSlabId, - final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update a Slab", httpMethod = "PUT", notes = "It updates the Slab from chart") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = InterestRateChartSlabsApiResourceSwagger.PutInterestRateChartsChartIdChartSlabsChartSlabIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = InterestRateChartSlabsApiResourceSwagger.PutInterestRateChartsChartIdChartSlabsChartSlabIdResponse.class)}) + public String update(@PathParam("chartId") @ApiParam(value = "chartId") final Long chartId, @PathParam("chartSlabId") @ApiParam(value = "chartSlabId") final Long chartSlabId, + @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateInterestRateChartSlab(chartId, chartSlabId) .withJson(apiRequestBodyAsJson).build(); @@ -164,7 +157,9 @@ public class InterestRateChartSlabsApiResource { @Path("{chartSlabId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String delete(@PathParam("chartId") final Long chartId, @PathParam("chartSlabId") final Long chartSlabId) { + @ApiOperation(value = "Delete a Slab", httpMethod = "DELETE", notes = "Delete a Slab from a chart") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = InterestRateChartSlabsApiResourceSwagger.DeleteInterestRateChartsChartIdChartSlabsResponse.class)}) + public String delete(@PathParam("chartId") @ApiParam(value = "chartId") final Long chartId, @PathParam("chartSlabId") @ApiParam(value = "chartSlabId") final Long chartSlabId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteInterestRateChartSlab(chartId, chartSlabId).build(); final CommandProcessingResult result = this.commandsSourceWritePlatformService.logCommandSource(commandRequest); return this.toApiJsonSerializer.serialize(result); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartSlabsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartSlabsApiResourceSwagger.java new file mode 100644 index 000000000..2d18cbf7b --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartSlabsApiResourceSwagger.java @@ -0,0 +1,195 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.interestratechart.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.Set; + +/** + * Created by Chirag Gupta on 08/12/17. + */ +final class InterestRateChartSlabsApiResourceSwagger { + private InterestRateChartSlabsApiResourceSwagger() { + } + + @ApiModel(value = "GetInterestRateChartsChartIdChartSlabsResponse") + public final static class GetInterestRateChartsChartIdChartSlabsResponse { + private GetInterestRateChartsChartIdChartSlabsResponse() { + } + + final class GetInterestRateChartsChartIdChartSlabsIncentives { + private GetInterestRateChartsChartIdChartSlabsIncentives() { + } + + final class GetInterestRateChartsChartIdChartSlabsEntityType { + private GetInterestRateChartsChartIdChartSlabsEntityType() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "InterestIncentiveEntityType.customer") + public Integer code; + @ApiModelProperty(example = "Customer") + public Integer value; + } + + final class GetInterestRateChartsChartIdChartSlabsAttributeName { + private GetInterestRateChartsChartIdChartSlabsAttributeName() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "InterestIncentiveAttributeName.gender") + public Integer code; + @ApiModelProperty(example = "Gender") + public Integer value; + } + + final class GetInterestRateChartsChartIdChartSlabsConditionType { + private GetInterestRateChartsChartIdChartSlabsConditionType() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "incentiveConditionType.equal") + public Integer code; + @ApiModelProperty(example = "equal") + public Integer value; + } + + final class GetInterestRateChartsChartIdChartSlabsIncentiveType { + private GetInterestRateChartsChartIdChartSlabsIncentiveType() { + } + + @ApiModelProperty(example = "3") + public Integer id; + @ApiModelProperty(example = "InterestIncentiveType.incentive") + public Integer code; + @ApiModelProperty(example = "Incentive") + public Integer value; + } + + @ApiModelProperty(example = "1") + public Integer id; + public GetInterestRateChartsChartIdChartSlabsEntityType entityType; + public GetInterestRateChartsChartIdChartSlabsAttributeName attributeName; + public GetInterestRateChartsChartIdChartSlabsConditionType conditionType; + @ApiModelProperty(example = "11") + public Integer attributeValue; + @ApiModelProperty(example = "FEMALE") + public String attributeValueDesc; + public GetInterestRateChartsChartIdChartSlabsIncentiveType incentiveType; + @ApiModelProperty(example = "-1.000000") + public Float amount; + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "5% interest from 1 day till 180 days of deposit") + public String description; + public InterestRateChartsApiResourceSwagger.GetInterestRateChartsTemplateResponse.GetInterestRateChartsTemplatePeriodTypes periodTypes; + @ApiModelProperty(example = "1") + public Integer fromPeriod; + @ApiModelProperty(example = "180") + public Integer toPeriod; + @ApiModelProperty(example = "5") + public Double annualInterestRate; + public InterestRateChartsApiResourceSwagger.GetInterestRateChartsResponse.GetInterestRateChartsCurrency currency; + public Set incentives; + } + + @ApiModel(value = "PostInterestRateChartsChartIdChartSlabsRequest") + public static final class PostInterestRateChartsChartIdChartSlabsRequest { + private PostInterestRateChartsChartIdChartSlabsRequest() { + } + + final class PostInterestRateChartsChartIdChartSlabsIncentives { + private PostInterestRateChartsChartIdChartSlabsIncentives() { + } + + @ApiModelProperty(example = "2") + public Integer entityType; + @ApiModelProperty(example = "2") + public Integer attributeName; + @ApiModelProperty(example = "2") + public Integer conditionType; + @ApiModelProperty(example = "11") + public Integer attributeValue; + @ApiModelProperty(example = "2") + public Integer incentiveType; + @ApiModelProperty(example = "-1") + public Float amount; + } + + @ApiModelProperty(example = "0") + public Integer periodType; + @ApiModelProperty(example = "1") + public Integer fromPeriod; + @ApiModelProperty(example = "180") + public Integer toPeriod; + @ApiModelProperty(example = "5") + public Double annualInterestRate; + @ApiModelProperty(example = "5% interest from 1 day till 180 days of deposit") + public String description; + @ApiModelProperty(example = "en") + public String locale; + public Set incentives; + } + + @ApiModel(value = "PostInterestRateChartsChartIdChartSlabsResponse") + public final static class PostInterestRateChartsChartIdChartSlabsResponse { + private PostInterestRateChartsChartIdChartSlabsResponse() { + } + + @ApiModelProperty(example = "1") + public Integer resourceId; + } + + @ApiModel(value = "PutInterestRateChartsChartIdChartSlabsChartSlabIdRequest") + public static final class PutInterestRateChartsChartIdChartSlabsChartSlabIdRequest { + private PutInterestRateChartsChartIdChartSlabsChartSlabIdRequest() { + } + + @ApiModelProperty(example = "6") + public Double annualInterestRate; + @ApiModelProperty(example = "Interest rate changed to 6%") + public String description; + } + + @ApiModel(value = "PutInterestRateChartsChartIdChartSlabsChartSlabIdResponse") + public static final class PutInterestRateChartsChartIdChartSlabsChartSlabIdResponse { + private PutInterestRateChartsChartIdChartSlabsChartSlabIdResponse() { + } + + @ApiModelProperty(example = "1") + public Integer resourceId; + public PutInterestRateChartsChartIdChartSlabsChartSlabIdRequest changes; + } + + @ApiModel(value = "DeleteInterestRateChartsChartIdChartSlabsResponse") + public final static class DeleteInterestRateChartsChartIdChartSlabsResponse { + private DeleteInterestRateChartsChartIdChartSlabsResponse() { + } + + @ApiModelProperty(example = "1") + public Integer resourceId; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartsApiResource.java index cf54a3aa3..ae19c3b11 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartsApiResource.java @@ -18,24 +18,7 @@ */ package org.apache.fineract.portfolio.interestratechart.api; -import java.util.Arrays; -import java.util.Collection; -import java.util.HashSet; -import java.util.Set; - -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - +import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -52,17 +35,21 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; -import static org.apache.fineract.portfolio.interestratechart.InterestRateChartApiConstants.chartSlabs; -import static org.apache.fineract.portfolio.interestratechart.InterestRateChartApiConstants.descriptionParamName; -import static org.apache.fineract.portfolio.interestratechart.InterestRateChartApiConstants.endDateParamName; -import static org.apache.fineract.portfolio.interestratechart.InterestRateChartApiConstants.fromDateParamName; -import static org.apache.fineract.portfolio.interestratechart.InterestRateChartApiConstants.idParamName; -import static org.apache.fineract.portfolio.interestratechart.InterestRateChartApiConstants.isPrimaryGroupingByAmountParamName; -import static org.apache.fineract.portfolio.interestratechart.InterestRateChartApiConstants.nameParamName; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; + +import static org.apache.fineract.portfolio.interestratechart.InterestRateChartApiConstants.*; @Path("/interestratecharts") @Component @Scope("singleton") +@Api(value = "Interest Rate Chart", description = "This defines an interest rate scheme that can be associated to a term deposit product. This will have a slab (band or range) of deposit periods and the associated interest rates applicable along with incentives for each band.") public class InterestRateChartsApiResource { private final InterestRateChartReadPlatformService chartReadPlatformService; @@ -92,6 +79,8 @@ public class InterestRateChartsApiResource { @Path("template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Retrieve Chart Details Template", httpMethod = "GET", notes = "This is a convenience resource. It can be useful when building maintenance user interface screens for creating a chart. The template data returned consists of any or all of:\n" + "\n" + "Field Defaults\n" + "Allowed Value Lists\n" + "Example Request:\n" + "\n" + "interestratecharts/template") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = InterestRateChartsApiResourceSwagger.GetInterestRateChartsTemplateResponse.class)}) public String template(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(InterestRateChartApiConstants.INTERESTRATE_CHART_RESOURCE_NAME); @@ -104,7 +93,9 @@ public class InterestRateChartsApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveAll(@Context final UriInfo uriInfo, @QueryParam("productId") final Long productId) { + @ApiOperation(value = "Retrieve all Charts", httpMethod = "GET", notes = "Retrieve list of charts associated with a term deposit product(FD or RD).\n" + "Example Requests:\n" + "\n" + "interestratecharts?productId=1") + @ApiResponses({@ApiResponse(code = 200, message = "OK", responseContainer = "List", response = InterestRateChartsApiResourceSwagger.GetInterestRateChartsResponse.class)}) + public String retrieveAll(@Context final UriInfo uriInfo, @QueryParam("productId") @ApiParam(value = "productId") final Long productId) { this.context.authenticatedUser().validateHasReadPermission(InterestRateChartApiConstants.INTERESTRATE_CHART_RESOURCE_NAME); @@ -118,10 +109,12 @@ public class InterestRateChartsApiResource { @Path("{chartId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveOne(@PathParam("chartId") final Long chartId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve a Chart", httpMethod = "GET", notes = "It retrieves the Interest Rate Chart\n" + "Example Requests:\n" + "\n" + "interestratecharts/1") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = InterestRateChartsApiResourceSwagger.GetInterestRateChartsResponse.class)}) + public String retrieveOne(@PathParam("chartId") @ApiParam(value = "chartId") final Long chartId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(InterestRateChartApiConstants.INTERESTRATE_CHART_RESOURCE_NAME); - + InterestRateChartData chartData = null; final Set associationParameters = ApiParameterHelper.extractAssociationsForResponseIfProvided(uriInfo.getQueryParameters()); if (!associationParameters.isEmpty() && associationParameters.contains(InterestRateChartApiConstants.chartSlabs)) { @@ -129,7 +122,7 @@ public class InterestRateChartsApiResource { }else { chartData = this.chartReadPlatformService.retrieveOne(chartId); } - + final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters()); if (settings.isTemplate()) { chartData = this.chartReadPlatformService.retrieveWithTemplate(chartData); @@ -141,7 +134,10 @@ public class InterestRateChartsApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String create(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Create a Chart", httpMethod = "POST", notes = "Creates a new chart which can be attached to a term deposit products (FD or RD).") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = InterestRateChartsApiResourceSwagger.PostInterestRateChartsRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = InterestRateChartsApiResourceSwagger.PostInterestRateChartsResponse.class)}) + public String create(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createInterestRateChart().withJson(apiRequestBodyAsJson).build(); @@ -154,7 +150,10 @@ public class InterestRateChartsApiResource { @Path("{chartId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String update(@PathParam("chartId") final Long chartId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update a Chart", notes = "It updates the Chart.", httpMethod = "PUT") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = InterestRateChartsApiResourceSwagger.PutInterestRateChartsChartIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = InterestRateChartsApiResourceSwagger.PutInterestRateChartsChartIdResponse.class)}) + public String update(@PathParam("chartId") @ApiParam(value = "chartId") final Long chartId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateInterestRateChart(chartId) .withJson(apiRequestBodyAsJson).build(); @@ -168,7 +167,9 @@ public class InterestRateChartsApiResource { @Path("{chartId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String delete(@PathParam("chartId") final Long chartId) { + @ApiOperation(value = "Delete a Chart", notes = "It deletes the chart", httpMethod = "DELETE") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = InterestRateChartsApiResourceSwagger.DeleteInterestRateChartsChartIdResponse.class)}) + public String delete(@PathParam("chartId") @ApiParam(value = "chartId") final Long chartId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteInterestRateChart(chartId).build(); final CommandProcessingResult result = this.commandsSourceWritePlatformService.logCommandSource(commandRequest); return this.toApiJsonSerializer.serialize(result); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartsApiResourceSwagger.java new file mode 100644 index 000000000..9da338d16 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartsApiResourceSwagger.java @@ -0,0 +1,157 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.interestratechart.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.time.LocalDate; +import java.util.Set; + +/** + * Created by Chirag Gupta on 12/04/17. + */ +final class InterestRateChartsApiResourceSwagger { + private InterestRateChartsApiResourceSwagger() { + } + + @ApiModel(value = "GetInterestRateChartsTemplateResponse") + public final static class GetInterestRateChartsTemplateResponse { + private GetInterestRateChartsTemplateResponse() { + } + + final class GetInterestRateChartsTemplatePeriodTypes { + private GetInterestRateChartsTemplatePeriodTypes() { + } + + @ApiModelProperty(example = "0") + public Integer id; + @ApiModelProperty(example = "interestChartPeriodType.days") + public String code; + @ApiModelProperty(example = "Days") + public String value; + } + + public Set periodTypes; + } + + @ApiModel(value = "GetInterestRateChartsResponse") + public static final class GetInterestRateChartsResponse { + private GetInterestRateChartsResponse() { + } + + final class GetInterestRateChartsChartSlabs { + private GetInterestRateChartsChartSlabs() { + } + + @ApiModelProperty(example = "1") + public Integer id; + public GetInterestRateChartsTemplateResponse.GetInterestRateChartsTemplatePeriodTypes periodTypes; + @ApiModelProperty(example = "1") + public Integer fromPeriod; + @ApiModelProperty(example = "6") + public Integer annualInterestRate; + public GetInterestRateChartsCurrency currency; + } + + final class GetInterestRateChartsCurrency { + private GetInterestRateChartsCurrency() { + } + + @ApiModelProperty(example = "USD") + public String code; + @ApiModelProperty(example = "US Dollar") + public String name; + @ApiModelProperty(example = "2") + public Integer decimalPlaces; + @ApiModelProperty(example = "$") + public String displaySymbol; + @ApiModelProperty(example = "currency.USD") + public String nameCode; + @ApiModelProperty(example = "US Dollar ($)") + public String displayLabel; + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "[2014, 1, 1]") + public LocalDate fromDate; + @ApiModelProperty(example = "1") + public Integer savingsProductId; + @ApiModelProperty(example = "Fixed Deposit Product 001") + public String savingsProductName; + public Set chartSlabs; + } + + @ApiModel(value = "PostInterestRateChartsRequest") + public static final class PostInterestRateChartsRequest { + private PostInterestRateChartsRequest() { + } + + @ApiModelProperty(example = "Chart - 2014") + public String name; + @ApiModelProperty(example = "This chart is applicable for year 2014") + public String description; + @ApiModelProperty(example = "Document") + public String type; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "01 Jan 2014") + public String fromDate; + } + + @ApiModel(value = "PostInterestRateChartsResponse") + public static final class PostInterestRateChartsResponse { + private PostInterestRateChartsResponse() { + } + + @ApiModelProperty(example = "1") + public Integer resourceId; + } + + @ApiModel(value = "PutInterestRateChartsChartIdRequest") + public static final class PutInterestRateChartsChartIdRequest { + private PutInterestRateChartsChartIdRequest() { + } + @ApiModelProperty(example = "Interest rate chart for 2014") + public String name; + @ApiModelProperty(example = "Interest rate chart for 2014") + public String description; + } + + @ApiModel(value = "PutInterestRateChartsChartIdResponse") + public static final class PutInterestRateChartsChartIdResponse { + private PutInterestRateChartsChartIdResponse() { + } + + @ApiModelProperty(example = "1") + public Integer resourceId; + } + + @ApiModel(value = "DeleteInterestRateChartsChartIdResponse") + public static final class DeleteInterestRateChartsChartIdResponse { + private DeleteInterestRateChartsChartIdResponse() { + } + + @ApiModelProperty(example = "1") + public Integer resourceId; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanChargesApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanChargesApiResource.java index b5ebd3d07..dce33108a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanChargesApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanChargesApiResource.java @@ -18,24 +18,7 @@ */ package org.apache.fineract.portfolio.loanaccount.api; -import java.util.Arrays; -import java.util.Collection; -import java.util.HashSet; -import java.util.Set; - -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - +import io.swagger.annotations.*; import org.apache.commons.lang.StringUtils; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; @@ -56,9 +39,19 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; + @Path("/loans/{loanId}/charges") @Component @Scope("singleton") +@Api(value = "Loan Charges", description = "Its typical for MFIs to add extra costs for their loan products. They can be either Fees or Penalties.\n" + "\n" + "Loan Charges are instances of Charges and represent either fees and penalties for loan products. Refer Charges for documentation of the various properties of a charge, Only additional properties ( specific to the context of a Charge being associated with a Loan) are described here") public class LoanChargesApiResource { private final Set RESPONSE_DATA_PARAMETERS = new HashSet<>( @@ -96,7 +89,9 @@ public class LoanChargesApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveAllLoanCharges(@PathParam("loanId") final Long loanId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "List Loan Charges", httpMethod = "GET", notes = "It lists all the Loan Charges specific to a Loan \n\n" + "Example Requests:\n" + "\n" + "loans/1/charges\n" + "\n" + "\n" + "loans/1/charges?fields=name,amountOrPercentage") + @ApiResponses({@ApiResponse(code = 200, message = "OK", responseContainer = "List", response = LoanChargesApiResourceSwagger.GetLoansLoanIdChargesChargeIdResponse.class)}) + public String retrieveAllLoanCharges(@PathParam("loanId") @ApiParam(value = "loanId") final Long loanId, @Context final UriInfo uriInfo){ this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -108,9 +103,11 @@ public class LoanChargesApiResource { @GET @Path("template") - @Consumes({ MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveTemplate(@PathParam("loanId") final Long loanId, @Context final UriInfo uriInfo) { + @Consumes({MediaType.APPLICATION_JSON}) + @Produces({MediaType.APPLICATION_JSON}) + @ApiOperation(value = "Retrieve Loan Charges Template", httpMethod = "GET", notes = "This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n" + "\n" + "Field Defaults\n" + "Allowed Value Lists\n" + "Example Request:\n" + "\n" + "loans/1/charges/template\n" + "\n") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = LoanChargesApiResourceSwagger.GetLoansLoanIdChargesTemplateResponse.class)}) + public String retrieveTemplate(@PathParam("loanId") @ApiParam(value = "loanId") final Long loanId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -124,10 +121,12 @@ public class LoanChargesApiResource { @GET @Path("{chargeId}") - @Consumes({ MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveLoanCharge(@PathParam("loanId") final Long loanId, @PathParam("chargeId") final Long loanChargeId, - @Context final UriInfo uriInfo) { + @Consumes({MediaType.APPLICATION_JSON}) + @Produces({MediaType.APPLICATION_JSON}) + @ApiOperation(value = "Retrieve a Loan Charge", httpMethod = "GET", notes = "Retrieves Loan Charge according to the Loan ID and Charge ID" + "Example Requests:\n" + "\n" + "/loans/1/charges/1\n" + "\n" + "\n" + "/loans/1/charges/1?fields=name,amountOrPercentage") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = LoanChargesApiResourceSwagger.GetLoansLoanIdChargesChargeIdResponse.class)}) + public String retrieveLoanCharge(@PathParam("loanId") @ApiParam(value = "loanId") final Long loanId, @PathParam("chargeId") @ApiParam(value = "chargeId") final Long loanChargeId, + @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -143,10 +142,13 @@ public class LoanChargesApiResource { } @POST - @Consumes({ MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_JSON }) - public String executeLoanCharge(@PathParam("loanId") final Long loanId, @QueryParam("command") final String commandParam, - final String apiRequestBodyAsJson) { + @Consumes({MediaType.APPLICATION_JSON}) + @Produces({MediaType.APPLICATION_JSON}) + @ApiOperation(value = "Create a Loan Charge", httpMethod = "POST", notes = "It Creates a Loan Charge") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = LoanChargesApiResourceSwagger.PostLoansLoanIdChargesRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = LoanChargesApiResourceSwagger.PostLoansLoanIdChargesResponse.class)}) + public String executeLoanCharge(@PathParam("loanId") @ApiParam(value = "loanId") final Long loanId, @QueryParam("command") @ApiParam(value = "command") final String commandParam, + @ApiParam(hidden = true) final String apiRequestBodyAsJson) { CommandProcessingResult result = null; if (is(commandParam, "pay")) { @@ -164,10 +166,13 @@ public class LoanChargesApiResource { @PUT @Path("{chargeId}") - @Consumes({ MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_JSON }) - public String updateLoanCharge(@PathParam("loanId") final Long loanId, @PathParam("chargeId") final Long loanChargeId, - final String apiRequestBodyAsJson) { + @Consumes({MediaType.APPLICATION_JSON}) + @Produces({MediaType.APPLICATION_JSON}) + @ApiOperation(value = "Update a Loan Charge", httpMethod = "PUT", notes = "Currently Loan Charges may be updated only if the Loan is not yet approved") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = LoanChargesApiResourceSwagger.PutLoansLoanIdChargesChargeIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = LoanChargesApiResourceSwagger.PutLoansLoanIdChargesChargeIdResponse.class)}) + public String updateLoanCharge(@PathParam("loanId") @ApiParam(value = "loanId") final Long loanId, @PathParam("chargeId") @ApiParam(value = "chargeId") final Long loanChargeId, + @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateLoanCharge(loanId, loanChargeId) .withJson(apiRequestBodyAsJson).build(); @@ -179,10 +184,13 @@ public class LoanChargesApiResource { @POST @Path("{chargeId}") - @Consumes({ MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_JSON }) - public String executeLoanCharge(@PathParam("loanId") final Long loanId, @PathParam("chargeId") final Long loanChargeId, - @QueryParam("command") final String commandParam, final String apiRequestBodyAsJson) { + @Consumes({MediaType.APPLICATION_JSON}) + @Produces({MediaType.APPLICATION_JSON}) + @ApiOperation(value = "Pay Loan Charge", httpMethod = "POST", notes = "Loan Charge will be paid if the loan is linked with a savings account") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = LoanChargesApiResourceSwagger.PostLoansLoanIdChargesChargeIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = LoanChargesApiResourceSwagger.PostLoansLoanIdChargesChargeIdResponse.class)}) + public String executeLoanCharge(@PathParam("loanId") @ApiParam(value = "loanId") final Long loanId, @PathParam("chargeId") @ApiParam(value = "chargeId") final Long loanChargeId, + @QueryParam("command") @ApiParam(value = "command") final String commandParam, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapperBuilder builder = new CommandWrapperBuilder().withJson(apiRequestBodyAsJson); CommandProcessingResult result = null; @@ -201,9 +209,11 @@ public class LoanChargesApiResource { @DELETE @Path("{chargeId}") - @Consumes({ MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_JSON }) - public String deleteLoanCharge(@PathParam("loanId") final Long loanId, @PathParam("chargeId") final Long loanChargeId) { + @Consumes({MediaType.APPLICATION_JSON}) + @Produces({MediaType.APPLICATION_JSON}) + @ApiOperation(value = "Delete a Loan Charge", httpMethod = "DELETE", notes = "Note: Currently, A Loan Charge may only be removed from Loans that are not yet approved.") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = LoanChargesApiResourceSwagger.DeleteLoansLoanIdChargesChargeIdResponse.class)}) + public String deleteLoanCharge(@PathParam("loanId") @ApiParam(value = "loanId") final Long loanId, @PathParam("chargeId") @ApiParam(value = "chargeId") final Long loanChargeId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteLoanCharge(loanId, loanChargeId).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanChargesApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanChargesApiResourceSwagger.java new file mode 100644 index 000000000..e839359d0 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanChargesApiResourceSwagger.java @@ -0,0 +1,277 @@ + +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.loanaccount.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.Set; + +/** + * Created by Chirag Gupta on 12/02/17. + */ +final class LoanChargesApiResourceSwagger { + private LoanChargesApiResourceSwagger() { + } + + @ApiModel(value = "GetLoansLoanIdChargesChargeIdResponse") + public static final class GetLoansLoanIdChargesChargeIdResponse { + private GetLoansLoanIdChargesChargeIdResponse() { + } + + final class GetLoanChargeTimeType { + private GetLoanChargeTimeType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "chargeTimeType.disbursement") + public String code; + @ApiModelProperty(example = "Disbursement") + public String value; + } + + final class GetLoanChargeCalculationType { + private GetLoanChargeCalculationType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "chargeCalculationType.flat") + public String code; + @ApiModelProperty(example = "Flat") + public String value; + } + + final class GetLoanChargeCurrency { + private GetLoanChargeCurrency() { + } + + @ApiModelProperty(example = "USD") + public String code; + @ApiModelProperty(example = "US Dollar") + public String name; + @ApiModelProperty(example = "2") + public Integer decimalPlaces; + @ApiModelProperty(example = "$") + public String displaySymbol; + @ApiModelProperty(example = "currency.USD") + public String nameCode; + @ApiModelProperty(example = "US Dollar ($)") + public String displayLabel; + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "1") + public Integer chargeId; + @ApiModelProperty(example = "Loan Processing fee") + public String name; + public GetLoanChargeTimeType chargeTimeType; + public GetLoanChargeCalculationType chargeCalculationType; + @ApiModelProperty(example = "0") + public Double percentage; + @ApiModelProperty(example = "0") + public Double amountPercentageAppliedTo; + public GetLoanChargeCurrency currency; + @ApiModelProperty(example = "100") + public Float amount; + @ApiModelProperty(example = "0") + public Float amountPaid; + @ApiModelProperty(example = "0") + public Float amountWaived; + @ApiModelProperty(example = "0") + public Float amountWrittenOff; + @ApiModelProperty(example = "100") + public Float amountOutstanding; + @ApiModelProperty(example = "100") + public Float amountOrPercentage; + @ApiModelProperty(example = "false") + public Boolean penalty; + } + + @ApiModel(value = "GetLoansLoanIdChargesTemplateResponse") + public static final class GetLoansLoanIdChargesTemplateResponse { + private GetLoansLoanIdChargesTemplateResponse() { + } + + final class GetLoanChargeTemplateChargeOptions { + private GetLoanChargeTemplateChargeOptions() { + } + + final class GetLoanChargeTemplateChargeTimeType { + private GetLoanChargeTemplateChargeTimeType() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "chargeTimeType.specifiedDueDate") + public String code; + @ApiModelProperty(example = "Specified due date") + public String value; + } + + final class GetLoanChargeTemplateChargeAppliesTo { + private GetLoanChargeTemplateChargeAppliesTo() { + } + + @ApiModelProperty(example = "1 ") + public Integer id; + @ApiModelProperty(example = "chargeAppliesTo.loan") + public String code; + @ApiModelProperty(example = "Loan") + public String value; + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "Collection fee") + public String name; + @ApiModelProperty(example = "true") + public Boolean active; + @ApiModelProperty(example = "false") + public Boolean penalty; + public GetLoansLoanIdChargesChargeIdResponse.GetLoanChargeCurrency currency; + @ApiModelProperty(example = "100") + public Float amount; + public GetLoanChargeTemplateChargeTimeType chargeTimeType; + public GetLoanChargeTemplateChargeAppliesTo chargeAppliesTo; + public GetLoansLoanIdChargesChargeIdResponse.GetLoanChargeCalculationType chargeCalculationType; + } + + @ApiModelProperty(example = "0") + public Float amountPaid; + @ApiModelProperty(example = "0") + public Float amountWaived; + @ApiModelProperty(example = "0") + public Float amountWrittenOff; + public Set chargeOptions; + @ApiModelProperty(example = "false") + public Boolean penalty; + } + + @ApiModel(value = " PostLoansLoanIdChargesRequest") + public static final class PostLoansLoanIdChargesRequest { + private PostLoansLoanIdChargesRequest() { + } + + @ApiModelProperty(example = "2") + public Integer chargeId; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "100") + public Float amount; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "29 April 2013") + public String dueDate; + } + + @ApiModel(value = " PostLoansLoanIdChargesResponse") + public static final class PostLoansLoanIdChargesResponse { + private PostLoansLoanIdChargesResponse() { + } + + @ApiModelProperty(example = "1") + public Long officeId; + @ApiModelProperty(example = "1") + public Long clientId; + @ApiModelProperty(example = "1") + public Long loanId; + @ApiModelProperty(example = "31") + public Integer resourceId; + } + + @ApiModel(value = " PutLoansLoanIdChargesChargeIdRequest") + public static final class PutLoansLoanIdChargesChargeIdRequest { + private PutLoansLoanIdChargesChargeIdRequest() { + } + + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "60") + public Float amount; + @ApiModelProperty(example = "27 March 2013") + public String dueDate; + } + + @ApiModel(value = "PutLoansLoanIdChargesChargeIdResponse") + public static final class PutLoansLoanIdChargesChargeIdResponse { + private PutLoansLoanIdChargesChargeIdResponse() { + } + + @ApiModelProperty(example = "1") + public Long officeId; + @ApiModelProperty(example = "1") + public Long clientId; + @ApiModelProperty(example = "1") + public Long loanId; + @ApiModelProperty(example = "6") + public Integer resourceId; + public PutLoansLoanIdChargesChargeIdRequest changes; + } + + @ApiModel(value = "PostLoansLoanIdChargesChargeIdRequest") + public static final class PostLoansLoanIdChargesChargeIdRequest { + private PostLoansLoanIdChargesChargeIdRequest() { + } + + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "19 September 2013") + public String transactionDate; + } + + @ApiModel(value = "PostLoansLoanIdChargesChargeIdResponse") + public static final class PostLoansLoanIdChargesChargeIdResponse { + private PostLoansLoanIdChargesChargeIdResponse() { + } + + @ApiModelProperty(example = "1") + public Long officeId; + @ApiModelProperty(example = "1") + public Long clientId; + @ApiModelProperty(example = "6") + public Long loanId; + @ApiModelProperty(example = "1") + public Long savingsId; + @ApiModelProperty(example = "12") + public Integer resourceId; + } + + @ApiModel(value = "DeleteLoansLoanIdChargesChargeIdResponse") + public static final class DeleteLoansLoanIdChargesChargeIdResponse { + private DeleteLoansLoanIdChargesChargeIdResponse() { + } + + @ApiModelProperty(example = "1") + public Long officeId; + @ApiModelProperty(example = "1") + public Long clientId; + @ApiModelProperty(example = "1") + public Long loanId; + @ApiModelProperty(example = "2") + public Integer resourceId; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanScheduleApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanScheduleApiResource.java index 3d107f1c6..207381265 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanScheduleApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanScheduleApiResource.java @@ -18,18 +18,7 @@ */ package org.apache.fineract.portfolio.loanaccount.api; -import java.util.HashSet; - -import javax.ws.rs.Consumes; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - +import io.swagger.annotations.*; import org.apache.commons.lang.StringUtils; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; @@ -45,9 +34,16 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; +import java.util.HashSet; + @Path("/loans/{loanId}/schedule") @Component @Scope("singleton") +@Api(value = "Loan Rescheduling", description = "Loan Term Variations provides the ability to change due dates, amounts and number of instalments before loan approval.") public class LoanScheduleApiResource { private final String resourceNameForPermissions = "LOAN"; @@ -73,8 +69,11 @@ public class LoanScheduleApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String calculateLoanScheduleOrSubmitVariableSchedule(@PathParam("loanId") final Long loanId, - @QueryParam("command") final String commandParam, @Context final UriInfo uriInfo, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Calculate loan repayment schedule based on Loan term variations | Updates loan repayment schedule based on Loan term variations | Updates loan repayment schedule by removing Loan term variations", httpMethod = "POST", notes = "Calculate loan repayment schedule based on Loan term variations:\n\n" + "Mandatory Fields: exceptions,locale,dateFormat\n\n" + "Updates loan repayment schedule based on Loan term variations:\n\n" + "Mandatory Fields: exceptions,locale,dateFormat\n\n" + "Updates loan repayment schedule by removing Loan term variations:\n\n" + "It updates the loan repayment schedule by removing Loan term variations\n\n" + "Showing request/response for 'Updates loan repayment schedule by removing Loan term variations'") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = LoanScheduleApiResourceSwagger.PostLoansLoanIdScheduleRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = LoanScheduleApiResourceSwagger.PostLoansLoanIdScheduleResponse.class)}) + public String calculateLoanScheduleOrSubmitVariableSchedule(@PathParam("loanId") @ApiParam(value = "loanId") final Long loanId, + @QueryParam("command") @ApiParam(value = "command") final String commandParam, @Context final UriInfo uriInfo, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { CommandWrapper commandRequest = null; if (is(commandParam, "calculateLoanSchedule")) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanScheduleApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanScheduleApiResourceSwagger.java new file mode 100644 index 000000000..fbd10b753 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanScheduleApiResourceSwagger.java @@ -0,0 +1,56 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.loanaccount.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; + +/** + * Created by Chirag Gupta on 12/30/17. + */ +final class LoanScheduleApiResourceSwagger { + private LoanScheduleApiResourceSwagger() { + } + + @ApiModel(value = "PostLoansLoanIdScheduleRequest") + public final static class PostLoansLoanIdScheduleRequest { + private PostLoansLoanIdScheduleRequest() { + } + } + + @ApiModel(value = "PostLoansLoanIdScheduleResponse") + public final static class PostLoansLoanIdScheduleResponse { + private PostLoansLoanIdScheduleResponse() { + } + + final class PostLoanChanges { + private PostLoanChanges() { + } + + @ApiModelProperty(example = "[21, 22]") + public List removedEntityIds; + } + + @ApiModelProperty(example = "1") + public Integer loanId; + public PostLoanChanges changes; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanTransactionsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanTransactionsApiResource.java index e4b30362b..6e45fd463 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanTransactionsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanTransactionsApiResource.java @@ -18,22 +18,7 @@ */ package org.apache.fineract.portfolio.loanaccount.api; -import java.util.Arrays; -import java.util.Collection; -import java.util.HashSet; -import java.util.Set; - -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - +import io.swagger.annotations.*; import org.apache.commons.lang.StringUtils; import org.apache.fineract.accounting.journalentry.api.DateParam; import org.apache.fineract.commands.domain.CommandWrapper; @@ -55,9 +40,19 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; + @Path("/loans/{loanId}/transactions") @Component @Scope("singleton") +@Api(value = "Loan Transactions", description = "Capabilities include loan repayment's, interest waivers and the ability to 'adjust' an existing transaction. An 'adjustment' of a transaction is really a 'reversal' of existing transaction followed by creation of a new transaction with the provided details.") public class LoanTransactionsApiResource { private final Set RESPONSE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "type", "date", "currency", "amount", @@ -94,9 +89,11 @@ public class LoanTransactionsApiResource { @Path("template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveTransactionTemplate(@PathParam("loanId") final Long loanId, @QueryParam("command") final String commandParam, - @Context final UriInfo uriInfo, @QueryParam("dateFormat") final String dateFormat, - @QueryParam("transactionDate") final DateParam transactionDateParam, @QueryParam("locale") final String locale) { + @ApiOperation(value = "Retrieve Loan Transaction Template", httpMethod = "GET", notes = "This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n" + "\n" + "Field Defaults\n" + "Allowed Value Lists\n\n" + "Example Request:\n" + "\n" + "loans/1/transactions/template?command=repayment") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = LoanTransactionsApiResourceSwagger.GetLoansLoanIdTransactionsTemplateResponse.class)}) + public String retrieveTransactionTemplate(@PathParam("loanId") @ApiParam(value = "loanId") final Long loanId, @QueryParam("command") @ApiParam(value = "command") final String commandParam, + @Context final UriInfo uriInfo, @QueryParam("dateFormat") @ApiParam(value = "dateFormat") final String dateFormat, + @QueryParam("transactionDate") @ApiParam(value = "transactionDate") final DateParam transactionDateParam, @QueryParam("locale") @ApiParam(value = "locale") final String locale) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -149,7 +146,9 @@ public class LoanTransactionsApiResource { @Path("{transactionId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveTransaction(@PathParam("loanId") final Long loanId, @PathParam("transactionId") final Long transactionId, + @ApiOperation(value = "Retrieve a Transaction Details", httpMethod = "GET", notes = "Retrieves a Transaction Details\n\n" + "Example Request:\n" + "\n" + "loans/5/transactions/3") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = LoanTransactionsApiResourceSwagger.GetLoansLoanIdTransactionsTransactionIdResponse.class)}) + public String retrieveTransaction(@PathParam("loanId") @ApiParam(value = "loanId") final Long loanId, @PathParam("transactionId") @ApiParam(value = "transactionId") final Long transactionId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -167,8 +166,11 @@ public class LoanTransactionsApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String executeLoanTransaction(@PathParam("loanId") final Long loanId, @QueryParam("command") final String commandParam, - final String apiRequestBodyAsJson) { + @ApiOperation(value = "Make a Repayment | Make a Refund of an Active Loan by Cash | Foreclosure of an Active Loan | Waive Interest | Write-off Loan | Make Recovery Payment | Undo Loan Write-off Transaction", httpMethod = "POST", notes = "Make Recovery Payment:\n\n" + "This API allows collecting recovery payments for written-off loans") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = LoanTransactionsApiResourceSwagger.PostLoansLoanIdTransactionsRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = LoanTransactionsApiResourceSwagger.PostLoansLoanIdTransactionsResponse.class)}) + public String executeLoanTransaction(@PathParam("loanId") @ApiParam(value = "loanId") final Long loanId, @QueryParam("command") @ApiParam(value = "command") final String commandParam, + @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapperBuilder builder = new CommandWrapperBuilder().withJson(apiRequestBodyAsJson); @@ -211,8 +213,11 @@ public class LoanTransactionsApiResource { @Path("{transactionId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String adjustLoanTransaction(@PathParam("loanId") final Long loanId, @PathParam("transactionId") final Long transactionId, - final String apiRequestBodyAsJson) { + @ApiOperation(value = "Adjust a Transaction", httpMethod = "POST", notes = "Note: there is no need to specify command={transactionType} parameter.\n\n" + "Mandatory Fields: transactionDate, transactionAmount") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = LoanTransactionsApiResourceSwagger.PostLoansLoanIdTransactionsTransactionIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = LoanTransactionsApiResourceSwagger.PostLoansLoanIdTransactionsTransactionIdResponse.class)}) + public String adjustLoanTransaction(@PathParam("loanId") @ApiParam(value = "loanId") final Long loanId, @PathParam("transactionId") @ApiParam(value = "transactionId") final Long transactionId, + @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapperBuilder builder = new CommandWrapperBuilder().withJson(apiRequestBodyAsJson); final CommandWrapper commandRequest = builder.adjustTransaction(loanId, transactionId).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanTransactionsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanTransactionsApiResourceSwagger.java new file mode 100644 index 000000000..aaef19ed5 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanTransactionsApiResourceSwagger.java @@ -0,0 +1,191 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.loanaccount.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.time.LocalDate; + +/** + * Created by Chirag Gupta on 12/30/17. + */ +final class LoanTransactionsApiResourceSwagger { + private LoanTransactionsApiResourceSwagger() { + } + + @ApiModel(value = "GetLoansLoanIdTransactionsTemplateResponse") + public final static class GetLoansLoanIdTransactionsTemplateResponse { + private GetLoansLoanIdTransactionsTemplateResponse() { + } + + final class GetLoansTransactionType { + private GetLoansTransactionType() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "loanTransactionType.repayment") + public String code; + @ApiModelProperty(example = "Repayment") + public String value; + } + + final class GetLoansTotal { + private GetLoansTotal() { + } + + @ApiModelProperty(example = "XOF") + public String currencyCode; + @ApiModelProperty(example = "0") + public Integer digitsAfterDecimal; + @ApiModelProperty(example = "0") + public Integer inMultiplesOf; + @ApiModelProperty(example = "471") + public Float amount; + @ApiModelProperty(example = "CFA Franc BCEAO") + public String defaultName; + @ApiModelProperty(example = "currency.XOF") + public String nameCode; + @ApiModelProperty(example = "CFA") + public String displaySymbol; + @ApiModelProperty(example = "false") + public Boolean zero; + @ApiModelProperty(example = "true") + public Boolean greaterThanZero; + @ApiModelProperty(example = "471 CFA") + public String displaySymbolValue; + } + + public GetLoansTransactionType transactionType; + @ApiModelProperty(example = "[2009, 8, 1]") + public LocalDate date; + public GetLoansTotal total; + } + + @ApiModel(value = "GetLoansLoanIdTransactionsTransactionIdResponse") + public final static class GetLoansLoanIdTransactionsTransactionIdResponse { + private GetLoansLoanIdTransactionsTransactionIdResponse() { + } + + final class GetLoansType { + private GetLoansType() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "loanTransactionType.repayment") + public String code; + @ApiModelProperty(example = "Repayment") + public String value; + @ApiModelProperty(example = "false") + public Boolean disbursement; + @ApiModelProperty(example = "false") + public Boolean repaymentAtDisbursement; + @ApiModelProperty(example = "true") + public Boolean repayment; + @ApiModelProperty(example = "false") + public Boolean contra; + @ApiModelProperty(example = "false") + public Boolean waiveInterest; + @ApiModelProperty(example = "false") + public Boolean waiveCharges; + @ApiModelProperty(example = "false") + public Boolean writeOff; + @ApiModelProperty(example = "false") + public Boolean recoveryRepayment; + } + + final class GetLoansCurrency { + private GetLoansCurrency() { + } + + @ApiModelProperty(example = "USD") + public String code; + @ApiModelProperty(example = "US Dollar") + public String name; + @ApiModelProperty(example = "2") + public Integer decimalPlaces; + @ApiModelProperty(example = "$") + public String displaySymbol; + @ApiModelProperty(example = "currency.USD") + public String nameCode; + @ApiModelProperty(example = "US Dollar ($)") + public String displayLabel; + } + + @ApiModelProperty(example = "3") + public Integer id; + public GetLoansType type; + @ApiModelProperty(example = "[2012, 5, 14]") + public LocalDate date; + @ApiModelProperty(example = "false") + public Boolean manuallyReversed; + public GetLoansCurrency currency; + @ApiModelProperty(example = "559.88") + public Double amount; + @ApiModelProperty(example = "559.88") + public Double interestPortion; + } + + @ApiModel(value = "PostLoansLoanIdTransactionsRequest") + public final static class PostLoansLoanIdTransactionsRequest { + private PostLoansLoanIdTransactionsRequest() { + } + } + + @ApiModel(value = "PostLoansLoanIdTransactionsResponse") + public final static class PostLoansLoanIdTransactionsResponse { + private PostLoansLoanIdTransactionsResponse() { + } + + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "22") + public Integer resourceId; + } + + @ApiModel(value = "PostLoansLoanIdTransactionsTransactionIdRequest") + public final static class PostLoansLoanIdTransactionsTransactionIdRequest { + private PostLoansLoanIdTransactionsTransactionIdRequest() { + } + + @ApiModelProperty(example = "en_GB") + public String locale; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "25 May 2012") + public String transactionDate; + @ApiModelProperty(example = "50,000.00") + public Double transactionAmount; + @ApiModelProperty(example = "An optional note about why your adjusting or changing the transaction.") + public String note; + } + + @ApiModel(value = "PostLoansLoanIdTransactionsTransactionIdResponse") + public final static class PostLoansLoanIdTransactionsTransactionIdResponse { + private PostLoansLoanIdTransactionsTransactionIdResponse() { + } + + @ApiModelProperty(example = "16") + public Integer resourceId; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResource.java index e3c51c761..50accfaec 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResource.java @@ -18,24 +18,8 @@ */ package org.apache.fineract.portfolio.loanaccount.api; -import static org.apache.fineract.portfolio.loanproduct.service.LoanEnumerations.interestType; - -import java.util.*; - -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.DefaultValue; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - +import com.google.gson.JsonElement; +import io.swagger.annotations.*; import org.apache.commons.lang.StringUtils; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; @@ -81,14 +65,7 @@ import org.apache.fineract.portfolio.fund.data.FundData; import org.apache.fineract.portfolio.fund.service.FundReadPlatformService; import org.apache.fineract.portfolio.group.data.GroupGeneralData; import org.apache.fineract.portfolio.group.service.GroupReadPlatformService; -import org.apache.fineract.portfolio.loanaccount.data.DisbursementData; -import org.apache.fineract.portfolio.loanaccount.data.LoanAccountData; -import org.apache.fineract.portfolio.loanaccount.data.LoanApprovalData; -import org.apache.fineract.portfolio.loanaccount.data.LoanChargeData; -import org.apache.fineract.portfolio.loanaccount.data.LoanTermVariationsData; -import org.apache.fineract.portfolio.loanaccount.data.LoanTransactionData; -import org.apache.fineract.portfolio.loanaccount.data.PaidInAdvanceData; -import org.apache.fineract.portfolio.loanaccount.data.RepaymentScheduleRelatedLoanData; +import org.apache.fineract.portfolio.loanaccount.data.*; import org.apache.fineract.portfolio.loanaccount.domain.LoanTermVariationType; import org.apache.fineract.portfolio.loanaccount.exception.LoanTemplateTypeRequiredException; import org.apache.fineract.portfolio.loanaccount.exception.NotSupportedLoanTemplateTypeException; @@ -116,11 +93,18 @@ import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; -import com.google.gson.JsonElement; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; +import java.util.*; + +import static org.apache.fineract.portfolio.loanproduct.service.LoanEnumerations.interestType; @Path("/loans") @Component @Scope("singleton") +@Api(value = "Loans", description = "The API concept of loans models the loan application process and the loan contract/monitoring process.") public class LoansApiResource { private final Set LOAN_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "accountNo", "status", "externalId", "clientId", @@ -228,8 +212,8 @@ public class LoansApiResource { @Path("{loanId}/template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveApprovalTemplate(@PathParam("loanId") final Long loanId, @QueryParam("templateType") final String templateType, - @Context final UriInfo uriInfo) { + public String retrieveApprovalTemplate(@PathParam("loanId") @ApiParam(value = "loanId") final Long loanId, @QueryParam("templateType") @ApiParam(value = "templateType") final String templateType, + @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -251,10 +235,12 @@ public class LoansApiResource { @Path("template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String template(@QueryParam("clientId") final Long clientId, @QueryParam("groupId") final Long groupId, - @QueryParam("productId") final Long productId, @QueryParam("templateType") final String templateType, - @DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") final boolean staffInSelectedOfficeOnly, - @DefaultValue("false") @QueryParam("activeOnly") final boolean onlyActive, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve Loan Details Template", httpMethod = "GET", notes = "This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n" + "\n" + "Field Defaults\n" + "Allowed Value Lists\n" + "Example Requests:\n" + "\n" + "loans/template?templateType=individual&clientId=1\n" + "\n" + "\n" + "loans/template?templateType=individual&clientId=1&productId=1") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = LoansApiResourceSwagger.GetLoansTemplateResponse.class)}) + public String template(@QueryParam("clientId") @ApiParam(value = "clientId") final Long clientId, @QueryParam("groupId") @ApiParam(value = "groupId") final Long groupId, + @QueryParam("productId")@ApiParam(value = "productId") final Long productId, @QueryParam("templateType") @ApiParam(value = "templateType") final String templateType, + @DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") @ApiParam(value = "staffInSelectedOfficeOnly") final boolean staffInSelectedOfficeOnly, + @DefaultValue("false") @QueryParam("activeOnly") @ApiParam(value = "activeOnly") final boolean onlyActive, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -375,8 +361,10 @@ public class LoansApiResource { @Path("{loanId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveLoan(@PathParam("loanId") final Long loanId, - @DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") final boolean staffInSelectedOfficeOnly, + @ApiOperation(value = "Retrieve a Loan", httpMethod = "GET", notes = "Note: template=true parameter doesn't apply to this resource." + "Example Requests:\n" + "\n" + "loans/1\n" + "\n" + "\n" + "loans/1?fields=id,principal,annualInterestRate\n" + "\n" + "\n" + "loans/1?associations=all\n" + "\n" + "loans/1?associations=all&exclude=guarantors\n" + "\n" + "\n" + "loans/1?fields=id,principal,annualInterestRate&associations=repaymentSchedule,transactions") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = LoansApiResourceSwagger.GetLoansLoanIdResponse.class)}) + public String retrieveLoan(@PathParam("loanId") @ApiParam(value = "loanId") final Long loanId, + @DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") @ApiParam(value = "staffInSelectedOfficeOnly") final boolean staffInSelectedOfficeOnly, @Context final UriInfo uriInfo) { long start = System.currentTimeMillis() ; this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -627,13 +615,15 @@ public class LoansApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "List Loans", httpMethod = "GET", notes = "The list capability of loans can support pagination and sorting.\n" + "Example Requests:\n" + "\n" + "loans\n" + "\n" + "loans?fields=accountNo\n" + "\n" + "loans?offset=10&limit=50\n" + "\n" + "loans?orderBy=accountNo&sortOrder=DESC") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = LoansApiResourceSwagger.GetLoansResponse.class)}) public String retrieveAll(@Context final UriInfo uriInfo, - @QueryParam("sqlSearch") final String sqlSearch, - @QueryParam("externalId") final String externalId, + @QueryParam("sqlSearch") @ApiParam(value = "sqlSearch") final String sqlSearch, + @QueryParam("externalId") @ApiParam(value = "externalId") final String externalId, // @QueryParam("underHierarchy") final String hierarchy, - @QueryParam("offset") final Integer offset, @QueryParam("limit") final Integer limit, - @QueryParam("orderBy") final String orderBy, @QueryParam("sortOrder") final String sortOrder, - @QueryParam("accountNo") final String accountNo) { + @QueryParam("offset") @ApiParam(value = "offset") final Integer offset, @QueryParam("limit") @ApiParam(value = "limit") final Integer limit, + @QueryParam("orderBy") @ApiParam(value = "orderBy") final String orderBy, @QueryParam("sortOrder") @ApiParam(value = "sortOrder")final String sortOrder, + @QueryParam("accountNo") @ApiParam(value = "accountNo") final String accountNo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -649,8 +639,11 @@ public class LoansApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String calculateLoanScheduleOrSubmitLoanApplication(@QueryParam("command") final String commandParam, - @Context final UriInfo uriInfo, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Calculate loan repayment schedule | Submit a new Loan Application", httpMethod = "POST", notes = "It calculates the loan repayment Schedule\n" + "Submits a new loan application\n" + "Mandatory Fields: clientId, productId, principal, loanTermFrequency, loanTermFrequencyType, loanType, numberOfRepayments, repaymentEvery, repaymentFrequencyType, interestRatePerPeriod, amortizationType, interestType, interestCalculationPeriodType, transactionProcessingStrategyId, expectedDisbursementDate, submittedOnDate, loanType\n" + "Optional Fields: graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, linkAccountId, allowPartialPeriodInterestCalcualtion, fixedEmiAmount, maxOutstandingLoanBalance, disbursementData, graceOnArrearsAgeing, createStandingInstructionAtDisbursement (requires linkedAccountId if set to true)\n" + "Additional Mandatory Fields if interest recalculation is enabled for product and Rest frequency not same as repayment period: recalculationRestFrequencyDate\n" + "Additional Mandatory Fields if interest recalculation with interest/fee compounding is enabled for product and compounding frequency not same as repayment period: recalculationCompoundingFrequencyDate\n" + "Additional Mandatory Field if Entity-Datatable Check is enabled for the entity of type loan: datatables") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = LoansApiResourceSwagger.PostLoansRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = LoansApiResourceSwagger.PostLoansResponse.class)}) + public String calculateLoanScheduleOrSubmitLoanApplication(@QueryParam("command") @ApiParam(value = "command") final String commandParam, + @Context final UriInfo uriInfo, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { if (is(commandParam, "calculateLoanSchedule")) { @@ -674,7 +667,10 @@ public class LoansApiResource { @Path("{loanId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String modifyLoanApplication(@PathParam("loanId") final Long loanId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Modify a loan application", httpMethod = "PUT", notes = "Loan application can only be modified when in 'Submitted and pending approval' state. Once the application is approved, the details cannot be changed using this method.") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = LoansApiResourceSwagger.PutLoansLoanIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = LoansApiResourceSwagger.PutLoansLoanIdResponse.class)}) + public String modifyLoanApplication(@PathParam("loanId") @ApiParam(value = "loanId") final Long loanId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateLoanApplication(loanId).withJson(apiRequestBodyAsJson) .build(); @@ -688,7 +684,9 @@ public class LoansApiResource { @Path("{loanId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String deleteLoanApplication(@PathParam("loanId") final Long loanId) { + @ApiOperation(value = "Delete a Loan Application", httpMethod = "DELETE", notes = "Note: Only loans in \"Submitted and awaiting approval\" status can be deleted.") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = LoansApiResourceSwagger.DeleteLoansLoanIdResponse.class)}) + public String deleteLoanApplication(@PathParam("loanId") @ApiParam(value = "loanId") final Long loanId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteLoanApplication(loanId).build(); @@ -701,8 +699,11 @@ public class LoansApiResource { @Path("{loanId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String stateTransitions(@PathParam("loanId") final Long loanId, @QueryParam("command") final String commandParam, - final String apiRequestBodyAsJson) { + @ApiOperation(value = "Approve Loan Application | Recover Loan Guarantee | Undo Loan Application Approval | Assign a Loan Officer | Unassign a Loan Officer | Reject Loan Application | Applicant Withdraws from Loan Application | Disburse Loan Disburse Loan To Savings Account | Undo Loan Disbursal", httpMethod = "POST", notes = "Approve Loan Application:\n" + "Mandatory Fields: approvedOnDate\n" + "Optional Fields: approvedLoanAmount and expectedDisbursementDate\n" + "Approves the loan application\n\n" + "Recover Loan Guarantee:\n" + "Recovers the loan guarantee\n\n" + "Undo Loan Application Approval:\n" + "Undoes the Loan Application Approval\n\n" + "Assign a Loan Officer:\n" + "Allows you to assign Loan Officer for existing Loan.\n\n" + "Unassign a Loan Officer:\n" + "Allows you to unassign the Loan Officer.\n\n" + "Reject Loan Application:\n" + "Mandatory Fields: rejectedOnDate\n" + "Allows you to reject the loan application\n\n" + "Applicant Withdraws from Loan Application:\n" + "Mandatory Fields: withdrawnOnDate\n" + "Allows the applicant to withdraw the loan application\n\n" + "Disburse Loan:\n" + "Mandatory Fields: actualDisbursementDate\n" + "Optional Fields: transactionAmount and fixedEmiAmount\n" + "Disburses the Loan\n\n" + "Disburse Loan To Savings Account:\n" + "Mandatory Fields: actualDisbursementDate\n" + "Optional Fields: transactionAmount and fixedEmiAmount\n" + "Disburses the loan to Saving Account\n\n" + "Undo Loan Disbursal:\n" + "Undoes the Loan Disbursal\n" + "Showing request and response for Assign a Loan Officer") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = LoansApiResourceSwagger.PostLoansLoanIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = LoansApiResourceSwagger.PostLoansLoanIdResponse.class)}) + public String stateTransitions(@PathParam("loanId") @ApiParam(value = "loanId") final Long loanId, @QueryParam("command") @ApiParam(value = "command") final String commandParam, + @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapperBuilder builder = new CommandWrapperBuilder().withJson(apiRequestBodyAsJson); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResourceSwagger.java new file mode 100644 index 000000000..df7c602c4 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResourceSwagger.java @@ -0,0 +1,692 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.loanaccount.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.time.LocalDate; +import java.util.Set; + +/** + * Created by Chirag Gupta on 12/09/17. + */ +final class LoansApiResourceSwagger { + private LoansApiResourceSwagger() { + } + + @ApiModel(value = "GetLoansTemplateResponse") + public final static class GetLoansTemplateResponse { + private GetLoansTemplateResponse() { + } + + final class GetLoansTemplateTimeline { + private GetLoansTemplateTimeline() { + } + + @ApiModelProperty(example = "[2013, 3, 8]") + public LocalDate expectedDisbursementDate; + } + + final class GetLoansTemplateProductOptions { + private GetLoansTemplateProductOptions() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "Kampala Product (with cash accounting)") + public String name; + } + + @ApiModelProperty(example = "1") + public Long clientId; + @ApiModelProperty(example = "Kampala first Client") + public String clientName; + @ApiModelProperty(example = "2") + public Integer clientOfficeId; + public GetLoansTemplateTimeline timeline; + public Set productOptions; + } + + @ApiModel(value = "GetLoansLoanIdResponse") + public final static class GetLoansLoanIdResponse { + private GetLoansLoanIdResponse() { + } + + final class GetLoansLoanIdStatus { + private GetLoansLoanIdStatus() { + } + + @ApiModelProperty(example = "300") + public Integer id; + @ApiModelProperty(example = "loanStatusType.active") + public String code; + @ApiModelProperty(example = "Active") + public String value; + @ApiModelProperty(example = "false") + public Boolean pendingApproval; + @ApiModelProperty(example = "false") + public Boolean waitingForDisbursal; + @ApiModelProperty(example = "true") + public Boolean active; + @ApiModelProperty(example = "false") + public Boolean closedObligationsMet; + @ApiModelProperty(example = "false") + public Boolean closedWrittenOff; + @ApiModelProperty(example = "false") + public Boolean closedRescheduled; + @ApiModelProperty(example = "false") + public Boolean closed; + @ApiModelProperty(example = "false") + public Boolean overpaid; + } + + final class GetLoansLoanIdLoanType { + private GetLoansLoanIdLoanType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "loanType.individual") + public String code; + @ApiModelProperty(example = "Individual") + public String value; + } + + final class GetLoansLoanIdCurrency { + private GetLoansLoanIdCurrency() { + } + + @ApiModelProperty(example = "UGX") + public String code; + @ApiModelProperty(example = "Uganda Shilling") + public String name; + @ApiModelProperty(example = "2") + public Integer decimalPlaces; + @ApiModelProperty(example = "USh") + public String displaySymbol; + @ApiModelProperty(example = "currency.UGX") + public String nameCode; + @ApiModelProperty(example = "Uganda Shilling (USh)") + public String displayLabel; + } + + final class GetLoansLoanIdTermPeriodFrequencyType { + private GetLoansLoanIdTermPeriodFrequencyType() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "termFrequency.periodFrequencyType.months") + public String code; + @ApiModelProperty(example = "Months") + public String value; + } + + final class GetLoansLoanIdRepaymentFrequencyType { + private GetLoansLoanIdRepaymentFrequencyType() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "repaymentFrequency.periodFrequencyType.months") + public String code; + @ApiModelProperty(example = "Months") + public String value; + } + + final class GetLoansLoanIdInterestRateFrequencyType { + private GetLoansLoanIdInterestRateFrequencyType() { + } + + @ApiModelProperty(example = "3") + public Integer id; + @ApiModelProperty(example = "interestRateFrequency.periodFrequencyType.years") + public String code; + @ApiModelProperty(example = "Per year") + public String value; + } + + final class GetLoansLoanIdAmortizationType { + private GetLoansLoanIdAmortizationType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "amortizationType.equal.installments") + public String code; + @ApiModelProperty(example = "Equal installments") + public String value; + } + + final class GetLoansLoanIdInterestType { + private GetLoansLoanIdInterestType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "interestType.flat") + public String code; + @ApiModelProperty(example = "Flat") + public String value; + } + + final class GetLoansLoanIdInterestCalculationPeriodType { + private GetLoansLoanIdInterestCalculationPeriodType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "interestCalculationPeriodType.same.as.repayment.period") + public String code; + @ApiModelProperty(example = "Same as repayment period") + public String value; + } + + final class GetLoansLoanIdTimeline { + private GetLoansLoanIdTimeline() { + } + + @ApiModelProperty(example = "[2012, 4, 3]") + public LocalDate submittedOnDate; + @ApiModelProperty(example = "admin") + public String submittedByUsername; + @ApiModelProperty(example = "App") + public String submittedByFirstname; + @ApiModelProperty(example = "Administrator") + public String submittedByLastname; + @ApiModelProperty(example = "[2012, 4, 3]") + public LocalDate approvedOnDate; + @ApiModelProperty(example = "admin") + public String approvedByUsername; + @ApiModelProperty(example = "App") + public String approvedByFirstname; + @ApiModelProperty(example = "Administrator") + public String approvedByLastname; + @ApiModelProperty(example = "[2012, 4, 10]") + public LocalDate expectedDisbursementDate; + @ApiModelProperty(example = "[2012, 4, 10]") + public LocalDate actualDisbursementDate; + @ApiModelProperty(example = "admin") + public String disbursedByUsername; + @ApiModelProperty(example = "App") + public String disbursedByFirstname; + @ApiModelProperty(example = "Administrator") + public String disbursedByLastname; + @ApiModelProperty(example = "[2012, 4, 10]") + public LocalDate expectedMaturityDate; + } + + final class GetLoansLoanIdSummary { + private GetLoansLoanIdSummary() { + } + + final class GetLoansLoanIdEmiVariations { + private GetLoansLoanIdEmiVariations() { + } + } + + final class GetLoansLoanIdLinkedAccount { + private GetLoansLoanIdLinkedAccount() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "000000001") + public Long accountNo; + } + + final class GetLoansLoanIdDisbursementDetails { + private GetLoansLoanIdDisbursementDetails() { + } + + @ApiModelProperty(example = "71") + public Integer id; + @ApiModelProperty(example = "[2013, 11, 1]") + public LocalDate expectedDisbursementDate; + @ApiModelProperty(example = "22000.000000") + public Float principal; + @ApiModelProperty(example = "22000.000000") + public Float approvedPrincipal; + } + + final class GetLoansLoanIdOverdueCharges { + private GetLoansLoanIdOverdueCharges() { + } + + final class GetLoansLoanIdChargeTimeType { + private GetLoansLoanIdChargeTimeType() { + } + + @ApiModelProperty(example = "9") + public Integer id; + @ApiModelProperty(example = "chargeTimeType.overdueInstallment") + public String code; + @ApiModelProperty(example = "overdue fees") + public String value; + } + + final class GetLoansLoanIdChargeCalculationType { + private GetLoansLoanIdChargeCalculationType() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "chargeCalculationType.percent.of.amount") + public String code; + @ApiModelProperty(example = "% Amount") + public String value; + } + + final class GetLoansLoanIdChargePaymentMode { + private GetLoansLoanIdChargePaymentMode() { + } + + @ApiModelProperty(example = "0") + public Integer id; + @ApiModelProperty(example = "chargepaymentmode.regular") + public String code; + @ApiModelProperty(example = "Regular") + public String value; + } + + final class GetLoansLoanIdFeeFrequency { + private GetLoansLoanIdFeeFrequency() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "feeFrequencyperiodFrequencyType.weeks") + public String code; + @ApiModelProperty(example = "Weeks") + public String value; + } + + @ApiModelProperty(example = "20") + public Integer id; + @ApiModelProperty(example = "overdraft penality") + public String name; + @ApiModelProperty(example = "true") + public Boolean active; + @ApiModelProperty(example = "true") + public Boolean penalty; + public LoanChargesApiResourceSwagger.GetLoansLoanIdChargesChargeIdResponse.GetLoanChargeCurrency currency; + @ApiModelProperty(example = "3.000000") + public Float amount; + public GetLoansLoanIdChargeTimeType chargeTimeType; + public LoanChargesApiResourceSwagger.GetLoansLoanIdChargesTemplateResponse.GetLoanChargeTemplateChargeOptions.GetLoanChargeTemplateChargeAppliesTo chargeAppliesTo; + public GetLoansLoanIdChargeCalculationType chargeCalculationType; + public GetLoansLoanIdChargePaymentMode chargePaymentMode; + @ApiModelProperty(example = "2") + public Integer feeInterval; + public GetLoansLoanIdFeeFrequency feeFrequency; + } + + public GetLoansLoanIdCurrency currency; + @ApiModelProperty(example = "1000000") + public Long principalDisbursed; + @ApiModelProperty(example = "0") + public Long principalPaid; + @ApiModelProperty(example = "0") + public Long principalWrittenOff; + @ApiModelProperty(example = "1000000") + public Long principalOutstanding; + @ApiModelProperty(example = "833333.3") + public Double principalOverdue; + @ApiModelProperty(example = "240000") + public Long interestCharged; + @ApiModelProperty(example = "0") + public Long interestPaid; + @ApiModelProperty(example = "0") + public Long interestWaived; + @ApiModelProperty(example = "0") + public Long interestWrittenOff; + @ApiModelProperty(example = "240000") + public Long interestOutstanding; + @ApiModelProperty(example = "200000") + public Long interestOverdue; + @ApiModelProperty(example = "18000") + public Long feeChargesCharged; + @ApiModelProperty(example = "0") + public Long feeChargesDueAtDisbursementCharged; + @ApiModelProperty(example = "0") + public Long feeChargesPaid; + @ApiModelProperty(example = "0") + public Long feeChargesWaived; + @ApiModelProperty(example = "0") + public Long feeChargesWrittenOff; + @ApiModelProperty(example = "18000") + public Long feeChargesOutstanding; + @ApiModelProperty(example = "15000") + public Long feeChargesOverdue; + @ApiModelProperty(example = "0") + public Long penaltyChargesCharged; + @ApiModelProperty(example = "0") + public Long penaltyChargesPaid; + @ApiModelProperty(example = "0") + public Long penaltyChargesWaived; + @ApiModelProperty(example = "0") + public Long penaltyChargesWrittenOff; + @ApiModelProperty(example = "0") + public Long penaltyChargesOutstanding; + @ApiModelProperty(example = "0") + public Long penaltyChargesOverdue; + @ApiModelProperty(example = "1258000") + public Long totalExpectedRepayment; + @ApiModelProperty(example = "0") + public Long totalRepayment; + @ApiModelProperty(example = "258000") + public Long totalExpectedCostOfLoan; + @ApiModelProperty(example = "0") + public Long totalCostOfLoan; + @ApiModelProperty(example = "0") + public Long totalWaived; + @ApiModelProperty(example = "0") + public Long totalWrittenOff; + @ApiModelProperty(example = "1258000") + public Long totalOutstanding; + @ApiModelProperty(example = "1048333.3") + public Double totalOverdue; + @ApiModelProperty(example = "[2012, 5, 10]") + public LocalDate overdueSinceDate; + public GetLoansLoanIdLinkedAccount linkedAccount; + public Set disbursementDetails; + @ApiModelProperty(example = "1100.000000") + public Float fixedEmiAmount; + @ApiModelProperty(example = "35000") + public Long maxOutstandingLoanBalance; + @ApiModelProperty(example = "false") + public Boolean canDisburse; + public Set emiAmountVariations; + @ApiModelProperty(example = "true") + public Boolean inArrears; + @ApiModelProperty(example = "false") + public Boolean isNPA; + public Set overdueCharges; + } + + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "000000001") + public Long accountNo; + public GetLoansLoanIdStatus status; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "Kampala first Client") + public String clientName; + @ApiModelProperty(example = "2") + public Integer clientOfficeId; + @ApiModelProperty(example = "1") + public Integer loanProductId; + @ApiModelProperty(example = "Kampala Product (with cash accounting)") + public String loanProductName; + @ApiModelProperty(example = "Typical Kampala loan product with cash accounting enabled for testing.") + public String loanProductDescription; + @ApiModelProperty(example = "22") + public Integer loanPurposeId; + @ApiModelProperty(example = "option.HousingImprovement") + public String loanPurposeName; + @ApiModelProperty(example = "2") + public Integer loanOfficerId; + @ApiModelProperty(example = "LoanOfficer, Kampala") + public String loanOfficerName; + public GetLoansLoanIdLoanType loanType; + public GetLoansLoanIdCurrency currency; + @ApiModelProperty(example = "1000000") + public Long principal; + @ApiModelProperty(example = "12") + public Integer termFrequency; + public GetLoansLoanIdTermPeriodFrequencyType termPeriodFrequencyType; + @ApiModelProperty(example = "12") + public Integer numberOfRepayments; + @ApiModelProperty(example = "1") + public Integer repaymentEvery; + public GetLoansLoanIdRepaymentFrequencyType repaymentFrequencyType; + @ApiModelProperty(example = "24") + public Integer interestRatePerPeriod; + public GetLoansLoanIdInterestRateFrequencyType interestRateFrequencyType; + @ApiModelProperty(example = "24") + public Integer annualInterestRate; + public GetLoansLoanIdAmortizationType amortizationType; + public GetLoansLoanIdInterestType interestType; + public GetLoansLoanIdInterestCalculationPeriodType interestCalculationPeriodType; + @ApiModelProperty(example = "2") + public Integer transactionProcessingStrategyId; + public GetLoansLoanIdTimeline timeline; + public GetLoansLoanIdSummary summary; + } + + @ApiModel(value = "GetLoansResponse") + public final static class GetLoansResponse { + private GetLoansResponse() { + } + + @ApiModelProperty(example = "1") + public Integer totalFilteredRecords; + public Set pageItems; + } + + @ApiModel(value = "PostLoansRequest") + public static final class PostLoansRequest { + private PostLoansRequest() { + } + + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "en_GB") + public String locale; + @ApiModelProperty(example = "1") + public Integer productId; + @ApiModelProperty(example = "100,000.00") + public Double principal; + @ApiModelProperty(example = "12") + public Integer loanTermFrequency; + @ApiModelProperty(example = "2") + public Integer loanTermFrequencyType; + @ApiModelProperty(example = "12") + public Integer numberOfRepayments; + @ApiModelProperty(example = "1") + public Integer repaymentEvery; + @ApiModelProperty(example = "2") + public Integer repaymentFrequencyType; + @ApiModelProperty(example = "2") + public Integer interestRatePerPeriod; + @ApiModelProperty(example = "1") + public Integer amortizationType; + @ApiModelProperty(example = "0") + public Integer interestType; + @ApiModelProperty(example = "1") + public Integer interestCalculationPeriodType; + @ApiModelProperty(example = "20 September 2011") + public String expectedDisbursementDate; + @ApiModelProperty(example = "2") + public Integer transactionProcessingStrategyId; + } + + @ApiModel(value = "PostLoansResponse") + public static final class PostLoansResponse { + private PostLoansResponse() { + } + + final class PostLoansRepaymentSchedulePeriods { + private PostLoansRepaymentSchedulePeriods() { + } + + @ApiModelProperty(example = "0") + public Integer period; + @ApiModelProperty(example = "[2011, 9, 20]") + public LocalDate dueDate; + @ApiModelProperty(example = "100000") + public Long principalDisbursed; + @ApiModelProperty(example = "100000") + public Long principalLoanBalanceOutstanding; + @ApiModelProperty(example = "0") + public Long feeChargesDue; + @ApiModelProperty(example = "0") + public Long feeChargesOutstanding; + @ApiModelProperty(example = "0") + public Long totalOriginalDueForPeriod; + @ApiModelProperty(example = "0") + public Long totalDueForPeriod; + @ApiModelProperty(example = "0") + public Long totalOutstandingForPeriod; + @ApiModelProperty(example = "0") + public Long totalOverdue; + @ApiModelProperty(example = "0") + public Long totalActualCostOfLoanForPeriod; + } + + public GetLoansLoanIdResponse.GetLoansLoanIdCurrency currency; + @ApiModelProperty(example = "366") + public Integer loanTermInDays; + @ApiModelProperty(example = "100000") + public Long totalPrincipalDisbursed; + @ApiModelProperty(example = "100000") + public Long totalPrincipalExpected; + @ApiModelProperty(example = "0") + public Long totalPrincipalPaid; + @ApiModelProperty(example = "13471.52") + public Double totalInterestCharged; + @ApiModelProperty(example = "0") + public Long totalFeeChargesCharged; + @ApiModelProperty(example = "0") + public Long totalPenaltyChargesCharged; + @ApiModelProperty(example = "0") + public Long totalWaived; + @ApiModelProperty(example = "0") + public Long totalWrittenOff; + @ApiModelProperty(example = "113471.52") + public Double totalRepaymentExpected; + @ApiModelProperty(example = "0") + public Long totalRepayment; + @ApiModelProperty(example = "0") + public Long totalOutstanding; + public Set periods; + } + + @ApiModel(value = "PutLoansLoanIdRequest") + public final static class PutLoansLoanIdRequest { + private PutLoansLoanIdRequest() { + } + + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "1") + public Integer productId; + @ApiModelProperty(example = "5000") + public Long principal; + @ApiModelProperty(example = "10") + public Integer loanTermFrequency; + @ApiModelProperty(example = "0") + public Integer loanTermFrequencyType; + @ApiModelProperty(example = "10") + public Integer numberOfRepayments; + @ApiModelProperty(example = "1") + public Integer repaymentEvery; + @ApiModelProperty(example = "0") + public Integer repaymentFrequencyType; + @ApiModelProperty(example = "2") + public Integer interestRatePerPeriod; + @ApiModelProperty(example = "0") + public Integer interestType; + @ApiModelProperty(example = "0") + public Integer interestCalculationPeriodType; + @ApiModelProperty(example = "1") + public Integer amortizationType; + @ApiModelProperty(example = "04 March 2014") + public String expectedDisbursementDate; + @ApiModelProperty(example = "1") + public Integer transactionProcessingStrategyId; + } + + @ApiModel(value = "PutLoansLoanIdResponse") + public final static class PutLoansLoanIdResponse { + private PutLoansLoanIdResponse() { + } + + final class PutLoansLoanIdChanges { + private PutLoansLoanIdChanges() { + } + + @ApiModelProperty(example = "5000") + public Long principal; + @ApiModelProperty(example = "en") + public String locale; + } + + @ApiModelProperty(example = "2") + public Integer officeId; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "1") + public Integer loanId; + @ApiModelProperty(example = "1") + public Integer resourceId; + public PutLoansLoanIdChanges changes; + } + + @ApiModel(value = "DeleteLoansLoanIdResponse") + public static final class DeleteLoansLoanIdResponse { + private DeleteLoansLoanIdResponse() { + } + + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "1") + public Integer loanId; + @ApiModelProperty(example = "1") + public Integer resourceId; + } + + @ApiModel(value = "PostLoansLoanIdRequest") + public final static class PostLoansLoanIdRequest { + private PostLoansLoanIdRequest() { + } + + @ApiModelProperty(example = "2") + public Integer toLoanOfficerId; + @ApiModelProperty(example = "02 September 2014") + public String assignmentDate; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "") + public Integer fromLoanOfficerId; + } + + @ApiModel(value = "PostLoansLoanIdResponse") + public static final class PostLoansLoanIdResponse { + private PostLoansLoanIdResponse() { + } + + @ApiModelProperty(example = "2") + public Integer officeId; + @ApiModelProperty(example = "6") + public Integer clientId; + @ApiModelProperty(example = "3") + public Integer loanId; + @ApiModelProperty(example = "3") + public Integer resourceId; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/api/LoanProductsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/api/LoanProductsApiResource.java index 5a56c5a18..9c68524f7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/api/LoanProductsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/api/LoanProductsApiResource.java @@ -18,25 +18,7 @@ */ package org.apache.fineract.portfolio.loanproduct.api; -import java.util.Arrays; -import java.util.Collection; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - +import io.swagger.annotations.*; import org.apache.fineract.accounting.common.AccountingDropdownReadPlatformService; import org.apache.fineract.accounting.glaccount.data.GLAccountData; import org.apache.fineract.accounting.producttoaccountmapping.data.ChargeToGLAccountMapper; @@ -74,9 +56,16 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; +import java.util.*; + @Path("/loanproducts") @Component @Scope("singleton") +@Api(value = "Loan Products", description = "A Loan product is a template that is used when creating a loan. Much of the template definition can be overridden during loan creation.") public class LoanProductsApiResource { private final Set LOAN_PRODUCT_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "name", "shortName", "description", @@ -150,7 +139,10 @@ public class LoanProductsApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String createLoanProduct(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Create a Loan Product", httpMethod = "POST", notes = "Depending of the Accounting Rule (accountingRule) selected, additional fields with details of the appropriate Ledger Account identifiers would need to be passed in.\n" + "\n" + "Refer MifosX Accounting Specs Draft for more details regarding the significance of the selected accounting rule\n\n" + "Mandatory Fields: name, shortName, currencyCode, digitsAfterDecimal, inMultiplesOf, principal, numberOfRepayments, repaymentEvery, repaymentFrequencyType, interestRatePerPeriod, interestRateFrequencyType, amortizationType, interestType, interestCalculationPeriodType, transactionProcessingStrategyId, accountingRule, isInterestRecalculationEnabled, daysInYearType, daysInMonthType\n\n" + "Optional Fields: inArrearsTolerance, graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, graceOnArrearsAgeing, charges, paymentChannelToFundSourceMappings, feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, includeInBorrowerCycle, useBorrowerCycle,principalVariationsForBorrowerCycle, numberOfRepaymentVariationsForBorrowerCycle, interestRateVariationsForBorrowerCycle, multiDisburseLoan,maxTrancheCount, outstandingLoanBalance,overdueDaysForNPA,holdGuaranteeFunds, principalThresholdForLastInstalment, accountMovesOutOfNPAOnlyOnArrearsCompletion, canDefineInstallmentAmount, installmentAmountInMultiplesOf, allowAttributeOverrides, allowPartialPeriodInterestCalcualtion\n\n" + "Additional Mandatory Fields for Cash(2) based accounting: fundSourceAccountId, loanPortfolioAccountId, interestOnLoanAccountId, incomeFromFeeAccountId, incomeFromPenaltyAccountId, writeOffAccountId, transfersInSuspenseAccountId, overpaymentLiabilityAccountId\n\n" + "Additional Mandatory Fields for periodic (3) and upfront (4)accrual accounting: fundSourceAccountId, loanPortfolioAccountId, interestOnLoanAccountId, incomeFromFeeAccountId, incomeFromPenaltyAccountId, writeOffAccountId, receivableInterestAccountId, receivableFeeAccountId, receivablePenaltyAccountId, transfersInSuspenseAccountId, overpaymentLiabilityAccountId\n\n" + "Additional Mandatory Fields if interest recalculation is enabled(true): interestRecalculationCompoundingMethod, rescheduleStrategyMethod, recalculationRestFrequencyType\n\n" + "Additional Optional Fields if interest recalculation is enabled(true): isArrearsBasedOnOriginalSchedule, preClosureInterestCalculationStrategy\n\n" + "Additional Optional Fields if interest recalculation is enabled(true) and recalculationRestFrequencyType is not same as repayment period: recalculationRestFrequencyInterval, recalculationRestFrequencyDate\n\n" + "Additional Optional Fields if interest recalculation is enabled(true) and interestRecalculationCompoundingMethod is enabled: recalculationCompoundingFrequencyType\n\n" + "Additional Optional Fields if interest recalculation is enabled(true) and interestRecalculationCompoundingMethod is enabled and recalculationCompoundingFrequencyType is not same as repayment period: recalculationCompoundingFrequencyInterval, recalculationCompoundingFrequencyDate\n\n" + "Additional Mandatory Fields if Hold Guarantee funds is enabled(true): mandatoryGuarantee\n\n" + "Additional Optional Fields if Hold Guarantee funds is enabled(true): minimumGuaranteeFromOwnFunds,minimumGuaranteeFromGuarantor") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = LoanProductsApiResourceSwagger.PostLoanProductsRequest.class)}) + @ApiResponses({@ApiResponse(code = 200,message = "OK", response = LoanProductsApiResourceSwagger.PostLoanProductsResponse.class)}) + public String createLoanProduct(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createLoanProduct().withJson(apiRequestBodyAsJson).build(); @@ -162,6 +154,8 @@ public class LoanProductsApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "List Loan Products", httpMethod = "GET", notes = "Lists Loan Products\n\n" + "Example Requests:\n" + "\n" + "loanproducts\n" + "\n" + "\n" + "loanproducts?fields=name,description,interestRateFrequencyType,amortizationType") + @ApiResponses({@ApiResponse(code = 200, message = "OK", responseContainer = "List", response = LoanProductsApiResourceSwagger.GetLoanProductsResponse.class)}) public String retrieveAllLoanProducts(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -185,7 +179,9 @@ public class LoanProductsApiResource { @Path("template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveTemplate(@Context final UriInfo uriInfo, @QueryParam("isProductMixTemplate") final boolean isProductMixTemplate) { + @ApiOperation(value = "Retrieve Loan Product Details Template", httpMethod = "GET", notes = "This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n" + "\n" + "Field Defaults\n" + "Allowed Value Lists\n" + "Example Request:\n" + "\n" + "loanproducts/template") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = LoanProductsApiResourceSwagger.GetLoanProductsTemplateResponse.class)}) + public String retrieveTemplate(@Context final UriInfo uriInfo, @QueryParam("isProductMixTemplate") @ApiParam(value = "isProductMixTemplate") final boolean isProductMixTemplate) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters()); @@ -208,7 +204,9 @@ public class LoanProductsApiResource { @Path("{productId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveLoanProductDetails(@PathParam("productId") final Long productId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve a Loan Product", httpMethod = "GET", notes = "Retrieves a Loan Product\n\n" + "Example Requests:\n" + "\n" + "loanproducts/1\n" + "\n" + "\n" + "loanproducts/1?template=true\n" + "\n" + "\n" + "loanproducts/1?fields=name,description,numberOfRepayments") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = LoanProductsApiResourceSwagger.GetLoanProductsProductIdResponse.class)}) + public String retrieveLoanProductDetails(@PathParam("productId") @ApiParam(value = "productId") final Long productId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -243,7 +241,10 @@ public class LoanProductsApiResource { @Path("{productId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String updateLoanProduct(@PathParam("productId") final Long productId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update a Loan Product", httpMethod = "PUT", notes = "Updates a Loan Product") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = LoanProductsApiResourceSwagger.PutLoanProductsProductIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = LoanProductsApiResourceSwagger.PutLoanProductsProductIdResponse.class)}) + public String updateLoanProduct(@PathParam("productId") @ApiParam(value = "productId") final Long productId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateLoanProduct(productId).withJson(apiRequestBodyAsJson) .build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/api/LoanProductsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/api/LoanProductsApiResourceSwagger.java new file mode 100644 index 000000000..cd09968ba --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/api/LoanProductsApiResourceSwagger.java @@ -0,0 +1,1109 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.loanproduct.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.time.LocalDate; +import java.util.List; +import java.util.Set; + +/** + * Created by Chirag Gupta on 12/27/17. + */ +final class LoanProductsApiResourceSwagger { + private LoanProductsApiResourceSwagger() { + } + + @ApiModel(value = "PostLoanProductsRequest") + public final static class PostLoanProductsRequest { + private PostLoanProductsRequest() { + } + + @ApiModelProperty(example = "LP Accrual Accounting") + public String name; + @ApiModelProperty(example = "LPAA") + public String shortName; + @ApiModelProperty(example = "USD") + public String currencyCode; + @ApiModelProperty(example = "en_GB") + public String locale; + @ApiModelProperty(example = "2") + public Integer digitsAfterDecimal; + @ApiModelProperty(example = "0") + public Integer inMultiplesOf; + @ApiModelProperty(example = "100,000.00") + public Double principal; + @ApiModelProperty(example = "12") + public Integer numberOfRepayments; + @ApiModelProperty(example = "1") + public Integer repaymentEvery; + @ApiModelProperty(example = "2") + public Integer repaymentFrequencyType; + @ApiModelProperty(example = "1") + public Integer transactionProcessingStrategyId; + @ApiModelProperty(example = "1.75") + public Double interestRatePerPeriod; + @ApiModelProperty(example = "2") + public Integer interestRateFrequencyType; + @ApiModelProperty(example = "1") + public Integer amortizationType; + @ApiModelProperty(example = "0") + public Integer interestType; + @ApiModelProperty(example = "1") + public Integer interestCalculationPeriodType; + @ApiModelProperty(example = "1") + public Integer daysInMonthType; + @ApiModelProperty(example = "1") + public Integer daysInYearType; + @ApiModelProperty(example = "false") + public Boolean isInterestRecalculationEnabled; + @ApiModelProperty(example = "3") + public Integer accountingRule; + @ApiModelProperty(example = "4") + public Integer fundSourceAccountId; + @ApiModelProperty(example = "8") + public Integer loanPortfolioAccountId; + @ApiModelProperty(example = "9") + public Integer receivableInterestAccountId; + @ApiModelProperty(example = "11") + public Integer receivableFeeAccountId; + @ApiModelProperty(example = "10") + public Integer receivablePenaltyAccountId; + @ApiModelProperty(example = "34") + public Integer interestOnLoanAccountId; + @ApiModelProperty(example = "37") + public Integer incomeFromFeeAccountId; + @ApiModelProperty(example = "35") + public Integer incomeFromPenaltyAccountId; + @ApiModelProperty(example = "2") + public Integer overpaymentLiabilityAccountId; + @ApiModelProperty(example = "41") + public Integer writeOffAccountId; + } + + @ApiModel(value = "PostLoanProductsResponse") + public final static class PostLoanProductsResponse { + private PostLoanProductsResponse() { + } + + @ApiModelProperty(example = "3") + public Integer resourceId; + } + + @ApiModel(value = "GetLoanProductsResponse") + public final static class GetLoanProductsResponse { + private GetLoanProductsResponse() { + } + + final class GetLoanProductsCurrency { + private GetLoanProductsCurrency() { + } + + @ApiModelProperty(example = "USD") + public String code; + @ApiModelProperty(example = "US Dollar") + public String name; + @ApiModelProperty(example = "2") + public Integer decimalPlaces; + @ApiModelProperty(example = "0") + public Integer inMultiplesOf; + @ApiModelProperty(example = "$") + public String displaySymbol; + @ApiModelProperty(example = "currency.USD") + public String nameCode; + @ApiModelProperty(example = "US Dollar ($)") + public String displayLabel; + } + + final class GetLoanProductsRepaymentFrequencyType { + private GetLoanProductsRepaymentFrequencyType() { + } + + @ApiModelProperty(example = "0") + public Integer id; + @ApiModelProperty(example = "repaymentFrequency.periodFrequencyType.days") + public String code; + @ApiModelProperty(example = "Days") + public String value; + } + + final class GetLoanProductsInterestRateFrequencyType { + private GetLoanProductsInterestRateFrequencyType() { + } + + @ApiModelProperty(example = "3") + public Integer id; + @ApiModelProperty(example = "interestRateFrequency.periodFrequencyType.years") + public String code; + @ApiModelProperty(example = "Per year") + public String value; + } + + final class GetLoanProductsAmortizationType { + private GetLoanProductsAmortizationType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "amortizationType.equal.installments") + public String code; + @ApiModelProperty(example = "Equal installments") + public String value; + } + + final class GetLoanProductsInterestType { + private GetLoanProductsInterestType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "interestType.flat") + public String code; + @ApiModelProperty(example = "Flat") + public String value; + } + + final class GetLoansProductsInterestCalculationPeriodType { + private GetLoansProductsInterestCalculationPeriodType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "interestCalculationPeriodType.same.as.repayment.period") + public String code; + @ApiModelProperty(example = "Same as repayment period") + public String value; + } + + final class GetLoansProductsDaysInMonthType { + private GetLoansProductsDaysInMonthType() { + } + + @ApiModelProperty(example = "30") + public Integer id; + @ApiModelProperty(example = "DaysInMonthType.days360") + public String code; + @ApiModelProperty(example = "30 Days") + public String value; + } + + final class GetLoansProductsDaysInYearType { + private GetLoansProductsDaysInYearType() { + } + + @ApiModelProperty(example = "360") + public Integer id; + @ApiModelProperty(example = "DaysInYearType.days360") + public String code; + @ApiModelProperty(example = "360 Days") + public String value; + } + + final class GetLoanProductsInterestRecalculationData { + private GetLoanProductsInterestRecalculationData() { + } + + final class GetLoanProductsInterestRecalculationCompoundingType { + private GetLoanProductsInterestRecalculationCompoundingType() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "interestRecalculationCompoundingMethod.fee") + public String code; + @ApiModelProperty(example = "Fee") + public String value; + } + + final class GetLoanProductsInterestRecalculationCompoundingFrequencyType { + private GetLoanProductsInterestRecalculationCompoundingFrequencyType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "interestRecalculationFrequencyType.same.as.repayment.period") + public String code; + @ApiModelProperty(example = "Same as repayment period") + public String value; + } + + final class GetLoanProductsRescheduleStrategyType { + private GetLoanProductsRescheduleStrategyType() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "loanRescheduleStrategyMethod.reduce.number.of.installments") + public String code; + @ApiModelProperty(example = "Reduce number of installments") + public String value; + } + + final class GetLoanProductsPreClosureInterestCalculationStrategy { + private GetLoanProductsPreClosureInterestCalculationStrategy() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "loanPreClosureInterestCalculationStrategy.tillPreClosureDate") + public String code; + @ApiModelProperty(example = "Till preclose Date") + public String value; + } + + @ApiModelProperty(example = "3") + public Integer id; + @ApiModelProperty(example = "1") + public Integer productId; + public GetLoanProductsInterestRecalculationCompoundingType interestRecalculationCompoundingType; + public GetLoanProductsInterestRecalculationCompoundingFrequencyType interestRecalculationCompoundingFrequencyType; + public GetLoanProductsRescheduleStrategyType rescheduleStrategyType; + public GetLoanProductsInterestRecalculationCompoundingFrequencyType recalculationRestFrequencyType; + public GetLoanProductsPreClosureInterestCalculationStrategy preClosureInterestCalculationStrategy; + @ApiModelProperty(example = "true") + public Boolean isArrearsBasedOnOriginalSchedule; + } + + final class GetLoanProductsAccountingRule { + private GetLoanProductsAccountingRule() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "accountingRuleType.cash") + public String code; + @ApiModelProperty(example = "CASH BASED") + public String value; + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "personal loan product") + public String name; + @ApiModelProperty(example = "pe1") + public String shortName; + @ApiModelProperty(example = "false") + public Boolean includeInBorrowerCycle; + @ApiModelProperty(example = "false") + public Boolean useBorrowerCycle; + @ApiModelProperty(example = "[2013, 9, 2]") + public LocalDate startDate; + @ApiModelProperty(example = "[2014, 2, 7]") + public LocalDate endDate; + @ApiModelProperty(example = "loanProduct.active") + public String status; + public GetLoanProductsCurrency currency; + @ApiModelProperty(example = "10000.000000") + public Float principal; + @ApiModelProperty(example = "5000.000000") + public Float minPrincipal; + @ApiModelProperty(example = "15000.000000") + public Float maxPrincipal; + @ApiModelProperty(example = "10") + public Integer numberOfRepayments; + @ApiModelProperty(example = "5") + public Integer minNumberOfRepayments; + @ApiModelProperty(example = "15") + public Integer maxNumberOfRepayments; + @ApiModelProperty(example = "7") + public Integer repaymentEvery; + public GetLoanProductsRepaymentFrequencyType repaymentFrequencyType; + @ApiModelProperty(example = "15.000000") + public Float interestRatePerPeriod; + public GetLoanProductsInterestRateFrequencyType interestRateFrequencyType; + @ApiModelProperty(example = "15.000000") + public Float annualInterestRate; + public GetLoanProductsAmortizationType amortizationType; + public GetLoanProductsInterestType interestType; + public GetLoansProductsInterestCalculationPeriodType interestCalculationPeriodType; + @ApiModelProperty(example = "1") + public Integer transactionProcessingStrategyId; + @ApiModelProperty(example = "Mifos style") + public String transactionProcessingStrategyName; + @ApiModelProperty(example = "[]") + public List principalVariationsForBorrowerCycle; + @ApiModelProperty(example = "[]") + public List interestRateVariationsForBorrowerCycle; + @ApiModelProperty(example = "[]") + public List numberOfRepaymentVariationsForBorrowerCycle; + public GetLoansProductsDaysInMonthType daysInMonthType; + public GetLoansProductsDaysInYearType daysInYearType; + @ApiModelProperty(example = "true") + public Boolean isInterestRecalculationEnabled; + public GetLoanProductsInterestRecalculationData interestRecalculationData; + public GetLoanProductsAccountingRule accountingRule; + @ApiModelProperty(example = "0") + public Integer principalThresholdForLastInstalment; + } + + @ApiModel(value = "GetLoanProductsTemplateResponse") + public final static class GetLoanProductsTemplateResponse { + private GetLoanProductsTemplateResponse() { + } + + final class GetLoanProductsTemplateCurrency { + private GetLoanProductsTemplateCurrency() { + } + + @ApiModelProperty(example = "") + public String code; + @ApiModelProperty(example = "") + public String name; + @ApiModelProperty(example = "0") + public Integer decimalPlaces; + @ApiModelProperty(example = "0") + public Integer inMultiplesOf; + @ApiModelProperty(example = "") + public String displaySymbol; + @ApiModelProperty(example = "") + public String nameCode; + @ApiModelProperty(example = "[]") + public String displayLabel; + } + + final class GetLoanProductsRepaymentTemplateFrequencyType { + private GetLoanProductsRepaymentTemplateFrequencyType() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "repaymentFrequency.periodFrequencyType.months") + public String code; + @ApiModelProperty(example = "Months") + public String value; + } + + final class GetLoanProductsInterestRateTemplateFrequencyType { + private GetLoanProductsInterestRateTemplateFrequencyType() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "interestRateFrequency.periodFrequencyType.months") + public String code; + @ApiModelProperty(example = "Per month") + public String value; + } + + final class GetLoanProductsInterestTemplateType { + private GetLoanProductsInterestTemplateType() { + } + + @ApiModelProperty(example = "0") + public Integer id; + @ApiModelProperty(example = "interestType.declining.balance") + public String code; + @ApiModelProperty(example = "Declining Balance") + public String value; + } + + final class GetLoanProductsAccountingRule { + private GetLoanProductsAccountingRule() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "accountingRuleType.none") + public String code; + @ApiModelProperty(example = "NONE") + public String value; + } + + final class GetLoansProductsDaysInMonthTemplateType { + private GetLoansProductsDaysInMonthTemplateType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "DaysInMonthType.actual") + public String code; + @ApiModelProperty(example = "Actual") + public String value; + } + + final class GetLoanProductsDaysInYearTemplateType { + private GetLoanProductsDaysInYearTemplateType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "DaysInYearType.actual") + public String code; + @ApiModelProperty(example = "Actual") + public String value; + } + + final class GetLoanProductsInterestRecalculationTemplateData { + private GetLoanProductsInterestRecalculationTemplateData() { + } + + final class GetLoanProductsInterestRecalculationCompoundingType { + private GetLoanProductsInterestRecalculationCompoundingType() { + } + + @ApiModelProperty(example = "0") + public Integer id; + @ApiModelProperty(example = "interestRecalculationCompoundingMethod.none") + public String code; + @ApiModelProperty(example = "None") + public String value; + } + + final class GetLoanProductsRescheduleStrategyType { + private GetLoanProductsRescheduleStrategyType() { + } + + @ApiModelProperty(example = "3") + public Integer id; + @ApiModelProperty(example = "loanRescheduleStrategyMethod.reduce.emi.amount") + public String code; + @ApiModelProperty(example = "Reduce EMI amount") + public String value; + } + + public GetLoanProductsInterestRecalculationCompoundingType interestRecalculationCompoundingType; + public GetLoanProductsRescheduleStrategyType rescheduleStrategyType; + public GetLoanProductsResponse.GetLoanProductsInterestRecalculationData.GetLoanProductsPreClosureInterestCalculationStrategy preClosureInterestCalculationStrategy; + } + + final class GetLoanProductsPaymentTypeOptions { + private GetLoanProductsPaymentTypeOptions() { + } + + @ApiModelProperty(example = "10") + public Integer id; + @ApiModelProperty(example = "check") + public String name; + @ApiModelProperty(example = "1") + public Integer position; + } + + final class GetLoanProductsCurrencyOptions { + private GetLoanProductsCurrencyOptions() { + } + + @ApiModelProperty(example = "USD") + public String code; + @ApiModelProperty(example = "US Dollar") + public String name; + @ApiModelProperty(example = "2") + public Integer decimalPlaces; + @ApiModelProperty(example = "$") + public String displaySymbol; + @ApiModelProperty(example = "currency.USD") + public String nameCode; + @ApiModelProperty(example = "US Dollar ($)") + public String displayLabel; + } + + final class GetLoanProductsTransactionProcessingStrategyOptions { + private GetLoanProductsTransactionProcessingStrategyOptions() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "mifos-standard-strategy") + public String code; + @ApiModelProperty(example = "Penalties, Fees, Interest, Principal order") + public String name; + } + + final class GetLoanProductsChargeOptions { + private GetLoanProductsChargeOptions() { + } + + final class GetLoanChargeTimeType { + private GetLoanChargeTimeType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "chargeTimeType.disbursement") + public String code; + @ApiModelProperty(example = "Disbursement") + public String value; + } + + final class GetLoanProductsChargeAppliesTo { + private GetLoanProductsChargeAppliesTo() { + } + + @ApiModelProperty(example = "1 ") + public Integer id; + @ApiModelProperty(example = "chargeAppliesTo.loan") + public String code; + @ApiModelProperty(example = "Loan") + public String value; + } + + final class GetLoanChargeCalculationType { + private GetLoanChargeCalculationType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "chargeCalculationType.flat") + public String code; + @ApiModelProperty(example = "Flat") + public String value; + } + + final class GetLoansChargePaymentMode { + private GetLoansChargePaymentMode() { + } + + @ApiModelProperty(example = "0") + public Integer id; + @ApiModelProperty(example = "chargepaymentmode.regular") + public String code; + @ApiModelProperty(example = "Regular") + public String value; + } + + @ApiModelProperty(example = "5") + public Integer id; + @ApiModelProperty(example = "des charges") + public String name; + @ApiModelProperty(example = "true") + public Boolean active; + @ApiModelProperty(example = "false") + public Boolean penalty; + public GetLoanProductsCurrencyOptions currency; + @ApiModelProperty(example = "100") + public Long amount; + public GetLoanChargeTimeType chargeTimeType; + public GetLoanProductsChargeAppliesTo chargeAppliesTo; + public GetLoanChargeCalculationType chargeCalculationType; + public GetLoansChargePaymentMode chargePaymentMode; + } + + final class GetLoanProductsAccountingMappingOptions { + private GetLoanProductsAccountingMappingOptions() { + } + + final class GetLoanProductsLiabilityAccountOptions { + private GetLoanProductsLiabilityAccountOptions() { + } + + final class GetLoanProductsLiabilityType { + private GetLoanProductsLiabilityType() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "accountType.liability") + public String code; + @ApiModelProperty(example = "LIABILITY") + public String value; + } + + final class GetLoanProductsLiabilityUsage { + private GetLoanProductsLiabilityUsage() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "accountUsage.detail") + public String code; + @ApiModelProperty(example = "DETAIL") + public String value; + } + + final class GetLoanProductsLiabilityTagId { + private GetLoanProductsLiabilityTagId() { + } + + @ApiModelProperty(example = "0") + public Integer id; + } + + @ApiModelProperty(example = "11") + public Integer id; + @ApiModelProperty(example = "over payment") + public String name; + @ApiModelProperty(example = "13") + public Integer glCode; + @ApiModelProperty(example = "false") + public Boolean disabled; + @ApiModelProperty(example = "true") + public Boolean manualEntriesAllowed; + public GetLoanProductsLiabilityType type; + public GetLoanProductsLiabilityUsage usage; + @ApiModelProperty(example = "over payment") + public String nameDecorated; + public GetLoanProductsLiabilityTagId tagId; + @ApiModelProperty(example = "0") + public Integer organizationRunningBalance; + } + + final class GetLoanProductsAssetAccountOptions { + private GetLoanProductsAssetAccountOptions() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "Loan portfolio") + public String name; + @ApiModelProperty(example = "02") + public Integer glCode; + @ApiModelProperty(example = "false") + public Boolean disabled; + @ApiModelProperty(example = "true") + public Boolean manualEntriesAllowed; + public GetLoanProductsLiabilityAccountOptions.GetLoanProductsLiabilityType type; + public GetLoanProductsLiabilityAccountOptions.GetLoanProductsLiabilityUsage usage; + @ApiModelProperty(example = "Loan portfolio") + public String nameDecorated; + public GetLoanProductsLiabilityAccountOptions.GetLoanProductsLiabilityTagId tagId; + @ApiModelProperty(example = "60000") + public Integer organizationRunningBalance; + } + + final class GetLoanProductsExpenseAccountOptions { + private GetLoanProductsExpenseAccountOptions() { + } + + final class GetLoanProductsExpenseType { + private GetLoanProductsExpenseType() { + } + + @ApiModelProperty(example = "5") + public Integer id; + @ApiModelProperty(example = "accountType.expense") + public String code; + @ApiModelProperty(example = "EXPENSE") + public String value; + } + + @ApiModelProperty(example = "10") + public Integer id; + @ApiModelProperty(example = "loans written off 2") + public String name; + @ApiModelProperty(example = "12") + public Integer glCode; + @ApiModelProperty(example = "false") + public Boolean disabled; + @ApiModelProperty(example = "true") + public Boolean manualEntriesAllowed; + public GetLoanProductsExpenseType type; + public GetLoanProductsLiabilityAccountOptions.GetLoanProductsLiabilityUsage usage; + @ApiModelProperty(example = "loans written off 2") + public String nameDecorated; + public GetLoanProductsLiabilityAccountOptions.GetLoanProductsLiabilityTagId tagId; + @ApiModelProperty(example = "0") + public Integer organizationRunningBalance; + } + + final class GetLoanProductsIncomeAccountOptions { + private GetLoanProductsIncomeAccountOptions() { + } + + final class GetLoanProductsIncomeType { + private GetLoanProductsIncomeType() { + } + + @ApiModelProperty(example = "4") + public Integer id; + @ApiModelProperty(example = "accountType.income") + public String code; + @ApiModelProperty(example = "INCOME") + public String value; + } + + @ApiModelProperty(example = "4") + public Integer id; + @ApiModelProperty(example = "income from interest") + public String name; + @ApiModelProperty(example = "04") + public Integer glCode; + @ApiModelProperty(example = "false") + public Boolean disabled; + @ApiModelProperty(example = "true") + public Boolean manualEntriesAllowed; + public GetLoanProductsIncomeType type; + public GetLoanProductsLiabilityAccountOptions.GetLoanProductsLiabilityUsage usage; + @ApiModelProperty(example = "income from interest") + public String nameDecorated; + public GetLoanProductsLiabilityAccountOptions.GetLoanProductsLiabilityTagId tagId; + @ApiModelProperty(example = "19") + public Integer organizationRunningBalance; + } + + public Set liabilityAccountOptions; + public Set assetAccountOptions; + public Set expenseAccountOptions; + public Set incomeAccountOptions; + } + + final class GetLoanProductsValueConditionTypeOptions { + private GetLoanProductsValueConditionTypeOptions() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "mifos-standard-strategyLoanProductValueConditionType.equal") + public String code; + @ApiModelProperty(example = "equals") + public String value; + } + + @ApiModelProperty(example = "false") + public Boolean includeInBorrowerCycle; + @ApiModelProperty(example = "false") + public Boolean useBorrowerCycle; + public GetLoanProductsTemplateCurrency currency; + public GetLoanProductsRepaymentTemplateFrequencyType repaymentFrequencyType; + public GetLoanProductsInterestRateTemplateFrequencyType interestRateFrequencyType; + public GetLoanProductsResponse.GetLoanProductsAmortizationType amortizationType; + public GetLoanProductsInterestTemplateType interestType; + public GetLoanProductsResponse.GetLoansProductsInterestCalculationPeriodType interestCalculationPeriodType; + @ApiModelProperty(example = "[]") + public List principalVariationsForBorrowerCycle; + @ApiModelProperty(example = "[]") + public List interestRateVariationsForBorrowerCycle; + @ApiModelProperty(example = "[]") + public List numberOfRepaymentVariationsForBorrowerCycle; + public GetLoanProductsAccountingRule accountingRule; + public GetLoansProductsDaysInMonthTemplateType daysInMonthType; + public GetLoanProductsDaysInYearTemplateType daysInYearType; + @ApiModelProperty(example = "false") + public Boolean isInterestRecalculationEnabled; + public GetLoanProductsInterestRecalculationTemplateData interestRecalculationData; + public Set paymentTypeOptions; + public Set currencyOptions; + public Set repaymentFrequencyTypeOptions; + public Set preClosureInterestCalculationStrategyOptions; + public Set interestRateFrequencyTypeOptions; + public Set amortizationTypeOptions; + public Set interestTypeOptions; + public Set interestCalculationPeriodTypeOptions; + public Set transactionProcessingStrategyOptions; + public Set chargeOptions; + public Set accountingRuleOptions; + public GetLoanProductsAccountingMappingOptions accountingMappingOptions; + public Set valueConditionTypeOptions; + public Set daysInMonthTypeOptions; + public Set daysInYearTypeOptions; + public Set interestRecalculationCompoundingTypeOptions; + public Set rescheduleStrategyTypeOptions; + public Set interestRecalculationFrequencyTypeOptions; + } + + @ApiModel(value = "GetLoanProductsProductIdResponse") + public final static class GetLoanProductsProductIdResponse { + private GetLoanProductsProductIdResponse() { + } + + final class GetLoanProductsInterestRateFrequencyType { + private GetLoanProductsInterestRateFrequencyType() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "interestRateFrequency.periodFrequencyType.months") + public String code; + @ApiModelProperty(example = "Per month") + public String value; + } + + final class GetLoanProductsPrincipalVariationsForBorrowerCycle { + private GetLoanProductsPrincipalVariationsForBorrowerCycle() { + } + + final class GetLoanProductsParamType { + private GetLoanProductsParamType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "LoanProductParamType.principal") + public String code; + @ApiModelProperty(example = "principal") + public String value; + } + + final class GetLoanProductsValueConditionType { + private GetLoanProductsValueConditionType() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "LoanProductValueConditionType.equal") + public String code; + @ApiModelProperty(example = "equals") + public String value; + } + + @ApiModelProperty(example = "21") + public Integer id; + @ApiModelProperty(example = "1") + public Integer borrowerCycleNumber; + public GetLoanProductsParamType paramType; + public GetLoanProductsValueConditionType valueConditionType; + @ApiModelProperty(example = "2000.000000") + public Float minValue; + @ApiModelProperty(example = "20000.000000") + public Float maxValue; + @ApiModelProperty(example = "15000.000000") + public Float defaultValue; + } + + final class GetLoanAccountingMappings { + private GetLoanAccountingMappings() { + } + + final class GetLoanFundSourceAccount { + private GetLoanFundSourceAccount() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "fund source") + public String name; + @ApiModelProperty(example = "01") + public Integer glCode; + } + + final class GetLoanPortfolioAccount { + private GetLoanPortfolioAccount() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "Loan portfolio") + public String name; + @ApiModelProperty(example = "02") + public Integer glCode; + } + + final class GetLoanTransfersInSuspenseAccount { + private GetLoanTransfersInSuspenseAccount() { + } + + @ApiModelProperty(example = "3") + public Integer id; + @ApiModelProperty(example = "transfers") + public String name; + @ApiModelProperty(example = "03") + public Integer glCode; + } + + final class GetLoanInterestOnLoanAccount { + private GetLoanInterestOnLoanAccount() { + } + + @ApiModelProperty(example = "4") + public Integer id; + @ApiModelProperty(example = "income from interest") + public String name; + @ApiModelProperty(example = "04") + public Integer glCode; + } + + final class GetLoanIncomeFromFeeAccount { + private GetLoanIncomeFromFeeAccount() { + } + + @ApiModelProperty(example = "8") + public Integer id; + @ApiModelProperty(example = "income from fees 2") + public String name; + @ApiModelProperty(example = "10") + public Integer glCode; + } + + final class GetLoanIncomeFromPenaltyAccount { + private GetLoanIncomeFromPenaltyAccount() { + } + + @ApiModelProperty(example = "9") + public Integer id; + @ApiModelProperty(example = "income from penalities 2") + public String name; + @ApiModelProperty(example = "11") + public Integer glCode; + } + + final class GetLoanWriteOffAccount { + private GetLoanWriteOffAccount() { + } + + @ApiModelProperty(example = "10") + public Integer id; + @ApiModelProperty(example = "loans written off 2") + public String name; + @ApiModelProperty(example = "12") + public Integer glCode; + } + + final class GetLoanOverpaymentLiabilityAccount { + private GetLoanOverpaymentLiabilityAccount() { + } + + @ApiModelProperty(example = "11") + public Integer id; + @ApiModelProperty(example = "over payment") + public String name; + @ApiModelProperty(example = "13") + public Integer glCode; + } + + public GetLoanFundSourceAccount fundSourceAccount; + public GetLoanPortfolioAccount loanPortfolioAccount; + public GetLoanTransfersInSuspenseAccount transfersInSuspenseAccount; + public GetLoanInterestOnLoanAccount interestOnLoanAccount; + public GetLoanIncomeFromFeeAccount incomeFromFeeAccount; + public GetLoanIncomeFromPenaltyAccount incomeFromPenaltyAccount; + public GetLoanWriteOffAccount writeOffAccount; + public GetLoanOverpaymentLiabilityAccount overpaymentLiabilityAccount; + } + + final class GetLoanPaymentChannelToFundSourceMappings { + private GetLoanPaymentChannelToFundSourceMappings() { + } + + final class GetLoanPaymentType { + private GetLoanPaymentType() { + } + + @ApiModelProperty(example = "10") + public Integer id; + @ApiModelProperty(example = "check") + public String name; + } + + public GetLoanPaymentType paymentType; + public GetLoanAccountingMappings.GetLoanFundSourceAccount fundSourceAccount; + } + + final class GetLoanFeeToIncomeAccountMappings { + private GetLoanFeeToIncomeAccountMappings() { + } + + final class GetLoanCharge { + private GetLoanCharge() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "flat install") + public String name; + @ApiModelProperty(example = "false") + public Boolean active; + @ApiModelProperty(example = "false") + public Boolean penalty; + } + + public GetLoanCharge charge; + public GetLoanAccountingMappings.GetLoanIncomeFromFeeAccount incomeAccount; + } + + @ApiModelProperty(example = "11") + public Integer id; + @ApiModelProperty(example = "advanced accounting") + public String name; + @ApiModelProperty(example = "ad11") + public String shortName; + @ApiModelProperty(example = "true") + public Boolean includeInBorrowerCycle; + @ApiModelProperty(example = "true") + public Boolean useBorrowerCycle; + @ApiModelProperty(example = "loanProduct.active") + public String status; + public GetLoanProductsResponse.GetLoanProductsCurrency currency; + @ApiModelProperty(example = "10000.000000") + public Float principal; + @ApiModelProperty(example = "2000.000000") + public Float minPrincipal; + @ApiModelProperty(example = "15000.000000") + public Float maxPrincipal; + @ApiModelProperty(example = "7") + public Integer numberOfRepayments; + @ApiModelProperty(example = "7") + public Integer repaymentEvery; + public GetLoanProductsResponse.GetLoanProductsRepaymentFrequencyType repaymentFrequencyType; + @ApiModelProperty(example = "5.000000") + public Float interestRatePerPeriod; + public GetLoanProductsInterestRateFrequencyType interestRateFrequencyType; + @ApiModelProperty(example = "60.000000") + public Float annualInterestRate; + public GetLoanProductsResponse.GetLoanProductsAmortizationType amortizationType; + public GetLoanProductsTemplateResponse.GetLoanProductsInterestTemplateType interestType; + public GetLoanProductsResponse.GetLoansProductsInterestCalculationPeriodType interestCalculationPeriodType; + @ApiModelProperty(example = "1") + public Integer transactionProcessingStrategyId; + @ApiModelProperty(example = "Mifos style") + public String transactionProcessingStrategyName; + @ApiModelProperty(example = "[]") + public List charges; + public Set productsPrincipalVariationsForBorrowerCycle; + @ApiModelProperty(example = "[]") + public List interestRateVariationsForBorrowerCycle; + @ApiModelProperty(example = "[]") + public List numberOfRepaymentVariationsForBorrowerCycle; + public GetLoanProductsResponse.GetLoanProductsAccountingRule accountingRule; + public GetLoanAccountingMappings accountingMappings; + public Set paymentChannelToFundSourceMappings; + public Set feeToIncomeAccountMappings; + @ApiModelProperty(example = "true") + public Boolean multiDisburseLoan; + @ApiModelProperty(example = "3") + public Integer maxTrancheCount; + @ApiModelProperty(example = "36000.000000") + public Float outstandingLoanBalance; + @ApiModelProperty(example = "2") + public Integer overdueDaysForNPA; + @ApiModelProperty(example = "50") + public Integer principalThresholdForLastInstalment; + } + + @ApiModel(value = "PutLoanProductsProductIdRequest") + public final static class PutLoanProductsProductIdRequest { + private PutLoanProductsProductIdRequest() { + } + + @ApiModelProperty(example = "en_GB") + public String locale; + @ApiModelProperty(example = "70,000.00") + public Double principal; + } + + @ApiModel(value = "PutLoanProductsProductIdResponse") + public final static class PutLoanProductsProductIdResponse { + private PutLoanProductsProductIdResponse() { + } + + final class PutLoanChanges { + private PutLoanChanges() { + } + + @ApiModelProperty(example = "70,000.00") + public Double principal; + @ApiModelProperty(example = "en_GB") + public String locale; + } + + @ApiModelProperty(example = "1") + public Integer resourceId; + public PutLoanChanges changes; + } +} + diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/api/NotesApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/api/NotesApiResource.java index 217968921..f1b4a8128 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/api/NotesApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/api/NotesApiResource.java @@ -18,23 +18,7 @@ */ package org.apache.fineract.portfolio.note.api; -import java.util.Arrays; -import java.util.Collection; -import java.util.HashSet; -import java.util.Set; - -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - +import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -51,9 +35,19 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; + @Path("/{resourceType}/{resourceId}/notes") @Component @Scope("singleton") +@Api(value = "Notes", description = "Notes API allows to enter notes for supported resources.") public class NotesApiResource { private final Set NOTE_DATA_PARAMETERS = new HashSet<>(Arrays.asList("id", "clientId", "groupId", "loanId", @@ -80,8 +74,10 @@ public class NotesApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveNotesByResource(@PathParam("resourceType") final String resourceType, - @PathParam("resourceId") final Long resourceId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve a Resource's Notes", httpMethod = "GET", notes = "Retrieves a Resource's Notes\n\n" + "Note: Notes are returned in descending createOn order.\n" + "\n" + "Example Requests:\n" + "\n" + "clients/2/notes\n" + "\n" + "\n" + "groups/2/notes?fields=note,createdOn,createdByUsername") + @ApiResponses({@ApiResponse(code = 200, message = "OK", responseContainer = "List", response = NotesApiResourceSwagger.GetResourceTypeResourceIdNotesResponse.class)}) + public String retrieveNotesByResource(@PathParam("resourceType") @ApiParam(value = "resourceType") final String resourceType, + @PathParam("resourceId") @ApiParam(value = "resourceId") final Long resourceId, @Context final UriInfo uriInfo) { final NoteType noteType = NoteType.fromApiUrl(resourceType); @@ -101,8 +97,10 @@ public class NotesApiResource { @Path("{noteId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveNote(@PathParam("resourceType") final String resourceType, @PathParam("resourceId") final Long resourceId, - @PathParam("noteId") final Long noteId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve a Resource Note", httpMethod = "GET", notes = "Retrieves a Resource Note\n\n" + "Example Requests:\n" + "\n" + "clients/1/notes/76\n" + "\n" + "\n" + "groups/1/notes/20\n" + "\n" + "\n" + "clients/1/notes/76?fields=note,createdOn,createdByUsername\n" + "\n" + "\n" + "groups/1/notes/20?fields=note,createdOn,createdByUsername") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = NotesApiResourceSwagger.GetResourceTypeResourceIdNotesNoteIdResponse.class)}) + public String retrieveNote(@PathParam("resourceType") @ApiParam(value = "resourceType")final String resourceType, @PathParam("resourceId") @ApiParam(value = "resourceId")final Long resourceId, + @PathParam("noteId") @ApiParam(value = "noteId") final Long noteId, @Context final UriInfo uriInfo) { final NoteType noteType = NoteType.fromApiUrl(resourceType); @@ -121,8 +119,11 @@ public class NotesApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String addNewNote(@PathParam("resourceType") final String resourceType, @PathParam("resourceId") final Long resourceId, - final String apiRequestBodyAsJson) { + @ApiOperation(value = "Add a Resource Note", httpMethod = "POST", notes = "Adds a new note to a supported resource.\n\n" + "Example Requests:\n" + "\n" + "clients/1/notes\n" + "\n" + "\n" + "groups/1/notes") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = NotesApiResourceSwagger.PostResourceTypeResourceIdNotesRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = NotesApiResourceSwagger.PostResourceTypeResourceIdNotesResponse.class)}) + public String addNewNote(@PathParam("resourceType") @ApiParam(value = "resourceType")final String resourceType, @PathParam("resourceId") @ApiParam(value = "resourceId")final Long resourceId, + @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final NoteType noteType = NoteType.fromApiUrl(resourceType); @@ -141,8 +142,11 @@ public class NotesApiResource { @Path("{noteId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String updateNote(@PathParam("resourceType") final String resourceType, @PathParam("resourceId") final Long resourceId, - @PathParam("noteId") final Long noteId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update a Resource Note", httpMethod = "PUT", notes = "Updates a Resource Note") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = NotesApiResourceSwagger.PutResourceTypeResourceIdNotesNoteIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = NotesApiResourceSwagger.PutResourceTypeResourceIdNotesNoteIdResponse.class)}) + public String updateNote(@PathParam("resourceType") @ApiParam(value = "resourceType") final String resourceType, @PathParam("resourceId") @ApiParam(value = "resourceId") final Long resourceId, + @PathParam("noteId") @ApiParam(value = "noteId") final Long noteId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final NoteType noteType = NoteType.fromApiUrl(resourceType); @@ -162,8 +166,10 @@ public class NotesApiResource { @Path("{noteId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String deleteNote(@PathParam("resourceType") final String resourceType, @PathParam("resourceId") final Long resourceId, - @PathParam("noteId") final Long noteId) { + @ApiOperation(value = "Delete a Resource Note", httpMethod = "DELETE", notes = "Deletes a Resource Note") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = NotesApiResourceSwagger.DeleteResourceTypeResourceIdNotesNoteIdResponse.class)}) + public String deleteNote(@PathParam("resourceType") @ApiParam(value = "resourceType")final String resourceType, @PathParam("resourceId") @ApiParam(value = "resourceId")final Long resourceId, + @PathParam("noteId") @ApiParam(value = "noteId")final Long noteId) { final NoteType noteType = NoteType.fromApiUrl(resourceType); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/api/NotesApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/api/NotesApiResourceSwagger.java new file mode 100644 index 000000000..ddc880f67 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/api/NotesApiResourceSwagger.java @@ -0,0 +1,157 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.note.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import org.joda.time.DateTime; + +/** + * Created by Chirag Gupta on 12/29/17. + */ +final class NotesApiResourceSwagger { + private NotesApiResourceSwagger() { + } + + @ApiModel(value = "GetResourceTypeResourceIdNotesResponse") + public final static class GetResourceTypeResourceIdNotesResponse { + private GetResourceTypeResourceIdNotesResponse() { + } + + final class GetNotesNoteType { + private GetNotesNoteType() { + } + + @ApiModelProperty(example = "100") + public Integer id; + @ApiModelProperty(example = "noteType.client") + public String code; + @ApiModelProperty(example = "Client note") + public String value; + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "1") + public Integer clientId; + public GetNotesNoteType noteType; + @ApiModelProperty(example = "First note edited") + public String note; + @ApiModelProperty(example = "1") + public Integer createdById; + @ApiModelProperty(example = "mifos") + public String createdByUsername; + @ApiModelProperty(example = "1342498505000") + public DateTime createdOn; + @ApiModelProperty(example = "1") + public Integer updatedById; + @ApiModelProperty(example = "mifos") + public String updatedByUsername; + @ApiModelProperty(example = "1342498517000") + public DateTime updatedOn; + } + + @ApiModel(value = "GetResourceTypeResourceIdNotesNoteIdResponse") + public final static class GetResourceTypeResourceIdNotesNoteIdResponse { + private GetResourceTypeResourceIdNotesNoteIdResponse() { + } + + @ApiModelProperty(example = "76") + public Integer id; + @ApiModelProperty(example = "1") + public Integer clientId; + public GetResourceTypeResourceIdNotesResponse.GetNotesNoteType noteType; + @ApiModelProperty(example = "a note about the client") + public String note; + @ApiModelProperty(example = "1") + public Integer createdById; + @ApiModelProperty(example = "mifos") + public String createdByUsername; + @ApiModelProperty(example = "1359463135000") + public DateTime createdOn; + @ApiModelProperty(example = "1") + public Integer updatedById; + @ApiModelProperty(example = "mifos") + public String updatedByUsername; + @ApiModelProperty(example = "1359463135000") + public DateTime updatedOn; + } + + @ApiModel(value = "PostResourceTypeResourceIdNotesRequest") + public final static class PostResourceTypeResourceIdNotesRequest { + private PostResourceTypeResourceIdNotesRequest() { + } + + @ApiModelProperty(example = "a note about the client") + public String note; + } + + @ApiModel(value = "PostResourceTypeResourceIdNotesResponse") + public final static class PostResourceTypeResourceIdNotesResponse { + private PostResourceTypeResourceIdNotesResponse() { + } + + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "76") + public Integer resourceId; + } + + @ApiModel(value = "PutResourceTypeResourceIdNotesNoteIdRequest") + public final static class PutResourceTypeResourceIdNotesNoteIdRequest { + private PutResourceTypeResourceIdNotesNoteIdRequest() { + } + + @ApiModelProperty(example = "a note about the client") + public String note; + } + + @ApiModel(value = "PutResourceTypeResourceIdNotesNoteIdResponse") + public final static class PutResourceTypeResourceIdNotesNoteIdResponse { + private PutResourceTypeResourceIdNotesNoteIdResponse() { + } + + final class PutNotesChanges { + private PutNotesChanges() { + } + + @ApiModelProperty(example = "a note about the client") + public String note; + } + + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "76") + public Integer resourceId; + public PutNotesChanges changes; + } + + @ApiModel(value = "DeleteResourceTypeResourceIdNotesNoteIdResponse") + public final static class DeleteResourceTypeResourceIdNotesNoteIdResponse { + private DeleteResourceTypeResourceIdNotesNoteIdResponse() { + } + + @ApiModelProperty(example = "76") + public Integer resourceId; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/paymenttype/api/PaymentTypeApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/paymenttype/api/PaymentTypeApiResource.java index ccdcd705b..af5e76446 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/paymenttype/api/PaymentTypeApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/paymenttype/api/PaymentTypeApiResource.java @@ -18,20 +18,7 @@ */ package org.apache.fineract.portfolio.paymenttype.api; -import java.util.Collection; - -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - +import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -46,8 +33,15 @@ import org.apache.fineract.portfolio.paymenttype.service.PaymentTypeReadPlatform import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; +import java.util.Collection; + @Path("/paymenttypes") @Component +@Api(value = "Payment Type", description = "This defines the payment type") public class PaymentTypeApiResource { private final PlatformSecurityContext securityContext; @@ -77,6 +71,8 @@ public class PaymentTypeApiResource { @GET @Consumes({ MediaType.TEXT_HTML, MediaType.APPLICATION_JSON }) @Produces(MediaType.APPLICATION_JSON) + @ApiOperation(value = "Retrieve all Payment Types", httpMethod = "GET", notes = "Retrieve list of payment types") + @ApiResponses({@ApiResponse(code = 200, message = "OK", responseContainer = "List", response = PaymentTypeApiResourceSwagger.GetPaymentTypesResponse.class)}) public String getAllPaymentTypes(@Context final UriInfo uriInfo) { this.securityContext.authenticatedUser().validateHasReadPermission(PaymentTypeApiResourceConstants.resourceNameForPermissions); final Collection paymentTypes = this.readPlatformService.retrieveAllPaymentTypes(); @@ -88,7 +84,9 @@ public class PaymentTypeApiResource { @Path("{paymentTypeId}") @Consumes({ MediaType.TEXT_HTML, MediaType.APPLICATION_JSON }) @Produces(MediaType.APPLICATION_JSON) - public String retrieveOnePaymentType(@PathParam("paymentTypeId") final Long paymentTypeId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve a Payment Type", httpMethod = "GET", notes = "Retrieves a payment type") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = PaymentTypeApiResourceSwagger.GetPaymentTypesPaymentTypeIdResponse.class)}) + public String retrieveOnePaymentType(@PathParam("paymentTypeId") @ApiParam(value = "paymentTypeId") final Long paymentTypeId, @Context final UriInfo uriInfo) { this.securityContext.authenticatedUser().validateHasReadPermission(PaymentTypeApiResourceConstants.resourceNameForPermissions); this.paymentTypeRepositoryWrapper.findOneWithNotFoundDetection(paymentTypeId); final PaymentTypeData paymentTypes = this.readPlatformService.retrieveOne(paymentTypeId); @@ -99,7 +97,10 @@ public class PaymentTypeApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String createPaymentType(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Create a Payment Type", httpMethod = "POST", notes = "Creates a new Payment type\n\n" + "Mandatory Fields: name\n\n" + "Optional Fields: Description, isCashPayment,Position") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = PaymentTypeApiResourceSwagger.PostPaymentTypesRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = PaymentTypeApiResourceSwagger.PostPaymentTypesResponse.class)}) + public String createPaymentType(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createPaymentType().withJson(apiRequestBodyAsJson).build(); @@ -112,7 +113,10 @@ public class PaymentTypeApiResource { @Path("{paymentTypeId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String updatePaymentType(@PathParam("paymentTypeId") final Long paymentTypeId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update a Payment Type", httpMethod = "PUT", notes = "Updates a Payment Type") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = PaymentTypeApiResourceSwagger.PutPaymentTypesPaymentTypeIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = PaymentTypeApiResourceSwagger.PutPaymentTypesPaymentTypeIdResponse.class)}) + public String updatePaymentType(@PathParam("paymentTypeId") @ApiParam(value = "paymentTypeId") final Long paymentTypeId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updatePaymentType(paymentTypeId).withJson(apiRequestBodyAsJson) .build(); @@ -126,7 +130,9 @@ public class PaymentTypeApiResource { @Path("{paymentTypeId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String deleteCode(@PathParam("paymentTypeId") final Long paymentTypeId) { + @ApiOperation(value = "Delete a Payment Type", httpMethod = "DELETE", notes = "Deletes payment type") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = PaymentTypeApiResourceSwagger.DeletePaymentTypesPaymentTypeIdResponse.class)}) + public String deleteCode(@PathParam("paymentTypeId") @ApiParam(value = "paymentTypeId") final Long paymentTypeId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deletePaymentType(paymentTypeId).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/paymenttype/api/PaymentTypeApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/paymenttype/api/PaymentTypeApiResourceSwagger.java new file mode 100644 index 000000000..71ba65345 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/paymenttype/api/PaymentTypeApiResourceSwagger.java @@ -0,0 +1,121 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.paymenttype.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * Created by Chirag Gupta on 01/01/18. + */ +final class PaymentTypeApiResourceSwagger { + private PaymentTypeApiResourceSwagger() { + } + + @ApiModel(value = "GetPaymentTypesResponse") + public final static class GetPaymentTypesResponse { + private GetPaymentTypesResponse() { + } + + @ApiModelProperty(example = "24") + public Integer id; + @ApiModelProperty(example = "PTC") + public String name; + @ApiModelProperty(example = "Cash") + public String description; + @ApiModelProperty(example = "true") + public Boolean isCashPayment; + @ApiModelProperty(example = "0") + public Integer position; + } + + @ApiModel(value = "GetPaymentTypesPaymentTypeIdResponse") + public final static class GetPaymentTypesPaymentTypeIdResponse { + private GetPaymentTypesPaymentTypeIdResponse() { + } + + @ApiModelProperty(example = "13") + public Integer id; + @ApiModelProperty(example = "cash") + public String name; + @ApiModelProperty(example = "cash Payment") + public String description; + @ApiModelProperty(example = "true") + public Boolean isCashPayment; + @ApiModelProperty(example = "1") + public Integer position; + } + + @ApiModel(value = "PostPaymentTypesRequest") + public final static class PostPaymentTypesRequest { + private PostPaymentTypesRequest() { + } + + @ApiModelProperty(example = "cash") + public String name; + @ApiModelProperty(example = "cash payment type") + public String description; + @ApiModelProperty(example = "true") + public Boolean isCashPayment; + @ApiModelProperty(example = "1") + public Integer position; + } + + @ApiModel(value = "PostPaymentTypesResponse") + public final static class PostPaymentTypesResponse { + private PostPaymentTypesResponse() { + } + + @ApiModelProperty(example = "1") + public Integer resourceId; + } + + @ApiModel(value = "PutPaymentTypesPaymentTypeIdRequest") + public final static class PutPaymentTypesPaymentTypeIdRequest { + private PutPaymentTypesPaymentTypeIdRequest() { + } + + @ApiModelProperty(example = "mPay") + public String name; + @ApiModelProperty(example = "not a cash payment type") + public String description; + @ApiModelProperty(example = "false") + public Boolean isCashPayment; + @ApiModelProperty(example = "3") + public Integer position; + } + + @ApiModel(value = "PutPaymentTypesPaymentTypeIdResponse") + public final static class PutPaymentTypesPaymentTypeIdResponse { + private PutPaymentTypesPaymentTypeIdResponse() { + } + + @ApiModelProperty(example = "13") + public Integer resourceId; + } + + @ApiModel(value = "DeletePaymentTypesPaymentTypeIdResponse") + public final static class DeletePaymentTypesPaymentTypeIdResponse { + private DeletePaymentTypesPaymentTypeIdResponse() { + } + + @ApiModelProperty(example = "13") + public Integer resourceId; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/products/api/ProductsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/products/api/ProductsApiResource.java index a94a1467b..62804507e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/products/api/ProductsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/products/api/ProductsApiResource.java @@ -18,18 +18,7 @@ */ package org.apache.fineract.portfolio.products.api; -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - +import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -49,9 +38,15 @@ import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; + @Path("/products/{type}") @Component @Scope("singleton") +@Api(value = "Products", description = "") public class ProductsApiResource { private final ApplicationContext applicationContext; @@ -75,7 +70,7 @@ public class ProductsApiResource { @Path("template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveTemplate(@PathParam("type") final String productType, @Context final UriInfo uriInfo) { + public String retrieveTemplate(@PathParam("type") @ApiParam(value = "type") final String productType, @Context final UriInfo uriInfo) { String serviceName = productType + ProductsApiConstants.READPLATFORM_NAME; try { ProductReadPlatformService service = (ProductReadPlatformService) this.applicationContext.getBean(serviceName); @@ -91,7 +86,9 @@ public class ProductsApiResource { @Path("{productId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveProduct(@PathParam("productId") final Long productId, @PathParam("type") final String productType, + @ApiOperation(value = "Retrieve a Share Product", httpMethod = "GET", notes = "Retrieves a Share Product\n\n" + "Example Requests:\n" + "\n" + "products/share/1\n" + "\n" + "\n" + "products/share/1?template=true") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ProductsApiResourceSwagger.GetProductsTypeProductIdResponse.class)}) + public String retrieveProduct(@PathParam("productId") @ApiParam(value = "productId") final Long productId, @PathParam("type") @ApiParam(value = "type") final String productType, @Context final UriInfo uriInfo) { try { String serviceName = productType + ProductsApiConstants.READPLATFORM_NAME; @@ -107,7 +104,9 @@ public class ProductsApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveAllProducts(@PathParam("type") final String productType, @QueryParam("offset") final Integer offset, @QueryParam("limit") final Integer limit, + @ApiOperation(value = "List Share Products", httpMethod = "GET", notes = "Lists Share Products\n\n" + "Mandatory Fields: limit, offset\n\n" + "Example Requests:\n" + "\n" + "shareproducts") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ProductsApiResourceSwagger.GetProductsTypeResponse.class)}) + public String retrieveAllProducts(@PathParam("type") @ApiParam(value = "type") final String productType, @QueryParam("offset") @ApiParam(value = "offset") final Integer offset, @QueryParam("limit") @ApiParam(value = "limit") final Integer limit, @Context final UriInfo uriInfo) { try { String serviceName = productType + ProductsApiConstants.READPLATFORM_NAME; @@ -123,7 +122,10 @@ public class ProductsApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String createProduct(@PathParam("type") final String productType, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Create a Share Product", httpMethod = "POST", notes = "Creates a Share Product\n\n" + "Mandatory Fields: name, shortName, description, currencyCode, digitsAfterDecimal,inMultiplesOf, locale, totalShares, unitPrice, nominalShares,allowDividendCalculationForInactiveClients,accountingRule\n\n" + "Mandatory Fields for Cash based accounting (accountingRule = 2): shareReferenceId, shareSuspenseId, shareEquityId, incomeFromFeeAccountId\n\n" + "Optional Fields: sharesIssued, minimumShares, maximumShares, minimumActivePeriodForDividends, minimumactiveperiodFrequencyType, lockinPeriodFrequency, lockinPeriodFrequencyType, marketPricePeriods, chargesSelected") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = ProductsApiResourceSwagger.PostProductsTypeRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ProductsApiResourceSwagger.PostProductsTypeResponse.class)}) + public String createProduct(@PathParam("type") @ApiParam(value = "type") final String productType, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { CommandWrapper commandWrapper = null; this.platformSecurityContext.authenticatedUser(); commandWrapper = new CommandWrapperBuilder().createProduct(productType).withJson(apiRequestBodyAsJson).build(); @@ -135,8 +137,8 @@ public class ProductsApiResource { @Path("{productId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String handleCommands(@PathParam("type") final String productType, @PathParam("productId") final Long productId, - @QueryParam("command") final String commandParam, @SuppressWarnings("unused") @Context final UriInfo uriInfo, final String apiRequestBodyAsJson) { + public String handleCommands(@PathParam("type") @ApiParam(value = "type") final String productType, @PathParam("productId") @ApiParam(value = "productId") final Long productId, + @QueryParam("command") @ApiParam(value = "command") final String commandParam, @SuppressWarnings("unused") @Context final UriInfo uriInfo, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { CommandWrapper commandWrapper = new CommandWrapperBuilder().createProductCommand(productType, commandParam, productId) .withJson(apiRequestBodyAsJson).build(); final CommandProcessingResult commandProcessingResult = this.commandsSourceWritePlatformService.logCommandSource(commandWrapper); @@ -147,8 +149,11 @@ public class ProductsApiResource { @Path("{productId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String updateProduct(@PathParam("type") final String productType, @PathParam("productId") final Long productId, - final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update a Share Product", httpMethod = "PUT", notes = "Updates a Share Product") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = ProductsApiResourceSwagger.PutProductsTypeProductIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ProductsApiResourceSwagger.PutProductsTypeProductIdResponse.class)}) + public String updateProduct(@PathParam("type") @ApiParam(value = "type")final String productType, @PathParam("productId") @ApiParam(value = "productId")final Long productId, + @ApiParam(hidden = true) final String apiRequestBodyAsJson) { this.platformSecurityContext.authenticatedUser(); final CommandWrapper commandRequest = new CommandWrapperBuilder().updateProduct(productType, productId) .withJson(apiRequestBodyAsJson).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/products/api/ProductsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/products/api/ProductsApiResourceSwagger.java new file mode 100644 index 000000000..6d833a3a4 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/products/api/ProductsApiResourceSwagger.java @@ -0,0 +1,597 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.products.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.Set; + +/** + * Created by Chirag Gupta on 01/01/18. + */ +final class ProductsApiResourceSwagger { + private ProductsApiResourceSwagger() { + } + + @ApiModel(value = "GetProductsTypeProductIdResponse") + public final static class GetProductsTypeProductIdResponse { + private GetProductsTypeProductIdResponse() { + } + + final class GetProductsCurrency { + private GetProductsCurrency() { + } + + @ApiModelProperty(example = "USD") + public String code; + @ApiModelProperty(example = "US Dollar") + public String name; + @ApiModelProperty(example = "2") + public Integer decimalPlaces; + @ApiModelProperty(example = "100") + public Integer inMultiplesOf; + @ApiModelProperty(example = "$") + public String displaySymbol; + @ApiModelProperty(example = "currency.USD") + public String nameCode; + @ApiModelProperty(example = "US Dollar ($)") + public String displayLabel; + } + + final class GetProductsMarketPrice { + private GetProductsMarketPrice() { + } + + @ApiModelProperty(example = "4") + public Integer id; + @ApiModelProperty(example = "Feb 1, 2016") + public String fromDate; + @ApiModelProperty(example = "1") + public Integer shareValue; + } + + final class GetProductsCharges { + private GetProductsCharges() { + } + + final class GetChargesCurrency { + private GetChargesCurrency() { + } + + @ApiModelProperty(example = "USD") + public String code; + @ApiModelProperty(example = "US Dollar") + public String name; + @ApiModelProperty(example = "2") + public Integer decimalPlaces; + @ApiModelProperty(example = "$") + public String displaySymbol; + @ApiModelProperty(example = "currency.USD") + public String nameCode; + @ApiModelProperty(example = "US Dollar ($)") + public String displayLabel; + } + + final class GetChargeTimeType { + private GetChargeTimeType() { + } + + @ApiModelProperty(example = "13") + public Integer id; + @ApiModelProperty(example = "chargeTimeType.activation") + public String code; + @ApiModelProperty(example = "Share Account Activate") + public String value; + } + + final class GetChargeAppliesTo { + private GetChargeAppliesTo() { + } + + @ApiModelProperty(example = "4") + public Integer id; + @ApiModelProperty(example = "chargeAppliesTo.shares") + public String code; + @ApiModelProperty(example = "Shares") + public String value; + } + + final class GetChargeCalculationType { + private GetChargeCalculationType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "chargeCalculationType.flat") + public String code; + @ApiModelProperty(example = "Flat") + public String value; + } + + final class GetChargePaymentMode { + private GetChargePaymentMode() { + } + + @ApiModelProperty(example = "0") + public Integer id; + @ApiModelProperty(example = "chargepaymentmode.regular") + public String code; + @ApiModelProperty(example = "Regular") + public String value; + } + + @ApiModelProperty(example = "20") + public Integer id; + @ApiModelProperty(example = "Share Account Activation Flat") + public String name; + @ApiModelProperty(example = "true") + public Boolean active; + @ApiModelProperty(example = "false") + public Boolean penalty; + public GetChargesCurrency currency; + @ApiModelProperty(example = "1") + public Integer amount; + public GetChargeTimeType chargeTimeType; + public GetChargeAppliesTo chargeAppliesTo; + public GetChargeCalculationType chargeCalculationType; + public GetChargePaymentMode chargePaymentMode; + } + + final class GetLockPeriodTypeEnum { + private GetLockPeriodTypeEnum() { + } + + @ApiModelProperty(example = "0") + public Integer id; + @ApiModelProperty(example = "Days") + public String value; + } + + final class GetProductsAccountingRule { + private GetProductsAccountingRule() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "accountingRuleType.cash") + public String code; + @ApiModelProperty(example = "CASH BASED") + public String value; + } + + final class GetProductsAccountingMappings { + private GetProductsAccountingMappings() { + } + + final class GetShareReferenceId { + private GetShareReferenceId() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "ACCOUNT_NAME_1FJBQ") + public String name; + @ApiModelProperty(example = "ASSET_ED1461237837829") + public String glCode; + } + + final class GetIncomeFromFeeAccountId { + private GetIncomeFromFeeAccountId() { + } + + @ApiModelProperty(example = "14") + public Integer id; + @ApiModelProperty(example = "ACCOUNT_NAME_1FJBQ") + public String name; + @ApiModelProperty(example = "INCOME_OY1461237869836") + public String glCode; + } + + final class GetShareEquityId { + private GetShareEquityId() { + } + + @ApiModelProperty(example = "66") + public Integer id; + @ApiModelProperty(example = "Equity Account") + public String name; + @ApiModelProperty(example = "EQUITY1") + public String glCode; + } + + final class GetShareSuspenseId { + private GetShareSuspenseId() { + } + + @ApiModelProperty(example = "8") + public Integer id; + @ApiModelProperty(example = "ACCOUNT_NAME_1FJBQ") + public String name; + @ApiModelProperty(example = "LIABILITY_MA1461237860198") + public String glCode; + } + + public GetShareReferenceId shareReferenceId; + public GetIncomeFromFeeAccountId incomeFromFeeAccountId; + public GetShareEquityId shareEquityId; + public GetShareSuspenseId shareSuspenseId; + } + + final class GetProductsMinimumActivePeriodFrequencyTypeOptions { + private GetProductsMinimumActivePeriodFrequencyTypeOptions() { + } + + @ApiModelProperty(example = "0") + public Integer id; + @ApiModelProperty(example = "savings.lockin.sharePeriodFrequencyType.days") + public String code; + @ApiModelProperty(example = "Days") + public String value; + } + + final class GetProductsAccountingMappingOptions { + private GetProductsAccountingMappingOptions() { + } + + final class GetProductsLiabilityAccountOptions { + private GetProductsLiabilityAccountOptions() { + } + + final class GetProductsLiabilityType { + private GetProductsLiabilityType() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "accountType.liability") + public String code; + @ApiModelProperty(example = "LIABILITY") + public String value; + } + + final class GetProductsLiabilityUsage { + private GetProductsLiabilityUsage() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "accountUsage.detail") + public String code; + @ApiModelProperty(example = "DETAIL") + public String value; + } + + final class GetProductsTagId { + private GetProductsTagId() { + } + + @ApiModelProperty(example = "0") + public Integer id; + @ApiModelProperty(example = "false") + public Boolean isActive; + } + + @ApiModelProperty(example = "4") + public Integer id; + @ApiModelProperty(example = "ACCOUNT_NAME_1FJBQ") + public String name; + @ApiModelProperty(example = "LIABILITY_2T1461237838897") + public String glCode; + @ApiModelProperty(example = "false") + public Boolean disabled; + @ApiModelProperty(example = "true") + public Boolean manualEntriesAllowed; + public GetProductsLiabilityType type; + public GetProductsLiabilityUsage usage; + @ApiModelProperty(example = "DEFAULT_DESCRIPTION") + public String description; + @ApiModelProperty(example = "ACCOUNT_NAME_1FJBQ") + public String nameDecorated; + public GetProductsTagId tagId; + } + + final class GetProductsAssetAccountOptions { + private GetProductsAssetAccountOptions() { + } + + final class GetAssetType { + private GetAssetType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "accountType.asset") + public String code; + @ApiModelProperty(example = "ASSET") + public String value; + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "ACCOUNT_NAME_1FJBQ") + public String name; + @ApiModelProperty(example = "ASSET_ED1461237837829") + public String glCode; + @ApiModelProperty(example = "false") + public Boolean disabled; + @ApiModelProperty(example = "true") + public Boolean manualEntriesAllowed; + public GetAssetType type; + public GetProductsLiabilityAccountOptions.GetProductsLiabilityUsage usage; + @ApiModelProperty(example = "DEFAULT_DESCRIPTION") + public String description; + @ApiModelProperty(example = "ACCOUNT_NAME_1FJBQ") + public String nameDecorated; + public GetProductsLiabilityAccountOptions.GetProductsTagId tagId; + } + + final class GetProductsIncomeAccountOptions { + private GetProductsIncomeAccountOptions() { + } + + final class GetIncomeType { + private GetIncomeType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "accountType.income") + public String code; + @ApiModelProperty(example = "INCOME") + public String value; + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "ACCOUNT_NAME_1FJBQ") + public String name; + @ApiModelProperty(example = "INCOME_9O1461237838422") + public String glCode; + @ApiModelProperty(example = "false") + public Boolean disabled; + @ApiModelProperty(example = "true") + public Boolean manualEntriesAllowed; + public GetIncomeType type; + public GetProductsLiabilityAccountOptions.GetProductsLiabilityUsage usage; + @ApiModelProperty(example = "DEFAULT_DESCRIPTION") + public String description; + @ApiModelProperty(example = "ACCOUNT_NAME_1FJBQ") + public String nameDecorated; + public GetProductsLiabilityAccountOptions.GetProductsTagId tagId; + } + + final class GetProductsEquityAccountOptions { + private GetProductsEquityAccountOptions() { + } + + final class GetEquityType { + private GetEquityType() { + } + + @ApiModelProperty(example = "3") + public Integer id; + @ApiModelProperty(example = "accountType.equity") + public String code; + @ApiModelProperty(example = "EQUITY") + public String value; + } + + @ApiModelProperty(example = "66") + public Integer id; + @ApiModelProperty(example = "Equity Account") + public String name; + @ApiModelProperty(example = "EQUITY1") + public String glCode; + @ApiModelProperty(example = "false") + public Boolean disabled; + @ApiModelProperty(example = "true") + public Boolean manualEntriesAllowed; + public GetEquityType type; + public GetProductsLiabilityAccountOptions.GetProductsLiabilityUsage usage; + @ApiModelProperty(example = "Equity Account") + public String nameDecorated; + public GetProductsLiabilityAccountOptions.GetProductsTagId tagId; + } + + public Set liabilityAccountOptions; + public Set assetAccountOptions; + public Set incomeAccountOptions; + public Set equityAccountOptions; + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "Share Product") + public String name; + @ApiModelProperty(example = "SP") + public String shortName; + @ApiModelProperty(example = "SP") + public String description; + public GetProductsCurrency currency; + @ApiModelProperty(example = "100") + public Integer totalShares; + @ApiModelProperty(example = "50") + public Integer totalSharesIssued; + @ApiModelProperty(example = "1") + public Integer unitPrice; + @ApiModelProperty(example = "50") + public Integer shareCapital; + @ApiModelProperty(example = "1") + public Integer minimumShares; + @ApiModelProperty(example = "10") + public Integer nominalShares; + @ApiModelProperty(example = "50") + public Integer maximumShares; + public Set marketPrice; + public Set charges; + @ApiModelProperty(example = "true") + public Boolean allowDividendCalculationForInactiveClients; + @ApiModelProperty(example = "1") + public Integer lockinPeriod; + public GetLockPeriodTypeEnum lockPeriodTypeEnum; + @ApiModelProperty(example = "1") + public Integer minimumActivePeriod; + public GetLockPeriodTypeEnum minimumActivePeriodForDividendsTypeEnum; + public GetProductsAccountingRule accountingRule; + public GetProductsAccountingMappings accountingMappings; + public Set currencyOptions; + public Set chargeOptions; + public Set minimumActivePeriodFrequencyTypeOptions; + public Set lockinPeriodFrequencyTypeOptions; + public GetProductsAccountingMappingOptions accountingMappingOptions; + } + + @ApiModel(value = "GetProductsTypeResponse") + public static final class GetProductsTypeResponse { + private GetProductsTypeResponse() { + } + + final class GetProductsPageItems { + private GetProductsPageItems() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "Share Product") + public String name; + @ApiModelProperty(example = "Share Product Description") + public String shortName; + @ApiModelProperty(example = "100") + public Integer totalShares; + } + + @ApiModelProperty(example = "1") + public Integer totalFilteredRecords; + public Set pageItems; + } + + @ApiModel(value = "PostProductsTypeRequest") + public final static class PostProductsTypeRequest { + private PostProductsTypeRequest() { + } + + final class PostProductsMarketPricePeriods { + private PostProductsMarketPricePeriods() { + } + + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "04 May 2016") + public String fromDate; + @ApiModelProperty(example = "2") + public Integer shareValue; + } + + final class PostProductsChargesSelected { + private PostProductsChargesSelected() { + } + + @ApiModelProperty(example = "20") + public Integer id; + } + + @ApiModelProperty(example = "Share Product") + public String name; + @ApiModelProperty(example = "SP") + public String shortName; + @ApiModelProperty(example = "Description") + public String description; + @ApiModelProperty(example = "USD") + public String currencyCode; + @ApiModelProperty(example = "2") + public Integer digitsAfterDecimal; + @ApiModelProperty(example = "1") + public Integer inMultiplesOf; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "1000") + public Integer totalShares; + @ApiModelProperty(example = "1000") + public Integer sharesIssued; + @ApiModelProperty(example = "1") + public Integer unitPrice; + @ApiModelProperty(example = "10") + public Integer minimumShares; + @ApiModelProperty(example = "20") + public Integer nominalShares; + @ApiModelProperty(example = "30") + public Integer maximumShares; + @ApiModelProperty(example = "1") + public Integer minimumActivePeriodForDividends; + @ApiModelProperty(example = "0") + public Integer minimumactiveperiodFrequencyType; + @ApiModelProperty(example = "1") + public Integer lockinPeriodFrequency; + @ApiModelProperty(example = "1") + public Integer lockinPeriodFrequencyType; + @ApiModelProperty(example = "true") + public Boolean allowDividendCalculationForInactiveClients; + public Set marketPricePeriods; + public Set chargesSelected; + @ApiModelProperty(example = "1") + public Integer accountingRule; + } + + @ApiModel(value = "PostProductsTypeResponse") + public final static class PostProductsTypeResponse { + private PostProductsTypeResponse() { + } + + @ApiModelProperty(example = "1") + public Integer resourceId; + } + + @ApiModel(value = "PutProductsTypeProductIdRequest") + public final static class PutProductsTypeProductIdRequest { + private PutProductsTypeProductIdRequest() { + } + + @ApiModelProperty(example = "Share Product Description.") + public String description; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "5.0") + public Double unitPrice; + } + + @ApiModel(value = "PutProductsTypeProductIdResponse") + public final static class PutProductsTypeProductIdResponse { + private PutProductsTypeProductIdResponse() { + } + + final class PutProductsChanges { + private PutProductsChanges() { + } + + @ApiModelProperty(example = "Share Product Description.") + public String description; + @ApiModelProperty(example = "5.0") + public Double unitPrice; + @ApiModelProperty(example = "en") + public String locale; + } + + @ApiModelProperty(example = "1") + public Integer resourceId; + public PutProductsChanges changes; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositAccountsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositAccountsApiResource.java index 49cba4fe5..48eeb6b42 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositAccountsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositAccountsApiResource.java @@ -18,26 +18,8 @@ */ package org.apache.fineract.portfolio.savings.api; -import java.math.BigDecimal; -import java.util.Arrays; -import java.util.Collection; -import java.util.HashSet; -import java.util.Set; - -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.DefaultValue; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - +import com.google.gson.JsonElement; +import io.swagger.annotations.*; import org.apache.commons.lang.StringUtils; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; @@ -70,11 +52,20 @@ import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; -import com.google.gson.JsonElement; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; +import java.math.BigDecimal; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; @Path("/fixeddepositaccounts") @Component @Scope("singleton") +@Api(value = "Fixed Deposit Account", description = "Fixed Deposit accounts are instances of a praticular fixed deposit product created. An application process around the creation of accounts is also supported.") public class FixedDepositAccountsApiResource { private final DepositAccountReadPlatformService depositAccountReadPlatformService; @@ -110,10 +101,12 @@ public class FixedDepositAccountsApiResource { @Path("template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String template(@QueryParam("clientId") final Long clientId, @QueryParam("groupId") final Long groupId, - @QueryParam("productId") final Long productId, - @DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") final boolean staffInSelectedOfficeOnly, - @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve Fixed Deposit Account Template", httpMethod = "GET", notes = "This is a convenience resource. It can be useful when building maintenance user interface screens for fixed deposit applications. The template data returned consists of any or all of:\n\n" + "\n\n" + "Field Defaults\n\n" + "Allowed Value Lists" + "Example Requests:\n\n" + "\n\n" + "fixeddepositaccounts/template?clientId=1") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = FixedDepositAccountsApiResourceSwagger.GetFixedDepositAccountsTemplateResponse.class)}) + public String template(@QueryParam("clientId") @ApiParam(value = "clientId") final Long clientId, @QueryParam("groupId") @ApiParam(value = "groupId") final Long groupId, + @QueryParam("productId")@ApiParam(value = "productId") final Long productId, + @DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") @ApiParam(value = "staffInSelectedOfficeOnly") final boolean staffInSelectedOfficeOnly, + @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(DepositsApiConstants.FIXED_DEPOSIT_ACCOUNT_RESOURCE_NAME); @@ -127,9 +120,11 @@ public class FixedDepositAccountsApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveAll(@Context final UriInfo uriInfo, @QueryParam("paged") final Boolean paged, - @QueryParam("offset") final Integer offset, @QueryParam("limit") final Integer limit, - @QueryParam("orderBy") final String orderBy, @QueryParam("sortOrder") final String sortOrder) { + @ApiOperation(value = "List Fixed deposit applications/accounts", httpMethod = "GET", notes = "Lists Fixed Deposit Accounts\n\n" + "Example Requests:\n\n" + "\n\n" + "fixeddepositaccounts\n\n" + "\n\n" + "fixeddepositaccounts?fields=name") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = FixedDepositAccountsApiResourceSwagger.GetFixedDepositAccountsResponse.class, responseContainer = "List")}) + public String retrieveAll(@Context final UriInfo uriInfo, @QueryParam("paged") @ApiParam(value = "paged") final Boolean paged, + @QueryParam("offset") @ApiParam(value = "offset") final Integer offset, @QueryParam("limit") @ApiParam(value = "limit") final Integer limit, + @QueryParam("orderBy") @ApiParam(value = "orderBy") final String orderBy, @QueryParam("sortOrder") @ApiParam(value = "sortOrder") final String sortOrder) { this.context.authenticatedUser().validateHasReadPermission(DepositsApiConstants.FIXED_DEPOSIT_ACCOUNT_RESOURCE_NAME); final PaginationParameters paginationParameters = PaginationParameters.instance(paged, offset, limit, orderBy, sortOrder); @@ -151,7 +146,10 @@ public class FixedDepositAccountsApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String submitApplication(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Submit new fixed deposit application", httpMethod = "POST", notes = "Submits a new fixed deposit application"+"Mandatory Fields: clientId or groupId, productId, submittedOnDate, depositAmount, depositPeriod, depositPeriodFrequencyId\n\n" + "Optional Fields: accountNo, externalId, fieldOfficerId,linkAccountId(if provided initial deposit amount will be collected from this account),transferInterestToSavings(By enabling this flag all interest postings will be transferred to linked saving account )") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = FixedDepositAccountsApiResourceSwagger.PostFixedDepositAccountsRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = FixedDepositAccountsApiResourceSwagger.PostFixedDepositAccountsResponse.class)}) + public String submitApplication(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createFixedDepositAccount().withJson(apiRequestBodyAsJson) .build(); @@ -165,9 +163,11 @@ public class FixedDepositAccountsApiResource { @Path("{accountId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveOne(@PathParam("accountId") final Long accountId, - @DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") final boolean staffInSelectedOfficeOnly, - @DefaultValue("all") @QueryParam("chargeStatus") final String chargeStatus, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve a fixed deposit application/account", httpMethod = "GET", notes = "Retrieves a fixed deposit application/account\n\n" + "Example Requests :\n\n" + "\n\n" + "fixeddepositaccounts/1" + "\n\n" + "fixeddepositaccounts/1?associations=all" ) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = FixedDepositAccountsApiResourceSwagger.GetFixedDepositAccountsAccountIdResponse.class)}) + public String retrieveOne(@PathParam("accountId") @ApiParam(value = "accountId") final Long accountId, + @DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") @ApiParam(value = "staffInSelectedOfficeOnly") final boolean staffInSelectedOfficeOnly, + @DefaultValue("all") @QueryParam("chargeStatus")@ApiParam(value = "chargeStatus") final String chargeStatus, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(DepositsApiConstants.FIXED_DEPOSIT_ACCOUNT_RESOURCE_NAME); @@ -254,7 +254,10 @@ public class FixedDepositAccountsApiResource { @Path("{accountId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String update(@PathParam("accountId") final Long accountId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Modify a fixed deposit application", httpMethod = "PUT", notes = "Fixed deposit application can only be modified when in 'Submitted and pending approval' state. Once the application is approved, the details cannot be changed using this method. Specific api endpoints will be created to allow change of interest detail such as rate, compounding period, posting period etc") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = FixedDepositAccountsApiResourceSwagger.PutFixedDepositAccountsAccountIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = FixedDepositAccountsApiResourceSwagger.PutFixedDepositAccountsAccountIdResponse.class)}) + public String update(@PathParam("accountId") @ApiParam(value = "accountId") final Long accountId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateFixedDepositAccount(accountId) .withJson(apiRequestBodyAsJson).build(); @@ -268,8 +271,11 @@ public class FixedDepositAccountsApiResource { @Path("{accountId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String handleCommands(@PathParam("accountId") final Long accountId, @QueryParam("command") final String commandParam, - @Context final UriInfo uriInfo, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Approve fixed deposit application | Undo approval fixed deposit application | Reject fixed deposit application | Withdraw fixed deposit application | Activate a fixed deposit account | Close a fixed deposit account | Premature Close a fixed deposit account | Calculate Premature amount on Fixed deposit account | Calculate Interest on Fixed Deposit Account | Post Interest on Fixed Deposit Account", httpMethod = "POST", notes = "Approve fixed deposit application:\n\n" + "Approves fixed deposit application so long as its in 'Submitted and pending approval' state.\n\n" + "Undo approval fixed deposit application:\n\n" + "Will move 'approved' fixed deposit application back to 'Submitted and pending approval' state.\n\n" + "Reject fixed deposit application:\n\n" + "Rejects fixed deposit application so long as its in 'Submitted and pending approval' state.\n\n" + "Withdraw fixed deposit application:\n\n" + "Used when an applicant withdraws from the fixed deposit application. It must be in 'Submitted and pending approval' state.\n\n" + "Close a fixed deposit account:\n\n" + "Results in a Matured fixed deposit account being converted into a 'closed' fixed deposit account.\n\n" + "Premature Close a fixed deposit account:\n\n" + "Results in an Active fixed deposit account being converted into a 'Premature Closed' fixed deposit account with options to withdraw prematured amount. (premature amount is calculated using interest rate chart applicable along with penal interest if any.)\n\n" + "Calculate Premature amount on Fixed deposit account:\n\n" + "Calculate premature amount on fixed deposit account till premature close date. Premature amount is calculated based on interest chart and penal interest applicable.\n\n" + "Calculate Interest on Fixed Deposit Account:\n\n" + "Calculates interest earned on a fixed deposit account based on todays date. It does not attempt to post or credit the interest on the account. That is responsibility of the Post Interest API that will likely be called by overnight process.\n\n" + "Post Interest on Fixed Deposit Account:\n\n" + "Calculates and Posts interest earned on a fixed deposit account based on today's date and whether an interest posting or crediting event is due.\n\n" + "Showing request/response for Calculate Interest on Fixed Deposit Account") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = FixedDepositAccountsApiResourceSwagger.PostFixedDepositAccountsAccountIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = FixedDepositAccountsApiResourceSwagger.PostFixedDepositAccountsAccountIdResponse.class)}) + public String handleCommands(@PathParam("accountId") @ApiParam(value = "accountId") final Long accountId, @QueryParam("command") @ApiParam(value = "command") final String commandParam, + @Context final UriInfo uriInfo, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { String jsonApiRequest = apiRequestBodyAsJson; if (StringUtils.isBlank(jsonApiRequest)) { @@ -331,7 +337,9 @@ public class FixedDepositAccountsApiResource { @Path("{accountId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String delete(@PathParam("accountId") final Long accountId) { + @ApiOperation(value = "Delete a fixed deposit application", httpMethod = "DELETE", notes = "At present we support hard delete of fixed deposit application so long as its in 'Submitted and pending approval' state. One the application is moves past this state, it is not possible to do a 'hard' delete of the application or the account. An API endpoint will be added to close/de-activate the fixed deposit account.") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = FixedDepositAccountsApiResourceSwagger.DeleteFixedDepositAccountsAccountIdResponse.class)}) + public String delete(@PathParam("accountId") @ApiParam(value = "accountId") final Long accountId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteFixedDepositAccount(accountId).build(); @@ -344,7 +352,7 @@ public class FixedDepositAccountsApiResource { @Path("{accountId}/template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String accountClosureTemplate(@PathParam("accountId") final Long accountId, @QueryParam("command") final String commandParam, + public String accountClosureTemplate(@PathParam("accountId") @ApiParam(value = "accountId") final Long accountId, @QueryParam("command") @ApiParam(value = "command") final String commandParam, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(DepositsApiConstants.FIXED_DEPOSIT_ACCOUNT_RESOURCE_NAME); @@ -356,4 +364,4 @@ public class FixedDepositAccountsApiResource { final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters()); return this.toApiJsonSerializer.serialize(settings, account, DepositsApiConstants.FIXED_DEPOSIT_ACCOUNT_RESPONSE_DATA_PARAMETERS); } -} \ No newline at end of file +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositAccountsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositAccountsApiResourceSwagger.java new file mode 100644 index 000000000..41567ca82 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositAccountsApiResourceSwagger.java @@ -0,0 +1,523 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.savings.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.time.LocalDate; +import java.util.Set; + +/** + * Created by Chirag Gupta on 12/15/17. + */ +final class FixedDepositAccountsApiResourceSwagger { + private FixedDepositAccountsApiResourceSwagger() { + } + + @ApiModel(value = "GetFixedDepositAccountsTemplateResponse") + public final static class GetFixedDepositAccountsTemplateResponse { + private GetFixedDepositAccountsTemplateResponse() { + } + + final class GetFixedDepositAccountsProductOptions { + private GetFixedDepositAccountsProductOptions() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "Passbook Savings") + public String name; + } + + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "small business") + public String clientName; + public Set productOptions; + } + + @ApiModel(value = "GetFixedDepositAccountsResponse") + public final static class GetFixedDepositAccountsResponse { + private GetFixedDepositAccountsResponse() { + } + + final class GetFixedDepositAccountsStatus { + private GetFixedDepositAccountsStatus() { + } + + @ApiModelProperty(example = "100") + public Integer id; + @ApiModelProperty(example = "savingsAccountStatusType.submitted.and.pending.approval") + public String code; + @ApiModelProperty(example = "Submitted and pending approval") + public String value; + @ApiModelProperty(example = "true") + public Boolean submittedAndPendingApproval; + @ApiModelProperty(example = "false") + public Boolean approved; + @ApiModelProperty(example = "false") + public Boolean rejected; + @ApiModelProperty(example = "false") + public Boolean withdrawnByApplicant; + @ApiModelProperty(example = "false") + public Boolean active; + @ApiModelProperty(example = "false") + public Boolean closed; + @ApiModelProperty(example = "false") + public Boolean prematureClosed; + @ApiModelProperty(example = "false") + public Boolean transferInProgress; + @ApiModelProperty(example = "false") + public Boolean transferOnHold; + } + + final class GetFixedDepositAccountsTimeline { + private GetFixedDepositAccountsTimeline() { + } + + @ApiModelProperty(example = "[2014, 3, 1]") + public LocalDate submittedOnDate; + @ApiModelProperty(example = "mifos") + public String submittedByUsername; + @ApiModelProperty(example = "App") + public String submittedByFirstname; + @ApiModelProperty(example = "Administrator") + public String submittedByLastname; + } + + final class GetFixedDepositAccountsCurrency { + private GetFixedDepositAccountsCurrency() { + } + + @ApiModelProperty(example = "USD") + public String code; + @ApiModelProperty(example = "US Dollar") + public String name; + @ApiModelProperty(example = "2") + public Integer decimalPlaces; + @ApiModelProperty(example = "1") + public Integer inMultiplesOf; + @ApiModelProperty(example = "$") + public String displaySymbol; + @ApiModelProperty(example = "currency.USD") + public String nameCode; + @ApiModelProperty(example = "US Dollar ($)") + public String displayLabel; + } + + final class GetFixedDepositAccountsInterestCompoundingPeriodType { + private GetFixedDepositAccountsInterestCompoundingPeriodType() { + } + + @ApiModelProperty(example = "4") + public Integer id; + @ApiModelProperty(example = "savings.interest.period.savingsCompoundingInterestPeriodType.monthly") + public String code; + @ApiModelProperty(example = "Monthly") + public String value; + } + + final class GetFixedDepositAccountsInterestPostingPeriodType { + private GetFixedDepositAccountsInterestPostingPeriodType() { + } + + @ApiModelProperty(example = "4") + public Integer id; + @ApiModelProperty(example = "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly") + public String code; + @ApiModelProperty(example = "Monthly") + public String value; + } + + final class GetFixedDepositAccountsInterestCalculationType { + private GetFixedDepositAccountsInterestCalculationType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "savingsInterestCalculationType.dailybalance") + public String code; + @ApiModelProperty(example = "Daily Balance") + public String value; + } + + final class GetFixedDepositAccountsInterestCalculationDaysInYearType { + private GetFixedDepositAccountsInterestCalculationDaysInYearType() { + } + + @ApiModelProperty(example = "365") + public Integer id; + @ApiModelProperty(example = "savingsInterestCalculationDaysInYearType.days365") + public String code; + @ApiModelProperty(example = "365 Days") + public String value; + } + + final class GetFixedDepositAccountsSummary { + private GetFixedDepositAccountsSummary() { + } + + public GetFixedDepositAccountsCurrency currency; + @ApiModelProperty(example = "0") + public Float accountBalance; + } + + final class GetFixedDepositAccountsMinDepositTermType { + private GetFixedDepositAccountsMinDepositTermType() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "deposit.term.savingsPeriodFrequencyType.months") + public String code; + @ApiModelProperty(example = "Months") + public String value; + } + + final class GetFixedDepositAccountsMaxDepositTermType { + private GetFixedDepositAccountsMaxDepositTermType() { + } + + @ApiModelProperty(example = "3") + public Integer id; + @ApiModelProperty(example = "deposit.term.savingsPeriodFrequencyType.years") + public String code; + @ApiModelProperty(example = "Years") + public String value; + } + + final class GetFixedDepositAccountsDepositPeriodFrequency { + private GetFixedDepositAccountsDepositPeriodFrequency() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "deposit.period.savingsPeriodFrequencyType.months") + public String code; + @ApiModelProperty(example = "Months") + public String value; + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "000000001") + public Long accountNo; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "Sangamesh N") + public String clientName; + @ApiModelProperty(example = "3") + public Integer savingsProductId; + @ApiModelProperty(example = "FD01") + public String savingsProductName; + @ApiModelProperty(example = "0") + public Integer fieldOfficerId; + public GetFixedDepositAccountsStatus status; + public GetFixedDepositAccountsTimeline timeline; + public GetFixedDepositAccountsCurrency currency; + public GetFixedDepositAccountsInterestCompoundingPeriodType interestCompoundingPeriodType; + public GetFixedDepositAccountsInterestPostingPeriodType interestPostingPeriodType; + public GetFixedDepositAccountsInterestCalculationType interestCalculationType; + public GetFixedDepositAccountsInterestCalculationDaysInYearType interestCalculationDaysInYearType; + public GetFixedDepositAccountsSummary summary; + @ApiModelProperty(example = "false") + public Boolean interestFreePeriodApplicable; + @ApiModelProperty(example = "false") + public Boolean preClosurePenalApplicable; + @ApiModelProperty(example = "3") + public Integer minDepositTerm; + @ApiModelProperty(example = "4") + public Integer maxDepositTerm; + public GetFixedDepositAccountsMinDepositTermType minDepositTermType; + public GetFixedDepositAccountsMaxDepositTermType maxDepositTermType; + @ApiModelProperty(example = "5000") + public Float depositAmount; + @ApiModelProperty(example = "5140.25") + public Float maturityAmount; + @ApiModelProperty(example = "[2014, 9, 1]") + public LocalDate maturityDate; + @ApiModelProperty(example = "6") + public Integer depositPeriod; + public GetFixedDepositAccountsDepositPeriodFrequency depositPeriodFrequency; + } + + @ApiModel(value = "PostFixedDepositAccountsRequest") + public final static class PostFixedDepositAccountsRequest { + private PostFixedDepositAccountsRequest() { + } + + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "1") + public Integer productId; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "01 March 2014") + public String submittedOnDate; + @ApiModelProperty(example = "5000") + public Float depositAmount; + @ApiModelProperty(example = "6") + public Integer depositPeriod; + @ApiModelProperty(example = "2") + public Integer depositPeriodFrequencyId; + } + + @ApiModel(value = "PostFixedDepositAccountsResponse") + public final static class PostFixedDepositAccountsResponse { + private PostFixedDepositAccountsResponse() { + } + + @ApiModelProperty(example = "2") + public Integer officeId; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "1") + public Integer savingsId; + @ApiModelProperty(example = "1") + public Integer resourceId; + } + + @ApiModel(value = "GetFixedDepositAccountsAccountIdResponse") + public final static class GetFixedDepositAccountsAccountIdResponse { + private GetFixedDepositAccountsAccountIdResponse() { + } + + final class GetFixedDepositAccountsAccountChart { + private GetFixedDepositAccountsAccountChart() { + } + + final class GetFixedDepositAccountsChartSlabs { + private GetFixedDepositAccountsChartSlabs() { + } + + final class GetFixedDepositAccountsPeriodType { + private GetFixedDepositAccountsPeriodType() { + } + + @ApiModelProperty(example = "0") + public Integer id; + @ApiModelProperty(example = "interestChartPeriodType.days") + public String code; + @ApiModelProperty(example = "Days") + public String value; + } + + final class GetFixedDepositAccountsAccountChartCurrency { + private GetFixedDepositAccountsAccountChartCurrency() { + } + + @ApiModelProperty(example = "USD") + public String code; + @ApiModelProperty(example = "US Dollar") + public String name; + @ApiModelProperty(example = "2") + public Integer decimalPlaces; + @ApiModelProperty(example = "$") + public String displaySymbol; + @ApiModelProperty(example = "currency.USD") + public String nameCode; + @ApiModelProperty(example = "US Dollar ($)") + public String displayLabel; + } + + @ApiModelProperty(example = "13") + public Integer id; + public GetFixedDepositAccountsPeriodType periodType; + @ApiModelProperty(example = "181") + public Integer fromPeriod; + @ApiModelProperty(example = "365") + public Integer toPeriod; + @ApiModelProperty(example = "5.5") + public Double annualInterestRate; + public GetFixedDepositAccountsAccountChartCurrency currency; + } + + final class GetFixedDepositAccountsPeriodTypes { + private GetFixedDepositAccountsPeriodTypes() { + } + + @ApiModelProperty(example = "0") + public Integer id; + @ApiModelProperty(example = "interestChartPeriodType.days") + public String code; + @ApiModelProperty(example = "Days") + public String value; + } + + @ApiModelProperty(example = "4") + public Integer id; + @ApiModelProperty(example = "[2013, 10, 2]") + public LocalDate fromDate; + @ApiModelProperty(example = "5") + public Integer accountId; + @ApiModelProperty(example = "FD000023") + public Long accountNumber; + public Set chartSlabs; + public Set periodTypes; + } + + final class GetFixedDepositAccountsAccountIdCurrency { + private GetFixedDepositAccountsAccountIdCurrency() { + } + + @ApiModelProperty(example = "USD") + public String code; + @ApiModelProperty(example = "US Dollar") + public String name; + @ApiModelProperty(example = "2") + public Integer decimalPlaces; + @ApiModelProperty(example = "1") + public Integer inMultiplesOf; + @ApiModelProperty(example = "$") + public String displaySymbol; + @ApiModelProperty(example = "currency.USD") + public String nameCode; + @ApiModelProperty(example = "US Dollar ($)") + public String displayLabel; + } + + final class GetFixedDepositAccountsAccountIdSummary { + private GetFixedDepositAccountsAccountIdSummary() { + } + + public GetFixedDepositAccountsAccountIdCurrency currency; + @ApiModelProperty(example = "0") + public Float accountBalance; + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "FD000023") + public Long accountNo; + @ApiModelProperty(example = "FD-23") + public String externalId; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "Sangamesh N") + public String clientName; + @ApiModelProperty(example = "3") + public Integer savingsProductId; + @ApiModelProperty(example = "FD01") + public String savingsProductName; + @ApiModelProperty(example = "0") + public Integer fieldOfficerId; + public GetFixedDepositAccountsResponse.GetFixedDepositAccountsStatus status; + public GetFixedDepositAccountsResponse.GetFixedDepositAccountsTimeline timeline; + public GetFixedDepositAccountsAccountIdCurrency currency; + public GetFixedDepositAccountsResponse.GetFixedDepositAccountsInterestCompoundingPeriodType interestCompoundingPeriodType; + public GetFixedDepositAccountsResponse.GetFixedDepositAccountsInterestPostingPeriodType interestPostingPeriodType; + public GetFixedDepositAccountsResponse.GetFixedDepositAccountsInterestCalculationType interestCalculationType; + public GetFixedDepositAccountsResponse.GetFixedDepositAccountsInterestCalculationDaysInYearType interestCalculationDaysInYearType; + @ApiModelProperty(example = "false") + public Boolean interestFreePeriodApplicable; + @ApiModelProperty(example = "false") + public Boolean preClosurePenalApplicable; + @ApiModelProperty(example = "3") + public Integer minDepositTerm; + @ApiModelProperty(example = "4") + public Integer maxDepositTerm; + public GetFixedDepositAccountsResponse.GetFixedDepositAccountsMinDepositTermType minDepositTermType; + public GetFixedDepositAccountsResponse.GetFixedDepositAccountsMaxDepositTermType maxDepositTermType; + @ApiModelProperty(example = "5000") + public Float depositAmount; + @ApiModelProperty(example = "5140.25") + public Float maturityAmount; + @ApiModelProperty(example = "[2014, 9, 1]") + public LocalDate maturityDate; + @ApiModelProperty(example = "6") + public Integer depositPeriod; + public GetFixedDepositAccountsResponse.GetFixedDepositAccountsDepositPeriodFrequency depositPeriodFrequency; + public GetFixedDepositAccountsAccountIdSummary summary; + public GetFixedDepositAccountsAccountChart accountChart; + } + + @ApiModel(value = "PutFixedDepositAccountsAccountIdRequest") + public final static class PutFixedDepositAccountsAccountIdRequest { + private PutFixedDepositAccountsAccountIdRequest() { + } + + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "6000") + public Float depositAmount; + } + + @ApiModel(value = "PutFixedDepositAccountsAccountIdResponse") + public final static class PutFixedDepositAccountsAccountIdResponse { + private PutFixedDepositAccountsAccountIdResponse() { + } + + final class PutFixedDepositAccountsChanges { + private PutFixedDepositAccountsChanges() { + } + + @ApiModelProperty(example = "6000") + public Float depositAmount; + @ApiModelProperty(example = "en") + public String locale; + } + + @ApiModelProperty(example = "2") + public Integer officeId; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "1") + public Integer savingsId; + @ApiModelProperty(example = "1") + public Integer resourceId; + public PutFixedDepositAccountsChanges changes; + } + + @ApiModel(value = "PostFixedDepositAccountsAccountIdRequest") + public final static class PostFixedDepositAccountsAccountIdRequest { + private PostFixedDepositAccountsAccountIdRequest() { + } + } + + @ApiModel(value = "PostFixedDepositAccountsAccountIdResponse") + public final static class PostFixedDepositAccountsAccountIdResponse { + private PostFixedDepositAccountsAccountIdResponse() { + } + + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "1") + public Integer savingsId; + @ApiModelProperty(example = "1") + public Integer resourceId; + } + + @ApiModel(value = "DeleteFixedDepositAccountsAccountIdResponse") + public final static class DeleteFixedDepositAccountsAccountIdResponse { + private DeleteFixedDepositAccountsAccountIdResponse() { + } + + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "1") + public Integer resourceId; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositProductsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositProductsApiResource.java index 0648a13bc..cfd89e1d3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositProductsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositProductsApiResource.java @@ -18,23 +18,7 @@ */ package org.apache.fineract.portfolio.savings.api; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.Map; - -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - +import io.swagger.annotations.*; import org.apache.fineract.accounting.common.AccountingDropdownReadPlatformService; import org.apache.fineract.accounting.common.AccountingEnumerations; import org.apache.fineract.accounting.common.AccountingRuleType; @@ -60,12 +44,7 @@ import org.apache.fineract.portfolio.interestratechart.data.InterestRateChartDat import org.apache.fineract.portfolio.interestratechart.service.InterestRateChartReadPlatformService; import org.apache.fineract.portfolio.paymenttype.data.PaymentTypeData; import org.apache.fineract.portfolio.paymenttype.service.PaymentTypeReadPlatformService; -import org.apache.fineract.portfolio.savings.DepositAccountType; -import org.apache.fineract.portfolio.savings.DepositsApiConstants; -import org.apache.fineract.portfolio.savings.SavingsCompoundingInterestPeriodType; -import org.apache.fineract.portfolio.savings.SavingsInterestCalculationDaysInYearType; -import org.apache.fineract.portfolio.savings.SavingsInterestCalculationType; -import org.apache.fineract.portfolio.savings.SavingsPostingInterestPeriodType; +import org.apache.fineract.portfolio.savings.*; import org.apache.fineract.portfolio.savings.data.FixedDepositProductData; import org.apache.fineract.portfolio.savings.service.DepositProductReadPlatformService; import org.apache.fineract.portfolio.savings.service.DepositsDropdownReadPlatformService; @@ -78,9 +57,19 @@ import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Map; + @Path("/fixeddepositproducts") @Component @Scope("singleton") +@Api(value = "Fixed Deposit Product", description = "This is one of the advanced term deposit product offered by MFI's. The Fixed Deposit Products (aka FD) product offerings are modeled using this API.\n" + "\n" + "The FD products are deposit accounts which are held for a fixed term – like 1 year, 2 years etc.\n" + "\n" + "When creating fixed deposit accounts, the details from the fixed deposit product are used to auto fill details of the fixed deposit account application process.") public class FixedDepositProductsApiResource { private final DepositProductReadPlatformService depositProductReadPlatformService; @@ -135,7 +124,10 @@ public class FixedDepositProductsApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String create(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Create a Fixed Deposit Product", httpMethod = "POST", notes = "Creates a Fixed Deposit Product\n\n" + "Mandatory Fields: name, shortName, description, currencyCode, digitsAfterDecimal,inMultiplesOf, interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType, minDepositTerm, minDepositTermTypeId, accountingRule\n\n" + "Optional Fields: lockinPeriodFrequency, lockinPeriodFrequencyType, maxDepositTerm, maxDepositTermTypeId, inMultiplesOfDepositTerm, inMultiplesOfDepositTermTypeId, preClosurePenalApplicable, preClosurePenalInterest, preClosurePenalInterestOnTypeId, feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, charges, charts, , withHoldTax, taxGroupId\n\n" + "\n" + "Mandatory Fields for Cash based accounting (accountingRule = 2): savingsReferenceAccountId, savingsControlAccountId, interestOnSavingsAccountId, incomeFromFeeAccountId, transfersInSuspenseAccountId, incomeFromPenaltyAccountId") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = FixedDepositProductsApiResourceSwagger.PostFixedDepositProductsRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = FixedDepositProductsApiResourceSwagger.PostFixedDepositProductsResponse.class)}) + public String create(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createFixedDepositProduct().withJson(apiRequestBodyAsJson) .build(); @@ -149,7 +141,10 @@ public class FixedDepositProductsApiResource { @Path("{productId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String update(@PathParam("productId") final Long productId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update a Fixed Deposit Product", httpMethod = "PUT", notes = "Updates a Fixed Deposit Product") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = FixedDepositProductsApiResourceSwagger.PutFixedDepositProductsProductIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = FixedDepositProductsApiResourceSwagger.PutFixedDepositProductsProductIdResponse.class)}) + public String update(@PathParam("productId") @ApiParam(value = "productId") final Long productId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateFixedDepositProduct(productId) .withJson(apiRequestBodyAsJson).build(); @@ -163,6 +158,8 @@ public class FixedDepositProductsApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "List Fixed Deposit Products", httpMethod = "GET", notes = "Lists Fixed Deposit Products\n\n" + "Example Requests:\n" + "\n" +"fixeddepositproducts\n" + "\n" + "\n" + "fixeddepositproducts?fields=name") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = FixedDepositProductsApiResourceSwagger.GetFixedDepositProductsResponse.class, responseContainer = "List")}) public String retrieveAll(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(DepositsApiConstants.FIXED_DEPOSIT_PRODUCT_RESOURCE_NAME); @@ -179,7 +176,9 @@ public class FixedDepositProductsApiResource { @Path("{productId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveOne(@PathParam("productId") final Long productId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve a Fixed Deposit Product", httpMethod = "GET", notes = "Retrieves a Fixed Deposit Product\n\n" + "Example Requests:\n" + "\n" + "fixeddepositproducts/1\n" + "\n" + "\n" + "fixeddepositproducts/1?template=true\n" + "\n" + "\n" + "fixeddepositproducts/1?fields=name,description") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = FixedDepositProductsApiResourceSwagger.GetFixedDepositProductsProductIdResponse.class)}) + public String retrieveOne(@PathParam("productId") @ApiParam(value = "productId") final Long productId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(DepositsApiConstants.FIXED_DEPOSIT_PRODUCT_RESOURCE_NAME); @@ -319,7 +318,9 @@ public class FixedDepositProductsApiResource { @Path("{productId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String delete(@PathParam("productId") final Long productId) { + @ApiOperation(value = "Delete a Fixed Deposit Product", httpMethod = "DELETE", notes = "Deletes a Fixed Deposit Product") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = FixedDepositProductsApiResourceSwagger.DeleteFixedDepositProductsProductIdResponse.class)}) + public String delete(@PathParam("productId") @ApiParam(value = "productId") final Long productId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteFixedDepositProduct(productId).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositProductsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositProductsApiResourceSwagger.java new file mode 100644 index 000000000..3b01f7343 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositProductsApiResourceSwagger.java @@ -0,0 +1,583 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.savings.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.time.LocalDate; +import java.util.Set; + +/** + * Created by Chirag Gupta on 12/23/17. + */ +final class FixedDepositProductsApiResourceSwagger { + private FixedDepositProductsApiResourceSwagger() { + } + + @ApiModel(value = "PostFixedDepositProductsRequest") + public final static class PostFixedDepositProductsRequest { + private PostFixedDepositProductsRequest() { + } + + final class PostFixedDepositProductsCharts { + private PostFixedDepositProductsCharts() { + } + + final class PostFixedDepositProductsChartSlabs { + private PostFixedDepositProductsChartSlabs() { + } + + @ApiModelProperty(example = "from 0 to 90 days") + public String description; + @ApiModelProperty(example = "1") + public Integer periodType; + @ApiModelProperty(example = "0") + public Integer fromPeriod; + @ApiModelProperty(example = "90") + public Integer toPeriod; + @ApiModelProperty(example = "4.5") + public Double annualInterestRate; + } + + @ApiModelProperty(example = "01 Jan 2014") + public String fromDate; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + public Set chartSlabs; + } + + @ApiModelProperty(example = "Fixed deposit product") + public String name; + @ApiModelProperty(example = "FD01") + public String shortName; + @ApiModelProperty(example = "Daily compounding using Daily Balance, 5% per year, 365 days in year") + public String description; + @ApiModelProperty(example = "USD") + public String currencyCode; + @ApiModelProperty(example = "2") + public Integer digitsAfterDecimal; + @ApiModelProperty(example = "0") + public Integer inMultiplesOf; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "1") + public Integer interestCompoundingPeriodType; + @ApiModelProperty(example = "4") + public Integer interestPostingPeriodType; + @ApiModelProperty(example = "1") + public Integer interestCalculationType; + @ApiModelProperty(example = "365") + public Integer interestCalculationDaysInYearType; + @ApiModelProperty(example = "1") + public Integer accountingRule; + @ApiModelProperty(example = "true") + public Boolean preClosurePenalApplicable; + @ApiModelProperty(example = "1.75") + public Double preClosurePenalInterest; + @ApiModelProperty(example = "1") + public Integer preClosurePenalInterestOnTypeId; + @ApiModelProperty(example = "1") + public Integer minDepositTerm; + @ApiModelProperty(example = "1") + public Integer minDepositTermTypeId; + @ApiModelProperty(example = "5") + public Integer maxDepositTerm; + @ApiModelProperty(example = "3") + public Integer maxDepositTermTypeId; + public Set charts; + } + + @ApiModel(value = "PostFixedDepositProductsResponse") + public final static class PostFixedDepositProductsResponse { + private PostFixedDepositProductsResponse() { + } + + @ApiModelProperty(example = "1") + public Integer resourceId; + } + + @ApiModel(value = "PutFixedDepositProductsProductIdRequest") + public final static class PutFixedDepositProductsProductIdRequest { + private PutFixedDepositProductsProductIdRequest() { + } + + @ApiModelProperty(example = "Fixed deposit product new offerings") + public String description; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "5") + public Integer minDepositTerm; + @ApiModelProperty(example = "1") + public Integer minDepositTermTypeId; + } + + @ApiModel(value = "PutFixedDepositProductsProductIdResponse") + public final static class PutFixedDepositProductsProductIdResponse { + private PutFixedDepositProductsProductIdResponse() { + } + + final class PutFixedDepositProductsChanges { + private PutFixedDepositProductsChanges() { + } + + @ApiModelProperty(example = "Fixed deposit product new offerings") + public String description; + @ApiModelProperty(example = "5") + public Integer minDepositTerm; + } + + @ApiModelProperty(example = "1") + public Integer resourceId; + public PutFixedDepositProductsChanges changes; + } + + @ApiModel(value = "GetFixedDepositProductsResponse") + public final static class GetFixedDepositProductsResponse { + private GetFixedDepositProductsResponse() { + } + + final class GetFixedDepositProductsCurrency { + private GetFixedDepositProductsCurrency() { + } + + @ApiModelProperty(example = "USD") + public String code; + @ApiModelProperty(example = "US Dollar") + public String name; + @ApiModelProperty(example = "2") + public Integer decimalPlaces; + @ApiModelProperty(example = "1") + public Integer inMultiplesOf; + @ApiModelProperty(example = "$") + public String displaySymbol; + @ApiModelProperty(example = "currency.USD") + public String nameCode; + @ApiModelProperty(example = "US Dollar ($)") + public String displayLabel; + } + + final class GetFixedDepositProductsMinDepositTermType { + private GetFixedDepositProductsMinDepositTermType() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "deposit.term.savingsPeriodFrequencyType.months") + public String code; + @ApiModelProperty(example = "Months") + public String value; + } + + final class GetFixedDepositProductsMaxDepositTermType { + private GetFixedDepositProductsMaxDepositTermType() { + } + + @ApiModelProperty(example = "3") + public Integer id; + @ApiModelProperty(example = "deposit.term.savingsPeriodFrequencyType.years") + public String code; + @ApiModelProperty(example = "Years") + public String value; + } + + final class GetFixedDepositProductsInterestCompoundingPeriodType { + private GetFixedDepositProductsInterestCompoundingPeriodType() { + } + + @ApiModelProperty(example = "4") + public Integer id; + @ApiModelProperty(example = "savings.interest.period.savingsCompoundingInterestPeriodType.monthly") + public String code; + @ApiModelProperty(example = "Monthly") + public String value; + } + + final class GetFixedDepositProductsInterestPostingPeriodType { + private GetFixedDepositProductsInterestPostingPeriodType() { + } + + @ApiModelProperty(example = "4") + public Integer id; + @ApiModelProperty(example = "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly") + public String code; + @ApiModelProperty(example = "Monthly") + public String value; + } + + final class GetFixedDepositProductsInterestCalculationType { + private GetFixedDepositProductsInterestCalculationType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "savingsInterestCalculationType.dailybalance") + public String code; + @ApiModelProperty(example = "Daily Balance") + public String value; + } + + final class GetFixedDepositProductsInterestCalculationDaysInYearType { + private GetFixedDepositProductsInterestCalculationDaysInYearType() { + } + + @ApiModelProperty(example = "365") + public Integer id; + @ApiModelProperty(example = "savingsInterestCalculationDaysInYearType.days365") + public String code; + @ApiModelProperty(example = "365 Days") + public String value; + } + + final class GetFixedDepositProductsAccountingRule { + private GetFixedDepositProductsAccountingRule() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "accountingRuleType.none") + public String code; + @ApiModelProperty(example = "NONE") + public String value; + } + + @ApiModelProperty(example = "3") + public Integer id; + @ApiModelProperty(example = "FD01") + public String name; + @ApiModelProperty(example = "FD01") + public String shortName; + @ApiModelProperty(example = "FD01") + public String description; + public GetFixedDepositProductsCurrency currency; + @ApiModelProperty(example = "false") + public Boolean preClosurePenalApplicable; + @ApiModelProperty(example = "3") + public Integer minDepositTerm; + @ApiModelProperty(example = "4") + public Integer maxDepositTerm; + public GetFixedDepositProductsMinDepositTermType minDepositTermType; + public GetFixedDepositProductsMaxDepositTermType maxDepositTermType; + @ApiModelProperty(example = "0") + public Double nominalAnnualInterestRate; + public GetFixedDepositProductsInterestCompoundingPeriodType interestCompoundingPeriodType; + public GetFixedDepositProductsInterestPostingPeriodType interestPostingPeriodType; + public GetFixedDepositProductsInterestCalculationType interestCalculationType; + public GetFixedDepositProductsInterestCalculationDaysInYearType interestCalculationDaysInYearType; + public GetFixedDepositProductsAccountingRule accountingRule; + } + + @ApiModel(value = "GetFixedDepositProductsProductIdResponse") + public final static class GetFixedDepositProductsProductIdResponse { + private GetFixedDepositProductsProductIdResponse() { + } + + final class GetFixedDepositProductsProductIdCurrency { + private GetFixedDepositProductsProductIdCurrency() { + } + + @ApiModelProperty(example = "USD") + public String code; + @ApiModelProperty(example = "US Dollar") + public String name; + @ApiModelProperty(example = "2") + public Integer decimalPlaces; + @ApiModelProperty(example = "$") + public String displaySymbol; + @ApiModelProperty(example = "currency.USD") + public String nameCode; + @ApiModelProperty(example = "US Dollar ($)") + public String displayLabel; + } + + final class GetFixedDepositProductsProductIdInterestCompoundingPeriodType { + private GetFixedDepositProductsProductIdInterestCompoundingPeriodType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "savings.interest.period.savingsCompoundingInterestPeriodType.daily") + public String code; + @ApiModelProperty(example = "Daily") + public String value; + } + + final class GetFixedDepositProductsProductIdAccountingMappings { + private GetFixedDepositProductsProductIdAccountingMappings() { + } + + final class GetFixedDepositProductsProductIdSavingsReferenceAccount { + private GetFixedDepositProductsProductIdSavingsReferenceAccount() { + } + + @ApiModelProperty(example = "12") + public Integer id; + @ApiModelProperty(example = "savings ref") + public String name; + @ApiModelProperty(example = "20") + public Integer glCode; + } + + final class GetFixedDepositProductsProductIdIncomeFromFeeAccount { + private GetFixedDepositProductsProductIdIncomeFromFeeAccount() { + } + + @ApiModelProperty(example = "16") + public Integer id; + @ApiModelProperty(example = "income from savings fee") + public String name; + @ApiModelProperty(example = "24") + public Integer glCode; + } + + final class GetFixedDepositProductsProductIdIncomeFromPenaltyAccount { + private GetFixedDepositProductsProductIdIncomeFromPenaltyAccount() { + } + + @ApiModelProperty(example = "17") + public Integer id; + @ApiModelProperty(example = "income from sav penalties") + public String name; + @ApiModelProperty(example = "25") + public Integer glCode; + } + + final class GetFixedDepositProductsProductIdInterestOnSavingsAccount { + private GetFixedDepositProductsProductIdInterestOnSavingsAccount() { + } + + @ApiModelProperty(example = "15") + public Integer id; + @ApiModelProperty(example = "interest on savings") + public String name; + @ApiModelProperty(example = "23") + public Integer glCode; + } + + final class GetFixedDepositProductsProductIdSavingsControlAccount { + private GetFixedDepositProductsProductIdSavingsControlAccount() { + } + + @ApiModelProperty(example = "13") + public Integer id; + @ApiModelProperty(example = "savings ref tool kit") + public String name; + @ApiModelProperty(example = "21") + public Integer glCode; + } + + final class GetFixedDepositProductsProductIdTransfersInSuspenseAccount { + private GetFixedDepositProductsProductIdTransfersInSuspenseAccount() { + } + + @ApiModelProperty(example = "14") + public Integer id; + @ApiModelProperty(example = "saving transfers") + public String name; + @ApiModelProperty(example = "22") + public Integer glCode; + } + + public GetFixedDepositProductsProductIdSavingsReferenceAccount savingsReferenceAccount; + public GetFixedDepositProductsProductIdIncomeFromFeeAccount incomeFromFeeAccount; + public GetFixedDepositProductsProductIdIncomeFromPenaltyAccount incomeFromPenaltyAccount; + public GetFixedDepositProductsProductIdInterestOnSavingsAccount interestOnSavingsAccount; + public GetFixedDepositProductsProductIdSavingsControlAccount savingsControlAccount; + public GetFixedDepositProductsProductIdTransfersInSuspenseAccount transfersInSuspenseAccount; + } + + final class GetFixedDepositProductsProductIdFeeToIncomeAccountMappings { + private GetFixedDepositProductsProductIdFeeToIncomeAccountMappings() { + } + + final class GetFixedDepositProductsProductIdFeeToIncomeAccountMappingsCharge { + private GetFixedDepositProductsProductIdFeeToIncomeAccountMappingsCharge() { + } + + @ApiModelProperty(example = "11") + public Integer id; + @ApiModelProperty(example = "sav charge") + public String name; + @ApiModelProperty(example = "false") + public Boolean active; + @ApiModelProperty(example = "false") + public Boolean penalty; + } + + final class GetFixedDepositProductsProductIdFeeToIncomeAccountMappingsIncomeAccount { + private GetFixedDepositProductsProductIdFeeToIncomeAccountMappingsIncomeAccount() { + } + + @ApiModelProperty(example = "16") + public Integer id; + @ApiModelProperty(example = "income from savings fee") + public String name; + @ApiModelProperty(example = "24") + public Integer glCode; + } + + public GetFixedDepositProductsProductIdFeeToIncomeAccountMappingsCharge charge; + public GetFixedDepositProductsProductIdFeeToIncomeAccountMappingsIncomeAccount incomeAccount; + } + + final class GetFixedDepositProductsProductIdPenaltyToIncomeAccountMappings { + private GetFixedDepositProductsProductIdPenaltyToIncomeAccountMappings() { + } + + final class GetFixedDepositProductsProductIdPenaltyToIncomeAccountMappingsCharge { + private GetFixedDepositProductsProductIdPenaltyToIncomeAccountMappingsCharge() { + } + + @ApiModelProperty(example = "12") + public Integer id; + @ApiModelProperty(example = "sav 2") + public String name; + @ApiModelProperty(example = "false") + public Boolean active; + @ApiModelProperty(example = "true") + public Boolean penalty; + } + + public GetFixedDepositProductsProductIdPenaltyToIncomeAccountMappingsCharge charge; + public GetFixedDepositProductsProductIdAccountingMappings.GetFixedDepositProductsProductIdIncomeFromPenaltyAccount incomeAccount; + } + + final class GetFixedDepositProductsProductIdPreClosurePenalInterestOnType { + private GetFixedDepositProductsProductIdPreClosurePenalInterestOnType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "preClosurePenalInterestOnType.wholeTerm") + public String code; + @ApiModelProperty(example = "Whole term") + public String value; + } + + final class GetFixedDepositProductsProductIdMinDepositTermType { + private GetFixedDepositProductsProductIdMinDepositTermType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "deposit.term.savingsPeriodFrequencyType.weeks") + public String code; + @ApiModelProperty(example = "Weeks") + public String value; + } + + final class GetFixedDepositProductsProductIdMaxDepositTermType { + private GetFixedDepositProductsProductIdMaxDepositTermType() { + } + + @ApiModelProperty(example = "3") + public Integer id; + @ApiModelProperty(example = "deposit.term.savingsPeriodFrequencyType.years") + public String code; + @ApiModelProperty(example = "Years") + public String value; + } + + final class GetFixedDepositProductsProductIdActiveChart { + private GetFixedDepositProductsProductIdActiveChart() { + } + + final class GetFixedDepositProductsProductIdChartSlabs { + private GetFixedDepositProductsProductIdChartSlabs() { + } + + final class GetFixedDepositProductsProductIdPeriodType { + private GetFixedDepositProductsProductIdPeriodType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "interestChartPeriodType.weeks") + public String code; + @ApiModelProperty(example = "Weeks") + public String value; + } + + @ApiModelProperty(example = "18") + public Integer id; + @ApiModelProperty(example = "from 0 to 90 days") + public String description; + public GetFixedDepositProductsProductIdPeriodType periodType; + @ApiModelProperty(example = "0") + public Integer fromPeriod; + @ApiModelProperty(example = "90") + public Integer toPeriod; + @ApiModelProperty(example = "4.5") + public Double annualInterestRate; + public GetFixedDepositProductsProductIdCurrency currency; + } + + @ApiModelProperty(example = "8") + public Integer id; + @ApiModelProperty(example = "[2014, 1, 1]") + public LocalDate fromDate; + @ApiModelProperty(example = "8") + public Integer savingsProductId; + @ApiModelProperty(example = "Fixed deposit product") + public String savingsProductName; + public Set chartSlabs; + public Set periodTypes; + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "Fixed deposit product") + public String name; + @ApiModelProperty(example = "FD01") + public String shortName; + @ApiModelProperty(example = "Daily compounding using Daily Balance, 5% per year, 365 days in year") + public String description; + public GetFixedDepositProductsProductIdCurrency currency; + public GetFixedDepositProductsProductIdInterestCompoundingPeriodType interestCompoundingPeriodType; + public GetFixedDepositProductsResponse.GetFixedDepositProductsInterestPostingPeriodType interestPostingPeriodType; + public GetFixedDepositProductsResponse.GetFixedDepositProductsInterestCalculationType interestCalculationType; + public GetFixedDepositProductsResponse.GetFixedDepositProductsInterestCalculationDaysInYearType interestCalculationDaysInYearType; + public GetFixedDepositProductsProductIdAccountingMappings accountingMappings; + public Set feeToIncomeAccountMappings; + public Set penaltyToIncomeAccountMappings; + @ApiModelProperty(example = "true") + public Boolean preClosurePenalApplicable; + @ApiModelProperty(example = "1.75") + public Double preClosurePenalInterest; + public GetFixedDepositProductsProductIdPreClosurePenalInterestOnType preClosurePenalInterestOnType; + @ApiModelProperty(example = "1") + public Integer minDepositTerm; + public GetFixedDepositProductsProductIdMinDepositTermType minDepositTermType; + @ApiModelProperty(example = "5") + public Integer maxDepositTerm; + public GetFixedDepositProductsProductIdMaxDepositTermType maxDepositTermType; + public GetFixedDepositProductsProductIdActiveChart activeChart; + } + + @ApiModel(value = "DeleteFixedDepositProductsProductIdResponse") + public final static class DeleteFixedDepositProductsProductIdResponse { + private DeleteFixedDepositProductsProductIdResponse() { + } + + @ApiModelProperty(example = "1") + public Integer resourceId; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositAccountTransactionsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositAccountTransactionsApiResource.java index 089dc2b9f..91f3e5b4e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositAccountTransactionsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositAccountTransactionsApiResource.java @@ -18,22 +18,7 @@ */ package org.apache.fineract.portfolio.savings.api; -import java.util.Arrays; -import java.util.Collection; -import java.util.HashSet; -import java.util.Set; - -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - +import io.swagger.annotations.*; import org.apache.commons.lang.StringUtils; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; @@ -48,7 +33,6 @@ import org.apache.fineract.portfolio.paymenttype.data.PaymentTypeData; import org.apache.fineract.portfolio.paymenttype.service.PaymentTypeReadPlatformService; import org.apache.fineract.portfolio.savings.DepositAccountType; import org.apache.fineract.portfolio.savings.DepositsApiConstants; -import org.apache.fineract.portfolio.savings.SavingsApiConstants; import org.apache.fineract.portfolio.savings.data.SavingsAccountTransactionData; import org.apache.fineract.portfolio.savings.service.DepositAccountReadPlatformService; import org.apache.fineract.portfolio.savings.service.SavingsAccountReadPlatformService; @@ -56,9 +40,19 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; + @Path("/recurringdepositaccounts/{recurringDepositAccountId}/transactions") @Component @Scope("singleton") +@Api(value = "Recurring Deposit Account Transactions", description = "Transactions possible on a recurring deposit account.") public class RecurringDepositAccountTransactionsApiResource { private final PlatformSecurityContext context; @@ -100,8 +94,10 @@ public class RecurringDepositAccountTransactionsApiResource { @Path("template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveTemplate(@PathParam("recurringDepositAccountId") final Long recurringDepositAccountId, - @QueryParam("command") final String commandParam, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve Recurring Deposit Account Transaction Template", httpMethod = "GET", notes = "This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n" + "\n" + "Field Defaults\n" + "Allowed Value Lists\n" + "Example Requests:\n" + "\n" + "recurringdepositaccounts/1/transactions/template?command=deposit\n" + "\n" + "recurringdepositaccounts/1/transactions/template?command=withdrawal") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = RecurringDepositAccountTransactionsApiResourceSwagger.GetRecurringDepositAccountsRecurringDepositAccountIdTransactionsTemplateResponse.class)}) + public String retrieveTemplate(@PathParam("recurringDepositAccountId") @ApiParam(value = "recurringDepositAccountId") final Long recurringDepositAccountId, + @QueryParam("command") @ApiParam(value = "command") final String commandParam, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(DepositsApiConstants.RECURRING_DEPOSIT_ACCOUNT_RESOURCE_NAME); @@ -138,8 +134,10 @@ public class RecurringDepositAccountTransactionsApiResource { @Path("{transactionId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveOne(@PathParam("recurringDepositAccountId") final Long recurringDepositAccountId, - @PathParam("transactionId") final Long transactionId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve Recurring Deposit Account Transaction", httpMethod = "GET", notes = "Retrieves Recurring Deposit Account Transaction\n\n" + "Example Requests:\n" + "\n" + "recurringdepositaccounts/1/transactions/1") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = RecurringDepositAccountTransactionsApiResourceSwagger.GetRecurringDepositAccountsRecurringDepositAccountIdTransactionsTransactionIdResponse.class)}) + public String retrieveOne(@PathParam("recurringDepositAccountId") @ApiParam(value = "recurringDepositAccountId") final Long recurringDepositAccountId, + @PathParam("transactionId") @ApiParam(value = "transactionId") final Long transactionId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(DepositsApiConstants.RECURRING_DEPOSIT_ACCOUNT_RESOURCE_NAME); SavingsAccountTransactionData transactionData = this.savingsAccountReadPlatformService.retrieveSavingsTransaction( @@ -157,8 +155,11 @@ public class RecurringDepositAccountTransactionsApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String transaction(@PathParam("recurringDepositAccountId") final Long recurringDepositAccountId, - @QueryParam("command") final String commandParam, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Deposit Transaction | Withdrawal Transaction", httpMethod = "POST", notes = "Deposit Transaction:\n\n" + "Used for a deposit transaction\n\n" + "Withdrawal Transaction:\n\n" + "Used for a Withdrawal Transaction\n\n" + "Showing request/response for Deposit Transaction") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = RecurringDepositAccountTransactionsApiResourceSwagger.PostRecurringDepositAccountsRecurringDepositAccountIdTransactionsRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = RecurringDepositAccountTransactionsApiResourceSwagger.PostRecurringDepositAccountsRecurringDepositAccountIdTransactionsResponse.class)}) + public String transaction(@PathParam("recurringDepositAccountId") @ApiParam(value = "recurringDepositAccountId") final Long recurringDepositAccountId, + @QueryParam("command") @ApiParam(value = "command") final String commandParam, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapperBuilder builder = new CommandWrapperBuilder().withJson(apiRequestBodyAsJson); @@ -184,9 +185,12 @@ public class RecurringDepositAccountTransactionsApiResource { @Path("{transactionId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String handleTransactionCommands(@PathParam("recurringDepositAccountId") final Long recurringDepositAccountId, - @PathParam("transactionId") final Long transactionId, @QueryParam("command") final String commandParam, - final String apiRequestBodyAsJson) { + @ApiOperation(value = "Adjust Transaction | Undo transaction", httpMethod = "POST", notes = "Adjust Transaction:\n\n" + "This command modifies the given transaction.\n\n" + "Undo transaction:\n\n" + "This command reverses the given transaction.\n\n" + "Showing request/response for 'Adjust Transaction'") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = RecurringDepositAccountTransactionsApiResourceSwagger.PostRecurringDepositAccountsRecurringDepositAccountIdTransactionsRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = RecurringDepositAccountTransactionsApiResourceSwagger.PostRecurringDepositAccountsRecurringDepositAccountIdTransactionsTransactionIdResponse.class)}) + public String handleTransactionCommands(@PathParam("recurringDepositAccountId") @ApiParam(value = "recurringDepositAccountId") final Long recurringDepositAccountId, + @PathParam("transactionId") @ApiParam(value = "transactionId") final Long transactionId, @QueryParam("command") @ApiParam(value = "command") final String commandParam, + @ApiParam(hidden = true) final String apiRequestBodyAsJson) { String jsonApiRequest = apiRequestBodyAsJson; if (StringUtils.isBlank(jsonApiRequest)) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositAccountTransactionsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositAccountTransactionsApiResourceSwagger.java new file mode 100644 index 000000000..9efa97f6f --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositAccountTransactionsApiResourceSwagger.java @@ -0,0 +1,279 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.savings.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.math.BigDecimal; +import java.time.LocalDate; +import java.util.List; + +/** + * Created by Chirag Gupta on 12/31/17. + */ +final class RecurringDepositAccountTransactionsApiResourceSwagger { + private RecurringDepositAccountTransactionsApiResourceSwagger() { + } + + @ApiModel(value = "GetRecurringDepositAccountsRecurringDepositAccountIdTransactionsTemplateResponse") + public final static class GetRecurringDepositAccountsRecurringDepositAccountIdTransactionsTemplateResponse { + private GetRecurringDepositAccountsRecurringDepositAccountIdTransactionsTemplateResponse() { + } + + final class GetRecurringTransactionType { + private GetRecurringTransactionType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "savingsAccountTransactionType.deposit") + public String code; + @ApiModelProperty(example = "Deposit") + public String value; + @ApiModelProperty(example = "true") + public Boolean deposit; + @ApiModelProperty(example = "false") + public Boolean withdrawal; + @ApiModelProperty(example = "false") + public Boolean interestPosting; + @ApiModelProperty(example = "false") + public Boolean feeDeduction; + @ApiModelProperty(example = "false") + public Boolean initiateTransfer; + @ApiModelProperty(example = "false") + public Boolean approveTransfer; + @ApiModelProperty(example = "false") + public Boolean withdrawTransfer; + @ApiModelProperty(example = "false") + public Boolean rejectTransfer; + @ApiModelProperty(example = "false") + public Boolean overdraftInterest; + @ApiModelProperty(example = "false") + public Boolean writtenoff; + @ApiModelProperty(example = "true") + public Boolean overdraftFee; + } + + final class GetRecurringCurrency { + private GetRecurringCurrency() { + } + + @ApiModelProperty(example = "USD") + public String code; + @ApiModelProperty(example = "US Dollar") + public String name; + @ApiModelProperty(example = "4") + public Integer decimalPlaces; + @ApiModelProperty(example = "100") + public Integer inMultiplesOf; + @ApiModelProperty(example = "$") + public String displaySymbol; + @ApiModelProperty(example = "currency.USD") + public String nameCode; + @ApiModelProperty(example = "US Dollar ($)") + public String displayLabel; + } + + @ApiModelProperty(example = "1") + public Integer id; + public GetRecurringTransactionType transactionType; + @ApiModelProperty(example = "1") + public Integer accountId; + @ApiModelProperty(example = "000000001") + public String accountNo; + @ApiModelProperty(example = "[2014, 6, 25]") + public LocalDate date; + public GetRecurringCurrency currency; + @ApiModelProperty(example = "100000.000000") + public BigDecimal amount; + @ApiModelProperty(example = "false") + public Boolean reversed; + @ApiModelProperty(example = "[]") + public List paymentTypeOptions; + } + + @ApiModel(value = "GetRecurringDepositAccountsRecurringDepositAccountIdTransactionsTransactionIdResponse") + public final static class GetRecurringDepositAccountsRecurringDepositAccountIdTransactionsTransactionIdResponse { + private GetRecurringDepositAccountsRecurringDepositAccountIdTransactionsTransactionIdResponse() { + } + + final class GetRecurringTransactionsCurrency { + private GetRecurringTransactionsCurrency() { + } + + @ApiModelProperty(example = "USD") + public String code; + @ApiModelProperty(example = "US Dollar") + public String name; + @ApiModelProperty(example = "2") + public Integer decimalPlaces; + @ApiModelProperty(example = "0") + public Integer inMultiplesOf; + @ApiModelProperty(example = "$") + public String displaySymbol; + @ApiModelProperty(example = "currency.USD") + public String nameCode; + @ApiModelProperty(example = "US Dollar ($)") + public String displayLabel; + } + + final class GetRecurringTransactionsTransactionType { + private GetRecurringTransactionsTransactionType() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "savingsAccountTransactionType.withdrawal") + public String code; + @ApiModelProperty(example = "Withdrawal") + public String value; + @ApiModelProperty(example = "false") + public Boolean deposit; + @ApiModelProperty(example = "true") + public Boolean withdrawal; + @ApiModelProperty(example = "false") + public Boolean interestPosting; + @ApiModelProperty(example = "false") + public Boolean feeDeduction; + } + + final class GetRecurringPaymentDetailData { + private GetRecurringPaymentDetailData() { + } + + final class GetRecurringPaymentType { + private GetRecurringPaymentType() { + } + + @ApiModelProperty(example = "11") + public Integer id; + @ApiModelProperty(example = "cash") + public String name; + } + + @ApiModelProperty(example = "62") + public Integer id; + public GetRecurringPaymentType paymentType; + @ApiModelProperty(example = "") + public Integer accountNumber; + @ApiModelProperty(example = "") + public Integer checkNumber; + @ApiModelProperty(example = "") + public Integer routingCode; + @ApiModelProperty(example = "") + public Integer receiptNumber; + @ApiModelProperty(example = "") + public Integer bankNumber; + } + + @ApiModelProperty(example = "1") + public Integer id; + public GetRecurringTransactionsTransactionType transactionType; + @ApiModelProperty(example = "1") + public Integer accountId; + @ApiModelProperty(example = "000000001") + public String accountNo; + @ApiModelProperty(example = "[2013, 8, 7]") + public LocalDate date; + public GetRecurringTransactionsCurrency currency; + public GetRecurringPaymentDetailData paymentDetailData; + @ApiModelProperty(example = "5000") + public Float amount; + @ApiModelProperty(example = "0") + public Integer runningBalance; + @ApiModelProperty(example = "true") + public Boolean reversed; + } + + @ApiModel(value = "PostRecurringDepositAccountsRecurringDepositAccountIdTransactionsRequest") + public final static class PostRecurringDepositAccountsRecurringDepositAccountIdTransactionsRequest { + private PostRecurringDepositAccountsRecurringDepositAccountIdTransactionsRequest() { + } + + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "27 May 2013") + public String transactionDate; + @ApiModelProperty(example = "500") + public Double transactionAmount; + @ApiModelProperty(example = "14") + public Integer paymentTypeId; + @ApiModelProperty(example = "acc123") + public String accountNumber; + @ApiModelProperty(example = "che123") + public String checkNumber; + @ApiModelProperty(example = "rou123") + public String routingCode; + @ApiModelProperty(example = "rec123") + public String receiptNumber; + @ApiModelProperty(example = "ban123") + public String bankNumber; + } + + @ApiModel(value = "PostRecurringDepositAccountsRecurringDepositAccountIdTransactionsResponse") + public final static class PostRecurringDepositAccountsRecurringDepositAccountIdTransactionsResponse { + private PostRecurringDepositAccountsRecurringDepositAccountIdTransactionsResponse() { + } + + final class PostRecurringChanges { + private PostRecurringChanges() { + } + + @ApiModelProperty(example = "acc123") + public String accountNumber; + @ApiModelProperty(example = "che123") + public String checkNumber; + @ApiModelProperty(example = "rou123") + public String routingCode; + @ApiModelProperty(example = "rec123") + public String receiptNumber; + @ApiModelProperty(example = "ban123") + public String bankNumber; + } + + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "2") + public Integer clientId; + @ApiModelProperty(example = "1") + public Integer savingsId; + @ApiModelProperty(example = "47") + public Integer resourceId; + public PostRecurringChanges changes; + } + + @ApiModel(value = "PostRecurringDepositAccountsRecurringDepositAccountIdTransactionsTransactionIdResponse") + public final static class PostRecurringDepositAccountsRecurringDepositAccountIdTransactionsTransactionIdResponse { + private PostRecurringDepositAccountsRecurringDepositAccountIdTransactionsTransactionIdResponse() { + } + + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "2") + public Integer clientId; + @ApiModelProperty(example = "1") + public Integer savingsId; + @ApiModelProperty(example = "48") + public Integer resourceId; + public PostRecurringDepositAccountsRecurringDepositAccountIdTransactionsResponse.PostRecurringChanges changes; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositAccountsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositAccountsApiResource.java index bedfadc6e..575f10c6e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositAccountsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositAccountsApiResource.java @@ -18,25 +18,8 @@ */ package org.apache.fineract.portfolio.savings.api; -import java.util.Arrays; -import java.util.Collection; -import java.util.HashSet; -import java.util.Set; - -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.DefaultValue; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - +import com.google.gson.JsonElement; +import io.swagger.annotations.*; import org.apache.commons.lang.StringUtils; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; @@ -67,11 +50,19 @@ import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; -import com.google.gson.JsonElement; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; @Path("/recurringdepositaccounts") @Component @Scope("singleton") +@Api(value = "Recurring Deposit Account", description = "Recurring Deposit accounts are instances of a praticular recurring deposit product created. An application process around the creation of accounts is also supported.") public class RecurringDepositAccountsApiResource { private final DepositAccountReadPlatformService depositAccountReadPlatformService; @@ -104,10 +95,12 @@ public class RecurringDepositAccountsApiResource { @Path("template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String template(@QueryParam("clientId") final Long clientId, @QueryParam("groupId") final Long groupId, - @QueryParam("productId") final Long productId, - @DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") final boolean staffInSelectedOfficeOnly, - @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve recurring Deposit Account Template", httpMethod = "GET", notes = "This is a convenience resource. It can be useful when building maintenance user interface screens for recurring deposit applications. The template data returned consists of any or all of:\n" + "\n" + "Field Defaults\n" + "Allowed Value Lists\n\n" + "Example Requests:\n" + "\n" + "recurringdepositaccounts/template?clientId=1\n" + "\n" + "\n" + "recurringdepositaccounts/template?clientId=1&productId=1") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = RecurringDepositAccountsApiResourceSwagger.GetRecurringDepositAccountsTemplateResponse.class)}) + public String template(@QueryParam("clientId") @ApiParam(value = "clientId") final Long clientId, @QueryParam("groupId") @ApiParam(value = "groupId") final Long groupId, + @QueryParam("productId") @ApiParam(value = "productId") final Long productId, + @DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") @ApiParam(value = "staffInSelectedOfficeOnly") final boolean staffInSelectedOfficeOnly, + @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(DepositsApiConstants.RECURRING_DEPOSIT_ACCOUNT_RESOURCE_NAME); @@ -122,9 +115,11 @@ public class RecurringDepositAccountsApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveAll(@Context final UriInfo uriInfo, @QueryParam("paged") final Boolean paged, - @QueryParam("offset") final Integer offset, @QueryParam("limit") final Integer limit, - @QueryParam("orderBy") final String orderBy, @QueryParam("sortOrder") final String sortOrder) { + @ApiOperation(value = "List Recurring deposit applications/accounts", httpMethod = "GET", notes = "Lists Recurring deposit applications/accounts\n\n" + "Example Requests:\n" + "\n" + "recurringdepositaccounts\n" + "\n" + "\n" + "recurringdepositaccounts?fields=name") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = RecurringDepositAccountsApiResourceSwagger.GetRecurringDepositAccountsResponse.class, responseContainer = "List")}) + public String retrieveAll(@Context final UriInfo uriInfo, @QueryParam("paged") @ApiParam(value = "paged") final Boolean paged, + @QueryParam("offset") @ApiParam(value = "offset") final Integer offset, @QueryParam("limit") @ApiParam(value = "limit") final Integer limit, + @QueryParam("orderBy") @ApiParam(value = "orderBy") final String orderBy, @QueryParam("sortOrder") @ApiParam(value = "sortOrder") final String sortOrder) { this.context.authenticatedUser().validateHasReadPermission(DepositsApiConstants.RECURRING_DEPOSIT_ACCOUNT_RESOURCE_NAME); final PaginationParameters paginationParameters = PaginationParameters.instance(paged, offset, limit, orderBy, sortOrder); @@ -147,7 +142,10 @@ public class RecurringDepositAccountsApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String submitApplication(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Submit new recurring deposit application", httpMethod = "POST", notes = "Submits new recurring deposit application\n\n" + "Mandatory Fields: clientId or groupId, productId, submittedOnDate, depositAmount, depositPeriod, depositPeriodFrequencyId\n\n" + "Optional Fields: accountNo, externalId, fieldOfficerId,linkAccountId(if provided initial deposit amount will be collected from this account),transferInterestToSavings(By enabling this flag all interest postings will be transferred to linked saving account )\n\n" + "Inherited from Product (if not provided): interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType, lockinPeriodFrequency, lockinPeriodFrequencyType, preClosurePenalApplicable, preClosurePenalInterest, preClosurePenalInterestOnTypeId, charts, withHoldTax") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = RecurringDepositAccountsApiResourceSwagger.PostRecurringDepositAccountsRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = RecurringDepositAccountsApiResourceSwagger.PostRecurringDepositAccountsResponse.class)}) + public String submitApplication(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createRecurringDepositAccount().withJson(apiRequestBodyAsJson) .build(); @@ -161,9 +159,11 @@ public class RecurringDepositAccountsApiResource { @Path("{accountId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveOne(@PathParam("accountId") final Long accountId, - @DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") final boolean staffInSelectedOfficeOnly, - @DefaultValue("all") @QueryParam("chargeStatus") final String chargeStatus, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve a recurring deposit application/account", httpMethod = "GET", notes = "Retrieves a recurring deposit application/account\n\n" + "Example Requests :\n" + "\n" + "recurringdepositaccounts/1\n" + "\n" + "\n" + "recurringdepositaccounts/1?associations=all") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = RecurringDepositAccountsApiResourceSwagger.GetRecurringDepositAccountsAccountIdResponse.class)}) + public String retrieveOne(@PathParam("accountId") @ApiParam(value = "accountId") final Long accountId, + @DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") @ApiParam(value = "staffInSelectedOfficeOnly") final boolean staffInSelectedOfficeOnly, + @DefaultValue("all") @QueryParam("chargeStatus") @ApiParam(value = "chargeStatus") final String chargeStatus, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(DepositsApiConstants.RECURRING_DEPOSIT_ACCOUNT_RESOURCE_NAME); @@ -232,7 +232,10 @@ public class RecurringDepositAccountsApiResource { @Path("{accountId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String update(@PathParam("accountId") final Long accountId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Modify a recurring deposit application", httpMethod = "PUT", notes = "Recurring deposit application can only be modified when in 'Submitted and pending approval' state. Once the application is approved, the details cannot be changed using this method. Specific api endpoints will be created to allow change of interest detail such as rate, compounding period, posting period etc") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = RecurringDepositAccountsApiResourceSwagger.PutRecurringDepositAccountsAccountIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = RecurringDepositAccountsApiResourceSwagger.PutRecurringDepositAccountsAccountIdResponse.class)}) + public String update(@PathParam("accountId") @ApiParam(value = "accountId") final Long accountId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateRecurringDepositAccount(accountId) .withJson(apiRequestBodyAsJson).build(); @@ -246,8 +249,11 @@ public class RecurringDepositAccountsApiResource { @Path("{accountId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String handleCommands(@PathParam("accountId") final Long accountId, @QueryParam("command") final String commandParam, - @Context final UriInfo uriInfo, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Approve recurring deposit application | Undo approval recurring deposit application | Reject recurring deposit application | Withdraw recurring deposit application | Activate a recurring deposit account | Update the recommended deposit amount for a recurring deposit account | Close a recurring deposit account | Premature Close a recurring deposit account | Calculate Premature amount on Recurring deposit account | Calculate Interest on recurring Deposit Account | Post Interest on recurring Deposit Account", httpMethod = "POST", notes = "Approve recurring deposit application:\n\n" + "Approves recurring deposit application so long as its in 'Submitted and pending approval' state.\n\n" + "Undo approval recurring deposit application:\n\n" + "Will move 'approved' recurring deposit application back to 'Submitted and pending approval' state.\n\n" + "Reject recurring deposit application\n\n" + "Rejects recurring deposit application so long as its in 'Submitted and pending approval' state.\n\n" + "Withdraw recurring deposit application:\n\n" + "Used when an applicant withdraws from the recurring deposit application. It must be in 'Submitted and pending approval' state.\n\n" + "Activate a recurring deposit account:\n\n" + "Results in an approved recurring deposit application being converted into an 'active' recurring deposit account.\n\n" + "Update the recommended deposit amount for a recurring deposit account:\n\n" + "Updates the recommended deposit amount for a RD account as on the effective date.\n\n" + "Close a recurring deposit account\n\n" + "Results in a Matured recurring deposit account being converted into a 'closed' recurring deposit account.\n" + "\n" + "On account close allowed actions are." + "Premature Close a recurring deposit account:\n\n" + "Results in an Active recurring deposit account being converted into a 'Premature Closed' recurring deposit account with options to withdraw prematured amount. (premature amount is calculated using interest rate chart applicable along with penal interest if any.)\n" + "\n" + "On account premature closure allowed actions are.\n\n" + "Calculate Premature amount on Recurring deposit account:\n\n" + "Calculate premature amount on recurring deposit till premature close date. Premature amount is calculated based on interest chart and penal interest applicable if any.\n\n" + "Calculate Interest on recurring Deposit Account:\n\n" + "Calculates interest earned on a recurring deposit account based on todays date. It does not attempt to post or credit the interest on the account. That is responsibility of the Post Interest API that will likely be called by overnight process.\n\n" + "Post Interest on recurring Deposit Account:\n\n" + "Calculates and Posts interest earned on a recurring deposit account based on todays date and whether an interest posting or crediting event is due.\n\n" + "Showing request/response for 'Post Interest on recurring Deposit Account'") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = RecurringDepositAccountsApiResourceSwagger.PostRecurringDepositAccountsAccountIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = RecurringDepositAccountsApiResourceSwagger.PostRecurringDepositAccountsAccountIdResponse.class)}) + public String handleCommands(@PathParam("accountId") @ApiParam(value = "accountId") final Long accountId, @QueryParam("command") @ApiParam(value = "command") final String commandParam, + @Context final UriInfo uriInfo, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { String jsonApiRequest = apiRequestBodyAsJson; if (StringUtils.isBlank(jsonApiRequest)) { @@ -313,7 +319,9 @@ public class RecurringDepositAccountsApiResource { @Path("{accountId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String delete(@PathParam("accountId") final Long accountId) { + @ApiOperation(value = "Delete a recurring deposit application", httpMethod = "DELETE", notes = "At present we support hard delete of recurring deposit application so long as its in 'Submitted and pending approval' state. One the application is moves past this state, it is not possible to do a 'hard' delete of the application or the account. An API endpoint will be added to close/de-activate the recurring deposit account.") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = RecurringDepositAccountsApiResourceSwagger.DeleteRecurringDepositAccountsResponse.class)}) + public String delete(@PathParam("accountId") @ApiParam(value = "accountId") final Long accountId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteRecurringDepositAccount(accountId).build(); @@ -326,7 +334,7 @@ public class RecurringDepositAccountsApiResource { @Path("{accountId}/template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String accountClosureTemplate(@PathParam("accountId") final Long accountId, @QueryParam("command") final String commandParam, + public String accountClosureTemplate(@PathParam("accountId") @ApiParam(value = "accountId") final Long accountId, @QueryParam("command") @ApiParam(value = "command") final String commandParam, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(DepositsApiConstants.RECURRING_DEPOSIT_ACCOUNT_RESOURCE_NAME); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositAccountsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositAccountsApiResourceSwagger.java new file mode 100644 index 000000000..3e7bdda48 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositAccountsApiResourceSwagger.java @@ -0,0 +1,516 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.savings.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.time.LocalDate; +import java.util.Set; + +/** + * Created by Chirag Gupta on 12/26/17. + */ +final class RecurringDepositAccountsApiResourceSwagger { + private RecurringDepositAccountsApiResourceSwagger() { + } + + @ApiModel(value = "GetRecurringDepositAccountsTemplateResponse") + public final static class GetRecurringDepositAccountsTemplateResponse { + private GetRecurringDepositAccountsTemplateResponse() { + } + + final class GetRecurringProductOptions { + private GetRecurringProductOptions() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "Passbook Savings") + public String name; + } + + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "small business") + public String clientName; + public Set productOptions; + } + + @ApiModel(value = "GetRecurringDepositAccountsResponse") + public final static class GetRecurringDepositAccountsResponse { + private GetRecurringDepositAccountsResponse() { + } + + final class GetRecurringDepositAccountsStatus { + private GetRecurringDepositAccountsStatus() { + } + + @ApiModelProperty(example = "100") + public Integer id; + @ApiModelProperty(example = "savingsAccountStatusType.submitted.and.pending.approval") + public String code; + @ApiModelProperty(example = "Submitted and pending approval") + public String value; + @ApiModelProperty(example = "true") + public Boolean submittedAndPendingApproval; + @ApiModelProperty(example = "false") + public Boolean approved; + @ApiModelProperty(example = "false") + public Boolean rejected; + @ApiModelProperty(example = "false") + public Boolean withdrawnByApplicant; + @ApiModelProperty(example = "false") + public Boolean active; + @ApiModelProperty(example = "false") + public Boolean closed; + @ApiModelProperty(example = "false") + public Boolean prematureClosed; + @ApiModelProperty(example = "false") + public Boolean transferInProgress; + @ApiModelProperty(example = "false") + public Boolean transferOnHold; + } + + final class GetRecurringDepositAccountsTimeline { + private GetRecurringDepositAccountsTimeline() { + } + + @ApiModelProperty(example = "[2014, 3, 1]") + public LocalDate submittedOnDate; + @ApiModelProperty(example = "mifos") + public String submittedByUsername; + @ApiModelProperty(example = "App") + public String submittedByFirstname; + @ApiModelProperty(example = "Administrator") + public String submittedByLastname; + } + + final class GetRecurringDepositAccountsCurrency { + private GetRecurringDepositAccountsCurrency() { + } + + @ApiModelProperty(example = "USD") + public String code; + @ApiModelProperty(example = "US Dollar") + public String name; + @ApiModelProperty(example = "2") + public Integer decimalPlaces; + @ApiModelProperty(example = "1") + public Integer inMultiplesOf; + @ApiModelProperty(example = "$") + public String displaySymbol; + @ApiModelProperty(example = "currency.USD") + public String nameCode; + @ApiModelProperty(example = "US Dollar ($)") + public String displayLabel; + } + + final class GetRecurringDepositAccountsInterestCompoundingPeriodType { + private GetRecurringDepositAccountsInterestCompoundingPeriodType() { + } + + @ApiModelProperty(example = "4") + public Integer id; + @ApiModelProperty(example = "savings.interest.period.savingsCompoundingInterestPeriodType.monthly") + public String code; + @ApiModelProperty(example = "Monthly") + public String value; + } + + final class GetRecurringDepositAccountsInterestPostingPeriodType { + private GetRecurringDepositAccountsInterestPostingPeriodType() { + } + + @ApiModelProperty(example = "4") + public Integer id; + @ApiModelProperty(example = "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly") + public String code; + @ApiModelProperty(example = "Monthly") + public String value; + } + + final class GetRecurringDepositAccountsInterestCalculationType { + private GetRecurringDepositAccountsInterestCalculationType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "savingsInterestCalculationType.dailybalance") + public String code; + @ApiModelProperty(example = "Daily Balance") + public String value; + } + + final class GetRecurringDepositAccountsInterestCalculationDaysInYearType { + private GetRecurringDepositAccountsInterestCalculationDaysInYearType() { + } + + @ApiModelProperty(example = "365") + public Integer id; + @ApiModelProperty(example = "savingsInterestCalculationDaysInYearType.days365") + public String code; + @ApiModelProperty(example = "365 Days") + public String value; + } + + final class GetRecurringDepositAccountsSummary { + private GetRecurringDepositAccountsSummary() { + } + + public GetRecurringDepositAccountsCurrency currency; + @ApiModelProperty(example = "0") + public Float accountBalance; + } + + final class GetRecurringDepositAccountsMinDepositTermType { + private GetRecurringDepositAccountsMinDepositTermType() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "deposit.term.savingsPeriodFrequencyType.months") + public String code; + @ApiModelProperty(example = "Months") + public String value; + } + + final class GetRecurringDepositAccountsMaxDepositTermType { + private GetRecurringDepositAccountsMaxDepositTermType() { + } + + @ApiModelProperty(example = "3") + public Integer id; + @ApiModelProperty(example = "deposit.term.savingsPeriodFrequencyType.years") + public String code; + @ApiModelProperty(example = "Years") + public String value; + } + + final class GetRecurringDepositAccountsDepositPeriodFrequency { + private GetRecurringDepositAccountsDepositPeriodFrequency() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "deposit.period.savingsPeriodFrequencyType.months") + public String code; + @ApiModelProperty(example = "Months") + public String value; + } + + final class GetRecurringDepositAccountsRecurringDepositFrequencyType { + private GetRecurringDepositAccountsRecurringDepositFrequencyType() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "recurring.deposit.savingsPeriodFrequencyType.months") + public String code; + @ApiModelProperty(example = "Months") + public String value; + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "000000001") + public Long accountNo; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "Sangamesh N") + public String clientName; + @ApiModelProperty(example = "3") + public Integer savingsProductId; + @ApiModelProperty(example = "RD01") + public String savingsProductName; + @ApiModelProperty(example = "0") + public Integer fieldOfficerId; + public GetRecurringDepositAccountsStatus status; + public GetRecurringDepositAccountsTimeline timeline; + public GetRecurringDepositAccountsCurrency currency; + public GetRecurringDepositAccountsInterestCompoundingPeriodType interestCompoundingPeriodType; + public GetRecurringDepositAccountsInterestPostingPeriodType interestPostingPeriodType; + public GetRecurringDepositAccountsInterestCalculationType interestCalculationType; + public GetRecurringDepositAccountsInterestCalculationDaysInYearType interestCalculationDaysInYearType; + public GetRecurringDepositAccountsSummary summary; + @ApiModelProperty(example = "1150") + public Float depositAmount; + @ApiModelProperty(example = "252.59") + public Float maturityAmount; + @ApiModelProperty(example = "[2014, 4, 3]") + public LocalDate maturityDate; + @ApiModelProperty(example = "100") + public Integer recurringDepositAmount; + @ApiModelProperty(example = "1") + public Integer recurringDepositFrequency; + public GetRecurringDepositAccountsRecurringDepositFrequencyType recurringDepositFrequencyType; + @ApiModelProperty(example = "false") + public Boolean preClosurePenalApplicable; + @ApiModelProperty(example = "3") + public Integer minDepositTerm; + @ApiModelProperty(example = "4") + public Integer maxDepositTerm; + public GetRecurringDepositAccountsMinDepositTermType minDepositTermType; + public GetRecurringDepositAccountsMaxDepositTermType maxDepositTermType; + @ApiModelProperty(example = "6") + public Integer depositPeriod; + public GetRecurringDepositAccountsDepositPeriodFrequency depositPeriodFrequency; + } + + @ApiModel(value = "PostRecurringDepositAccountsRequest") + public final static class PostRecurringDepositAccountsRequest { + private PostRecurringDepositAccountsRequest() { + } + + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "1") + public Integer productId; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "02 June 2014") + public String submittedOnDate; + @ApiModelProperty(example = "20") + public Integer depositPeriod; + @ApiModelProperty(example = "1") + public Integer depositPeriodFrequencyId; + @ApiModelProperty(example = "10000") + public Float depositAmount; + @ApiModelProperty(example = "false") + public Boolean isCalendarInherited; + @ApiModelProperty(example = "2") + public Integer recurringFrequency; + @ApiModelProperty(example = "1") + public Integer recurringFrequencyType; + @ApiModelProperty(example = "2000") + public Long mandatoryRecommendedDepositAmount; + } + + @ApiModel(value = "PostRecurringDepositAccountsResponse") + public final static class PostRecurringDepositAccountsResponse { + private PostRecurringDepositAccountsResponse() { + } + + @ApiModelProperty(example = "2") + public Integer officeId; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "1") + public Integer savingsId; + @ApiModelProperty(example = "1") + public Integer resourceId; + } + + @ApiModel(value = "GetRecurringDepositAccountsAccountIdResponse") + public final static class GetRecurringDepositAccountsAccountIdResponse { + private GetRecurringDepositAccountsAccountIdResponse() { + } + + final class GetRecurringDepositAccountsAccountChart { + private GetRecurringDepositAccountsAccountChart() { + } + + final class GetRecurringDepositAccountsChartSlabs { + private GetRecurringDepositAccountsChartSlabs() { + } + + final class GetRecurringDepositAccountsPeriodType { + private GetRecurringDepositAccountsPeriodType() { + } + + @ApiModelProperty(example = "0") + public Integer id; + @ApiModelProperty(example = "interestChartPeriodType.days") + public String code; + @ApiModelProperty(example = "Days") + public String value; + } + + final class GetRecurringDepositAccountsAccountChartCurrency { + private GetRecurringDepositAccountsAccountChartCurrency() { + } + + @ApiModelProperty(example = "USD") + public String code; + @ApiModelProperty(example = "US Dollar") + public String name; + @ApiModelProperty(example = "2") + public Integer decimalPlaces; + @ApiModelProperty(example = "$") + public String displaySymbol; + @ApiModelProperty(example = "currency.USD") + public String nameCode; + @ApiModelProperty(example = "US Dollar ($)") + public String displayLabel; + } + + @ApiModelProperty(example = "13") + public Integer id; + public GetRecurringDepositAccountsPeriodType periodType; + @ApiModelProperty(example = "181") + public Integer fromPeriod; + @ApiModelProperty(example = "365") + public Integer toPeriod; + @ApiModelProperty(example = "5.5") + public Double annualInterestRate; + public GetRecurringDepositAccountsAccountChartCurrency currency; + } + + final class GetRecurringDepositAccountsPeriodTypes { + private GetRecurringDepositAccountsPeriodTypes() { + } + + @ApiModelProperty(example = "0") + public Integer id; + @ApiModelProperty(example = "interestChartPeriodType.days") + public String code; + @ApiModelProperty(example = "Days") + public String value; + } + + @ApiModelProperty(example = "4") + public Integer id; + @ApiModelProperty(example = "[2013, 10, 2]") + public LocalDate fromDate; + @ApiModelProperty(example = "5") + public Integer accountId; + @ApiModelProperty(example = "RD000023") + public Long accountNumber; + public Set chartSlabs; + public Set periodTypes; + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "RD000023") + public Long accountNo; + @ApiModelProperty(example = "RD-23") + public String externalId; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "Sangamesh N") + public String clientName; + @ApiModelProperty(example = "3") + public Integer savingsProductId; + @ApiModelProperty(example = "RD01") + public String savingsProductName; + @ApiModelProperty(example = "0") + public Integer fieldOfficerId; + public GetRecurringDepositAccountsResponse.GetRecurringDepositAccountsStatus status; + public GetRecurringDepositAccountsResponse.GetRecurringDepositAccountsTimeline timeline; + public GetRecurringDepositAccountsResponse.GetRecurringDepositAccountsCurrency currency; + public GetRecurringDepositAccountsResponse.GetRecurringDepositAccountsInterestCompoundingPeriodType interestCompoundingPeriodType; + public GetRecurringDepositAccountsResponse.GetRecurringDepositAccountsInterestPostingPeriodType interestPostingPeriodType; + public GetRecurringDepositAccountsResponse.GetRecurringDepositAccountsInterestCalculationType interestCalculationType; + public GetRecurringDepositAccountsResponse.GetRecurringDepositAccountsInterestCalculationDaysInYearType interestCalculationDaysInYearType; + @ApiModelProperty(example = "false") + public Boolean preClosurePenalApplicable; + @ApiModelProperty(example = "3") + public Integer minDepositTerm; + @ApiModelProperty(example = "4") + public Integer maxDepositTerm; + public GetRecurringDepositAccountsResponse.GetRecurringDepositAccountsMinDepositTermType minDepositTermType; + public GetRecurringDepositAccountsResponse.GetRecurringDepositAccountsMaxDepositTermType maxDepositTermType; + @ApiModelProperty(example = "100") + public Integer recurringDepositAmount; + @ApiModelProperty(example = "1") + public Integer recurringDepositFrequency; + @ApiModelProperty(example = "[2014, 4, 2]") + public LocalDate expectedFirstDepositOnDate; + public GetRecurringDepositAccountsResponse.GetRecurringDepositAccountsRecurringDepositFrequencyType recurringDepositFrequencyType; + @ApiModelProperty(example = "6") + public Integer depositPeriod; + public GetRecurringDepositAccountsResponse.GetRecurringDepositAccountsDepositPeriodFrequency depositPeriodFrequency; + public GetRecurringDepositAccountsResponse.GetRecurringDepositAccountsSummary summary; + public GetRecurringDepositAccountsAccountChart accountChart; + } + + @ApiModel(value = "PutRecurringDepositAccountsAccountIdRequest") + public final static class PutRecurringDepositAccountsAccountIdRequest { + private PutRecurringDepositAccountsAccountIdRequest() { + } + + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "6000") + public Integer depositAmount; + } + + @ApiModel(value = "PutRecurringDepositAccountsAccountIdResponse") + public final static class PutRecurringDepositAccountsAccountIdResponse { + private PutRecurringDepositAccountsAccountIdResponse() { + } + + final class PutRecurringDepositAccountsChanges { + private PutRecurringDepositAccountsChanges() { + } + + @ApiModelProperty(example = "6000") + public Integer depositAmount; + @ApiModelProperty(example = "en") + public String locale; + } + + @ApiModelProperty(example = "2") + public Integer officeId; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "1") + public Integer savingsId; + @ApiModelProperty(example = "1") + public Integer resourceId; + public PutRecurringDepositAccountsChanges changes; + } + + @ApiModel(value = "PostRecurringDepositAccountsAccountIdRequest") + public final static class PostRecurringDepositAccountsAccountIdRequest { + private PostRecurringDepositAccountsAccountIdRequest() { + } + } + + @ApiModel(value = "PostRecurringDepositAccountsAccountIdResponse") + public final static class PostRecurringDepositAccountsAccountIdResponse { + private PostRecurringDepositAccountsAccountIdResponse() { + } + + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "1") + public Integer savingsId; + @ApiModelProperty(example = "1") + public Integer resourceId; + } + + @ApiModel(value = "DeleteRecurringDepositAccountsResponse") + public final static class DeleteRecurringDepositAccountsResponse { + private DeleteRecurringDepositAccountsResponse() { + } + + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "1") + public Integer resourceId; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositProductsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositProductsApiResource.java index cd0b7b711..ea475bb2c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositProductsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositProductsApiResource.java @@ -18,23 +18,7 @@ */ package org.apache.fineract.portfolio.savings.api; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.Map; - -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - +import io.swagger.annotations.*; import org.apache.fineract.accounting.common.AccountingDropdownReadPlatformService; import org.apache.fineract.accounting.common.AccountingEnumerations; import org.apache.fineract.accounting.common.AccountingRuleType; @@ -60,12 +44,7 @@ import org.apache.fineract.portfolio.interestratechart.data.InterestRateChartDat import org.apache.fineract.portfolio.interestratechart.service.InterestRateChartReadPlatformService; import org.apache.fineract.portfolio.paymenttype.data.PaymentTypeData; import org.apache.fineract.portfolio.paymenttype.service.PaymentTypeReadPlatformService; -import org.apache.fineract.portfolio.savings.DepositAccountType; -import org.apache.fineract.portfolio.savings.DepositsApiConstants; -import org.apache.fineract.portfolio.savings.SavingsCompoundingInterestPeriodType; -import org.apache.fineract.portfolio.savings.SavingsInterestCalculationDaysInYearType; -import org.apache.fineract.portfolio.savings.SavingsInterestCalculationType; -import org.apache.fineract.portfolio.savings.SavingsPostingInterestPeriodType; +import org.apache.fineract.portfolio.savings.*; import org.apache.fineract.portfolio.savings.data.RecurringDepositProductData; import org.apache.fineract.portfolio.savings.service.DepositProductReadPlatformService; import org.apache.fineract.portfolio.savings.service.DepositsDropdownReadPlatformService; @@ -78,9 +57,19 @@ import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Map; + @Path("/recurringdepositproducts") @Component @Scope("singleton") +@Api(value = "Recurring Deposit Product", description = "Recurring Deposits are a special kind of Term Deposits offered by MFI's. The Recurring Deposit Products (aka RD) product offerings are modeled using this API.\n" + "\n" + "Recurring Deposits help people with regular incomes to deposit a fixed amount every month (specified recurring frequency) into their Recurring Deposit account.\n" + "\n" + "When creating recurring deposit accounts, the details from the recurring deposit product are used to auto fill details of the recurring deposit account application process.") public class RecurringDepositProductsApiResource { private final DepositProductReadPlatformService depositProductReadPlatformService; @@ -135,7 +124,10 @@ public class RecurringDepositProductsApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String create(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Create a Recurring Deposit Product", httpMethod = "POST", notes = "Creates a Recurring Deposit Product\n\n" + "Mandatory Fields: name, shortName, description, currencyCode, digitsAfterDecimal,inMultiplesOf, interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType, minDepositTerm, minDepositTermTypeId, recurringDepositFrequency, recurringDepositFrequencyTypeId, accountingRule, depositAmount\n\n" + "Mandatory Fields for Cash based accounting (accountingRule = 2): savingsReferenceAccountId, savingsControlAccountId, interestOnSavingsAccountId, incomeFromFeeAccountId, transfersInSuspenseAccountId, incomeFromPenaltyAccountId\n\n" + "Optional Fields: lockinPeriodFrequency, lockinPeriodFrequencyType, maxDepositTerm, maxDepositTermTypeId, inMultiplesOfDepositTerm, inMultiplesOfDepositTermTypeId, preClosurePenalApplicable, preClosurePenalInterest, preClosurePenalInterestOnTypeId, feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, charges, charts, minDepositAmount, maxDepositAmount, withHoldTax, taxGroupId") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = RecurringDepositProductsApiResourceSwagger.PostRecurringDepositProductsRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = RecurringDepositProductsApiResourceSwagger.PostRecurringDepositProductsResponse.class)}) + public String create(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createRecurringDepositProduct().withJson(apiRequestBodyAsJson) .build(); @@ -149,7 +141,10 @@ public class RecurringDepositProductsApiResource { @Path("{productId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String update(@PathParam("productId") final Long productId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update a Recurring Deposit Product", httpMethod = "PUT", notes = "Updates a Recurring Deposit Product") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = RecurringDepositProductsApiResourceSwagger.PutRecurringDepositProductsRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = RecurringDepositProductsApiResourceSwagger.PutRecurringDepositProductsResponse.class)}) + public String update(@PathParam("productId") @ApiParam(value = "productId") final Long productId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateRecurringDepositProduct(productId) .withJson(apiRequestBodyAsJson).build(); @@ -163,6 +158,8 @@ public class RecurringDepositProductsApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "List Recuring Deposit Products", httpMethod = "GET", notes = "Lists Recuring Deposit Products\n\n" + "Example Requests:\n" + "\n" + "recurringdepositproducts\n" + "\n" + "\n" + "recurringdepositproducts?fields=name") + @ApiResponses({@ApiResponse(code = 200, message = "OK", responseContainer = "List", response = RecurringDepositProductsApiResourceSwagger.GetRecurringDepositProductsResponse.class)}) public String retrieveAll(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(DepositsApiConstants.RECURRING_DEPOSIT_PRODUCT_RESOURCE_NAME); @@ -180,7 +177,9 @@ public class RecurringDepositProductsApiResource { @Path("{productId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveOne(@PathParam("productId") final Long productId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve a Recurring Deposit Product", httpMethod = "GET", notes = "Retrieves a Recurring Deposit Product\n\n" + "Example Requests:\n" + "\n" + "recurringdepositproducts/1\n" + "\n" + "\n" + "recurringdepositproducts/1?template=true\n" + "\n" + "\n" + "recurringdepositproducts/1?fields=name,description") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = RecurringDepositProductsApiResourceSwagger.GetRecurringDepositProductsProductIdResponse.class)}) + public String retrieveOne(@PathParam("productId") @ApiParam(value = "productId") final Long productId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(DepositsApiConstants.RECURRING_DEPOSIT_PRODUCT_RESOURCE_NAME); @@ -316,7 +315,9 @@ public class RecurringDepositProductsApiResource { @Path("{productId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String delete(@PathParam("productId") final Long productId) { + @ApiOperation(value = "Delete a Recurring Deposit Product", httpMethod = "DELETE", notes = "Deletes a Recurring Deposit Product") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = RecurringDepositProductsApiResourceSwagger.DeleteRecurringDepositProductsProductIdResponse.class)}) + public String delete(@PathParam("productId") @ApiParam(value = "productId") final Long productId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteRecurringDepositProduct(productId).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositProductsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositProductsApiResourceSwagger.java new file mode 100644 index 000000000..d25d4a675 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositProductsApiResourceSwagger.java @@ -0,0 +1,612 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.savings.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.time.LocalDate; +import java.util.Set; + +/** + * Created by Chirag Gupta on 12/27/17. + */ +final class RecurringDepositProductsApiResourceSwagger { + private RecurringDepositProductsApiResourceSwagger() { + } + + @ApiModel(value = "PostRecurringDepositProductsRequest") + public final static class PostRecurringDepositProductsRequest { + private PostRecurringDepositProductsRequest() { + } + + final class PostRecurringDepositProductsCharts { + private PostRecurringDepositProductsCharts() { + } + + final class PostRecurringDepositProductsChartSlabs { + private PostRecurringDepositProductsChartSlabs() { + } + + @ApiModelProperty(example = "from 0 to 90 days") + public String description; + @ApiModelProperty(example = "1") + public Integer periodType; + @ApiModelProperty(example = "0") + public Integer fromPeriod; + @ApiModelProperty(example = "90") + public Integer toPeriod; + @ApiModelProperty(example = "4.5") + public Double annualInterestRate; + } + + @ApiModelProperty(example = "01 Jan 2014") + public String fromDate; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + public Set chartSlabs; + } + + @ApiModelProperty(example = "Recurring deposit product") + public String name; + @ApiModelProperty(example = "RD01") + public String shortName; + @ApiModelProperty(example = "Daily compounding using Daily Balance, 5% per year, 365 days in year") + public String description; + @ApiModelProperty(example = "USD") + public String currencyCode; + @ApiModelProperty(example = "2") + public Integer digitsAfterDecimal; + @ApiModelProperty(example = "0") + public Integer inMultiplesOf; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "1") + public Integer interestCompoundingPeriodType; + @ApiModelProperty(example = "4") + public Integer interestPostingPeriodType; + @ApiModelProperty(example = "1") + public Integer interestCalculationType; + @ApiModelProperty(example = "365") + public Integer interestCalculationDaysInYearType; + @ApiModelProperty(example = "1") + public Integer accountingRule; + @ApiModelProperty(example = "1") + public Integer recurringDepositFrequency; + @ApiModelProperty(example = "2") + public Integer recurringDepositFrequencyTypeId; + @ApiModelProperty(example = "true") + public Boolean preClosurePenalApplicable; + @ApiModelProperty(example = "1.75") + public Double preClosurePenalInterest; + @ApiModelProperty(example = "1") + public Integer preClosurePenalInterestOnTypeId; + @ApiModelProperty(example = "1") + public Integer minDepositTerm; + @ApiModelProperty(example = "1") + public Integer minDepositTermTypeId; + @ApiModelProperty(example = "5") + public Integer maxDepositTerm; + @ApiModelProperty(example = "3") + public Integer maxDepositTermTypeId; + @ApiModelProperty(example = "10000") + public Long depositAmount; + @ApiModelProperty(example = "100") + public Long minDepositAmount; + @ApiModelProperty(example = "1000000") + public Long maxDepositAmount; + public Set charts; + } + + @ApiModel(value = "PostRecurringDepositProductsResponse") + public final static class PostRecurringDepositProductsResponse { + private PostRecurringDepositProductsResponse() { + } + + @ApiModelProperty(example = "1") + public Integer resourceId; + } + + @ApiModel(value = "PutRecurringDepositProductsRequest") + public final static class PutRecurringDepositProductsRequest { + private PutRecurringDepositProductsRequest() { + } + + @ApiModelProperty(example = "Recurring deposit product new offerings") + public String description; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "5") + public Integer minDepositTerm; + @ApiModelProperty(example = "1") + public Integer minDepositTermTypeId; + } + + @ApiModel(value = "PutRecurringDepositProductsResponse") + public final static class PutRecurringDepositProductsResponse { + private PutRecurringDepositProductsResponse() { + } + + final class PutRecurringDepositProductsChanges { + private PutRecurringDepositProductsChanges() { + } + + @ApiModelProperty(example = "Recurring deposit product new offerings") + public String description; + @ApiModelProperty(example = "5") + public Integer minDepositTerm; + } + + @ApiModelProperty(example = "1") + public Integer resourceId; + public PutRecurringDepositProductsChanges changes; + } + + @ApiModel(value = "GetRecurringDepositProductsResponse") + public final static class GetRecurringDepositProductsResponse { + private GetRecurringDepositProductsResponse() { + } + + final class GetRecurringDepositProductsCurrency { + private GetRecurringDepositProductsCurrency() { + } + + @ApiModelProperty(example = "USD") + public String code; + @ApiModelProperty(example = "US Dollar") + public String name; + @ApiModelProperty(example = "2") + public Integer decimalPlaces; + @ApiModelProperty(example = "1") + public Integer inMultiplesOf; + @ApiModelProperty(example = "$") + public String displaySymbol; + @ApiModelProperty(example = "currency.USD") + public String nameCode; + @ApiModelProperty(example = "US Dollar ($)") + public String displayLabel; + } + + final class GetRecurringDepositProductsMinDepositTermType { + private GetRecurringDepositProductsMinDepositTermType() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "deposit.term.savingsPeriodFrequencyType.months") + public String code; + @ApiModelProperty(example = "Months") + public String value; + } + + final class GetRecurringDepositProductsMaxDepositTermType { + private GetRecurringDepositProductsMaxDepositTermType() { + } + + @ApiModelProperty(example = "3") + public Integer id; + @ApiModelProperty(example = "deposit.term.savingsPeriodFrequencyType.years") + public String code; + @ApiModelProperty(example = "Years") + public String value; + } + + final class GetRecurringDepositProductsInterestCompoundingPeriodType { + private GetRecurringDepositProductsInterestCompoundingPeriodType() { + } + + @ApiModelProperty(example = "4") + public Integer id; + @ApiModelProperty(example = "savings.interest.period.savingsCompoundingInterestPeriodType.monthly") + public String code; + @ApiModelProperty(example = "Monthly") + public String value; + } + + final class GetRecurringDepositProductsInterestPostingPeriodType { + private GetRecurringDepositProductsInterestPostingPeriodType() { + } + + @ApiModelProperty(example = "4") + public Integer id; + @ApiModelProperty(example = "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly") + public String code; + @ApiModelProperty(example = "Monthly") + public String value; + } + + final class GetRecurringDepositProductsInterestCalculationType { + private GetRecurringDepositProductsInterestCalculationType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "savingsInterestCalculationType.dailybalance") + public String code; + @ApiModelProperty(example = "Daily Balance") + public String value; + } + + final class GetRecurringDepositProductsInterestCalculationDaysInYearType { + private GetRecurringDepositProductsInterestCalculationDaysInYearType() { + } + + @ApiModelProperty(example = "365") + public Integer id; + @ApiModelProperty(example = "savingsInterestCalculationDaysInYearType.days365") + public String code; + @ApiModelProperty(example = "365 Days") + public String value; + } + + final class GetRecurringDepositProductsAccountingRule { + private GetRecurringDepositProductsAccountingRule() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "accountingRuleType.none") + public String code; + @ApiModelProperty(example = "NONE") + public String value; + } + + final class GetRecurringDepositProductsRecurringDepositFrequencyType { + private GetRecurringDepositProductsRecurringDepositFrequencyType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "recurring.deposit.savingsPeriodFrequencyType.months") + public String code; + @ApiModelProperty(example = "Months") + public String value; + } + + @ApiModelProperty(example = "3") + public Integer id; + @ApiModelProperty(example = "RD01") + public String name; + @ApiModelProperty(example = "RD01") + public String shortName; + @ApiModelProperty(example = "RD01") + public String description; + public GetRecurringDepositProductsCurrency currency; + @ApiModelProperty(example = "1") + public Integer recurringDepositFrequency; + public GetRecurringDepositProductsRecurringDepositFrequencyType recurringDepositFrequencyType; + @ApiModelProperty(example = "false") + public Boolean preClosurePenalApplicable; + @ApiModelProperty(example = "3") + public Integer minDepositTerm; + @ApiModelProperty(example = "4") + public Integer maxDepositTerm; + public GetRecurringDepositProductsMinDepositTermType minDepositTermType; + public GetRecurringDepositProductsMaxDepositTermType maxDepositTermType; + @ApiModelProperty(example = "0") + public Double nominalAnnualInterestRate; + public GetRecurringDepositProductsInterestCompoundingPeriodType interestCompoundingPeriodType; + public GetRecurringDepositProductsInterestPostingPeriodType interestPostingPeriodType; + public GetRecurringDepositProductsInterestCalculationType interestCalculationType; + public GetRecurringDepositProductsInterestCalculationDaysInYearType interestCalculationDaysInYearType; + public GetRecurringDepositProductsAccountingRule accountingRule; + } + + @ApiModel(value = "GetRecurringDepositProductsProductIdResponse") + public final static class GetRecurringDepositProductsProductIdResponse { + private GetRecurringDepositProductsProductIdResponse() { + } + + final class GetRecurringDepositProductsProductIdCurrency { + private GetRecurringDepositProductsProductIdCurrency() { + } + + @ApiModelProperty(example = "USD") + public String code; + @ApiModelProperty(example = "US Dollar") + public String name; + @ApiModelProperty(example = "2") + public Integer decimalPlaces; + @ApiModelProperty(example = "$") + public String displaySymbol; + @ApiModelProperty(example = "currency.USD") + public String nameCode; + @ApiModelProperty(example = "US Dollar ($)") + public String displayLabel; + } + + final class GetRecurringDepositProductsProductIdInterestCompoundingPeriodType { + private GetRecurringDepositProductsProductIdInterestCompoundingPeriodType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "savings.interest.period.savingsCompoundingInterestPeriodType.daily") + public String code; + @ApiModelProperty(example = "Daily") + public String value; + } + + final class GetRecurringDepositProductsProductIdAccountingMappings { + private GetRecurringDepositProductsProductIdAccountingMappings() { + } + + final class GetRecurringDepositProductsProductIdSavingsReferenceAccount { + private GetRecurringDepositProductsProductIdSavingsReferenceAccount() { + } + + @ApiModelProperty(example = "12") + public Integer id; + @ApiModelProperty(example = "savings ref") + public String name; + @ApiModelProperty(example = "20") + public Integer glCode; + } + + final class GetRecurringDepositProductsProductIdIncomeFromFeeAccount { + private GetRecurringDepositProductsProductIdIncomeFromFeeAccount() { + } + + @ApiModelProperty(example = "16") + public Integer id; + @ApiModelProperty(example = "income from savings fee") + public String name; + @ApiModelProperty(example = "24") + public Integer glCode; + } + + final class GetRecurringDepositProductsProductIdIncomeFromPenaltyAccount { + private GetRecurringDepositProductsProductIdIncomeFromPenaltyAccount() { + } + + @ApiModelProperty(example = "17") + public Integer id; + @ApiModelProperty(example = "income from sav penalties") + public String name; + @ApiModelProperty(example = "25") + public Integer glCode; + } + + final class GetRecurringDepositProductsProductIdInterestOnSavingsAccount { + private GetRecurringDepositProductsProductIdInterestOnSavingsAccount() { + } + + @ApiModelProperty(example = "15") + public Integer id; + @ApiModelProperty(example = "interest on savings") + public String name; + @ApiModelProperty(example = "23") + public Integer glCode; + } + + final class GetRecurringDepositProductsProductIdSavingsControlAccount { + private GetRecurringDepositProductsProductIdSavingsControlAccount() { + } + + @ApiModelProperty(example = "13") + public Integer id; + @ApiModelProperty(example = "savings ref tool kit") + public String name; + @ApiModelProperty(example = "21") + public Integer glCode; + } + + final class GetRecurringDepositProductsProductIdTransfersInSuspenseAccount { + private GetRecurringDepositProductsProductIdTransfersInSuspenseAccount() { + } + + @ApiModelProperty(example = "14") + public Integer id; + @ApiModelProperty(example = "saving transfers") + public String name; + @ApiModelProperty(example = "22") + public Integer glCode; + } + + public GetRecurringDepositProductsProductIdSavingsReferenceAccount savingsReferenceAccount; + public GetRecurringDepositProductsProductIdIncomeFromFeeAccount incomeFromFeeAccount; + public GetRecurringDepositProductsProductIdIncomeFromPenaltyAccount incomeFromPenaltyAccount; + public GetRecurringDepositProductsProductIdInterestOnSavingsAccount interestOnSavingsAccount; + public GetRecurringDepositProductsProductIdSavingsControlAccount savingsControlAccount; + public GetRecurringDepositProductsProductIdTransfersInSuspenseAccount transfersInSuspenseAccount; + } + + final class GetRecurringDepositProductsProductIdFeeToIncomeAccountMappings { + private GetRecurringDepositProductsProductIdFeeToIncomeAccountMappings() { + } + + final class GetRecurringDepositProductsProductIdFeeToIncomeAccountMappingsCharge { + private GetRecurringDepositProductsProductIdFeeToIncomeAccountMappingsCharge() { + } + + @ApiModelProperty(example = "11") + public Integer id; + @ApiModelProperty(example = "sav charge") + public String name; + @ApiModelProperty(example = "false") + public Boolean active; + @ApiModelProperty(example = "false") + public Boolean penalty; + } + + final class GetRecurringDepositProductsProductIdFeeToIncomeAccountMappingsIncomeAccount { + private GetRecurringDepositProductsProductIdFeeToIncomeAccountMappingsIncomeAccount() { + } + + @ApiModelProperty(example = "16") + public Integer id; + @ApiModelProperty(example = "income from savings fee") + public String name; + @ApiModelProperty(example = "24") + public Integer glCode; + } + + public GetRecurringDepositProductsProductIdFeeToIncomeAccountMappingsCharge charge; + public GetRecurringDepositProductsProductIdFeeToIncomeAccountMappingsIncomeAccount incomeAccount; + } + + final class GetRecurringDepositProductsProductIdPenaltyToIncomeAccountMappings { + private GetRecurringDepositProductsProductIdPenaltyToIncomeAccountMappings() { + } + + final class GetRecurringDepositProductsProductIdPenaltyToIncomeAccountMappingsCharge { + private GetRecurringDepositProductsProductIdPenaltyToIncomeAccountMappingsCharge() { + } + + @ApiModelProperty(example = "12") + public Integer id; + @ApiModelProperty(example = "sav 2") + public String name; + @ApiModelProperty(example = "false") + public Boolean active; + @ApiModelProperty(example = "true") + public Boolean penalty; + } + + public GetRecurringDepositProductsProductIdPenaltyToIncomeAccountMappingsCharge charge; + public GetRecurringDepositProductsProductIdAccountingMappings.GetRecurringDepositProductsProductIdIncomeFromPenaltyAccount incomeAccount; + } + + final class GetRecurringDepositProductsProductIdPreClosurePenalInterestOnType { + private GetRecurringDepositProductsProductIdPreClosurePenalInterestOnType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "preClosurePenalInterestOnType.wholeTerm") + public String code; + @ApiModelProperty(example = "Whole term") + public String value; + } + + final class GetRecurringDepositProductsProductIdMinDepositTermType { + private GetRecurringDepositProductsProductIdMinDepositTermType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "deposit.term.savingsPeriodFrequencyType.weeks") + public String code; + @ApiModelProperty(example = "Weeks") + public String value; + } + + final class GetRecurringDepositProductsProductIdMaxDepositTermType { + private GetRecurringDepositProductsProductIdMaxDepositTermType() { + } + + @ApiModelProperty(example = "3") + public Integer id; + @ApiModelProperty(example = "deposit.term.savingsPeriodFrequencyType.years") + public String code; + @ApiModelProperty(example = "Years") + public String value; + } + + final class GetRecurringDepositProductsProductIdActiveChart { + private GetRecurringDepositProductsProductIdActiveChart() { + } + + final class GetRecurringDepositProductsProductIdChartSlabs { + private GetRecurringDepositProductsProductIdChartSlabs() { + } + + final class GetRecurringDepositProductsProductIdPeriodType { + private GetRecurringDepositProductsProductIdPeriodType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "interestChartPeriodType.weeks") + public String code; + @ApiModelProperty(example = "Weeks") + public String value; + } + + @ApiModelProperty(example = "18") + public Integer id; + @ApiModelProperty(example = "from 0 to 90 days") + public String description; + public GetRecurringDepositProductsProductIdPeriodType periodType; + @ApiModelProperty(example = "0") + public Integer fromPeriod; + @ApiModelProperty(example = "90") + public Integer toPeriod; + @ApiModelProperty(example = "4.5") + public Double annualInterestRate; + public GetRecurringDepositProductsProductIdCurrency currency; + } + + @ApiModelProperty(example = "8") + public Integer id; + @ApiModelProperty(example = "[2014, 1, 1]") + public LocalDate fromDate; + @ApiModelProperty(example = "8") + public Integer savingsProductId; + @ApiModelProperty(example = "Recurring deposit product") + public String savingsProductName; + public Set chartSlabs; + public Set periodTypes; + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "Recurring deposit product") + public String name; + @ApiModelProperty(example = "RD01") + public String shortName; + @ApiModelProperty(example = "Daily compounding using Daily Balance, 5% per year, 365 days in year") + public String description; + public GetRecurringDepositProductsProductIdCurrency currency; + public GetRecurringDepositProductsProductIdInterestCompoundingPeriodType interestCompoundingPeriodType; + public GetRecurringDepositProductsResponse.GetRecurringDepositProductsInterestPostingPeriodType interestPostingPeriodType; + public GetRecurringDepositProductsResponse.GetRecurringDepositProductsInterestCalculationType interestCalculationType; + public GetRecurringDepositProductsResponse.GetRecurringDepositProductsInterestCalculationDaysInYearType interestCalculationDaysInYearType; + public GetRecurringDepositProductsProductIdAccountingMappings accountingMappings; + public Set feeToIncomeAccountMappings; + public Set penaltyToIncomeAccountMappings; + @ApiModelProperty(example = "1") + public Integer recurringDepositFrequency; + public GetRecurringDepositProductsResponse.GetRecurringDepositProductsRecurringDepositFrequencyType recurringDepositFrequencyType; + @ApiModelProperty(example = "true") + public Boolean preClosurePenalApplicable; + @ApiModelProperty(example = "1.75") + public Double preClosurePenalInterest; + public GetRecurringDepositProductsProductIdPreClosurePenalInterestOnType preClosurePenalInterestOnType; + @ApiModelProperty(example = "1") + public Integer minDepositTerm; + public GetRecurringDepositProductsProductIdMinDepositTermType minDepositTermType; + @ApiModelProperty(example = "5") + public Integer maxDepositTerm; + public GetRecurringDepositProductsProductIdMaxDepositTermType maxDepositTermType; + public GetRecurringDepositProductsProductIdActiveChart activeChart; + } + + @ApiModel(value = "DeleteRecurringDepositProductsProductIdResponse") + public final static class DeleteRecurringDepositProductsProductIdResponse { + private DeleteRecurringDepositProductsProductIdResponse() { + } + + @ApiModelProperty(example = "1") + public Integer resourceId; + } +} + diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountChargesApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountChargesApiResource.java index 78bd349d7..136d5fdf7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountChargesApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountChargesApiResource.java @@ -17,28 +17,7 @@ * under the License. */ package org.apache.fineract.portfolio.savings.api; - -import static org.apache.fineract.portfolio.savings.SavingsApiConstants.COMMAND_INACTIVATE_CHARGE; -import static org.apache.fineract.portfolio.savings.SavingsApiConstants.COMMAND_PAY_CHARGE; -import static org.apache.fineract.portfolio.savings.SavingsApiConstants.COMMAND_WAIVE_CHARGE; -import static org.apache.fineract.portfolio.savings.SavingsApiConstants.SAVINGS_ACCOUNT_CHARGE_RESOURCE_NAME; - -import java.util.Collection; - -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.DefaultValue; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - +import io.swagger.annotations.*; import org.apache.commons.lang.StringUtils; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; @@ -51,16 +30,24 @@ import org.apache.fineract.infrastructure.core.serialization.DefaultToApiJsonSer import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; import org.apache.fineract.portfolio.charge.data.ChargeData; import org.apache.fineract.portfolio.charge.service.ChargeReadPlatformService; -import org.apache.fineract.portfolio.savings.SavingsApiConstants; import org.apache.fineract.portfolio.savings.data.SavingsAccountChargeData; import org.apache.fineract.portfolio.savings.service.SavingsAccountChargeReadPlatformService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; +import java.util.Collection; + +import static org.apache.fineract.portfolio.savings.SavingsApiConstants.*; + @Path("/savingsaccounts/{savingsAccountId}/charges") @Component @Scope("singleton") +@Api(value = "Savings Charges", description = "Its typical for MFIs to add maintenance and operating charges. They can be either Fees or Penalties.\n" + "\n" + "Savings Charges are instances of Charges and represent either fees and penalties for savings products. Refer Charges for documentation of the various properties of a charge, Only additional properties ( specific to the context of a Charge being associated with a Savings account) are described here") public class SavingsAccountChargesApiResource { private final PlatformSecurityContext context; @@ -92,8 +79,10 @@ public class SavingsAccountChargesApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveAllSavingsAccountCharges(@PathParam("savingsAccountId") final Long savingsAccountId, - @DefaultValue("all") @QueryParam("chargeStatus") final String chargeStatus, @Context final UriInfo uriInfo) { + @ApiOperation(value = "List Savings Charges", httpMethod = "GET", notes = "Lists Savings Charges\n\n" + "Example Requests:\n" + "\n" + "savingsaccounts/1/charges\n" + "\n" + "savingsaccounts/1/charges?chargeStatus=all\n" + "\n" + "savingsaccounts/1/charges?chargeStatus=inactive\n" + "\n" + "savingsaccounts/1/charges?chargeStatus=active\n" + "\n" + "savingsaccounts/1/charges?fields=name,amountOrPercentage") + @ApiResponses({@ApiResponse(code = 200, message = "OK", responseContainer = "List", response = SavingsAccountChargesApiResourceSwagger.GetSavingsAccountsSavingsAccountIdChargesResponse.class)}) + public String retrieveAllSavingsAccountCharges(@PathParam("savingsAccountId") @ApiParam(value = "savingsAccountId") final Long savingsAccountId, + @DefaultValue("all") @QueryParam("chargeStatus") @ApiParam(value = "chargeStatus") final String chargeStatus, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(SAVINGS_ACCOUNT_CHARGE_RESOURCE_NAME); @@ -112,7 +101,9 @@ public class SavingsAccountChargesApiResource { @Path("template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveTemplate(@PathParam("savingsAccountId") final Long savingsAccountId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve Savings Charges Template", httpMethod = "GET", notes = "This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n" + "\n" + "Field Defaults\n" + "Allowed Value Lists\n" + "Example Request:\n" + "\n" + "savingsaccounts/1/charges/template") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SavingsAccountChargesApiResourceSwagger.GetSavingsAccountsSavingsAccountIdChargesTemplateResponse.class)}) + public String retrieveTemplate(@PathParam("savingsAccountId") @ApiParam(value = "savingsAccountId")final Long savingsAccountId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(SAVINGS_ACCOUNT_CHARGE_RESOURCE_NAME); @@ -128,8 +119,10 @@ public class SavingsAccountChargesApiResource { @Path("{savingsAccountChargeId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveSavingsAccountCharge(@PathParam("savingsAccountId") final Long savingsAccountId, - @PathParam("savingsAccountChargeId") final Long savingsAccountChargeId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve a Savings account Charge", httpMethod = "GET", notes = "Retrieves a Savings account Charge\n\n" + "Example Requests:\n" + "\n" + "/savingsaccounts/1/charges/5\n" + "\n" + "\n" + "/savingsaccounts/1/charges/5?fields=name,amountOrPercentage") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SavingsAccountChargesApiResourceSwagger.GetSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse.class)}) + public String retrieveSavingsAccountCharge(@PathParam("savingsAccountId") @ApiParam(value = "savingsAccountId")final Long savingsAccountId, + @PathParam("savingsAccountChargeId") @ApiParam(value = "savingsAccountChargeId") final Long savingsAccountChargeId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(SAVINGS_ACCOUNT_CHARGE_RESOURCE_NAME); @@ -144,7 +137,10 @@ public class SavingsAccountChargesApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String addSavingsAccountCharge(@PathParam("savingsAccountId") final Long savingsAccountId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Create a Savings account Charge", httpMethod = "POST", notes = "Creates a Savings account Charge\n\n" + "Mandatory Fields for Savings account Charges: chargeId, amount\n\n" + "chargeId, amount, dueDate, dateFormat, locale\n\n" + "chargeId, amount, feeOnMonthDay, monthDayFormat, locale") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = SavingsAccountChargesApiResourceSwagger.PostSavingsAccountsSavingsAccountIdChargesRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SavingsAccountChargesApiResourceSwagger.PostSavingsAccountsSavingsAccountIdChargesResponse.class)}) + public String addSavingsAccountCharge(@PathParam("savingsAccountId") @ApiParam(value = "savingsAccountId")final Long savingsAccountId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createSavingsAccountCharge(savingsAccountId) .withJson(apiRequestBodyAsJson).build(); @@ -158,8 +154,11 @@ public class SavingsAccountChargesApiResource { @Path("{savingsAccountChargeId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String updateSavingsAccountCharge(@PathParam("savingsAccountId") final Long savingsAccountId, - @PathParam("savingsAccountChargeId") final Long savingsAccountChargeId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update a Savings account Charge", httpMethod = "PUT", notes = "Currently Savings account Charges may be updated only if the Savings account is not yet approved.") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = SavingsAccountChargesApiResourceSwagger.PutSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SavingsAccountChargesApiResourceSwagger.PutSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse.class)}) + public String updateSavingsAccountCharge(@PathParam("savingsAccountId") @ApiParam(value = "savingsAccountId")final Long savingsAccountId, + @PathParam("savingsAccountChargeId") @ApiParam(value = "savingsAccountChargeId") final Long savingsAccountChargeId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() .updateSavingsAccountCharge(savingsAccountId, savingsAccountChargeId).withJson(apiRequestBodyAsJson).build(); @@ -173,9 +172,12 @@ public class SavingsAccountChargesApiResource { @Path("{savingsAccountChargeId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String payOrWaiveSavingsAccountCharge(@PathParam("savingsAccountId") final Long savingsAccountId, - @PathParam("savingsAccountChargeId") final Long savingsAccountChargeId, @QueryParam("command") final String commandParam, - final String apiRequestBodyAsJson) { + @ApiOperation(value = "Pay a Savings account Charge | Waive off a Savings account Charge | Inactivate a Savings account Charge", httpMethod = "POST", notes = "Pay a Savings account Charge:\n\n" + "An active charge will be paid when savings account is active and having sufficient balance.\n\n" + "Waive off a Savings account Charge:\n\n" + "Outstanding charge amount will be waived off.\n\n" + "Inactivate a Savings account Charge:\n\n" + "A charge will be allowed to inactivate when savings account is active and not having any dues as of today. If charge is overpaid, corresponding charge payment transactions will be reversed.\n\n" + "Showing request/response for 'Pay a Savings account Charge'") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = SavingsAccountChargesApiResourceSwagger.PostSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200,message = "OK", response = SavingsAccountChargesApiResourceSwagger.PostSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse.class)}) + public String payOrWaiveSavingsAccountCharge(@PathParam("savingsAccountId") @ApiParam(value = "savingsAccountId") final Long savingsAccountId, + @PathParam("savingsAccountChargeId") @ApiParam(value = "savingsAccountChargeId")final Long savingsAccountChargeId, @QueryParam("command") @ApiParam(value = "command") final String commandParam, + @ApiParam(hidden = true) final String apiRequestBodyAsJson) { String json = ""; if (is(commandParam, COMMAND_WAIVE_CHARGE)) { @@ -211,8 +213,10 @@ public class SavingsAccountChargesApiResource { @Path("{savingsAccountChargeId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String deleteSavingsAccountCharge(@PathParam("savingsAccountId") final Long savingsAccountId, - @PathParam("savingsAccountChargeId") final Long savingsAccountChargeId) { + @ApiOperation(value = "Delete a Savings account Charge", httpMethod = "DELETE", notes = "Note: Currently, A Savings account Charge may only be removed from Savings that are not yet approved.") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SavingsAccountChargesApiResourceSwagger.DeleteSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse.class)}) + public String deleteSavingsAccountCharge(@PathParam("savingsAccountId") @ApiParam(value = "savingsAccountId") final Long savingsAccountId, + @PathParam("savingsAccountChargeId") @ApiParam(value = "savingsAccountChargeId") final Long savingsAccountChargeId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteSavingsAccountCharge(savingsAccountId, savingsAccountChargeId).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountChargesApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountChargesApiResourceSwagger.java new file mode 100644 index 000000000..c512190ab --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountChargesApiResourceSwagger.java @@ -0,0 +1,323 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.savings.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.Set; + +/** + * Created by Chirag Gupta on 12/30/17. + */ +final class SavingsAccountChargesApiResourceSwagger { + private SavingsAccountChargesApiResourceSwagger() { + } + + @ApiModel(value = "GetSavingsAccountsSavingsAccountIdChargesResponse") + public final static class GetSavingsAccountsSavingsAccountIdChargesResponse { + private GetSavingsAccountsSavingsAccountIdChargesResponse() { + } + + final class GetChargesCurrencyResponse { + @ApiModelProperty(example = "USD") + public String code; + @ApiModelProperty(example = "US Dollar") + public String name; + @ApiModelProperty(example = "2") + public Integer decimalPlaces; + @ApiModelProperty(example = "$") + public String displaySymbol; + @ApiModelProperty(example = "currency.USD") + public String nameCode; + @ApiModelProperty(example = "US Dollar ($)") + public String displayLabel; + } + + final class GetChargesChargeCalculationType { + private GetChargesChargeCalculationType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "chargeCalculationType.flat") + public String code; + @ApiModelProperty(example = "Flat") + public String value; + } + + final class GetChargesChargeTimeType { + private GetChargesChargeTimeType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "chargeTimeType.specifiedDueDate") + public String code; + @ApiModelProperty(example = "Specified due date") + public String value; + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "3") + public Integer chargeId; + @ApiModelProperty(example = "57") + public Integer accountId; + @ApiModelProperty(example = "Savings account maintenance fee") + public String name; + public GetChargesChargeTimeType chargeTimeType; + public GetChargesChargeCalculationType chargeCalculationType; + @ApiModelProperty(example = "0") + public Double percentage; + @ApiModelProperty(example = "0") + public Double amountPercentageAppliedTo; + public GetChargesCurrencyResponse currency; + @ApiModelProperty(example = "100") + public Float amount; + @ApiModelProperty(example = "0") + public Float amountPaid; + @ApiModelProperty(example = "0") + public Float amountWaived; + @ApiModelProperty(example = "0") + public Float amountWrittenOff; + @ApiModelProperty(example = "100") + public Float amountOutstanding; + @ApiModelProperty(example = "100") + public Float amountOrPercentage; + @ApiModelProperty(example = "false") + public Boolean penalty; + } + + @ApiModel(value = "GetSavingsAccountsSavingsAccountIdChargesTemplateResponse") + public final static class GetSavingsAccountsSavingsAccountIdChargesTemplateResponse { + private GetSavingsAccountsSavingsAccountIdChargesTemplateResponse() { + } + + final class GetSavingsChargesOptions { + private GetSavingsChargesOptions() { + } + + final class GetSavingsChargesChargeTimeType { + private GetSavingsChargesChargeTimeType() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "chargeTimeType.specifiedDueDate") + public String code; + @ApiModelProperty(example = "Specified due date") + public String value; + } + + final class GetChargesAppliesTo { + private GetChargesAppliesTo() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "chargeAppliesTo.savings") + public String code; + @ApiModelProperty(example = "Savings") + public String value; + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "Passbook Fee") + public String name; + @ApiModelProperty(example = "true") + public Boolean active; + @ApiModelProperty(example = "false") + public Boolean penalty; + public GetSavingsAccountsSavingsAccountIdChargesResponse.GetChargesCurrencyResponse currency; + @ApiModelProperty(example = "100") + public Float amount; + public GetSavingsChargesChargeTimeType chargeTimeType; + public GetChargesAppliesTo chargesAppliesTo; + public GetSavingsAccountsSavingsAccountIdChargesResponse.GetChargesChargeCalculationType chargeCalculationType; + } + + @ApiModelProperty(example = "0") + public Float amountPaid; + @ApiModelProperty(example = "0") + public Float amountWaived; + @ApiModelProperty(example = "0") + public Float amountWrittenOff; + public Set chargeOptions; + @ApiModelProperty(example = "false") + public Boolean penalty; + } + + @ApiModel(value = "GetSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse") + public final static class GetSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse { + private GetSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "1") + public Integer chargeId; + @ApiModelProperty(example = "Passbook fee") + public String name; + public GetSavingsAccountsSavingsAccountIdChargesResponse.GetChargesChargeTimeType chargeTimeType; + public GetSavingsAccountsSavingsAccountIdChargesResponse.GetChargesChargeCalculationType chargeCalculationType; + @ApiModelProperty(example = "0") + public Double percentage; + @ApiModelProperty(example = "0") + public Double amountPercentageAppliedTo; + public GetSavingsAccountsSavingsAccountIdChargesResponse.GetChargesCurrencyResponse currency; + @ApiModelProperty(example = "100") + public Float amount; + @ApiModelProperty(example = "0") + public Float amountPaid; + @ApiModelProperty(example = "0") + public Float amountWaived; + @ApiModelProperty(example = "0") + public Float amountWrittenOff; + @ApiModelProperty(example = "100") + public Float amountOutstanding; + @ApiModelProperty(example = "100") + public Float amountOrPercentage; + @ApiModelProperty(example = "false") + public Boolean penalty; + } + + @ApiModel(value = "PostSavingsAccountsSavingsAccountIdChargesRequest") + public final static class PostSavingsAccountsSavingsAccountIdChargesRequest { + private PostSavingsAccountsSavingsAccountIdChargesRequest() { + } + + @ApiModelProperty(example = "2") + public Integer chargeId; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "100") + public Float amount; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "29 April 2013") + public String dueDate; + } + + @ApiModel(value = "PostSavingsAccountsSavingsAccountIdChargesResponse") + public final static class PostSavingsAccountsSavingsAccountIdChargesResponse { + private PostSavingsAccountsSavingsAccountIdChargesResponse() { + } + + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "1") + public Integer savingsId; + @ApiModelProperty(example = "6") + public Integer resourceId; + } + + @ApiModel(value = "PutSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdRequest") + public final static class PutSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdRequest { + private PutSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdRequest() { + } + + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "60") + public Float amount; + @ApiModelProperty(example = "27 March 2013") + public String dueDate; + } + + @ApiModel(value = "PutSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse") + public final static class PutSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse { + private PutSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse() { + } + + final class PutSavingsChanges { + private PutSavingsChanges() { + } + + @ApiModelProperty(example = "27 March 2013") + public String dueDate; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "60.0") + public Float amount; + } + + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "1") + public Integer savingsId; + @ApiModelProperty(example = "6") + public Integer resourceId; + public PutSavingsChanges changes; + } + + @ApiModel(value = "PostSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdRequest") + public final static class PostSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdRequest { + private PostSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdRequest() { + } + + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "60") + public Float amount; + @ApiModelProperty(example = "12 September 2013") + public String dueDate; + } + + @ApiModel(value = "PostSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse") + public final static class PostSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse { + private PostSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse() { + } + + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "1") + public Integer savingsId; + @ApiModelProperty(example = "2") + public Integer resourceId; + } + + @ApiModel(value = "DeleteSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse") + public final static class DeleteSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse { + private DeleteSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse() { + } + + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "1") + public Integer savingsId; + @ApiModelProperty(example = "2") + public Integer resourceId; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountsApiResource.java index 05feb6374..7acf6a7fa 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountsApiResource.java @@ -18,25 +18,7 @@ */ package org.apache.fineract.portfolio.savings.api; -import java.util.Arrays; -import java.util.Collection; -import java.util.HashSet; -import java.util.Set; - -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.DefaultValue; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - +import io.swagger.annotations.*; import org.apache.commons.lang.StringUtils; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; @@ -62,9 +44,19 @@ import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; + @Path("/savingsaccounts") @Component @Scope("singleton") +@Api(value = "Savings Account", description = "Savings accounts are instances of a particular savings product created for an individual or group. An application process around the creation of accounts is also supported.") public class SavingsAccountsApiResource { private final SavingsAccountReadPlatformService savingsAccountReadPlatformService; @@ -92,10 +84,12 @@ public class SavingsAccountsApiResource { @Path("template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String template(@QueryParam("clientId") final Long clientId, @QueryParam("groupId") final Long groupId, - @QueryParam("productId") final Long productId, - @DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") final boolean staffInSelectedOfficeOnly, - @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve Savings Account Template", httpMethod = "GET", notes = "This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n" + "\n" + "Field Defaults\n" + "Allowed Value Lists\n\n" + "Example Requests:\n" + "\n" + "savingsaccounts/template?clientId=1\n" + "\n" + "\n" + "savingsaccounts/template?clientId=1&productId=1") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SavingsAccountsApiResourceSwagger.GetSavingsAccountsTemplateResponse.class)}) + public String template(@QueryParam("clientId") @ApiParam(value = "clientId") final Long clientId, @QueryParam("groupId") @ApiParam(value = "groupId") final Long groupId, + @QueryParam("productId") @ApiParam(value = "productId") final Long productId, + @DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") @ApiParam(value = "staffInSelectedOfficeOnly") final boolean staffInSelectedOfficeOnly, + @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(SavingsApiConstants.SAVINGS_ACCOUNT_RESOURCE_NAME); @@ -110,11 +104,13 @@ public class SavingsAccountsApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveAll(@Context final UriInfo uriInfo, @QueryParam("sqlSearch") final String sqlSearch, - @QueryParam("externalId") final String externalId, + @ApiOperation(value = "List savings applications/accounts", httpMethod = "GET", notes = "Lists savings applications/accounts\n\n" + "Example Requests:\n" + "\n" + "savingsaccounts\n" + "\n" + "\n" + "savingsaccounts?fields=name") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SavingsAccountsApiResourceSwagger.GetSavingsAccountsResponse.class)}) + public String retrieveAll(@Context final UriInfo uriInfo, @QueryParam("sqlSearch") @ApiParam(value = "sqlSearch") final String sqlSearch, + @QueryParam("externalId") @ApiParam(value = "externalId") final String externalId, // @QueryParam("underHierarchy") final String hierarchy, - @QueryParam("offset") final Integer offset, @QueryParam("limit") final Integer limit, - @QueryParam("orderBy") final String orderBy, @QueryParam("sortOrder") final String sortOrder) { + @QueryParam("offset") @ApiParam(value = "offset") final Integer offset, @QueryParam("limit") @ApiParam(value = "limit") final Integer limit, + @QueryParam("orderBy") @ApiParam(value = "orderBy") final String orderBy, @QueryParam("sortOrder") @ApiParam(value = "sortOrder") final String sortOrder) { this.context.authenticatedUser().validateHasReadPermission(SavingsApiConstants.SAVINGS_ACCOUNT_RESOURCE_NAME); @@ -130,7 +126,10 @@ public class SavingsAccountsApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String submitApplication(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Submit new savings application", httpMethod = "POST", notes = "Submits new savings application\n\n" + "Mandatory Fields: clientId or groupId, productId, submittedOnDate\n\n" + "Optional Fields: accountNo, externalId, fieldOfficerId\n\n" + "Inherited from Product (if not provided): nominalAnnualInterestRate, interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType, minRequiredOpeningBalance, lockinPeriodFrequency, lockinPeriodFrequencyType, withdrawalFeeForTransfers, allowOverdraft, overdraftLimit, withHoldTax\n\n" + "Additional Mandatory Field if Entity-Datatable Check is enabled for the entity of type Savings: datatables") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = SavingsAccountsApiResourceSwagger.PostSavingsAccountsRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SavingsAccountsApiResourceSwagger.PostSavingsAccountsResponse.class)}) + public String submitApplication(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createSavingsAccount().withJson(apiRequestBodyAsJson).build(); @@ -143,9 +142,11 @@ public class SavingsAccountsApiResource { @Path("{accountId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveOne(@PathParam("accountId") final Long accountId, - @DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") final boolean staffInSelectedOfficeOnly, - @DefaultValue("all") @QueryParam("chargeStatus") final String chargeStatus, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve a savings application/account", httpMethod = "GET", notes = "Retrieves a savings application/account\n\n" + "Example Requests :\n" + "\n" + "savingsaccounts/1\n" + "\n" + "\n" + "savingsaccounts/1?associations=all") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SavingsAccountsApiResourceSwagger.GetSavingsAccountsAccountIdResponse.class)}) + public String retrieveOne(@PathParam("accountId") @ApiParam(value = "accountId") final Long accountId, + @DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") @ApiParam(value = "staffInSelectedOfficeOnly") final boolean staffInSelectedOfficeOnly, + @DefaultValue("all") @QueryParam("chargeStatus") @ApiParam(value = "chargeStatus") final String chargeStatus, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(SavingsApiConstants.SAVINGS_ACCOUNT_RESOURCE_NAME); @@ -211,8 +212,11 @@ public class SavingsAccountsApiResource { @Path("{accountId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String update(@PathParam("accountId") final Long accountId, final String apiRequestBodyAsJson, - @QueryParam("command") final String commandParam) { + @ApiOperation(value = "Modify a savings application | Modify savings account withhold tax applicability", httpMethod = "PUT", notes = "Modify a savings application:\n\n" + "Savings application can only be modified when in 'Submitted and pending approval' state. Once the application is approved, the details cannot be changed using this method. Specific api endpoints will be created to allow change of interest detail such as rate, compounding period, posting period etc\n\n" + "Modify savings account withhold tax applicability:\n\n"+ "Savings application's withhold tax can be modified when in 'Active' state. Once the application is activated, can modify the account withhold tax to post tax or vice-versa" +"Showing request/response for 'Modify a savings application'") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = SavingsAccountsApiResourceSwagger.PutSavingsAccountsAccountIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SavingsAccountsApiResourceSwagger.PutSavingsAccountsAccountIdResponse.class)}) + public String update(@PathParam("accountId") @ApiParam(value = "accountId") final Long accountId, @ApiParam(hidden = true) final String apiRequestBodyAsJson, + @QueryParam("command") @ApiParam(value = "command") final String commandParam) { if (is(commandParam, "updateWithHoldTax")) { final CommandWrapper commandRequest = new CommandWrapperBuilder().withJson(apiRequestBodyAsJson).updateWithHoldTax(accountId) @@ -233,8 +237,11 @@ public class SavingsAccountsApiResource { @Path("{accountId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String handleCommands(@PathParam("accountId") final Long accountId, @QueryParam("command") final String commandParam, - final String apiRequestBodyAsJson) { + @ApiOperation(value = "Approve savings application | Undo approval savings application | Assign Savings Officer | Unassign Savings Officer | Reject savings application | Withdraw savings application | Activate a savings account | Close a savings account | Calculate Interest on Savings Account | Post Interest on Savings Account | Block Savings Account | Unblock Savings Account | Block Savings Account Credit transactions | Unblock Savings Account Credit transactions | Block Savings Account Debit transactions | Unblock Savings Account debit transactions", httpMethod = "POST", notes = "Approve savings application:\n\n" + "Approves savings application so long as its in 'Submitted and pending approval' state.\n\n" + "Undo approval savings application:\n\n" + "Will move 'approved' savings application back to 'Submitted and pending approval' state.\n\n" + "Assign Savings Officer:\n\n" + "Allows you to assign Savings Officer for existing Savings Account.\n\n" + "Unassign Savings Officer:\n\n" + "Allows you to unassign the Savings Officer.\n\n" + "Reject savings application:\n\n" + "Rejects savings application so long as its in 'Submitted and pending approval' state.\n\n" + "Withdraw savings application:\n\n" + "Used when an applicant withdraws from the savings application. It must be in 'Submitted and pending approval' state.\n\n" + "Activate a savings account:\n\n" + "Results in an approved savings application being converted into an 'active' savings account.\n\n" + "Close a savings account:\n\n" + "Results in an Activated savings application being converted into an 'closed' savings account.\n" + "\n" + "closedOnDate is closure date of savings account\n" + "\n" + "withdrawBalance is a boolean value, true value of this field performs a withdrawal transaction with account's running balance.\n\n" + "Mandatory Fields: dateFormat,locale,closedOnDate\n\n" + "Optional Fields: note, withdrawBalance, paymentTypeId, accountNumber, checkNumber, routingCode, receiptNumber, bankNumber\n\n" + "Calculate Interest on Savings Account:\n\n" + "Calculates interest earned on a savings account based on todays date. It does not attempt to post or credit the interest on the account. That is responsibility of the Post Interest API that will likely be called by overnight process.\n\n" + "Post Interest on Savings Account:\n\n" + "Calculates and Posts interest earned on a savings account based on today's date and whether an interest posting or crediting event is due.\n\n" + "Block Savings Account:\n\n" + "Blocks Savings account from all types of credit and debit transactions\n\n" + "Unblock Savings Account:\n\n" + "Unblock a blocked account. On unblocking account, user can perform debit and credit transactions\n\n" + "Block Savings Account Credit transactions:\n\n" + "Savings account will be blocked from all types of credit transactions.\n\n" + "Unblock Savings Account Credit transactions:\n\n" + "It unblocks the Saving account's credit operations. Now all types of credits can be transacted to Savings account\n\n" + "Block Savings Account Debit transactions:\n\n" + "All types of debit operations from Savings account wil be blocked\n\n" + "Unblock Savings Account debit transactions:\n\n" + "It unblocks the Saving account's debit operations. Now all types of debits can be transacted from Savings account\n\n" + "Showing request/response for 'Unassign Savings Officer'") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = SavingsAccountsApiResourceSwagger.PostSavingsAccountsAccountIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SavingsAccountsApiResourceSwagger.PostSavingsAccountsAccountIdResponse.class)}) + public String handleCommands(@PathParam("accountId") @ApiParam(value = "accountId") final Long accountId, @QueryParam("command") @ApiParam(value = "command") final String commandParam, + @ApiParam(hidden = true) final String apiRequestBodyAsJson) { String jsonApiRequest = apiRequestBodyAsJson; if (StringUtils.isBlank(jsonApiRequest)) { @@ -319,7 +326,9 @@ public class SavingsAccountsApiResource { @Path("{accountId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String delete(@PathParam("accountId") final Long accountId) { + @ApiOperation(value = "Delete a savings application", httpMethod = "DELETE", notes = "At present we support hard delete of savings application so long as its in 'Submitted and pending approval' state. One the application is moves past this state, it is not possible to do a 'hard' delete of the application or the account. An API endpoint will be added to close/de-activate the savings account.") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SavingsAccountsApiResourceSwagger.DeleteSavingsAccountsAccountIdResponse.class)}) + public String delete(@PathParam("accountId") @ApiParam(value = "accountId") final Long accountId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteSavingsAccount(accountId).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountsApiResourceSwagger.java new file mode 100644 index 000000000..676991fd6 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountsApiResourceSwagger.java @@ -0,0 +1,359 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.savings.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.time.LocalDate; +import java.util.Set; + +/** + * Created by Chirag Gupta on 12/29/17. + */ +final class SavingsAccountsApiResourceSwagger { + private SavingsAccountsApiResourceSwagger() { + } + + @ApiModel(value = "GetSavingsAccountsTemplateResponse") + public final static class GetSavingsAccountsTemplateResponse { + private GetSavingsAccountsTemplateResponse() { + } + + final class GetSavingsProductOptions { + private GetSavingsProductOptions() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "Passbook Savings") + public String name; + } + + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "small business") + public String clientName; + public Set productOptions; + } + + @ApiModel(value = "GetSavingsAccountsResponse") + public final static class GetSavingsAccountsResponse { + private GetSavingsAccountsResponse() { + } + + final class GetSavingsPageItems { + private GetSavingsPageItems() { + } + + final class GetSavingsStatus { + private GetSavingsStatus() { + } + + @ApiModelProperty(example = "100") + public Integer id; + @ApiModelProperty(example = "savingsAccountStatusType.submitted.and.pending.approval") + public String code; + @ApiModelProperty(example = "Submitted and pending approval") + public String value; + @ApiModelProperty(example = "true") + public Boolean submittedAndPendingApproval; + @ApiModelProperty(example = "false") + public Boolean approved; + @ApiModelProperty(example = "false") + public Boolean rejected; + @ApiModelProperty(example = "false") + public Boolean withdrawnByApplicant; + @ApiModelProperty(example = "false") + public Boolean active; + @ApiModelProperty(example = "false") + public Boolean closed; + + } + + final class GetSavingsTimeline { + private GetSavingsTimeline() { + } + + @ApiModelProperty(example = "[2013, 3, 1]") + public LocalDate submittedOnDate; + } + + final class GetSavingsCurrency { + private GetSavingsCurrency() { + } + + @ApiModelProperty(example = "USD") + public String code; + @ApiModelProperty(example = "US Dollar") + public String name; + @ApiModelProperty(example = "2") + public Integer decimalPlaces; + @ApiModelProperty(example = "$") + public String displaySymbol; + @ApiModelProperty(example = "currency.USD") + public String nameCode; + @ApiModelProperty(example = "US Dollar ($)") + public String displayLabel; + } + + final class GetSavingsInterestCompoundingPeriodType { + private GetSavingsInterestCompoundingPeriodType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "savings.interest.period.savingsCompoundingInterestPeriodType.daily") + public String code; + @ApiModelProperty(example = "Daily") + public String value; + } + + final class GetSavingsInterestPostingPeriodType { + private GetSavingsInterestPostingPeriodType() { + } + + @ApiModelProperty(example = "4") + public Integer id; + @ApiModelProperty(example = "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly") + public String code; + @ApiModelProperty(example = "Monthly") + public String value; + } + + final class GetSavingsInterestCalculationType { + private GetSavingsInterestCalculationType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "savingsInterestCalculationType.dailybalance") + public String code; + @ApiModelProperty(example = "Daily Balance") + public String value; + } + + final class GetSavingsInterestCalculationDaysInYearType { + private GetSavingsInterestCalculationDaysInYearType() { + } + + @ApiModelProperty(example = "365") + public Integer id; + @ApiModelProperty(example = "savingsInterestCalculationDaysInYearType.days365") + public String code; + @ApiModelProperty(example = "365 Days") + public String value; + } + + final class GetSavingsSummary { + private GetSavingsSummary() { + } + + public GetSavingsCurrency currency; + @ApiModelProperty(example = "0") + public Integer accountBalance; + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "000000001") + public String accountNo; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "small business") + public String clientName; + @ApiModelProperty(example = "1") + public Integer savingsProductId; + @ApiModelProperty(example = "Passbook Savings") + public String savingsProductName; + @ApiModelProperty(example = "0") + public Integer fieldOfficerId; + public GetSavingsStatus status; + public GetSavingsTimeline timeline; + public GetSavingsCurrency currency; + @ApiModelProperty(example = "5") + public Double nominalAnnualInterestRate; + public GetSavingsInterestCompoundingPeriodType interestCompoundingPeriodType; + public GetSavingsInterestPostingPeriodType interestPostingPeriodType; + public GetSavingsInterestCalculationType interestCalculationType; + public GetSavingsInterestCalculationDaysInYearType interestCalculationDaysInYearType; + public GetSavingsSummary summary; + } + + @ApiModelProperty(example = "1") + public Integer totalFilteredRecords; + public Set pageItems; + } + + @ApiModel(value = "PostSavingsAccountsRequest") + public final static class PostSavingsAccountsRequest { + private PostSavingsAccountsRequest() { + } + + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "1") + public Integer productId; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "01 March 2011") + public String submittedOnDate; + } + + @ApiModel(value = "PostSavingsAccountsResponse") + public final static class PostSavingsAccountsResponse { + private PostSavingsAccountsResponse() { + } + + @ApiModelProperty(example = "2") + public Integer officeId; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "1") + public Integer savingsId; + @ApiModelProperty(example = "1") + public Integer resourceId; + } + + @ApiModel(value = "GetSavingsAccountsAccountIdResponse") + public final static class GetSavingsAccountsAccountIdResponse { + private GetSavingsAccountsAccountIdResponse() { + } + + final class GetSavingsAccountsSummary { + private GetSavingsAccountsSummary() { + } + + public GetSavingsAccountsResponse.GetSavingsPageItems.GetSavingsCurrency currency; + @ApiModelProperty(example = "0") + public Integer accountBalance; + @ApiModelProperty(example = "0") + public Integer availableBalance; + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "000000001") + public String accountNo; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "small business") + public String clientName; + @ApiModelProperty(example = "1") + public Integer savingsProductId; + @ApiModelProperty(example = "Passbook Savings") + public String savingsProductName; + @ApiModelProperty(example = "0") + public Integer fieldOfficerId; + public GetSavingsAccountsResponse.GetSavingsPageItems.GetSavingsStatus status; + public GetSavingsAccountsResponse.GetSavingsPageItems.GetSavingsTimeline timeline; + public GetSavingsAccountsResponse.GetSavingsPageItems.GetSavingsCurrency currency; + @ApiModelProperty(example = "5") + public Double nominalAnnualInterestRate; + public GetSavingsAccountsResponse.GetSavingsPageItems.GetSavingsInterestCompoundingPeriodType interestCompoundingPeriodType; + public GetSavingsAccountsResponse.GetSavingsPageItems.GetSavingsInterestPostingPeriodType interestPostingPeriodType; + public GetSavingsAccountsResponse.GetSavingsPageItems.GetSavingsInterestCalculationType interestCalculationType; + public GetSavingsAccountsResponse.GetSavingsPageItems.GetSavingsInterestCalculationDaysInYearType interestCalculationDaysInYearType; + public GetSavingsAccountsSummary summary; + } + + @ApiModel(value = "PutSavingsAccountsAccountIdRequest") + public final static class PutSavingsAccountsAccountIdRequest { + private PutSavingsAccountsAccountIdRequest() { + } + + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "5.9999999999") + public Double nominalAnnualInterestRate; + } + + @ApiModel(value = "PutSavingsAccountsAccountIdResponse") + public final static class PutSavingsAccountsAccountIdResponse { + private PutSavingsAccountsAccountIdResponse() { + } + + final class PutSavingsAccountsChanges { + private PutSavingsAccountsChanges() { + } + + @ApiModelProperty(example = "5.9999999999") + public Double nominalAnnualInterestRate; + @ApiModelProperty(example = "en") + public String locale; + } + + @ApiModelProperty(example = "2") + public Integer officeId; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "1") + public Integer savingsId; + @ApiModelProperty(example = "1") + public Integer resourceId; + public PutSavingsAccountsChanges changes; + } + + @ApiModel(value = "PostSavingsAccountsAccountIdRequest") + public final static class PostSavingsAccountsAccountIdRequest { + private PostSavingsAccountsAccountIdRequest() { + } + + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "05 September 2014") + public String unassignedDate; + } + + @ApiModel(value = "PostSavingsAccountsAccountIdResponse") + public final static class PostSavingsAccountsAccountIdResponse { + private PostSavingsAccountsAccountIdResponse() { + } + + final class PostSavingsAccountsAccountIdChanges { + private PostSavingsAccountsAccountIdChanges() { + } + } + + @ApiModelProperty(example = "2") + public Integer officeId; + @ApiModelProperty(example = "8") + public Integer clientId; + @ApiModelProperty(example = "8") + public Integer resourceId; + public PostSavingsAccountsAccountIdChanges changes; + } + + @ApiModel(value = "DeleteSavingsAccountsAccountIdResponse") + public final static class DeleteSavingsAccountsAccountIdResponse { + private DeleteSavingsAccountsAccountIdResponse() { + } + + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "1") + public Integer resourceId; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsProductsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsProductsApiResource.java index 016aaae68..7762d0920 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsProductsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsProductsApiResource.java @@ -18,23 +18,7 @@ */ package org.apache.fineract.portfolio.savings.api; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.Map; - -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - +import io.swagger.annotations.*; import org.apache.fineract.accounting.common.AccountingDropdownReadPlatformService; import org.apache.fineract.accounting.common.AccountingEnumerations; import org.apache.fineract.accounting.common.AccountingRuleType; @@ -57,11 +41,7 @@ import org.apache.fineract.portfolio.charge.data.ChargeData; import org.apache.fineract.portfolio.charge.service.ChargeReadPlatformService; import org.apache.fineract.portfolio.paymenttype.data.PaymentTypeData; import org.apache.fineract.portfolio.paymenttype.service.PaymentTypeReadPlatformService; -import org.apache.fineract.portfolio.savings.SavingsApiConstants; -import org.apache.fineract.portfolio.savings.SavingsCompoundingInterestPeriodType; -import org.apache.fineract.portfolio.savings.SavingsInterestCalculationDaysInYearType; -import org.apache.fineract.portfolio.savings.SavingsInterestCalculationType; -import org.apache.fineract.portfolio.savings.SavingsPostingInterestPeriodType; +import org.apache.fineract.portfolio.savings.*; import org.apache.fineract.portfolio.savings.data.SavingsProductData; import org.apache.fineract.portfolio.savings.service.SavingsDropdownReadPlatformService; import org.apache.fineract.portfolio.savings.service.SavingsEnumerations; @@ -73,9 +53,19 @@ import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Map; + @Path("/savingsproducts") @Component @Scope("singleton") +@Api(value = "Savings Product", description = "An MFIs savings product offerings are modeled using this API.\n" + "\n" + "When creating savings accounts, the details from the savings product are used to auto fill details of the savings account application process.") public class SavingsProductsApiResource { private final SavingsProductReadPlatformService savingProductReadPlatformService; @@ -119,7 +109,10 @@ public class SavingsProductsApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String create(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Create a Savings Product", httpMethod = "POST", notes = "Creates a Savings Product\n\n" + "Mandatory Fields: name, shortName, description, currencyCode, digitsAfterDecimal,inMultiplesOf, nominalAnnualInterestRate, interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType,accountingRule\n\n" + "Mandatory Fields for Cash based accounting (accountingRule = 2): savingsReferenceAccountId, savingsControlAccountId, interestOnSavingsAccountId, incomeFromFeeAccountId, transfersInSuspenseAccountId, incomeFromPenaltyAccountId\n\n" + "Optional Fields: minRequiredOpeningBalance, lockinPeriodFrequency, lockinPeriodFrequencyType, withdrawalFeeForTransfers, paymentChannelToFundSourceMappings, feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, charges, allowOverdraft, overdraftLimit, minBalanceForInterestCalculation,withHoldTax,taxGroupId") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = SavingsProductsApiResourceSwagger.PostSavingsProductsRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SavingsProductsApiResourceSwagger.PostSavingsProductsResponse.class)}) + public String create(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createSavingProduct().withJson(apiRequestBodyAsJson).build(); @@ -132,7 +125,10 @@ public class SavingsProductsApiResource { @Path("{productId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String update(@PathParam("productId") final Long productId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update a Savings Product", httpMethod = "PUT", notes = "Updates a Savings Product") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = SavingsProductsApiResourceSwagger.PutSavingsProductsProductIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SavingsProductsApiResourceSwagger.PutSavingsProductsProductIdResponse.class)}) + public String update(@PathParam("productId") @ApiParam(value = "productId") final Long productId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateSavingProduct(productId).withJson(apiRequestBodyAsJson) .build(); @@ -146,6 +142,8 @@ public class SavingsProductsApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "List Savings Products", httpMethod = "GET", notes = "Lists Savings Products\n\n" + "Example Requests:\n" + "\n" + "savingsproducts\n" + "\n" + "savingsproducts?fields=name") + @ApiResponses({@ApiResponse(code = 200, message = "OK", responseContainer = "List", response = SavingsProductsApiResourceSwagger.GetSavingsProductsResponse.class)}) public String retrieveAll(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(SavingsApiConstants.SAVINGS_PRODUCT_RESOURCE_NAME); @@ -161,7 +159,9 @@ public class SavingsProductsApiResource { @Path("{productId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveOne(@PathParam("productId") final Long productId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve a Savings Product", httpMethod = "GET", notes = "Retrieves a Savings Product\n\n" + "Example Requests:\n" + "\n" + "savingsproducts/1\n" + "\n" + "savingsproducts/1?template=true\n" + "\n" + "savingsproducts/1?fields=name,description") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SavingsProductsApiResourceSwagger.GetSavingsProductsProductIdResponse.class)}) + public String retrieveOne(@PathParam("productId") @ApiParam(value = "productId") final Long productId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(SavingsApiConstants.SAVINGS_PRODUCT_RESOURCE_NAME); @@ -198,6 +198,8 @@ public class SavingsProductsApiResource { @Path("template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Retrieve Savings Product Template", httpMethod = "GET", notes = "This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n" + "\n" + "Field Defaults\n" + "Allowed Value Lists\n" + "Example Request:\n" + "\n" + "savingsproducts/template") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SavingsProductsApiResourceSwagger.GetSavingsProductsTemplateResponse.class)}) public String retrieveTemplate(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(SavingsApiConstants.SAVINGS_PRODUCT_RESOURCE_NAME); @@ -284,7 +286,9 @@ public class SavingsProductsApiResource { @Path("{productId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String delete(@PathParam("productId") final Long productId) { + @ApiOperation(value = "Delete a Savings Product", httpMethod = "DELETE", notes = "Deletes a Savings Product") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SavingsProductsApiResourceSwagger.DeleteSavingsProductsProductIdResponse.class)}) + public String delete(@PathParam("productId") @ApiParam(value = "productId") final Long productId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteSavingProduct(productId).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsProductsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsProductsApiResourceSwagger.java new file mode 100644 index 000000000..24cf5714e --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsProductsApiResourceSwagger.java @@ -0,0 +1,737 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.savings.api; + + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.math.BigDecimal; +import java.util.List; +import java.util.Set; + +/** + * Created by Chirag Gupta on 12/31/17. + */ +final class SavingsProductsApiResourceSwagger { + private SavingsProductsApiResourceSwagger() { + } + + @ApiModel(value = "PostSavingsProductsRequest") + public final static class PostSavingsProductsRequest { + private PostSavingsProductsRequest() { + } + + final class PostSavingsCharges { + private PostSavingsCharges() { + } + + @ApiModelProperty(example = "1") + public Integer id; + } + + @ApiModelProperty(example = "Passbook Savings") + public String name; + @ApiModelProperty(example = "PBSV") + public String shortName; + @ApiModelProperty(example = "Daily compounding using Daily Balance, 5% per year, 365 days in year") + public String description; + @ApiModelProperty(example = "USD") + public String currencyCode; + @ApiModelProperty(example = "2") + public Integer digitsAfterDecimal; + @ApiModelProperty(example = "0") + public Integer inMultiplesOf; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "5.0") + public Double nominalAnnualInterestRate; + @ApiModelProperty(example = "1") + public Integer interestCompoundingPeriodType; + @ApiModelProperty(example = "4") + public Integer interestPostingPeriodType; + @ApiModelProperty(example = "1") + public Integer interestCalculationType; + @ApiModelProperty(example = "365") + public Integer interestCalculationDaysInYearType; + @ApiModelProperty(example = "1") + public Integer accountingRule; + public Set charges; + } + + @ApiModel(value = "PostSavingsProductsResponse") + public final static class PostSavingsProductsResponse { + private PostSavingsProductsResponse() { + } + + @ApiModelProperty(example = "1") + public Integer resourceId; + } + + @ApiModel(value = "PutSavingsProductsProductIdRequest") + public final static class PutSavingsProductsProductIdRequest { + private PutSavingsProductsProductIdRequest() { + } + + @ApiModelProperty(example = "Passbook Savings Lite.") + public String description; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "5.73") + public Double interestRate; + } + + @ApiModel(value = "PutSavingsProductsProductIdResponse") + public final static class PutSavingsProductsProductIdResponse { + private PutSavingsProductsProductIdResponse() { + } + + final class PutSavingsChanges { + private PutSavingsChanges() { + } + + @ApiModelProperty(example = "Passbook Savings Lite.") + public String description; + @ApiModelProperty(example = "5.73") + public Double interestRate; + @ApiModelProperty(example = "en") + public String locale; + } + + @ApiModelProperty(example = "1") + public Integer resourceId; + public PutSavingsChanges changes; + } + + @ApiModel(value = "GetSavingsProductsResponse") + public final static class GetSavingsProductsResponse { + private GetSavingsProductsResponse() { + } + + final class GetSavingsCurrency { + private GetSavingsCurrency() { + } + + @ApiModelProperty(example = "USD") + public String code; + @ApiModelProperty(example = "US Dollar") + public String name; + @ApiModelProperty(example = "2") + public Integer decimalPlaces; + @ApiModelProperty(example = "$") + public String displaySymbol; + @ApiModelProperty(example = "currency.USD") + public String nameCode; + @ApiModelProperty(example = "US Dollar ($)") + public String displayLabel; + } + + final class GetSavingsProductsInterestCompoundingPeriodType { + private GetSavingsProductsInterestCompoundingPeriodType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "savings.interest.period.savingsCompoundingInterestPeriodType.daily") + public String code; + @ApiModelProperty(example = "Daily") + public String value; + } + + final class GetSavingsProductsInterestPostingPeriodType { + private GetSavingsProductsInterestPostingPeriodType() { + } + + @ApiModelProperty(example = "4") + public Integer id; + @ApiModelProperty(example = "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly") + public String code; + @ApiModelProperty(example = "Monthly") + public String value; + } + + final class GetSavingsProductsInterestCalculationType { + private GetSavingsProductsInterestCalculationType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "savingsInterestCalculationType.dailybalance") + public String code; + @ApiModelProperty(example = "Daily Balance") + public String value; + } + + final class GetSavingsProductsInterestCalculationDaysInYearType { + private GetSavingsProductsInterestCalculationDaysInYearType() { + } + + @ApiModelProperty(example = "365") + public Integer id; + @ApiModelProperty(example = "savingsInterestCalculationDaysInYearType.days365") + public String code; + @ApiModelProperty(example = "365 Days") + public String value; + } + + final class GetSavingsProductsAccountingRule { + private GetSavingsProductsAccountingRule() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "accountingRuleType.cash") + public String code; + @ApiModelProperty(example = "CASH BASED") + public String value; + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "Savings product") + public String name; + @ApiModelProperty(example = "sa1") + public String shortName; + @ApiModelProperty(example = "gtasga") + public String description; + public GetSavingsCurrency currency; + @ApiModelProperty(example = "5.000000") + public BigDecimal nominalAnnualInterestRate; + public GetSavingsProductsInterestCompoundingPeriodType interestCompoundingPeriodType; + public GetSavingsProductsInterestPostingPeriodType interestPostingPeriodType; + public GetSavingsProductsInterestCalculationType interestCalculationType; + public GetSavingsProductsInterestCalculationDaysInYearType interestCalculationDaysInYearType; + @ApiModelProperty(example = "false") + public Boolean withdrawalFeeForTransfers; + public GetSavingsProductsAccountingRule accountingRule; + } + + @ApiModel(value = "GetSavingsProductsProductIdResponse") + public final static class GetSavingsProductsProductIdResponse { + private GetSavingsProductsProductIdResponse() { + } + + final class GetSavingsProductsAccountingMappings { + private GetSavingsProductsAccountingMappings() { + } + + final class GetSavingsProductsSavingsReferenceAccount { + private GetSavingsProductsSavingsReferenceAccount() { + } + + @ApiModelProperty(example = "12") + public Integer id; + @ApiModelProperty(example = "savings ref") + public String name; + @ApiModelProperty(example = "20") + public Integer glCode; + } + + final class GetSavingsProductsIncomeFromFeeAccount { + private GetSavingsProductsIncomeFromFeeAccount() { + } + + @ApiModelProperty(example = "16") + public Integer id; + @ApiModelProperty(example = "income from savings fee") + public String name; + @ApiModelProperty(example = "24") + public Integer glCode; + } + + final class GetSavingsProductsIncomeFromPenaltyAccount { + private GetSavingsProductsIncomeFromPenaltyAccount() { + } + + @ApiModelProperty(example = "17") + public Integer id; + @ApiModelProperty(example = "income from sav penalties") + public String name; + @ApiModelProperty(example = "25") + public Integer glCode; + } + + final class GetSavingsProductsInterestOnSavingsAccount { + private GetSavingsProductsInterestOnSavingsAccount() { + } + + @ApiModelProperty(example = "15") + public Integer id; + @ApiModelProperty(example = "interest on savings") + public String name; + @ApiModelProperty(example = "23") + public Integer glCode; + } + + final class GetSavingsProductsSavingsControlAccount { + private GetSavingsProductsSavingsControlAccount() { + } + + @ApiModelProperty(example = "13") + public Integer id; + @ApiModelProperty(example = "savings ref tool kit") + public String name; + @ApiModelProperty(example = "21") + public Integer glCode; + } + + final class GetSavingsProductsTransfersInSuspenseAccount { + private GetSavingsProductsTransfersInSuspenseAccount() { + } + + @ApiModelProperty(example = "14") + public Integer id; + @ApiModelProperty(example = "saving transfers") + public String name; + @ApiModelProperty(example = "22") + public Integer glCode; + } + + public GetSavingsProductsSavingsReferenceAccount savingsReferenceAccount; + public GetSavingsProductsIncomeFromFeeAccount incomeFromFeeAccount; + public GetSavingsProductsIncomeFromPenaltyAccount incomeFromPenaltyAccount; + public GetSavingsProductsInterestOnSavingsAccount interestOnSavingsAccount; + public GetSavingsProductsSavingsControlAccount savingsControlAccount; + public GetSavingsProductsTransfersInSuspenseAccount transfersInSuspenseAccount; + } + + final class GetSavingsProductsPaymentChannelToFundSourceMappings { + private GetSavingsProductsPaymentChannelToFundSourceMappings() { + } + + final class GetSavingsProductsPaymentType { + private GetSavingsProductsPaymentType() { + } + + @ApiModelProperty(example = "10") + public Integer id; + @ApiModelProperty(example = "check") + public String name; + } + + final class GetSavingsProductsFundSourceAccount { + private GetSavingsProductsFundSourceAccount() { + } + + @ApiModelProperty(example = "12") + public Integer id; + @ApiModelProperty(example = "savings ref") + public String name; + @ApiModelProperty(example = "20") + public Integer glCode; + } + + public GetSavingsProductsPaymentType paymentType; + public GetSavingsProductsFundSourceAccount fundSourceAccount; + } + + final class GetSavingsProductsFeeToIncomeAccountMappings { + private GetSavingsProductsFeeToIncomeAccountMappings() { + } + + final class GetSavingsProductsFeeToIncomeAccountMappingsCharge { + private GetSavingsProductsFeeToIncomeAccountMappingsCharge() { + } + + @ApiModelProperty(example = "11") + public Integer id; + @ApiModelProperty(example = "sav charge") + public String name; + @ApiModelProperty(example = "false") + public Boolean active; + @ApiModelProperty(example = "false") + public Boolean penalty; + } + + final class GetSavingsProductsFeeToIncomeAccountMappingsIncomeAccount { + private GetSavingsProductsFeeToIncomeAccountMappingsIncomeAccount() { + } + + @ApiModelProperty(example = "16") + public Integer id; + @ApiModelProperty(example = "income from savings fee") + public String name; + @ApiModelProperty(example = "24") + public Integer glCode; + } + + public GetSavingsProductsFeeToIncomeAccountMappingsCharge charge; + public GetSavingsProductsFeeToIncomeAccountMappingsIncomeAccount incomeAccount; + } + + final class GetSavingsProductsPenaltyToIncomeAccountMappings { + private GetSavingsProductsPenaltyToIncomeAccountMappings() { + } + + final class GetSavingsProductsPenaltyToIncomeAccountMappingsCharge { + private GetSavingsProductsPenaltyToIncomeAccountMappingsCharge() { + } + + @ApiModelProperty(example = "12") + public Integer id; + @ApiModelProperty(example = "sav 2") + public String name; + @ApiModelProperty(example = "false") + public Boolean active; + @ApiModelProperty(example = "true") + public Boolean penalty; + } + + public GetSavingsProductsPenaltyToIncomeAccountMappingsCharge charge; + public GetSavingsProductsAccountingMappings.GetSavingsProductsIncomeFromPenaltyAccount incomeAccount; + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "savings product") + public String name; + @ApiModelProperty(example = "sa1") + public String shortName; + @ApiModelProperty(example = "gtasga") + public String description; + public GetSavingsProductsResponse.GetSavingsCurrency currency; + @ApiModelProperty(example = "5") + public BigDecimal nominalAnnualInterestRate; + public GetSavingsProductsResponse.GetSavingsProductsInterestCompoundingPeriodType interestCompoundingPeriodType; + public GetSavingsProductsResponse.GetSavingsProductsInterestPostingPeriodType interestPostingPeriodType; + public GetSavingsProductsResponse.GetSavingsProductsInterestCalculationType interestCalculationType; + public GetSavingsProductsResponse.GetSavingsProductsInterestCalculationDaysInYearType interestCalculationDaysInYearType; + @ApiModelProperty(example = "false") + public Boolean withdrawalFeeForTransfers; + public GetSavingsProductsResponse.GetSavingsProductsAccountingRule accountingRule; + public GetSavingsProductsAccountingMappings accountingMappings; + public Set paymentChannelToFundSourceMappings; + public Set feeToIncomeAccountMappings; + public Set penaltyToIncomeAccountMappings; + @ApiModelProperty(example = "[]") + public List charges; + } + + @ApiModel(value = "GetSavingsProductsTemplateResponse") + public final static class GetSavingsProductsTemplateResponse { + private GetSavingsProductsTemplateResponse() { + } + + final class GetSavingsProductsTemplateAccountingRule { + private GetSavingsProductsTemplateAccountingRule() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "accountingRuleType.none") + public String code; + @ApiModelProperty(example = "NONE") + public String value; + } + + final class GetSavingsProductsLockinPeriodFrequencyTypeOptions { + private GetSavingsProductsLockinPeriodFrequencyTypeOptions() { + } + + @ApiModelProperty(example = "0") + public Integer id; + @ApiModelProperty(example = "savings.lockin.savingsPeriodFrequencyType.days") + public String code; + @ApiModelProperty(example = "Days") + public String value; + } + + final class GetSavingsProductsWithdrawalFeeTypeOptions { + private GetSavingsProductsWithdrawalFeeTypeOptions() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "savingsWithdrawalFeesType.flat") + public String code; + @ApiModelProperty(example = "Flat") + public String value; + } + + final class GetSavingsProductsPaymentTypeOptions { + private GetSavingsProductsPaymentTypeOptions() { + } + + @ApiModelProperty(example = "14") + public Integer id; + @ApiModelProperty(example = "Wire Transfer") + public String name; + @ApiModelProperty(example = "0") + public Integer position; + } + + final class GetSavingsProductsAccountingMappingOptions { + private GetSavingsProductsAccountingMappingOptions() { + } + + final class GetSavingsProductsLiabilityAccountOptions { + private GetSavingsProductsLiabilityAccountOptions() { + } + + final class GetSavingsProductsLiabilityType { + private GetSavingsProductsLiabilityType() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "accountType.liability") + public String code; + @ApiModelProperty(example = "LIABILITY") + public String value; + } + + final class GetSavingsProductsLiabilityUsage { + private GetSavingsProductsLiabilityUsage() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "accountUsage.detail") + public String code; + @ApiModelProperty(example = "DETAIL") + public String value; + } + + final class GetSavingsProductsLiabilityTagId { + private GetSavingsProductsLiabilityTagId() { + } + + @ApiModelProperty(example = "0") + public Integer id; + } + + @ApiModelProperty(example = "15") + public Integer id; + @ApiModelProperty(example = "Savings Control") + public String name; + @ApiModelProperty(example = "50001") + public Integer glCode; + @ApiModelProperty(example = "false") + public Boolean disabled; + @ApiModelProperty(example = "true") + public Boolean manualEntriesAllowed; + public GetSavingsProductsLiabilityType type; + public GetSavingsProductsLiabilityUsage usage; + @ApiModelProperty(example = "Savings Control") + public String nameDecorated; + public GetSavingsProductsLiabilityTagId tagId; + } + + final class GetSavingsProductsAssetAccountOptions { + private GetSavingsProductsAssetAccountOptions() { + } + + final class GetSavingsAssetLiabilityType { + private GetSavingsAssetLiabilityType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "accountType.asset") + public String code; + @ApiModelProperty(example = "ASSET") + public String value; + } + + final class GetSavingsAssetTagId { + private GetSavingsAssetTagId() { + } + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "Cash") + public String name; + @ApiModelProperty(example = "100001") + public Integer glCode; + @ApiModelProperty(example = "false") + public Boolean disabled; + @ApiModelProperty(example = "true") + public Boolean manualEntriesAllowed; + public GetSavingsAssetLiabilityType type; + public GetSavingsProductsLiabilityAccountOptions.GetSavingsProductsLiabilityUsage usage; + public GetSavingsAssetTagId tagId; + } + + final class GetSavingsProductsExpenseAccountOptions { + private GetSavingsProductsExpenseAccountOptions() { + } + + final class GetSavingsProductsExpenseType { + private GetSavingsProductsExpenseType() { + } + + @ApiModelProperty(example = "5") + public Integer id; + @ApiModelProperty(example = "accountType.expense") + public String code; + @ApiModelProperty(example = "EXPENSE") + public String value; + } + + @ApiModelProperty(example = "6") + public Integer id; + @ApiModelProperty(example = "Write Off Expenses") + public String name; + @ApiModelProperty(example = "60001") + public Integer glCode; + @ApiModelProperty(example = "false") + public Boolean disabled; + @ApiModelProperty(example = "true") + public Boolean manualEntriesAllowed; + public GetSavingsProductsExpenseType type; + public GetSavingsProductsLiabilityAccountOptions.GetSavingsProductsLiabilityUsage usage; + public GetSavingsProductsAssetAccountOptions.GetSavingsAssetTagId tagId; + } + + final class GetSavingsProductsIncomeAccountOptions { + private GetSavingsProductsIncomeAccountOptions() { + } + + final class GetSavingsProductsIncomeType { + private GetSavingsProductsIncomeType() { + } + + @ApiModelProperty(example = "4") + public Integer id; + @ApiModelProperty(example = "accountType.income") + public String code; + @ApiModelProperty(example = "INCOME") + public String value; + } + + @ApiModelProperty(example = "3") + public Integer id; + @ApiModelProperty(example = "income from interest") + public String name; + @ApiModelProperty(example = "40001") + public Integer glCode; + @ApiModelProperty(example = "false") + public Boolean disabled; + @ApiModelProperty(example = "true") + public Boolean manualEntriesAllowed; + public GetSavingsProductsIncomeType type; + public GetSavingsProductsLiabilityAccountOptions.GetSavingsProductsLiabilityUsage usage; + public GetSavingsProductsAssetAccountOptions.GetSavingsAssetTagId tagId; + + } + + public Set liabilityAccountOptions; + public Set assetAccountOptions; + public Set expenseAccountOptions; + public Set incomeAccountOptions; + } + + final class GetSavingsProductsChargeOptions { + private GetSavingsProductsChargeOptions() { + } + + final class GetSavingsChargeTimeType { + private GetSavingsChargeTimeType() { + } + + @ApiModelProperty(example = "chargeTimeType.specifiedDueDate") + public String code; + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "Specified due date") + public String value; + } + + final class GetSavingsProductsChargeAppliesTo { + private GetSavingsProductsChargeAppliesTo() { + } + + @ApiModelProperty(example = "chargeAppliesTo.savings") + public String code; + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "Savings") + public String value; + } + + final class GetSavingsChargeCalculationType { + private GetSavingsChargeCalculationType() { + } + + @ApiModelProperty(example = "chargeCalculationType.flat") + public String code; + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "Flat") + public String value; + } + + final class GetSavingsChargePaymentMode { + private GetSavingsChargePaymentMode() { + } + + @ApiModelProperty(example = "chargepaymentmode.regular") + public String code; + @ApiModelProperty(example = "0") + public Integer id; + @ApiModelProperty(example = "chargepaymentmode.regular") + public String value; + } + + @ApiModelProperty(example = "true") + public Boolean active; + @ApiModelProperty(example = "200") + public Long amount; + public GetSavingsProductsChargeAppliesTo chargeAppliesTo; + public GetSavingsChargeCalculationType chargeCalculationType; + public GetSavingsChargePaymentMode chargePaymentMode; + public GetSavingsChargeTimeType chargeTimeType; + public GetSavingsProductsResponse.GetSavingsCurrency currency; + @ApiModelProperty(example = "4") + public Integer id; + @ApiModelProperty(example = "Savings charge 1") + public String name; + @ApiModelProperty(example = "false") + public Boolean penalty; + } + + public GetSavingsProductsResponse.GetSavingsCurrency currency; + public GetSavingsProductsResponse.GetSavingsProductsInterestCompoundingPeriodType interestCompoundingPeriodType; + public GetSavingsProductsResponse.GetSavingsProductsInterestPostingPeriodType interestPostingPeriodType; + public GetSavingsProductsResponse.GetSavingsProductsInterestCalculationType interestCalculationType; + public GetSavingsProductsResponse.GetSavingsProductsInterestCalculationDaysInYearType interestCalculationDaysInYearType; + public GetSavingsProductsTemplateAccountingRule accountingRule; + public Set currencyOptions; + public Set interestCompoundingPeriodTypeOptions; + public Set interestPostingPeriodTypeOptions; + public Set interestCalculationTypeOptions; + public Set interestCalculationDaysInYearTypeOptions; + public Set lockinPeriodFrequencyTypeOptions; + public Set withdrawalFeeTypeOptions; + public Set paymentTypeOptions; + public Set accountingRuleOptions; + public Set accountingMappingOptions; + public Set chargeOptions; + } + + @ApiModel(value = "DeleteSavingsProductsProductIdResponse") + public final static class DeleteSavingsProductsProductIdResponse { + private DeleteSavingsProductsProductIdResponse() { + } + + @ApiModelProperty(example = "1") + public Integer resourceId; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/account/api/SelfBeneficiariesTPTApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/account/api/SelfBeneficiariesTPTApiResource.java index 5f2ff4838..0990fe4c5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/account/api/SelfBeneficiariesTPTApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/account/api/SelfBeneficiariesTPTApiResource.java @@ -18,23 +18,7 @@ */ package org.apache.fineract.portfolio.self.account.api; -import java.util.Arrays; -import java.util.Collection; -import java.util.HashSet; -import java.util.Set; - -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - +import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -52,9 +36,19 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; + @Path("/self/beneficiaries/tpt") @Component @Scope("singleton") +@Api(value = "Beneficiary Third Party Transfer", description = "") public class SelfBeneficiariesTPTApiResource { private final PlatformSecurityContext context; @@ -88,6 +82,8 @@ public class SelfBeneficiariesTPTApiResource { @Path("template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Beneficiary Third Party Transfer Template", httpMethod = "GET", notes = "Returns Account Type enumerations. Self User is expected to know office name and account number to be able to add beneficiary.\n" + "\n" + "Example Requests:\n" + "\n" + "/self/beneficiaries/tpt/template") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SelfBeneficiariesTPTApiResourceSwagger.GetSelfBeneficiariesTPTTemplateResponse.class)}) public String template(@Context final UriInfo uriInfo) { final EnumOptionData loanAccountType = AccountTransferEnumerations @@ -109,7 +105,10 @@ public class SelfBeneficiariesTPTApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String add(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Add TPT Beneficiary", httpMethod = "POST", notes = "Api to add third party beneficiary linked to current user.\n" + "\n" + "Parameter Definitions\n" + "\n" + "name : Nick name for beneficiary, should be unique for an self service user\n" + "\n" + "officeName : Office Name of beneficiary(not id)\n" + "\n" + "accountNumber : Account Number of beneficiary(not id)\n" + "\n" + "transferLimit : Each transfer initiated to this account will not exceed this amount\n" + "\n" + "Example Requests:\n" + "\n" + "/self/beneficiaries/tpt\n\n" + "Mandatory Fields: name, officeName, accountNumber, accountType\n\n" + "Optional Fields: transferLimit") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = SelfBeneficiariesTPTApiResourceSwagger.PostSelfBeneficiariesTPTRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SelfBeneficiariesTPTApiResourceSwagger.PostSelfBeneficiariesTPTResponse.class)}) + public String add(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() .addSelfServiceBeneficiaryTPT().withJson(apiRequestBodyAsJson) @@ -123,8 +122,11 @@ public class SelfBeneficiariesTPTApiResource { @Path("{beneficiaryId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String update(@PathParam("beneficiaryId") final Long beneficiaryId, - final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update TPT Beneficiary", httpMethod = "PUT", notes = "Api to update third party beneficiary linked to current user.\n" + "\n" + "Example Requests:\n" + "\n" + "/self/beneficiaries/tpt/{beneficiaryId}\n\n" + "Optional Fields: name, transferLimit") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = SelfBeneficiariesTPTApiResourceSwagger.PutSelfBeneficiariesTPTBeneficiaryIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200,message = "OK", response = SelfBeneficiariesTPTApiResourceSwagger.PutSelfBeneficiariesTPTBeneficiaryIdResponse.class)}) + public String update(@PathParam("beneficiaryId") @ApiParam(value = "beneficiaryId") final Long beneficiaryId, + @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() .updateSelfServiceBeneficiaryTPT(beneficiaryId) @@ -138,8 +140,10 @@ public class SelfBeneficiariesTPTApiResource { @Path("{beneficiaryId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Delete TPT Beneficiary", httpMethod = "DELETE", notes = "Api to delete third party beneficiary linked to current user.\n" + "\n" + "Example Requests:\n" + "\n" + "/self/beneficiaries/tpt/{beneficiaryId}") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SelfBeneficiariesTPTApiResourceSwagger.DeleteSelfBeneficiariesTPTBeneficiaryIdResponse.class)}) public String delete(@PathParam("beneficiaryId") final Long beneficiaryId, - final String apiRequestBodyAsJson) { + @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() .deleteSelfServiceBeneficiaryTPT(beneficiaryId) @@ -152,6 +156,8 @@ public class SelfBeneficiariesTPTApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Get All TPT Beneficiary", httpMethod = "GET", notes = "Api to get all third party beneficiary linked to current user.\n" + "\n" + "Example Requests:\n" + "\n" + "/self/beneficiaries/tpt") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SelfBeneficiariesTPTApiResourceSwagger.GetSelfBeneficiariesTPTResponse.class, responseContainer = "List")}) public String retrieveAll(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission( diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/account/api/SelfBeneficiariesTPTApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/account/api/SelfBeneficiariesTPTApiResourceSwagger.java new file mode 100644 index 000000000..810fc3683 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/account/api/SelfBeneficiariesTPTApiResourceSwagger.java @@ -0,0 +1,141 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.self.account.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.Set; + +/** + * Created by Chirag Gupta on 12/22/17. + */ +final class SelfBeneficiariesTPTApiResourceSwagger { + private SelfBeneficiariesTPTApiResourceSwagger() { + } + + @ApiModel(value = "GetSelfBeneficiariesTPTTemplateResponse") + public final static class GetSelfBeneficiariesTPTTemplateResponse { + private GetSelfBeneficiariesTPTTemplateResponse() { + } + + final class GetSelfBeneficiariesAccountOptions { + private GetSelfBeneficiariesAccountOptions() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "accountType.savings") + public String code; + @ApiModelProperty(example = "Savings Account") + public String value; + } + + public Set accountTypeOptions; + } + + @ApiModel(value = "PostSelfBeneficiariesTPTRequest") + public final static class PostSelfBeneficiariesTPTRequest { + private PostSelfBeneficiariesTPTRequest() { + } + + @ApiModelProperty(example = "en_GB") + public String locale; + @ApiModelProperty(example = "beneficiary nick name") + public String name; + @ApiModelProperty(example = "HEAD OFFICE") + public String officeName; + @ApiModelProperty(example = "0000001") + public Long accountNumber; + @ApiModelProperty(example = "1") + public Integer accountType; + @ApiModelProperty(example = "1000") + public Integer transferLimit; + } + + @ApiModel(value = "PostSelfBeneficiariesTPTResponse") + public final static class PostSelfBeneficiariesTPTResponse { + private PostSelfBeneficiariesTPTResponse() { + } + + @ApiModelProperty(example = "5") + public Integer resourceId; + } + + @ApiModel(value = "PutSelfBeneficiariesTPTBeneficiaryIdRequest") + public final static class PutSelfBeneficiariesTPTBeneficiaryIdRequest { + private PutSelfBeneficiariesTPTBeneficiaryIdRequest() { + } + + @ApiModelProperty(example = "beneficiary nick name") + public String name; + @ApiModelProperty(example = "1000") + public Integer transferLimit; + } + + @ApiModel(value = "PutSelfBeneficiariesTPTBeneficiaryIdResponse") + public final static class PutSelfBeneficiariesTPTBeneficiaryIdResponse { + private PutSelfBeneficiariesTPTBeneficiaryIdResponse() { + } + + final class PutSelfBeneficiariesChanges { + private PutSelfBeneficiariesChanges() { + } + + @ApiModelProperty(example = "1000") + public Integer transferLimit; + @ApiModelProperty(example = "Client22") + public String name; + } + + @ApiModelProperty(example = "5") + public Integer resourceId; + public PutSelfBeneficiariesChanges changes; + } + + @ApiModel(value = "DeleteSelfBeneficiariesTPTBeneficiaryIdResponse") + public final static class DeleteSelfBeneficiariesTPTBeneficiaryIdResponse { + private DeleteSelfBeneficiariesTPTBeneficiaryIdResponse() { + } + + @ApiModelProperty(example = "5") + public Integer resourceId; + } + + @ApiModel(value = "GetSelfBeneficiariesTPTResponse") + public final static class GetSelfBeneficiariesTPTResponse { + private GetSelfBeneficiariesTPTResponse() { + } + + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "Client2Savings") + public String name; + @ApiModelProperty(example = "Test Office") + public String officeName; + @ApiModelProperty(example = "FN2 LN2") + public String clientName; + public GetSelfBeneficiariesTPTTemplateResponse.GetSelfBeneficiariesAccountOptions accountType; + @ApiModelProperty(example = "000000002") + public Long accountNumber; + @ApiModelProperty(example = "0") + public Integer transferLimit; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/client/api/SelfClientsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/client/api/SelfClientsApiResource.java index b50c33ed4..a68bd902d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/client/api/SelfClientsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/client/api/SelfClientsApiResource.java @@ -18,18 +18,7 @@ */ package org.apache.fineract.portfolio.self.client.api; -import javax.ws.rs.Consumes; -import javax.ws.rs.DefaultValue; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.UriInfo; - +import io.swagger.annotations.*; import org.apache.fineract.infrastructure.documentmanagement.api.ImagesApiResource; import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; import org.apache.fineract.portfolio.client.api.ClientApiConstants; @@ -44,9 +33,16 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; +import javax.ws.rs.core.UriInfo; + @Path("/self/clients") @Component @Scope("singleton") +@Api(value = "Self Client", description = "") public class SelfClientsApiResource { private final PlatformSecurityContext context; @@ -78,14 +74,16 @@ public class SelfClientsApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "List Clients associated to the user", httpMethod = "GET", notes = "The list capability of clients can support pagination and sorting.\n\n" + "Example Requests:\n" + "\n" + "self/clients\n" + "\n" + "self/clients?fields=displayName,officeName\n" + "\n" + "self/clients?offset=10&limit=50\n" + "\n" + "self/clients?orderBy=displayName&sortOrder=DESC") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SelfClientsApiResourceSwagger.GetSelfClientsResponse.class)}) public String retrieveAll(@Context final UriInfo uriInfo, - @QueryParam("displayName") final String displayName, - @QueryParam("firstName") final String firstname, - @QueryParam("lastName") final String lastname, - @QueryParam("offset") final Integer offset, - @QueryParam("limit") final Integer limit, - @QueryParam("orderBy") final String orderBy, - @QueryParam("sortOrder") final String sortOrder) { + @QueryParam("displayName") @ApiParam(value = "displayName") final String displayName, + @QueryParam("firstName") @ApiParam(value = "firstName") final String firstname, + @QueryParam("lastName") @ApiParam(value = "lastName") final String lastname, + @QueryParam("offset") @ApiParam(value = "offset") final Integer offset, + @QueryParam("limit") @ApiParam(value = "limit") final Integer limit, + @QueryParam("orderBy") @ApiParam(value = "orderBy") final String orderBy, + @QueryParam("sortOrder") @ApiParam(value = "sortOrder") final String sortOrder) { final String sqlSearch = null; final Long officeId = null; @@ -101,7 +99,9 @@ public class SelfClientsApiResource { @Path("{clientId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveOne(@PathParam("clientId") final Long clientId, + @ApiOperation(value = "Retrieve a Client", httpMethod = "GET", notes = "Retrieves a Client\n\n" + "Example Requests:\n" + "\n" + "self/clients/1\n" + "\n" + "self/clients/1?fields=id,displayName,officeName") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SelfClientsApiResourceSwagger.GetSelfClientsClientIdResponse.class)}) + public String retrieveOne(@PathParam("clientId") @ApiParam(value = "clientId") final Long clientId, @Context final UriInfo uriInfo) { this.dataValidator.validateRetrieveOne(uriInfo); @@ -117,8 +117,10 @@ public class SelfClientsApiResource { @Path("{clientId}/accounts") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Retrieve client accounts overview", httpMethod = "GET", notes = "An example of how a loan portfolio summary can be provided. This is requested in a specific use case of the community application.\n" + "It is quite reasonable to add resources like this to simplify User Interface development.\n" + "\n" + "Example Requests:\n" + "\n" + "self/clients/1/accounts\n" + "\n" + "\n" + "self/clients/1/accounts?fields=loanAccounts,savingsAccounts") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SelfClientsApiResourceSwagger.GetSelfClientsClientIdAccountsResponse.class)}) public String retrieveAssociatedAccounts( - @PathParam("clientId") final Long clientId, + @PathParam("clientId") @ApiParam(value = "clientId") final Long clientId, @Context final UriInfo uriInfo) { validateAppuserClientsMapping(clientId); @@ -132,10 +134,12 @@ public class SelfClientsApiResource { @Consumes({ MediaType.TEXT_PLAIN, MediaType.TEXT_HTML, MediaType.APPLICATION_JSON }) @Produces({ MediaType.TEXT_PLAIN }) - public Response retrieveImage(@PathParam("clientId") final Long clientId, - @QueryParam("maxWidth") final Integer maxWidth, - @QueryParam("maxHeight") final Integer maxHeight, - @QueryParam("output") final String output) { + @ApiOperation(value = "Retrieve Client Image", httpMethod = "GET", notes = "Optional arguments are identical to those of Get Image associated with an Entity (Binary file)\n" + "\n" + "Example Requests:\n" + "\n" + "self/clients/1/images") + @ApiResponses({@ApiResponse(code = 200, message = "OK")}) + public Response retrieveImage(@PathParam("clientId") @ApiParam(value = "clientId") final Long clientId, + @QueryParam("maxWidth") @ApiParam(example = "maxWidth") final Integer maxWidth, + @QueryParam("maxHeight") @ApiParam(example = "maxHeight") final Integer maxHeight, + @QueryParam("output") @ApiParam(example = "output") final String output) { validateAppuserClientsMapping(clientId); @@ -147,13 +151,15 @@ public class SelfClientsApiResource { @Path("{clientId}/charges") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "List Client Charges", httpMethod = "GET", notes = "The list capability of client charges supports pagination.\n\n" + "Example Requests:\n" + "\n" + "self/clients/1/charges\n\n" + "self/clients/1/charges?offset=0&limit=5") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SelfClientsApiResourceSwagger.GetSelfClientsClientIdChargesResponse.class)}) public String retrieveAllClientCharges( - @PathParam("clientId") final Long clientId, - @DefaultValue(ClientApiConstants.CLIENT_CHARGE_QUERY_PARAM_STATUS_VALUE_ALL) @QueryParam(ClientApiConstants.CLIENT_CHARGE_QUERY_PARAM_STATUS) final String chargeStatus, - @QueryParam("pendingPayment") final Boolean pendingPayment, + @PathParam("clientId") @ApiParam(value = "clientId") final Long clientId, + @DefaultValue(ClientApiConstants.CLIENT_CHARGE_QUERY_PARAM_STATUS_VALUE_ALL) @QueryParam(ClientApiConstants.CLIENT_CHARGE_QUERY_PARAM_STATUS) @ApiParam(value = "chargeStatus") final String chargeStatus, + @QueryParam("pendingPayment") @ApiParam(value = "pendingPayment") final Boolean pendingPayment, @Context final UriInfo uriInfo, - @QueryParam("limit") final Integer limit, - @QueryParam("offset") final Integer offset) { + @QueryParam("limit") @ApiParam(value = "limit") final Integer limit, + @QueryParam("offset") @ApiParam(value = "offset") final Integer offset) { validateAppuserClientsMapping(clientId); @@ -165,9 +171,11 @@ public class SelfClientsApiResource { @Path("{clientId}/charges/{chargeId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Retrieve a Client Charge", httpMethod = "GET", notes = "Retrieves a Client Charge\n\n" + "Example Requests:\n" + "\n" + "self/clients/1/charges/1\n" + "\n" + "\n" + "self/clients/1/charges/1?fields=name,id") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SelfClientsApiResourceSwagger.GetSelfClientsClientIdChargesChargeIdResponse.class)}) public String retrieveClientCharge( - @PathParam("clientId") final Long clientId, - @PathParam("chargeId") final Long chargeId, + @PathParam("clientId") @ApiParam(value = "clientId") final Long clientId, + @PathParam("chargeId") @ApiParam(value = "chargeId") final Long chargeId, @Context final UriInfo uriInfo) { this.dataValidator.validateClientCharges(uriInfo); @@ -182,11 +190,13 @@ public class SelfClientsApiResource { @Path("{clientId}/transactions") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "List Client Transactions", httpMethod = "GET", notes = "The list capability of client transaction can support pagination.\n\n" + "Example Requests:\n" + "\n" + "self/clients/189/transactions\n\n" + "self/clients/189/transactions?offset=10&limit=50") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SelfClientsApiResourceSwagger.GetSelfClientsClientIdTransactionsResponse.class)}) public String retrieveAllClientTransactions( - @PathParam("clientId") final Long clientId, + @PathParam("clientId") @ApiParam(value = "clientId") final Long clientId, @Context final UriInfo uriInfo, - @QueryParam("offset") final Integer offset, - @QueryParam("limit") final Integer limit) { + @QueryParam("offset") @ApiParam(value = "offset") final Integer offset, + @QueryParam("limit") @ApiParam(value = "limit") final Integer limit) { validateAppuserClientsMapping(clientId); @@ -198,9 +208,11 @@ public class SelfClientsApiResource { @Path("{clientId}/transactions/{transactionId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Retrieve a Client Transaction", httpMethod = "GET", notes = "Retrieves a Client Transaction" + "Example Requests:\n" + "\n" + "self/clients/1/transactions/1\n" + "\n" + "\n" + "self/clients/1/transactions/1?fields=id,officeName") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SelfClientsApiResourceSwagger.GetSelfClientsClientIdTransactionsTransactionIdResponse.class)}) public String retrieveClientTransaction( - @PathParam("clientId") final Long clientId, - @PathParam("transactionId") final Long transactionId, + @PathParam("clientId") @ApiParam(value = "clientId") final Long clientId, + @PathParam("transactionId") @ApiParam(value = "transactionId") final Long transactionId, @Context final UriInfo uriInfo) { validateAppuserClientsMapping(clientId); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/client/api/SelfClientsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/client/api/SelfClientsApiResourceSwagger.java new file mode 100644 index 000000000..d2e998982 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/client/api/SelfClientsApiResourceSwagger.java @@ -0,0 +1,439 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.self.client.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.time.LocalDate; +import java.util.List; +import java.util.Set; + +/** + * Created by Chirag Gupta on 12/21/17. + */ + +final class SelfClientsApiResourceSwagger { + private SelfClientsApiResourceSwagger() { + } + + @ApiModel(value = "GetSelfClientsResponse") + public final static class GetSelfClientsResponse { + private GetSelfClientsResponse() { + } + + final class GetSelfClientsPageItems { + private GetSelfClientsPageItems() { + } + + final class GetSelfClientsStatus { + private GetSelfClientsStatus() { + } + + @ApiModelProperty(example = "300") + public Integer id; + @ApiModelProperty(example = "clientStatusType.active") + public String code; + @ApiModelProperty(example = "Active") + public String value; + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "000000001") + public Long accountNo; + public GetSelfClientsStatus status; + @ApiModelProperty(example = "true") + public Boolean active; + @ApiModelProperty(example = "[2013, 3, 1]") + public LocalDate activationDate; + @ApiModelProperty(example = "Small shop") + public String fullname; + @ApiModelProperty(example = "Small shop") + public String displayName; + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "Head Office") + public String officeName; + } + + @ApiModelProperty(example = "2") + public Integer totalFilteredRecords; + public Set pageItems; + } + + @ApiModel(value = "GetSelfClientsClientIdResponse") + public final static class GetSelfClientsClientIdResponse { + private GetSelfClientsClientIdResponse() { + } + + final class GetSelfClientsTimeline { + private GetSelfClientsTimeline() { + } + + @ApiModelProperty(example = "[2013, 1, 1]") + public LocalDate submittedOnDate; + @ApiModelProperty(example = "mifos") + public String submittedByUsername; + @ApiModelProperty(example = "App") + public String submittedByFirstname; + @ApiModelProperty(example = "Administrator") + public String submittedByLastname; + @ApiModelProperty(example = "[2013, 1, 1]") + public LocalDate activatedOnDate; + @ApiModelProperty(example = "mifos") + public String activatedByUsername; + @ApiModelProperty(example = "App") + public String activatedByFirstname; + @ApiModelProperty(example = "Administrator") + public String activatedByLastname; + + } + + @ApiModelProperty(example = "27") + public Integer id; + @ApiModelProperty(example = "000000027") + public Long accountNo; + public GetSelfClientsResponse.GetSelfClientsPageItems.GetSelfClientsStatus status; + @ApiModelProperty(example = "true") + public Boolean active; + @ApiModelProperty(example = "[2013, 1, 1]") + public LocalDate activationDate; + @ApiModelProperty(example = "savings") + public String firstname; + @ApiModelProperty(example = "test") + public String lastname; + @ApiModelProperty(example = "savings test") + public String displayName; + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "Head Office") + public String officeName; + public GetSelfClientsTimeline timeline; + @ApiModelProperty(example = "4") + public Integer savingsProductId; + @ApiModelProperty(example = "account overdraft") + public String savingsProductName; + @ApiModelProperty(example = "") + public List groups; + } + + @ApiModel(value = "GetSelfClientsClientIdAccountsResponse") + public final static class GetSelfClientsClientIdAccountsResponse { + private GetSelfClientsClientIdAccountsResponse() { + } + + final class GetSelfClientsLoanAccounts { + private GetSelfClientsLoanAccounts() { + } + + final class GetSelfClientsLoanAccountsStatus { + private GetSelfClientsLoanAccountsStatus() { + } + + @ApiModelProperty(example = "300") + public Integer id; + @ApiModelProperty(example = "loanStatusType.active") + public String code; + @ApiModelProperty(example = "Active") + public String value; + @ApiModelProperty(example = "false") + public Boolean pendingApproval; + @ApiModelProperty(example = "false") + public Boolean waitingForDisbursal; + @ApiModelProperty(example = "true") + public Boolean active; + @ApiModelProperty(example = "false") + public Boolean closedObligationsMet; + @ApiModelProperty(example = "false") + public Boolean closedWrittenOff; + @ApiModelProperty(example = "false") + public Boolean closedRescheduled; + @ApiModelProperty(example = "false") + public Boolean closed; + @ApiModelProperty(example = "false") + public Boolean overpaid; + } + + final class GetSelfClientsLoanAccountsType { + private GetSelfClientsLoanAccountsType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "loanType.individual") + public String code; + @ApiModelProperty(example = "Individual") + public String value; + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "000000001") + public Long accountNo; + @ApiModelProperty(example = "456") + public Integer externalId; + @ApiModelProperty(example = "1") + public Integer productId; + @ApiModelProperty(example = "TestOne") + public String productName; + public GetSelfClientsLoanAccountsStatus status; + public GetSelfClientsLoanAccountsType loanType; + @ApiModelProperty(example = "1") + public Integer loanCycle; + } + + final class GetSelfClientsSavingsAccounts { + private GetSelfClientsSavingsAccounts() { + } + + final class GetSelfClientsSavingsAccountsCurrency { + private GetSelfClientsSavingsAccountsCurrency() { + } + + @ApiModelProperty(example = "USD") + public String code; + @ApiModelProperty(example = "US Dollar") + public String name; + @ApiModelProperty(example = "2") + public Integer decimalPlaces; + @ApiModelProperty(example = "$") + public String displaySymbol; + @ApiModelProperty(example = "currency.USD") + public String nameCode; + @ApiModelProperty(example = "US Dollar ($)") + public String displayLabel; + } + + final class GetSelfClientsSavingsAccountsStatus { + private GetSelfClientsSavingsAccountsStatus() { + } + + @ApiModelProperty(example = "100") + public Integer id; + @ApiModelProperty(example = "savingsAccountStatusType.submitted.and.pending.approval") + public String code; + @ApiModelProperty(example = "Submitted and pending approval") + public String value; + @ApiModelProperty(example = "true") + public Boolean submittedAndPendingApproval; + @ApiModelProperty(example = "false") + public Boolean approved; + @ApiModelProperty(example = "false") + public Boolean rejected; + @ApiModelProperty(example = "false") + public Boolean withdrawnByApplicant; + @ApiModelProperty(example = "false") + public Boolean active; + @ApiModelProperty(example = "false") + public Boolean closed; + } + + @ApiModelProperty(example = "7") + public Integer id; + @ApiModelProperty(example = "000000007") + public Long accountNo; + @ApiModelProperty(example = "2") + public Integer productId; + @ApiModelProperty(example = "Other product") + public String productName; + public GetSelfClientsSavingsAccountsStatus status; + public GetSelfClientsSavingsAccountsCurrency currency; + } + + public Set loanAccounts; + public Set savingsAccounts; + } + + @ApiModel(value = "GetSelfClientsClientIdChargesResponse") + public final static class GetSelfClientsClientIdChargesResponse { + private GetSelfClientsClientIdChargesResponse() { + } + + final class GetSelfClientsChargesPageItems { + private GetSelfClientsChargesPageItems() { + } + + final class GetSelfClientsChargeTimeType { + private GetSelfClientsChargeTimeType() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "chargeTimeType.specifiedDueDate") + public String code; + @ApiModelProperty(example = "Specified due date") + public String value; + } + + final class GetSelfClientsChargeCalculationType { + private GetSelfClientsChargeCalculationType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "chargeCalculationType.flat") + public String code; + @ApiModelProperty(example = "Flat") + public String value; + } + + @ApiModelProperty(example = "5") + public Integer id; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "6") + public Integer chargeId; + @ApiModelProperty(example = "Client Fees 2") + public String name; + public GetSelfClientsChargeTimeType chargeTimeType; + @ApiModelProperty(example = "[2015, 9, 1]") + public LocalDate dueDate; + public GetSelfClientsChargeCalculationType chargeCalculationType; + public GetSelfClientsClientIdAccountsResponse.GetSelfClientsSavingsAccounts.GetSelfClientsSavingsAccountsCurrency currency; + @ApiModelProperty(example = "550") + public Float amount; + @ApiModelProperty(example = "0") + public Float amountPaid; + @ApiModelProperty(example = "0") + public Float amountWaived; + @ApiModelProperty(example = "0") + public Float amountWrittenOff; + @ApiModelProperty(example = "550") + public Float amountOutstanding; + @ApiModelProperty(example = "false") + public Boolean penalty; + @ApiModelProperty(example = "true") + public Boolean isActive; + @ApiModelProperty(example = "false") + public Boolean isPaid; + @ApiModelProperty(example = "false") + public Boolean isWaived; + } + + @ApiModelProperty(example = "4") + public Integer totalFilteredRecords; + public Set pageItems; + } + + @ApiModel(value = "GetSelfClientsClientIdChargesChargeIdResponse") + public final static class GetSelfClientsClientIdChargesChargeIdResponse { + private GetSelfClientsClientIdChargesChargeIdResponse() { + } + + @ApiModelProperty(example = "3") + public Integer id; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "5") + public Integer chargeId; + @ApiModelProperty(example = "Client Fee 1") + public String name; + public GetSelfClientsClientIdChargesResponse.GetSelfClientsChargesPageItems.GetSelfClientsChargeTimeType chargeTimeType; + @ApiModelProperty(example = "[2015, 8, 17]") + public LocalDate dueDate; + public GetSelfClientsClientIdChargesResponse.GetSelfClientsChargesPageItems.GetSelfClientsChargeCalculationType chargeCalculationType; + public GetSelfClientsClientIdAccountsResponse.GetSelfClientsSavingsAccounts.GetSelfClientsSavingsAccountsCurrency currency; + @ApiModelProperty(example = "100") + public Float amount; + @ApiModelProperty(example = "0") + public Float amountPaid; + @ApiModelProperty(example = "100") + public Float amountWaived; + @ApiModelProperty(example = "0") + public Float amountWrittenOff; + @ApiModelProperty(example = "0") + public Float amountOutstanding; + @ApiModelProperty(example = "true") + public Boolean penalty; + @ApiModelProperty(example = "true") + public Boolean isActive; + @ApiModelProperty(example = "false") + public Boolean isPaid; + @ApiModelProperty(example = "true") + public Boolean isWaived; + } + + @ApiModel(value = "GetSelfClientsClientIdTransactionsResponse") + public final static class GetSelfClientsClientIdTransactionsResponse { + private GetSelfClientsClientIdTransactionsResponse() { + } + + final class GetSelfClientsClientIdTransactionsPageItems { + private GetSelfClientsClientIdTransactionsPageItems() { + } + + final class GetSelfClientsClientIdTransactionsType { + private GetSelfClientsClientIdTransactionsType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "clientTransactionType.payCharge") + public String code; + @ApiModelProperty(example = "PAY_CHARGE") + public String value; + } + + @ApiModelProperty(example = "226") + public Integer id; + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "Head Office") + public String officeName; + public GetSelfClientsClientIdTransactionsType type; + @ApiModelProperty(example = "[2015, 9, 2]") + public LocalDate date; + public GetSelfClientsClientIdAccountsResponse.GetSelfClientsSavingsAccounts.GetSelfClientsSavingsAccountsCurrency currency; + @ApiModelProperty(example = "22") + public Double amount; + @ApiModelProperty(example = "[2015, 9, 2]") + public LocalDate submittedOnDate; + @ApiModelProperty(example = "false") + public Boolean reversed; + } + + @ApiModelProperty(example = "20") + public Integer totalFilteredRecords; + public Set pageItems; + } + + @ApiModel(value = "GetSelfClientsClientIdTransactionsTransactionIdResponse") + public final static class GetSelfClientsClientIdTransactionsTransactionIdResponse { + private GetSelfClientsClientIdTransactionsTransactionIdResponse() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "Head Office") + public String officeName; + public GetSelfClientsClientIdTransactionsResponse.GetSelfClientsClientIdTransactionsPageItems.GetSelfClientsClientIdTransactionsType type; + @ApiModelProperty(example = "[2015, 8, 17]") + public LocalDate date; + public GetSelfClientsClientIdAccountsResponse.GetSelfClientsSavingsAccounts.GetSelfClientsSavingsAccountsCurrency currency; + @ApiModelProperty(example = "60.000000") + public Float amount; + @ApiModelProperty(example = "[2015, 8, 19]") + public LocalDate submittedOnDate; + @ApiModelProperty(example = "true") + public Boolean reversed; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/loanaccount/api/SelfLoansApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/loanaccount/api/SelfLoansApiResource.java index 728175288..f747de999 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/loanaccount/api/SelfLoansApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/loanaccount/api/SelfLoansApiResource.java @@ -18,20 +18,7 @@ */ package org.apache.fineract.portfolio.self.loanaccount.api; -import java.util.HashMap; - -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - +import io.swagger.annotations.*; import org.apache.commons.lang.StringUtils; import org.apache.fineract.infrastructure.core.exception.UnrecognizedQueryParamException; import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; @@ -50,9 +37,16 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; +import java.util.HashMap; + @Path("/self/loans") @Component @Scope("singleton") +@Api(value = "Self Loans", description = "") public class SelfLoansApiResource { private final PlatformSecurityContext context; @@ -84,7 +78,9 @@ public class SelfLoansApiResource { @Path("{loanId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveLoan(@PathParam("loanId") final Long loanId, + @ApiOperation(value = "Retrieve a Loan", httpMethod = "GET", notes = "Retrieves a Loan\n\n" + "Example Requests:\n" + "\n" + "self/loans/1\n" + "\n" + "\n" + "self/loans/1?fields=id,principal,annualInterestRate\n" + "\n" + "\n" + "self/loans/1?fields=id,principal,annualInterestRate&associations=repaymentSchedule,transactions") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SelfLoansApiResourceSwagger.GetSelfLoansLoanIdResponse.class)}) + public String retrieveLoan(@PathParam("loanId") @ApiParam(value = "loanId") final Long loanId, @Context final UriInfo uriInfo) { this.dataValidator.validateRetrieveLoan(uriInfo); @@ -100,8 +96,10 @@ public class SelfLoansApiResource { @Path("{loanId}/transactions/{transactionId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveTransaction(@PathParam("loanId") final Long loanId, - @PathParam("transactionId") final Long transactionId, + @ApiOperation(value = "Retrieve a Loan Transaction Details", httpMethod = "GET", notes = "Retrieves a Loan Transaction Details" + "Example Request:\n" + "\n" + "self/loans/5/transactions/3") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SelfLoansApiResourceSwagger.GetSelfLoansLoanIdTransactionsTransactionIdResponse.class)}) + public String retrieveTransaction(@PathParam("loanId") @ApiParam(value = "loanId") final Long loanId, + @PathParam("transactionId") @ApiParam(value = "transactionId") final Long transactionId, @Context final UriInfo uriInfo) { this.dataValidator.validateRetrieveTransaction(uriInfo); @@ -116,8 +114,10 @@ public class SelfLoansApiResource { @Path("{loanId}/charges") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "List Loan Charges", httpMethod = "GET", notes = "Lists loan Charges\n\n" + "Example Requests:\n" + "\n" + "self/loans/1/charges\n" + "\n" + "\n" + "self/loans/1/charges?fields=name,amountOrPercentage") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SelfLoansApiResourceSwagger.GetSelfLoansLoanIdChargesResponse.class, responseContainer = "List")}) public String retrieveAllLoanCharges( - @PathParam("loanId") final Long loanId, + @PathParam("loanId") @ApiParam(value = "loanId") final Long loanId, @Context final UriInfo uriInfo) { validateAppuserLoanMapping(loanId); @@ -130,8 +130,10 @@ public class SelfLoansApiResource { @Path("{loanId}/charges/{chargeId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveLoanCharge(@PathParam("loanId") final Long loanId, - @PathParam("chargeId") final Long loanChargeId, + @ApiOperation(value = "Retrieve a Loan Charge", httpMethod = "GET", notes = "Retrieves a Loan Charge\n\n" + "Example Requests:\n" + "\n" + "self/loans/1/charges/1\n" + "\n" + "\n" + "self/loans/1/charges/1?fields=name,amountOrPercentage") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SelfLoansApiResourceSwagger.GetSelfLoansLoanIdChargesResponse.class)}) + public String retrieveLoanCharge(@PathParam("loanId") @ApiParam(value = "loanId") final Long loanId, + @PathParam("chargeId") @ApiParam(value = "chargeId") final Long loanChargeId, @Context final UriInfo uriInfo) { validateAppuserLoanMapping(loanId); @@ -143,9 +145,11 @@ public class SelfLoansApiResource { @Path("template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String template(@QueryParam("clientId") final Long clientId, - @QueryParam("productId") final Long productId, - @QueryParam("templateType") final String templateType, + @ApiOperation(value = "Retrieve Loan Details Template", httpMethod = "GET", notes = "Retrieves Loan Details Template\n\n" + "This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n" + "\n" + "Field Defaults\n" + "Allowed Value Lists\n\n" + "Example Requests:\n" + "\n" + "self/loans/template?templateType=individual&clientId=1\n" + "\n" + "\n" + "self/loans/template?templateType=individual&clientId=1&productId=1") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SelfLoansApiResourceSwagger.GetSelfLoansTemplateResponse.class)}) + public String template(@QueryParam("clientId") @ApiParam(value = "clientId") final Long clientId, + @QueryParam("productId") @ApiParam(value = "productId") final Long productId, + @QueryParam("templateType") @ApiParam(value = "templateType") final String templateType, @Context final UriInfo uriInfo) { if(clientId != null){ @@ -171,8 +175,11 @@ public class SelfLoansApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String calculateLoanScheduleOrSubmitLoanApplication(@QueryParam("command") final String commandParam, - @Context final UriInfo uriInfo, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Calculate Loan Repayment Schedule | Submit a new Loan Application", httpMethod = "POST", notes = "Calculate Loan Repayment Schedule:\n\n" + "Calculates Loan Repayment Schedule\n\n" + "Mandatory Fields: productId, principal, loanTermFrequency, loanTermFrequencyType, numberOfRepayments, repaymentEvery, repaymentFrequencyType, interestRatePerPeriod, amortizationType, interestType, interestCalculationPeriodType, expectedDisbursementDate, transactionProcessingStrategyId\n\n" + "Submit a new Loan Application:\n\n" + "Mandatory Fields: clientId, productId, principal, loanTermFrequency, loanTermFrequencyType, loanType, numberOfRepayments, repaymentEvery, repaymentFrequencyType, interestRatePerPeriod, amortizationType, interestType, interestCalculationPeriodType, transactionProcessingStrategyId, expectedDisbursementDate, submittedOnDate, loanType\n\n" + "Additional Mandatory Fields if interest recalculation is enabled for product and Rest frequency not same as repayment period: recalculationRestFrequencyDate\n\n" + "Additional Mandatory Fields if interest recalculation with interest/fee compounding is enabled for product and compounding frequency not same as repayment period: recalculationCompoundingFrequencyDate\n\n" + "Additional Mandatory Field if Entity-Datatable Check is enabled for the entity of type loan: datatables\n\n" + "Optional Fields: graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, linkAccountId, allowPartialPeriodInterestCalcualtion, fixedEmiAmount, maxOutstandingLoanBalance, disbursementData, graceOnArrearsAgeing, createStandingInstructionAtDisbursement (requires linkedAccountId if set to true)\n\n" + "Showing request/response for 'Submit a new Loan Application'") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = SelfLoansApiResourceSwagger.PostSelfLoansRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SelfLoansApiResourceSwagger.PostSelfLoansResponse.class)}) + public String calculateLoanScheduleOrSubmitLoanApplication(@QueryParam("command") @ApiParam(value = "command") final String commandParam, + @Context final UriInfo uriInfo, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { HashMap attr = this.dataValidator.validateLoanApplication(apiRequestBodyAsJson); final Long clientId = (Long) attr.get("clientId"); @@ -186,7 +193,10 @@ public class SelfLoansApiResource { @Path("{loanId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String modifyLoanApplication(@PathParam("loanId") final Long loanId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update a Loan Application", httpMethod = "PUT", notes = "Loan application can only be modified when in 'Submitted and pending approval' state. Once the application is approved, the details cannot be changed using this method.") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = SelfLoansApiResourceSwagger.PutSelfLoansLoanIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SelfLoansApiResourceSwagger.PutSelfLoansLoanIdResponse.class)}) + public String modifyLoanApplication(@PathParam("loanId") @ApiParam(value = "loanId") final Long loanId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { HashMap attr = this.dataValidator.validateModifyLoanApplication(apiRequestBodyAsJson); validateAppuserLoanMapping(loanId); @@ -202,8 +212,11 @@ public class SelfLoansApiResource { @Path("{loanId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String stateTransitions(@PathParam("loanId") final Long loanId, @QueryParam("command") final String commandParam, - final String apiRequestBodyAsJson) { + @ApiOperation(value = "Applicant Withdraws from Loan Application", httpMethod = "POST", notes = "Applicant Withdraws from Loan Application\n\n" + "Mandatory Fields: withdrawnOnDate") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = SelfLoansApiResourceSwagger.PostSelfLoansLoanIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200,message = "OK", response = SelfLoansApiResourceSwagger.PostSelfLoansLoanIdResponse.class)}) + public String stateTransitions(@PathParam("loanId") @ApiParam(value = "loanId") final Long loanId, @QueryParam("command") @ApiParam(value = "command") final String commandParam, + @ApiParam(hidden = true) final String apiRequestBodyAsJson) { if (!is(commandParam, "withdrawnByApplicant")) { throw new UnrecognizedQueryParamException("command", commandParam); } @@ -233,4 +246,4 @@ public class SelfLoansApiResource { return StringUtils.isNotBlank(commandParam) && commandParam.trim().equalsIgnoreCase(commandValue); } -} \ No newline at end of file +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/loanaccount/api/SelfLoansApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/loanaccount/api/SelfLoansApiResourceSwagger.java new file mode 100644 index 000000000..d9c3f9afd --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/loanaccount/api/SelfLoansApiResourceSwagger.java @@ -0,0 +1,845 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.self.loanaccount.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.time.LocalDate; +import java.util.Set; + +/** + * Created by Chirag Gupta on 12/19/17. + */ +final class SelfLoansApiResourceSwagger { + private SelfLoansApiResourceSwagger() { + } + + @ApiModel(value = "GetSelfLoansLoanIdResponse") + public final static class GetSelfLoansLoanIdResponse { + private GetSelfLoansLoanIdResponse() { + } + + final class GetLoansLoanIdStatus { + private GetLoansLoanIdStatus() { + } + + @ApiModelProperty(example = "300") + public Integer id; + @ApiModelProperty(example = "loanStatusType.active") + public String code; + @ApiModelProperty(example = "Active") + public String value; + @ApiModelProperty(example = "false") + public Boolean pendingApproval; + @ApiModelProperty(example = "false") + public Boolean waitingForDisbursal; + @ApiModelProperty(example = "true") + public Boolean active; + @ApiModelProperty(example = "false") + public Boolean closedObligationsMet; + @ApiModelProperty(example = "false") + public Boolean closedWrittenOff; + @ApiModelProperty(example = "false") + public Boolean closedRescheduled; + @ApiModelProperty(example = "false") + public Boolean closed; + @ApiModelProperty(example = "false") + public Boolean overpaid; + } + + final class GetLoansLoanIdLoanType { + private GetLoansLoanIdLoanType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "loanType.individual") + public String code; + @ApiModelProperty(example = "Individual") + public String value; + } + + final class GetLoansLoanIdCurrency { + private GetLoansLoanIdCurrency() { + } + + @ApiModelProperty(example = "UGX") + public String code; + @ApiModelProperty(example = "Uganda Shilling") + public String name; + @ApiModelProperty(example = "2") + public Integer decimalPlaces; + @ApiModelProperty(example = "USh") + public String displaySymbol; + @ApiModelProperty(example = "currency.UGX") + public String nameCode; + @ApiModelProperty(example = "Uganda Shilling (USh)") + public String displayLabel; + } + + final class GetLoansLoanIdTermPeriodFrequencyType { + private GetLoansLoanIdTermPeriodFrequencyType() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "termFrequency.periodFrequencyType.months") + public String code; + @ApiModelProperty(example = "Months") + public String value; + } + + final class GetLoansLoanIdRepaymentFrequencyType { + private GetLoansLoanIdRepaymentFrequencyType() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "repaymentFrequency.periodFrequencyType.months") + public String code; + @ApiModelProperty(example = "Months") + public String value; + } + + final class GetLoansLoanIdInterestRateFrequencyType { + private GetLoansLoanIdInterestRateFrequencyType() { + } + + @ApiModelProperty(example = "3") + public Integer id; + @ApiModelProperty(example = "interestRateFrequency.periodFrequencyType.years") + public String code; + @ApiModelProperty(example = "Per year") + public String value; + } + + final class GetLoansLoanIdAmortizationType { + private GetLoansLoanIdAmortizationType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "amortizationType.equal.installments") + public String code; + @ApiModelProperty(example = "Equal installments") + public String value; + } + + final class GetLoansLoanIdInterestType { + private GetLoansLoanIdInterestType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "interestType.flat") + public String code; + @ApiModelProperty(example = "Flat") + public String value; + } + + final class GetLoansLoanIdInterestCalculationPeriodType { + private GetLoansLoanIdInterestCalculationPeriodType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "interestCalculationPeriodType.same.as.repayment.period") + public String code; + @ApiModelProperty(example = "Same as repayment period") + public String value; + } + + final class GetLoansLoanIdTimeline { + private GetLoansLoanIdTimeline() { + } + + @ApiModelProperty(example = "[2012, 4, 3]") + public LocalDate submittedOnDate; + @ApiModelProperty(example = "admin") + public String submittedByUsername; + @ApiModelProperty(example = "App") + public String submittedByFirstname; + @ApiModelProperty(example = "Administrator") + public String submittedByLastname; + @ApiModelProperty(example = "[2012, 4, 3]") + public LocalDate approvedOnDate; + @ApiModelProperty(example = "admin") + public String approvedByUsername; + @ApiModelProperty(example = "App") + public String approvedByFirstname; + @ApiModelProperty(example = "Administrator") + public String approvedByLastname; + @ApiModelProperty(example = "[2012, 4, 10]") + public LocalDate expectedDisbursementDate; + @ApiModelProperty(example = "[2012, 4, 10]") + public LocalDate actualDisbursementDate; + @ApiModelProperty(example = "admin") + public String disbursedByUsername; + @ApiModelProperty(example = "App") + public String disbursedByFirstname; + @ApiModelProperty(example = "Administrator") + public String disbursedByLastname; + @ApiModelProperty(example = "[2012, 4, 10]") + public LocalDate expectedMaturityDate; + } + + final class GetLoansLoanIdSummary { + private GetLoansLoanIdSummary() { + } + + final class GetLoansLoanIdEmiVariations { + private GetLoansLoanIdEmiVariations() { + } + } + + final class GetLoansLoanIdLinkedAccount { + private GetLoansLoanIdLinkedAccount() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "000000001") + public Long accountNo; + } + + final class GetLoansLoanIdDisbursementDetails { + private GetLoansLoanIdDisbursementDetails() { + } + + @ApiModelProperty(example = "71") + public Integer id; + @ApiModelProperty(example = "[2013, 11, 1]") + public LocalDate expectedDisbursementDate; + @ApiModelProperty(example = "22000.000000") + public Float principal; + @ApiModelProperty(example = "22000.000000") + public Float approvedPrincipal; + } + + final class GetLoansLoanIdOverdueCharges { + private GetLoansLoanIdOverdueCharges() { + } + + final class GetLoansLoanIdChargeTimeType { + private GetLoansLoanIdChargeTimeType() { + } + + @ApiModelProperty(example = "9") + public Integer id; + @ApiModelProperty(example = "chargeTimeType.overdueInstallment") + public String code; + @ApiModelProperty(example = "overdue fees") + public String value; + } + + final class GetLoansLoanIdChargeCalculationType { + private GetLoansLoanIdChargeCalculationType() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "chargeCalculationType.percent.of.amount") + public String code; + @ApiModelProperty(example = "% Amount") + public String value; + } + + final class GetLoansLoanIdChargePaymentMode { + private GetLoansLoanIdChargePaymentMode() { + } + + @ApiModelProperty(example = "0") + public Integer id; + @ApiModelProperty(example = "chargepaymentmode.regular") + public String code; + @ApiModelProperty(example = "Regular") + public String value; + } + + final class GetLoansLoanIdFeeFrequency { + private GetLoansLoanIdFeeFrequency() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "feeFrequencyperiodFrequencyType.weeks") + public String code; + @ApiModelProperty(example = "Weeks") + public String value; + } + + final class GetLoanCurrency { + private GetLoanCurrency() { + } + + @ApiModelProperty(example = "USD") + public String code; + @ApiModelProperty(example = "US Dollar") + public String name; + @ApiModelProperty(example = "2") + public Integer decimalPlaces; + @ApiModelProperty(example = "$") + public String displaySymbol; + @ApiModelProperty(example = "currency.USD") + public String nameCode; + @ApiModelProperty(example = "US Dollar ($)") + public String displayLabel; + } + + final class GetLoanChargeTemplateChargeAppliesTo { + private GetLoanChargeTemplateChargeAppliesTo() { + } + + @ApiModelProperty(example = "1 ") + public Integer id; + @ApiModelProperty(example = "chargeAppliesTo.loan") + public String code; + @ApiModelProperty(example = "Loan") + public String value; + } + + @ApiModelProperty(example = "20") + public Integer id; + @ApiModelProperty(example = "overdraft penality") + public String name; + @ApiModelProperty(example = "true") + public Boolean active; + @ApiModelProperty(example = "true") + public Boolean penalty; + public GetLoanCurrency currency; + @ApiModelProperty(example = "3.000000") + public Float amount; + public GetLoansLoanIdChargeTimeType chargeTimeType; + public GetLoanChargeTemplateChargeAppliesTo chargeAppliesTo; + public GetLoansLoanIdChargeCalculationType chargeCalculationType; + public GetLoansLoanIdChargePaymentMode chargePaymentMode; + @ApiModelProperty(example = "2") + public Integer feeInterval; + public GetLoansLoanIdFeeFrequency feeFrequency; + } + + public GetLoansLoanIdCurrency currency; + @ApiModelProperty(example = "1000000") + public Long principalDisbursed; + @ApiModelProperty(example = "0") + public Long principalPaid; + @ApiModelProperty(example = "0") + public Long principalWrittenOff; + @ApiModelProperty(example = "1000000") + public Long principalOutstanding; + @ApiModelProperty(example = "833333.3") + public Double principalOverdue; + @ApiModelProperty(example = "240000") + public Long interestCharged; + @ApiModelProperty(example = "0") + public Long interestPaid; + @ApiModelProperty(example = "0") + public Long interestWaived; + @ApiModelProperty(example = "0") + public Long interestWrittenOff; + @ApiModelProperty(example = "240000") + public Long interestOutstanding; + @ApiModelProperty(example = "200000") + public Long interestOverdue; + @ApiModelProperty(example = "18000") + public Long feeChargesCharged; + @ApiModelProperty(example = "0") + public Long feeChargesDueAtDisbursementCharged; + @ApiModelProperty(example = "0") + public Long feeChargesPaid; + @ApiModelProperty(example = "0") + public Long feeChargesWaived; + @ApiModelProperty(example = "0") + public Long feeChargesWrittenOff; + @ApiModelProperty(example = "18000") + public Long feeChargesOutstanding; + @ApiModelProperty(example = "15000") + public Long feeChargesOverdue; + @ApiModelProperty(example = "0") + public Long penaltyChargesCharged; + @ApiModelProperty(example = "0") + public Long penaltyChargesPaid; + @ApiModelProperty(example = "0") + public Long penaltyChargesWaived; + @ApiModelProperty(example = "0") + public Long penaltyChargesWrittenOff; + @ApiModelProperty(example = "0") + public Long penaltyChargesOutstanding; + @ApiModelProperty(example = "0") + public Long penaltyChargesOverdue; + @ApiModelProperty(example = "1258000") + public Long totalExpectedRepayment; + @ApiModelProperty(example = "0") + public Long totalRepayment; + @ApiModelProperty(example = "258000") + public Long totalExpectedCostOfLoan; + @ApiModelProperty(example = "0") + public Long totalCostOfLoan; + @ApiModelProperty(example = "0") + public Long totalWaived; + @ApiModelProperty(example = "0") + public Long totalWrittenOff; + @ApiModelProperty(example = "1258000") + public Long totalOutstanding; + @ApiModelProperty(example = "1048333.3") + public Double totalOverdue; + @ApiModelProperty(example = "[2012, 5, 10]") + public LocalDate overdueSinceDate; + public GetLoansLoanIdLinkedAccount linkedAccount; + public Set disbursementDetails; + @ApiModelProperty(example = "1100.000000") + public Float fixedEmiAmount; + @ApiModelProperty(example = "35000") + public Long maxOutstandingLoanBalance; + @ApiModelProperty(example = "false") + public Boolean canDisburse; + public Set emiAmountVariations; + @ApiModelProperty(example = "true") + public Boolean inArrears; + @ApiModelProperty(example = "false") + public Boolean isNPA; + public Set overdueCharges; + } + + @ApiModelProperty(example = "1") + public Long id; + @ApiModelProperty(example = "000000001") + public Long accountNo; + public GetLoansLoanIdStatus status; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "Kampala first Client") + public String clientName; + @ApiModelProperty(example = "2") + public Integer clientOfficeId; + @ApiModelProperty(example = "1") + public Integer loanProductId; + @ApiModelProperty(example = "Kampala Product (with cash accounting)") + public String loanProductName; + @ApiModelProperty(example = "Typical Kampala loan product with cash accounting enabled for testing.") + public String loanProductDescription; + @ApiModelProperty(example = "22") + public Integer loanPurposeId; + @ApiModelProperty(example = "option.HousingImprovement") + public String loanPurposeName; + @ApiModelProperty(example = "2") + public Integer loanOfficerId; + @ApiModelProperty(example = "LoanOfficer, Kampala") + public String loanOfficerName; + public GetLoansLoanIdLoanType loanType; + public GetLoansLoanIdCurrency currency; + @ApiModelProperty(example = "1000000") + public Long principal; + @ApiModelProperty(example = "12") + public Integer termFrequency; + public GetLoansLoanIdTermPeriodFrequencyType termPeriodFrequencyType; + @ApiModelProperty(example = "12") + public Integer numberOfRepayments; + @ApiModelProperty(example = "1") + public Integer repaymentEvery; + public GetLoansLoanIdRepaymentFrequencyType repaymentFrequencyType; + @ApiModelProperty(example = "24") + public Integer interestRatePerPeriod; + public GetLoansLoanIdInterestRateFrequencyType interestRateFrequencyType; + @ApiModelProperty(example = "24") + public Integer annualInterestRate; + public GetLoansLoanIdAmortizationType amortizationType; + public GetLoansLoanIdInterestType interestType; + public GetLoansLoanIdInterestCalculationPeriodType interestCalculationPeriodType; + @ApiModelProperty(example = "2") + public Integer transactionProcessingStrategyId; + public GetLoansLoanIdTimeline timeline; + public GetLoansLoanIdSummary summary; + } + + @ApiModel(value = "GetSelfLoansLoanIdTransactionsTransactionIdResponse") + public final static class GetSelfLoansLoanIdTransactionsTransactionIdResponse { + private GetSelfLoansLoanIdTransactionsTransactionIdResponse() { + } + + final class GetSelfLoansLoanIdTransactionsType { + private GetSelfLoansLoanIdTransactionsType() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "loanTransactionType.repayment") + public String code; + @ApiModelProperty(example = "Repayment") + public String value; + @ApiModelProperty(example = "false") + public Boolean disbursement; + @ApiModelProperty(example = "false") + public Boolean repaymentAtDisbursement; + @ApiModelProperty(example = "true") + public Boolean repayment; + @ApiModelProperty(example = "false") + public Boolean contra; + @ApiModelProperty(example = "false") + public Boolean waiveInterest; + @ApiModelProperty(example = "false") + public Boolean waiveCharges; + @ApiModelProperty(example = "false") + public Boolean writeOff; + @ApiModelProperty(example = "false") + public Boolean recoveryRepayment; + } + + @ApiModelProperty(example = "3") + public Integer id; + public GetSelfLoansLoanIdTransactionsType type; + @ApiModelProperty(example = "[2012, 5, 14]") + public LocalDate date; + @ApiModelProperty(example = "false") + public Boolean manuallyReversed; + public GetSelfLoansLoanIdResponse.GetLoansLoanIdSummary.GetLoansLoanIdOverdueCharges.GetLoanCurrency currency; + @ApiModelProperty(example = "559.88") + public Float amount; + @ApiModelProperty(example = "559.88") + public Float interestPortion; + } + + @ApiModel(value = "GetSelfLoansLoanIdChargesResponse") + public final static class GetSelfLoansLoanIdChargesResponse { + private GetSelfLoansLoanIdChargesResponse() { + } + + final class GetSelfLoansChargeTimeType { + private GetSelfLoansChargeTimeType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "chargeTimeType.disbursement") + public String code; + @ApiModelProperty(example = "Disbursement") + public String value; + } + + final class GetSelfLoansChargeCalculationType { + private GetSelfLoansChargeCalculationType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "chargeCalculationType.flat") + public String code; + @ApiModelProperty(example = "Flat") + public String value; + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "1") + public Integer chargeId; + @ApiModelProperty(example = "Loan Processing fee") + public String name; + public GetSelfLoansChargeTimeType chargeTimeType; + public GetSelfLoansChargeCalculationType chargeCalculationType; + @ApiModelProperty(example = "0") + public Double percentage; + @ApiModelProperty(example = "0") + public Double amountPercentageAppliedTo; + public GetSelfLoansLoanIdResponse.GetLoansLoanIdSummary.GetLoansLoanIdOverdueCharges.GetLoanCurrency currency; + @ApiModelProperty(example = "100") + public Float amount; + @ApiModelProperty(example = "0") + public Float amountPaid; + @ApiModelProperty(example = "0") + public Float amountWaived; + @ApiModelProperty(example = "0") + public Float amountWrittenOff; + @ApiModelProperty(example = "100") + public Float amountOutstanding; + @ApiModelProperty(example = "100") + public Float amountOrPercentage; + @ApiModelProperty(example = "false") + public Boolean penalty; + } + + @ApiModel(value = "GetSelfLoansTemplateResponse") + public final static class GetSelfLoansTemplateResponse { + private GetSelfLoansTemplateResponse() { + } + + final class GetSelfLoansTimeline { + private GetSelfLoansTimeline() { + } + + @ApiModelProperty(example = "[2013, 3, 8]") + public LocalDate expectedDisbursementDate; + } + + final class GetSelfLoansProductOptions { + private GetSelfLoansProductOptions() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "Kampala Product (with cash accounting)") + public String name; + } + + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "Kampala first Client") + public String clientName; + @ApiModelProperty(example = "2") + public Integer clientOfficeId; + public GetSelfLoansTimeline timeline; + public Set productOptions; + } + + @ApiModel(value = "PostSelfLoansRequest") + public final static class PostSelfLoansRequest { + private PostSelfLoansRequest() { + } + + final class PostSelfLoansDisbursementData { + private PostSelfLoansDisbursementData() { + } + + @ApiModelProperty(example = "01 November 2013") + public String expectedDisbursementDate; + @ApiModelProperty(example = "22000") + public Long principal; + @ApiModelProperty(example = "22000") + public Long approvedPrincipal; + } + + final class PostSelfLoansDatatables { + private PostSelfLoansDatatables() { + } + + final class PostSelfLoansData { + private PostSelfLoansData() { + } + + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "01 December 2016 00:00") + public String Activation_Date; + @ApiModelProperty(example = "dd MMMM yyyy HH:mm") + public String dateFormat; + } + + @ApiModelProperty(example = "Date Loan Field") + public String registeredTableName; + public PostSelfLoansData data; + } + + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "en_GB") + public String locale; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "1") + public Integer productId; + @ApiModelProperty(example = "10,000.00") + public Double principal; + @ApiModelProperty(example = "12") + public Integer loanTermFrequency; + @ApiModelProperty(example = "2") + public Integer loanTermFrequencyType; + @ApiModelProperty(example = "individual") + public String loanType; + @ApiModelProperty(example = "10") + public Integer numberOfRepayments; + @ApiModelProperty(example = "1") + public Integer repaymentEvery; + @ApiModelProperty(example = "2") + public Integer repaymentFrequencyType; + @ApiModelProperty(example = "10") + public Integer interestRatePerPeriod; + @ApiModelProperty(example = "1") + public Integer amortizationType; + @ApiModelProperty(example = "0") + public Integer interestType; + @ApiModelProperty(example = "1") + public Integer interestCalculationPeriodType; + @ApiModelProperty(example = "1") + public Integer transactionProcessingStrategyId; + @ApiModelProperty(example = "10 Jun 2013") + public String expectedDisbursementDate; + @ApiModelProperty(example = "10 Jun 2013") + public String submittedOnDate; + @ApiModelProperty(example = "1") + public Integer linkAccountId; + @ApiModelProperty(example = "1100") + public Integer fixedEmiAmount; + @ApiModelProperty(example = "35000") + public Long maxOutstandingLoanBalance; + public Set disbursementData; + public Set datatables; + } + + @ApiModel(value = "PostSelfLoansResponse") + public final static class PostSelfLoansResponse { + private PostSelfLoansResponse() { + } + + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "1") + public Integer loanId; + @ApiModelProperty(example = "1") + public Integer resourceId; + } + + @ApiModel(value = "PutSelfLoansLoanIdRequest") + public final static class PutSelfLoansLoanIdRequest { + private PutSelfLoansLoanIdRequest() { + } + + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "1") + public Integer productId; + @ApiModelProperty(example = "5000") + public Long principal; + @ApiModelProperty(example = "10") + public Integer loanTermFrequency; + @ApiModelProperty(example = "0") + public Integer loanTermFrequencyType; + @ApiModelProperty(example = "10") + public Integer numberOfRepayments; + @ApiModelProperty(example = "1") + public Integer repaymentEvery; + @ApiModelProperty(example = "0") + public Integer repaymentFrequencyType; + @ApiModelProperty(example = "2") + public Integer interestRatePerPeriod; + @ApiModelProperty(example = "0") + public Integer interestType; + @ApiModelProperty(example = "0") + public Integer interestCalculationPeriodType; + @ApiModelProperty(example = "1") + public Integer amortizationType; + @ApiModelProperty(example = "04 March 2014") + public String expectedDisbursementDate; + @ApiModelProperty(example = "1") + public Integer transactionProcessingStrategyId; + } + + @ApiModel(value = "PutSelfLoansLoanIdResponse") + public final static class PutSelfLoansLoanIdResponse { + private PutSelfLoansLoanIdResponse() { + } + + final class PutSelfLoansChanges { + private PutSelfLoansChanges() { + } + + @ApiModelProperty(example = "5000") + public Long principal; + @ApiModelProperty(example = "en") + public String locale; + } + + @ApiModelProperty(example = "2") + public Integer officeId; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "1") + public Integer loanId; + @ApiModelProperty(example = "1") + public Integer resourceId; + public PutSelfLoansChanges changes; + } + + @ApiModel(value = "PostSelfLoansLoanIdRequest") + public final static class PostSelfLoansLoanIdRequest { + private PostSelfLoansLoanIdRequest() { + } + + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "20 September 2011") + public String withdrawnOnDate; + @ApiModelProperty(example = "Reason loan applicant withdrew from application.") + public String note; + } + + @ApiModel(value = "PostSelfLoansLoanIdResponse") + public final static class PostSelfLoansLoanIdResponse { + private PostSelfLoansLoanIdResponse() { + } + + final class PostSelfLoansLoanIdChanges { + private PostSelfLoansLoanIdChanges() { + } + + final class PostSelfLoansLoanIdStatus { + private PostSelfLoansLoanIdStatus() { + } + + @ApiModelProperty(example = "400") + public Integer id; + @ApiModelProperty(example = "loanStatusType.withdrawn.by.client") + public String code; + @ApiModelProperty(example = "Withdrawn by applicant") + public String value; + @ApiModelProperty(example = "false") + public Boolean pendingApproval; + @ApiModelProperty(example = "false") + public Boolean waitingForDisbursal; + @ApiModelProperty(example = "false") + public Boolean active; + @ApiModelProperty(example = "false") + public Boolean closedObligationsMet; + @ApiModelProperty(example = "false") + public Boolean closedWrittenOff; + @ApiModelProperty(example = "false") + public Boolean closedRescheduled; + @ApiModelProperty(example = "false") + public Boolean closed; + @ApiModelProperty(example = "false") + public Boolean overpaid; + } + + public PostSelfLoansLoanIdStatus status; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "20 September 2011") + public String withdrawnOnDate; + @ApiModelProperty(example = "20 September 2011") + public String closedOnDate; + } + + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "2") + public Integer loanId; + @ApiModelProperty(example = "2") + public Integer resourceId; + public PostSelfLoansLoanIdChanges changes; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/savings/api/SelfSavingsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/savings/api/SelfSavingsApiResource.java index bfcd11d05..6fe46fa75 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/savings/api/SelfSavingsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/savings/api/SelfSavingsApiResource.java @@ -18,17 +18,7 @@ */ package org.apache.fineract.portfolio.self.savings.api; -import javax.ws.rs.Consumes; -import javax.ws.rs.DefaultValue; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - +import io.swagger.annotations.*; import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; import org.apache.fineract.portfolio.savings.api.SavingsAccountChargesApiResource; import org.apache.fineract.portfolio.savings.api.SavingsAccountTransactionsApiResource; @@ -41,9 +31,15 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; + @Path("/self/savingsaccounts") @Component @Scope("singleton") +@Api(value = "Self Savings Account", description = "") public class SelfSavingsApiResource { private final PlatformSecurityContext context; @@ -73,9 +69,11 @@ public class SelfSavingsApiResource { @Path("{accountId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Retrieve a savings account", httpMethod = "GET", notes = "Retrieves a savings account\n\n" + "Example Requests :\n" + "\n" + "self/savingsaccounts/1\n" + "\n" + "\n" + "self/savingsaccounts/1?associations=transactions") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SelfSavingsApiResourceSwagger.GetSelfSavingsAccountsResponse.class)}) public String retrieveSavings( - @PathParam("accountId") final Long accountId, - @DefaultValue("all") @QueryParam("chargeStatus") final String chargeStatus, + @PathParam("accountId") @ApiParam(value = "accountId") final Long accountId, + @DefaultValue("all") @QueryParam("chargeStatus") @ApiParam(value = "chargeStatus") final String chargeStatus, @Context final UriInfo uriInfo) { this.dataValidator.validateRetrieveSavings(uriInfo); @@ -91,9 +89,11 @@ public class SelfSavingsApiResource { @Path("{accountId}/transactions/{transactionId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Retrieve Savings Account Transaction", httpMethod = "GET", notes = "Retrieves Savings Account Transaction\n\n" + "Example Requests:\n" + "\n" + "self/savingsaccounts/1/transactions/1") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SelfSavingsApiResourceSwagger.GetSelfSavingsAccountsAccountIdTransactionsTransactionIdResponse.class)}) public String retrieveSavingsTransaction( - @PathParam("accountId") final Long accountId, - @PathParam("transactionId") final Long transactionId, + @PathParam("accountId") @ApiParam(value = "accountId") final Long accountId, + @PathParam("transactionId") @ApiParam(value = "transactionId") final Long transactionId, @Context final UriInfo uriInfo) { this.dataValidator.validateRetrieveSavingsTransaction(uriInfo); @@ -108,9 +108,11 @@ public class SelfSavingsApiResource { @Path("{accountId}/charges") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "List Savings Charges", httpMethod = "GET", notes = "Lists Savings Charges\n\n" + "Example Requests:\n" + "\n" + "self/savingsaccounts/1/charges\n" + "\n" + "self/savingsaccounts/1/charges?chargeStatus=inactive\n" + "\n" + "self/savingsaccounts/1/charges?fields=name,amountOrPercentage") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SelfSavingsApiResourceSwagger.GetSelfSavingsAccountsAccountIdChargesResponse.class, responseContainer = "List")}) public String retrieveAllSavingsAccountCharges( - @PathParam("accountId") final Long accountId, - @DefaultValue("all") @QueryParam("chargeStatus") final String chargeStatus, + @PathParam("accountId") @ApiParam(value = "accountId") final Long accountId, + @DefaultValue("all") @QueryParam("chargeStatus") @ApiParam(value = "chargeStatus") final String chargeStatus, @Context final UriInfo uriInfo) { validateAppuserSavingsAccountMapping(accountId); @@ -124,9 +126,11 @@ public class SelfSavingsApiResource { @Path("{accountId}/charges/{savingsAccountChargeId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Retrieve a Savings account Charge", httpMethod = "GET", notes = "Retrieves a Savings account Charge\n\n" + "Example Requests:\n" + "\n" + "self/savingsaccounts/1/charges/5\n" + "\n" + "\n" + "self/savingsaccounts/1/charges/5?fields=name,amountOrPercentage") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SelfSavingsApiResourceSwagger.GetSelfSavingsAccountsAccountIdChargesSavingsAccountChargeIdResponse.class)}) public String retrieveSavingsAccountCharge( - @PathParam("accountId") final Long accountId, - @PathParam("savingsAccountChargeId") final Long savingsAccountChargeId, + @PathParam("accountId") @ApiParam(value = "accountId") final Long accountId, + @PathParam("savingsAccountChargeId") @ApiParam(value = "savingsAccountChargeId") final Long savingsAccountChargeId, @Context final UriInfo uriInfo) { validateAppuserSavingsAccountMapping(accountId); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/savings/api/SelfSavingsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/savings/api/SelfSavingsApiResourceSwagger.java new file mode 100644 index 000000000..92d68a301 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/savings/api/SelfSavingsApiResourceSwagger.java @@ -0,0 +1,358 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.self.savings.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.time.LocalDate; + +/** + * Created by Chirag Gupta on 12/25/17. + */ +final class SelfSavingsApiResourceSwagger { + private SelfSavingsApiResourceSwagger() { + } + + @ApiModel(value = "GetSelfSavingsAccountsResponse") + public final static class GetSelfSavingsAccountsResponse { + private GetSelfSavingsAccountsResponse() { + } + + final class GetSelfSavingsStatus { + private GetSelfSavingsStatus() { + } + + @ApiModelProperty(example = "100") + public Integer id; + @ApiModelProperty(example = "savingsAccountStatusType.submitted.and.pending.approval") + public String code; + @ApiModelProperty(example = "Submitted and pending approval") + public String value; + @ApiModelProperty(example = "true") + public Boolean submittedAndPendingApproval; + @ApiModelProperty(example = "false") + public Boolean approved; + @ApiModelProperty(example = "false") + public Boolean rejected; + @ApiModelProperty(example = "false") + public Boolean withdrawnByApplicant; + @ApiModelProperty(example = "false") + public Boolean active; + @ApiModelProperty(example = "false") + public Boolean closed; + + } + + final class GetSelfSavingsTimeline { + private GetSelfSavingsTimeline() { + } + + @ApiModelProperty(example = "[2013, 3, 1]") + public LocalDate submittedOnDate; + } + + final class GetSelfSavingsCurrency { + private GetSelfSavingsCurrency() { + } + + @ApiModelProperty(example = "USD") + public String code; + @ApiModelProperty(example = "US Dollar") + public String name; + @ApiModelProperty(example = "2") + public Integer decimalPlaces; + @ApiModelProperty(example = "$") + public String displaySymbol; + @ApiModelProperty(example = "currency.USD") + public String nameCode; + @ApiModelProperty(example = "US Dollar ($)") + public String displayLabel; + } + + final class GetSelfSavingsInterestCompoundingPeriodType { + private GetSelfSavingsInterestCompoundingPeriodType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "savings.interest.period.savingsCompoundingInterestPeriodType.daily") + public String code; + @ApiModelProperty(example = "Daily") + public String value; + } + + final class GetSelfSavingsInterestPostingPeriodType { + private GetSelfSavingsInterestPostingPeriodType() { + } + + @ApiModelProperty(example = "4") + public Integer id; + @ApiModelProperty(example = "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly") + public String code; + @ApiModelProperty(example = "Monthly") + public String value; + } + + final class GetSelfSavingsInterestCalculationType { + private GetSelfSavingsInterestCalculationType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "savingsInterestCalculationType.dailybalance") + public String code; + @ApiModelProperty(example = "Daily Balance") + public String value; + } + + final class GetSelfSavingsInterestCalculationDaysInYearType { + private GetSelfSavingsInterestCalculationDaysInYearType() { + } + + @ApiModelProperty(example = "365") + public Integer id; + @ApiModelProperty(example = "savingsInterestCalculationDaysInYearType.days365") + public String code; + @ApiModelProperty(example = "365 Days") + public String value; + } + + final class GetSelfSavingsSummary { + private GetSelfSavingsSummary() { + } + + public GetSelfSavingsCurrency currency; + @ApiModelProperty(example = "0") + public Integer accountBalance; + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "000000001") + public Long accountNo; + @ApiModelProperty(example = "1") + public Integer clientId; + @ApiModelProperty(example = "small business") + public String clientName; + @ApiModelProperty(example = "1") + public Integer savingsProductId; + @ApiModelProperty(example = "Passbook Savings") + public String savingsProductName; + @ApiModelProperty(example = "0") + public Integer fieldOfficerId; + public GetSelfSavingsStatus status; + public GetSelfSavingsTimeline timeline; + public GetSelfSavingsCurrency currency; + @ApiModelProperty(example = "5") + public Double nominalAnnualInterestRate; + public GetSelfSavingsInterestCompoundingPeriodType interestCompoundingPeriodType; + public GetSelfSavingsInterestPostingPeriodType interestPostingPeriodType; + public GetSelfSavingsInterestCalculationType interestCalculationType; + public GetSelfSavingsInterestCalculationDaysInYearType interestCalculationDaysInYearType; + public GetSelfSavingsSummary summary; + } + + @ApiModel(value = "GetSelfSavingsAccountsAccountIdTransactionsTransactionIdResponse") + public final static class GetSelfSavingsAccountsAccountIdTransactionsTransactionIdResponse { + private GetSelfSavingsAccountsAccountIdTransactionsTransactionIdResponse() { + } + + final class GetSelfSavingsTransactionType { + private GetSelfSavingsTransactionType() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "savingsAccountTransactionType.withdrawal") + public String code; + @ApiModelProperty(example = "Withdrawal") + public String value; + @ApiModelProperty(example = "false") + public Boolean deposit; + @ApiModelProperty(example = "true") + public Boolean withdrawal; + @ApiModelProperty(example = "false") + public Boolean interestPosting; + @ApiModelProperty(example = "false") + public Boolean feeDeduction; + } + + final class GetSelfSavingsTransactionCurrency { + private GetSelfSavingsTransactionCurrency() { + } + + @ApiModelProperty(example = "USD") + public String code; + @ApiModelProperty(example = "US Dollar") + public String name; + @ApiModelProperty(example = "2") + public Integer decimalPlaces; + @ApiModelProperty(example = "0") + public Integer inMultiplesOf; + @ApiModelProperty(example = "$") + public String displaySymbol; + @ApiModelProperty(example = "currency.USD") + public String nameCode; + @ApiModelProperty(example = "US Dollar ($)") + public String displayLabel; + } + + final class GetSelfSavingsPaymentDetailData { + private GetSelfSavingsPaymentDetailData() { + } + + final class GetSelfSavingsPaymentType { + private GetSelfSavingsPaymentType() { + } + + @ApiModelProperty(example = "11") + public Integer id; + @ApiModelProperty(example = "cash") + public String name; + } + + @ApiModelProperty(example = "62") + public Integer id; + public GetSelfSavingsPaymentType paymentType; + @ApiModelProperty(example = "") + public Integer accountNumber; + @ApiModelProperty(example = "") + public Integer checkNumber; + @ApiModelProperty(example = "") + public Integer routingCode; + @ApiModelProperty(example = "") + public Integer receiptNumber; + @ApiModelProperty(example = "") + public Integer bankNumber; + } + + @ApiModelProperty(example = "1") + public Integer id; + public GetSelfSavingsTransactionType transactionType; + @ApiModelProperty(example = "1") + public Integer accountId; + @ApiModelProperty(example = "000000001") + public Long accountNo; + @ApiModelProperty(example = "[2013, 8, 7]") + public LocalDate date; + public GetSelfSavingsTransactionCurrency currency; + public GetSelfSavingsPaymentDetailData paymentDetailData; + @ApiModelProperty(example = "5000") + public Integer amount; + @ApiModelProperty(example = "0") + public Integer runningBalance; + @ApiModelProperty(example = "true") + public Boolean reversed; + } + + @ApiModel(value = "GetSelfSavingsAccountsAccountIdChargesResponse") + public final static class GetSelfSavingsAccountsAccountIdChargesResponse { + private GetSelfSavingsAccountsAccountIdChargesResponse() { + } + + final class GetSelfSavingsChargeTimeType { + private GetSelfSavingsChargeTimeType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "chargeTimeType.specifiedDueDate") + public String code; + @ApiModelProperty(example = "Specified due date") + public String value; + } + + final class GetSelfSavingsChargeCalculationType { + private GetSelfSavingsChargeCalculationType() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "chargeCalculationType.flat") + public String code; + @ApiModelProperty(example = "Flat") + public String value; + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "3") + public Integer chargeId; + @ApiModelProperty(example = "57") + public Integer accountId; + @ApiModelProperty(example = "Savings account maintenance fee") + public String name; + public GetSelfSavingsChargeTimeType chargeTimeType; + public GetSelfSavingsChargeCalculationType chargeCalculationType; + @ApiModelProperty(example = "0") + public Double percentage; + @ApiModelProperty(example = "0") + public Double amountPercentageAppliedTo; + public GetSelfSavingsAccountsResponse.GetSelfSavingsCurrency currency; + @ApiModelProperty(example = "100") + public Integer amount; + @ApiModelProperty(example = "0") + public Integer amountPaid; + @ApiModelProperty(example = "0") + public Integer amountWaived; + @ApiModelProperty(example = "0") + public Integer amountWrittenOff; + @ApiModelProperty(example = "100") + public Integer amountOutstanding; + @ApiModelProperty(example = "100") + public Integer amountOrPercentage; + @ApiModelProperty(example = "false") + public Boolean penalty; + } + + @ApiModel(value = "GetSelfSavingsAccountsAccountIdChargesSavingsAccountChargeIdResponse") + public final static class GetSelfSavingsAccountsAccountIdChargesSavingsAccountChargeIdResponse { + private GetSelfSavingsAccountsAccountIdChargesSavingsAccountChargeIdResponse() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "1") + public Integer chargeId; + @ApiModelProperty(example = "Passbook fee") + public String name; + public GetSelfSavingsAccountsAccountIdChargesResponse.GetSelfSavingsChargeTimeType chargeTimeType; + public GetSelfSavingsAccountsAccountIdChargesResponse.GetSelfSavingsChargeCalculationType chargeCalculationType; + @ApiModelProperty(example = "0") + public Double percentage; + @ApiModelProperty(example = "0") + public Double amountPercentageAppliedTo; + public GetSelfSavingsAccountsResponse.GetSelfSavingsCurrency currency; + @ApiModelProperty(example = "100") + public Integer amount; + @ApiModelProperty(example = "0") + public Integer amountPaid; + @ApiModelProperty(example = "0") + public Integer amountWaived; + @ApiModelProperty(example = "0") + public Integer amountWrittenOff; + @ApiModelProperty(example = "100") + public Integer amountOutstanding; + @ApiModelProperty(example = "100") + public Integer amountOrPercentage; + @ApiModelProperty(example = "false") + public Boolean penalty; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/security/api/SelfAuthenticationApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/security/api/SelfAuthenticationApiResource.java index 7b9b0f69b..b5b6671b4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/security/api/SelfAuthenticationApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/security/api/SelfAuthenticationApiResource.java @@ -18,22 +18,24 @@ */ package org.apache.fineract.portfolio.self.security.api; -import javax.ws.rs.POST; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.MediaType; - +import io.swagger.annotations.*; import org.apache.fineract.infrastructure.security.api.AuthenticationApiResource; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Profile; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; +import javax.ws.rs.core.MediaType; + @Path("/self/authentication") @Component @Profile("basicauth") @Scope("singleton") +@Api(value = "Self Authentication", description = "") public class SelfAuthenticationApiResource { private final AuthenticationApiResource authenticationApiResource; @@ -46,8 +48,10 @@ public class SelfAuthenticationApiResource { @POST @Produces({ MediaType.APPLICATION_JSON }) - public String authenticate(@QueryParam("username") final String username, - @QueryParam("password") final String password) { + @ApiOperation(value = "Verify authentication", httpMethod = "POST", notes = "Authenticates the credentials provided and returns the set roles and permissions allowed.\n\n" + "Please visit this link for more info - https://demo.openmf.org/api-docs/apiLive.htm#selfbasicauth") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SelfAuthenticationApiResourceSwagger.PostSelfAuthenticationResponse.class)}) + public String authenticate(@QueryParam("username") @ApiParam(value = "username") final String username, + @QueryParam("password") @ApiParam(value = "password") final String password) { return this.authenticationApiResource.authenticate(username, password); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/security/api/SelfAuthenticationApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/security/api/SelfAuthenticationApiResourceSwagger.java new file mode 100644 index 000000000..532aec0b4 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/security/api/SelfAuthenticationApiResourceSwagger.java @@ -0,0 +1,88 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.self.security.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; +import java.util.Set; + +/** + * Created by Chirag Gupta on 12/22/17. + */ +final class SelfAuthenticationApiResourceSwagger { + private SelfAuthenticationApiResourceSwagger() { + } + + @ApiModel(value = "PostSelfAuthenticationResponse") + public final static class PostSelfAuthenticationResponse { + private PostSelfAuthenticationResponse() { + } + + final class GetSelfUserDetailsOrganisationalRole { + private GetSelfUserDetailsOrganisationalRole() { + } + + @ApiModelProperty(example = "100") + public Integer id; + @ApiModelProperty(example = "staffOrganisationalRoleType.programDirector") + public String code; + @ApiModelProperty(example = "Program Director") + public String value; + } + + final class GetSelfUserDetailsRoles { + private GetSelfUserDetailsRoles() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "Super user") + public String name; + @ApiModelProperty(example = "This role provides all application permissions.") + public String description; + } + + @ApiModelProperty(example = "mifos") + public String username; + @ApiModelProperty(example = "1") + public Integer userId; + @ApiModelProperty(example = "bWlmb3M6cGFzc3dvcmQ=") + public String base64EncodedAuthenticationKey; + @ApiModelProperty(example = "true") + public Boolean authenticated; + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "Head Office") + public String officeName; + @ApiModelProperty(example = "1") + public Integer staffId; + @ApiModelProperty(example = "Director, Program") + public String staffDisplayName; + public GetSelfUserDetailsOrganisationalRole organisationalRole; + public Set roles; + @ApiModelProperty(example = "ALL_FUNCTIONS") + public List permissions; + @ApiModelProperty(example = "true") + public Boolean isSelfServiceUser; + @ApiModelProperty(example = "1, 2, 3") + public List clients; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/security/api/SelfUserApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/security/api/SelfUserApiResource.java index 76de0b392..2632c63cd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/security/api/SelfUserApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/security/api/SelfUserApiResource.java @@ -19,15 +19,8 @@ package org.apache.fineract.portfolio.self.security.api; -import java.lang.reflect.Type; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; - -import javax.ws.rs.PUT; -import javax.ws.rs.Path; - +import com.google.gson.reflect.TypeToken; +import io.swagger.annotations.*; import org.apache.commons.lang.StringUtils; import org.apache.fineract.infrastructure.core.exception.InvalidJsonException; import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper; @@ -37,10 +30,17 @@ import org.apache.fineract.useradministration.domain.AppUser; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; -import com.google.gson.reflect.TypeToken; +import javax.ws.rs.PUT; +import javax.ws.rs.Path; +import java.lang.reflect.Type; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; @Path("/self/user") @Component +@Api(value = "Self User", description = "") public class SelfUserApiResource { private final UsersApiResource usersApiResource; @@ -59,7 +59,10 @@ public class SelfUserApiResource { } @PUT - public String update(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update User", httpMethod = "PUT", notes = "This API can be used by Self Service user to update their own user information. Currently, \"password\" and \"repeatPassword\" are the only parameters accepted.") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = SelfUserApiResourceSwagger.PutSelfUserRequest.class)}) + @ApiResponses({@ApiResponse(code = 200,message = "OK", response = SelfUserApiResourceSwagger.PutSelfUserResponse.class)}) + public String update(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { if (StringUtils.isBlank(apiRequestBodyAsJson)) { throw new InvalidJsonException(); } final Type typeOfMap = new TypeToken>() {}.getType(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/security/api/SelfUserApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/security/api/SelfUserApiResourceSwagger.java new file mode 100644 index 000000000..65af58c59 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/security/api/SelfUserApiResourceSwagger.java @@ -0,0 +1,62 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.fineract.portfolio.self.security.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * Created by Chirag Gupta on 12/20/17. + */ +final class SelfUserApiResourceSwagger { + private SelfUserApiResourceSwagger() { + } + + @ApiModel(value = "PutSelfUserRequest") + public final static class PutSelfUserRequest { + private PutSelfUserRequest() { + } + + @ApiModelProperty(example = "Abcd1234") + public String password; + @ApiModelProperty(example = "Abcd1234") + public String repeatPassword; + } + + @ApiModel(value = "PutSelfUserResponse") + public final static class PutSelfUserResponse { + private PutSelfUserResponse() { + } + + final class PutSelfUserChanges { + private PutSelfUserChanges() { + } + + @ApiModelProperty(example = "6a72a630795be86fe926ce540fc45b6b922fe5ba130f185fe806a26b5e5efcdd") + public String passwordEncoded; + } + + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "6") + public Integer resourceId; + public PutSelfUserChanges changes; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/security/api/SelfUserDetailsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/security/api/SelfUserDetailsApiResource.java index 56b348935..4d5ad19c6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/security/api/SelfUserDetailsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/security/api/SelfUserDetailsApiResource.java @@ -18,22 +18,24 @@ */ package org.apache.fineract.portfolio.self.security.api; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.MediaType; - +import io.swagger.annotations.*; import org.apache.fineract.infrastructure.security.api.UserDetailsApiResource; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Profile; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; +import javax.ws.rs.core.MediaType; + @Path("/self/userdetails") @Component @Profile("oauth") @Scope("singleton") +@Api(value = "Self User Details", description = "") public class SelfUserDetailsApiResource { private final UserDetailsApiResource userDetailsApiResource; @@ -46,8 +48,10 @@ public class SelfUserDetailsApiResource { @GET @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "Fetch authenticated user details", httpMethod = "GET", notes = "Checks the Authentication and returns the set roles and permissions allowed\n\n" + "For more info visit this link - https://demo.openmf.org/api-docs/apiLive.htm#selfoauth") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SelfUserDetailsApiResourceSwagger.GetSelfUserDetailsResponse.class)}) public String fetchAuthenticatedUserData( - @QueryParam("access_token") final String accessToken) { + @QueryParam("access_token") @ApiParam(value = "äccess_token") final String accessToken) { return this.userDetailsApiResource .fetchAuthenticatedUserData(accessToken); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/security/api/SelfUserDetailsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/security/api/SelfUserDetailsApiResourceSwagger.java new file mode 100644 index 000000000..e629e94dd --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/self/security/api/SelfUserDetailsApiResourceSwagger.java @@ -0,0 +1,88 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.self.security.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.util.List; +import java.util.Set; + +/** + * Created by Chirag Gupta on 12/20/17. + */ +final class SelfUserDetailsApiResourceSwagger { + private SelfUserDetailsApiResourceSwagger() { + } + + @ApiModel(value = "GetSelfUserDetailsResponse") + public final static class GetSelfUserDetailsResponse { + private GetSelfUserDetailsResponse() { + } + + final class GetSelfUserDetailsOrganisationalRole { + private GetSelfUserDetailsOrganisationalRole() { + } + + @ApiModelProperty(example = "100") + public Integer id; + @ApiModelProperty(example = "staffOrganisationalRoleType.programDirector") + public String code; + @ApiModelProperty(example = "Program Director") + public String value; + } + + final class GetSelfUserDetailsRoles { + private GetSelfUserDetailsRoles() { + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "Super user") + public String name; + @ApiModelProperty(example = "This role provides all application permissions.") + public String description; + } + + @ApiModelProperty(example = "mifos") + public String username; + @ApiModelProperty(example = "1") + public Integer userId; + @ApiModelProperty(example = "bWlmb3M6cGFzc3dvcmQ=") + public String base64EncodedAuthenticationKey; + @ApiModelProperty(example = "true") + public Boolean authenticated; + @ApiModelProperty(example = "1") + public Integer officeId; + @ApiModelProperty(example = "Head Office") + public String officeName; + @ApiModelProperty(example = "1") + public Integer staffId; + @ApiModelProperty(example = "Director, Program") + public String staffDisplayName; + public GetSelfUserDetailsOrganisationalRole organisationalRole; + public Set roles; + @ApiModelProperty(example = "ALL_FUNCTIONS") + public List permissions; + @ApiModelProperty(example = "true") + public Boolean isSelfServiceUser; + @ApiModelProperty(example = "[1, 2, 3]") + public List clients; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/api/TaxComponentApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/api/TaxComponentApiResource.java index 9d9b5e3b0..d22cfa76d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/api/TaxComponentApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/api/TaxComponentApiResource.java @@ -18,19 +18,7 @@ */ package org.apache.fineract.portfolio.tax.api; -import java.util.Collection; - -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - +import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -45,9 +33,16 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; +import java.util.Collection; + @Path("/taxes/component") @Component @Scope("singleton") +@Api(value = "Tax Components", description = "This defines the Tax Components") public class TaxComponentApiResource { private final String resourceNameForPermissions = "TAXCOMPONENT"; @@ -73,6 +68,8 @@ public class TaxComponentApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "List Tax Components", httpMethod = "GET", notes = "List Tax Components") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = TaxComponentApiResourceSwagger.GetTaxesComponentsResponse.class, responseContainer = "List")}) public String retrieveAllTaxComponents(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -87,7 +84,9 @@ public class TaxComponentApiResource { @Path("{taxComponentId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveTaxComponent(@PathParam("taxComponentId") final Long taxComponentId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve Tax Component", httpMethod = "GET", notes = "Retrieve Tax Component") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = TaxComponentApiResourceSwagger.GetTaxesComponentsResponse.class)}) + public String retrieveTaxComponent(@PathParam("taxComponentId") @ApiParam(value = "taxComponentId") final Long taxComponentId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -114,7 +113,10 @@ public class TaxComponentApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String createTaxCompoent(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Create a new Tax Component", httpMethod = "POST", notes = "Creates a new Tax Component\n\n" + "Mandatory Fields: name, percentage\n\n" + "Optional Fields: debitAccountType, debitAcountId, creditAccountType, creditAcountId, startDate") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = TaxComponentApiResourceSwagger.PostTaxesComponentsRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = TaxComponentApiResourceSwagger.PostTaxesComponentsResponse.class)}) + public String createTaxCompoent(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createTaxComponent().withJson(apiRequestBodyAsJson).build(); @@ -127,7 +129,10 @@ public class TaxComponentApiResource { @Path("{taxComponentId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String updateTaxCompoent(@PathParam("taxComponentId") final Long taxComponentId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update Tax Component", httpMethod = "PUT", notes = "Updates Tax component. Debit and credit account details cannot be modified. All the future tax components would be replaced with the new percentage.") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body",dataTypeClass = TaxComponentApiResourceSwagger.PutTaxesComponentsTaxComponentIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = TaxComponentApiResourceSwagger.PutTaxesComponentsTaxComponentIdResponse.class)}) + public String updateTaxCompoent(@PathParam("taxComponentId") @ApiParam(value = "taxComponentId") final Long taxComponentId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateTaxComponent(taxComponentId).withJson(apiRequestBodyAsJson) .build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/api/TaxComponentApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/api/TaxComponentApiResourceSwagger.java new file mode 100644 index 000000000..7f7d0c4a4 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/api/TaxComponentApiResourceSwagger.java @@ -0,0 +1,149 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.tax.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.time.LocalDate; +import java.util.Set; + +/** + * Created by Chirag Gupta on 12/20/17. + */ +final class TaxComponentApiResourceSwagger { + private TaxComponentApiResourceSwagger() { + } + + @ApiModel(value = "GetTaxesComponentsResponse") + public final static class GetTaxesComponentsResponse { + private GetTaxesComponentsResponse() { + } + + final class GetTaxesComponentsCreditAccountType { + private GetTaxesComponentsCreditAccountType() { + } + + @ApiModelProperty(example = "2") + public Integer id; + @ApiModelProperty(example = "accountType.liability") + public String code; + @ApiModelProperty(example = "LIABILITY") + public String value; + } + + final class GetTaxesComponentsCreditAccount { + private GetTaxesComponentsCreditAccount() { + } + + @ApiModelProperty(example = "4") + public Integer id; + @ApiModelProperty(example = "ACCOUNT_NAME_7BR9C") + public String name; + @ApiModelProperty(example = "LIABILITY_PA1460364665046") + public String glCode; + } + + final class GetTaxesComponentsHistories { + private GetTaxesComponentsHistories() { + } + } + + @ApiModelProperty(example = "1") + public Integer id; + @ApiModelProperty(example = "tax component 1") + public String name; + @ApiModelProperty(example = "10.000000") + public Float percentage; + public GetTaxesComponentsCreditAccountType creditAccountType; + public GetTaxesComponentsCreditAccount creditAccount; + @ApiModelProperty(example = "[2016, 4, 11]") + public LocalDate startDate; + public Set taxComponentsHistories; + } + + @ApiModel(value = "PostTaxesComponentsRequest") + public final static class PostTaxesComponentsRequest { + private PostTaxesComponentsRequest() { + } + + @ApiModelProperty(example = "tax component 1") + public String name; + @ApiModelProperty(example = "10") + public Float percentage; + @ApiModelProperty(example = "2") + public Integer creditAccountType; + @ApiModelProperty(example = "4") + public Integer creditAcountId; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "11 April 2016") + public String startDate; + } + + @ApiModel(value = "PostTaxesComponentsResponse") + public final static class PostTaxesComponentsResponse { + private PostTaxesComponentsResponse() { + } + + @ApiModelProperty(example = "1") + public Integer resourceId; + } + + @ApiModel(value = "PutTaxesComponentsTaxComponentIdRequest") + public final static class PutTaxesComponentsTaxComponentIdRequest { + private PutTaxesComponentsTaxComponentIdRequest() { + } + + @ApiModelProperty(example = "tax component 2") + public String name; + @ApiModelProperty(example = "15") + public Float percentage; + @ApiModelProperty(example = "en") + public String locale; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + @ApiModelProperty(example = "15 April 2016") + public String startDate; + } + + @ApiModel(value = "PutTaxesComponentsTaxComponentIdResponse") + public final static class PutTaxesComponentsTaxComponentIdResponse { + private PutTaxesComponentsTaxComponentIdResponse() { + } + + final class PutTaxesComponentsChanges { + private PutTaxesComponentsChanges() { + } + + @ApiModelProperty(example = "15") + public Float percentage; + @ApiModelProperty(example = "tax component 2") + public String name; + @ApiModelProperty(example = "[2016, 4, 15]") + public LocalDate startDate; + } + + @ApiModelProperty(example = "1") + public Integer resourceId; + public PutTaxesComponentsChanges changes; + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/api/TaxGroupApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/api/TaxGroupApiResource.java index 446450029..5c66f74b6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/api/TaxGroupApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/api/TaxGroupApiResource.java @@ -18,19 +18,7 @@ */ package org.apache.fineract.portfolio.tax.api; -import java.util.Collection; - -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.UriInfo; - +import io.swagger.annotations.*; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -45,9 +33,16 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; +import javax.ws.rs.*; +import javax.ws.rs.core.Context; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.UriInfo; +import java.util.Collection; + @Path("/taxes/group") @Component @Scope("singleton") +@Api(value = "Tax Group", description = "This defines the Tax Group") public class TaxGroupApiResource { private final String resourceNameForPermissions = "TAXGROUP"; @@ -72,6 +67,8 @@ public class TaxGroupApiResource { @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @ApiOperation(value = "List Tax Group", httpMethod = "GET", notes = "List Tax Group") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = TaxGroupApiResourceSwagger.GetTaxesGroupResponse.class, responseContainer = "List")}) public String retrieveAllTaxGroups(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -86,7 +83,9 @@ public class TaxGroupApiResource { @Path("{taxGroupId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveTaxGroup(@PathParam("taxGroupId") final Long taxGroupId, @Context final UriInfo uriInfo) { + @ApiOperation(value = "Retrieve Tax Group", httpMethod = "GET", notes = "Retrieve Tax Group") + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = TaxGroupApiResourceSwagger.GetTaxesGroupResponse.class)}) + public String retrieveTaxGroup(@PathParam("taxGroupId") @ApiParam(value = "taxGroupId") final Long taxGroupId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -117,7 +116,10 @@ public class TaxGroupApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String createTaxGroup(final String apiRequestBodyAsJson) { + @ApiOperation(value = "Create a new Tax Group", httpMethod = "POST", notes = "Create a new Tax Group\n" + "Mandatory Fields: name and taxComponents\n" + "Mandatory Fields in taxComponents: taxComponentId\n" + "Optional Fields in taxComponents: id, startDate and endDate") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = TaxGroupApiResourceSwagger.PostTaxesGroupRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = TaxGroupApiResourceSwagger.PostTaxesGroupResponse.class)}) + public String createTaxGroup(@ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createTaxGroup().withJson(apiRequestBodyAsJson).build(); @@ -130,7 +132,10 @@ public class TaxGroupApiResource { @Path("{taxGroupId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String updateTaxGroup(@PathParam("taxGroupId") final Long taxGroupId, final String apiRequestBodyAsJson) { + @ApiOperation(value = "Update Tax Group", httpMethod = "PUT", notes = "Updates Tax Group. Only end date can be up-datable and can insert new tax components.") + @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body", dataType = "body", format = "body", dataTypeClass = TaxGroupApiResourceSwagger.PutTaxesGroupTaxGroupIdRequest.class)}) + @ApiResponses({@ApiResponse(code = 200, message = "OK", response = TaxGroupApiResourceSwagger.PutTaxesGroupTaxGroupIdResponse.class)}) + public String updateTaxGroup(@PathParam("taxGroupId") @ApiParam(value = "taxGroupId") final Long taxGroupId, @ApiParam(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateTaxGroup(taxGroupId).withJson(apiRequestBodyAsJson).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/api/TaxGroupApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/api/TaxGroupApiResourceSwagger.java new file mode 100644 index 000000000..66625c57c --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/api/TaxGroupApiResourceSwagger.java @@ -0,0 +1,157 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + *

    + * http://www.apache.org/licenses/LICENSE-2.0 + *

    + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.fineract.portfolio.tax.api; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.time.LocalDate; +import java.util.List; +import java.util.Set; + +/** + * Created by Chirag Gupta on 12/14/17. + */ +final class TaxGroupApiResourceSwagger { + private TaxGroupApiResourceSwagger() { + } + + @ApiModel(value = "GetTaxesGroupResponse") + public final static class GetTaxesGroupResponse { + private GetTaxesGroupResponse() { + } + + final class GetTaxesGroupTaxAssociations { + private GetTaxesGroupTaxAssociations() { + } + + final class GetTaxesGroupTaxComponent { + private GetTaxesGroupTaxComponent() { + } + + @ApiModelProperty(example = "7") + public Integer id; + @ApiModelProperty(example = "tax component 2") + public String name; + } + + @ApiModelProperty(example = "7") + public Integer id; + public GetTaxesGroupTaxComponent taxComponent; + @ApiModelProperty(example = "[2016, 4, 11]") + public LocalDate startDate; + } + + @ApiModelProperty(example = "7") + public Integer id; + @ApiModelProperty(example = "tax group 1") + public String name; + public Set taxAssociations; + } + + @ApiModel(value = "PostTaxesGroupRequest") + public final static class PostTaxesGroupRequest { + private PostTaxesGroupRequest() { + } + + final class PostTaxesGroupTaxComponents { + private PostTaxesGroupTaxComponents() { + } + + @ApiModelProperty(example = "7") + public Integer taxComponentId; + @ApiModelProperty(example = "11 April 2016") + public String startDate; + } + + @ApiModelProperty(example = "tax group 1") + public String name; + @ApiModelProperty(example = "en") + public String locale; + public Set taxComponents; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + } + + @ApiModel(value = "PostTaxesGroupResponse") + public static final class PostTaxesGroupResponse { + private PostTaxesGroupResponse() { + } + + @ApiModelProperty(example = "1") + public Integer resourceId; + } + + @ApiModel(value = "PutTaxesGroupTaxGroupIdRequest") + public final static class PutTaxesGroupTaxGroupIdRequest { + private PutTaxesGroupTaxGroupIdRequest() { + } + + final class PutTaxesGroupTaxComponents { + private PutTaxesGroupTaxComponents() { + } + + @ApiModelProperty(example = "7") + public Integer id; + @ApiModelProperty(example = "7") + public Integer taxComponentId; + @ApiModelProperty(example = "22 April 2016") + public String endDate; + } + + @ApiModelProperty(example = "tax group 2") + public String name; + @ApiModelProperty(example = "en") + public String locale; + public Set taxComponents; + @ApiModelProperty(example = "dd MMMM yyyy") + public String dateFormat; + } + + @ApiModel(value = "PutTaxesGroupTaxGroupIdResponse") + public final static class PutTaxesGroupTaxGroupIdResponse { + private PutTaxesGroupTaxGroupIdResponse() { + } + + final class PutTaxesGroupChanges { + private PutTaxesGroupChanges() { + } + + final class PutTaxesGroupModifiedComponents { + private PutTaxesGroupModifiedComponents() { + } + + @ApiModelProperty(example = "Apr 22, 2016 12:00:00 AM") + public String endDate; + @ApiModelProperty(example = "7") + public Integer taxComponentId; + } + + @ApiModelProperty(example = "[6]") + public List addComponents; + public Set modifiedComponents; + @ApiModelProperty(example = "tax group 2") + public String name; + } + + @ApiModelProperty(example = "7") + public Integer resourceId; + public PutTaxesGroupChanges changes; + } +} From f030262f580f53fb4ee910d38c2281de558dc1d5 Mon Sep 17 00:00:00 2001 From: Sanyam96 Date: Mon, 12 Nov 2018 22:00:13 +0530 Subject: [PATCH 3/4] updated response.json and removed iml file --- fineract-provider/fineract-provider.iml | 1549 ----------------- .../main/resources/swagger-ui/response.json | 2 +- 2 files changed, 1 insertion(+), 1550 deletions(-) delete mode 100644 fineract-provider/fineract-provider.iml diff --git a/fineract-provider/fineract-provider.iml b/fineract-provider/fineract-provider.iml deleted file mode 100644 index d5c2f047b..000000000 --- a/fineract-provider/fineract-provider.iml +++ /dev/null @@ -1,1549 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/fineract-provider/src/main/resources/swagger-ui/response.json b/fineract-provider/src/main/resources/swagger-ui/response.json index a3237bf2d..db452322d 100644 --- a/fineract-provider/src/main/resources/swagger-ui/response.json +++ b/fineract-provider/src/main/resources/swagger-ui/response.json @@ -1 +1 @@ -{"swagger":"2.0","info":{"description":"Apache Fineract is a secure, multi-tenanted microfinance platform.
    The goal of the Apache Fineract API is to empower developers to build apps on top of the Apache Fineract Platform. The reference app [ https://demo.openmf.org ] (username: mifos, password: password) works on the same demo tenant as the interactive links in this documentation.
    The API is organized around REST [ https://en.wikipedia.org/wiki/Representational_state_transfer ]
    Find out more about Apache Fineract on [ https://demo.openmf.org/api-docs/apiLive.htm#top ]
    You can Try The API From Your Browser itself at [ https://demo.openmf.org/api-docs/apiLive.htm#interact ]
    The Generic Options are available at [ https://demo.openmf.org/api-docs/apiLive.htm#genopts ]
    Find out more about Updating Dates and Numbers at [ https://demo.openmf.org/api-docs/apiLive.htm#dates_and_numbers ]
    For the Authentication and the Basic of HTTP and HTTPS refer [ https://demo.openmf.org/api-docs/apiLive.htm#authentication_overview ]
    Check about ERROR codes at [ https://demo.openmf.org/api-docs/apiLive.htm#errors ]

    Please refer to the old documentation for any documentation queries [ https://demo.openmf.org/api-docs/apiLive.htm ]
    ______________________________________________________________________________________________________________________________ ","version":"1.0.0","title":"Apache Fineract API Documentation","termsOfService":"https://demo.openmf.org/api-docs/apiLive.htm","contact":{"name":"https://gitter.im/openMF/mifos"}},"host":"https://demo.openmf.org","basePath":"/fineract-provider/api/v1","tags":[{"name":"Periodic Accrual Accounting"},{"name":"Accounting Closure"},{"name":"Mapping Financial Activities to Accounts"},{"name":"General Ledger Account"},{"name":"Journal Entries"},{"name":"Provisioning Entries"},{"name":"Accounting Rules"},{"name":"Batch API"},{"name":"Audits"},{"name":"Maker Checker (or 4-eye) functionality"},{"name":"Account number format"},{"name":"Cache"},{"name":"SMS Campaigns"},{"name":"Code Values"},{"name":"Codes"},{"name":"External Services"},{"name":"Global Configuration"},{"name":"CreditBureau Configuration"},{"name":"Data Tables"},{"name":"Entity-Datatable Checks"},{"name":"Reports"},{"name":"Run Reports"},{"name":"Documents"},{"name":"DomainNameapiv1{entity}{entityId}images"},{"name":"DomainNameapiv1entitytoentitymapping"},{"name":"Hooks"},{"name":"Scheduler"},{"name":"MIFOSX-BATCH JOBS"},{"name":"Report Mailing Jobs"},{"name":"List Report Mailing Job History"},{"name":"Authentication HTTP Basic"},{"name":"Fetch authenticated user details"},{"name":"SMS"},{"name":"Likelihood"},{"name":"Poverty Line"},{"name":"Survey"},{"name":"Mix Report"},{"name":"Mix Taxonomy"},{"name":"Mix Mapping"},{"name":"Holidays"},{"name":"Currency"},{"name":"officetransactions"},{"name":"Offices"},{"name":"Provisioning Category"},{"name":"Provisioning Criteria"},{"name":"Staff"},{"name":"cashiers"},{"name":"Teller Cash Management"},{"name":"cashiersjournal"},{"name":"Working days"},{"name":"Clients Address"},{"name":"Client Charges"},{"name":"Client Identifier Api"},{"name":"Client Transaction"},{"name":"Client Api"},{"name":"SPM API - LookUp Table"},{"name":"SPM - Scorecards"},{"name":"SPM - Serveys"},{"name":"User Generated Documents"},{"name":"Password preferences"},{"name":"Permissions"},{"name":"Roles"},{"name":"Users"}],"schemes":["https"],"paths":{"/runaccruals":{"post":{"tags":["Periodic Accrual Accounting"],"summary":"Executes Periodic Accrual Accounting","description":"Mandatory Fields\n\ntillDate\n","operationId":"executePeriodicAccrualAccounting","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"Request Body\n\nField Descriptions: \ntillDate: \nwhich specifies periodic accruals should happen till the given Date","required":true,"schema":{"$ref":"#/definitions/runaccrualsRequest"}}],"responses":{"200":{"description":"OK"}}}},"/glclosures":{"get":{"tags":["Accounting Closure"],"summary":"List Accounting closures","description":"Example Requests:\n\nglclosures","operationId":"retrieveAllClosures","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"officeId","in":"query","description":"officeId","required":false,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetGLClosureResponse"}}}}},"post":{"tags":["Accounting Closure"],"summary":"Create an Accounting Closure","description":"Mandatory Fields\nofficeId,closingDate","operationId":"createGLClosure","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"Request Body","required":true,"schema":{"$ref":"#/definitions/PostGLCLosuresRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostGlClosuresResponse"}}}}},"/glclosures/{glClosureId}":{"get":{"tags":["Accounting Closure"],"summary":"Retrieve an Accounting Closure","description":"Example Requests:\n\nglclosures/1\n\n\n/glclosures/1?fields=officeName,closingDate","operationId":"retreiveClosure","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"glClosureId","in":"path","description":"glClosureId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetGLClosureResponse"}}}},"put":{"tags":["Accounting Closure"],"summary":"Update an Accounting closure","description":"Once an accounting closure is created, only the comments associated with it may be edited","operationId":"updateGLClosure","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"glClosureId","in":"path","description":"glClosureId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"Request body","required":true,"schema":{"$ref":"#/definitions/PutGlClosuresRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutGlClosuresResponse"}}}},"delete":{"tags":["Accounting Closure"],"summary":"Delete an accounting closure","description":"Note: Only the latest accounting closure associated with a branch may be deleted.","operationId":"deleteGLClosure","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"glClosureId","in":"path","description":"glclosureId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteGlClosuresResponse"}}}}},"/financialactivityaccounts":{"get":{"tags":["Mapping Financial Activities to Accounts"],"summary":"List Financial Activities to Accounts Mappings","description":"Example Requests:\n\nfinancialactivityaccounts","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetFinancialActivityAccountsResponse"}}}}},"post":{"tags":["Mapping Financial Activities to Accounts"],"summary":"Create a new Financial Activity to Accounts Mapping","description":"Mandatory Fields\nfinancialActivityId, glAccountId","operationId":"createGLAccount","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"Request body","required":false,"schema":{"$ref":"#/definitions/PostFinancialActivityAccountsRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostFinancialActivityAccountsResponse"}}}}},"/financialactivityaccounts/{mappingId}":{"get":{"tags":["Mapping Financial Activities to Accounts"],"summary":"Retrieve a Financial Activity to Account Mapping\n","description":"Example Requests:\n\nfinancialactivityaccounts/1","operationId":"retreive","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"mappingId","in":"path","description":"mappingId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetFinancialActivityAccountsResponse"}}}},"put":{"tags":["Mapping Financial Activities to Accounts"],"summary":"Update a Financial Activity to Account Mapping","description":"the API updates the Ledger account linked to a Financial Activity \n","operationId":"updateGLAccount","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"mappingId","in":"path","description":"mappingId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"Request body","required":false,"schema":{"$ref":"#/definitions/PostFinancialActivityAccountsRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutFinancialActivityAccountsResponse"}}}},"delete":{"tags":["Mapping Financial Activities to Accounts"],"summary":"Delete a Financial Activity to Account Mapping","description":"","operationId":"deleteGLAccount","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"mappingId","in":"path","description":"mappingId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/DeleteFinancialActivityAccountsResponse"}}}}},"/financialactivityaccounts/template":{"get":{"tags":["Mapping Financial Activities to Accounts"],"operationId":"retrieveTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/glaccounts/template":{"get":{"tags":["General Ledger Account"],"summary":"Retrieve GL Accounts Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\nExample Request:\n\nglaccounts/template\nglaccounts/template?type=1\n\ntype is optional and integer value from 1 to 5.\n\n1.Assets \n2.Liabilities \n3.Equity \n4.Income \n5.Expenses","operationId":"retrieveNewAccountDetails","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"type","in":"query","description":"type","required":false,"type":"integer","format":"int32"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetGLAccountsTemplateResponse"}}}}},"/glaccounts":{"get":{"tags":["General Ledger Account"],"summary":"List General Ledger Accounts","description":"ARGUMENTS\ntype Integer optional manualEntriesAllowed boolean optional usage Integer optional disabled boolean optional parentId Long optional tagId Long optional\nExample Requests:\n\nglaccounts\n\n\nglaccounts?type=1&manualEntriesAllowed=true&usage=1&disabled=false\n\nglaccounts?fetchRunningBalance=true","operationId":"retrieveAllAccounts","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"type","in":"query","description":"type","required":false,"type":"integer","format":"int32"},{"name":"searchParam","in":"query","description":"searchParam","required":false,"type":"string"},{"name":"usage","in":"query","description":"usage","required":false,"type":"integer","format":"int32"},{"name":"manualEntriesAllowed","in":"query","description":"manualEntriesAllowed","required":false,"type":"boolean"},{"name":"disabled","in":"query","description":"disabled","required":false,"type":"boolean"},{"name":"fetchRunningBalance","in":"query","description":"fetchRunningBalance","required":false,"type":"boolean"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetGLAccountsResponse"}}}}},"post":{"tags":["General Ledger Account"],"summary":"Create a General Ledger Account","description":"Note: You may optionally create Hierarchical Chart of Accounts by using the \"parentId\" property of an Account\nMandatory Fields: \nname, glCode, type, usage and manualEntriesAllowed","operationId":"createGLAccount","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":false,"schema":{"$ref":"#/definitions/PostGLAccountsRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostGLAccountsResponse"}}}}},"/glaccounts/{glAccountId}":{"get":{"tags":["General Ledger Account"],"summary":"Retrieve a General Ledger Account","description":"Example Requests:\n\nglaccounts/1\n\n\nglaccounts/1?template=true\n\n\nglaccounts/1?fields=name,glCode\n\n\nglaccounts/1?fetchRunningBalance=true","operationId":"retreiveAccount","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"glAccountId","in":"path","description":"glAccountId","required":true,"type":"integer","format":"int64"},{"name":"fetchRunningBalance","in":"query","description":"fetchRunningBalance","required":false,"type":"boolean"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetGLAccountsResponse"}}}},"put":{"tags":["General Ledger Account"],"summary":"Update an Accounting closure","description":"Once an accounting closure is created, only the comments associated with it may be edited\n\n","operationId":"updateGLAccount","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"glAccountId","in":"path","description":"glAccountId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":false,"schema":{"$ref":"#/definitions/PutGLAccountsRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutGLAccountsResponse"}}}},"delete":{"tags":["General Ledger Account"],"summary":"Delete an accounting closure","description":"Note: Only the latest accounting closure associated with a branch may be deleted.","operationId":"deleteGLAccount","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"glAccountId","in":"path","description":"glAccountId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteGLAccountsRequest"}}}}},"/journalentries/{journalEntryId}":{"get":{"tags":["Journal Entries"],"summary":"Retrieve a single Entry","description":"Example Requests:\n\njournalentries/1\n\n\n\njournalentries/1?fields=officeName,glAccountId,entryType,amount\n\njournalentries/1?runningBalance=true\n\njournalentries/1?transactionDetails=true","operationId":"retreiveJournalEntryById","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"journalEntryId","in":"path","description":"journalEntryId","required":true,"type":"integer","format":"int64"},{"name":"runningBalance","in":"query","description":"runningBalance","required":false,"type":"boolean"},{"name":"transactionDetails","in":"query","description":"transactionDetails","required":false,"type":"boolean"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/JournalEntryData"}}}}},"/journalentries":{"get":{"tags":["Journal Entries"],"summary":"List Journal Entries","description":"The list capability of journal entries can support pagination and sorting.\n\nExample Requests:\n\njournalentries\n\njournalentries?transactionId=PB37X8Y21EQUY4S\n\njournalentries?officeId=1&manualEntriesOnly=true&fromDate=1 July 2013&toDate=15 July 2013&dateFormat=dd MMMM yyyy&locale=en\n\njournalentries?fields=officeName,glAccountName,transactionDate\n\njournalentries?offset=10&limit=50\n\njournalentries?orderBy=transactionId&sortOrder=DESC\n\njournalentries?runningBalance=true\n\njournalentries?transactionDetails=true\n\njournalentries?loanId=12\n\njournalentries?savingsId=24","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"officeId","in":"query","description":"officeId","required":false,"type":"integer","format":"int64"},{"name":"glAccountId","in":"query","description":"glAccountId","required":false,"type":"integer","format":"int64"},{"name":"manualEntriesOnly","in":"query","description":"manualEntriesOnly","required":false,"type":"boolean"},{"name":"fromDate","in":"query","description":"fromDate","required":false,"type":"string"},{"name":"toDate","in":"query","description":"toDate","required":false,"type":"string"},{"name":"transactionId","in":"query","description":"transactionId","required":false,"type":"string"},{"name":"entityType","in":"query","description":"entityType","required":false,"type":"integer","format":"int32"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","description":"orderBy","required":false,"type":"string"},{"name":"sortOrder","in":"query","description":"sortOrder","required":false,"type":"string"},{"name":"locale","in":"query","description":"locale","required":false,"type":"string"},{"name":"dateFormat","in":"query","description":"dateFormat","required":false,"type":"string"},{"name":"loanId","in":"query","description":"loanId","required":false,"type":"integer","format":"int64"},{"name":"savingsId","in":"query","description":"savingsId","required":false,"type":"integer","format":"int64"},{"name":"runningBalance","in":"query","description":"runningBalance","required":false,"type":"boolean"},{"name":"transactionDetails","in":"query","description":"transactionDetails","required":false,"type":"boolean"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/JournalEntryData"}}}}},"post":{"tags":["Journal Entries"],"summary":"Create \"Balanced\" Journal Entries","description":"Note: A Balanced (simple) Journal entry would have atleast one \"Debit\" and one \"Credit\" entry whose amounts are equal \nCompound Journal entries may have \"n\" debits and \"m\" credits where both \"m\" and \"n\" are greater than 0 and the net sum or all debits and credits are equal \n\n\nMandatory Fields\nofficeId, transactionDate\n\n\ncredits- glAccountId, amount, comments\n\n \ndebits- glAccountId, amount, comments\n\n \nOptional Fields\npaymentTypeId, accountNumber, checkNumber, routingCode, receiptNumber, bankNumber","operationId":"createGLJournalEntry","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"command","in":"query","description":"command","required":false,"type":"string"},{"in":"body","name":"body","description":"body","required":false,"schema":{"$ref":"#/definitions/JournalEntryCommand"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostJournalEntriesResponse"}}}}},"/journalentries/{transactionId}":{"post":{"tags":["Journal Entries"],"summary":"Update Running balances for Journal Entries","description":"This API calculates the running balances for office. If office ID not provided this API calculates running balances for all offices. \nMandatory Fields\nofficeId","operationId":"createReversalJournalEntry","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"transactionId","in":"path","description":"transactionId","required":true,"type":"string"},{"name":"command","in":"query","description":"command","required":false,"type":"string"},{"in":"body","name":"body","description":"body","required":false,"schema":{"$ref":"#/definitions/PostJournalEntriesTransactionIdRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostJournalEntriesTransactionIdResponse"}}}}},"/journalentries/provisioning":{"get":{"tags":["Journal Entries"],"operationId":"retrieveJournalEntries","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"offset","in":"query","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","required":false,"type":"integer","format":"int32"},{"name":"entryId","in":"query","required":false,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/journalentries/openingbalance":{"get":{"tags":["Journal Entries"],"operationId":"retrieveOpeningBalance","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"officeId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"currencyCode","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/provisioningentries":{"get":{"tags":["Provisioning Entries"],"summary":"List all Provisioning Entries","description":"","operationId":"retrieveAllProvisioningEntries","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/ProvisioningEntryData"}}}}},"post":{"tags":["Provisioning Entries"],"summary":"Create new Provisioning Entries","description":"Creates a new Provisioning Entries\n\nMandatory Fields\ndate\ndateFormat\nlocale\nOptional Fields\ncreatejournalentries","operationId":"createProvisioningEntries","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":false,"schema":{"$ref":"#/definitions/PostProvisioningEntriesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostProvisioningEntriesResponse"}}}}},"/provisioningentries/{entryId}":{"get":{"tags":["Provisioning Entries"],"summary":"Retrieves a Provisioning Entry","description":"Returns the details of a generated Provisioning Entry.","operationId":"retrieveProvisioningEntry","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"entryId","in":"path","description":"entryId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/ProvisioningEntryData"}}}},"post":{"tags":["Provisioning Entries"],"summary":"Recreates Provisioning Entry","description":"Recreates Provisioning Entry | createjournalentry.","operationId":"modifyProvisioningEntry","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"entryId","in":"path","description":"entryId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command=createjournalentry\ncommand=recreateprovisioningentry","required":false,"type":"string"},{"in":"body","name":"body","description":"body","required":false,"schema":{"$ref":"#/definitions/PutProvisioningEntriesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutProvisioningEntriesResponse"}}}}},"/provisioningentries/entries":{"get":{"tags":["Provisioning Entries"],"operationId":"retrieveProviioningEntries","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"entryId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"offset","in":"query","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","required":false,"type":"integer","format":"int32"},{"name":"officeId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"productId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"categoryId","in":"query","required":false,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/LoanProductProvisioningEntryData"}}}}},"/accountingrules":{"get":{"tags":["Accounting Rules"],"summary":"Retrieve Accounting Rules","description":"Returns the list of defined accounting rules.\n\nExample Requests:\n\naccountingrules","operationId":"retrieveAllAccountingRules","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetAccountRulesResponse"}}}}},"post":{"tags":["Accounting Rules"],"summary":"Create/Define a Accounting rule","description":"Define a new Accounting rule.\n\nMandatory Fields\nname, officeId,\naccountToDebit OR debitTags,\naccountToCredit OR creditTags.\n\nOptional Fields\ndescription","operationId":"createAccountingRule","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":false,"schema":{"$ref":"#/definitions/PostAccountingRulesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostAccountingRulesResponse"}}}}},"/accountingrules/{accountingRuleId}":{"get":{"tags":["Accounting Rules"],"summary":"Retrieve a Accounting rule","description":"Returns the details of a defined Accounting rule.\n\nExample Requests:\n\naccountingrules/1","operationId":"retreiveAccountingRule","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountingRuleId","in":"path","description":"accountingRuleId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/AccountingRuleData"}}}},"put":{"tags":["Accounting Rules"],"summary":"Update a Accounting Rule","description":"Updates the details of a Accounting rule.","operationId":"updateAccountingRule","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountingRuleId","in":"path","description":"accountingRuleId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":false,"schema":{"$ref":"#/definitions/PutAccountingRulesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutAccountingRulesResponse"}}}},"delete":{"tags":["Accounting Rules"],"summary":"Delete a Accounting Rule","description":"Deletes a Accounting rule.","operationId":"deleteAccountingRule","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountingRuleId","in":"path","description":"accountingRuleId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteAccountingRulesResponse"}}}}},"/accountingrules/template":{"get":{"tags":["Accounting Rules"],"summary":"Retrieve Accounting Rule Details Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\nExample Request:\n\naccountingrules/template","operationId":"retrieveTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetAccountRulesTemplateResponse"}}}}},"/batches":{"post":{"tags":["Batch API"],"summary":"Batch requests in a single transaction","description":"The Apache Fineract Batch API is also capable of executing all the requests in a single transaction, by setting a Query Parameter, \"enclosingTransaction=true\". So, if one or more of the requests in a batch returns an erroneous response all of the Data base transactions made by other successful requests will be rolled back.\n\nIf there has been a rollback in a transaction then a single response will be provided, with a '400' status code and a body consisting of the error details of the first failed request.","operationId":"handleBatchRequests","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"enclosingTransaction","in":"query","description":"enclosingTransaction","required":false,"type":"boolean","default":false},{"in":"body","name":"body","description":"request body","required":true,"schema":{"$ref":"#/definitions/PostBatchesRequest"}}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/BatchResponse"}}}}},"/audits/{auditId}":{"get":{"tags":["Audits"],"summary":"Retrieve an Audit Entry","description":"Example Requests:\n\naudits/20\naudits/20?fields=madeOnDate,maker,processingResult","operationId":"retrieveAuditEntry","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"auditId","in":"path","description":"auditId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetMakerCheckerResponse"}}}}},"/audits/searchtemplate":{"get":{"tags":["Audits"],"summary":"Audit Search Template","description":"This is a convenience resource. It can be useful when building an Audit Search UI. \"appUsers\" are data scoped to the office/branch the requestor is associated with.\n\nExample Requests:\n\naudits/searchtemplate\naudits/searchtemplate?fields=actionNames","operationId":"retrieveAuditSearchTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetMakerCheckersSearchTemplateResponse"}}}}},"/audits":{"get":{"tags":["Audits"],"summary":"List Audits","description":"Get a 200 list of audits that match the criteria supplied and sorted by audit id in descending order, and are within the requestors' data scope. Also it supports pagination and sorting\n\nExample Requests:\n\naudits\n\naudits?fields=madeOnDate,maker,processingResult\n\naudits?makerDateTimeFrom=2013-03-25 08:00:00&makerDateTimeTo=2013-04-04 18:00:00\n\naudits?officeId=1\n\naudits?officeId=1&includeJson=true","operationId":"retrieveAuditEntries","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"actionName","in":"query","description":"actionName","required":false,"type":"string"},{"name":"entityName","in":"query","description":"entityName","required":false,"type":"string"},{"name":"resourceId","in":"query","description":"resourceId","required":false,"type":"integer","format":"int64"},{"name":"makerId","in":"query","description":"makerId","required":false,"type":"integer","format":"int64"},{"name":"makerDateTimeFrom","in":"query","description":"makerDateTimeFrom","required":false,"type":"string"},{"name":"makerDateTimeTo","in":"query","description":"makerDateTimeTo","required":false,"type":"string"},{"name":"checkerId","in":"query","description":"checkerId","required":false,"type":"integer","format":"int64"},{"name":"checkerDateTimeFrom","in":"query","description":"checkerDateTimeFrom","required":false,"type":"string"},{"name":"checkerDateTimeTo","in":"query","description":"checkerDateTimeTo","required":false,"type":"string"},{"name":"processingResult","in":"query","description":"processingResult","required":false,"type":"integer","format":"int32"},{"name":"officeId","in":"query","description":"officeId","required":false,"type":"integer","format":"int32"},{"name":"groupId","in":"query","description":"groupId","required":false,"type":"integer","format":"int32"},{"name":"clientId","in":"query","description":"clientId","required":false,"type":"integer","format":"int32"},{"name":"loanid","in":"query","description":"loanid","required":false,"type":"integer","format":"int32"},{"name":"savingsAccountId","in":"query","description":"savingsAccountId","required":false,"type":"integer","format":"int32"},{"name":"paged","in":"query","description":"paged","required":false,"type":"boolean"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","description":"orderBy","required":false,"type":"string"},{"name":"sortOrder","in":"query","description":"sortOrder","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetMakerCheckerResponse"}}}}}},"/makercheckers/searchtemplate":{"get":{"tags":["Maker Checker (or 4-eye) functionality"],"summary":"Maker Checker Search Template","description":"This is a convenience resource. It can be useful when building a Checker Inbox UI. \"appUsers\" are data scoped to the office/branch the requestor is associated with. \"actionNames\" and \"entityNames\" returned are those that the requestor has Checker approval permissions for.\n\nExample Requests:\n\nmakercheckers/searchtemplate\nmakercheckers/searchtemplate?fields=entityNames","operationId":"retrieveAuditSearchTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetMakerCheckersSearchTemplateResponse"}}}}},"/makercheckers":{"get":{"tags":["Maker Checker (or 4-eye) functionality"],"summary":"List Maker Checker Entries","description":"Get a list of entries that can be checked by the requestor that match the criteria supplied.\n\nExample Requests:\n\nmakercheckers\n\nmakercheckers?fields=madeOnDate,maker,processingResult\n\nmakercheckers?makerDateTimeFrom=2013-03-25 08:00:00&makerDateTimeTo=2013-04-04 18:00:00\n\nmakercheckers?officeId=1\n\nmakercheckers?officeId=1&includeJson=true","operationId":"retrieveCommands","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"actionName","in":"query","description":"actionName","required":false,"type":"string"},{"name":"entityName","in":"query","description":"entityName","required":false,"type":"string"},{"name":"resourceId","in":"query","description":"resourceId","required":false,"type":"integer","format":"int64"},{"name":"makerId","in":"query","description":"makerId","required":false,"type":"integer","format":"int64"},{"name":"makerDateTimeFrom","in":"query","description":"makerDateTimeFrom","required":false,"type":"string"},{"name":"makerDateTimeTo","in":"query","description":"makerDateTimeTo","required":false,"type":"string"},{"name":"officeId","in":"query","description":"officeId","required":false,"type":"integer","format":"int32"},{"name":"groupId","in":"query","description":"groupId","required":false,"type":"integer","format":"int32"},{"name":"clientId","in":"query","description":"clientId","required":false,"type":"integer","format":"int32"},{"name":"loanid","in":"query","description":"loanid","required":false,"type":"integer","format":"int32"},{"name":"savingsAccountId","in":"query","description":"savingsAccountId","required":false,"type":"integer","format":"int32"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetMakerCheckerResponse"}}}}}},"/makercheckers/{auditId}":{"post":{"tags":["Maker Checker (or 4-eye) functionality"],"summary":"Approve Maker Checker Entry | Reject Maker Checker Entry","description":"","operationId":"approveMakerCheckerEntry","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"auditId","in":"path","description":"auditId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostMakerCheckersResponse"}}}},"delete":{"tags":["Maker Checker (or 4-eye) functionality"],"summary":"Delete Maker Checker Entry","description":"","operationId":"deleteMakerCheckerEntry","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"auditId","in":"path","description":"auditId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostMakerCheckersResponse"}}}}},"/accountnumberformats":{"get":{"tags":["Account number format"],"summary":"List Account number formats","description":"Example Requests:\n\naccountnumberformats\n\n\naccountnumberformats?fields=accountType,prefixType","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetAccountNumberFormatsIdResponse"}}}}},"post":{"tags":["Account number format"],"summary":"Create an Account number format","description":"Note: You may associate a single Account number format for a given account type\nMandatory Fields for Account number formats\naccountType","operationId":"create","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":false,"schema":{"$ref":"#/definitions/PostAccountNumberFormatsRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostAccountNumberFormatsResponse"}}}}},"/accountnumberformats/{accountNumberFormatId}":{"get":{"tags":["Account number format"],"summary":"Retrieve an Account number format","description":"Example Requests:\n\naccountnumberformats/1\n\n\naccountnumberformats/1?template=true\n\n\naccountnumberformats/1?fields=accountType,prefixType","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountNumberFormatId","in":"path","description":"accountNumberFormatId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetAccountNumberFormatsIdResponse"}}}},"put":{"tags":["Account number format"],"summary":"Update an Account number format","description":"","operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountNumberFormatId","in":"path","description":"accountNumberFormatId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutAccountNumberFormatsRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutAccountNumberFormatsResponse"}}}},"delete":{"tags":["Account number format"],"summary":"Delete an Account number format","description":"Note: Account numbers created while this format was active would remain unchanged.","operationId":"delete","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountNumberFormatId","in":"path","description":"accountNumberFormatId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteAccountNumberFormatsResponse"}}}}},"/accountnumberformats/template":{"get":{"tags":["Account number format"],"summary":"Retrieve Account number format Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\n\nExample Request:\n\naccountnumberformats/template","operationId":"retrieveTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetAccountNumberFormatsResponseTemplate"}}}}},"/caches":{"get":{"tags":["Cache"],"summary":"Retrieve Cache Types","description":"Returns the list of caches.\n\nExample Requests:\n\ncaches","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetCachesResponse"}}}}},"put":{"tags":["Cache"],"summary":"Switch Cache","description":"Switches the cache to chosen one.","operationId":"switchCache","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutCachesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutCachesResponse"}}}}},"/smscampaigns":{"get":{"tags":["SMS Campaigns"],"summary":"List SMS Campaigns","description":"Example Requests:\n\nsmscampaigns","operationId":"retrieveAllCampaigns","produces":["application/json"],"parameters":[{"name":"sqlSearch","in":"query","required":false,"type":"string"},{"name":"offset","in":"query","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","required":false,"type":"string"},{"name":"sortOrder","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"}}}},"post":{"tags":["SMS Campaigns"],"summary":"Create a SMS Campaign","description":"Mandatory Fields\ncampaignName, campaignType, triggerType, providerId, runReportId, message\n\nMandatory Fields for Cash based on selected report id\nparamValue in json format","operationId":"createCampaign","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/CommandWrapper"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"}}}}},"/smscampaigns/{resourceId}":{"get":{"tags":["SMS Campaigns"],"summary":"Retrieve a SMS Campaign","description":"Example Requests:\n\nsmscampaigns/1\n","operationId":"retrieveCampaign","produces":["application/json"],"parameters":[{"name":"resourceId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"}}}}},"/smscampaigns/{campaignId}":{"post":{"tags":["SMS Campaigns"],"summary":"SMS Campaign","description":"Activates | Deactivates | Reactivates","operationId":"handleCommands","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"campaignId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"}}}},"put":{"tags":["SMS Campaigns"],"summary":"Update a Campaign","description":"","operationId":"updateCampaign","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"campaignId","in":"path","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/CommandWrapper"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"}}}},"delete":{"tags":["SMS Campaigns"],"summary":"Delete a SMS Campaign","description":"Note: Only closed SMS Campaigns can be deleted","operationId":"delete","parameters":[{"name":"campaignId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"}}}}},"/smscampaigns/template":{"get":{"tags":["SMS Campaigns"],"summary":"Retrieve a SMS Campaign","description":"Example Requests:\n\nsmscampaigns/1\n\n\nsmscampaigns/1?template=true\n\n\nsmscampaigns/template","operationId":"template","parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"}}}}},"/smscampaigns/preview":{"post":{"tags":["SMS Campaigns"],"operationId":"preview","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/codes/{codeId}/codevalues":{"get":{"tags":["Code Values"],"summary":"List Code Values","description":"Returns the list of Code Values for a given Code\n\nExample Requests:\n\ncodes/1/codevalues","operationId":"retrieveAllCodeValues","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"codeId","in":"path","description":"codeId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"A List of Given response","schema":{"type":"array","items":{"$ref":"#/definitions/GetCodeValuesDataResponse"}}}}},"post":{"tags":["Code Values"],"summary":"Create a Code Value","description":"","operationId":"createCodeValue","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"codeId","in":"path","description":"codeId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostCodeValuesDataRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostCodeValueDataResponse"}}}}},"/codes/{codeId}/codevalues/{codeValueId}":{"get":{"tags":["Code Values"],"summary":"Retrieve a Code Value","description":"Returns the details of a Code Value\n\nExample Requests:\n\ncodes/1/codevalues/1","operationId":"retrieveCodeValue","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"codeValueId","in":"path","description":"codeValueId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetCodeValuesDataResponse"}}}},"put":{"tags":["Code Values"],"summary":"Update a Code Value","description":"Updates the details of a code value.","operationId":"updateCodeValue","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"codeId","in":"path","description":"codeId","required":true,"type":"integer","format":"int64"},{"name":"codeValueId","in":"path","description":"codeValueId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutCodeValuesDataRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutCodeValueDataResponse"}}}},"delete":{"tags":["Code Values"],"summary":"Delete a Code Value","description":"Deletes a code value","operationId":"deleteCodeValue","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"codeId","in":"path","description":"codeId","required":true,"type":"integer","format":"int64"},{"name":"codeValueId","in":"path","description":"codeValueId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteCodeValueDataResponse"}}}}},"/codes":{"get":{"tags":["Codes"],"summary":"Retrieve Codes","description":"Returns the list of codes.\n\nExample Requests:\n\ncodes","operationId":"retrieveCodes","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetCodesResponse"}}}}},"post":{"tags":["Codes"],"summary":"Create a Code","description":"Creates a code. Codes created through api are always 'user defined' and so system defined is marked as false.","operationId":"createCode","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostCodesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostCodesResponse"}}}}},"/codes/{codeId}":{"get":{"tags":["Codes"],"summary":"Retrieve a Code","description":"Returns the details of a Code.\n\nExample Requests:\n\ncodes/1","operationId":"retrieveCode","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"codeId","in":"path","description":"codeId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetCodesResponse"}}}},"put":{"tags":["Codes"],"summary":"Update a Code","description":"Updates the details of a code if it is not system defined.","operationId":"updateCode","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"codeId","in":"path","description":"codeId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutCodesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutCodesResponse"}}}},"delete":{"tags":["Codes"],"summary":"Delete a Code","description":"Deletes a code if it is not system defined.","operationId":"deleteCode","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"codeId","in":"path","description":"codeId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteCodesResponse"}}}}},"/externalservice/{servicename}":{"get":{"tags":["External Services"],"summary":"Retrieve External Services Configuration","description":"Returns a external Service configurations based on the Service Name.\n\nService Names supported are S3 and SMTP.\n\nExample Requests:\n\nexternalservice/SMTP","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"servicename","in":"path","description":"servicename","required":true,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/ExternalServicesPropertiesData"}}}},"put":{"tags":["External Services"],"summary":"Update External Service","description":"Updates the external Service Configuration for a Service Name.\n\nExample: \n\nexternalservice/S3","operationId":"updateExternalServiceProperties","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"servicename","in":"path","description":"servicename","required":true,"type":"string"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutExternalServiceRequest"}}],"responses":{"200":{"description":""}}}},"/configurations":{"get":{"tags":["Global Configuration"],"summary":"Retrieve Global Configuration | Retrieve Global Configuration for surveys","description":"Returns the list global enable/disable configurations.\n\nExample Requests:\n\nconfigurations\n\n\nReturns the list global enable/disable survey configurations.\n\nExample Requests:\n\nconfigurations/survey","operationId":"retrieveConfiguration","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"survey","in":"query","description":"survey","required":false,"type":"boolean","default":false}],"responses":{"200":{"description":"List of example \n response \nsurveys response \ngiven below","schema":{"type":"array","items":{"$ref":"#/definitions/GetGlobalConfigurationsResponse"}}}}}},"/configurations/{configId}":{"get":{"tags":["Global Configuration"],"summary":"Retrieve Global Configuration","description":"Returns a global enable/disable configurations.\n\nExample Requests:\n\nconfigurations/1","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"configId","in":"path","description":"configId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetGlobalConfigurationsResponse"}}}},"put":{"tags":["Global Configuration"],"summary":"Update Global Configuration","description":"Updates an enable/disable global configuration item.","operationId":"updateConfiguration","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"configId","in":"path","description":"configId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutGlobalConfigurationsRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutGlobalConfigurationsResponse"}}}}},"/CreditBureauConfiguration/organisationCreditBureau":{"get":{"tags":["CreditBureau Configuration"],"operationId":"getOrganisationCreditBureau","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"put":{"tags":["CreditBureau Configuration"],"operationId":"updateCreditBureau","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/CreditBureauConfiguration/loanProduct":{"get":{"tags":["CreditBureau Configuration"],"operationId":"fetchLoanProducts","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/CreditBureauConfiguration/mappings":{"get":{"tags":["CreditBureau Configuration"],"operationId":"getCreditBureauLoanProductMapping","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"put":{"tags":["CreditBureau Configuration"],"operationId":"updateCreditBureauLoanProductMapping","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/CreditBureauConfiguration/organisationCreditBureau/{organisationCreditBureauId}":{"post":{"tags":["CreditBureau Configuration"],"operationId":"addOrganisationCreditBureau","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"organisationCreditBureauId","in":"path","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/CreditBureauConfiguration/mappings/{CreditBureauId}":{"post":{"tags":["CreditBureau Configuration"],"operationId":"createCreditBureauLoanProductMapping","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"CreditBureauId","in":"path","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/CreditBureauConfiguration/config/{organisationCreditBureauId}":{"get":{"tags":["CreditBureau Configuration"],"operationId":"getConfiguration","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"organisationCreditBureauId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/CreditBureauConfiguration":{"get":{"tags":["CreditBureau Configuration"],"operationId":"getCreditBureau","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/datatables/{datatableName}":{"put":{"tags":["Data Tables"],"summary":"Update Data Table","description":"Modifies fields of a data table. If the apptableName parameter is passed, data table is deregistered and registered with the new application table.","operationId":"updateDatatable","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"datatableName","in":"path","description":"datatableName","required":true,"type":"string"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutDataTablesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutDataTablesResponse"}}}},"delete":{"tags":["Data Tables"],"summary":"Delete Data Table","description":"Deletes a data table and deregisters it from the Apache Fineract Core application table.","operationId":"deleteDatatable","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"datatableName","in":"path","description":"datatableName","required":true,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteDataTablesResponse"}}}}},"/datatables":{"get":{"tags":["Data Tables"],"summary":"List Data Tables","description":"Lists registered data tables and the Apache Fineract Core application table they are registered to.\n\nARGUMENTS\n\napptable - optional\nThe Apache Fineract core application table.\n\nExample Requests:\n\ndatatables?apptable=m_client\n\n\ndatatables","operationId":"getDatatables","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"apptable","in":"query","description":"apptable","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetDataTablesResponse"}}}}},"post":{"tags":["Data Tables"],"summary":"Create Data Table","description":"Create a new data table and registers it with the Apache Fineract Core application table.\n\nField Descriptions\n\nMandatory - datatableName : \n\nThe name of the Data Table.\n\nMandatory - apptableName\n\nApplication table name. Must be one of the following:\n\nm_client\n\nm_group\n\nm_loan\n\nm_office\n\nm_saving_account\n\nm_product_loan\n\nm_savings_product\n\nMandatory - columns \nAn array of columns in the new Data Table.\n\nOptional - multiRow\n\nAllows to create multiple entries in the Data Table. Optional, defaults to false. If this property is not provided Data Table will allow only one entry.\n\nField Descriptions - columns\n\nMandatory - name\n\nName of the created column. Can contain only alphanumeric characters, underscores and spaces, but cannot start with a number. Cannot start or end with an underscore or space.\n\nMandatory - type\n\nColumn type. Must be one of the following:\n\nBoolean\n\nDate\n\nDateTime\n\nDecimal\n\nDropdown\n\n\nNumber\n\nString\n\nText\n\nMandatory [type = Dropdown] - code\n\nUsed in Code Value fields. Column name becomes: code_cd_name. Mandatory if using type Dropdown, otherwise an error is returned.\n\nOptional - mandatory\n\nDetermines whether this column must have a value in every entry. Optional, defaults to false.\n\nMandatory [type = String] - length\n\nLength of the text field. Mandatory if type String is used, otherwise an error is returned.","operationId":"createDatatable","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostDataTablesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostDataTablesResponse"}}}}},"/datatables/register/{datatable}/{apptable}":{"post":{"tags":["Data Tables"],"summary":"Register Data Table","description":"Registers a data table with the Apache Fineract Core application table. This allows the data table to be maintained through the API. In case the datatable is a PPI (survey table), a parameter category should be pass along with the request. The API currently support one category (200)","operationId":"registerDatatable","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"datatable","in":"path","description":"datatable","required":true,"type":"string"},{"name":"apptable","in":"path","description":"apptable","required":true,"type":"string"},{"in":"body","name":"body","description":"body","required":false,"schema":{"$ref":"#/definitions/PostDataTablesRegisterDatatableAppTable"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutDataTablesResponse"}}}}},"/datatables/deregister/{datatable}":{"post":{"tags":["Data Tables"],"summary":"Deregister Data Table","description":"Deregisters a data table. It will no longer be available through the API.","operationId":"deregisterDatatable","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"datatable","in":"path","description":"datatable","required":true,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutDataTablesResponse"}}}}},"/datatables/{datatable}":{"get":{"tags":["Data Tables"],"summary":"Retrieve Data Table Details","description":"Lists a registered data table details and the Apache Fineract Core application table they are registered to.","operationId":"getDatatable","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"datatable","in":"path","description":"datatable","required":true,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetDataTablesResponse"}}}}},"/datatables/{datatable}/{apptableId}":{"get":{"tags":["Data Tables"],"summary":"Retrieve Entry(s) from Data Table","description":"Gets the entry (if it exists) for data tables that are one to one with the application table. \nGets the entries (if they exist) for data tables that are one to many with the application table.\n\nNote: The 'fields' parameter is not available for datatables.\n\nARGUMENTS\norderoptional Specifies the order in which data is returned.genericResultSetoptional, defaults to false If 'true' an optimised JSON format is returned suitable for tabular display of data. This format is used by the default data tables UI functionality.\nExample Requests:\n\ndatatables/extra_client_details/1\n\n\ndatatables/extra_family_details/1?order=`Date of Birth` desc\n\n\ndatatables/extra_client_details/1?genericResultSet=true","operationId":"getDatatable","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"datatable","in":"path","description":"datatable","required":true,"type":"string"},{"name":"apptableId","in":"path","description":"apptableId","required":true,"type":"integer","format":"int64"},{"name":"order","in":"query","description":"order","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetDataTablesAppTableIdResponse"}}}},"post":{"tags":["Data Tables"],"summary":"Create Entry in Data Table","description":"Adds a row to the data table.\n\nNote that the default datatable UI functionality converts any field name containing spaces to underscores when using the API. This means the field name \"Business Description\" is considered the same as \"Business_Description\". So you shouldn't have both \"versions\" in any data table.","operationId":"createDatatableEntry","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"datatable","in":"path","description":"datatable","required":true,"type":"string"},{"name":"apptableId","in":"path","description":"apptableId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostDataTablesAppTableIdRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostDataTablesAppTableIdResponse"}}}},"put":{"tags":["Data Tables"],"summary":"Update Entry in Data Table (One to One)","description":"Updates the row (if it exists) of the data table.","operationId":"updateDatatableEntryOnetoOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"datatable","in":"path","description":"datatable","required":true,"type":"string"},{"name":"apptableId","in":"path","description":"apptableId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutDataTablesAppTableIdRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutDataTablesAppTableIdResponse"}}}},"delete":{"tags":["Data Tables"],"summary":"Delete Entry(s) in Data Table","description":"Deletes the entry (if it exists) for data tables that are one-to-one with the application table. \nDeletes the entries (if they exist) for data tables that are one-to-many with the application table.","operationId":"deleteDatatableEntries","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"datatable","in":"path","description":"datatable","required":true,"type":"string"},{"name":"apptableId","in":"path","description":"apptableId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteDataTablesDatatableAppTableIdResponse"}}}}},"/datatables/{datatable}/{apptableId}/{datatableId}":{"get":{"tags":["Data Tables"],"operationId":"getDatatableManyEntry","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"datatable","in":"path","required":true,"type":"string"},{"name":"apptableId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"datatableId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"order","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"put":{"tags":["Data Tables"],"summary":"Update Entry in Data Table (One to Many)","description":"Updates the row (if it exists) of the data table.","operationId":"updateDatatableEntryOneToMany","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"datatable","in":"path","description":"datatable","required":true,"type":"string"},{"name":"apptableId","in":"path","description":"apptableId","required":true,"type":"integer","format":"int64"},{"name":"datatableId","in":"path","description":"datatableId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutDataTablesAppTableIdDatatableIdRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutDataTablesAppTableIdDatatableIdResponse"}}}},"delete":{"tags":["Data Tables"],"summary":"Delete Entry in Datatable (One to Many)","description":"Deletes the entry (if it exists) for data tables that are one to many with the application table.\n\n","operationId":"deleteDatatableEntries","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"datatable","in":"path","description":"datatable","required":true,"type":"body","x-example":"{}"},{"name":"apptableId","in":"path","description":"apptableId","required":true,"type":"integer","format":"int64"},{"name":"datatableId","in":"path","description":"datatableId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteDataTablesDatatableAppTableIdDatatableIdResponse"}}}}},"/entityDatatableChecks/{entityDatatableCheckId}":{"delete":{"tags":["Entity-Datatable Checks"],"summary":"Delete Entity-Datatable Checks","description":"Deletes an existing Entity-Datatable Check","operationId":"deleteDatatable","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"entityDatatableCheckId","in":"path","description":"entityDatatableCheckId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteEntityDatatableChecksTemplateResponse"}}}}},"/entityDatatableChecks":{"get":{"tags":["Entity-Datatable Checks"],"summary":"List Entity-Datatable Checks","description":"The list capability of Entity-Datatable Checks can support pagination.\n\nOPTIONAL ARGUMENTS\noffset Integer optional, defaults to 0 Indicates the result from which pagination startslimit Integer optional, defaults to 200 Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1\nExample Request:\n\nentityDatatableChecks?offset=0&limit=15","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"status","in":"query","description":"status","required":false,"type":"integer","format":"int64"},{"name":"entity","in":"query","description":"entity","required":false,"type":"string"},{"name":"productId","in":"query","description":"productId","required":false,"type":"integer","format":"int64"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetEntityDatatableChecksResponse"}}}}},"post":{"tags":["Entity-Datatable Checks"],"summary":"Create Entity-Datatable Checks","description":"Mandatory Fields : \nentity, status, datatableName\n\nNon-Mandatory Fields : \nproductId","operationId":"createEntityDatatableCheck","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostEntityDatatableChecksTemplateRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostEntityDatatableChecksTemplateResponse"}}}}},"/entityDatatableChecks/template":{"get":{"tags":["Entity-Datatable Checks"],"summary":"Retrieve Entity-Datatable Checks Template","description":"This is a convenience resource useful for building maintenance user interface screens for Entity-Datatable Checks applications. The template data returned consists of:\n\nAllowed Value Lists\nExample Request:\n\nentityDatatableChecks/template","operationId":"getTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetEntityDatatableChecksTemplateResponse"}}}}},"/reports/{id}":{"get":{"tags":["Reports"],"summary":"Retrieve a Report\n","description":"Example Requests:\n\nreports/1\n\n\nreports/1?template=true","operationId":"retrieveReport","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"id","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetReportsResponse"}}}},"put":{"tags":["Reports"],"summary":"Update a Report","description":"Only the useReport value can be updated for core reports.","operationId":"updateReport","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"id","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutReportRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutReportResponse"}}}},"delete":{"tags":["Reports"],"summary":"Delete a Report","description":"Only non-core reports can be deleted.","operationId":"deleteReport","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"id","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteReportsResponse"}}}}},"/reports":{"get":{"tags":["Reports"],"summary":"List Reports","description":"Lists all reports and their parameters.\n\nExample Request:\n\nreports","operationId":"retrieveReportList","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":""}}},"post":{"tags":["Reports"],"summary":"Create a Report","description":"","operationId":"createReport","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostRepostRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostReportsResponse"}}}}},"/reports/template":{"get":{"tags":["Reports"],"summary":"Retrieve Report Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\n\nExample Request : \n\nreports/template","operationId":"retrieveOfficeTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetReportsTemplateResponse"}}}}},"/runreports/{reportName}":{"get":{"tags":["Run Reports"],"summary":"Running a Report","description":"This resource allows you to run and receive output from pre-defined Apache Fineract reports.\n\nReports can also be used to provide data for searching and workflow functionality.\n\nThe default output is a JSON formatted \"Generic Resultset\". The Generic Resultset contains Column Heading as well as Data information. However, you can export to CSV format by simply adding \"&exportCSV=true\" to the end of your URL.\n\nIf Pentaho reports have been pre-defined, they can also be run through this resource. Pentaho reports can return HTML, PDF or CSV formats.\n\nThe Apache Fineract reference application uses a JQuery plugin called stretchy reporting which, itself, uses this reports resource to provide a pretty flexible reporting User Interface (UI).\n\n\n\nExample Requests:\n\nrunreports/Client%20Listing?R_officeId=1\n\n\nrunreports/Client%20Listing?R_officeId=1&exportCSV=true\n\n\nrunreports/OfficeIdSelectOne?R_officeId=1¶meterType=true\n\n\nrunreports/OfficeIdSelectOne?R_officeId=1¶meterType=true&exportCSV=true\n\n\nrunreports/Expected%20Payments%20By%20Date%20-%20Formatted?R_endDate=2013-04-30&R_loanOfficerId=-1&R_officeId=1&R_startDate=2013-04-16&output-type=HTML&R_officeId=1\n\n\nrunreports/Expected%20Payments%20By%20Date%20-%20Formatted?R_endDate=2013-04-30&R_loanOfficerId=-1&R_officeId=1&R_startDate=2013-04-16&output-type=XLS&R_officeId=1\n\n\nrunreports/Expected%20Payments%20By%20Date%20-%20Formatted?R_endDate=2013-04-30&R_loanOfficerId=-1&R_officeId=1&R_startDate=2013-04-16&output-type=CSV&R_officeId=1\n\n\nrunreports/Expected%20Payments%20By%20Date%20-%20Formatted?R_endDate=2013-04-30&R_loanOfficerId=-1&R_officeId=1&R_startDate=2013-04-16&output-type=PDF&R_officeId=1","operationId":"runReport","consumes":["application/json"],"produces":["application/json","text/csv","application/vnd.ms-excel","application/pdf","text/html"],"parameters":[{"name":"reportName","in":"path","description":"reportName","required":true,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetReportNameResponse"}}}}},"/{entityType}/{entityId}/documents":{"get":{"tags":["Documents"],"summary":"List documents","description":"Example Requests:\n\nclients/1/documents\n\nclient_identifiers/1/documents\n\nloans/1/documents?fields=name,description","operationId":"retreiveAllDocuments","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"entityType","in":"path","description":"entityType","required":true,"type":"string"},{"name":"entityId","in":"path","description":"entityId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetEntityTypeEntityIdDocumentsResponse"}}}}},"post":{"tags":["Documents"],"summary":"Create a Document","description":"Note: A document is created using a Multi-part form upload \n\nBody Parts\n\nname : \nName or summary of the document\n\ndescription : \nDescription of the document\n\nfile : \nThe file to be uploaded\n\nMandatory Fields : \nfile and description","operationId":"createDocument","consumes":["multipart/form-data"],"produces":["application/json"],"parameters":[{"name":"entityType","in":"path","description":"entityType","required":true,"type":"string"},{"name":"entityId","in":"path","description":"entityId","required":true,"type":"integer","format":"int64"},{"name":"Content-Length","in":"header","description":"Content-Length","required":false,"type":"integer","format":"int64"},{"name":"file","in":"formData","description":"file","required":false,"type":"file"},{"name":"name","in":"formData","description":"name","required":false,"type":"string"},{"name":"description","in":"formData","description":"description","required":false,"type":"string"}],"responses":{"200":{"description":"Not Shown (multi-part form data)","schema":{"$ref":"#/definitions/PostEntityTypeEntityIdDocumentsResponse"}}}}},"/{entityType}/{entityId}/documents/{documentId}":{"get":{"tags":["Documents"],"summary":"Retrieve a Document","description":"Example Requests:\n\nclients/1/documents/1\n\n\nloans/1/documents/1\n\n\nclient_identifiers/1/documents/1?fields=name,description","operationId":"getDocument","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"entityType","in":"path","description":"entityType","required":true,"type":"string"},{"name":"entityId","in":"path","description":"entityId","required":true,"type":"integer","format":"int64"},{"name":"documentId","in":"path","description":"documentId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetEntityTypeEntityIdDocumentsResponse"}}}},"put":{"tags":["Documents"],"summary":"Update a Document","description":"Note: A document is updated using a Multi-part form upload \nBody Parts\nname\nName or summary of the document\ndescription\nDescription of the document\nfile\nThe file to be uploaded","operationId":"updateDocument","consumes":["multipart/form-data"],"produces":["application/json"],"parameters":[{"name":"entityType","in":"path","description":"entityType","required":true,"type":"string"},{"name":"entityId","in":"path","description":"entityId","required":true,"type":"integer","format":"int64"},{"name":"documentId","in":"path","description":"documentId","required":true,"type":"integer","format":"int64"},{"name":"Content-Length","in":"header","description":"Content-Length","required":false,"type":"integer","format":"int64"},{"name":"file","in":"formData","description":"file","required":false,"type":"file"},{"name":"name","in":"formData","description":"name","required":false,"type":"string"},{"name":"description","in":"formData","description":"description","required":false,"type":"string"}],"responses":{"200":{"description":"Not Shown (multi-part form data)","schema":{"$ref":"#/definitions/PutEntityTypeEntityIdDocumentsResponse"}}}},"delete":{"tags":["Documents"],"summary":"Remove a Document","description":"","operationId":"deleteDocument","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"entityType","in":"path","description":"entityType","required":true,"type":"string"},{"name":"entityId","in":"path","description":"entityId","required":true,"type":"integer","format":"int64"},{"name":"documentId","in":"path","description":"documentId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteEntityTypeEntityIdDocumentsResponse"}}}}},"/{entityType}/{entityId}/documents/{documentId}/attachment":{"get":{"tags":["Documents"],"summary":"Retrieve Binary File associated with Document","description":"Request used to download the file associated with the document\n\nExample Requests:\n\nclients/1/documents/1/attachment\n\n\nloans/1/documents/1/attachment","operationId":"downloadFile","consumes":["application/json"],"produces":["application/octet-stream"],"parameters":[{"name":"entityType","in":"path","description":"entityType","required":true,"type":"string"},{"name":"entityId","in":"path","description":"entityId","required":true,"type":"integer","format":"int64"},{"name":"documentId","in":"path","description":"documentId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"Not Shown: The corresponding Binary file"}}}},"/{entity}/{entityId}/images":{"get":{"tags":["DomainNameapiv1{entity}{entityId}images"],"operationId":"downloadClientImage","consumes":["application/json"],"produces":["application/octet-stream"],"parameters":[{"name":"entity","in":"path","required":true,"type":"string"},{"name":"entityId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"maxWidth","in":"query","required":false,"type":"integer","format":"int32"},{"name":"maxHeight","in":"query","required":false,"type":"integer","format":"int32"},{"name":"output","in":"query","required":false,"type":"string"}],"responses":{"default":{"description":"successful operation"}}},"post":{"tags":["DomainNameapiv1{entity}{entityId}images"],"operationId":"addNewClientImage","consumes":["text/plain","text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"entity","in":"path","required":true,"type":"string"},{"name":"entityId","in":"path","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"put":{"tags":["DomainNameapiv1{entity}{entityId}images"],"operationId":"updateClientImage","consumes":["multipart/form-data"],"produces":["application/json"],"parameters":[{"name":"entity","in":"path","required":true,"type":"string"},{"name":"entityId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"Content-Length","in":"header","required":false,"type":"integer","format":"int64"},{"name":"file","in":"formData","required":false,"type":"file"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"delete":{"tags":["DomainNameapiv1{entity}{entityId}images"],"operationId":"deleteClientImage","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"entity","in":"path","required":true,"type":"string"},{"name":"entityId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/entitytoentitymapping/{mapId}/{fromId}/{toId}":{"get":{"tags":["DomainNameapiv1entitytoentitymapping"],"operationId":"getEntityToEntityMappings","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"mapId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"fromId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"toId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/entitytoentitymapping/{mapId}":{"get":{"tags":["DomainNameapiv1entitytoentitymapping"],"operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"mapId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"put":{"tags":["DomainNameapiv1entitytoentitymapping"],"operationId":"updateMap","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"mapId","in":"path","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"delete":{"tags":["DomainNameapiv1entitytoentitymapping"],"operationId":"delete","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"mapId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/entitytoentitymapping":{"get":{"tags":["DomainNameapiv1entitytoentitymapping"],"operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/entitytoentitymapping/{relId}":{"post":{"tags":["DomainNameapiv1entitytoentitymapping"],"operationId":"createMap","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"relId","in":"path","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/hooks":{"get":{"tags":["Hooks"],"summary":"Retrieve Hooks","description":"Returns the list of hooks.\n\nExample Requests:\n\nhooks","operationId":"retrieveHooks","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetHookResponse"}}}}},"post":{"tags":["Hooks"],"summary":"Create a Hook","description":"The following parameters can be passed for the creation of a hook :-\n\nname - string - Required. The name of the template that is being called. (See /hooks/template for the list of valid hook names.)\n\nisActive - boolean - Determines whether the hook is actually triggered.\n\nevents - array - Determines what events the hook is triggered for.\n\nconfig - hash - Required. Key/value pairs to provide settings for this hook. These settings vary between the templates.\n\ntemplateId - Optional. The UGD template ID associated with the same entity (client or loan).","operationId":"createHook","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/PostHookRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostHookResponse"}}}}},"/hooks/{hookId}":{"get":{"tags":["Hooks"],"summary":"Retrieve a Hook","description":"Returns the details of a Hook.\n\nExample Requests:\n\nhooks/1","operationId":"retrieveHook","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"hookId","in":"path","description":"hookId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetHookResponse"}}}},"put":{"tags":["Hooks"],"summary":"Update a Hook","description":"Updates the details of a hook.","operationId":"updateHook","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"hookId","in":"path","description":"hookId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/PutHookRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutHookResponse"}}}},"delete":{"tags":["Hooks"],"summary":"Delete a Hook","description":"Deletes a hook.","operationId":"deleteHook","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"hookId","in":"path","description":"hookId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteHookResponse"}}}}},"/hooks/template":{"get":{"tags":["Hooks"],"summary":"Retrieve Hooks Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\nExample Request:\n\nhooks/template","operationId":"template","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetHookTemplateResponse"}}}}},"/scheduler":{"get":{"tags":["Scheduler"],"summary":"Retrieve Scheduler Status","description":"Returns the scheduler status.\n\nExample Requests:\n\nscheduler","operationId":"retrieveStatus","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetSchedulerResponse"}}}},"post":{"tags":["Scheduler"],"summary":"Activate Scheduler Jobs | Suspend Scheduler Jobs","description":"Activates the scheduler job service. | Suspends the scheduler job service.","operationId":"changeSchedulerStatus","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"command","in":"query","description":"command","required":false,"type":"string"}],"responses":{"200":{"description":"POST : scheduler?command=start\n\n\nPOST : scheduler?command=stop"}}}},"/jobs/{jobId}/runhistory":{"get":{"tags":["MIFOSX-BATCH JOBS"],"summary":"Retrieve Job Run History","description":"Example Requests:\n\njobs/5/runhistory?offset=0&limit=200","operationId":"retrieveHistory","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"jobId","in":"path","description":"jobId","required":true,"type":"integer","format":"int64"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","description":"orderBy","required":false,"type":"string"},{"name":"sortOrder","in":"query","description":"sortOrder","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetJobsJobIDJobRunHistoryResponse"}}}}},"/jobs/{jobId}":{"get":{"tags":["MIFOSX-BATCH JOBS"],"summary":"Retrieve a Job","description":"Returns the details of a Job.\n\nExample Requests:\n\njobs/5","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"jobId","in":"path","description":"jobId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetJobsResponse"}}}},"post":{"tags":["MIFOSX-BATCH JOBS"],"summary":"Run a Job","description":"Manually Execute Specific Job.","operationId":"executeJob","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"jobId","in":"path","description":"jobId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command","required":false,"type":"string"}],"responses":{"200":{"description":"POST: jobs/1?command=executeJob"}}},"put":{"tags":["MIFOSX-BATCH JOBS"],"summary":"Update a Job","description":"Updates the details of a job.","operationId":"updateJobDetail","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"jobId","in":"path","description":"jobId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutJobsJobsIDRequest"}}],"responses":{"200":{"description":""}}}},"/jobs":{"get":{"tags":["MIFOSX-BATCH JOBS"],"summary":"Retrieve Scheduler Jobs","description":"Returns the list of jobs.\n\nExample Requests:\n\njobs","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetJobsResponse"}}}}}},"/reportmailingjobs":{"get":{"tags":["Report Mailing Jobs"],"summary":"List Report Mailing Jobs","description":"Example Requests:\n\nreportmailingjobs","operationId":"retrieveAllReportMailingJobs","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","description":"orderBy","required":false,"type":"string"},{"name":"sortOrder","in":"query","description":"sortOrder","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetReportMailingJobsResponse"}}}}},"post":{"tags":["Report Mailing Jobs"],"summary":"Create a Report Mailing Job","description":"Mandatory Fields: name, startDateTime, stretchyReportId, emailRecipients, emailSubject, emailMessage, emailAttachmentFileFormatId, recurrence, isActive\n\nOptional Fields: description, stretchyReportParamMap","operationId":"createReportMailingJob","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostReportMailingJobsRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostReportMailingJobsResponse"}}}}},"/reportmailingjobs/{entityId}":{"get":{"tags":["Report Mailing Jobs"],"summary":"Retrieve a Report Mailing Job","description":"Example Requests:\n\nreportmailingjobs/1\n\n\nreportmailingjobs/1?template=true","operationId":"retrieveReportMailingJob","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"entityId","in":"path","description":"entityId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetReportMailingJobsResponse"}}}},"put":{"tags":["Report Mailing Jobs"],"summary":"Update a Report Mailing Job\n","description":"","operationId":"updateReportMailingJob","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"entityId","in":"path","description":"entityId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutReportMailingJobsRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutReportMailingJobsResponse"}}}},"delete":{"tags":["Report Mailing Jobs"],"summary":"Delete a Report Mailing Job","description":"","operationId":"deleteReportMailingJob","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"entityId","in":"path","description":"entityId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/DeleteReportMailingJobsRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteReportMailingJobsResponse"}}}}},"/reportmailingjobs/template":{"get":{"tags":["Report Mailing Jobs"],"summary":"Retrieve Report Mailing Job Details Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for report mailing job applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\nExample Request:\n\nreportmailingjobs/template","operationId":"retrieveReportMailingJobTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetReportMailingJobsTemplate"}}}}},"/reportmailingjobrunhistory":{"get":{"tags":["List Report Mailing Job History"],"summary":"List Report Mailing Job History","description":"The list capability of report mailing job history can support pagination and sorting.\n\nExample Requests:\n\nreportmailingjobrunhistory/1","operationId":"retrieveAllByReportMailingJobId","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"reportMailingJobId","in":"query","description":"reportMailingJobId","required":false,"type":"integer","format":"int64"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","description":"orderBy","required":false,"type":"string"},{"name":"sortOrder","in":"query","description":"sortOrder","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/ReportMailingJobRunHistoryData"}}}}},"/authentication":{"post":{"tags":["Authentication HTTP Basic"],"summary":"Verify authentication","description":"Authenticates the credentials provided and returns the set roles and permissions allowed.","operationId":"authenticate","produces":["application/json"],"parameters":[{"name":"username","in":"query","description":"username","required":false,"type":"string"},{"name":"password","in":"query","description":"password","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostAuthenticationResponse"}},"400":{"description":"Unauthenticated. Please login"}}}},"/userdetails":{"get":{"tags":["Fetch authenticated user details"],"summary":"Fetch authenticated user details\n","description":"checks the Authentication and returns the set roles and permissions allowed.","operationId":"fetchAuthenticatedUserData","produces":["application/json"],"parameters":[{"name":"access_token","in":"query","description":"access_token","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetUserDetailsResponse"}}}}},"/sms/{campaignId}/messageByStatus":{"get":{"tags":["SMS"],"operationId":"retrieveAllSmsByStatus","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"campaignId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"status","in":"query","required":false,"type":"integer","format":"int64"},{"name":"fromDate","in":"query","required":false,"type":"string"},{"name":"toDate","in":"query","required":false,"type":"string"},{"name":"locale","in":"query","required":false,"type":"string"},{"name":"dateFormat","in":"query","required":false,"type":"string"},{"name":"sqlSearch","in":"query","required":false,"type":"string"},{"name":"offset","in":"query","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","required":false,"type":"string"},{"name":"sortOrder","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/sms":{"get":{"tags":["SMS"],"operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"post":{"tags":["SMS"],"operationId":"create","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/sms/{resourceId}":{"get":{"tags":["SMS"],"operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"resourceId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"put":{"tags":["SMS"],"operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"resourceId","in":"path","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"delete":{"tags":["SMS"],"operationId":"delete","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"resourceId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/likelihood/{ppiName}/{likelihoodId}":{"get":{"tags":["Likelihood"],"operationId":"retrieve","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"likelihoodId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"put":{"tags":["Likelihood"],"operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"likelihoodId","in":"path","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/likelihood/{ppiName}":{"get":{"tags":["Likelihood"],"operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"ppiName","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/povertyLine/{ppiName}":{"get":{"tags":["Poverty Line"],"operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"ppiName","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/povertyLine/{ppiName}/{likelihoodId}":{"get":{"tags":["Poverty Line"],"operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"ppiName","in":"path","required":true,"type":"string"},{"name":"likelihoodId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/survey/{surveyName}/{apptableId}":{"post":{"tags":["Survey"],"summary":"Create an entry in the survey table","description":"Insert and entry in a survey table (full fill the survey).\n\nRefer Link for sample Body: [ https://demo.openmf.org/api-docs/apiLive.htm#survey_create ] ","operationId":"createDatatableEntry","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"surveyName","in":"path","description":"surveyName","required":true,"type":"string"},{"name":"apptableId","in":"path","description":"apptableId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostSurveySurveyNameApptableIdRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostSurveySurveyNameApptableIdResponse"}}}}},"/survey/{surveyName}/{clientId}/{fulfilledId}":{"delete":{"tags":["Survey"],"operationId":"deleteDatatableEntries","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"surveyName","in":"path","required":true,"type":"string"},{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"fulfilledId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/survey":{"get":{"tags":["Survey"],"summary":"Retrieve surveys","description":"Retrieve surveys. This allows to retrieve the list of survey tables registered .","operationId":"retrieveSurveys","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetSurveyResponse"}}}}}},"/survey/{surveyName}":{"get":{"tags":["Survey"],"summary":"Retrieve survey","description":"Lists a registered survey table details and the Apache Fineract Core application table they are registered to.","operationId":"retrieveSurvey","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"surveyName","in":"path","description":"surveyName","required":true,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetSurveyResponse"}}}}},"/survey/{surveyName}/{clientId}":{"get":{"tags":["Survey"],"operationId":"getClientSurveyOverview","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"surveyName","in":"path","required":true,"type":"string"},{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/survey/{surveyName}/{clientId}/{entryId}":{"get":{"tags":["Survey"],"operationId":"getSurveyEntry","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"surveyName","in":"path","required":true,"type":"string"},{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"entryId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/survey/register/{surveyName}/{apptable}":{"put":{"tags":["Survey"],"operationId":"register","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"surveyName","in":"path","required":true,"type":"string"},{"name":"apptable","in":"path","required":true,"type":"string"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/mixreport":{"get":{"tags":["Mix Report"],"operationId":"retrieveXBRLReport","produces":["application/xml"],"parameters":[{"name":"startDate","in":"query","required":false,"type":"string","format":"date-time"},{"name":"endDate","in":"query","required":false,"type":"string","format":"date-time"},{"name":"currency","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/mixtaxonomy":{"get":{"tags":["Mix Taxonomy"],"operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/mixmapping":{"get":{"tags":["Mix Mapping"],"operationId":"retrieveTaxonomyMapping","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"put":{"tags":["Mix Mapping"],"operationId":"updateTaxonomyMapping","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/holidays/{holidayId}":{"get":{"tags":["Holidays"],"summary":"Retrieve a Holiday","description":"Example Requests:\n\nholidays/1","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"holidayId","in":"path","description":"holidayId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetHolidaysResponse"}}}},"post":{"tags":["Holidays"],"summary":"Activate a Holiday","description":"Always Holidays are created in pending state. This API allows to activate a holiday.\n\nOnly the active holidays are considered for rescheduling the loan repayment.","operationId":"handleCommands","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"holidayId","in":"path","description":"holidayId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command","required":false,"type":"string"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostHolidaysHolidayIdRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostHolidaysHolidayIdResponse"}}}},"put":{"tags":["Holidays"],"summary":"Update a Holiday","description":"If a holiday is in pending state (created and not activated) then all fields are allowed to modify. Once holidays become active only name and descriptions are allowed to modify.","operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"holidayId","in":"path","description":"holidayId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutHolidaysHolidayIdRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutHolidaysHolidayIdResponse"}}}},"delete":{"tags":["Holidays"],"summary":"Delete a Holiday","description":"This API allows to delete a holiday. This is a soft delete the deleted holiday status is marked as deleted.","operationId":"delete","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"holidayId","in":"path","description":"holidayId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteHolidaysHolidayIdResponse"}}}}},"/holidays":{"get":{"tags":["Holidays"],"summary":"List Holidays","description":"Example Requests:\n\nholidays?officeId=1","operationId":"retrieveAllHolidays","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"officeId","in":"query","description":"officeId","required":false,"type":"integer","format":"int64"},{"name":"fromDate","in":"query","description":"fromDate","required":false,"type":"string"},{"name":"toDate","in":"query","description":"toDate","required":false,"type":"string"},{"name":"locale","in":"query","description":"locale","required":false,"type":"string"},{"name":"dateFormat","in":"query","description":"dateFormat","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetHolidaysResponse"}}}}},"post":{"tags":["Holidays"],"summary":"Create a Holiday","description":"Mandatory Fields: name, description, fromDate, toDate, repaymentsRescheduledTo, offices","operationId":"createNewHoliday","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostHolidaysRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostHolidaysResponse"}}}}},"/currencies":{"get":{"tags":["Currency"],"summary":"Retrieve Currency Configuration","description":"Returns the list of currencies permitted for use AND the list of currencies not selected (but available for selection).\n\nExample Requests:\n\ncurrencies\n\n\ncurrencies?fields=selectedCurrencyOptions","operationId":"retrieveCurrencies","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetCurrenciesResponse"}}}},"put":{"tags":["Currency"],"summary":"Update Currency Configuration","description":"Updates the list of currencies permitted for use.","operationId":"updateCurrencies","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutCurrenciesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutCurrenciesResponse"}}}}},"/officetransactions":{"get":{"tags":["officetransactions"],"operationId":"retrieveOfficeTransactions","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"post":{"tags":["officetransactions"],"operationId":"transferMoneyFrom","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/officetransactions/template":{"get":{"tags":["officetransactions"],"operationId":"newOfficeTransactionDetails","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/officetransactions/{transactionId}":{"delete":{"tags":["officetransactions"],"operationId":"delete","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"transactionId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/offices/template":{"get":{"tags":["Offices"],"summary":"Retrieve Office Details Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\nExample Request:\n\noffices/template","operationId":"retrieveOfficeTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetOfficesTemplateResponse"}}}}},"/offices":{"get":{"tags":["Offices"],"summary":"List Offices","description":"Example Requests:\n\noffices\n\n\noffices?fields=id,name,openingDate","operationId":"retrieveOffices","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"includeAllOffices","in":"query","description":"includeAllOffices","required":false,"type":"boolean","default":false},{"name":"orderBy","in":"query","description":"orderBy","required":false,"type":"string"},{"name":"sortOrder","in":"query","description":"sortOrder","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetOfficesResponse"}}}}},"post":{"tags":["Offices"],"summary":"Create an Office","description":"Mandatory Fields\nname, openingDate, parentId","operationId":"createOffice","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostOfficesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostOfficesResponse"}}}}},"/offices/{officeId}":{"get":{"tags":["Offices"],"summary":"Retrieve an Office","description":"Example Requests:\n\noffices/1\n\n\noffices/1?template=true\n\n\noffices/1?fields=id,name,parentName","operationId":"retreiveOffice","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"officeId","in":"path","description":"officeId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetOfficesResponse"}}}},"put":{"tags":["Offices"],"summary":"Update Office","description":"","operationId":"updateOffice","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"officeId","in":"path","description":"officeId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutOfficesOfficeIdRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutOfficesOfficeIdResponse"}}}}},"/provisioningcategory":{"get":{"tags":["Provisioning Category"],"operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"post":{"tags":["Provisioning Category"],"operationId":"createProvisioningCategory","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/provisioningcategory/{categoryId}":{"put":{"tags":["Provisioning Category"],"operationId":"updateProvisioningCategory","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"categoryId","in":"path","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"delete":{"tags":["Provisioning Category"],"operationId":"deleteProvisioningCategory","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"categoryId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/provisioningcriteria/{criteriaId}":{"get":{"tags":["Provisioning Criteria"],"summary":"Retrieves a Provisioning Criteria","description":"Retrieves a Provisioning Criteria","operationId":"retrieveProvisioningCriteria","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"criteriaId","in":"path","description":"criteriaId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetProvisioningCriteriaCriteriaIdResponse"}}}},"put":{"tags":["Provisioning Criteria"],"summary":"Updates a new Provisioning Criteria","description":"Updates a new Provisioning Criteria\n\nOptional Fields\ncriteriaName, loanProducts, provisioningcriteria","operationId":"updateProvisioningCriteria","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"criteriaId","in":"path","description":"criteriaId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutProvisioningCriteriaRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutProvisioningCriteriaResponse"}}}},"delete":{"tags":["Provisioning Criteria"],"summary":"Deletes Provisioning Criteria","description":"Deletes Provisioning Criteria","operationId":"deleteProvisioningCriteria","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"criteriaId","in":"path","description":"criteriaId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteProvisioningCriteriaResponse"}}}}},"/provisioningcriteria":{"get":{"tags":["Provisioning Criteria"],"summary":"Retrieves all created Provisioning Criterias","description":"Retrieves all created Provisioning Criterias","operationId":"retrieveAllProvisioningCriterias","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetProvisioningCriteriaResponse"}}}}},"post":{"tags":["Provisioning Criteria"],"summary":"Create a new Provisioning Criteria","description":"Creates a new Provisioning Criteria\n\nMandatory Fields: \ncriteriaName\nprovisioningcriteria\n\nOptional Fields: \nloanProducts","operationId":"createProvisioningCriteria","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostProvisioningCriteriaRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostProvisioningCriteriaResponse"}}}}},"/provisioningcriteria/template":{"get":{"tags":["Provisioning Criteria"],"operationId":"retrieveTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/staff":{"get":{"tags":["Staff"],"summary":"Retrieve Staff","description":"Returns the list of staff members.\n\nExample Requests:\n\nstaff\n\n\n\n\nRetrieve a Staff by status\n\nReturns the details of a Staff based on status.\n\nBy default it Returns all the ACTIVE Staff.\n\nIf status=INACTIVE, then it returns all INACTIVE Staff.\n\nand for status=ALL, it Returns both ACTIVE and INACTIVE Staff.\n\nExample Requests:\n\nstaff?status=active","operationId":"retrieveStaff","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"sqlSearch","in":"query","description":"sqlSearch","required":false,"type":"string"},{"name":"officeId","in":"query","description":"officeId","required":false,"type":"integer","format":"int64"},{"name":"staffInOfficeHierarchy","in":"query","description":"staffInOfficeHierarchy","required":false,"type":"boolean","default":false},{"name":"loanOfficersOnly","in":"query","description":"loanOfficersOnly","required":false,"type":"boolean","default":false},{"name":"status","in":"query","description":"status","required":false,"type":"string","default":"active"}],"responses":{"200":{"description":"GET https://DomainName/api/v1/staff?status={ACTIVE|INACTIVE|ALL}","schema":{"$ref":"#/definitions/GetStaffResponse"}}}},"post":{"tags":["Staff"],"summary":"Create a staff member","description":"Creates a staff member.\n\nMandatory Fields: \nofficeId, firstname, lastname\n\nOptional Fields: \nisLoanOfficer, isActive","operationId":"createStaff","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostStaffRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostStaffResponse"}}}}},"/staff/{staffId}":{"get":{"tags":["Staff"],"summary":"Retrieve a Staff Member","description":"Returns the details of a Staff Member.\n\nExample Requests:\n\nstaff/1","operationId":"retreiveStaff","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"staffId","in":"path","description":"staffId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetStaffResponse"}}}},"put":{"tags":["Staff"],"summary":"Update a Staff Member","description":"Updates the details of a staff member.","operationId":"updateStaff","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"staffId","in":"path","description":"staffId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutStaffRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutStaffResponse"}}}}},"/cashiers":{"get":{"tags":["cashiers"],"operationId":"getCashierData","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"officeId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"tellerId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"staffId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"date","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/tellers":{"get":{"tags":["Teller Cash Management"],"summary":"List all tellers","description":"Retrieves list tellers","operationId":"getTellerData","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"officeId","in":"query","description":"officeId","required":false,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetTellersResponse"}}}}},"post":{"tags":["Teller Cash Management"],"summary":"Create teller","description":"Mandatory Fields\nTeller name, OfficeId, Description, Start Date, Status\nOptional Fields\nEnd Date","operationId":"createTeller","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostTellersRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostTellersResponse"}}}}},"/tellers/{tellerId}":{"get":{"tags":["Teller Cash Management"],"summary":"Retrieve tellers","description":"","operationId":"findTeller","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetTellersResponse"}}}},"put":{"tags":["Teller Cash Management"],"summary":"Update teller","description":"","operationId":"updateTeller","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutTellersRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutTellersResponse"}}}},"delete":{"tags":["Teller Cash Management"],"operationId":"deleteTeller","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/tellers/{tellerId}/cashiers":{"get":{"tags":["Teller Cash Management"],"summary":"List Cashiers","description":"","operationId":"getCashierData","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"name":"fromdate","in":"query","description":"fromdate","required":false,"type":"string"},{"name":"todate","in":"query","description":"todate","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetTellersTellerIdCashiersResponse"}}}},"post":{"tags":["Teller Cash Management"],"summary":"Create Cashiers","description":"Mandatory Fields: \nCashier/staff, Fromm Date, To Date, Full Day or From time and To time\n\n\n\nOptional Fields: \nDescription/Notes","operationId":"createCashier","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostTellersTellerIdCashiersRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostTellersTellerIdCashiersResponse"}}}}},"/tellers/{tellerId}/cashiers/{cashierId}":{"get":{"tags":["Teller Cash Management"],"summary":"Retrieve a cashier","description":"","operationId":"findCashierData","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"name":"cashierId","in":"path","description":"cashierId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetTellersTellerIdCashiersCashierIdResponse"}}}},"put":{"tags":["Teller Cash Management"],"summary":"Update Cashier","description":"","operationId":"updateCashier","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"name":"cashierId","in":"path","description":"cashierId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutTellersTellerIdCashiersCashierIdRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutTellersTellerIdCashiersCashierIdResponse"}}}},"delete":{"tags":["Teller Cash Management"],"summary":"Delete Cashier","description":"","operationId":"deleteCashier","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"name":"cashierId","in":"path","description":"cashierId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteTellersTellerIdCashiersCashierIdResponse"}}}}},"/tellers/{tellerId}/cashiers/template":{"get":{"tags":["Teller Cash Management"],"summary":"Find Cashiers","description":"","operationId":"getCashierTemplate","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetTellersTellerIdCashiersTemplateResponse"}}}}},"/tellers/{tellerId}/cashiers/{cashierId}/allocate":{"post":{"tags":["Teller Cash Management"],"summary":"Allocate Cash To Cashier","description":"Mandatory Fields: \nDate, Amount, Currency, Notes/Comments","operationId":"allocateCashToCashier","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"name":"cashierId","in":"path","description":"cashierId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostTellersTellerIdCashiersCashierIdAllocateRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostTellersTellerIdCashiersCashierIdAllocateResponse"}}}}},"/tellers/{tellerId}/cashiers/{cashierId}/settle":{"post":{"tags":["Teller Cash Management"],"summary":"Settle Cash From Cashier","description":"Mandatory Fields\nDate, Amount, Currency, Notes/Comments","operationId":"settleCashFromCashier","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"name":"cashierId","in":"path","description":"cashierId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostTellersTellerIdCashiersCashierIdSettleRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostTellersTellerIdCashiersCashierIdSettleResponse"}}}}},"/tellers/{tellerId}/cashiers/{cashierId}/transactions":{"get":{"tags":["Teller Cash Management"],"summary":"Retrieve Cashier Transaction","description":"","operationId":"getTransactionsForCashier","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"name":"cashierId","in":"path","description":"cashierId","required":true,"type":"integer","format":"int64"},{"name":"currencyCode","in":"query","description":"currencyCode","required":false,"type":"string"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","description":"orderBy","required":false,"type":"string"},{"name":"sortOrder","in":"query","description":"sortOrder","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetTellersTellerIdCashiersCashiersIdTransactionsResponse"}}}}}},"/tellers/{tellerId}/cashiers/{cashierId}/summaryandtransactions":{"get":{"tags":["Teller Cash Management"],"summary":"Transactions Wtih Summary For Cashier","description":"","operationId":"getTransactionsWtihSummaryForCashier","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"name":"cashierId","in":"path","description":"cashierId","required":true,"type":"integer","format":"int64"},{"name":"currencyCode","in":"query","description":"currencyCode","required":false,"type":"string"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","description":"orderBy","required":false,"type":"string"},{"name":"sortOrder","in":"query","description":"sortOrder","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetTellersTellerIdCashiersCashiersIdSummaryAndTransactionsResponse"}}}}},"/tellers/{tellerId}/cashiers/{cashierId}/transactions/template":{"get":{"tags":["Teller Cash Management"],"summary":"Retrieve Cashier Transaction Template","description":"","operationId":"getCashierTxnTemplate","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"name":"cashierId","in":"path","description":"cashierId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetTellersTellerIdCashiersCashiersIdTransactionsTemplateResponse"}}}}},"/tellers/{tellerId}/transactions":{"get":{"tags":["Teller Cash Management"],"operationId":"getTransactionData","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"name":"dateRange","in":"query","description":"dateRange","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/tellers/{tellerId}/transactions/{transactionId}":{"get":{"tags":["Teller Cash Management"],"operationId":"findTransactionData","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"name":"transactionId","in":"path","description":"transactionId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/tellers/{tellerId}/journals":{"get":{"tags":["Teller Cash Management"],"operationId":"getJournalData","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"name":"cashierId","in":"query","description":"cashierId","required":false,"type":"integer","format":"int64"},{"name":"dateRange","in":"query","description":"dateRange","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/cashiersjournal":{"get":{"tags":["cashiersjournal"],"operationId":"getJournalData","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"officeId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"tellerId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"cashierId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"dateRange","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/workingdays/template":{"get":{"tags":["Working days"],"summary":"Working Days Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for working days.\n\nExample Request:\n\nworkingdays/template","operationId":"template","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetWorkingDaysTemplateResponse"}}}}},"/workingdays":{"get":{"tags":["Working days"],"summary":"List Working days","description":"Example Requests:\n\nworkingdays","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetWorkingDaysResponse"}}}}},"put":{"tags":["Working days"],"summary":"Update a Working Day","description":"Mandatory Fields\nrecurrence,repaymentRescheduleType,extendTermForDailyRepayments,locale","operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutWorkingDaysRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutWorkingDaysResponse"}}}}},"/client/{clientid}/addresses":{"get":{"tags":["Clients Address"],"summary":"List all addresses for a Client","description":"Example Requests:\n\nclient/1/addresses\n\n\nclients/1/addresses?status=false,true&&type=1,2,3","operationId":"getAddresses","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"status","in":"query","required":false,"type":"string"},{"name":"type","in":"query","required":false,"type":"integer","format":"int64"},{"name":"clientid","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/AddressData"}}}},"post":{"tags":["Clients Address"],"summary":"Create an address for a Client","description":"Mandatory Fields : \ntype and clientId","operationId":"AddClientAddress","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"type","in":"query","required":false,"type":"integer","format":"int64"},{"name":"clientid","in":"path","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/CommandProcessingResult"}}}},"put":{"tags":["Clients Address"],"summary":"update an address for a Client","description":"All the address fields can be updated by using update client address API\n\nMandatory Fields\ntype and addressId","operationId":"UpdateClientAddress","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientid","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/CommandProcessingResult"}}}}},"/client/addresses/template":{"get":{"tags":["Clients Address"],"operationId":"getAddressesTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/clients/{clientId}/charges/{chargeId}":{"get":{"tags":["Client Charges"],"summary":"Retrieve a Client Charge","description":"Example Requests:\nclients/1/charges/1\n\n\nclients/1/charges/1?fields=name,id","operationId":"retrieveClientCharge","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"chargeId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/ClientChargeData"}}}},"post":{"tags":["Client Charges"],"summary":"Pay a Client Charge","description":"Mandatory Fields\ntransactionDate and amount \"Pay either a part of or the entire due amount for a charge.(command=paycharge)\n\nWaive a Client Charge\n\n\nThis API provides the facility of waiving off the remaining amount on a client charge (command=waive)\n","operationId":"payOrWaiveClientCharge","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"chargeId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","required":false,"type":"string"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"}}}},"delete":{"tags":["Client Charges"],"summary":"Delete a Client Charge","description":"Deletes a Client Charge on which no transactions have taken place (either payments or waivers). ","operationId":"deleteClientCharge","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"chargeId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/CommandProcessingResult"}}}}},"/clients/{clientId}/charges":{"get":{"tags":["Client Charges"],"summary":"List Client Charges","description":"The list capability of client charges supports pagination.Example Requests:\nclients/1/charges\n\nclients/1/charges?offset=0&limit=5","operationId":"retrieveAllClientCharges","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"chargeStatus","in":"query","required":false,"type":"string","default":"all"},{"name":"pendingPayment","in":"query","required":false,"type":"boolean"},{"name":"limit","in":"query","required":false,"type":"integer","format":"int32"},{"name":"offset","in":"query","required":false,"type":"integer","format":"int32"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/ClientCharge"}}}},"post":{"tags":["Client Charges"],"summary":"Add Client Charge","description":" This API associates a Client charge with an implicit Client account\nMandatory Fields : \nchargeId and dueDate \nOptional Fields : \namount","operationId":"applyClientCharge","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/CommandProcessingResult"}}}}},"/clients/{clientId}/charges/template":{"get":{"tags":["Client Charges"],"operationId":"retrieveTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/clients/{clientId}/identifiers":{"get":{"tags":["Client Identifier Api"],"summary":"List all Identifiers for a Client","description":"Example Requests:\nclients/1/identifiers\n\n\nclients/1/identifiers?fields=documentKey,documentType,description","operationId":"retrieveAllClientIdentifiers","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/ClientIdentifierData"}}}},"post":{"tags":["Client Identifier Api"],"summary":"Create an Identifier for a Client","description":"Mandatory Fields\ndocumentKey, documentTypeId ","operationId":"createClientIdentifier","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/CommandProcessingResult"}}}}},"/clients/{clientId}/identifiers/template":{"get":{"tags":["Client Identifier Api"],"summary":"Retrieve Client Identifier Details Template","description":"This is a convenience resource useful for building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\n Field Defaults\n Allowed Value Lists\n\n\nExample Request:\nclients/1/identifiers/template","operationId":"newClientIdentifierDetails","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/ClientIdentifierData"}}}}},"/clients/{clientId}/identifiers/{identifierId}":{"get":{"tags":["Client Identifier Api"],"summary":"Retrieve a Client Identifier","description":"Example Requests:\nclients/1/identifier/2\n\n\nclients/1/identifier/2?template=true\n\nclients/1/identifiers/2?fields=documentKey,documentType,description","operationId":"retrieveClientIdentifiers","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"identifierId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/ClientIdentifierData"}}}},"put":{"tags":["Client Identifier Api"],"summary":"Update a Client Identifier","description":"","operationId":"updateClientIdentifer","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"identifierId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/CommandProcessingResult"}}}},"delete":{"tags":["Client Identifier Api"],"summary":"Delete a Client Identifier","description":"","operationId":"deleteClientIdentifier","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"identifierId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/CommandProcessingResult"}}}}},"/clients/{clientId}/transactions":{"get":{"tags":["Client Transaction"],"summary":"List Client Transactions","description":"The list capability of client transaction can support pagination.\n\nMandatory Arguments : offset\n Integer Mandatory, defaults to 0 \n Indicates the result from which pagination starts\nlimit\n Integer Mandatory, defaults to 200 \n Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1\n\n\n\nExample Requests:\nclients/189/transactions\nclients/189/transactions?offset=10&limit=50","operationId":"retrieveAllClientTransactions","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"offset","in":"query","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","required":false,"type":"integer","format":"int32"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/ClientTransactionData"}}}}},"/clients/{clientId}/transactions/{transactionId}":{"get":{"tags":["Client Transaction"],"summary":"Retrieve a Client Transaction","description":"Example Requests:\nclients/1/transactions/1\n\n\nclients/1/transactions/1?fields=id,officeName","operationId":"retrieveClientTransaction","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"transactionId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/ClientTransactionData"}}}},"post":{"tags":["Client Transaction"],"summary":"Undo a Client Transaction","description":"","operationId":"undoClientTransaction","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"transactionId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/CommandProcessingResult"}}}}},"/clients/{clientId}/accounts":{"get":{"tags":["Client Api"],"summary":"Retrieve client accounts overview","description":"An example of how a loan portfolio summary can be provided. This is requested in a specific use case of the community application.\nIt is quite reasonable to add resources like this to simplify User Interface development.\n\nExample Requests:\n \nclients/1/accounts\n\nclients/1/accounts?fields=loanAccounts,savingsAccounts","operationId":"retrieveAssociatedAccounts","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/AccountSummaryCollectionData"}},"400":{"description":"Bad Request"}}}},"/clients":{"get":{"tags":["Client Api"],"summary":"List Clients","description":"Example Requests:\n\nclients\n\nclients?fields=displayName,officeName,timeline\n\nclients?offset=10&limit=50\n\nclients?orderBy=displayName&sortOrder=DESC","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"sqlSearch","in":"query","required":false,"type":"string"},{"name":"officeId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"externalId","in":"query","required":false,"type":"string"},{"name":"displayName","in":"query","required":false,"type":"string"},{"name":"firstName","in":"query","required":false,"type":"string"},{"name":"lastName","in":"query","required":false,"type":"string"},{"name":"underHierarchy","in":"query","required":false,"type":"string"},{"name":"offset","in":"query","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","required":false,"type":"string"},{"name":"sortOrder","in":"query","required":false,"type":"string"},{"name":"orphansOnly","in":"query","required":false,"type":"boolean"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/ClientData"}}}},"post":{"tags":["Client Api"],"summary":"Create a Client","description":"Note:\n1. You can enter either:firstname/middlename/lastname - for a person (middlename is optional) OR fullname - for a business or organisation (or person known by one name).\n\n2.If address is enable(enable-address=true), then additional field called address has to be passed.","operationId":"create","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/ClientData"}}],"responses":{"200":{"description":"Successfully Client Created","schema":{"$ref":"#/definitions/CommandProcessingResult"}}}}},"/clients/{clientId}":{"get":{"tags":["Client Api"],"summary":"Retrieve a Client","description":"Example Requests:\n\nclients/1\n\n\nclients/1?template=true\n\n\nclients/1?fields=id,displayName,officeName","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"staffInSelectedOfficeOnly","in":"query","required":false,"type":"boolean","default":false}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/ClientData"}}}},"post":{"tags":["Client Api"],"summary":"Activate a Client | Close a Client | Reject a Client | Withdraw a Client | Reactivate a Client | UndoReject a Client | UndoWithdraw a Client | Assign a Staff | Unassign a Staff | Update Default Savings Account | Propose a Client Transfer | Withdraw a Client Transfer | Reject a Client Transfer | Accept a Client Transfer | Propose and Accept a Client Transfer | ","description":"\n[Reject a Client] Mandatory Fields : rejectionDate, rejectionReasonId\n\n[Withdraw a Client] Mandatory Fields : withdrawalDate, withdrawalReasonId\n\n[Reactivate a Client] Mandatory Fields : reactivationDate\n\n[UndoReject a Client] Mandatory Fields : reopenedDate\n\n[UndoWithdraw a Client]Mandatory Fields : reopenedDate\n","operationId":"activate","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","required":false,"type":"string"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}},{"in":"body","name":"body","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"}}}},"put":{"tags":["Client Api"],"summary":"Update a Client","description":"You can update any of the basic attributes of a client (but not its associations) using this API.\n\nChanging the relationship between a client and its office is not supported through this API. An API specific to handling transfers of clients between offices is available for the same.\n\nThe relationship between a client and a group must be removed through the Groups API.","operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","description":"ClientId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/ClientData"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/CommandProcessingResult"}}}},"delete":{"tags":["Client Api"],"summary":"Delete a Client","description":"If a client is in Pending state, you are allowed to Delete it. The delete is a 'hard delete' and cannot be recovered from. Once clients become active or have loans or savings associated with them, you cannot delete the client but you may Close the client if they have left the program.","operationId":"delete","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/CommandProcessingResult"}}}}},"/clients/template":{"get":{"tags":["Client Api"],"summary":"Retrieve Client Details Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value ListsExample Request:\n\nclients/template","operationId":"retrieveTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"officeId","in":"query","description":"optional","required":false,"type":"integer","format":"int64"},{"name":"commandParam","in":"query","description":"optional If commandParam=close retrieves all closureReasons which are associated with \"ClientClosureReason\" value.","required":false,"type":"string","default":"false"},{"name":"staffInSelectedOfficeOnly","in":"query","description":"optional Defaults to false if not provided. If staffInSelectedOfficeOnly=true only staff who are associated with the selected branch are returned.","required":false,"type":"boolean","default":false}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/ClientData"}}}}},"/surveys/{surveyId}/lookuptables":{"get":{"tags":["SPM API - LookUp Table"],"summary":"List all Lookup Table entries","description":"List all Lookup Table entries for a survey.","operationId":"fetchLookupTables","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"surveyId","in":"path","description":"Enter surveyId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/LookupTableData"}}}}},"post":{"tags":["SPM API - LookUp Table"],"summary":"Create a Lookup Table entry","description":"Add a new netry to a survey.\n\nMandatory Fields\nkey, score, validFrom, validTo","operationId":"createLookupTable","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"surveyId","in":"path","description":"Enter surveyId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"$ref":"#/definitions/LookupTableData"}}],"responses":{"200":{"description":"OK"}}}},"/surveys/{surveyId}/lookuptables/{key}":{"get":{"tags":["SPM API - LookUp Table"],"summary":"Retrieve a Lookup Table entry","description":"Retrieve a Lookup Table entry for a survey.","operationId":"findLookupTable","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"surveyId","in":"path","description":"Enter surveyId","required":true,"type":"integer","format":"int64"},{"name":"key","in":"path","description":"Enter key","required":true,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/LookupTableData"}}}}},"/surveys/{surveyId}/scorecards":{"get":{"tags":["SPM - Scorecards"],"summary":"List all Scorecard entries","description":"List all Scorecard entries for a survey.","operationId":"findBySurvey","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"surveyId","in":"path","description":"Enter surveyId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/Scorecard"}}}}},"post":{"tags":["SPM - Scorecards"],"summary":"Create a Scorecard entry","description":"Add a new netry to a survey.\n\nMandatory Fields\nclientId, createdOn, questionId, responseId, staffId","operationId":"createScorecard","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"surveyId","in":"path","description":"Enter surveyId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"$ref":"#/definitions/ScorecardData"}}],"responses":{"200":{"description":"OK"}}}},"/surveys/{surveyId}/scorecards/clients/{clientId}":{"get":{"tags":["SPM - Scorecards"],"operationId":"findBySurveyClient","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"surveyId","in":"path","description":"Enter surveyId","required":true,"type":"integer","format":"int64"},{"name":"clientId","in":"path","description":"Enter clientId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"array","items":{"$ref":"#/definitions/ScorecardData"}},"headers":{}}}}},"/surveys/{id}":{"get":{"tags":["SPM - Serveys"],"summary":"Retrieve a Survey","description":"","operationId":"findSurvey","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"Enter id","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/SurveyData"}}}},"delete":{"tags":["SPM - Serveys"],"summary":"Deactivate Survey","description":"","operationId":"deactivateSurvey","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"Enter id","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK"}}}},"/surveys":{"get":{"tags":["SPM - Serveys"],"summary":"List all Surveys","description":"","operationId":"fetchActiveSurveys","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/SurveyData"}}}}},"post":{"tags":["SPM - Serveys"],"summary":"Create a Survey","description":"Adds a new survey to collect client related data.\n\nMandatory Fields\n\ncountryCode, key, name, questions, responses, sequenceNo, text, value","operationId":"createSurvey","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"Create survey","required":false,"schema":{"$ref":"#/definitions/SurveyData"}}],"responses":{"200":{"description":"OK"}}}},"/templates/{templateId}":{"get":{"tags":["User Generated Documents"],"summary":"Retrieve a UGD","description":"Example Requests:\n\ntemplates/1","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"templateId","in":"path","description":"templateId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetTemplatesTemplateIdResponse"}}}},"post":{"tags":["User Generated Documents"],"operationId":"mergeTemplate","consumes":["application/json"],"produces":["text/html"],"parameters":[{"name":"templateId","in":"path","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"put":{"tags":["User Generated Documents"],"summary":"Update a UGD","description":"","operationId":"saveTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"templateId","in":"path","description":"templateId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutTemplatesTemplateIdRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutTemplatesTemplateIdResponse"}}}},"delete":{"tags":["User Generated Documents"],"summary":"Delete a UGD","description":"","operationId":"deleteTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"templateId","in":"path","description":"templateId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteTemplatesTemplateIdResponse"}}}}},"/templates/{templateId}/template":{"get":{"tags":["User Generated Documents"],"operationId":"getTemplateByTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"templateId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/templates/template":{"get":{"tags":["User Generated Documents"],"summary":"Retrieve UGD Details Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for UGDs. The UGD data returned consists of any or all of:\n\nARGUMENTS\nname String entity String type String text String optional mappers Mapper optional\nExample Request:\n\ntemplates/template","operationId":"template","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetTemplatesTemplateResponse"}}}}},"/templates":{"get":{"tags":["User Generated Documents"],"summary":"Retrieve all UGDs","description":"Example Requests:\n\ntemplates\n\nIt is also possible to get specific UGDs by entity and type:\n\ntemplates?type=0&entity=0\n[Entity: Id]\n\n\n\n\n\nclient: 0, loan: 1\n\n[Type: Id]\n\n\n\nDocument: 0, E-Mail (not yet): 1, SMS: 2","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"typeId","in":"query","description":"typeId","required":false,"type":"integer","default":-1,"format":"int32"},{"name":"entityId","in":"query","description":"entityId","required":false,"type":"integer","default":-1,"format":"int32"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetTemplatesResponse"}}}},"post":{"tags":["User Generated Documents"],"summary":"Add a UGD","description":"Adds a new UGD.\n\nMandatory Fields\nname\n\n\n\nExample Requests:\n\ntemplates/1","operationId":"createTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostTemplatesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostTemplatesResponse"}}}}},"/passwordpreferences":{"get":{"tags":["Password preferences"],"operationId":"retrieve","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetPasswordPreferencesTemplateResponse"}}}},"put":{"tags":["Password preferences"],"summary":"Update password preferences","description":"","operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutPasswordPreferencesTemplateRequest"}}],"responses":{"200":{"description":""}}}},"/passwordpreferences/template":{"get":{"tags":["Password preferences"],"summary":"List Application Password validation policies","description":"ARGUMENTS\nExample Requests:\n\npasswordpreferences","operationId":"template","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetPasswordPreferencesTemplateResponse"}}}}}},"/permissions":{"get":{"tags":["Permissions"],"summary":"List Application Permissions","description":"ARGUMENTS\nmakerCheckerableoptional, Values are true, false. Default is false.\nIf makerCheckerable=false or not supplied then a list of application permissions is returned. The \"selected\" attribute is always true in this case.\n\nIf makerCheckerable=true then the \"selected\" attribute shows whether the permission is enabled for Maker Check functionality.\n\nNote: Each Apache Fineract transaction is associated with a permission.\n\nExample Requests:\n\npermissions\n\n\npermissions?makerCheckerable=true\n\n\npermissions?fields=grouping,code","operationId":"retrieveAllPermissions","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetPermissionsResponse"}}}}},"put":{"tags":["Permissions"],"summary":"Enable/Disable Permissions for Maker Checker","description":"","operationId":"updatePermissionsDetails","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutPermissionsRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/CommandProcessingResult"}}}}},"/roles":{"get":{"tags":["Roles"],"summary":"List Roles","description":"Example Requests:\n\nroles\n\n\nroles?fields=name","operationId":"retrieveAllRoles","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetRolesResponse"}}}}},"post":{"tags":["Roles"],"summary":"Create a New Role","description":"Mandatory Fields\nname, description","operationId":"createRole","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostRolesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostRolesResponse"}}}}},"/roles/{roleId}":{"get":{"tags":["Roles"],"summary":"Retrieve a Role","description":"Example Requests:\n\nroles/1\n\n\nroles/1?fields=name","operationId":"retrieveRole","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roleId","in":"path","description":"roleId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetRolesRoleIdResponse"}}}},"post":{"tags":["Roles"],"summary":"Enable Role | Disable Role","description":"Description : Enable role in case role is disabled. | Disable the role in case role is not associated with any users.\n\n\n\n\n\nExample Request: https://DomainName/api/v1/roles/{roleId}?command=enable\n\n\n\n\n\nhttps://DomainName/api/v1/roles/{roleId}?command=disable","operationId":"actionsOnRoles","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roleId","in":"path","description":"roleId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostRolesRoleIdResponse"}}}},"put":{"tags":["Roles"],"summary":"Update a Role","description":"","operationId":"updateRole","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roleId","in":"path","description":"roleId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutRolesRoleIdRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutRolesRoleIdResponse"}}}},"delete":{"tags":["Roles"],"summary":"Delete a Role","description":"Description : Delete the role in case role is not associated with any users.","operationId":"deleteRole","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roleId","in":"path","description":"roleId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteRolesRoleIdResponse"}}}}},"/roles/{roleId}/permissions":{"get":{"tags":["Roles"],"summary":"Retrieve a Role's Permissions","description":"Example Requests:\n\nroles/1/permissions","operationId":"retrieveRolePermissions","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roleId","in":"path","description":"roleId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetRolesRoleIdPermissionsResponse"}}}},"put":{"tags":["Roles"],"summary":"Update a Role's Permissions","description":"","operationId":"updateRolePermissions","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roleId","in":"path","description":"roleId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutRolesRoleIdPermissionsRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutRolesRoleIdPermissionsResponse"}}}}},"/users/template":{"get":{"tags":["Users"],"summary":"Retrieve User Details Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\nExample Request:\n\nusers/template","operationId":"template","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetUsersTemplateResponse"}}}}},"/users":{"get":{"tags":["Users"],"summary":"Retrieve list of users","description":"Example Requests:\n\nusers\n\n\nusers?fields=id,username,email,officeName","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetUsersResponse"}}}}},"post":{"tags":["Users"],"summary":"Create a User","description":"Adds new application user.\n\nNote: Password information is not required (or processed). Password details at present are auto-generated and then sent to the email account given (which is why it can take a few seconds to complete).\n\nMandatory Fields: \nusername, firstname, lastname, email, officeId, roles, sendPasswordToEmail\n\nOptional Fields: \nstaffId,passwordNeverExpires,isSelfServiceUser,clients","operationId":"create","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostUsersRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostUsersResponse"}}}}},"/users/{userId}":{"get":{"tags":["Users"],"summary":"Retrieve a User","description":"Example Requests:\n\nusers/1\n\n\nusers/1?template=true\n\n\nusers/1?fields=username,officeName","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","description":"userId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetUsersUserIdResponse"}}}},"put":{"tags":["Users"],"summary":"Update a User","description":"When updating a password you must provide the repeatPassword parameter also.","operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","description":"userId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutUsersUserIdRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutUsersUserIdResponse"}}}},"delete":{"tags":["Users"],"summary":"Delete a User","description":"Removes the user and the associated roles and permissions.","operationId":"delete","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","description":"userId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteUsersUserIdResponse"}}}}}},"definitions":{"runaccrualsRequest":{"type":"object","required":["tillDate"],"properties":{"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"tillDate":{"type":"string","example":"04 June 2014"}}},"GetGLClosureResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":7},"officeId":{"type":"integer","format":"int64","example":1},"officeName":{"type":"string","example":"Head Office"},"closingDate":{"type":"string","format":"date","example":"2013,1,2"},"deleted":{"type":"boolean","example":false},"createdDate":{"type":"string","format":"date","example":"2013,1,3"},"lastUpdatedDate":{"type":"string","format":"date","example":"2013,1,3"},"createdByUserId":{"type":"integer","format":"int64","example":1},"createdByUsername":{"type":"string","example":"mifos"},"lastUpdatedByUserId":{"type":"integer","format":"int64","example":1},"lastUpdatedByUsername":{"type":"string","example":"mifos"},"comments":{"type":"string","example":"closed"}}},"PostGlClosuresResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"resourceId":{"type":"integer","format":"int64","example":9}}},"PostGLCLosuresRequest":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"closingDate":{"type":"string","format":"date","example":"06 December 2012"},"comments":{"type":"string","example":"The accountants are heading for a carribean vacation"},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"}}},"PutGlClosuresResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"resourceId":{"type":"integer","format":"int64","example":9},"comments":{"type":"string","example":"All transactions verified by Johnny Cash"}}},"PutGlClosuresRequest":{"type":"object","properties":{"comments":{"type":"string","example":"All transactions verified by Johnny Cash"}}},"DeleteGlClosuresResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"resourceId":{"type":"integer","format":"int64","example":9}}},"PostFinancialActivityAccountsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PostFinancialActivityAccountsRequest":{"type":"object","properties":{"financialActivityId":{"type":"integer","format":"int64","example":200},"glAccountId":{"type":"integer","format":"int64","example":2}}},"PutFinancialActivityAccountsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1},"comments":{"$ref":"#/definitions/PutFinancialActivityAccountscommentsSwagger"}}},"PutFinancialActivityAccountscommentsSwagger":{"type":"object","properties":{"glAccountId":{"type":"integer","format":"int64","example":1}}},"DeleteFinancialActivityAccountsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"EnumOptionData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"code":{"type":"string"},"value":{"type":"string"}}},"FinancialActivityData":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"name":{"type":"string"},"mappedGLAccountType":{"type":"string","enum":["ASSET","LIABILITY","EQUITY","INCOME","EXPENSE"]}}},"GLAccountData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"glCode":{"type":"string"},"type":{"$ref":"#/definitions/EnumOptionData"},"typeId":{"type":"integer","format":"int32"}}},"GetFinancialActivityAccountsResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"financialActivityData":{"$ref":"#/definitions/FinancialActivityData"},"glAccountData":{"$ref":"#/definitions/GLAccountData"}}},"CodeValueData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"active":{"type":"boolean"},"mandatory":{"type":"boolean"}}},"GetGLAccountsTemplateResponse":{"type":"object","properties":{"disabled":{"type":"boolean","example":false},"manualEntriesAllowed":{"type":"boolean","example":true},"type":{"$ref":"#/definitions/EnumOptionData"},"usage":{"$ref":"#/definitions/EnumOptionData"},"accountTypeOptions":{"type":"array","items":{"$ref":"#/definitions/EnumOptionData"}},"usageOptions":{"type":"array","items":{"$ref":"#/definitions/EnumOptionData"}},"assetHeaderAccountOptions":{"type":"array","items":{"$ref":"#/definitions/GLAccountData"}},"liabilityHeaderAccountOptions":{"type":"array","items":{"$ref":"#/definitions/GLAccountData"}},"equityHeaderAccountOptions":{"type":"array","items":{"$ref":"#/definitions/GLAccountData"}},"expenseHeaderAccountOptions":{"type":"array","items":{"$ref":"#/definitions/GLAccountData"}},"allowedAssetsTagOptions":{"type":"array","items":{"$ref":"#/definitions/CodeValueData"}},"allowedLiabilitiesTagOptions":{"type":"array","items":{"$ref":"#/definitions/CodeValueData"}},"allowedEquityTagOptions":{"type":"array","items":{"$ref":"#/definitions/CodeValueData"}},"allowedIncomeTagOptions":{"type":"array","items":{"$ref":"#/definitions/CodeValueData"}},"allowedExpensesTagOptions":{"type":"array","items":{"$ref":"#/definitions/CodeValueData"}}}},"GetGLAccountsResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":16},"name":{"type":"string","example":"Cash"},"parentId":{"type":"integer","format":"int64","example":1},"glCode":{"type":"string","example":"100001"},"disabled":{"type":"boolean","example":false},"manualEntriesAllowed":{"type":"boolean","example":true},"type":{"$ref":"#/definitions/EnumOptionData"},"usage":{"$ref":"#/definitions/EnumOptionData"},"description":{"type":"string","example":"Desc"},"nameDecorated":{"type":"string","example":"....Cash"},"tagId":{"$ref":"#/definitions/CodeValueData"},"organizationRunningBalance":{"type":"integer","format":"int64","example":118437}}},"PostGLAccountsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":22}}},"PostGLAccountsRequest":{"type":"object","properties":{"name":{"type":"string","example":"Cash at Bangalore"},"glCode":{"type":"string","example":"100001"},"manualEntriesAllowed":{"type":"boolean","example":true},"type":{"type":"string","example":"1"},"tagId":{"type":"string","example":"10"},"parentId":{"type":"integer","format":"int64","example":1},"usage":{"example":"1","$ref":"#/definitions/EnumOptionData"},"description":{"type":"string","example":"Desc"}}},"PutGLAccountsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1},"changes":{"$ref":"#/definitions/PutGLAccountsResponsechangesSwagger"}}},"PutGLAccountsResponsechangesSwagger":{"type":"object","properties":{"name":{"type":"string","example":"Cash at Bangalore"}}},"PutGLAccountsRequest":{"type":"object","properties":{"name":{"type":"string","example":"Cash at Bangalore"}}},"DeleteGLAccountsRequest":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1}}},"JournalEntryData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"officeId":{"type":"integer","format":"int64"},"glAccountId":{"type":"integer","format":"int64"},"glAccountType":{"$ref":"#/definitions/EnumOptionData"},"entryType":{"$ref":"#/definitions/EnumOptionData"},"amount":{"type":"number"},"transactionId":{"type":"string"}}},"PostJournalEntriesResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","description":"1"},"transactionId":{"type":"string","description":"RS9MCISID4WK1ZM"}}},"JournalEntryCommand":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64"},"transactionDate":{"type":"string","format":"date"},"comments":{"type":"string"},"referenceNumber":{"type":"string"},"accountingRuleId":{"type":"integer","format":"int64"},"credits":{"type":"array","items":{"$ref":"#/definitions/SingleDebitOrCreditEntryCommand"}},"debits":{"type":"array","items":{"$ref":"#/definitions/SingleDebitOrCreditEntryCommand"}}}},"SingleDebitOrCreditEntryCommand":{"type":"object","properties":{"glAccountId":{"type":"integer","format":"int64"},"amount":{"type":"number"},"comments":{"type":"string"},"parametersPassedInRequest":{"type":"array","uniqueItems":true,"items":{"type":"string"}},"commentsChanged":{"type":"boolean"},"glAmountChanged":{"type":"boolean"},"glAccountIdChanged":{"type":"boolean"}}},"PostJournalEntriesTransactionIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","description":"1"}}},"PostJournalEntriesTransactionIdRequest":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","description":"1"}}},"PostProvisioningEntriesResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PostProvisioningEntriesRequest":{"type":"object","properties":{"date":{"type":"string","example":"16 October 2015"},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"createjournalentries":{"type":"string","example":"true"},"provisioningentry":{"type":"string"},"entries":{"type":"string"}}},"PutProvisioningEntriesResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PutProvisioningEntriesRequest":{"type":"object","properties":{"command":{"type":"string","example":"recreateprovisioningentry"}}},"ProvisioningEntryData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"createdDate":{"type":"string","format":"date-time"}}},"LoanProductProvisioningEntryData":{"type":"object","properties":{"historyId":{"type":"integer","format":"int64"},"officeId":{"type":"integer","format":"int64"},"currencyCode":{"type":"string"},"productId":{"type":"integer","format":"int64"},"categoryId":{"type":"integer","format":"int64"},"overdueInDays":{"type":"integer","format":"int64"},"percentage":{"type":"number"},"liablityAccount":{"type":"integer","format":"int64"},"expenseAccount":{"type":"integer","format":"int64"},"criteriaId":{"type":"integer","format":"int64"},"outstandingBalance":{"type":"number"}}},"AccountingTagRuleData":{"type":"object","properties":{"tag":{"$ref":"#/definitions/CodeValueData"}}},"GetAccountRulesResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"officeId":{"type":"integer","format":"int64"},"officeName":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"systemDefined":{"type":"boolean"},"allowMultipleDebitEntries":{"type":"boolean"},"allowMultipleCreditEntries":{"type":"boolean"},"creditTags":{"type":"array","items":{"$ref":"#/definitions/AccountingTagRuleData"}},"debitTags":{"type":"array","items":{"$ref":"#/definitions/AccountingTagRuleData"}}}},"AccountingRuleData":{"type":"object","properties":{"creditTags":{"type":"array","items":{"$ref":"#/definitions/AccountingTagRuleData"}},"debitTags":{"type":"array","items":{"$ref":"#/definitions/AccountingTagRuleData"}}}},"PostAccountingRulesResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"resourceId":{"type":"integer","format":"int64","example":1}}},"PostAccountingRulesRequest":{"type":"object","properties":{"name":{"type":"string","example":"test"},"officeId":{"type":"integer","format":"int64","example":1},"accountToDebit":{"type":"integer","format":"int64","example":21},"accountToCredit":{"type":"integer","format":"int64","example":9},"description":{"type":"string","example":"Employee salary"}}},"PutAccountingRulesResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1},"changes":{"$ref":"#/definitions/PutAccountingRulesResponsechangesSwagger"}}},"PutAccountingRulesResponsechangesSwagger":{"type":"object","properties":{"name":{"type":"string","example":"Employee Salary posting rule"}}},"PutAccountingRulesRequest":{"type":"object","properties":{"name":{"type":"string","example":"Employee Salary posting rule"}}},"DeleteAccountingRulesResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"GetAccountRulesTemplateResponse":{"type":"object","properties":{"systemDefined":{"type":"boolean","example":false},"allowedOffices":{"type":"array","items":{"$ref":"#/definitions/OfficeData"}},"allowedAccounts":{"type":"array","items":{"$ref":"#/definitions/GLAccountData"}}}},"OfficeData":{"type":"object","properties":{"hierarchy":{"type":"string"}}},"BatchResponse":{"type":"object","properties":{"requestId":{"type":"integer","format":"int64"},"statusCode":{"type":"integer","format":"int32"},"headers":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/Header"}},"body":{"type":"string"}}},"Header":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}},"PostBatchesRequest":{"type":"object","properties":{"requestId":{"type":"integer","format":"int64","example":1},"relativeUrl":{"type":"string","example":"clients"},"method":{"type":"string","example":"POST"},"headers":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/Header"}},"reference":{"type":"integer","format":"int64","example":1},"body":{"$ref":"#/definitions/PostBodyRequestSwagger"}}},"PostBodyRequestSwagger":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"firstname":{"type":"string","example":"\"Petra\""},"lastname":{"type":"string","example":"\"Yton\""},"externalId":{"type":"string","example":"\"ex_externalId1\""},"dateFormat":{"type":"string","example":"\"dd MMMM yyyy\""},"locale":{"type":"string","example":"\"en\""},"active":{"type":"boolean","example":true},"activationDate":{"type":"string","example":"\"04 March 2009\""},"submittedOnDate":{"type":"string","example":"\"04 March 2009\""}}},"GetMakerCheckerResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"actionName":{"type":"string"},"entityName":{"type":"string"},"resourceId":{"type":"integer","format":"int64"},"subresourceId":{"type":"integer","format":"int64"},"maker":{"type":"string"},"madeOnDate":{"type":"string","format":"date-time"},"checker":{"type":"string"},"checkedOnDate":{"type":"string","format":"date-time"},"processingResult":{"type":"string"},"commandAsJson":{"type":"string"},"officeName":{"type":"string"},"groupLevelName":{"type":"string"},"groupName":{"type":"string"},"clientName":{"type":"string"},"loanAccountNo":{"type":"string"},"savingsAccountNo":{"type":"string"},"clientId":{"type":"integer","format":"int64"},"loanId":{"type":"integer","format":"int64"},"url":{"type":"string"}}},"AppUserData":{"type":"object","properties":{"selfServiceUser":{"type":"boolean"}}},"GetMakerCheckersSearchTemplateResponse":{"type":"object","properties":{"appUsers":{"type":"array","items":{"$ref":"#/definitions/AppUserData"}},"actionNames":{"type":"array","items":{"type":"string"}},"entityNames":{"type":"array","items":{"type":"string"}},"processingResults":{"type":"array","items":{"$ref":"#/definitions/ProcessingResultLookup"}}}},"ProcessingResultLookup":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"processingResult":{"type":"string"}}},"PostMakerCheckersResponse":{"type":"object","properties":{"auditId":{"type":"integer","format":"int64","example":1}}},"GetAccountNumberFormatsIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":2},"accountType":{"$ref":"#/definitions/EnumOptionData"},"prefixType":{"$ref":"#/definitions/EnumOptionData"}}},"GetAccountNumberFormatsResponseTemplate":{"type":"object","properties":{"accountTypeOptions":{"type":"array","items":{"$ref":"#/definitions/EnumOptionData"}},"prefixTypeOptions":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/definitions/EnumOptionData"}}}}},"PutAccountNumberFormatsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":2},"changes":{"$ref":"#/definitions/PutAccountNumberFormatschangesSwagger"}}},"PutAccountNumberFormatschangesSwagger":{"type":"object","properties":{"prefixType":{"type":"integer","format":"int64","example":"OFFICE_NAME"}}},"PutAccountNumberFormatsRequest":{"type":"object","properties":{"prefixType":{"type":"integer","format":"int64","example":1}}},"DeleteAccountNumberFormatsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":2}}},"PostAccountNumberFormatsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":4}}},"PostAccountNumberFormatsRequest":{"type":"object","properties":{"accountType":{"type":"integer","format":"int64","example":1},"prefixType":{"type":"integer","format":"int64","example":101}}},"PutCachechangesSwagger":{"type":"object","properties":{"cacheType":{"type":"integer","format":"int64","example":2}}},"PutCachesResponse":{"type":"object","properties":{"cacheType":{"$ref":"#/definitions/PutCachechangesSwagger"}}},"PutCachesRequest":{"type":"object","properties":{"cacheType":{"type":"integer","format":"int64","example":2}}},"GetCachesResponse":{"type":"object","properties":{"cacheType":{"$ref":"#/definitions/EnumOptionData"},"enabled":{"type":"boolean"}}},"CommandWrapper":{"type":"object","properties":{"groupId":{"type":"integer","format":"int64"},"clientId":{"type":"integer","format":"int64"},"loanId":{"type":"integer","format":"int64"},"savingsId":{"type":"integer","format":"int64"},"entityName":{"type":"string"},"taskPermissionName":{"type":"string"},"entityId":{"type":"integer","format":"int64"},"subentityId":{"type":"integer","format":"int64"},"href":{"type":"string"},"json":{"type":"string"},"transactionId":{"type":"string"},"productId":{"type":"integer","format":"int64"},"creditBureauId":{"type":"integer","format":"int64"},"organisationCreditBureauId":{"type":"integer","format":"int64"},"create":{"type":"boolean"},"createDatatable":{"type":"boolean"},"deleteDatatable":{"type":"boolean"},"updateDatatable":{"type":"boolean"},"datatableResource":{"type":"boolean"},"deleteOneToOne":{"type":"boolean"},"deleteMultiple":{"type":"boolean"},"updateOneToOne":{"type":"boolean"},"updateMultiple":{"type":"boolean"},"registerDatatable":{"type":"boolean"},"noteResource":{"type":"boolean"},"cacheResource":{"type":"boolean"},"updateOperation":{"type":"boolean"},"delete":{"type":"boolean"},"deleteOperation":{"type":"boolean"},"surveyResource":{"type":"boolean"},"registerSurvey":{"type":"boolean"},"fullFilSurvey":{"type":"boolean"},"workingDaysResource":{"type":"boolean"},"passwordPreferencesResource":{"type":"boolean"},"permissionResource":{"type":"boolean"},"userResource":{"type":"boolean"},"currencyResource":{"type":"boolean"},"loanDisburseDetailResource":{"type":"boolean"},"updateDisbursementDate":{"type":"boolean"},"update":{"type":"boolean"}}},"GetCodeValuesDataResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Passport"},"description":{"type":"string","example":"Passport information"},"position":{"type":"integer","format":"int32","example":0}}},"PostCodeValueDataResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":4}}},"PostCodeValuesDataRequest":{"type":"object","properties":{"name":{"type":"string","example":"Passport"},"description":{"type":"string","example":"Passport information"},"position":{"type":"integer","format":"int32","example":0}}},"PutCodeValueDataResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":4},"changes":{"$ref":"#/definitions/PutCodeValuechangesSwagger"}}},"PutCodeValuechangesSwagger":{"type":"object","properties":{"name":{"type":"string","example":"Passport"},"description":{"type":"string","example":"Passport information"},"position":{"type":"integer","format":"int32","example":0}}},"PutCodeValuesDataRequest":{"type":"object","properties":{"name":{"type":"string","example":"Passport"},"description":{"type":"string","example":"Passport information"},"position":{"type":"integer","format":"int32","example":0}}},"DeleteCodeValueDataResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":4}}},"GetCodesResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Education"},"systemDefined":{"type":"boolean","example":true}}},"PostCodesResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":4}}},"PostCodesRequest":{"type":"object","properties":{"name":{"type":"string","example":"MyNewCode"}}},"PutCodesApichangesSwagger":{"type":"object","properties":{"name":{"type":"string","example":"MyNewCode(changed)"}}},"PutCodesResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":4},"changes":{"$ref":"#/definitions/PutCodesApichangesSwagger"}}},"PutCodesRequest":{"type":"object","properties":{"name":{"type":"string","example":"MyNewCode(changed)"}}},"DeleteCodesResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":4}}},"PutExternalServiceRequest":{"type":"object","properties":{"username":{"type":"string","example":"test@mifos.org"},"password":{"type":"string","example":"XXXX"}}},"ExternalServicesPropertiesData":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}},"GetGlobalConfigurationsResponse":{"type":"object","properties":{"globalConfiguration":{"type":"array","items":{"$ref":"#/definitions/GlobalConfigurationPropertyData"}}}},"GlobalConfigurationPropertyData":{"type":"object","properties":{"name":{"type":"string"},"enabled":{"type":"boolean"},"value":{"type":"integer","format":"int64"},"dateValue":{"type":"string","format":"date-time"},"id":{"type":"integer","format":"int64"},"description":{"type":"string"},"trapDoor":{"type":"boolean"}}},"PutGlobalConfigurationsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":4},"changes":{"$ref":"#/definitions/PutGlobalConfigurationsResponsechangesSwagger"}}},"PutGlobalConfigurationsResponsechangesSwagger":{"type":"object","properties":{"enabled":{"type":"boolean","example":true}}},"PutGlobalConfigurationsRequest":{"type":"object","properties":{"enabled":{"type":"boolean","example":true},"value":{"type":"integer","format":"int64","example":2}}},"PutDataTablesResponse":{"type":"object","properties":{"resourceIdentifier":{"type":"string","example":"extra_client_details"}}},"PutDataTablesRequest":{"type":"object","properties":{"appTableName":{"type":"string","example":"m_client"},"dropColumns":{"type":"array","items":{"$ref":"#/definitions/PutDataTablesRequestDropColumns"}},"addColumns":{"type":"array","items":{"$ref":"#/definitions/PutDataTablesRequestAddColumns"}},"ChangeColumns":{"type":"array","items":{"$ref":"#/definitions/PutDataTablesRequestChangeColumns"}}}},"PutDataTablesRequestAddColumns":{"type":"object","properties":{"name":{"type":"string","example":"Question"},"type":{"type":"string","example":"Dropdown"},"code":{"type":"string","example":"Gender"},"mandatory":{"type":"boolean","example":true}}},"PutDataTablesRequestChangeColumns":{"type":"object","properties":{"name":{"type":"string","example":"Question"},"newName":{"type":"string","example":"Question 2"},"code":{"type":"string","example":"Gender"},"newCode":{"type":"string","example":"Gender2"},"mandatory":{"type":"boolean","example":true}}},"PutDataTablesRequestDropColumns":{"type":"object","properties":{"name":{"type":"string","example":"Gender_cd_Question"}}},"GetDataTablesResponse":{"type":"object","properties":{"appTableName":{"type":"string","example":"m_client"},"datatableName":{"type":"string","example":"extra_client_details"},"column":{"type":"array","items":{"$ref":"#/definitions/ResultsetColumnHeaderData"}}}},"ResultsetColumnHeaderData":{"type":"object","properties":{"columnName":{"type":"string"},"columnType":{"type":"string"},"columnLength":{"type":"integer","format":"int64"},"columnDisplayType":{"type":"string"},"columnCode":{"type":"string"},"dateDisplayType":{"type":"boolean"},"dateTimeDisplayType":{"type":"boolean"},"integerDisplayType":{"type":"boolean"},"decimalDisplayType":{"type":"boolean"},"booleanDisplayType":{"type":"boolean"},"codeValueDisplayType":{"type":"boolean"},"codeLookupDisplayType":{"type":"boolean"},"string":{"type":"boolean"},"mandatory":{"type":"boolean"},"optional":{"type":"boolean"}}},"PostDataTablesResponse":{"type":"object","properties":{"resourceIdentifier":{"type":"string","example":"extra_client_details"}}},"PostDataTablesRequest":{"type":"object","properties":{"applicationTableName":{"type":"string","example":"m_client"},"registeredTableName":{"type":"string","example":"extra_client_details"},"multiRow":{"type":"boolean","example":true},"columnHeaderData":{"type":"array","items":{"$ref":"#/definitions/ResultsetColumnHeaderData"}}}},"DeleteDataTablesResponse":{"type":"object","properties":{"resourceIdentifier":{"type":"string","example":"extra_client_details"}}},"PostDataTablesRegisterDatatableAppTable":{"type":"object"},"GetDataTablesAppTableIdResponse":{"type":"object","properties":{"columnHeaders":{"type":"array","items":{"$ref":"#/definitions/ResultsetColumnHeaderData"}},"data":{"type":"array","items":{"$ref":"#/definitions/ResultsetRowData"}}}},"ResultsetRowData":{"type":"object","properties":{"row":{"type":"array","items":{"type":"string"}}}},"PostDataTablesAppTableIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PostDataTablesAppTableIdRequest":{"type":"object","properties":{"BusinessDescription":{"type":"string","example":"Livestock sales"},"Comment":{"type":"string","example":"First comment made"},"Education_cv":{"type":"string","example":"Primary"},"Gender_cd":{"type":"integer","format":"int64","example":6},"HighestRatePaid":{"type":"number","format":"double","example":8.5},"NextVisit":{"type":"string","example":"01 October 2012"},"YearsinBusiness":{"type":"integer","format":"int64","example":5},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"locale":{"type":"string","example":"en"}}},"PutDataTablesAppTableIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1},"changes":{"$ref":"#/definitions/PutDataTablesAppTableIdResponseChanges"}}},"PutDataTablesAppTableIdResponseChanges":{"type":"object","properties":{"BusinessDescription":{"type":"string","example":"Livestock sales updated"}}},"PutDataTablesAppTableIdRequest":{"type":"object","properties":{"BusinessDescription":{"type":"string","example":"Livestock sales updated"}}},"PutDataTablesAppTableIdDatatableIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PutDataTablesAppTableIdDatatableIdRequest":{"type":"object","properties":{"DateOfBirth":{"type":"string","example":"01 June 1982"},"Education_cdHighest":{"type":"integer","format":"int64","example":5},"Name":{"type":"string","example":"June"},"OtherNotes":{"type":"string","example":"More notes"},"PointsScore":{"type":"integer","format":"int64","example":20},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"locale":{"type":"string","example":"en"}}},"DeleteDataTablesDatatableAppTableIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"DeleteDataTablesDatatableAppTableIdDatatableIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"DeleteEntityDatatableChecksTemplateResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PostEntityDatatableChecksTemplateResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PostEntityDatatableChecksTemplateRequest":{"type":"object","properties":{"entity":{"type":"string","example":"m_loan"},"status":{"type":"integer","format":"int64","example":100},"datatableName":{"type":"string","example":"Additional Details"},"productId":{"type":"integer","format":"int64","example":1}}},"GetEntityDatatableChecksResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"entity":{"type":"string"},"status":{"$ref":"#/definitions/EnumOptionData"},"datatableName":{"type":"string"},"systemDefined":{"type":"boolean"},"order":{"type":"integer","format":"int64"},"productId":{"type":"integer","format":"int64"},"productName":{"type":"string"}}},"AppUser":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"email":{"type":"string"},"username":{"type":"string"},"firstname":{"type":"string"},"lastname":{"type":"string"},"password":{"type":"string"},"accountNonExpired":{"type":"boolean"},"accountNonLocked":{"type":"boolean"},"credentialsNonExpired":{"type":"boolean"},"enabled":{"type":"boolean"},"deleted":{"type":"boolean"},"office":{"$ref":"#/definitions/Office"},"staff":{"$ref":"#/definitions/Staff"},"roles":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/Role"}},"lastTimePasswordUpdated":{"type":"string","format":"date-time"},"passwordNeverExpires":{"type":"boolean"},"appUserClientMappings":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/AppUserClientMapping"}},"authorities":{"type":"array","items":{"$ref":"#/definitions/GrantedAuthority"}},"selfServiceUser":{"type":"boolean"},"staffId":{"type":"integer","format":"int64"},"staffDisplayName":{"type":"string"},"notEnabled":{"type":"boolean"},"new":{"type":"boolean"}}},"AppUserClientMapping":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"client":{"$ref":"#/definitions/Client"},"new":{"type":"boolean"}}},"Charge":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"amount":{"type":"number"},"currencyCode":{"type":"string"},"chargeTimeType":{"type":"integer","format":"int32"},"chargeCalculation":{"type":"integer","format":"int32"},"chargePaymentMode":{"type":"integer","format":"int32"},"feeInterval":{"type":"integer","format":"int32"},"penalty":{"type":"boolean"},"active":{"type":"boolean"},"deleted":{"type":"boolean"},"minCap":{"type":"number"},"maxCap":{"type":"number"},"account":{"$ref":"#/definitions/GLAccount"},"taxGroup":{"$ref":"#/definitions/TaxGroup"},"feeOnMonthDay":{"$ref":"#/definitions/MonthDay"},"savingsCharge":{"type":"boolean"},"annualFee":{"type":"boolean"},"monthlyFee":{"type":"boolean"},"overdueInstallment":{"type":"boolean"},"allowedLoanChargeTime":{"type":"boolean"},"allowedClientChargeTime":{"type":"boolean"},"allowedSavingsChargeTime":{"type":"boolean"},"loanCharge":{"type":"boolean"},"clientCharge":{"type":"boolean"},"allowedSavingsChargeCalculationType":{"type":"boolean"},"allowedClientChargeCalculationType":{"type":"boolean"},"percentageOfApprovedAmount":{"type":"boolean"},"percentageOfDisbursementAmount":{"type":"boolean"},"disbursementCharge":{"type":"boolean"},"new":{"type":"boolean"}}},"ChargeData":{"type":"object","properties":{"penalty":{"type":"boolean"},"overdueInstallmentCharge":{"type":"boolean"}}},"Chronology":{"type":"object","properties":{"zone":{"$ref":"#/definitions/DateTimeZone"}}},"Client":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"office":{"$ref":"#/definitions/Office"},"transferToOffice":{"$ref":"#/definitions/Office"},"image":{"$ref":"#/definitions/Image"},"status":{"type":"integer","format":"int32"},"firstname":{"type":"string"},"middlename":{"type":"string"},"lastname":{"type":"string"},"displayName":{"type":"string"},"externalId":{"type":"string"},"staff":{"$ref":"#/definitions/Staff"},"groups":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/Group"}},"accountNumberRequiresAutoGeneration":{"type":"boolean"},"closureDate":{"type":"string","format":"date"},"withdrawalDate":{"type":"string","format":"date"},"submittedOnDate":{"type":"string","format":"date"},"legalForm":{"type":"integer","format":"int32"},"reopenedDate":{"type":"string","format":"date"},"active":{"type":"boolean"},"closed":{"type":"boolean"},"rejected":{"type":"boolean"},"rejectedDate":{"type":"string","format":"date"},"notActive":{"type":"boolean"},"pending":{"type":"boolean"},"withdrawn":{"type":"boolean"},"transferInProgress":{"type":"boolean"},"transferOnHold":{"type":"boolean"},"transferInProgressOrOnHold":{"type":"boolean"},"notPending":{"type":"boolean"},"activationLocalDate":{"type":"string","format":"date"},"officeJoiningLocalDate":{"type":"string","format":"date"},"notStaff":{"type":"boolean"},"new":{"type":"boolean"}}},"CurrencyData":{"type":"object"},"DatatableCheckStatusData":{"type":"object"},"DatatableChecksData":{"type":"object"},"DateTimeField":{"type":"object","properties":{"durationField":{"$ref":"#/definitions/DurationField"},"minimumValue":{"type":"integer","format":"int32"},"maximumValue":{"type":"integer","format":"int32"},"leapDurationField":{"$ref":"#/definitions/DurationField"},"rangeDurationField":{"$ref":"#/definitions/DurationField"},"lenient":{"type":"boolean"},"name":{"type":"string"},"type":{"$ref":"#/definitions/DateTimeFieldType"},"supported":{"type":"boolean"}}},"DateTimeFieldType":{"type":"object","properties":{"rangeDurationType":{"$ref":"#/definitions/DurationFieldType"},"durationType":{"$ref":"#/definitions/DurationFieldType"},"name":{"type":"string"}}},"DateTimeZone":{"type":"object","properties":{"fixed":{"type":"boolean"},"id":{"type":"string"}}},"DurationField":{"type":"object","properties":{"precise":{"type":"boolean"},"unitMillis":{"type":"integer","format":"int64"},"name":{"type":"string"},"type":{"$ref":"#/definitions/DurationFieldType"},"supported":{"type":"boolean"}}},"DurationFieldType":{"type":"object","properties":{"name":{"type":"string"}}},"FloatingRate":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"floatingRatePeriods":{"type":"array","items":{"$ref":"#/definitions/FloatingRatePeriod"}},"createdBy":{"$ref":"#/definitions/AppUser"},"modifiedBy":{"$ref":"#/definitions/AppUser"},"createdOn":{"type":"string","format":"date-time"},"modifiedOn":{"type":"string","format":"date-time"},"active":{"type":"boolean"},"baseLendingRate":{"type":"boolean"},"new":{"type":"boolean"}}},"FloatingRatePeriod":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"fromDate":{"type":"string","format":"date-time"},"interestRate":{"type":"number"},"createdBy":{"$ref":"#/definitions/AppUser"},"modifiedBy":{"$ref":"#/definitions/AppUser"},"createdOn":{"type":"string","format":"date-time"},"modifiedOn":{"type":"string","format":"date-time"},"active":{"type":"boolean"},"floatingRatesId":{"$ref":"#/definitions/FloatingRate"},"differentialToBaseLendingRate":{"type":"boolean"},"new":{"type":"boolean"}}},"FundData":{"type":"object"},"GLAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"children":{"type":"array","items":{"$ref":"#/definitions/GLAccount"}},"name":{"type":"string"},"glCode":{"type":"string"},"disabled":{"type":"boolean"},"manualEntriesAllowed":{"type":"boolean"},"type":{"type":"integer","format":"int32"},"usage":{"type":"integer","format":"int32"},"headerAccount":{"type":"boolean"},"detailAccount":{"type":"boolean"},"new":{"type":"boolean"}}},"GetEntityDatatableChecksTemplateResponse":{"type":"object","properties":{"entities":{"type":"array","items":{"type":"string"}},"statusClient":{"type":"array","items":{"$ref":"#/definitions/DatatableCheckStatusData"}},"statusGroup":{"type":"array","items":{"$ref":"#/definitions/DatatableCheckStatusData"}},"statusSavings":{"type":"array","items":{"$ref":"#/definitions/DatatableCheckStatusData"}},"statusLoans":{"type":"array","items":{"$ref":"#/definitions/DatatableCheckStatusData"}},"datatables":{"type":"array","items":{"$ref":"#/definitions/DatatableChecksData"}},"loanProductDatas":{"type":"array","items":{"$ref":"#/definitions/LoanProductData"}},"savingsProductDatas":{"type":"array","items":{"$ref":"#/definitions/SavingsProductData"}}}},"GrantedAuthority":{"type":"object","properties":{"authority":{"type":"string"}}},"Group":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"office":{"$ref":"#/definitions/Office"},"staff":{"$ref":"#/definitions/Staff"},"parent":{"$ref":"#/definitions/Group"},"groupLevel":{"$ref":"#/definitions/GroupLevel"},"clientMembers":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/Client"}},"submittedOnDate":{"type":"string","format":"date"},"accountNumberRequiresAutoGeneration":{"type":"boolean"},"active":{"type":"boolean"},"closed":{"type":"boolean"},"activeClientMembers":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/Client"}},"childGroup":{"type":"boolean"},"notActive":{"type":"boolean"},"pending":{"type":"boolean"},"transferInProgress":{"type":"boolean"},"transferOnHold":{"type":"boolean"},"group":{"type":"boolean"},"center":{"type":"boolean"},"transferInProgressOrOnHold":{"type":"boolean"},"notPending":{"type":"boolean"},"activationLocalDate":{"type":"string","format":"date"},"new":{"type":"boolean"}}},"GroupLevel":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"parentId":{"type":"integer","format":"int64"},"superParent":{"type":"boolean"},"levelName":{"type":"string"},"recursable":{"type":"boolean"},"group":{"type":"boolean"},"center":{"type":"boolean"},"new":{"type":"boolean"}}},"Image":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"location":{"type":"string"},"storageType":{"type":"integer","format":"int32"},"new":{"type":"boolean"}}},"LoanProduct":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"shortName":{"type":"string"},"loanProductRelatedDetail":{"$ref":"#/definitions/LoanProductRelatedDetail"},"includeInBorrowerCycle":{"type":"boolean"},"startDate":{"type":"string","format":"date"},"closeDate":{"type":"string","format":"date"},"externalId":{"type":"string"},"minimumDaysBetweenDisbursalAndFirstRepayment":{"type":"integer","format":"int32"},"productInterestRecalculationDetails":{"$ref":"#/definitions/LoanProductInterestRecalculationDetails"},"loanProductGuaranteeDetails":{"$ref":"#/definitions/LoanProductGuaranteeDetails"},"principalThresholdForLastInstallment":{"type":"number"},"installmentAmountInMultiplesOf":{"type":"integer","format":"int32"},"floatingRates":{"$ref":"#/definitions/LoanProductFloatingRates"},"currency":{"$ref":"#/definitions/MonetaryCurrency"},"accountingType":{"type":"integer","format":"int32"},"accrualBasedAccountingEnabled":{"type":"boolean"},"minNominalInterestRatePerPeriod":{"type":"number"},"maxNominalInterestRatePerPeriod":{"type":"number"},"minNumberOfRepayments":{"type":"integer","format":"int32"},"maxNumberOfRepayments":{"type":"integer","format":"int32"},"repaymentStrategy":{"$ref":"#/definitions/LoanTransactionProcessingStrategy"},"loanProductCharges":{"type":"array","items":{"$ref":"#/definitions/Charge"}},"loanProductConfigurableAttributes":{"$ref":"#/definitions/LoanProductConfigurableAttributes"},"principalAmount":{"$ref":"#/definitions/Money"},"minPrincipalAmount":{"$ref":"#/definitions/Money"},"maxPrincipalAmount":{"$ref":"#/definitions/Money"},"arrearsBasedOnOriginalSchedule":{"type":"boolean"},"multiDisburseLoan":{"type":"boolean"},"interestRecalculationEnabled":{"type":"boolean"},"numberOfRepayments":{"type":"integer","format":"int32"},"nominalInterestRatePerPeriod":{"type":"number"},"interestPeriodFrequencyType":{"type":"string","enum":["DAYS","WEEKS","MONTHS","YEARS","INVALID"]},"linkedToFloatingInterestRate":{"type":"boolean"},"cashBasedAccountingEnabled":{"type":"boolean"},"upfrontAccrualAccountingEnabled":{"type":"boolean"},"accountingDisabled":{"type":"boolean"},"periodicAccrualAccountingEnabled":{"type":"boolean"},"holdGuaranteeFundsEnabled":{"type":"boolean"},"new":{"type":"boolean"}}},"LoanProductBorrowerCycleVariationData":{"type":"object","properties":{"borrowerCycleNumber":{"type":"integer","format":"int32"},"paramType":{"type":"string","enum":["INVALID","PRINCIPAL","INTERESTRATE","REPAYMENT"]},"valueConditionType":{"type":"string","enum":["INVALID","EQUAL","GREATERTHAN"]},"defaultValue":{"type":"number"}}},"LoanProductConfigurableAttributes":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"loanProduct":{"$ref":"#/definitions/LoanProduct"},"amortizationBoolean":{"type":"boolean"},"interestMethodBoolean":{"type":"boolean"},"transactionProcessingStrategyBoolean":{"type":"boolean"},"interestCalcPeriodBoolean":{"type":"boolean"},"arrearsToleranceBoolean":{"type":"boolean"},"repaymentEveryBoolean":{"type":"boolean"},"graceOnPrincipalAndInterestPaymentBoolean":{"type":"boolean"},"graceOnArrearsAgingBoolean":{"type":"boolean"},"new":{"type":"boolean"}}},"LoanProductData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"description":{"type":"string"},"fundId":{"type":"integer","format":"int64"},"fundName":{"type":"string"},"currency":{"$ref":"#/definitions/CurrencyData"},"principal":{"type":"number"},"minPrincipal":{"type":"number"},"maxPrincipal":{"type":"number"},"numberOfRepayments":{"type":"integer","format":"int32"},"repaymentEvery":{"type":"integer","format":"int32"},"repaymentFrequencyType":{"$ref":"#/definitions/EnumOptionData"},"interestRatePerPeriod":{"type":"number"},"interestRateFrequencyType":{"$ref":"#/definitions/EnumOptionData"},"annualInterestRate":{"type":"number"},"interestRateDifferential":{"type":"number"},"minDifferentialLendingRate":{"type":"number"},"defaultDifferentialLendingRate":{"type":"number"},"maxDifferentialLendingRate":{"type":"number"},"amortizationType":{"$ref":"#/definitions/EnumOptionData"},"interestType":{"$ref":"#/definitions/EnumOptionData"},"interestCalculationPeriodType":{"$ref":"#/definitions/EnumOptionData"},"allowPartialPeriodInterestCalcualtion":{"type":"boolean"},"inArrearsTolerance":{"type":"number"},"transactionProcessingStrategyId":{"type":"integer","format":"int64"},"transactionProcessingStrategyName":{"type":"string"},"graceOnPrincipalPayment":{"type":"integer","format":"int32"},"recurringMoratoriumOnPrincipalPeriods":{"type":"integer","format":"int32"},"graceOnInterestPayment":{"type":"integer","format":"int32"},"graceOnInterestCharged":{"type":"integer","format":"int32"},"graceOnArrearsAgeing":{"type":"integer","format":"int32"},"daysInMonthType":{"$ref":"#/definitions/EnumOptionData"},"daysInYearType":{"$ref":"#/definitions/EnumOptionData"},"interestRecalculationData":{"$ref":"#/definitions/LoanProductInterestRecalculationData"},"principalVariationsForBorrowerCycle":{"type":"array","items":{"$ref":"#/definitions/LoanProductBorrowerCycleVariationData"}},"interestRateVariationsForBorrowerCycle":{"type":"array","items":{"$ref":"#/definitions/LoanProductBorrowerCycleVariationData"}},"numberOfRepaymentVariationsForBorrowerCycle":{"type":"array","items":{"$ref":"#/definitions/LoanProductBorrowerCycleVariationData"}},"fundOptions":{"type":"array","items":{"$ref":"#/definitions/FundData"}},"repaymentFrequencyTypeOptions":{"type":"array","items":{"$ref":"#/definitions/EnumOptionData"}},"interestRateFrequencyTypeOptions":{"type":"array","items":{"$ref":"#/definitions/EnumOptionData"}},"amortizationTypeOptions":{"type":"array","items":{"$ref":"#/definitions/EnumOptionData"}},"interestTypeOptions":{"type":"array","items":{"$ref":"#/definitions/EnumOptionData"}},"interestCalculationPeriodTypeOptions":{"type":"array","items":{"$ref":"#/definitions/EnumOptionData"}},"chargeOptions":{"type":"array","items":{"$ref":"#/definitions/ChargeData"}},"multiDisburseLoan":{"type":"boolean"},"outstandingLoanBalance":{"type":"number"},"getloanProductConfigurableAttributes":{"$ref":"#/definitions/LoanProductConfigurableAttributes"},"minimumGapBetweenInstallments":{"type":"integer","format":"int32"},"maximumGapBetweenInstallments":{"type":"integer","format":"int32"},"floatingInterestRateCalculationAllowed":{"type":"boolean"},"linkedToFloatingInterestRates":{"type":"boolean"},"variableInstallmentsAllowed":{"type":"boolean"},"compoundingToBePostedAsTransaction":{"type":"boolean"},"interestRecalculationEnabled":{"type":"boolean"}}},"LoanProductFloatingRates":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"loanProduct":{"$ref":"#/definitions/LoanProduct"},"floatingRate":{"$ref":"#/definitions/FloatingRate"},"interestRateDifferential":{"type":"number"},"minDifferentialLendingRate":{"type":"number"},"defaultDifferentialLendingRate":{"type":"number"},"maxDifferentialLendingRate":{"type":"number"},"floatingInterestRateCalculationAllowed":{"type":"boolean"},"new":{"type":"boolean"}}},"LoanProductGuaranteeDetails":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"mandatoryGuarantee":{"type":"number"},"minimumGuaranteeFromOwnFunds":{"type":"number"},"minimumGuaranteeFromGuarantor":{"type":"number"},"new":{"type":"boolean"}}},"LoanProductInterestRecalculationData":{"type":"object","properties":{"interestRecalculationCompoundingType":{"$ref":"#/definitions/EnumOptionData"},"rescheduleStrategyType":{"$ref":"#/definitions/EnumOptionData"},"recalculationRestFrequencyType":{"$ref":"#/definitions/EnumOptionData"},"recalculationRestFrequencyInterval":{"type":"integer","format":"int32"},"recalculationRestFrequencyNthDay":{"$ref":"#/definitions/EnumOptionData"},"recalculationRestFrequencyWeekday":{"$ref":"#/definitions/EnumOptionData"},"recalculationRestFrequencyOnDay":{"type":"integer","format":"int32"},"recalculationCompoundingFrequencyType":{"$ref":"#/definitions/EnumOptionData"},"recalculationCompoundingFrequencyInterval":{"type":"integer","format":"int32"},"recalculationCompoundingFrequencyNthDay":{"$ref":"#/definitions/EnumOptionData"},"recalculationCompoundingFrequencyWeekday":{"$ref":"#/definitions/EnumOptionData"},"recalculationCompoundingFrequencyOnDay":{"type":"integer","format":"int32"},"compoundingToBePostedAsTransaction":{"type":"boolean"}}},"LoanProductInterestRecalculationDetails":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"interestRecalculationCompoundingMethod":{"type":"integer","format":"int32"},"rescheduleStrategyMethod":{"type":"integer","format":"int32"},"restFrequencyType":{"type":"string","enum":["INVALID","SAME_AS_REPAYMENT_PERIOD","DAILY","WEEKLY","MONTHLY"]},"restInterval":{"type":"integer","format":"int32"},"restFrequencyNthDay":{"type":"integer","format":"int32"},"restFrequencyWeekday":{"type":"integer","format":"int32"},"restFrequencyOnDay":{"type":"integer","format":"int32"},"compoundingFrequencyType":{"type":"string","enum":["INVALID","SAME_AS_REPAYMENT_PERIOD","DAILY","WEEKLY","MONTHLY"]},"compoundingInterval":{"type":"integer","format":"int32"},"compoundingFrequencyNthDay":{"type":"integer","format":"int32"},"compoundingFrequencyWeekday":{"type":"integer","format":"int32"},"compoundingFrequencyOnDay":{"type":"integer","format":"int32"},"isCompoundingToBePostedAsTransaction":{"type":"boolean"},"arrearsBasedOnOriginalSchedule":{"type":"boolean"},"new":{"type":"boolean"}}},"LoanProductRelatedDetail":{"type":"object","properties":{"currency":{"$ref":"#/definitions/MonetaryCurrency"},"principal":{"$ref":"#/definitions/Money"},"nominalInterestRatePerPeriod":{"type":"number"},"interestPeriodFrequencyType":{"type":"string","enum":["DAYS","WEEKS","MONTHS","YEARS","INVALID"]},"annualNominalInterestRate":{"type":"number"},"interestMethod":{"type":"string","enum":["DECLINING_BALANCE","FLAT","INVALID"]},"interestCalculationPeriodMethod":{"type":"string","enum":["DAILY","SAME_AS_REPAYMENT_PERIOD","INVALID"]},"allowPartialPeriodInterestCalcualtion":{"type":"boolean"},"repayEvery":{"type":"integer","format":"int32"},"repaymentPeriodFrequencyType":{"type":"string","enum":["DAYS","WEEKS","MONTHS","YEARS","INVALID"]},"numberOfRepayments":{"type":"integer","format":"int32"},"graceOnPrincipalPayment":{"type":"integer","format":"int32"},"graceOnInterestPayment":{"type":"integer","format":"int32"},"amortizationMethod":{"type":"string","enum":["EQUAL_PRINCIPAL","EQUAL_INSTALLMENTS","INVALID"]},"inArrearsTolerance":{"$ref":"#/definitions/Money"},"graceOnArrearsAgeing":{"type":"integer","format":"int32"},"arrearsTolerance":{"type":"number"},"interestRecalculationEnabled":{"type":"boolean"},"graceOnDueDate":{"type":"integer","format":"int32"}}},"LoanTransactionProcessingStrategy":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"standardStrategy":{"type":"boolean"},"heavensfamilyStrategy":{"type":"boolean"},"earlyPaymentStrategy":{"type":"boolean"},"creocoreStrategy":{"type":"boolean"},"indianRBIStrategy":{"type":"boolean"},"principalInterestPenaltiesFeesOrderStrategy":{"type":"boolean"},"interestPrincipalPenaltiesFeesOrderStrategy":{"type":"boolean"},"new":{"type":"boolean"}}},"MonetaryCurrency":{"type":"object","properties":{"code":{"type":"string"},"digitsAfterDecimal":{"type":"integer","format":"int32"},"currencyInMultiplesOf":{"type":"integer","format":"int32"}}},"Money":{"type":"object","properties":{"currencyCode":{"type":"string"},"currencyDigitsAfterDecimal":{"type":"integer","format":"int32"},"amount":{"type":"number"},"currency":{"$ref":"#/definitions/MonetaryCurrency"},"zero":{"type":"boolean"},"currencyInMultiplesOf":{"type":"integer","format":"int32"},"amountDefaultedToNullIfZero":{"type":"number"},"lessThanZero":{"type":"boolean"},"greaterThanZero":{"type":"boolean"}}},"MonthDay":{"type":"object","properties":{"dayOfMonth":{"type":"integer","format":"int32"},"fieldTypes":{"type":"array","items":{"$ref":"#/definitions/DateTimeFieldType"}},"monthOfYear":{"type":"integer","format":"int32"},"chronology":{"$ref":"#/definitions/Chronology"},"values":{"type":"array","items":{"type":"integer","format":"int32"}},"fields":{"type":"array","items":{"$ref":"#/definitions/DateTimeField"}}}},"Office":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"hierarchy":{"type":"string"},"openingLocalDate":{"type":"string","format":"date"},"new":{"type":"boolean"}}},"Permission":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"grouping":{"type":"string"},"code":{"type":"string"},"new":{"type":"boolean"}}},"Role":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"disabled":{"type":"boolean"},"permissions":{"type":"array","items":{"$ref":"#/definitions/Permission"}},"enabled":{"type":"boolean"},"new":{"type":"boolean"}}},"SavingsProductData":{"type":"object","properties":{"name":{"type":"string"},"depositAccountType":{"type":"string"}}},"Staff":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"loanOfficer":{"type":"boolean"},"active":{"type":"boolean"},"image":{"$ref":"#/definitions/Image"},"notActive":{"type":"boolean"},"notLoanOfficer":{"type":"boolean"},"new":{"type":"boolean"}}},"TaxComponent":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"createdBy":{"$ref":"#/definitions/AppUser"},"createdDate":{"type":"string","format":"date-time"},"lastModifiedBy":{"$ref":"#/definitions/AppUser"},"lastModifiedDate":{"type":"string","format":"date-time"},"percentage":{"type":"number"},"debitAccountType":{"type":"integer","format":"int32"},"debitAcount":{"$ref":"#/definitions/GLAccount"},"creditAccountType":{"type":"integer","format":"int32"},"creditAcount":{"$ref":"#/definitions/GLAccount"},"taxComponentHistories":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/TaxComponentHistory"}},"taxGroupMappings":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/TaxGroupMappings"}},"new":{"type":"boolean"}}},"TaxComponentHistory":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"createdBy":{"$ref":"#/definitions/AppUser"},"createdDate":{"type":"string","format":"date-time"},"lastModifiedBy":{"$ref":"#/definitions/AppUser"},"lastModifiedDate":{"type":"string","format":"date-time"},"percentage":{"type":"number"},"new":{"type":"boolean"}}},"TaxGroup":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"createdBy":{"$ref":"#/definitions/AppUser"},"createdDate":{"type":"string","format":"date-time"},"lastModifiedBy":{"$ref":"#/definitions/AppUser"},"lastModifiedDate":{"type":"string","format":"date-time"},"name":{"type":"string"},"taxGroupMappings":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/TaxGroupMappings"}},"new":{"type":"boolean"}}},"TaxGroupMappings":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"createdBy":{"$ref":"#/definitions/AppUser"},"createdDate":{"type":"string","format":"date-time"},"lastModifiedBy":{"$ref":"#/definitions/AppUser"},"lastModifiedDate":{"type":"string","format":"date-time"},"taxComponent":{"$ref":"#/definitions/TaxComponent"},"endDate":{"type":"string","format":"date-time"},"new":{"type":"boolean"}}},"PutReportResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":132},"changes":{"$ref":"#/definitions/PutReportResponseChanges"}}},"PutReportResponseChanges":{"type":"object","properties":{"reportName":{"type":"string","example":"Changed New Report"},"reportParameters":{"type":"array","items":{"$ref":"#/definitions/ReportParameterData"}}}},"ReportParameterData":{"type":"object"},"PutReportRequest":{"type":"object","properties":{"reportName":{"type":"string","example":"Completely New Report"},"reportParameters":{"type":"array","items":{"$ref":"#/definitions/ReportParameterData"}}}},"DeleteReportsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":132}}},"GetReportsResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"reportName":{"type":"string","example":"Client Listing"},"reportType":{"type":"string","example":"Table"},"reportSubType":{"type":"string"},"reportCategory":{"type":"string","example":"Client"},"description":{"type":"string","example":"Individual Client Report Lists the small number of defined fields on the client table. Would expect to copy this report and add any one to one additional data for specific tenant needs. Can be run for any size MFI but you expect it only to be run within a branch for larger ones. Depending on how many columns are displayed, there is probably is a limit of about 20/50k clients returned for html display (export to excel doesnt have that client browser/memory impact)."},"reportSql":{"type":"string"},"coreReport":{"type":"boolean","example":true},"useReport":{"type":"boolean","example":true},"reportParameters":{"type":"array","items":{"$ref":"#/definitions/ReportParameterData"}}}},"GetReportsTemplateResponse":{"type":"object","properties":{"allowedReportTypes":{"type":"array","items":{"type":"string"}},"allowedReportSubTypes":{"type":"array","items":{"type":"string"}},"allowedParameters":{"type":"array","items":{"$ref":"#/definitions/ReportParameterData"}}}},"PostReportsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":132}}},"PostRepostRequest":{"type":"object","properties":{"reportName":{"type":"string","example":"Completely New Report"},"reportType":{"type":"string","example":"Table"},"reportSubType":{"type":"string"},"reportCategory":{"type":"string","example":"Loan"},"description":{"type":"string","example":"Just An Example"},"reportSql":{"type":"string","example":"select 'very good sql' as AComment"},"reportParameters":{"type":"array","items":{"$ref":"#/definitions/ReportParameterData"}}}},"GetReportNameResponse":{"type":"object","properties":{"columnHeaders":{"$ref":"#/definitions/ResultsetColumnHeaderData"},"row":{"$ref":"#/definitions/ResultsetRowData"}}},"GetEntityTypeEntityIdDocumentsResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"parentEntityType":{"type":"string","example":"clients"},"parentEntityId":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Client Details Form"},"fileName":{"type":"string","example":"CGAP.pdf"},"size":{"type":"integer","format":"int64","example":5246719},"type":{"type":"string","example":"application/pdf"},"description":{"type":"string","example":"A signed form signed by new member"},"location":{"type":"string"},"storageType":{"type":"integer","format":"int32"}}},"PutEntityTypeEntityIdDocumentsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":3},"changes":{"$ref":"#/definitions/PutEntityTypeEntityIdDocumentsResponseChangesSwagger"},"resourceIdentifier":{"type":"string","example":"3"}}},"PutEntityTypeEntityIdDocumentsResponseChangesSwagger":{"type":"object"},"DeleteEntityTypeEntityIdDocumentsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":3},"changes":{"$ref":"#/definitions/PutEntityTypeEntityIdDocumentsResponseChangesSwagger"},"resourceIdentifier":{"type":"string","example":"3"}}},"PostEntityTypeEntityIdDocumentsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":3},"resourceIdentifier":{"type":"string","example":"3"}}},"Event":{"type":"object","properties":{"actionName":{"type":"string"},"entityName":{"type":"string"}}},"Field":{"type":"object","properties":{"fieldName":{"type":"string"},"fieldValue":{"type":"string"},"fieldType":{"type":"string"}}},"GetHookResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Web"},"displayName":{"type":"string","example":"Kremlin"},"isActive":{"type":"boolean","example":true},"createdAt":{"type":"string","format":"date","example":"[2014, 9, 16]"},"updatedAt":{"type":"string","format":"date","example":"[2014, 9, 16]"},"templateId":{"type":"integer","format":"int64","example":1},"templateName":{"type":"string","example":"My UGD"},"events":{"type":"array","items":{"$ref":"#/definitions/Event"}},"config":{"type":"array","items":{"$ref":"#/definitions/Field"}}}},"PostHookResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":4}}},"PostHookRequest":{"type":"object","properties":{"name":{"type":"string","example":"Web"},"isActive":{"type":"boolean","example":true},"displayName":{"type":"string","example":"Kremlin"},"templateId":{"type":"integer","format":"int64","example":1},"events":{"type":"array","items":{"$ref":"#/definitions/Event"}},"config":{"type":"array","items":{"$ref":"#/definitions/Field"}}}},"PutHookResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":4},"changes":{"$ref":"#/definitions/PutHookResponseChangesSwagger"}}},"PutHookResponseChangesSwagger":{"type":"object","properties":{"displayName":{"type":"string","example":"Kremlin"},"events":{"type":"array","example":"1","items":{"$ref":"#/definitions/Event"}},"config":{"type":"array","items":{"$ref":"#/definitions/Field"}}}},"PutHookRequest":{"type":"object","properties":{"name":{"type":"string","example":"Web"},"isActive":{"type":"boolean","example":true},"displayName":{"type":"string","example":"Kremlin"},"templateId":{"type":"integer","format":"int64","example":1},"events":{"type":"array","items":{"$ref":"#/definitions/Event"}},"config":{"type":"array","items":{"$ref":"#/definitions/Field"}}}},"DeleteHookResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":4}}},"GetHookTemplateResponse":{"type":"object","properties":{"templates":{"type":"array","items":{"$ref":"#/definitions/HookTemplateData"}},"groupings":{"type":"array","items":{"$ref":"#/definitions/Grouping"}}}},"Grouping":{"type":"object","properties":{"name":{"type":"string"}}},"HookTemplateData":{"type":"object","properties":{"serviceId":{"type":"integer","format":"int64"}}},"GetSchedulerResponse":{"type":"object","properties":{"active":{"type":"boolean","example":true}}},"GetJobsJobIDJobRunHistoryResponse":{"type":"object","properties":{"totalFilteredRecords":{"type":"integer","format":"int32","example":8},"pageItems":{"type":"array","items":{"$ref":"#/definitions/JobDetailHistoryDataSwagger"}}}},"JobDetailHistoryDataSwagger":{"type":"object","properties":{"version":{"type":"integer","format":"int64","example":1},"jobRunStartTime":{"type":"string","format":"date-time","example":"Jul 16, 2013 12:00:00 PM"},"jobRunEndTime":{"type":"string","format":"date-time","example":"Jul 16, 2013 12:00:00 PM"},"status":{"type":"string","example":"success"},"triggerType":{"type":"string","example":"cron"}}},"PutJobsJobsIDRequest":{"type":"object","properties":{"displayName":{"type":"string","example":"Update loan Summary"},"cronExpression":{"type":"string","example":"0 0 22 1/1 * ? *"},"active":{"type":"boolean","example":false}}},"GetJobsResponse":{"type":"object","properties":{"jobId":{"type":"integer","format":"int64","example":1},"displayName":{"type":"string","example":"Update loan Summary"},"nextRunTime":{"type":"string","format":"date-time"},"initializingError":{"type":"string"},"cronExpression":{"type":"string","example":"0 0 22 1/1 * ? *"},"active":{"type":"boolean","example":false},"currentlyRunning":{"type":"boolean","example":false},"lastRunHistory":{"$ref":"#/definitions/JobDetailHistoryData"}}},"JobDetailHistoryData":{"type":"object"},"PostReportMailingJobsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PostReportMailingJobsRequest":{"type":"object","properties":{"locale":{"type":"string","example":"en_GB"},"dateFormat":{"type":"string","example":"dd-MM-yyyy HH:mm:ss"},"name":{"type":"string","example":"Client Numbers Report"},"description":{"type":"string","example":"Client Numbers Report"},"startDateTime":{"type":"string","format":"date-time","example":"1469627093000"},"stretchyReportId":{"type":"integer","format":"int64","example":120},"emailRecipients":{"type":"string","example":"info@musonisystem.com"},"emailSubject":{"type":"string","example":"Client Numbers Report"},"emailMessage":{"type":"string","example":"Client Numbers Report"},"recurrence":{"type":"string","example":"FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,WE,FR"},"isActive":{"type":"boolean","example":true},"stretchyReportParamMap":{"type":"string","example":"{\"startDate\":\"2016-07-01\",\"endDate\":\"2016-08-02\",\"selectOffice\":\"1\",\"environementUrl\":\"environementUrl\"}"}}},"PutReportMailingJobsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1},"changes":{"$ref":"#/definitions/PutReportMailingJobsResponseChanges"}}},"PutReportMailingJobsResponseChanges":{"type":"object","properties":{"startDateTime":{"type":"string","format":"date-time","example":"10-08-2016 23:30:00"}}},"PutReportMailingJobsRequest":{"type":"object","properties":{"locale":{"type":"string","example":"en_GB"},"dateFormat":{"type":"string","example":"dd-MM-yyyy HH:mm:ss"},"startDateTime":{"type":"string","format":"date-time","example":"10-08-2016 23:30:00"}}},"DeleteReportMailingJobsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"DeleteReportMailingJobsRequest":{"type":"object"},"GetReportMailingJobsResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Client Numbers Report"},"description":{"type":"string","example":"Client Numbers Report"},"startDateTime":{"type":"string","format":"date-time","example":"1469627093000"},"recurrence":{"type":"string"},"timeline":{"$ref":"#/definitions/ReportMailingJobTimelineData"},"emailRecipients":{"type":"string","example":"info@musonisystem.com"},"emailSubject":{"type":"string","example":"Client Numbers Report"},"emailMessage":{"type":"string","example":"Client Numbers Report"},"emailAttachmentFileFormat":{"$ref":"#/definitions/EnumOptionData"},"stretchyReport":{"$ref":"#/definitions/ReportData"},"stretchyReportParamMap":{"type":"string","example":"{\"startDate\":\"2016-07-01\",\"endDate\":\"2016-08-02\",\"selectOffice\":\"1\",\"environementUrl\":\"environementUrl\"}"},"nextRunDateTime":{"type":"string","format":"date-time","example":"1469627093000"},"numberOfRuns":{"type":"integer","format":"int32","example":0},"isActive":{"type":"boolean","example":true},"runAsUserId":{"type":"integer","format":"int64","example":1}}},"ReportData":{"type":"object"},"ReportMailingJobTimelineData":{"type":"object"},"GetReportMailingJobsTemplate":{"type":"object","properties":{"isActive":{"type":"boolean","example":true},"emailAttachmentFileFormatOptions":{"type":"array","items":{"$ref":"#/definitions/EnumOptionData"}},"stretchyReportParamDateOptions":{"type":"array","items":{"$ref":"#/definitions/EnumOptionData"}}}},"ReportMailingJobRunHistoryData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"reportMailingJobId":{"type":"integer","format":"int64"},"startDateTime":{"type":"string","format":"date-time"},"endDateTime":{"type":"string","format":"date-time"},"status":{"type":"string"},"errorMessage":{"type":"string"},"errorLog":{"type":"string"}}},"PostAuthenticationResponse":{"type":"object","properties":{"username":{"type":"string","example":"mifos"},"userId":{"type":"integer","format":"int64","example":1},"base64EncodedAuthenticationKey":{"type":"string","example":"bWlmb3M6cGFzc3dvcmQ="},"authenticated":{"type":"boolean","example":true},"officeId":{"type":"integer","format":"int64","example":1},"officeName":{"type":"string","example":"Head Office"},"staffId":{"type":"integer","format":"int64","example":1},"staffDisplayName":{"type":"string","example":"Director, Program"},"organisationalRole":{"$ref":"#/definitions/EnumOptionData"},"roles":{"type":"array","items":{"$ref":"#/definitions/RoleData"}},"permissions":{"type":"array","example":"ALL_FUNCTIONS","items":{"type":"string"}}}},"RoleData":{"type":"object"},"GetUserDetailsResponse":{"type":"object","properties":{"username":{"type":"string","example":"mifos"},"userId":{"type":"integer","format":"int64","example":1},"accessToken":{"type":"string","example":"bWlmb3M6cGFzc3dvcmQ="},"authenticated":{"type":"boolean","example":true},"officeId":{"type":"integer","format":"int64","example":1},"officeName":{"type":"string","example":"Head Office"},"staffId":{"type":"integer","format":"int64","example":1},"staffDisplayName":{"type":"string","example":"mifosStaffDisplayName"},"organisationalRole":{"$ref":"#/definitions/EnumOptionData"},"roles":{"type":"array","items":{"$ref":"#/definitions/RoleData"}},"permissions":{"type":"array","example":"ALL_FUNCTIONS","items":{"type":"string"}}}},"PostSurveySurveyNameApptableIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":2},"clientId":{"type":"integer","format":"int64","example":87},"resourceId":{"type":"integer","format":"int64","example":87}}},"PostSurveySurveyNameApptableIdRequest":{"type":"object","properties":{"ppi_household_members_cd_q1_householdmembers":{"type":"integer","format":"int64","example":167},"ppi_highestschool_cd_q2_highestschool":{"type":"integer","format":"int64","example":174},"ppi_businessoccupation_cd_q3_businessoccupation":{"type":"integer","format":"int64","example":180},"ppi_habitablerooms_cd_q4_habitablerooms":{"type":"integer","format":"int64","example":184},"ppi_floortype_cd_q5_floortype":{"type":"integer","format":"int64","example":188},"ppi_lightingsource_cd_q6_lightingsource":{"type":"integer","format":"int64","example":190},"ppi_irons_cd_q7_irons":{"type":"integer","format":"int64","example":193},"ppi_mosquitonets_cd_q8_mosquitonets":{"type":"integer","format":"int64","example":195},"ppi_towels_cd_q9_towels":{"type":"integer","format":"int64","example":198},"ppi_fryingpans_cd_q10_fryingpans":{"type":"integer","format":"int64","example":201},"Date":{"type":"string","format":"date-time","example":"2014-12-02 20:30:00"},"dateFormat":{"type":"string","format":"date-time","example":"Y-m-d H:i:s"},"locale":{"type":"string","example":"en_GB"}}},"GetSurveyResponse":{"type":"object","properties":{"datatableData":{"$ref":"#/definitions/GetSurveyResponseDatatableData"},"enabled":{"type":"boolean","example":false}}},"GetSurveyResponseDatatableData":{"type":"object","properties":{"applicationTableName":{"type":"string","example":"m_client"},"registeredTableName":{"type":"string","example":"ppi_kenya_2005"},"columnHeaderData":{"type":"array","items":{"$ref":"#/definitions/ResultsetColumnHeaderData"}}}},"PostHolidaysHolidayIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PostHolidaysHolidayIdRequest":{"type":"object"},"PostHolidaysResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PostHolidaysRequest":{"type":"object","properties":{"name":{"type":"string","example":"Good Friday"},"description":{"type":"string","example":"Good Friday"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"locale":{"type":"string","example":"en"},"fromDate":{"type":"string","format":"date","example":"25 October 2013"},"toDate":{"type":"string","format":"date","example":"25 October 2013"},"repaymentsRescheduledTo":{"type":"string","format":"date","example":"26 October 2013"},"offices":{"type":"array","items":{"$ref":"#/definitions/PostHolidaysRequestOffices"}}}},"PostHolidaysRequestOffices":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1}}},"GetHolidaysResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Good Friday"},"fromDate":{"type":"string","format":"date","example":"[2013, 10, 26]"},"toDate":{"type":"string","format":"date","example":"[2013, 10, 26]"},"repaymentsRescheduledTo":{"type":"string","format":"date","example":"[2013, 10, 27]"},"officeId":{"type":"integer","format":"int64","example":1},"status":{"$ref":"#/definitions/EnumOptionData"}}},"PutHolidaysHolidayIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1},"changes":{"$ref":"#/definitions/PutHolidaysHolidayIdResponseChanges"}}},"PutHolidaysHolidayIdResponseChanges":{"type":"object","properties":{"name":{"type":"string","example":"Independence day"},"description":{"type":"string","example":"Holiday for Independence day celebration"}}},"PutHolidaysHolidayIdRequest":{"type":"object","properties":{"name":{"type":"string","example":"Independence day"},"description":{"type":"string","example":"Holiday for Independence day celebration"}}},"DeleteHolidaysHolidayIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"GetCurrenciesResponse":{"type":"object","properties":{"selectedCurrencyOptions":{"type":"array","items":{"$ref":"#/definitions/CurrencyData"}},"currencyOptions":{"type":"array","items":{"$ref":"#/definitions/CurrencyData"}}}},"PutCurrenciesResponse":{"type":"object","properties":{"currencies":{"type":"string","example":"[\"KES\",\n \"BND\",\n \"LBP\",\n \"GHC\",\n \"USD\",\n \"XOF\",\n \"AED\",\n \"AMD\"]"}}},"PutCurrenciesRequest":{"type":"object","properties":{"currencies":{"type":"string","example":"[\"KES\",\n \"BND\",\n \"LBP\",\n \"GHC\",\n \"USD\",\n \"XOF\",\n \"AED\",\n \"AMD\"]"}}},"GetOfficesResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Head Office"},"nameDecorated":{"type":"string","example":"Head Office"},"externalId":{"type":"string","example":"1"},"openingDate":{"type":"string","format":"date","example":"[2009, 1, 1]"},"hierarchy":{"type":"string","example":"."}}},"GetOfficesTemplateResponse":{"type":"object","properties":{"openingDate":{"type":"string","format":"date","example":"[2009, 1, 1]"},"allowedParents":{"type":"array","items":{"$ref":"#/definitions/GetOfficesResponse"}}}},"PostOfficesResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":3},"resourceId":{"type":"integer","format":"int64","example":3}}},"PostOfficesRequest":{"type":"object","properties":{"name":{"type":"string","example":"Good Friday"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"locale":{"type":"string","example":"en"},"openingDate":{"type":"string","format":"date","example":"01 July 2007"},"parentId":{"type":"integer","format":"int64","example":2},"externalId":{"type":"string","example":"SYS54-88"}}},"PutOfficesOfficeIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":3},"resourceId":{"type":"integer","format":"int64","example":3},"changes":{"$ref":"#/definitions/PutOfficesOfficeIdResponseChanges"}}},"PutOfficesOfficeIdResponseChanges":{"type":"object","properties":{"name":{"type":"string","example":"Name is updated"}}},"PutOfficesOfficeIdRequest":{"type":"object","properties":{"name":{"type":"string","example":"Name is updated"}}},"GetProvisioningCriteriaCriteriaIdResponse":{"type":"object","properties":{"criteriaId":{"type":"integer","format":"int64","example":1},"criteriaName":{"type":"string","example":"High Risk Products Criteria"},"createdBy":{"type":"string","example":"mifos"},"loanProducts":{"type":"array","items":{"$ref":"#/definitions/LoanProductData"}},"provisioningcriteria":{"type":"array","items":{"$ref":"#/definitions/ProvisioningCriteriaDefinitionData"}}}},"ProvisioningCriteriaDefinitionData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"categoryId":{"type":"integer","format":"int64"},"categoryName":{"type":"string"},"minAge":{"type":"integer","format":"int64"},"maxAge":{"type":"integer","format":"int64"},"provisioningPercentage":{"type":"number"},"liabilityAccount":{"type":"integer","format":"int64"},"liabilityCode":{"type":"string"},"expenseAccount":{"type":"integer","format":"int64"},"expenseCode":{"type":"string"}}},"GetProvisioningCriteriaResponse":{"type":"object","properties":{"criteriaId":{"type":"integer","format":"int64","example":1},"criteriaName":{"type":"string","example":"High Risk Products Criteria"},"createdBy":{"type":"string","example":"mifos"}}},"PostProvisioningCriteriaResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PostProvisioningCriteriaRequest":{"type":"object","properties":{"criteriaName":{"type":"string","example":"High Risk Products Criteria"},"loanProducts":{"type":"array","items":{"$ref":"#/definitions/LoanProductData"}},"provisioningcriteria":{"type":"array","items":{"$ref":"#/definitions/ProvisioningCriteriaDefinitionData"}}}},"PutProvisioningCriteriaResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1},"changes":{"$ref":"#/definitions/PutProvisioningCriteriaResponseChanges"}}},"PutProvisioningCriteriaResponseChanges":{"type":"object","properties":{"criteriaName":{"type":"string","example":"High Risk Products Criteria"}}},"PutProvisioningCriteriaRequest":{"type":"object","properties":{"criteriaName":{"type":"string","example":"High Risk Products Criteria"},"loanProducts":{"type":"array","items":{"$ref":"#/definitions/LoanProductData"}},"provisioningcriteria":{"type":"array","items":{"$ref":"#/definitions/ProvisioningCriteriaDefinitionData"}}}},"DeleteProvisioningCriteriaResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"GetStaffResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"firstname":{"type":"string","example":"John"},"lastname":{"type":"string","example":"Doe"},"displayName":{"type":"string","example":"Doe, John"},"officeId":{"type":"integer","format":"int64","example":1},"officeName":{"type":"string","example":"Head Office"},"isLoanOfficer":{"type":"boolean","example":true},"externalId":{"type":"string","example":"17H"},"isActive":{"type":"boolean","example":false},"joiningDate":{"type":"string","format":"date","example":"[2009,8,1]"}}},"PostStaffResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"resourceId":{"type":"integer","format":"int64","example":1}}},"PostStaffRequest":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"firstname":{"type":"string","example":"John"},"lastname":{"type":"string","example":"Doe"},"isLoanOfficer":{"type":"boolean","example":true},"externalId":{"type":"string","example":"17H"},"mobileNo":{"type":"string","example":"+353851239876"},"isActive":{"type":"boolean","example":true},"joiningDate":{"type":"string","format":"date","example":"01 January 2009"},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"}}},"PutStaffResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"resourceId":{"type":"integer","format":"int64","example":1}}},"PutStaffRequest":{"type":"object","properties":{"isLoanOfficer":{"type":"boolean","example":false},"externalId":{"type":"string","example":"17Hbb"}}},"GetTellersResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":3},"officeId":{"type":"integer","format":"int64","example":1},"debitAccountId":{"type":"integer","format":"int64","example":0},"creditAccountId":{"type":"integer","format":"int64","example":0},"name":{"type":"string","example":"Teller3"},"startDate":{"type":"string","format":"date","example":"[2015,2,1]"},"status":{"type":"string","example":"ACTIVE","enum":["INVALID","PENDING","ACTIVE","INACTIVE","CLOSED"]},"officeName":{"type":"string","example":"Head Office"}}},"PostTellersResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"resourceId":{"type":"integer","format":"int64","example":5}}},"PostTellersRequest":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Teller3"},"description":{"type":"string","example":"cash handling"},"status":{"type":"string","example":"ACTIVE","enum":["INVALID","PENDING","ACTIVE","INACTIVE","CLOSED"]},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd-MM-yyyy"},"startDate":{"type":"string","format":"date","example":"01 February 2015"}}},"PutTellersResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"resourceId":{"type":"integer","format":"int64","example":5},"changes":{"$ref":"#/definitions/PutTellersResponseChanges"}}},"PutTellersResponseChanges":{"type":"object","properties":{"description":{"type":"string","example":"teller cash handling"},"endDate":{"type":"string","format":"date","example":"28 February 2015"},"startDate":{"type":"string","format":"date","example":"01 February 2015"},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd-MM-yyyy"}}},"PutTellersRequest":{"type":"object","properties":{"name":{"type":"string","example":"Teller3"},"officeId":{"type":"integer","format":"int64","example":1},"description":{"type":"string","example":"teller cash handling"},"status":{"type":"string","example":"ACTIVE","enum":["INVALID","PENDING","ACTIVE","INACTIVE","CLOSED"]},"endDate":{"type":"string","format":"date","example":"28 February 2015"},"startDate":{"type":"string","format":"date","example":"01 February 2015"},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd-MM-yyyy"}}},"CashierData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"tellerId":{"type":"integer","format":"int64"},"officeId":{"type":"integer","format":"int64"},"staffId":{"type":"integer","format":"int64"},"description":{"type":"string"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"startTime":{"type":"string"},"endTime":{"type":"string"},"officeName":{"type":"string"},"tellerName":{"type":"string"},"staffName":{"type":"string"},"fullDay":{"type":"boolean"}}},"GetTellersTellerIdCashiersResponse":{"type":"object","properties":{"tellerId":{"type":"integer","format":"int64","example":1},"tellerName":{"type":"string","example":"Teller1"},"officeId":{"type":"integer","format":"int64","example":1},"officeName":{"type":"string","example":"Head Office"},"cashiers":{"type":"array","items":{"$ref":"#/definitions/CashierData"}}}},"GetTellersTellerIdCashiersCashierIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"tellerId":{"type":"integer","format":"int64","example":1},"staffId":{"type":"integer","format":"int64","example":1},"description":{"type":"string"},"startDate":{"type":"string","format":"date","example":"Feb 20, 2015 12:00:00 AM"},"endDate":{"type":"string","format":"date","example":"Feb 27, 2015 12:00:00 AM"},"isFullDay":{"type":"boolean","example":true},"startTime":{"type":"string"},"endTime":{"type":"string"},"tellerName":{"type":"string","example":"Teller1"},"staffName":{"type":"string","example":"Staff1, Test"}}},"GetTellersTellerIdCashiersTemplateResponse":{"type":"object","properties":{"tellerId":{"type":"integer","format":"int64","example":1},"tellerName":{"type":"string","example":"Teller1"},"officeId":{"type":"integer","format":"int64","example":1},"officeName":{"type":"string","example":"Head Office"},"staffOptions":{"type":"array","items":{"$ref":"#/definitions/StaffData"}}}},"StaffData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"firstname":{"type":"string"},"lastname":{"type":"string"},"displayName":{"type":"string"},"officeId":{"type":"integer","format":"int64"},"officeName":{"type":"string"},"joiningDate":{"type":"string","format":"date"}}},"PostTellersTellerIdCashiersResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1},"subResourceId":{"type":"integer","format":"int64","example":2}}},"PostTellersTellerIdCashiersRequest":{"type":"object","properties":{"endDate":{"type":"string","format":"date","example":"28 February 2015"},"description":{"type":"string","example":"teller cash handling"},"isFullDay":{"type":"boolean","example":true},"staffId":{"type":"integer","format":"int64","example":3},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd-MM-yyyy"},"startDate":{"type":"string","format":"date","example":"01 February 2015"}}},"PutTellersTellerIdCashiersCashierIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1},"subResourceId":{"type":"integer","format":"int64","example":2},"changes":{"$ref":"#/definitions/PutTellersTellerIdCashiersCashierIdResponseChanges"}}},"PutTellersTellerIdCashiersCashierIdResponseChanges":{"type":"object","properties":{"endDate":{"type":"string","format":"date","example":"25 February 2015"},"description":{"type":"string","example":"Cashier updated."},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd-MM-yyyy"}}},"PutTellersTellerIdCashiersCashierIdRequest":{"type":"object","properties":{"endDate":{"type":"string","format":"date","example":"25 February 2015"},"description":{"type":"string","example":"Cashier updated."},"isFullDay":{"type":"boolean","example":true},"staffId":{"type":"integer","format":"int64","example":1},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd-MM-yyyy"},"startDate":{"type":"string","format":"date","example":"01 February 2015"}}},"DeleteTellersTellerIdCashiersCashierIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PostTellersTellerIdCashiersCashierIdAllocateResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1},"subResourceId":{"type":"integer","format":"int64","example":4}}},"PostTellersTellerIdCashiersCashierIdAllocateRequest":{"type":"object","properties":{"currencyCode":{"type":"string","example":"USD"},"txnAmount":{"type":"number","example":5000.0},"txnNote":{"type":"string","example":"allocating cash"},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd-MM-yyyy"},"txnDate":{"type":"string","format":"date-time","example":"01 February 2015"}}},"PostTellersTellerIdCashiersCashierIdSettleResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1},"subResourceId":{"type":"integer","format":"int64","example":5}}},"PostTellersTellerIdCashiersCashierIdSettleRequest":{"type":"object","properties":{"currencyCode":{"type":"string","example":"USD"},"txnAmount":{"type":"number","example":2000.0},"txnNote":{"type":"string","example":"cash settlement"},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd-MM-yyyy"},"txnDate":{"type":"string","format":"date-time","example":"20 February 2015"}}},"CashierTxnType":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"value":{"type":"string"}}},"GetTellersTellerIdCashiersCashiersIdTransactionsResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":8},"cashierId":{"type":"integer","format":"int64","example":15},"txnType":{"$ref":"#/definitions/CashierTxnType"},"txnAmount":{"type":"number","example":1000.0},"txnDate":{"type":"string","format":"date-time","example":"Feb 25, 2015 12:00:00 AM"},"entityId":{"type":"integer","format":"int64","example":2},"entityType":{"type":"string","example":"loans"},"txnNote":{"type":"string","example":"Disbursement, Loan:2-000000002,Client:1-Test 1"},"createdDate":{"type":"string","format":"date-time","example":"Feb 25, 2015 12:00:00 AM"},"officeId":{"type":"integer","format":"int64","example":1},"officeName":{"type":"string","example":"Head Office"},"tellerId":{"type":"integer","format":"int64","example":0},"cashierName":{"type":"string","example":"B, Ramesh"}}},"CashierTransactionData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"cashierId":{"type":"integer","format":"int64"},"txnType":{"$ref":"#/definitions/CashierTxnType"},"txnAmount":{"type":"number"},"txnDate":{"type":"string","format":"date-time"},"entityId":{"type":"integer","format":"int64"},"entityType":{"type":"string"},"txnNote":{"type":"string"},"createdDate":{"type":"string","format":"date-time"},"officeId":{"type":"integer","format":"int64"},"officeName":{"type":"string"},"tellerId":{"type":"integer","format":"int64"},"tellerName":{"type":"string"},"cashierName":{"type":"string"},"cashierData":{"$ref":"#/definitions/CashierData"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"}}},"GetTellersTellerIdCashiersCashiersIdSummaryAndTransactionsResponse":{"type":"object","properties":{"sumCashAllocation":{"type":"number","example":7000.0},"sumInwardCash":{"type":"number","example":0.0},"sumOutwardCash":{"type":"number","example":0.0},"sumCashSettlement":{"type":"number","example":50.0},"netCash":{"type":"number","example":6950.0},"officeName":{"type":"string","example":"Head Office"},"tellerId":{"type":"integer","format":"int64","example":1},"tellerName":{"type":"string","example":"Teller1"},"cashierId":{"type":"integer","format":"int64","example":1},"cashierName":{"type":"string","example":"Staff1, Test"},"cashierTransactions":{"$ref":"#/definitions/PageCashierTransactionData"}}},"Page":{"type":"object","properties":{"totalFilteredRecords":{"type":"integer","format":"int32"},"pageItems":{"type":"array","items":{"type":"object"}}}},"PageCashierTransactionData":{"type":"object","properties":{"totalFilteredRecords":{"type":"integer","format":"int32"},"pageItems":{"type":"array","items":{"$ref":"#/definitions/CashierTransactionData"}}}},"GetTellersTellerIdCashiersCashiersIdTransactionsTemplateResponse":{"type":"object","properties":{"cashierId":{"type":"integer","format":"int64","example":1},"officeName":{"type":"string","example":"Head Office"},"tellerId":{"type":"integer","format":"int64","example":0},"tellerName":{"type":"string","example":"Teller1"},"cashierName":{"type":"string","example":"Staff1, Test"},"cashierData":{"$ref":"#/definitions/CashierData"},"startDate":{"type":"string","format":"date","example":"Feb 20, 2015 12:00:00 AM"},"endDate":{"type":"string","format":"date","example":"Feb 27, 2015 12:00:00 AM"},"currencyOptions":{"type":"array","items":{"$ref":"#/definitions/CurrencyData"}}}},"GetWorkingDaysTemplateResponse":{"type":"object","properties":{"repaymentRescheduleOptions":{"type":"array","items":{"$ref":"#/definitions/EnumOptionData"}}}},"GetWorkingDaysResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"recurrence":{"type":"string","example":"FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR"},"repaymentRescheduleType":{"$ref":"#/definitions/EnumOptionData"},"extendTermForDailyRepayments":{"type":"boolean","example":true}}},"PutWorkingDaysResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PutWorkingDaysRequest":{"type":"object","properties":{"recurrence":{"type":"string","example":"FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR"},"locale":{"type":"string","example":"en"},"repaymentRescheduleType":{"example":"4","$ref":"#/definitions/EnumOptionData"},"extendTermForDailyRepayments":{"type":"boolean","example":true}}},"AddressData":{"type":"object"},"CommandProcessingResult":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64"},"groupId":{"type":"integer","format":"int64"},"clientId":{"type":"integer","format":"int64"},"loanId":{"type":"integer","format":"int64"},"savingsId":{"type":"integer","format":"int64"},"subResourceId":{"type":"integer","format":"int64"},"transactionId":{"type":"string"},"changes":{"type":"object","additionalProperties":{"type":"object"}},"productId":{"type":"integer","format":"int64"},"rollbackTransaction":{"type":"boolean"}}},"ClientChargeData":{"type":"object"},"ClientCharge":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"client":{"$ref":"#/definitions/Client"},"charge":{"$ref":"#/definitions/Charge"},"chargeTime":{"type":"integer","format":"int32"},"dueDate":{"type":"string","format":"date-time"},"chargeCalculation":{"type":"integer","format":"int32"},"amount":{"$ref":"#/definitions/Money"},"amountPaid":{"$ref":"#/definitions/Money"},"amountWaived":{"$ref":"#/definitions/Money"},"amountWrittenOff":{"$ref":"#/definitions/Money"},"amountOutstanding":{"$ref":"#/definitions/Money"},"penaltyCharge":{"type":"boolean"},"paid":{"type":"boolean"},"waived":{"type":"boolean"},"inactivationDate":{"type":"string","format":"date-time"},"currency":{"$ref":"#/definitions/MonetaryCurrency"},"active":{"type":"boolean"},"notActive":{"type":"boolean"},"clientId":{"type":"integer","format":"int64"},"officeId":{"type":"integer","format":"int64"},"onSpecifiedDueDate":{"type":"boolean"},"dueLocalDate":{"type":"string","format":"date"},"new":{"type":"boolean"}}},"ClientIdentifierData":{"type":"object"},"ClientTransactionData":{"type":"object"},"AccountSummaryCollectionData":{"type":"object"},"ClientData":{"type":"object","required":["active","address","addressEnabled","middlename","officeId"],"properties":{"id":{"type":"integer","format":"int64"},"accountNo":{"type":"string"},"externalId":{"type":"string"},"active":{"type":"boolean"},"activationDate":{"type":"string","format":"date"},"firstname":{"type":"string"},"middlename":{"type":"string"},"lastname":{"type":"string"},"fullname":{"type":"string"},"gender":{"$ref":"#/definitions/CodeValueData"},"officeId":{"type":"integer","format":"int64"},"address":{"$ref":"#/definitions/AddressData"},"isAddressEnabled":{"type":"boolean"},"addressEnabled":{"type":"boolean"},"staff":{"type":"boolean"}}},"LookupTableData":{"type":"object","properties":{"key":{"type":"string"},"description":{"type":"string"},"entries":{"type":"array","items":{"$ref":"#/definitions/LookupTableEntry"}}}},"LookupTableEntry":{"type":"object","properties":{"valueFrom":{"type":"integer","format":"int32"},"valueTo":{"type":"integer","format":"int32"},"score":{"type":"number","format":"double"}}},"ScorecardData":{"type":"object","properties":{"userId":{"type":"integer","format":"int64"},"clientId":{"type":"integer","format":"int64"},"createdOn":{"type":"string","format":"date-time"},"scorecardValues":{"type":"array","items":{"$ref":"#/definitions/ScorecardValue"}}}},"ScorecardValue":{"type":"object","properties":{"questionId":{"type":"integer","format":"int64"},"responseId":{"type":"integer","format":"int64"},"value":{"type":"integer","format":"int32"}}},"Component":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"survey":{"$ref":"#/definitions/Survey"},"key":{"type":"string"},"text":{"type":"string"},"description":{"type":"string"},"sequenceNo":{"type":"integer","format":"int32"},"new":{"type":"boolean"}}},"Question":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"survey":{"$ref":"#/definitions/Survey"},"responses":{"type":"array","items":{"$ref":"#/definitions/Response"}},"componentKey":{"type":"string"},"key":{"type":"string"},"text":{"type":"string"},"description":{"type":"string"},"sequenceNo":{"type":"integer","format":"int32"},"new":{"type":"boolean"}}},"Response":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"question":{"$ref":"#/definitions/Question"},"text":{"type":"string"},"value":{"type":"integer","format":"int32"},"sequenceNo":{"type":"integer","format":"int32"},"new":{"type":"boolean"}}},"Scorecard":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"survey":{"$ref":"#/definitions/Survey"},"question":{"$ref":"#/definitions/Question"},"response":{"$ref":"#/definitions/Response"},"appUser":{"$ref":"#/definitions/AppUser"},"client":{"$ref":"#/definitions/Client"},"createdOn":{"type":"string","format":"date-time"},"value":{"type":"integer","format":"int32"},"new":{"type":"boolean"}}},"Survey":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"components":{"type":"array","items":{"$ref":"#/definitions/Component"}},"questions":{"type":"array","items":{"$ref":"#/definitions/Question"}},"key":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"countryCode":{"type":"string"},"validFrom":{"type":"string","format":"date-time"},"validTo":{"type":"string","format":"date-time"},"new":{"type":"boolean"}}},"ComponentData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"key":{"type":"string"},"text":{"type":"string"},"description":{"type":"string"},"sequenceNo":{"type":"integer","format":"int32"}}},"QuestionData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"responseDatas":{"type":"array","items":{"$ref":"#/definitions/ResponseData"}},"componentKey":{"type":"string"},"key":{"type":"string"},"text":{"type":"string"},"description":{"type":"string"},"sequenceNo":{"type":"integer","format":"int32"}}},"ResponseData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"text":{"type":"string"},"value":{"type":"integer","format":"int32"},"sequenceNo":{"type":"integer","format":"int32"}}},"SurveyData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"componentDatas":{"type":"array","items":{"$ref":"#/definitions/ComponentData"}},"questionDatas":{"type":"array","items":{"$ref":"#/definitions/QuestionData"}},"key":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"countryCode":{"type":"string"},"validFrom":{"type":"string","format":"date-time"},"validTo":{"type":"string","format":"date-time"}}},"PutTemplatesTemplateIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PutTemplatesTemplateIdRequest":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Text"},"entity":{"type":"integer","format":"int64","example":1},"type":{"type":"integer","format":"int64","example":0},"text":{"type":"string","example":"This is a loan for {{loan.clientName}}"},"mappers":{"type":"array","items":{"$ref":"#/definitions/TemplateMapper"}}}},"TemplateMapper":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"mapperorder":{"type":"integer","format":"int32"},"mapperkey":{"type":"string"},"mappervalue":{"type":"string"},"new":{"type":"boolean"}}},"DeleteTemplatesTemplateIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"GetTemplatesTemplateResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Text"},"entity":{"type":"integer","format":"int64","example":1},"type":{"type":"integer","format":"int64","example":0},"text":{"type":"string","example":"This is a loan for {{loan.clientName}}"},"mappers":{"type":"array","items":{"$ref":"#/definitions/TemplateMapper"}}}},"GetTemplatesResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Text"},"entity":{"type":"integer","format":"int64","example":1},"type":{"type":"integer","format":"int64","example":0},"text":{"type":"string","example":"This is a loan for {{loan.clientName}}"},"mappers":{"type":"array","items":{"$ref":"#/definitions/TemplateMapper"}}}},"GetTemplatesTemplateIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Text"},"entity":{"type":"integer","format":"int64","example":1},"type":{"type":"integer","format":"int64","example":0},"text":{"type":"string","example":"This is a loan for {{loan.clientName}}"},"mappers":{"type":"array","items":{"$ref":"#/definitions/TemplateMapper"}}}},"PostTemplatesResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PostTemplatesRequest":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Text"},"entity":{"type":"integer","format":"int64","example":1},"type":{"type":"integer","format":"int64","example":0},"text":{"type":"string","example":"This is a loan for {{loan.clientName}}"},"mappers":{"type":"array","items":{"$ref":"#/definitions/TemplateMapper"}}}},"GetPasswordPreferencesTemplateResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"description":{"type":"string","example":"Password must be at least 1 character and not more that 50 characters long"},"active":{"type":"boolean","example":true},"key":{"type":"string","example":"simple"}}},"PutPasswordPreferencesTemplateRequest":{"type":"object","properties":{"validationPolicyId":{"type":"integer","format":"int64","example":1}}},"GetPermissionsResponse":{"type":"object","properties":{"grouping":{"type":"string","example":"authorisation"},"code":{"type":"string","example":"READ_PERMISSION"},"entityName":{"type":"string","example":"PERMISSION"},"actionName":{"type":"string","example":"READ"},"selected":{"type":"boolean","example":true}}},"PutPermissionsRequest":{"type":"object","properties":{"permissions":{"type":"string","example":"\"CREATE_GUARANTOR\":true,\n \"CREATE_CLIENT\":true"}}},"GetRolesResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Super Users"},"description":{"type":"string","example":"This role provides all application permissions."}}},"PostRolesResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PostRolesRequest":{"type":"object","properties":{"name":{"type":"string","example":"Another Role Name"},"description":{"type":"string","example":"A description outlining the purpose of this role in relation to the application."}}},"GetRolesRoleIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Super Users"},"description":{"type":"string","example":"This role provides all application permissions."}}},"PostRolesRoleIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"GetRolesRoleIdPermissionsResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Super Users"},"description":{"type":"string","example":"This role provides all application permissions."},"permissionUsageData":{"type":"array","items":{"$ref":"#/definitions/GetRolesRoleIdPermissionsResponsePermissionData"}}}},"GetRolesRoleIdPermissionsResponsePermissionData":{"type":"object","properties":{"grouping":{"type":"string","example":"authorisation"},"code":{"type":"string","example":"READ_PERMISSION"},"entityName":{"type":"string","example":"PERMISSION"},"actionName":{"type":"string","example":"READ"},"selected":{"type":"boolean","example":false}}},"PostRolesRoleIdPermissionsResponsePermissions":{"type":"object","properties":{"ALL_FUNCTIONS_READ":{"type":"string","example":"true"}}},"PutRolesRoleIdPermissionsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":8},"permissions":{"$ref":"#/definitions/PostRolesRoleIdPermissionsResponsePermissions"}}},"PutRolesRoleIdPermissionsRequest":{"type":"object","properties":{"permissions":{"$ref":"#/definitions/PostRolesRoleIdPermissionsResponsePermissions"}}},"DeleteRolesRoleIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PutRolesRoleIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1},"changes":{"$ref":"#/definitions/PutRolesRoleIdResponseChanges"}}},"PutRolesRoleIdResponseChanges":{"type":"object","properties":{"description":{"type":"string","example":"some description(changed)"}}},"PutRolesRoleIdRequest":{"type":"object","properties":{"description":{"type":"string","example":"some description(changed)"}}},"GetUsersTemplateResponse":{"type":"object","properties":{"allowedOffices":{"type":"array","items":{"$ref":"#/definitions/OfficeData"}},"availableRoles":{"type":"array","items":{"$ref":"#/definitions/RoleData"}}}},"GetUsersResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"username":{"type":"string","example":"mifos"},"officeId":{"type":"integer","format":"int64","example":1},"officeName":{"type":"string","example":"Head Office"},"firstname":{"type":"string","example":"App"},"lastname":{"type":"string","example":"Administrator"},"email":{"type":"string","example":"demomfi@mifos.org"},"passwordNeverExpires":{"type":"boolean","example":false},"staff":{"$ref":"#/definitions/StaffData"},"selectedRoles":{"type":"array","items":{"$ref":"#/definitions/RoleData"}}}},"GetUsersUserIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"username":{"type":"string","example":"mifos"},"officeId":{"type":"integer","format":"int64","example":1},"officeName":{"type":"string","example":"Head Office"},"firstname":{"type":"string","example":"App"},"lastname":{"type":"string","example":"Administrator"},"email":{"type":"string","example":"demomfi@mifos.org"},"passwordNeverExpires":{"type":"boolean","example":false},"staff":{"$ref":"#/definitions/StaffData"},"availableRoles":{"type":"array","items":{"$ref":"#/definitions/RoleData"}},"selectedRoles":{"type":"array","items":{"$ref":"#/definitions/RoleData"}}}},"PutUsersUserIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"resourceId":{"type":"integer","format":"int64","example":11},"changes":{"$ref":"#/definitions/PutUsersUserIdResponseChanges"}}},"PutUsersUserIdResponseChanges":{"type":"object","properties":{"firstname":{"type":"string","example":"Test"},"passwordEncoded":{"type":"string","example":"abc3326b1bb376351c7baeb4175f5e0504e33aadf6a158474a6d71de1befae51"}}},"PutUsersUserIdRequest":{"type":"object","properties":{"firstname":{"type":"string","example":"Test"},"password":{"type":"string","example":"window75"},"repeatPassword":{"type":"string","example":"window75"}}},"DeleteUsersUserIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"resourceId":{"type":"integer","format":"int64","example":11},"changes":{"$ref":"#/definitions/DeleteUsersUserIdResponseChanges"}}},"DeleteUsersUserIdResponseChanges":{"type":"object"},"PostUsersResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"resourceId":{"type":"integer","format":"int64","example":11}}},"PostUsersRequest":{"type":"object","properties":{"username":{"type":"string","example":"newuser"},"firstname":{"type":"string","example":"Test"},"lastname":{"type":"string","example":"User"},"email":{"type":"string","example":"whatever@mifos.org"},"officeId":{"type":"integer","format":"int64","example":1},"staffId":{"type":"integer","format":"int64","example":1},"Roles":{"type":"string","example":"[2,3]"},"sendPasswordToEmail":{"type":"boolean","example":true},"isSelfServiceUser":{"type":"boolean","example":true}}}}} \ No newline at end of file +{"swagger":"2.0","info":{"description":"Apache Fineract is a secure, multi-tenanted microfinance platform.
    The goal of the Apache Fineract API is to empower developers to build apps on top of the Apache Fineract Platform. The reference app [ https://demo.openmf.org ] (username: mifos, password: password) works on the same demo tenant as the interactive links in this documentation.
    The API is organized around REST [ https://en.wikipedia.org/wiki/Representational_state_transfer ]
    Find out more about Apache Fineract on [ https://demo.openmf.org/api-docs/apiLive.htm#top ]
    You can Try The API From Your Browser itself at [ https://demo.openmf.org/api-docs/apiLive.htm#interact ]
    The Generic Options are available at [ https://demo.openmf.org/api-docs/apiLive.htm#genopts ]
    Find out more about Updating Dates and Numbers at [ https://demo.openmf.org/api-docs/apiLive.htm#dates_and_numbers ]
    For the Authentication and the Basic of HTTP and HTTPS refer [ https://demo.openmf.org/api-docs/apiLive.htm#authentication_overview ]
    Check about ERROR codes at [ https://demo.openmf.org/api-docs/apiLive.htm#errors ]

    Please refer to the old documentation for any documentation queries [ https://demo.openmf.org/api-docs/apiLive.htm ]
    ______________________________________________________________________________________________________________________________ ","version":"1.0.0","title":"Apache Fineract API Documentation","termsOfService":"https://demo.openmf.org/api-docs/apiLive.htm","contact":{"name":"https://gitter.im/openMF/mifos"}},"host":"https://demo.openmf.org","basePath":"/fineract-provider/api/v1","tags":[{"name":"Periodic Accrual Accounting"},{"name":"Accounting Closure"},{"name":"Mapping Financial Activities to Accounts"},{"name":"General Ledger Account"},{"name":"Journal Entries"},{"name":"Provisioning Entries"},{"name":"Accounting Rules"},{"name":"Batch API"},{"name":"Audits"},{"name":"Maker Checker (or 4-eye) functionality"},{"name":"Account number format"},{"name":"Cache"},{"name":"SMS Campaigns"},{"name":"Code Values"},{"name":"Codes"},{"name":"External Services"},{"name":"Global Configuration"},{"name":"CreditBureau Configuration"},{"name":"Data Tables"},{"name":"Entity-Datatable Checks"},{"name":"Reports"},{"name":"Run Reports"},{"name":"Documents"},{"name":"DomainNameapiv1{entity}{entityId}images"},{"name":"DomainNameapiv1entitytoentitymapping"},{"name":"Hooks"},{"name":"Scheduler"},{"name":"MIFOSX-BATCH JOBS"},{"name":"Report Mailing Jobs"},{"name":"List Report Mailing Job History"},{"name":"Authentication HTTP Basic"},{"name":"Fetch authenticated user details"},{"name":"SMS"},{"name":"Likelihood"},{"name":"Poverty Line"},{"name":"Survey"},{"name":"Mix Report"},{"name":"Mix Taxonomy"},{"name":"Mix Mapping"},{"name":"Holidays"},{"name":"Currency"},{"name":"officetransactions"},{"name":"Offices"},{"name":"Provisioning Category"},{"name":"Provisioning Criteria"},{"name":"Staff"},{"name":"cashiers"},{"name":"Teller Cash Management"},{"name":"cashiersjournal"},{"name":"Working days"},{"name":"Account Transfers"},{"name":"Standing Instructions"},{"name":"Standing Instructions History"},{"name":"Share Account"},{"name":"Entity Field Configuration"},{"name":"Charges"},{"name":"Clients Address"},{"name":"Client Charges"},{"name":"Client Identifier"},{"name":"Client Transaction"},{"name":"Client"},{"name":"Loan Collateral"},{"name":"Collection Sheet"},{"name":"Floating Rates"},{"name":"Funds"},{"name":"Centers"},{"name":"Groups"},{"name":"Interest Rate Slab (A.K.A interest bands)"},{"name":"Interest Rate Chart"},{"name":"Loan Charges"},{"name":"Loan Rescheduling"},{"name":"Loan Transactions"},{"name":"Loans"},{"name":"Loan Products"},{"name":"Notes"},{"name":"Payment Type"},{"name":"Products"},{"name":"Fixed Deposit Account"},{"name":"Fixed Deposit Product"},{"name":"Recurring Deposit Account Transactions"},{"name":"Recurring Deposit Account"},{"name":"Recurring Deposit Product"},{"name":"Savings Charges"},{"name":"Savings Account"},{"name":"Savings Product"},{"name":"Beneficiary Third Party Transfer"},{"name":"Self Client"},{"name":"Self Loans"},{"name":"Self Savings Account"},{"name":"Self Authentication"},{"name":"Self User"},{"name":"Self User Details"},{"name":"Tax Components"},{"name":"Tax Group"},{"name":"SPM API - LookUp Table"},{"name":"SPM - Scorecards"},{"name":"SPM - Serveys"},{"name":"User Generated Documents"},{"name":"Password preferences"},{"name":"Permissions"},{"name":"Roles"},{"name":"Users"}],"schemes":["https"],"paths":{"/runaccruals":{"post":{"tags":["Periodic Accrual Accounting"],"summary":"Executes Periodic Accrual Accounting","description":"Mandatory Fields\n\ntillDate\n","operationId":"executePeriodicAccrualAccounting","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"Request Body\n\nField Descriptions: \ntillDate: \nwhich specifies periodic accruals should happen till the given Date","required":true,"schema":{"$ref":"#/definitions/runaccrualsRequest"}}],"responses":{"200":{"description":"OK"}}}},"/glclosures/{glClosureId}":{"get":{"tags":["Accounting Closure"],"summary":"Retrieve an Accounting Closure","description":"Example Requests:\n\nglclosures/1\n\n\n/glclosures/1?fields=officeName,closingDate","operationId":"retreiveClosure","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"glClosureId","in":"path","description":"glClosureId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetGLClosureResponse"}}}},"put":{"tags":["Accounting Closure"],"summary":"Update an Accounting closure","description":"Once an accounting closure is created, only the comments associated with it may be edited","operationId":"updateGLClosure","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"glClosureId","in":"path","description":"glClosureId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"Request body","required":true,"schema":{"$ref":"#/definitions/PutGlClosuresRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutGlClosuresResponse"}}}},"delete":{"tags":["Accounting Closure"],"summary":"Delete an accounting closure","description":"Note: Only the latest accounting closure associated with a branch may be deleted.","operationId":"deleteGLClosure","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"glClosureId","in":"path","description":"glclosureId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteGlClosuresResponse"}}}}},"/glclosures":{"get":{"tags":["Accounting Closure"],"summary":"List Accounting closures","description":"Example Requests:\n\nglclosures","operationId":"retrieveAllClosures","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"officeId","in":"query","description":"officeId","required":false,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetGLClosureResponse"}}}}},"post":{"tags":["Accounting Closure"],"summary":"Create an Accounting Closure","description":"Mandatory Fields\nofficeId,closingDate","operationId":"createGLClosure","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"Request Body","required":true,"schema":{"$ref":"#/definitions/PostGLCLosuresRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostGlClosuresResponse"}}}}},"/financialactivityaccounts/template":{"get":{"tags":["Mapping Financial Activities to Accounts"],"operationId":"retrieveTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/financialactivityaccounts":{"get":{"tags":["Mapping Financial Activities to Accounts"],"summary":"List Financial Activities to Accounts Mappings","description":"Example Requests:\n\nfinancialactivityaccounts","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetFinancialActivityAccountsResponse"}}}}},"post":{"tags":["Mapping Financial Activities to Accounts"],"summary":"Create a new Financial Activity to Accounts Mapping","description":"Mandatory Fields\nfinancialActivityId, glAccountId","operationId":"createGLAccount","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"Request body","required":false,"schema":{"$ref":"#/definitions/PostFinancialActivityAccountsRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostFinancialActivityAccountsResponse"}}}}},"/financialactivityaccounts/{mappingId}":{"get":{"tags":["Mapping Financial Activities to Accounts"],"summary":"Retrieve a Financial Activity to Account Mapping\n","description":"Example Requests:\n\nfinancialactivityaccounts/1","operationId":"retreive","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"mappingId","in":"path","description":"mappingId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetFinancialActivityAccountsResponse"}}}},"put":{"tags":["Mapping Financial Activities to Accounts"],"summary":"Update a Financial Activity to Account Mapping","description":"the API updates the Ledger account linked to a Financial Activity \n","operationId":"updateGLAccount","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"mappingId","in":"path","description":"mappingId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"Request body","required":false,"schema":{"$ref":"#/definitions/PostFinancialActivityAccountsRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutFinancialActivityAccountsResponse"}}}},"delete":{"tags":["Mapping Financial Activities to Accounts"],"summary":"Delete a Financial Activity to Account Mapping","description":"","operationId":"deleteGLAccount","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"mappingId","in":"path","description":"mappingId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/DeleteFinancialActivityAccountsResponse"}}}}},"/glaccounts":{"get":{"tags":["General Ledger Account"],"summary":"List General Ledger Accounts","description":"ARGUMENTS\ntype Integer optional manualEntriesAllowed boolean optional usage Integer optional disabled boolean optional parentId Long optional tagId Long optional\nExample Requests:\n\nglaccounts\n\n\nglaccounts?type=1&manualEntriesAllowed=true&usage=1&disabled=false\n\nglaccounts?fetchRunningBalance=true","operationId":"retrieveAllAccounts","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"type","in":"query","description":"type","required":false,"type":"integer","format":"int32"},{"name":"searchParam","in":"query","description":"searchParam","required":false,"type":"string"},{"name":"usage","in":"query","description":"usage","required":false,"type":"integer","format":"int32"},{"name":"manualEntriesAllowed","in":"query","description":"manualEntriesAllowed","required":false,"type":"boolean"},{"name":"disabled","in":"query","description":"disabled","required":false,"type":"boolean"},{"name":"fetchRunningBalance","in":"query","description":"fetchRunningBalance","required":false,"type":"boolean"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetGLAccountsResponse"}}}}},"post":{"tags":["General Ledger Account"],"summary":"Create a General Ledger Account","description":"Note: You may optionally create Hierarchical Chart of Accounts by using the \"parentId\" property of an Account\nMandatory Fields: \nname, glCode, type, usage and manualEntriesAllowed","operationId":"createGLAccount","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":false,"schema":{"$ref":"#/definitions/PostGLAccountsRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostGLAccountsResponse"}}}}},"/glaccounts/{glAccountId}":{"get":{"tags":["General Ledger Account"],"summary":"Retrieve a General Ledger Account","description":"Example Requests:\n\nglaccounts/1\n\n\nglaccounts/1?template=true\n\n\nglaccounts/1?fields=name,glCode\n\n\nglaccounts/1?fetchRunningBalance=true","operationId":"retreiveAccount","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"glAccountId","in":"path","description":"glAccountId","required":true,"type":"integer","format":"int64"},{"name":"fetchRunningBalance","in":"query","description":"fetchRunningBalance","required":false,"type":"boolean"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetGLAccountsResponse"}}}},"put":{"tags":["General Ledger Account"],"summary":"Update an Accounting closure","description":"Once an accounting closure is created, only the comments associated with it may be edited\n\n","operationId":"updateGLAccount","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"glAccountId","in":"path","description":"glAccountId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":false,"schema":{"$ref":"#/definitions/PutGLAccountsRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutGLAccountsResponse"}}}},"delete":{"tags":["General Ledger Account"],"summary":"Delete an accounting closure","description":"Note: Only the latest accounting closure associated with a branch may be deleted.","operationId":"deleteGLAccount","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"glAccountId","in":"path","description":"glAccountId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteGLAccountsRequest"}}}}},"/glaccounts/template":{"get":{"tags":["General Ledger Account"],"summary":"Retrieve GL Accounts Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\nExample Request:\n\nglaccounts/template\nglaccounts/template?type=1\n\ntype is optional and integer value from 1 to 5.\n\n1.Assets \n2.Liabilities \n3.Equity \n4.Income \n5.Expenses","operationId":"retrieveNewAccountDetails","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"type","in":"query","description":"type","required":false,"type":"integer","format":"int32"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetGLAccountsTemplateResponse"}}}}},"/glaccounts/downloadtemplate":{"get":{"tags":["General Ledger Account"],"operationId":"getGlAccountsTemplate","produces":["application/vnd.ms-excel"],"parameters":[{"name":"dateFormat","in":"query","required":false,"type":"string"}],"responses":{"default":{"description":"successful operation"}}}},"/glaccounts/uploadtemplate":{"post":{"tags":["General Ledger Account"],"operationId":"postGlAccountsTemplate","consumes":["multipart/form-data"],"parameters":[{"name":"file","in":"formData","required":false,"type":"file"},{"name":"locale","in":"formData","required":false,"type":"string"},{"name":"dateFormat","in":"formData","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/journalentries/{journalEntryId}":{"get":{"tags":["Journal Entries"],"summary":"Retrieve a single Entry","description":"Example Requests:\n\njournalentries/1\n\n\n\njournalentries/1?fields=officeName,glAccountId,entryType,amount\n\njournalentries/1?runningBalance=true\n\njournalentries/1?transactionDetails=true","operationId":"retreiveJournalEntryById","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"journalEntryId","in":"path","description":"journalEntryId","required":true,"type":"integer","format":"int64"},{"name":"runningBalance","in":"query","description":"runningBalance","required":false,"type":"boolean"},{"name":"transactionDetails","in":"query","description":"transactionDetails","required":false,"type":"boolean"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/JournalEntryData"}}}}},"/journalentries":{"get":{"tags":["Journal Entries"],"summary":"List Journal Entries","description":"The list capability of journal entries can support pagination and sorting.\n\nExample Requests:\n\njournalentries\n\njournalentries?transactionId=PB37X8Y21EQUY4S\n\njournalentries?officeId=1&manualEntriesOnly=true&fromDate=1 July 2013&toDate=15 July 2013&dateFormat=dd MMMM yyyy&locale=en\n\njournalentries?fields=officeName,glAccountName,transactionDate\n\njournalentries?offset=10&limit=50\n\njournalentries?orderBy=transactionId&sortOrder=DESC\n\njournalentries?runningBalance=true\n\njournalentries?transactionDetails=true\n\njournalentries?loanId=12\n\njournalentries?savingsId=24","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"officeId","in":"query","description":"officeId","required":false,"type":"integer","format":"int64"},{"name":"glAccountId","in":"query","description":"glAccountId","required":false,"type":"integer","format":"int64"},{"name":"manualEntriesOnly","in":"query","description":"manualEntriesOnly","required":false,"type":"boolean"},{"name":"fromDate","in":"query","description":"fromDate","required":false,"type":"string"},{"name":"toDate","in":"query","description":"toDate","required":false,"type":"string"},{"name":"transactionId","in":"query","description":"transactionId","required":false,"type":"string"},{"name":"entityType","in":"query","description":"entityType","required":false,"type":"integer","format":"int32"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","description":"orderBy","required":false,"type":"string"},{"name":"sortOrder","in":"query","description":"sortOrder","required":false,"type":"string"},{"name":"locale","in":"query","description":"locale","required":false,"type":"string"},{"name":"dateFormat","in":"query","description":"dateFormat","required":false,"type":"string"},{"name":"loanId","in":"query","description":"loanId","required":false,"type":"integer","format":"int64"},{"name":"savingsId","in":"query","description":"savingsId","required":false,"type":"integer","format":"int64"},{"name":"runningBalance","in":"query","description":"runningBalance","required":false,"type":"boolean"},{"name":"transactionDetails","in":"query","description":"transactionDetails","required":false,"type":"boolean"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/JournalEntryData"}}}}},"post":{"tags":["Journal Entries"],"summary":"Create \"Balanced\" Journal Entries","description":"Note: A Balanced (simple) Journal entry would have atleast one \"Debit\" and one \"Credit\" entry whose amounts are equal \nCompound Journal entries may have \"n\" debits and \"m\" credits where both \"m\" and \"n\" are greater than 0 and the net sum or all debits and credits are equal \n\n\nMandatory Fields\nofficeId, transactionDate\n\n\ncredits- glAccountId, amount, comments\n\n \ndebits- glAccountId, amount, comments\n\n \nOptional Fields\npaymentTypeId, accountNumber, checkNumber, routingCode, receiptNumber, bankNumber","operationId":"createGLJournalEntry","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"command","in":"query","description":"command","required":false,"type":"string"},{"in":"body","name":"body","description":"body","required":false,"schema":{"$ref":"#/definitions/JournalEntryCommand"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostJournalEntriesResponse"}}}}},"/journalentries/{transactionId}":{"post":{"tags":["Journal Entries"],"summary":"Update Running balances for Journal Entries","description":"This API calculates the running balances for office. If office ID not provided this API calculates running balances for all offices. \nMandatory Fields\nofficeId","operationId":"createReversalJournalEntry","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"transactionId","in":"path","description":"transactionId","required":true,"type":"string"},{"name":"command","in":"query","description":"command","required":false,"type":"string"},{"in":"body","name":"body","description":"body","required":false,"schema":{"$ref":"#/definitions/PostJournalEntriesTransactionIdRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostJournalEntriesTransactionIdResponse"}}}}},"/journalentries/provisioning":{"get":{"tags":["Journal Entries"],"operationId":"retrieveJournalEntries","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"offset","in":"query","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","required":false,"type":"integer","format":"int32"},{"name":"entryId","in":"query","required":false,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/journalentries/openingbalance":{"get":{"tags":["Journal Entries"],"operationId":"retrieveOpeningBalance","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"officeId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"currencyCode","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/journalentries/downloadtemplate":{"get":{"tags":["Journal Entries"],"operationId":"getJournalEntriesTemplate","produces":["application/vnd.ms-excel"],"parameters":[{"name":"officeId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"dateFormat","in":"query","required":false,"type":"string"}],"responses":{"default":{"description":"successful operation"}}}},"/journalentries/uploadtemplate":{"post":{"tags":["Journal Entries"],"operationId":"postJournalEntriesTemplate","consumes":["multipart/form-data"],"parameters":[{"name":"file","in":"formData","required":false,"type":"file"},{"name":"locale","in":"formData","required":false,"type":"string"},{"name":"dateFormat","in":"formData","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/provisioningentries":{"get":{"tags":["Provisioning Entries"],"summary":"List all Provisioning Entries","description":"","operationId":"retrieveAllProvisioningEntries","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/ProvisioningEntryData"}}}}},"post":{"tags":["Provisioning Entries"],"summary":"Create new Provisioning Entries","description":"Creates a new Provisioning Entries\n\nMandatory Fields\ndate\ndateFormat\nlocale\nOptional Fields\ncreatejournalentries","operationId":"createProvisioningEntries","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":false,"schema":{"$ref":"#/definitions/PostProvisioningEntriesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostProvisioningEntriesResponse"}}}}},"/provisioningentries/{entryId}":{"get":{"tags":["Provisioning Entries"],"summary":"Retrieves a Provisioning Entry","description":"Returns the details of a generated Provisioning Entry.","operationId":"retrieveProvisioningEntry","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"entryId","in":"path","description":"entryId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/ProvisioningEntryData"}}}},"post":{"tags":["Provisioning Entries"],"summary":"Recreates Provisioning Entry","description":"Recreates Provisioning Entry | createjournalentry.","operationId":"modifyProvisioningEntry","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"entryId","in":"path","description":"entryId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command=createjournalentry\ncommand=recreateprovisioningentry","required":false,"type":"string"},{"in":"body","name":"body","description":"body","required":false,"schema":{"$ref":"#/definitions/PutProvisioningEntriesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutProvisioningEntriesResponse"}}}}},"/provisioningentries/entries":{"get":{"tags":["Provisioning Entries"],"operationId":"retrieveProviioningEntries","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"entryId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"offset","in":"query","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","required":false,"type":"integer","format":"int32"},{"name":"officeId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"productId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"categoryId","in":"query","required":false,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/LoanProductProvisioningEntryData"}}}}},"/accountingrules/template":{"get":{"tags":["Accounting Rules"],"summary":"Retrieve Accounting Rule Details Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\nExample Request:\n\naccountingrules/template","operationId":"retrieveTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetAccountRulesTemplateResponse"}}}}},"/accountingrules":{"get":{"tags":["Accounting Rules"],"summary":"Retrieve Accounting Rules","description":"Returns the list of defined accounting rules.\n\nExample Requests:\n\naccountingrules","operationId":"retrieveAllAccountingRules","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetAccountRulesResponse"}}}}},"post":{"tags":["Accounting Rules"],"summary":"Create/Define a Accounting rule","description":"Define a new Accounting rule.\n\nMandatory Fields\nname, officeId,\naccountToDebit OR debitTags,\naccountToCredit OR creditTags.\n\nOptional Fields\ndescription","operationId":"createAccountingRule","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":false,"schema":{"$ref":"#/definitions/PostAccountingRulesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostAccountingRulesResponse"}}}}},"/accountingrules/{accountingRuleId}":{"get":{"tags":["Accounting Rules"],"summary":"Retrieve a Accounting rule","description":"Returns the details of a defined Accounting rule.\n\nExample Requests:\n\naccountingrules/1","operationId":"retreiveAccountingRule","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountingRuleId","in":"path","description":"accountingRuleId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/AccountingRuleData"}}}},"put":{"tags":["Accounting Rules"],"summary":"Update a Accounting Rule","description":"Updates the details of a Accounting rule.","operationId":"updateAccountingRule","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountingRuleId","in":"path","description":"accountingRuleId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":false,"schema":{"$ref":"#/definitions/PutAccountingRulesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutAccountingRulesResponse"}}}},"delete":{"tags":["Accounting Rules"],"summary":"Delete a Accounting Rule","description":"Deletes a Accounting rule.","operationId":"deleteAccountingRule","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountingRuleId","in":"path","description":"accountingRuleId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteAccountingRulesResponse"}}}}},"/batches":{"post":{"tags":["Batch API"],"summary":"Batch requests in a single transaction","description":"The Apache Fineract Batch API is also capable of executing all the requests in a single transaction, by setting a Query Parameter, \"enclosingTransaction=true\". So, if one or more of the requests in a batch returns an erroneous response all of the Data base transactions made by other successful requests will be rolled back.\n\nIf there has been a rollback in a transaction then a single response will be provided, with a '400' status code and a body consisting of the error details of the first failed request.","operationId":"handleBatchRequests","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"enclosingTransaction","in":"query","description":"enclosingTransaction","required":false,"type":"boolean","default":false},{"in":"body","name":"body","description":"request body","required":true,"schema":{"$ref":"#/definitions/PostBatchesRequest"}}],"responses":{"200":{"description":"Success","schema":{"$ref":"#/definitions/BatchResponse"}}}}},"/audits/{auditId}":{"get":{"tags":["Audits"],"summary":"Retrieve an Audit Entry","description":"Example Requests:\n\naudits/20\naudits/20?fields=madeOnDate,maker,processingResult","operationId":"retrieveAuditEntry","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"auditId","in":"path","description":"auditId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetMakerCheckerResponse"}}}}},"/audits/searchtemplate":{"get":{"tags":["Audits"],"summary":"Audit Search Template","description":"This is a convenience resource. It can be useful when building an Audit Search UI. \"appUsers\" are data scoped to the office/branch the requestor is associated with.\n\nExample Requests:\n\naudits/searchtemplate\naudits/searchtemplate?fields=actionNames","operationId":"retrieveAuditSearchTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetMakerCheckersSearchTemplateResponse"}}}}},"/audits":{"get":{"tags":["Audits"],"summary":"List Audits","description":"Get a 200 list of audits that match the criteria supplied and sorted by audit id in descending order, and are within the requestors' data scope. Also it supports pagination and sorting\n\nExample Requests:\n\naudits\n\naudits?fields=madeOnDate,maker,processingResult\n\naudits?makerDateTimeFrom=2013-03-25 08:00:00&makerDateTimeTo=2013-04-04 18:00:00\n\naudits?officeId=1\n\naudits?officeId=1&includeJson=true","operationId":"retrieveAuditEntries","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"actionName","in":"query","description":"actionName","required":false,"type":"string"},{"name":"entityName","in":"query","description":"entityName","required":false,"type":"string"},{"name":"resourceId","in":"query","description":"resourceId","required":false,"type":"integer","format":"int64"},{"name":"makerId","in":"query","description":"makerId","required":false,"type":"integer","format":"int64"},{"name":"makerDateTimeFrom","in":"query","description":"makerDateTimeFrom","required":false,"type":"string"},{"name":"makerDateTimeTo","in":"query","description":"makerDateTimeTo","required":false,"type":"string"},{"name":"checkerId","in":"query","description":"checkerId","required":false,"type":"integer","format":"int64"},{"name":"checkerDateTimeFrom","in":"query","description":"checkerDateTimeFrom","required":false,"type":"string"},{"name":"checkerDateTimeTo","in":"query","description":"checkerDateTimeTo","required":false,"type":"string"},{"name":"processingResult","in":"query","description":"processingResult","required":false,"type":"integer","format":"int32"},{"name":"officeId","in":"query","description":"officeId","required":false,"type":"integer","format":"int32"},{"name":"groupId","in":"query","description":"groupId","required":false,"type":"integer","format":"int32"},{"name":"clientId","in":"query","description":"clientId","required":false,"type":"integer","format":"int32"},{"name":"loanid","in":"query","description":"loanid","required":false,"type":"integer","format":"int32"},{"name":"savingsAccountId","in":"query","description":"savingsAccountId","required":false,"type":"integer","format":"int32"},{"name":"paged","in":"query","description":"paged","required":false,"type":"boolean"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","description":"orderBy","required":false,"type":"string"},{"name":"sortOrder","in":"query","description":"sortOrder","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetMakerCheckerResponse"}}}}}},"/makercheckers/searchtemplate":{"get":{"tags":["Maker Checker (or 4-eye) functionality"],"summary":"Maker Checker Search Template","description":"This is a convenience resource. It can be useful when building a Checker Inbox UI. \"appUsers\" are data scoped to the office/branch the requestor is associated with. \"actionNames\" and \"entityNames\" returned are those that the requestor has Checker approval permissions for.\n\nExample Requests:\n\nmakercheckers/searchtemplate\nmakercheckers/searchtemplate?fields=entityNames","operationId":"retrieveAuditSearchTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetMakerCheckersSearchTemplateResponse"}}}}},"/makercheckers/{auditId}":{"post":{"tags":["Maker Checker (or 4-eye) functionality"],"summary":"Approve Maker Checker Entry | Reject Maker Checker Entry","description":"","operationId":"approveMakerCheckerEntry","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"auditId","in":"path","description":"auditId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostMakerCheckersResponse"}}}},"delete":{"tags":["Maker Checker (or 4-eye) functionality"],"summary":"Delete Maker Checker Entry","description":"","operationId":"deleteMakerCheckerEntry","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"auditId","in":"path","description":"auditId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostMakerCheckersResponse"}}}}},"/makercheckers":{"get":{"tags":["Maker Checker (or 4-eye) functionality"],"summary":"List Maker Checker Entries","description":"Get a list of entries that can be checked by the requestor that match the criteria supplied.\n\nExample Requests:\n\nmakercheckers\n\nmakercheckers?fields=madeOnDate,maker,processingResult\n\nmakercheckers?makerDateTimeFrom=2013-03-25 08:00:00&makerDateTimeTo=2013-04-04 18:00:00\n\nmakercheckers?officeId=1\n\nmakercheckers?officeId=1&includeJson=true","operationId":"retrieveCommands","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"actionName","in":"query","description":"actionName","required":false,"type":"string"},{"name":"entityName","in":"query","description":"entityName","required":false,"type":"string"},{"name":"resourceId","in":"query","description":"resourceId","required":false,"type":"integer","format":"int64"},{"name":"makerId","in":"query","description":"makerId","required":false,"type":"integer","format":"int64"},{"name":"makerDateTimeFrom","in":"query","description":"makerDateTimeFrom","required":false,"type":"string"},{"name":"makerDateTimeTo","in":"query","description":"makerDateTimeTo","required":false,"type":"string"},{"name":"officeId","in":"query","description":"officeId","required":false,"type":"integer","format":"int32"},{"name":"groupId","in":"query","description":"groupId","required":false,"type":"integer","format":"int32"},{"name":"clientId","in":"query","description":"clientId","required":false,"type":"integer","format":"int32"},{"name":"loanid","in":"query","description":"loanid","required":false,"type":"integer","format":"int32"},{"name":"savingsAccountId","in":"query","description":"savingsAccountId","required":false,"type":"integer","format":"int32"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetMakerCheckerResponse"}}}}}},"/accountnumberformats/{accountNumberFormatId}":{"get":{"tags":["Account number format"],"summary":"Retrieve an Account number format","description":"Example Requests:\n\naccountnumberformats/1\n\n\naccountnumberformats/1?template=true\n\n\naccountnumberformats/1?fields=accountType,prefixType","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountNumberFormatId","in":"path","description":"accountNumberFormatId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetAccountNumberFormatsIdResponse"}}}},"put":{"tags":["Account number format"],"summary":"Update an Account number format","description":"","operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountNumberFormatId","in":"path","description":"accountNumberFormatId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutAccountNumberFormatsRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutAccountNumberFormatsResponse"}}}},"delete":{"tags":["Account number format"],"summary":"Delete an Account number format","description":"Note: Account numbers created while this format was active would remain unchanged.","operationId":"delete","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountNumberFormatId","in":"path","description":"accountNumberFormatId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteAccountNumberFormatsResponse"}}}}},"/accountnumberformats/template":{"get":{"tags":["Account number format"],"summary":"Retrieve Account number format Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\n\nExample Request:\n\naccountnumberformats/template","operationId":"retrieveTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetAccountNumberFormatsResponseTemplate"}}}}},"/accountnumberformats":{"get":{"tags":["Account number format"],"summary":"List Account number formats","description":"Example Requests:\n\naccountnumberformats\n\n\naccountnumberformats?fields=accountType,prefixType","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetAccountNumberFormatsIdResponse"}}}}},"post":{"tags":["Account number format"],"summary":"Create an Account number format","description":"Note: You may associate a single Account number format for a given account type\nMandatory Fields for Account number formats\naccountType","operationId":"create","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":false,"schema":{"$ref":"#/definitions/PostAccountNumberFormatsRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostAccountNumberFormatsResponse"}}}}},"/caches":{"get":{"tags":["Cache"],"summary":"Retrieve Cache Types","description":"Returns the list of caches.\n\nExample Requests:\n\ncaches","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetCachesResponse"}}}}},"put":{"tags":["Cache"],"summary":"Switch Cache","description":"Switches the cache to chosen one.","operationId":"switchCache","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutCachesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutCachesResponse"}}}}},"/smscampaigns/{campaignId}":{"post":{"tags":["SMS Campaigns"],"summary":"SMS Campaign","description":"Activates | Deactivates | Reactivates","operationId":"handleCommands","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"campaignId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"}}}},"put":{"tags":["SMS Campaigns"],"summary":"Update a Campaign","description":"","operationId":"updateCampaign","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"campaignId","in":"path","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/CommandWrapper"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"}}}},"delete":{"tags":["SMS Campaigns"],"summary":"Delete a SMS Campaign","description":"Note: Only closed SMS Campaigns can be deleted","operationId":"delete","parameters":[{"name":"campaignId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"}}}}},"/smscampaigns":{"get":{"tags":["SMS Campaigns"],"summary":"List SMS Campaigns","description":"Example Requests:\n\nsmscampaigns","operationId":"retrieveAllEmails","produces":["application/json"],"parameters":[{"name":"sqlSearch","in":"query","required":false,"type":"string"},{"name":"offset","in":"query","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","required":false,"type":"string"},{"name":"sortOrder","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"}}}},"post":{"tags":["SMS Campaigns"],"summary":"Create a SMS Campaign","description":"Mandatory Fields\ncampaignName, campaignType, triggerType, providerId, runReportId, message\n\nMandatory Fields for Cash based on selected report id\nparamValue in json format","operationId":"createCampaign","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/CommandWrapper"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"}}}}},"/smscampaigns/{resourceId}":{"get":{"tags":["SMS Campaigns"],"summary":"Retrieve a SMS Campaign","description":"Example Requests:\n\nsmscampaigns/1\n","operationId":"retrieveCampaign","produces":["application/json"],"parameters":[{"name":"resourceId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"}}}}},"/smscampaigns/template":{"get":{"tags":["SMS Campaigns"],"summary":"Retrieve a SMS Campaign","description":"Example Requests:\n\nsmscampaigns/1\n\n\nsmscampaigns/1?template=true\n\n\nsmscampaigns/template","operationId":"template","parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"}}}}},"/smscampaigns/preview":{"post":{"tags":["SMS Campaigns"],"operationId":"preview","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/codes/{codeId}/codevalues":{"get":{"tags":["Code Values"],"summary":"List Code Values","description":"Returns the list of Code Values for a given Code\n\nExample Requests:\n\ncodes/1/codevalues","operationId":"retrieveAllCodeValues","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"codeId","in":"path","description":"codeId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"A List of Given response","schema":{"type":"array","items":{"$ref":"#/definitions/GetCodeValuesDataResponse"}}}}},"post":{"tags":["Code Values"],"summary":"Create a Code Value","description":"","operationId":"createCodeValue","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"codeId","in":"path","description":"codeId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostCodeValuesDataRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostCodeValueDataResponse"}}}}},"/codes/{codeId}/codevalues/{codeValueId}":{"get":{"tags":["Code Values"],"summary":"Retrieve a Code Value","description":"Returns the details of a Code Value\n\nExample Requests:\n\ncodes/1/codevalues/1","operationId":"retrieveCodeValue","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"codeValueId","in":"path","description":"codeValueId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetCodeValuesDataResponse"}}}},"put":{"tags":["Code Values"],"summary":"Update a Code Value","description":"Updates the details of a code value.","operationId":"updateCodeValue","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"codeId","in":"path","description":"codeId","required":true,"type":"integer","format":"int64"},{"name":"codeValueId","in":"path","description":"codeValueId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutCodeValuesDataRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutCodeValueDataResponse"}}}},"delete":{"tags":["Code Values"],"summary":"Delete a Code Value","description":"Deletes a code value","operationId":"deleteCodeValue","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"codeId","in":"path","description":"codeId","required":true,"type":"integer","format":"int64"},{"name":"codeValueId","in":"path","description":"codeValueId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteCodeValueDataResponse"}}}}},"/codes":{"get":{"tags":["Codes"],"summary":"Retrieve Codes","description":"Returns the list of codes.\n\nExample Requests:\n\ncodes","operationId":"retrieveCodes","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetCodesResponse"}}}}},"post":{"tags":["Codes"],"summary":"Create a Code","description":"Creates a code. Codes created through api are always 'user defined' and so system defined is marked as false.","operationId":"createCode","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostCodesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostCodesResponse"}}}}},"/codes/{codeId}":{"get":{"tags":["Codes"],"summary":"Retrieve a Code","description":"Returns the details of a Code.\n\nExample Requests:\n\ncodes/1","operationId":"retrieveCode","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"codeId","in":"path","description":"codeId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetCodesResponse"}}}},"put":{"tags":["Codes"],"summary":"Update a Code","description":"Updates the details of a code if it is not system defined.","operationId":"updateCode","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"codeId","in":"path","description":"codeId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutCodesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutCodesResponse"}}}},"delete":{"tags":["Codes"],"summary":"Delete a Code","description":"Deletes a code if it is not system defined.","operationId":"deleteCode","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"codeId","in":"path","description":"codeId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteCodesResponse"}}}}},"/externalservice/{servicename}":{"get":{"tags":["External Services"],"summary":"Retrieve External Services Configuration","description":"Returns a external Service configurations based on the Service Name.\n\nService Names supported are S3 and SMTP.\n\nExample Requests:\n\nexternalservice/SMTP","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"servicename","in":"path","description":"servicename","required":true,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/ExternalServicesPropertiesData"}}}},"put":{"tags":["External Services"],"summary":"Update External Service","description":"Updates the external Service Configuration for a Service Name.\n\nExample: \n\nexternalservice/S3","operationId":"updateExternalServiceProperties","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"servicename","in":"path","description":"servicename","required":true,"type":"string"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutExternalServiceRequest"}}],"responses":{"200":{"description":""}}}},"/configurations/{configId}":{"get":{"tags":["Global Configuration"],"summary":"Retrieve Global Configuration","description":"Returns a global enable/disable configurations.\n\nExample Requests:\n\nconfigurations/1","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"configId","in":"path","description":"configId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetGlobalConfigurationsResponse"}}}},"put":{"tags":["Global Configuration"],"summary":"Update Global Configuration","description":"Updates an enable/disable global configuration item.","operationId":"updateConfiguration","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"configId","in":"path","description":"configId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutGlobalConfigurationsRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutGlobalConfigurationsResponse"}}}}},"/configurations":{"get":{"tags":["Global Configuration"],"summary":"Retrieve Global Configuration | Retrieve Global Configuration for surveys","description":"Returns the list global enable/disable configurations.\n\nExample Requests:\n\nconfigurations\n\n\nReturns the list global enable/disable survey configurations.\n\nExample Requests:\n\nconfigurations/survey","operationId":"retrieveConfiguration","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"survey","in":"query","description":"survey","required":false,"type":"boolean","default":false}],"responses":{"200":{"description":"List of example \n response \nsurveys response \ngiven below","schema":{"type":"array","items":{"$ref":"#/definitions/GetGlobalConfigurationsResponse"}}}}}},"/CreditBureauConfiguration":{"get":{"tags":["CreditBureau Configuration"],"operationId":"getCreditBureau","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/CreditBureauConfiguration/mappings":{"get":{"tags":["CreditBureau Configuration"],"operationId":"getCreditBureauLoanProductMapping","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"put":{"tags":["CreditBureau Configuration"],"operationId":"updateCreditBureauLoanProductMapping","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/CreditBureauConfiguration/organisationCreditBureau":{"get":{"tags":["CreditBureau Configuration"],"operationId":"getOrganisationCreditBureau","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"put":{"tags":["CreditBureau Configuration"],"operationId":"updateCreditBureau","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/CreditBureauConfiguration/loanProduct":{"get":{"tags":["CreditBureau Configuration"],"operationId":"fetchLoanProducts","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/CreditBureauConfiguration/organisationCreditBureau/{organisationCreditBureauId}":{"post":{"tags":["CreditBureau Configuration"],"operationId":"addOrganisationCreditBureau","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"organisationCreditBureauId","in":"path","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/CreditBureauConfiguration/mappings/{CreditBureauId}":{"post":{"tags":["CreditBureau Configuration"],"operationId":"createCreditBureauLoanProductMapping","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"CreditBureauId","in":"path","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/CreditBureauConfiguration/config/{organisationCreditBureauId}":{"get":{"tags":["CreditBureau Configuration"],"operationId":"getConfiguration","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"organisationCreditBureauId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/datatables":{"get":{"tags":["Data Tables"],"summary":"List Data Tables","description":"Lists registered data tables and the Apache Fineract Core application table they are registered to.\n\nARGUMENTS\n\napptable - optional\nThe Apache Fineract core application table.\n\nExample Requests:\n\ndatatables?apptable=m_client\n\n\ndatatables","operationId":"getDatatables","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"apptable","in":"query","description":"apptable","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetDataTablesResponse"}}}}},"post":{"tags":["Data Tables"],"summary":"Create Data Table","description":"Create a new data table and registers it with the Apache Fineract Core application table.\n\nField Descriptions\n\nMandatory - datatableName : \n\nThe name of the Data Table.\n\nMandatory - apptableName\n\nApplication table name. Must be one of the following:\n\nm_client\n\nm_group\n\nm_loan\n\nm_office\n\nm_saving_account\n\nm_product_loan\n\nm_savings_product\n\nMandatory - columns \nAn array of columns in the new Data Table.\n\nOptional - multiRow\n\nAllows to create multiple entries in the Data Table. Optional, defaults to false. If this property is not provided Data Table will allow only one entry.\n\nField Descriptions - columns\n\nMandatory - name\n\nName of the created column. Can contain only alphanumeric characters, underscores and spaces, but cannot start with a number. Cannot start or end with an underscore or space.\n\nMandatory - type\n\nColumn type. Must be one of the following:\n\nBoolean\n\nDate\n\nDateTime\n\nDecimal\n\nDropdown\n\n\nNumber\n\nString\n\nText\n\nMandatory [type = Dropdown] - code\n\nUsed in Code Value fields. Column name becomes: code_cd_name. Mandatory if using type Dropdown, otherwise an error is returned.\n\nOptional - mandatory\n\nDetermines whether this column must have a value in every entry. Optional, defaults to false.\n\nMandatory [type = String] - length\n\nLength of the text field. Mandatory if type String is used, otherwise an error is returned.","operationId":"createDatatable","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostDataTablesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostDataTablesResponse"}}}}},"/datatables/{datatableName}":{"put":{"tags":["Data Tables"],"summary":"Update Data Table","description":"Modifies fields of a data table. If the apptableName parameter is passed, data table is deregistered and registered with the new application table.","operationId":"updateDatatable","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"datatableName","in":"path","description":"datatableName","required":true,"type":"string"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutDataTablesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutDataTablesResponse"}}}},"delete":{"tags":["Data Tables"],"summary":"Delete Data Table","description":"Deletes a data table and deregisters it from the Apache Fineract Core application table.","operationId":"deleteDatatable","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"datatableName","in":"path","description":"datatableName","required":true,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteDataTablesResponse"}}}}},"/datatables/register/{datatable}/{apptable}":{"post":{"tags":["Data Tables"],"summary":"Register Data Table","description":"Registers a data table with the Apache Fineract Core application table. This allows the data table to be maintained through the API. In case the datatable is a PPI (survey table), a parameter category should be pass along with the request. The API currently support one category (200)","operationId":"registerDatatable","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"datatable","in":"path","description":"datatable","required":true,"type":"string"},{"name":"apptable","in":"path","description":"apptable","required":true,"type":"string"},{"in":"body","name":"body","description":"body","required":false,"schema":{"$ref":"#/definitions/PostDataTablesRegisterDatatableAppTable"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutDataTablesResponse"}}}}},"/datatables/deregister/{datatable}":{"post":{"tags":["Data Tables"],"summary":"Deregister Data Table","description":"Deregisters a data table. It will no longer be available through the API.","operationId":"deregisterDatatable","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"datatable","in":"path","description":"datatable","required":true,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutDataTablesResponse"}}}}},"/datatables/{datatable}":{"get":{"tags":["Data Tables"],"summary":"Retrieve Data Table Details","description":"Lists a registered data table details and the Apache Fineract Core application table they are registered to.","operationId":"getDatatable","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"datatable","in":"path","description":"datatable","required":true,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetDataTablesResponse"}}}}},"/datatables/{datatable}/{apptableId}":{"get":{"tags":["Data Tables"],"summary":"Retrieve Entry(s) from Data Table","description":"Gets the entry (if it exists) for data tables that are one to one with the application table. \nGets the entries (if they exist) for data tables that are one to many with the application table.\n\nNote: The 'fields' parameter is not available for datatables.\n\nARGUMENTS\norderoptional Specifies the order in which data is returned.genericResultSetoptional, defaults to false If 'true' an optimised JSON format is returned suitable for tabular display of data. This format is used by the default data tables UI functionality.\nExample Requests:\n\ndatatables/extra_client_details/1\n\n\ndatatables/extra_family_details/1?order=`Date of Birth` desc\n\n\ndatatables/extra_client_details/1?genericResultSet=true","operationId":"getDatatable","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"datatable","in":"path","description":"datatable","required":true,"type":"string"},{"name":"apptableId","in":"path","description":"apptableId","required":true,"type":"integer","format":"int64"},{"name":"order","in":"query","description":"order","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetDataTablesAppTableIdResponse"}}}},"post":{"tags":["Data Tables"],"summary":"Create Entry in Data Table","description":"Adds a row to the data table.\n\nNote that the default datatable UI functionality converts any field name containing spaces to underscores when using the API. This means the field name \"Business Description\" is considered the same as \"Business_Description\". So you shouldn't have both \"versions\" in any data table.","operationId":"createDatatableEntry","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"datatable","in":"path","description":"datatable","required":true,"type":"string"},{"name":"apptableId","in":"path","description":"apptableId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostDataTablesAppTableIdRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostDataTablesAppTableIdResponse"}}}},"put":{"tags":["Data Tables"],"summary":"Update Entry in Data Table (One to One)","description":"Updates the row (if it exists) of the data table.","operationId":"updateDatatableEntryOnetoOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"datatable","in":"path","description":"datatable","required":true,"type":"string"},{"name":"apptableId","in":"path","description":"apptableId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutDataTablesAppTableIdRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutDataTablesAppTableIdResponse"}}}},"delete":{"tags":["Data Tables"],"summary":"Delete Entry(s) in Data Table","description":"Deletes the entry (if it exists) for data tables that are one-to-one with the application table. \nDeletes the entries (if they exist) for data tables that are one-to-many with the application table.","operationId":"deleteDatatableEntries","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"datatable","in":"path","description":"datatable","required":true,"type":"string"},{"name":"apptableId","in":"path","description":"apptableId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteDataTablesDatatableAppTableIdResponse"}}}}},"/datatables/{datatable}/{apptableId}/{datatableId}":{"get":{"tags":["Data Tables"],"operationId":"getDatatableManyEntry","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"datatable","in":"path","required":true,"type":"string"},{"name":"apptableId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"datatableId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"order","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"put":{"tags":["Data Tables"],"summary":"Update Entry in Data Table (One to Many)","description":"Updates the row (if it exists) of the data table.","operationId":"updateDatatableEntryOneToMany","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"datatable","in":"path","description":"datatable","required":true,"type":"string"},{"name":"apptableId","in":"path","description":"apptableId","required":true,"type":"integer","format":"int64"},{"name":"datatableId","in":"path","description":"datatableId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutDataTablesAppTableIdDatatableIdRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutDataTablesAppTableIdDatatableIdResponse"}}}},"delete":{"tags":["Data Tables"],"summary":"Delete Entry in Datatable (One to Many)","description":"Deletes the entry (if it exists) for data tables that are one to many with the application table.\n\n","operationId":"deleteDatatableEntries","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"datatable","in":"path","description":"datatable","required":true,"type":"body","x-example":"{}"},{"name":"apptableId","in":"path","description":"apptableId","required":true,"type":"integer","format":"int64"},{"name":"datatableId","in":"path","description":"datatableId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteDataTablesDatatableAppTableIdDatatableIdResponse"}}}}},"/entityDatatableChecks":{"get":{"tags":["Entity-Datatable Checks"],"summary":"List Entity-Datatable Checks","description":"The list capability of Entity-Datatable Checks can support pagination.\n\nOPTIONAL ARGUMENTS\noffset Integer optional, defaults to 0 Indicates the result from which pagination startslimit Integer optional, defaults to 200 Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1\nExample Request:\n\nentityDatatableChecks?offset=0&limit=15","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"status","in":"query","description":"status","required":false,"type":"integer","format":"int64"},{"name":"entity","in":"query","description":"entity","required":false,"type":"string"},{"name":"productId","in":"query","description":"productId","required":false,"type":"integer","format":"int64"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetEntityDatatableChecksResponse"}}}}},"post":{"tags":["Entity-Datatable Checks"],"summary":"Create Entity-Datatable Checks","description":"Mandatory Fields : \nentity, status, datatableName\n\nNon-Mandatory Fields : \nproductId","operationId":"createEntityDatatableCheck","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostEntityDatatableChecksTemplateRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostEntityDatatableChecksTemplateResponse"}}}}},"/entityDatatableChecks/{entityDatatableCheckId}":{"delete":{"tags":["Entity-Datatable Checks"],"summary":"Delete Entity-Datatable Checks","description":"Deletes an existing Entity-Datatable Check","operationId":"deleteDatatable","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"entityDatatableCheckId","in":"path","description":"entityDatatableCheckId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteEntityDatatableChecksTemplateResponse"}}}}},"/entityDatatableChecks/template":{"get":{"tags":["Entity-Datatable Checks"],"summary":"Retrieve Entity-Datatable Checks Template","description":"This is a convenience resource useful for building maintenance user interface screens for Entity-Datatable Checks applications. The template data returned consists of:\n\nAllowed Value Lists\nExample Request:\n\nentityDatatableChecks/template","operationId":"getTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetEntityDatatableChecksTemplateResponse"}}}}},"/reports/{id}":{"get":{"tags":["Reports"],"summary":"Retrieve a Report\n","description":"Example Requests:\n\nreports/1\n\n\nreports/1?template=true","operationId":"retrieveReport","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"id","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetReportsResponse"}}}},"put":{"tags":["Reports"],"summary":"Update a Report","description":"Only the useReport value can be updated for core reports.","operationId":"updateReport","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"id","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutReportRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutReportResponse"}}}},"delete":{"tags":["Reports"],"summary":"Delete a Report","description":"Only non-core reports can be deleted.","operationId":"deleteReport","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"id","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteReportsResponse"}}}}},"/reports":{"get":{"tags":["Reports"],"summary":"List Reports","description":"Lists all reports and their parameters.\n\nExample Request:\n\nreports","operationId":"retrieveReportList","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":""}}},"post":{"tags":["Reports"],"summary":"Create a Report","description":"","operationId":"createReport","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostRepostRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostReportsResponse"}}}}},"/reports/template":{"get":{"tags":["Reports"],"summary":"Retrieve Report Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\n\nExample Request : \n\nreports/template","operationId":"retrieveOfficeTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetReportsTemplateResponse"}}}}},"/runreports/{reportName}":{"get":{"tags":["Run Reports"],"summary":"Running a Report","description":"This resource allows you to run and receive output from pre-defined Apache Fineract reports.\n\nReports can also be used to provide data for searching and workflow functionality.\n\nThe default output is a JSON formatted \"Generic Resultset\". The Generic Resultset contains Column Heading as well as Data information. However, you can export to CSV format by simply adding \"&exportCSV=true\" to the end of your URL.\n\nIf Pentaho reports have been pre-defined, they can also be run through this resource. Pentaho reports can return HTML, PDF or CSV formats.\n\nThe Apache Fineract reference application uses a JQuery plugin called stretchy reporting which, itself, uses this reports resource to provide a pretty flexible reporting User Interface (UI).\n\n\n\nExample Requests:\n\nrunreports/Client%20Listing?R_officeId=1\n\n\nrunreports/Client%20Listing?R_officeId=1&exportCSV=true\n\n\nrunreports/OfficeIdSelectOne?R_officeId=1¶meterType=true\n\n\nrunreports/OfficeIdSelectOne?R_officeId=1¶meterType=true&exportCSV=true\n\n\nrunreports/Expected%20Payments%20By%20Date%20-%20Formatted?R_endDate=2013-04-30&R_loanOfficerId=-1&R_officeId=1&R_startDate=2013-04-16&output-type=HTML&R_officeId=1\n\n\nrunreports/Expected%20Payments%20By%20Date%20-%20Formatted?R_endDate=2013-04-30&R_loanOfficerId=-1&R_officeId=1&R_startDate=2013-04-16&output-type=XLS&R_officeId=1\n\n\nrunreports/Expected%20Payments%20By%20Date%20-%20Formatted?R_endDate=2013-04-30&R_loanOfficerId=-1&R_officeId=1&R_startDate=2013-04-16&output-type=CSV&R_officeId=1\n\n\nrunreports/Expected%20Payments%20By%20Date%20-%20Formatted?R_endDate=2013-04-30&R_loanOfficerId=-1&R_officeId=1&R_startDate=2013-04-16&output-type=PDF&R_officeId=1","operationId":"runReport","consumes":["application/json"],"produces":["application/json","text/csv","application/vnd.ms-excel","application/pdf","text/html"],"parameters":[{"name":"reportName","in":"path","description":"reportName","required":true,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetReportNameResponse"}}}}},"/{entityType}/{entityId}/documents":{"get":{"tags":["Documents"],"summary":"List documents","description":"Example Requests:\n\nclients/1/documents\n\nclient_identifiers/1/documents\n\nloans/1/documents?fields=name,description","operationId":"retreiveAllDocuments","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"entityType","in":"path","description":"entityType","required":true,"type":"string"},{"name":"entityId","in":"path","description":"entityId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetEntityTypeEntityIdDocumentsResponse"}}}}},"post":{"tags":["Documents"],"summary":"Create a Document","description":"Note: A document is created using a Multi-part form upload \n\nBody Parts\n\nname : \nName or summary of the document\n\ndescription : \nDescription of the document\n\nfile : \nThe file to be uploaded\n\nMandatory Fields : \nfile and description","operationId":"createDocument","consumes":["multipart/form-data"],"produces":["application/json"],"parameters":[{"name":"entityType","in":"path","description":"entityType","required":true,"type":"string"},{"name":"entityId","in":"path","description":"entityId","required":true,"type":"integer","format":"int64"},{"name":"Content-Length","in":"header","description":"Content-Length","required":false,"type":"integer","format":"int64"},{"name":"file","in":"formData","description":"file","required":false,"type":"file"},{"name":"name","in":"formData","description":"name","required":false,"type":"string"},{"name":"description","in":"formData","description":"description","required":false,"type":"string"}],"responses":{"200":{"description":"Not Shown (multi-part form data)","schema":{"$ref":"#/definitions/PostEntityTypeEntityIdDocumentsResponse"}}}}},"/{entityType}/{entityId}/documents/{documentId}":{"get":{"tags":["Documents"],"summary":"Retrieve a Document","description":"Example Requests:\n\nclients/1/documents/1\n\n\nloans/1/documents/1\n\n\nclient_identifiers/1/documents/1?fields=name,description","operationId":"getDocument","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"entityType","in":"path","description":"entityType","required":true,"type":"string"},{"name":"entityId","in":"path","description":"entityId","required":true,"type":"integer","format":"int64"},{"name":"documentId","in":"path","description":"documentId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetEntityTypeEntityIdDocumentsResponse"}}}},"put":{"tags":["Documents"],"summary":"Update a Document","description":"Note: A document is updated using a Multi-part form upload \nBody Parts\nname\nName or summary of the document\ndescription\nDescription of the document\nfile\nThe file to be uploaded","operationId":"updateDocument","consumes":["multipart/form-data"],"produces":["application/json"],"parameters":[{"name":"entityType","in":"path","description":"entityType","required":true,"type":"string"},{"name":"entityId","in":"path","description":"entityId","required":true,"type":"integer","format":"int64"},{"name":"documentId","in":"path","description":"documentId","required":true,"type":"integer","format":"int64"},{"name":"Content-Length","in":"header","description":"Content-Length","required":false,"type":"integer","format":"int64"},{"name":"file","in":"formData","description":"file","required":false,"type":"file"},{"name":"name","in":"formData","description":"name","required":false,"type":"string"},{"name":"description","in":"formData","description":"description","required":false,"type":"string"}],"responses":{"200":{"description":"Not Shown (multi-part form data)","schema":{"$ref":"#/definitions/PutEntityTypeEntityIdDocumentsResponse"}}}},"delete":{"tags":["Documents"],"summary":"Remove a Document","description":"","operationId":"deleteDocument","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"entityType","in":"path","description":"entityType","required":true,"type":"string"},{"name":"entityId","in":"path","description":"entityId","required":true,"type":"integer","format":"int64"},{"name":"documentId","in":"path","description":"documentId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteEntityTypeEntityIdDocumentsResponse"}}}}},"/{entityType}/{entityId}/documents/{documentId}/attachment":{"get":{"tags":["Documents"],"summary":"Retrieve Binary File associated with Document","description":"Request used to download the file associated with the document\n\nExample Requests:\n\nclients/1/documents/1/attachment\n\n\nloans/1/documents/1/attachment","operationId":"downloadFile","consumes":["application/json"],"produces":["application/octet-stream"],"parameters":[{"name":"entityType","in":"path","description":"entityType","required":true,"type":"string"},{"name":"entityId","in":"path","description":"entityId","required":true,"type":"integer","format":"int64"},{"name":"documentId","in":"path","description":"documentId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"Not Shown: The corresponding Binary file"}}}},"/{entity}/{entityId}/images":{"get":{"tags":["DomainNameapiv1{entity}{entityId}images"],"operationId":"downloadClientImage","consumes":["application/json"],"produces":["application/octet-stream"],"parameters":[{"name":"entity","in":"path","required":true,"type":"string"},{"name":"entityId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"maxWidth","in":"query","required":false,"type":"integer","format":"int32"},{"name":"maxHeight","in":"query","required":false,"type":"integer","format":"int32"},{"name":"output","in":"query","required":false,"type":"string"}],"responses":{"default":{"description":"successful operation"}}},"post":{"tags":["DomainNameapiv1{entity}{entityId}images"],"operationId":"addNewClientImage","consumes":["text/plain","text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"entity","in":"path","required":true,"type":"string"},{"name":"entityId","in":"path","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"put":{"tags":["DomainNameapiv1{entity}{entityId}images"],"operationId":"updateClientImage","consumes":["multipart/form-data"],"produces":["application/json"],"parameters":[{"name":"entity","in":"path","required":true,"type":"string"},{"name":"entityId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"Content-Length","in":"header","required":false,"type":"integer","format":"int64"},{"name":"file","in":"formData","required":false,"type":"file"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"delete":{"tags":["DomainNameapiv1{entity}{entityId}images"],"operationId":"deleteClientImage","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"entity","in":"path","required":true,"type":"string"},{"name":"entityId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/entitytoentitymapping/{mapId}":{"get":{"tags":["DomainNameapiv1entitytoentitymapping"],"operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"mapId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"put":{"tags":["DomainNameapiv1entitytoentitymapping"],"operationId":"updateMap","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"mapId","in":"path","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"delete":{"tags":["DomainNameapiv1entitytoentitymapping"],"operationId":"delete","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"mapId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/entitytoentitymapping/{mapId}/{fromId}/{toId}":{"get":{"tags":["DomainNameapiv1entitytoentitymapping"],"operationId":"getEntityToEntityMappings","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"mapId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"fromId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"toId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/entitytoentitymapping":{"get":{"tags":["DomainNameapiv1entitytoentitymapping"],"operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/entitytoentitymapping/{relId}":{"post":{"tags":["DomainNameapiv1entitytoentitymapping"],"operationId":"createMap","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"relId","in":"path","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/hooks":{"get":{"tags":["Hooks"],"summary":"Retrieve Hooks","description":"Returns the list of hooks.\n\nExample Requests:\n\nhooks","operationId":"retrieveHooks","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetHookResponse"}}}}},"post":{"tags":["Hooks"],"summary":"Create a Hook","description":"The following parameters can be passed for the creation of a hook :-\n\nname - string - Required. The name of the template that is being called. (See /hooks/template for the list of valid hook names.)\n\nisActive - boolean - Determines whether the hook is actually triggered.\n\nevents - array - Determines what events the hook is triggered for.\n\nconfig - hash - Required. Key/value pairs to provide settings for this hook. These settings vary between the templates.\n\ntemplateId - Optional. The UGD template ID associated with the same entity (client or loan).","operationId":"createHook","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/PostHookRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostHookResponse"}}}}},"/hooks/{hookId}":{"get":{"tags":["Hooks"],"summary":"Retrieve a Hook","description":"Returns the details of a Hook.\n\nExample Requests:\n\nhooks/1","operationId":"retrieveHook","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"hookId","in":"path","description":"hookId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetHookResponse"}}}},"put":{"tags":["Hooks"],"summary":"Update a Hook","description":"Updates the details of a hook.","operationId":"updateHook","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"hookId","in":"path","description":"hookId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/PutHookRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutHookResponse"}}}},"delete":{"tags":["Hooks"],"summary":"Delete a Hook","description":"Deletes a hook.","operationId":"deleteHook","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"hookId","in":"path","description":"hookId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteHookResponse"}}}}},"/hooks/template":{"get":{"tags":["Hooks"],"summary":"Retrieve Hooks Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\nExample Request:\n\nhooks/template","operationId":"template","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetHookTemplateResponse"}}}}},"/scheduler":{"get":{"tags":["Scheduler"],"summary":"Retrieve Scheduler Status","description":"Returns the scheduler status.\n\nExample Requests:\n\nscheduler","operationId":"retrieveStatus","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetSchedulerResponse"}}}},"post":{"tags":["Scheduler"],"summary":"Activate Scheduler Jobs | Suspend Scheduler Jobs","description":"Activates the scheduler job service. | Suspends the scheduler job service.","operationId":"changeSchedulerStatus","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"command","in":"query","description":"command","required":false,"type":"string"}],"responses":{"200":{"description":"POST : scheduler?command=start\n\n\nPOST : scheduler?command=stop"}}}},"/jobs/{jobId}":{"get":{"tags":["MIFOSX-BATCH JOBS"],"summary":"Retrieve a Job","description":"Returns the details of a Job.\n\nExample Requests:\n\njobs/5","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"jobId","in":"path","description":"jobId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetJobsResponse"}}}},"post":{"tags":["MIFOSX-BATCH JOBS"],"summary":"Run a Job","description":"Manually Execute Specific Job.","operationId":"executeJob","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"jobId","in":"path","description":"jobId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command","required":false,"type":"string"}],"responses":{"200":{"description":"POST: jobs/1?command=executeJob"}}},"put":{"tags":["MIFOSX-BATCH JOBS"],"summary":"Update a Job","description":"Updates the details of a job.","operationId":"updateJobDetail","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"jobId","in":"path","description":"jobId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutJobsJobsIDRequest"}}],"responses":{"200":{"description":""}}}},"/jobs/{jobId}/runhistory":{"get":{"tags":["MIFOSX-BATCH JOBS"],"summary":"Retrieve Job Run History","description":"Example Requests:\n\njobs/5/runhistory?offset=0&limit=200","operationId":"retrieveHistory","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"jobId","in":"path","description":"jobId","required":true,"type":"integer","format":"int64"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","description":"orderBy","required":false,"type":"string"},{"name":"sortOrder","in":"query","description":"sortOrder","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetJobsJobIDJobRunHistoryResponse"}}}}},"/jobs":{"get":{"tags":["MIFOSX-BATCH JOBS"],"summary":"Retrieve Scheduler Jobs","description":"Returns the list of jobs.\n\nExample Requests:\n\njobs","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetJobsResponse"}}}}}},"/reportmailingjobs/{entityId}":{"get":{"tags":["Report Mailing Jobs"],"summary":"Retrieve a Report Mailing Job","description":"Example Requests:\n\nreportmailingjobs/1\n\n\nreportmailingjobs/1?template=true","operationId":"retrieveReportMailingJob","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"entityId","in":"path","description":"entityId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetReportMailingJobsResponse"}}}},"put":{"tags":["Report Mailing Jobs"],"summary":"Update a Report Mailing Job\n","description":"","operationId":"updateReportMailingJob","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"entityId","in":"path","description":"entityId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutReportMailingJobsRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutReportMailingJobsResponse"}}}},"delete":{"tags":["Report Mailing Jobs"],"summary":"Delete a Report Mailing Job","description":"","operationId":"deleteReportMailingJob","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"entityId","in":"path","description":"entityId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/DeleteReportMailingJobsRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteReportMailingJobsResponse"}}}}},"/reportmailingjobs/template":{"get":{"tags":["Report Mailing Jobs"],"summary":"Retrieve Report Mailing Job Details Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for report mailing job applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\nExample Request:\n\nreportmailingjobs/template","operationId":"retrieveReportMailingJobTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetReportMailingJobsTemplate"}}}}},"/reportmailingjobs":{"get":{"tags":["Report Mailing Jobs"],"summary":"List Report Mailing Jobs","description":"Example Requests:\n\nreportmailingjobs","operationId":"retrieveAllReportMailingJobs","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","description":"orderBy","required":false,"type":"string"},{"name":"sortOrder","in":"query","description":"sortOrder","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetReportMailingJobsResponse"}}}}},"post":{"tags":["Report Mailing Jobs"],"summary":"Create a Report Mailing Job","description":"Mandatory Fields: name, startDateTime, stretchyReportId, emailRecipients, emailSubject, emailMessage, emailAttachmentFileFormatId, recurrence, isActive\n\nOptional Fields: description, stretchyReportParamMap","operationId":"createReportMailingJob","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostReportMailingJobsRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostReportMailingJobsResponse"}}}}},"/reportmailingjobrunhistory":{"get":{"tags":["List Report Mailing Job History"],"summary":"List Report Mailing Job History","description":"The list capability of report mailing job history can support pagination and sorting.\n\nExample Requests:\n\nreportmailingjobrunhistory/1","operationId":"retrieveAllByReportMailingJobId","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"reportMailingJobId","in":"query","description":"reportMailingJobId","required":false,"type":"integer","format":"int64"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","description":"orderBy","required":false,"type":"string"},{"name":"sortOrder","in":"query","description":"sortOrder","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/ReportMailingJobRunHistoryData"}}}}},"/authentication":{"post":{"tags":["Authentication HTTP Basic"],"summary":"Verify authentication","description":"Authenticates the credentials provided and returns the set roles and permissions allowed.","operationId":"authenticate","produces":["application/json"],"parameters":[{"name":"username","in":"query","description":"username","required":false,"type":"string"},{"name":"password","in":"query","description":"password","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostAuthenticationResponse"}},"400":{"description":"Unauthenticated. Please login"}}}},"/userdetails":{"get":{"tags":["Fetch authenticated user details"],"summary":"Fetch authenticated user details\n","description":"checks the Authentication and returns the set roles and permissions allowed.","operationId":"fetchAuthenticatedUserData","produces":["application/json"],"parameters":[{"name":"access_token","in":"query","description":"access_token","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetUserDetailsResponse"}}}}},"/sms/{resourceId}":{"get":{"tags":["SMS"],"operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"resourceId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"put":{"tags":["SMS"],"operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"resourceId","in":"path","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"delete":{"tags":["SMS"],"operationId":"delete","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"resourceId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/sms/{campaignId}/messageByStatus":{"get":{"tags":["SMS"],"operationId":"retrieveAllSmsByStatus","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"campaignId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"status","in":"query","required":false,"type":"integer","format":"int64"},{"name":"fromDate","in":"query","required":false,"type":"string"},{"name":"toDate","in":"query","required":false,"type":"string"},{"name":"locale","in":"query","required":false,"type":"string"},{"name":"dateFormat","in":"query","required":false,"type":"string"},{"name":"sqlSearch","in":"query","required":false,"type":"string"},{"name":"offset","in":"query","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","required":false,"type":"string"},{"name":"sortOrder","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/sms":{"get":{"tags":["SMS"],"operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"post":{"tags":["SMS"],"operationId":"create","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/likelihood/{ppiName}/{likelihoodId}":{"get":{"tags":["Likelihood"],"operationId":"retrieve","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"likelihoodId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"put":{"tags":["Likelihood"],"operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"likelihoodId","in":"path","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/likelihood/{ppiName}":{"get":{"tags":["Likelihood"],"operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"ppiName","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/povertyLine/{ppiName}":{"get":{"tags":["Poverty Line"],"operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"ppiName","in":"path","required":true,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/povertyLine/{ppiName}/{likelihoodId}":{"get":{"tags":["Poverty Line"],"operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"ppiName","in":"path","required":true,"type":"string"},{"name":"likelihoodId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/survey/{surveyName}/{apptableId}":{"post":{"tags":["Survey"],"summary":"Create an entry in the survey table","description":"Insert and entry in a survey table (full fill the survey).\n\nRefer Link for sample Body: [ https://demo.openmf.org/api-docs/apiLive.htm#survey_create ] ","operationId":"createDatatableEntry","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"surveyName","in":"path","description":"surveyName","required":true,"type":"string"},{"name":"apptableId","in":"path","description":"apptableId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostSurveySurveyNameApptableIdRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostSurveySurveyNameApptableIdResponse"}}}}},"/survey/{surveyName}/{clientId}/{fulfilledId}":{"delete":{"tags":["Survey"],"operationId":"deleteDatatableEntries","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"surveyName","in":"path","required":true,"type":"string"},{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"fulfilledId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/survey":{"get":{"tags":["Survey"],"summary":"Retrieve surveys","description":"Retrieve surveys. This allows to retrieve the list of survey tables registered .","operationId":"retrieveSurveys","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetSurveyResponse"}}}}}},"/survey/{surveyName}":{"get":{"tags":["Survey"],"summary":"Retrieve survey","description":"Lists a registered survey table details and the Apache Fineract Core application table they are registered to.","operationId":"retrieveSurvey","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"surveyName","in":"path","description":"surveyName","required":true,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetSurveyResponse"}}}}},"/survey/{surveyName}/{clientId}":{"get":{"tags":["Survey"],"operationId":"getClientSurveyOverview","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"surveyName","in":"path","required":true,"type":"string"},{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/survey/{surveyName}/{clientId}/{entryId}":{"get":{"tags":["Survey"],"operationId":"getSurveyEntry","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"surveyName","in":"path","required":true,"type":"string"},{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"entryId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/survey/register/{surveyName}/{apptable}":{"put":{"tags":["Survey"],"operationId":"register","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"surveyName","in":"path","required":true,"type":"string"},{"name":"apptable","in":"path","required":true,"type":"string"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/mixreport":{"get":{"tags":["Mix Report"],"operationId":"retrieveXBRLReport","produces":["application/xml"],"parameters":[{"name":"startDate","in":"query","required":false,"type":"string","format":"date-time"},{"name":"endDate","in":"query","required":false,"type":"string","format":"date-time"},{"name":"currency","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/mixtaxonomy":{"get":{"tags":["Mix Taxonomy"],"operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/mixmapping":{"get":{"tags":["Mix Mapping"],"operationId":"retrieveTaxonomyMapping","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"put":{"tags":["Mix Mapping"],"operationId":"updateTaxonomyMapping","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/holidays/{holidayId}":{"get":{"tags":["Holidays"],"summary":"Retrieve a Holiday","description":"Example Requests:\n\nholidays/1","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"holidayId","in":"path","description":"holidayId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetHolidaysResponse"}}}},"post":{"tags":["Holidays"],"summary":"Activate a Holiday","description":"Always Holidays are created in pending state. This API allows to activate a holiday.\n\nOnly the active holidays are considered for rescheduling the loan repayment.","operationId":"handleCommands","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"holidayId","in":"path","description":"holidayId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command","required":false,"type":"string"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostHolidaysHolidayIdRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostHolidaysHolidayIdResponse"}}}},"put":{"tags":["Holidays"],"summary":"Update a Holiday","description":"If a holiday is in pending state (created and not activated) then all fields are allowed to modify. Once holidays become active only name and descriptions are allowed to modify.","operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"holidayId","in":"path","description":"holidayId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutHolidaysHolidayIdRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutHolidaysHolidayIdResponse"}}}},"delete":{"tags":["Holidays"],"summary":"Delete a Holiday","description":"This API allows to delete a holiday. This is a soft delete the deleted holiday status is marked as deleted.","operationId":"delete","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"holidayId","in":"path","description":"holidayId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteHolidaysHolidayIdResponse"}}}}},"/holidays":{"get":{"tags":["Holidays"],"summary":"List Holidays","description":"Example Requests:\n\nholidays?officeId=1","operationId":"retrieveAllHolidays","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"officeId","in":"query","description":"officeId","required":false,"type":"integer","format":"int64"},{"name":"fromDate","in":"query","description":"fromDate","required":false,"type":"string"},{"name":"toDate","in":"query","description":"toDate","required":false,"type":"string"},{"name":"locale","in":"query","description":"locale","required":false,"type":"string"},{"name":"dateFormat","in":"query","description":"dateFormat","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetHolidaysResponse"}}}}},"post":{"tags":["Holidays"],"summary":"Create a Holiday","description":"Mandatory Fields: name, description, fromDate, toDate, repaymentsRescheduledTo, offices","operationId":"createNewHoliday","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostHolidaysRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostHolidaysResponse"}}}}},"/holidays/template":{"get":{"tags":["Holidays"],"operationId":"retrieveRepaymentScheduleUpdationTyeOptions","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/currencies":{"get":{"tags":["Currency"],"summary":"Retrieve Currency Configuration","description":"Returns the list of currencies permitted for use AND the list of currencies not selected (but available for selection).\n\nExample Requests:\n\ncurrencies\n\n\ncurrencies?fields=selectedCurrencyOptions","operationId":"retrieveCurrencies","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetCurrenciesResponse"}}}},"put":{"tags":["Currency"],"summary":"Update Currency Configuration","description":"Updates the list of currencies permitted for use.","operationId":"updateCurrencies","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutCurrenciesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutCurrenciesResponse"}}}}},"/officetransactions":{"get":{"tags":["officetransactions"],"operationId":"retrieveOfficeTransactions","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"post":{"tags":["officetransactions"],"operationId":"transferMoneyFrom","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/officetransactions/template":{"get":{"tags":["officetransactions"],"operationId":"newOfficeTransactionDetails","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/officetransactions/{transactionId}":{"delete":{"tags":["officetransactions"],"operationId":"delete","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"transactionId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/offices/{officeId}":{"get":{"tags":["Offices"],"summary":"Retrieve an Office","description":"Example Requests:\n\noffices/1\n\n\noffices/1?template=true\n\n\noffices/1?fields=id,name,parentName","operationId":"retreiveOffice","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"officeId","in":"path","description":"officeId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetOfficesResponse"}}}},"put":{"tags":["Offices"],"summary":"Update Office","description":"","operationId":"updateOffice","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"officeId","in":"path","description":"officeId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutOfficesOfficeIdRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutOfficesOfficeIdResponse"}}}}},"/offices/template":{"get":{"tags":["Offices"],"summary":"Retrieve Office Details Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\nExample Request:\n\noffices/template","operationId":"retrieveOfficeTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetOfficesTemplateResponse"}}}}},"/offices":{"get":{"tags":["Offices"],"summary":"List Offices","description":"Example Requests:\n\noffices\n\n\noffices?fields=id,name,openingDate","operationId":"retrieveOffices","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"includeAllOffices","in":"query","description":"includeAllOffices","required":false,"type":"boolean","default":false},{"name":"orderBy","in":"query","description":"orderBy","required":false,"type":"string"},{"name":"sortOrder","in":"query","description":"sortOrder","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetOfficesResponse"}}}}},"post":{"tags":["Offices"],"summary":"Create an Office","description":"Mandatory Fields\nname, openingDate, parentId","operationId":"createOffice","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostOfficesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostOfficesResponse"}}}}},"/offices/downloadtemplate":{"get":{"tags":["Offices"],"operationId":"getOfficeTemplate","produces":["application/vnd.ms-excel"],"parameters":[{"name":"dateFormat","in":"query","required":false,"type":"string"}],"responses":{"default":{"description":"successful operation"}}}},"/offices/uploadtemplate":{"post":{"tags":["Offices"],"operationId":"postOfficeTemplate","consumes":["multipart/form-data"],"parameters":[{"name":"file","in":"formData","required":false,"type":"file"},{"name":"locale","in":"formData","required":false,"type":"string"},{"name":"dateFormat","in":"formData","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/provisioningcategory":{"get":{"tags":["Provisioning Category"],"operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"post":{"tags":["Provisioning Category"],"operationId":"createProvisioningCategory","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/provisioningcategory/{categoryId}":{"put":{"tags":["Provisioning Category"],"operationId":"updateProvisioningCategory","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"categoryId","in":"path","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"delete":{"tags":["Provisioning Category"],"operationId":"deleteProvisioningCategory","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"categoryId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/provisioningcriteria/template":{"get":{"tags":["Provisioning Criteria"],"operationId":"retrieveTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/provisioningcriteria/{criteriaId}":{"get":{"tags":["Provisioning Criteria"],"summary":"Retrieves a Provisioning Criteria","description":"Retrieves a Provisioning Criteria","operationId":"retrieveProvisioningCriteria","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"criteriaId","in":"path","description":"criteriaId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetProvisioningCriteriaCriteriaIdResponse"}}}},"put":{"tags":["Provisioning Criteria"],"summary":"Updates a new Provisioning Criteria","description":"Updates a new Provisioning Criteria\n\nOptional Fields\ncriteriaName, loanProducts, provisioningcriteria","operationId":"updateProvisioningCriteria","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"criteriaId","in":"path","description":"criteriaId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutProvisioningCriteriaRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutProvisioningCriteriaResponse"}}}},"delete":{"tags":["Provisioning Criteria"],"summary":"Deletes Provisioning Criteria","description":"Deletes Provisioning Criteria","operationId":"deleteProvisioningCriteria","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"criteriaId","in":"path","description":"criteriaId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteProvisioningCriteriaResponse"}}}}},"/provisioningcriteria":{"get":{"tags":["Provisioning Criteria"],"summary":"Retrieves all created Provisioning Criterias","description":"Retrieves all created Provisioning Criterias","operationId":"retrieveAllProvisioningCriterias","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetProvisioningCriteriaResponse"}}}}},"post":{"tags":["Provisioning Criteria"],"summary":"Create a new Provisioning Criteria","description":"Creates a new Provisioning Criteria\n\nMandatory Fields: \ncriteriaName\nprovisioningcriteria\n\nOptional Fields: \nloanProducts","operationId":"createProvisioningCriteria","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostProvisioningCriteriaRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostProvisioningCriteriaResponse"}}}}},"/staff/{staffId}":{"get":{"tags":["Staff"],"summary":"Retrieve a Staff Member","description":"Returns the details of a Staff Member.\n\nExample Requests:\n\nstaff/1","operationId":"retreiveStaff","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"staffId","in":"path","description":"staffId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetStaffResponse"}}}},"put":{"tags":["Staff"],"summary":"Update a Staff Member","description":"Updates the details of a staff member.","operationId":"updateStaff","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"staffId","in":"path","description":"staffId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutStaffRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutStaffResponse"}}}}},"/staff":{"get":{"tags":["Staff"],"summary":"Retrieve Staff","description":"Returns the list of staff members.\n\nExample Requests:\n\nstaff\n\n\n\n\nRetrieve a Staff by status\n\nReturns the details of a Staff based on status.\n\nBy default it Returns all the ACTIVE Staff.\n\nIf status=INACTIVE, then it returns all INACTIVE Staff.\n\nand for status=ALL, it Returns both ACTIVE and INACTIVE Staff.\n\nExample Requests:\n\nstaff?status=active","operationId":"retrieveStaff","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"sqlSearch","in":"query","description":"sqlSearch","required":false,"type":"string"},{"name":"officeId","in":"query","description":"officeId","required":false,"type":"integer","format":"int64"},{"name":"staffInOfficeHierarchy","in":"query","description":"staffInOfficeHierarchy","required":false,"type":"boolean","default":false},{"name":"loanOfficersOnly","in":"query","description":"loanOfficersOnly","required":false,"type":"boolean","default":false},{"name":"status","in":"query","description":"status","required":false,"type":"string","default":"active"}],"responses":{"200":{"description":"GET https://DomainName/api/v1/staff?status={ACTIVE|INACTIVE|ALL}","schema":{"$ref":"#/definitions/GetStaffResponse"}}}},"post":{"tags":["Staff"],"summary":"Create a staff member","description":"Creates a staff member.\n\nMandatory Fields: \nofficeId, firstname, lastname\n\nOptional Fields: \nisLoanOfficer, isActive","operationId":"createStaff","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostStaffRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostStaffResponse"}}}}},"/staff/downloadtemplate":{"get":{"tags":["Staff"],"operationId":"getStaffTemplate","produces":["application/vnd.ms-excel"],"parameters":[{"name":"officeId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"dateFormat","in":"query","required":false,"type":"string"}],"responses":{"default":{"description":"successful operation"}}}},"/staff/uploadtemplate":{"post":{"tags":["Staff"],"operationId":"postStaffTemplate","consumes":["multipart/form-data"],"parameters":[{"name":"file","in":"formData","required":false,"type":"file"},{"name":"locale","in":"formData","required":false,"type":"string"},{"name":"dateFormat","in":"formData","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/cashiers":{"get":{"tags":["cashiers"],"operationId":"getCashierData","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"officeId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"tellerId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"staffId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"date","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/tellers":{"get":{"tags":["Teller Cash Management"],"summary":"List all tellers","description":"Retrieves list tellers","operationId":"getTellerData","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"officeId","in":"query","description":"officeId","required":false,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetTellersResponse"}}}}},"post":{"tags":["Teller Cash Management"],"summary":"Create teller","description":"Mandatory Fields\nTeller name, OfficeId, Description, Start Date, Status\nOptional Fields\nEnd Date","operationId":"createTeller","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostTellersRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostTellersResponse"}}}}},"/tellers/{tellerId}":{"get":{"tags":["Teller Cash Management"],"summary":"Retrieve tellers","description":"","operationId":"findTeller","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetTellersResponse"}}}},"put":{"tags":["Teller Cash Management"],"summary":"Update teller","description":"","operationId":"updateTeller","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutTellersRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutTellersResponse"}}}},"delete":{"tags":["Teller Cash Management"],"operationId":"deleteTeller","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/tellers/{tellerId}/cashiers":{"get":{"tags":["Teller Cash Management"],"summary":"List Cashiers","description":"","operationId":"getCashierData","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"name":"fromdate","in":"query","description":"fromdate","required":false,"type":"string"},{"name":"todate","in":"query","description":"todate","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetTellersTellerIdCashiersResponse"}}}},"post":{"tags":["Teller Cash Management"],"summary":"Create Cashiers","description":"Mandatory Fields: \nCashier/staff, Fromm Date, To Date, Full Day or From time and To time\n\n\n\nOptional Fields: \nDescription/Notes","operationId":"createCashier","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostTellersTellerIdCashiersRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostTellersTellerIdCashiersResponse"}}}}},"/tellers/{tellerId}/cashiers/{cashierId}":{"get":{"tags":["Teller Cash Management"],"summary":"Retrieve a cashier","description":"","operationId":"findCashierData","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"name":"cashierId","in":"path","description":"cashierId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetTellersTellerIdCashiersCashierIdResponse"}}}},"put":{"tags":["Teller Cash Management"],"summary":"Update Cashier","description":"","operationId":"updateCashier","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"name":"cashierId","in":"path","description":"cashierId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutTellersTellerIdCashiersCashierIdRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutTellersTellerIdCashiersCashierIdResponse"}}}},"delete":{"tags":["Teller Cash Management"],"summary":"Delete Cashier","description":"","operationId":"deleteCashier","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"name":"cashierId","in":"path","description":"cashierId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteTellersTellerIdCashiersCashierIdResponse"}}}}},"/tellers/{tellerId}/cashiers/template":{"get":{"tags":["Teller Cash Management"],"summary":"Find Cashiers","description":"","operationId":"getCashierTemplate","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetTellersTellerIdCashiersTemplateResponse"}}}}},"/tellers/{tellerId}/cashiers/{cashierId}/allocate":{"post":{"tags":["Teller Cash Management"],"summary":"Allocate Cash To Cashier","description":"Mandatory Fields: \nDate, Amount, Currency, Notes/Comments","operationId":"allocateCashToCashier","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"name":"cashierId","in":"path","description":"cashierId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostTellersTellerIdCashiersCashierIdAllocateRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostTellersTellerIdCashiersCashierIdAllocateResponse"}}}}},"/tellers/{tellerId}/cashiers/{cashierId}/settle":{"post":{"tags":["Teller Cash Management"],"summary":"Settle Cash From Cashier","description":"Mandatory Fields\nDate, Amount, Currency, Notes/Comments","operationId":"settleCashFromCashier","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"name":"cashierId","in":"path","description":"cashierId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostTellersTellerIdCashiersCashierIdSettleRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostTellersTellerIdCashiersCashierIdSettleResponse"}}}}},"/tellers/{tellerId}/cashiers/{cashierId}/transactions":{"get":{"tags":["Teller Cash Management"],"summary":"Retrieve Cashier Transaction","description":"","operationId":"getTransactionsForCashier","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"name":"cashierId","in":"path","description":"cashierId","required":true,"type":"integer","format":"int64"},{"name":"currencyCode","in":"query","description":"currencyCode","required":false,"type":"string"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","description":"orderBy","required":false,"type":"string"},{"name":"sortOrder","in":"query","description":"sortOrder","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetTellersTellerIdCashiersCashiersIdTransactionsResponse"}}}}}},"/tellers/{tellerId}/cashiers/{cashierId}/summaryandtransactions":{"get":{"tags":["Teller Cash Management"],"summary":"Transactions Wtih Summary For Cashier","description":"","operationId":"getTransactionsWtihSummaryForCashier","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"name":"cashierId","in":"path","description":"cashierId","required":true,"type":"integer","format":"int64"},{"name":"currencyCode","in":"query","description":"currencyCode","required":false,"type":"string"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","description":"orderBy","required":false,"type":"string"},{"name":"sortOrder","in":"query","description":"sortOrder","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetTellersTellerIdCashiersCashiersIdSummaryAndTransactionsResponse"}}}}},"/tellers/{tellerId}/cashiers/{cashierId}/transactions/template":{"get":{"tags":["Teller Cash Management"],"summary":"Retrieve Cashier Transaction Template","description":"","operationId":"getCashierTxnTemplate","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"name":"cashierId","in":"path","description":"cashierId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetTellersTellerIdCashiersCashiersIdTransactionsTemplateResponse"}}}}},"/tellers/{tellerId}/transactions":{"get":{"tags":["Teller Cash Management"],"operationId":"getTransactionData","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"name":"dateRange","in":"query","description":"dateRange","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/tellers/{tellerId}/transactions/{transactionId}":{"get":{"tags":["Teller Cash Management"],"operationId":"findTransactionData","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"name":"transactionId","in":"path","description":"transactionId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/tellers/{tellerId}/journals":{"get":{"tags":["Teller Cash Management"],"operationId":"getJournalData","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"tellerId","in":"path","description":"tellerId","required":true,"type":"integer","format":"int64"},{"name":"cashierId","in":"query","description":"cashierId","required":false,"type":"integer","format":"int64"},{"name":"dateRange","in":"query","description":"dateRange","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/cashiersjournal":{"get":{"tags":["cashiersjournal"],"operationId":"getJournalData","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"officeId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"tellerId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"cashierId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"dateRange","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/workingdays/template":{"get":{"tags":["Working days"],"summary":"Working Days Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for working days.\n\nExample Request:\n\nworkingdays/template","operationId":"template","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetWorkingDaysTemplateResponse"}}}}},"/workingdays":{"get":{"tags":["Working days"],"summary":"List Working days","description":"Example Requests:\n\nworkingdays","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetWorkingDaysResponse"}}}}},"put":{"tags":["Working days"],"summary":"Update a Working Day","description":"Mandatory Fields\nrecurrence,repaymentRescheduleType,extendTermForDailyRepayments,locale","operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutWorkingDaysRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutWorkingDaysResponse"}}}}},"/accounttransfers/{transferId}":{"get":{"tags":["Account Transfers"],"summary":"Retrieve account transfer","description":"Retrieves account transfer\n\nExample Requests :\n\n\n\naccounttransfers/1","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"transferId","in":"path","description":"transferId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetAccountTransfersPageItems"}}}}},"/accounttransfers/templateRefundByTransfer":{"get":{"tags":["Account Transfers"],"summary":"Retrieve Refund of an Active Loan by Transfer Template","description":"Retrieves Refund of an Active Loan by Transfer TemplateExample Requests :\n\n\n\naccounttransfers/templateRefundByTransfer?fromAccountId=2&fromAccountType=1& toAccountId=1&toAccountType=2&toClientId=1&toOfficeId=1","operationId":"templateRefundByTransfer","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"fromOfficeId","in":"query","description":"fromOfficeId","required":false,"type":"integer","format":"int64"},{"name":"fromClientId","in":"query","description":"fromClientId","required":false,"type":"integer","format":"int64"},{"name":"fromAccountId","in":"query","description":"fromAccountId","required":false,"type":"integer","format":"int64"},{"name":"fromAccountType","in":"query","description":"fromAccountType","required":false,"type":"integer","format":"int32"},{"name":"toOfficeId","in":"query","description":"toOfficeId","required":false,"type":"integer","format":"int64"},{"name":"toClientId","in":"query","description":"toClientId","required":false,"type":"integer","format":"int64"},{"name":"toAccountId","in":"query","description":"toAccountId","required":false,"type":"integer","format":"int64"},{"name":"toAccountType","in":"query","description":"toAccountType","required":false,"type":"integer","format":"int32"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetAccountTransfersTemplateRefundByTransferResponse"}}}}},"/accounttransfers/refundByTransfer":{"post":{"tags":["Account Transfers"],"summary":"Refund of an Active Loan by Transfer","description":"Ability to refund an active loan by transferring to a savings account.","operationId":"templateRefundByTransferPost","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostAccountTransfersRefundByTransferRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostAccountTransfersRefundByTransferResponse"}}}}},"/accounttransfers/template":{"get":{"tags":["Account Transfers"],"summary":"Retrieve Account Transfer Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\n\n\nField Defaults\n\nAllowed Value Lists\n\nExample Requests:\n\n\n\naccounttransfers/template?fromAccountType=2&fromOfficeId=1\n\n\n\naccounttransfers/template?fromAccountType=2&fromOfficeId=1&fromClientId=1\n\n\n\naccounttransfers/template?fromClientId=1&fromAccountType=2&fromAccountId=1","operationId":"template","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"fromOfficeId","in":"query","description":"fromOfficeId","required":false,"type":"integer","format":"int64"},{"name":"fromClientId","in":"query","description":"fromClientId","required":false,"type":"integer","format":"int64"},{"name":"fromAccountId","in":"query","description":"fromAccountId","required":false,"type":"integer","format":"int64"},{"name":"fromAccountType","in":"query","description":"fromAccountType","required":false,"type":"integer","format":"int32"},{"name":"toOfficeId","in":"query","description":"toOfficeId","required":false,"type":"integer","format":"int64"},{"name":"toClientId","in":"query","description":"toClientId","required":false,"type":"integer","format":"int64"},{"name":"toAccountId","in":"query","description":"toAccountId","required":false,"type":"integer","format":"int64"},{"name":"toAccountType","in":"query","description":"toAccountType","required":false,"type":"integer","format":"int32"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetAccountTransfersTemplateResponse"}}}}},"/accounttransfers":{"get":{"tags":["Account Transfers"],"summary":"List account transfers","description":"Lists account's transfers\n\nExample Requests:\n\n\n\naccounttransfers","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"sqlSearch","in":"query","description":"sqlSearch","required":false,"type":"string"},{"name":"externalId","in":"query","description":"externalId","required":false,"type":"string"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","required":false,"type":"integer","format":"int32","x-example":"limit"},{"name":"orderBy","in":"query","description":"orderBy","required":false,"type":"string"},{"name":"sortOrder","in":"query","description":"sortOrder","required":false,"type":"string"},{"name":"accountDetailId","in":"query","description":"accountDetailId","required":false,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetAccountTransfersResponse"}}}},"post":{"tags":["Account Transfers"],"summary":"Create new Transfer","description":"Ability to create new transfer of monetary funds from one account to another.","operationId":"create","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostAccountTransfersRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostAccountTransfersResponse"}}}}},"/standinginstructions/{standingInstructionId}":{"get":{"tags":["Standing Instructions"],"summary":"Retrieve Standing Instruction","description":"Example Requests :\n\nstandinginstructions/1","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"standingInstructionId","in":"path","description":"standingInstructionId","required":true,"type":"integer","format":"int64"},{"name":"sqlSearch","in":"query","description":"sqlSearch","required":false,"type":"string"},{"name":"externalId","in":"query","description":"externalId","required":false,"type":"string"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","description":"orderBy","required":false,"type":"string"},{"name":"sortOrder","in":"query","description":"sortOrder","required":false,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetStandingInstructionsStandingInstructionIdResponse"}}}},"put":{"tags":["Standing Instructions"],"summary":"Update Standing Instruction | Delete Standing Instruction","description":"Ability to modify existing instruction for transfer of monetary funds from one account to another.\n\nPUT https://DomainName/api/v1/standinginstructions/1?command=update\n\n\nAbility to modify existing instruction for transfer of monetary funds from one account to another.\n\nPUT https://DomainName/api/v1/standinginstructions/1?command=delete","operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"standingInstructionId","in":"path","description":"standingInstructionId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command","required":false,"type":"string"},{"in":"body","name":"body","description":"body","required":false,"schema":{"$ref":"#/definitions/PutStandingInstructionsStandingInstructionIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PutStandingInstructionsStandingInstructionIdResponse"}}}}},"/standinginstructions/template":{"get":{"tags":["Standing Instructions"],"summary":"Retrieve Standing Instruction Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\nExample Requests:\n\nstandinginstructions/template?fromAccountType=2&fromOfficeId=1\n\nstandinginstructions/template?fromAccountType=2&fromOfficeId=1&fromClientId=1&transferType=1\n\nstandinginstructions/template?fromClientId=1&fromAccountType=2&fromAccountId=1&transferType=1","operationId":"template","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"fromOfficeId","in":"query","description":"fromOfficeId","required":false,"type":"integer","format":"int64"},{"name":"fromClientId","in":"query","description":"fromClientId","required":false,"type":"integer","format":"int64"},{"name":"fromAccountId","in":"query","description":"fromAccountId","required":false,"type":"integer","format":"int64"},{"name":"fromAccountType","in":"query","description":"fromAccountType","required":false,"type":"integer","format":"int32"},{"name":"toOfficeId","in":"query","description":"toOfficeId","required":false,"type":"integer","format":"int64"},{"name":"toClientId","in":"query","description":"toClientId","required":false,"type":"integer","format":"int64"},{"name":"toAccountId","in":"query","description":"toAccountId","required":false,"type":"integer","format":"int64"},{"name":"toAccountType","in":"query","description":"toAccountType","required":false,"type":"integer","format":"int32"},{"name":"transferType","in":"query","description":"transferType","required":false,"type":"integer","format":"int32"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetStandingInstructionsTemplateResponse"}}}}},"/standinginstructions":{"get":{"tags":["Standing Instructions"],"summary":"List Standing Instructions","description":"Example Requests:\n\nstandinginstructions","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"sqlSearch","in":"query","description":"sqlSearch","required":false,"type":"string"},{"name":"externalId","in":"query","description":"externalId","required":false,"type":"string"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","description":"orderBy","required":false,"type":"string"},{"name":"sortOrder","in":"query","description":"sortOrder","required":false,"type":"string"},{"name":"transferType","in":"query","description":"transferType","required":false,"type":"integer","format":"int32"},{"name":"clientName","in":"query","description":"clientName","required":false,"type":"string"},{"name":"clientId","in":"query","description":"clientId","required":false,"type":"integer","format":"int64"},{"name":"fromAccountId","in":"query","description":"fromAccountId","required":false,"type":"integer","format":"int64"},{"name":"fromAccountType","in":"query","description":"fromAccountType","required":false,"type":"integer","format":"int32"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetStandingInstructionsResponse"}}}},"post":{"tags":["Standing Instructions"],"summary":"Create new Standing Instruction","description":"Ability to create new instruction for transfer of monetary funds from one account to another","operationId":"create","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostStandingInstructionsRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostStandingInstructionsResponse"}}}}},"/standinginstructionrunhistory":{"get":{"tags":["Standing Instructions History"],"summary":"Standing Instructions Logged History","description":"The list capability of history can support pagination and sorting \n\nExample Requests :\n\nstandinginstructionrunhistory\n\nstandinginstructionrunhistory?orderBy=name&sortOrder=DESC\n\nstandinginstructionrunhistory?offset=10&limit=50","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"sqlSearch","in":"query","description":"sqlSearch","required":false,"type":"string"},{"name":"externalId","in":"query","description":"externalId","required":false,"type":"string"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","description":"orderBy","required":false,"type":"string"},{"name":"sortOrder","in":"query","description":"sortOrder","required":false,"type":"string"},{"name":"transferType","in":"query","description":"transferType","required":false,"type":"integer","format":"int32"},{"name":"clientName","in":"query","description":"clientName","required":false,"type":"string"},{"name":"clientId","in":"query","description":"clientId","required":false,"type":"integer","format":"int64"},{"name":"fromAccountId","in":"query","description":"fromAccountId","required":false,"type":"integer","format":"int64"},{"name":"fromAccountType","in":"query","description":"fromAccountType","required":false,"type":"integer","format":"int32"},{"name":"locale","in":"query","description":"locale","required":false,"type":"string"},{"name":"dateFormat","in":"query","description":"dateFormat","required":false,"type":"string"},{"name":"fromDate","in":"query","description":"fromDate","required":false,"type":"string"},{"name":"toDate","in":"query","description":"toDate","required":false,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetStandingInstructionRunHistoryResponse"}}}}},"/accounts/{type}":{"get":{"tags":["Share Account"],"summary":"List share applications/accounts","description":"Lists share applications/accounts\n\nExample Requests:\n\nshareaccount","operationId":"retrieveAllAccounts","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"type","in":"path","description":"type","required":true,"type":"string"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetAccountsTypeResponse"}}}},"post":{"tags":["Share Account"],"summary":"Submit new share application","description":"Submits new share application\n\nMandatory Fields: clientId, productId, submittedDate, savingsAccountId, requestedShares, applicationDate\n\nOptional Fields: accountNo, externalId\n\nInherited from Product (if not provided): minimumActivePeriod, minimumActivePeriodFrequencyType, lockinPeriodFrequency, lockinPeriodFrequencyType","operationId":"createAccount","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"type","in":"path","description":"type","required":true,"type":"string"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostAccountsTypeRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostAccountsTypeResponse"}}}}},"/accounts/{type}/{accountId}":{"get":{"tags":["Share Account"],"summary":"Retrieve a share application/account","description":"Retrieves a share application/account\n\nExample Requests :\n\nshareaccount/1","operationId":"retrieveAccount","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountId","in":"path","description":"accountId","required":true,"type":"integer","format":"int64"},{"name":"type","in":"path","description":"type","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetAccountsTypeAccountIdResponse"}}}},"post":{"tags":["Share Account"],"summary":"Approve share application | Undo approval share application | Reject share application | Activate a share account | Close a share account | Apply additional shares on a share account | Approve additional shares request on a share account | Reject additional shares request on a share account | Redeem shares on a share account","description":"Approve share application:\n\nApproves share application so long as its in 'Submitted and pending approval' state.\n\nUndo approval share application:\n\nWill move 'approved' share application back to 'Submitted and pending approval' state.\n\nReject share application:\n\nRejects share application so long as its in 'Submitted and pending approval' state.\n\nActivate a share account:\n\nResults in an approved share application being converted into an 'active' share account.\n\nClose a share account:\n\nResults in an Activated share application being converted into an 'closed' share account.\n\nclosedDate is closure date of share account\n\nMandatory Fields: dateFormat,locale,closedDate\n\nApply additional shares on a share account:\n\nrequestedDate is requsted date of share purchase\n\nrequestedShares is number of shares to be purchase\n\nMandatory Fields: dateFormat,locale,requestedDate, requestedShares\n\nApprove additional shares request on a share account\n\nrequestedShares is Share purchase transaction ids\n\nMandatory Fields: requestedShares\n\nReject additional shares request on a share account:\n\nrequestedShares is Share purchase transaction ids\n\nMandatory Fields: requestedShares\n\nRedeem shares on a share account:\n\nResults redeem some/all shares from share account.\n\nrequestedDate is requsted date of shares redeem\n\nrequestedShares is number of shares to be redeemed\n\nMandatory Fields: dateFormat,locale,requestedDate,requestedShares\n\nShowing request/response for 'Reject additional shares request on a share account'\n\nFor more info visit this link - https://demo.openmf.org/api-docs/apiLive.htm#shareaccounts","operationId":"handleCommands","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"type","in":"path","description":"type","required":true,"type":"string"},{"name":"accountId","in":"path","description":"accountId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command","required":false,"type":"string"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostAccountsTypeAccountIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostAccountsTypeAccountIdResponse"}}}},"put":{"tags":["Share Account"],"summary":"Modify a share application","description":"Share application can only be modified when in 'Submitted and pending approval' state. Once the application is approved, the details cannot be changed using this method. Specific api endpoints will be created to allow change of interest detail such as rate, compounding period, posting period etc","operationId":"updateAccount","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"type","in":"path","description":"type","required":true,"type":"string"},{"name":"accountId","in":"path","description":"accountId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutAccountsTypeAccountIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PutAccountsTypeAccountIdResponse"}}}}},"/accounts/{type}/downloadtemplate":{"get":{"tags":["Share Account"],"operationId":"getSharedAccountsTemplate","produces":["application/vnd.ms-excel"],"parameters":[{"name":"officeId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"dateFormat","in":"query","required":false,"type":"string"}],"responses":{"default":{"description":"successful operation"}}}},"/accounts/{type}/uploadtemplate":{"post":{"tags":["Share Account"],"operationId":"postSharedAccountsTemplate","consumes":["multipart/form-data"],"parameters":[{"name":"file","in":"formData","required":false,"type":"file"},{"name":"locale","in":"formData","required":false,"type":"string"},{"name":"dateFormat","in":"formData","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/accounts/{type}/template":{"get":{"tags":["Share Account"],"summary":"Retrieve Share Account Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\n\nExample Requests:\n\naccounts/share/template?clientId=1\n\n\naccounts/share/template?clientId=1&productId=1","operationId":"template","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"type","in":"path","description":"type","required":true,"type":"string"},{"name":"clientId","in":"query","description":"clientId","required":false,"type":"integer","format":"int64"},{"name":"productId","in":"query","description":"productId","required":false,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetAccountsTypeTemplateResponse"}}}}},"/fieldconfiguration/{entity}":{"get":{"tags":["Entity Field Configuration"],"summary":"Retrieves the Entity Field Configuration","description":"It retrieves all the Entity Field Configuration","operationId":"getAddresses","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"entity","in":"path","description":"entity","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/GetFieldConfigurationEntityResponse"}}}}}},"/charges/{chargeId}":{"get":{"tags":["Charges"],"summary":"Retrieve a Charge","description":"Returns the details of a defined Charge.\n\nExample Requests:\n\ncharges/1","operationId":"retrieveCharge","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"chargeId","in":"path","description":"chargeId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetChargesResponse"}}}},"put":{"tags":["Charges"],"summary":"Update a Charge","description":"Updates the details of a Charge.","operationId":"updateCharge","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"chargeId","in":"path","description":"chargeId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutChargesChargeIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PutChargesChargeIdResponse"}}}},"delete":{"tags":["Charges"],"summary":"Delete a Charge","description":"Deletes a Charge.","operationId":"deleteCharge","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"chargeId","in":"path","description":"chargeId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/DeleteChargesChargeIdResponse"}}}}},"/charges":{"get":{"tags":["Charges"],"summary":"Retrieve Charges","description":"Returns the list of defined charges.\n\nExample Requests:\n\ncharges","operationId":"retrieveAllCharges","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/GetChargesResponse"}}}}},"post":{"tags":["Charges"],"summary":"Create/Define a Charge","description":"Define a new charge that can later be associated with loans and savings through their respective product definitions or directly on each account instance.","operationId":"createCharge","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostChargesRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostChargesResponse"}}}}},"/charges/template":{"get":{"tags":["Charges"],"summary":"Retrieve Charge Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\nExample Request:\n\ncharges/template\n","operationId":"retrieveNewChargeDetails","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetChargesTemplateResponse"}}}}},"/client/{clientid}/addresses":{"get":{"tags":["Clients Address"],"summary":"List all addresses for a Client","description":"Example Requests:\n\nclient/1/addresses\n\n\nclients/1/addresses?status=false,true&&type=1,2,3","operationId":"getAddresses","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"status","in":"query","description":"status","required":false,"type":"string"},{"name":"type","in":"query","description":"type","required":false,"type":"integer","format":"int64"},{"name":"clientid","in":"path","description":"clientId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/GetClientClientIdAddressesResponse"}}}}},"post":{"tags":["Clients Address"],"summary":"Create an address for a Client","description":"Mandatory Fields : \ntype and clientId","operationId":"AddClientAddress","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"type","in":"query","description":"type","required":false,"type":"integer","format":"int64"},{"name":"clientid","in":"path","description":"clientId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostClientClientIdAddressesRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostClientClientIdAddressesResponse"}}}},"put":{"tags":["Clients Address"],"summary":"Update an address for a Client","description":"All the address fields can be updated by using update client address API\n\nMandatory Fields\ntype and addressId","operationId":"UpdateClientAddress","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientid","in":"path","description":"clientId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutClientClientIdAddressesRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PutClientClientIdAddressesResponse"}}}}},"/client/addresses/template":{"get":{"tags":["Clients Address"],"operationId":"getAddressesTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/clients/{clientId}/charges/template":{"get":{"tags":["Client Charges"],"operationId":"retrieveTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/clients/{clientId}/charges":{"get":{"tags":["Client Charges"],"summary":"List Client Charges","description":"The list capability of client charges supports pagination.Example Requests:\nclients/1/charges\n\nclients/1/charges?offset=0&limit=5","operationId":"retrieveAllClientCharges","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","description":"clientId","required":true,"type":"integer","format":"int64"},{"name":"chargeStatus","in":"query","description":"chargeStatus","required":false,"type":"string","default":"all"},{"name":"pendingPayment","in":"query","description":"pendingPayment","required":false,"type":"boolean"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetClientsClientIdChargesResponse"}}}},"post":{"tags":["Client Charges"],"summary":"Add Client Charge","description":" This API associates a Client charge with an implicit Client account\nMandatory Fields : \nchargeId and dueDate \nOptional Fields : \namount","operationId":"applyClientCharge","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","description":"clientId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostClientsClientIdChargesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostClientsClientIdChargesResponse"}}}}},"/clients/{clientId}/charges/{chargeId}":{"get":{"tags":["Client Charges"],"summary":"Retrieve a Client Charge","description":"Example Requests:\nclients/1/charges/1\n\n\nclients/1/charges/1?fields=name,id","operationId":"retrieveClientCharge","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","description":"clientId","required":true,"type":"integer","format":"int64"},{"name":"chargeId","in":"path","description":"chargeId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetClientsChargesPageItems"}}}},"post":{"tags":["Client Charges"],"summary":"Pay a Client Charge | Waive a Client Charge","description":"Pay a Client Charge:\n\nMandatory Fields:transactionDate and amount \"Pay either a part of or the entire due amount for a charge.(command=paycharge)\n\nWaive a Client Charge:\n\n\nThis API provides the facility of waiving off the remaining amount on a client charge (command=waive)\n\nShowing request/response for 'Pay a Client Charge'","operationId":"payOrWaiveClientCharge","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","description":"clientId","required":true,"type":"integer","format":"int64"},{"name":"chargeId","in":"path","description":"chargeId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command","required":false,"type":"string"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostClientsClientIdChargesChargeIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostClientsClientIdChargesChargeIdResponse"}}}},"delete":{"tags":["Client Charges"],"summary":"Delete a Client Charge","description":"Deletes a Client Charge on which no transactions have taken place (either payments or waivers). ","operationId":"deleteClientCharge","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","description":"clientId","required":true,"type":"integer","format":"int64"},{"name":"chargeId","in":"path","description":"chargeId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/DeleteClientsClientIdChargesChargeIdResponse"}}}}},"/clients/{clientId}/identifiers":{"get":{"tags":["Client Identifier"],"summary":"List all Identifiers for a Client","description":"Example Requests:\nclients/1/identifiers\n\n\nclients/1/identifiers?fields=documentKey,documentType,description","operationId":"retrieveAllClientIdentifiers","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","description":"clientId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/GetClientsClientIdIdentifiersResponse"}}}}},"post":{"tags":["Client Identifier"],"summary":"Create an Identifier for a Client","description":"Mandatory Fields\ndocumentKey, documentTypeId ","operationId":"createClientIdentifier","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","description":"clientId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostClientsClientIdIdentifiersRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostClientsClientIdIdentifiersResponse"}}}}},"/clients/{clientId}/identifiers/{identifierId}":{"get":{"tags":["Client Identifier"],"summary":"Retrieve a Client Identifier","description":"Example Requests:\nclients/1/identifier/2\n\n\nclients/1/identifier/2?template=true\n\nclients/1/identifiers/2?fields=documentKey,documentType,description","operationId":"retrieveClientIdentifiers","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","description":"clientId","required":true,"type":"integer","format":"int64"},{"name":"identifierId","in":"path","description":"identifierId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetClientsClientIdIdentifiersResponse"}}}},"put":{"tags":["Client Identifier"],"summary":"Update a Client Identifier","description":"Updates a Client Identifier","operationId":"updateClientIdentifer","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","description":"clientId","required":true,"type":"integer","format":"int64"},{"name":"identifierId","in":"path","description":"identifierId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutClientsClientIdIdentifiersIdentifierIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PutClientsClientIdIdentifiersIdentifierIdResponse"}}}},"delete":{"tags":["Client Identifier"],"summary":"Delete a Client Identifier","description":"Deletes a Client Identifier","operationId":"deleteClientIdentifier","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","description":"clientId","required":true,"type":"integer","format":"int64"},{"name":"identifierId","in":"path","description":"identifierId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/DeleteClientsClientIdIdentifiersIdentifierIdResponse"}}}}},"/clients/{clientId}/identifiers/template":{"get":{"tags":["Client Identifier"],"summary":"Retrieve Client Identifier Details Template","description":"This is a convenience resource useful for building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\n Field Defaults\n Allowed Value Lists\n\n\nExample Request:\nclients/1/identifiers/template","operationId":"newClientIdentifierDetails","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetClientsClientIdIdentifiersTemplateResponse"}}}}},"/clients/{clientId}/transactions":{"get":{"tags":["Client Transaction"],"summary":"List Client Transactions","description":"The list capability of client transaction can support pagination.\n\nExample Requests:\n\nclients/189/transactions\n\nclients/189/transactions?offset=10&limit=50","operationId":"retrieveAllClientTransactions","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","description":"clientId","required":true,"type":"integer","format":"int64"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetClientsClientIdTransactionsResponse"}}}}},"/clients/{clientId}/transactions/{transactionId}":{"get":{"tags":["Client Transaction"],"summary":"Retrieve a Client Transaction","description":"Example Requests:\nclients/1/transactions/1\n\n\nclients/1/transactions/1?fields=id,officeName","operationId":"retrieveClientTransaction","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","description":"clientId","required":true,"type":"integer","format":"int64"},{"name":"transactionId","in":"path","description":"transactionId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetClientsClientIdTransactionsTransactionIdResponse"}}}},"post":{"tags":["Client Transaction"],"summary":"Undo a Client Transaction","description":"Undoes a Client Transaction","operationId":"undoClientTransaction","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","description":"clientId","required":true,"type":"integer","format":"int64"},{"name":"transactionId","in":"path","description":"transactionId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command","required":false,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostClientsClientIdTransactionsTransactionIdResponse"}}}}},"/clients/{clientId}":{"get":{"tags":["Client"],"summary":"Retrieve a Client","description":"Example Requests:\n\nclients/1\n\n\nclients/1?template=true\n\n\nclients/1?fields=id,displayName,officeName","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","description":"clientId","required":true,"type":"integer","format":"int64"},{"name":"staffInSelectedOfficeOnly","in":"query","description":"staffInSelectedOfficeOnly","required":false,"type":"boolean","default":false}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetClientsClientIdResponse"}}}},"post":{"tags":["Client"],"summary":"Activate a Client | Close a Client | Reject a Client | Withdraw a Client | Reactivate a Client | UndoReject a Client | UndoWithdraw a Client | Assign a Staff | Unassign a Staff | Update Default Savings Account | Propose a Client Transfer | Withdraw a Client Transfer | Reject a Client Transfer | Accept a Client Transfer | Propose and Accept a Client Transfer","description":"Activate a Client:\n\nClients can be created in a Pending state. This API exists to enable client activation (for when a client becomes an approved member of the financial Institution).\n\nIf the client happens to be already active this API will result in an error.\n\nClose a Client:\n\nClients can be closed if they do not have any non-closed loans/savingsAccount. This API exists to close a client .\n\nIf the client have any active loans/savingsAccount this API will result in an error.\n\nReject a Client:\n\nClients can be rejected when client is in pending for activation status.\n\nIf the client is any other status, this API throws an error.\n\nMandatory Fields: rejectionDate, rejectionReasonId\n\nWithdraw a Client:\n\nClient applications can be withdrawn when client is in a pending for activation status.\n\nIf the client is any other status, this API throws an error.\n\nMandatory Fields: withdrawalDate, withdrawalReasonId\n\nReactivate a Client: Clients can be reactivated after they have been closed.\n\nTrying to reactivate a client in any other state throws an error.\n\nMandatory Fields: reactivationDate\n\nUndoReject a Client:\n\nClients can be reactivated after they have been rejected.\n\nTrying to reactivate a client in any other state throws an error.\n\nMandatory Fields: reopenedDateUndoWithdraw a Client:\n\nClients can be reactivated after they have been withdrawn.\n\nTrying to reactivate a client in any other state throws an error.\n\nMandatory Fields: reopenedDate\n\nAssign a Staff:\n\nAllows you to assign a Staff for existed Client.\n\nThe selected Staff should belong to the same office (or an officer higher up in the hierarchy) as the Client he manages.\n\nUnassign a Staff:\n\nAllows you to unassign the Staff assigned to a Client.\n\nUpdate Default Savings Account:\n\nAllows you to modify or assign a default savings account for an existing Client.\n\nThe selected savings account should be one among the existing savings account for a particular customer.\n\nPropose a Client Transfer:\n\nAllows you to propose the transfer of a Client to a different Office.\n\nWithdraw a Client Transfer:\n\nAllows you to withdraw the proposed transfer of a Client to a different Office.\n\nWithdrawal can happen only if the destination Branch (to which the transfer was proposed) has not already accepted the transfer proposal\n\nReject a Client Transfer:\n\nAllows the Destination Branch to reject the proposed Client Transfer.\n\nAccept a Client Transfer:\n\nAllows the Destination Branch to accept the proposed Client Transfer.\n\nThe destination branch may also choose to link this client to a group (in which case, any existing active JLG loan of the client is rescheduled to match the meeting frequency of the group) and loan Officer at the time of accepting the transfer\n\nPropose and Accept a Client Transfer:\n\nAbstraction over the Propose and Accept Client Transfer API's which enable a user with Data Scope over both the Target and Destination Branches to directly transfer a Client to the destination Office.\n\nShowing request/response for 'Reject a Client Transfer'","operationId":"activate","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","description":"clientId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command","required":false,"type":"string"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostClientsClientIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostClientsClientIdResponse"}}}},"put":{"tags":["Client"],"summary":"Update a Client","description":"Note: You can update any of the basic attributes of a client (but not its associations) using this API.\n\nChanging the relationship between a client and its office is not supported through this API. An API specific to handling transfers of clients between offices is available for the same.\n\nThe relationship between a client and a group must be removed through the Groups API.","operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","description":"clientId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/PutClientsClientIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PutClientsClientIdResponse"}}}},"delete":{"tags":["Client"],"summary":"Delete a Client","description":"If a client is in Pending state, you are allowed to Delete it. The delete is a 'hard delete' and cannot be recovered from. Once clients become active or have loans or savings associated with them, you cannot delete the client but you may Close the client if they have left the program.","operationId":"delete","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","description":"clientId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/DeleteClientsClientIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/DeleteClientsClientIdResponse"}}}}},"/clients/template":{"get":{"tags":["Client"],"summary":"Retrieve Client Details Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\n\nExample Request:\n\nclients/template","operationId":"retrieveTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"officeId","in":"query","description":"officeId","required":false,"type":"integer","format":"int64"},{"name":"commandParam","in":"query","description":"commandParam","required":false,"type":"string"},{"name":"staffInSelectedOfficeOnly","in":"query","description":"staffInSelectedOfficeOnly","required":false,"type":"boolean","default":false}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetClientsTemplateResponse"}}}}},"/clients/{clientId}/accounts":{"get":{"tags":["Client"],"summary":"Retrieve client accounts overview","description":"An example of how a loan portfolio summary can be provided. This is requested in a specific use case of the community application.\nIt is quite reasonable to add resources like this to simplify User Interface development.\n\nExample Requests:\n \nclients/1/accounts\n\nclients/1/accounts?fields=loanAccounts,savingsAccounts","operationId":"retrieveAssociatedAccounts","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","description":"clientId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetClientsClientIdAccountsResponse"}},"400":{"description":"Bad Request"}}}},"/clients/downloadtemplate":{"get":{"tags":["Client"],"operationId":"getClientTemplate","produces":["application/vnd.ms-excel"],"parameters":[{"name":"legalFormType","in":"query","required":false,"type":"string"},{"name":"officeId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"staffId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"dateFormat","in":"query","required":false,"type":"string"}],"responses":{"default":{"description":"successful operation"}}}},"/clients/uploadtemplate":{"post":{"tags":["Client"],"operationId":"postClientTemplate","consumes":["multipart/form-data"],"parameters":[{"name":"legalFormType","in":"query","required":false,"type":"string"},{"name":"file","in":"formData","required":false,"type":"file"},{"name":"locale","in":"formData","required":false,"type":"string"},{"name":"dateFormat","in":"formData","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/clients/{clientId}/obligeedetails":{"get":{"tags":["Client"],"operationId":"retrieveObligeeDetails","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/clients":{"get":{"tags":["Client"],"summary":"List Clients","description":"The list capability of clients can support pagination and sorting.\n\nExample Requests:\n\nclients\n\nclients?fields=displayName,officeName,timeline\n\nclients?offset=10&limit=50\n\nclients?orderBy=displayName&sortOrder=DESC","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"sqlSearch","in":"query","description":"sqlSearch","required":false,"type":"string"},{"name":"officeId","in":"query","description":"officeId","required":false,"type":"integer","format":"int64"},{"name":"externalId","in":"query","description":"externalId","required":false,"type":"string"},{"name":"displayName","in":"query","description":"displayName","required":false,"type":"string"},{"name":"firstName","in":"query","description":"firstName","required":false,"type":"string"},{"name":"lastName","in":"query","description":"lastName","required":false,"type":"string"},{"name":"underHierarchy","in":"query","description":"underHierarchy","required":false,"type":"string"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","description":"orderBy","required":false,"type":"string"},{"name":"sortOrder","in":"query","description":"sortOrder","required":false,"type":"string"},{"name":"orphansOnly","in":"query","description":"orphansOnly","required":false,"type":"boolean"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetClientsResponse"}}}},"post":{"tags":["Client"],"summary":"Create a Client","description":"Note:\n\n1. You can enter either:firstname/middlename/lastname - for a person (middlename is optional) OR fullname - for a business or organisation (or person known by one name).\n\n2.If address is enable(enable-address=true), then additional field called address has to be passed.\n\nMandatory Fields: firstname and lastname OR fullname, officeId, active=true and activationDate OR active=false, if(address enabled) address\n\nOptional Fields: groupId, externalId, accountNo, staffId, mobileNo, savingsProductId, genderId, clientTypeId, clientClassificationId","operationId":"create","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","required":true,"schema":{"$ref":"#/definitions/PostClientsRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostClientsResponse"}}}}},"/loans/{loanId}/collaterals/template":{"get":{"tags":["Loan Collateral"],"summary":"Retrieve Collateral Details Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\nExample Request:\n\nloans/1/collaterals/template","operationId":"newCollateralTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetLoansLoanIdCollateralsTemplateResponse"}}}}},"/loans/{loanId}/collaterals":{"get":{"tags":["Loan Collateral"],"summary":"List Loan Collaterals","description":"Example Requests:\n\nloans/1/collaterals\n\n\nloans/1/collaterals?fields=value,description","operationId":"retrieveCollateralDetails","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"loanId","in":"path","description":"loanId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/GetLoansLoanIdCollateralsResponse"}}}}},"post":{"tags":["Loan Collateral"],"summary":"Create a Collateral","description":"Note: Currently, Collaterals may be added only before a Loan is approved","operationId":"createCollateral","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"loanId","in":"path","description":"loanId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostLoansLoanIdCollateralsRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostLoansLoanIdCollateralsResponse"}}}}},"/loans/{loanId}/collaterals/{collateralId}":{"get":{"tags":["Loan Collateral"],"summary":"Retrieve a Collateral","description":"Example Requests:\n\n/loans/1/collaterals/1\n\n\n/loans/1/collaterals/1?fields=value,description","operationId":"retrieveCollateralDetails","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"loanId","in":"path","description":"loanId","required":true,"type":"integer","format":"int64"},{"name":"collateralId","in":"path","description":"collateralId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetLoansLoanIdCollateralsResponse"}}}},"put":{"tags":["Loan Collateral"],"summary":"Update a Collateral","description":"","operationId":"updateCollateral","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"loanId","in":"path","description":"loanId","required":true,"type":"integer","format":"int64"},{"name":"collateralId","in":"path","description":"collateralId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutLoansLoandIdCollateralsCollateralIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PutLoansLoanIdCollateralsCollateralIdResponse"}}}},"delete":{"tags":["Loan Collateral"],"summary":"Remove a Collateral","description":"Note: A collateral can only be removed from Loans that are not yet approved.","operationId":"deleteCollateral","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"loanId","in":"path","description":"loanId","required":true,"type":"integer","format":"int64"},{"name":"collateralId","in":"path","description":"collateralId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/DeleteLoansLoanIdCollateralsCollateralIdResponse"}}}}},"/collectionsheet":{"post":{"tags":["Collection Sheet"],"summary":"Generate Individual Collection Sheet | Save Collection Sheet","description":"Generate Individual Collection Sheet:\n\nThis Api retrieves repayment details of all individual loans under a office as on a specified meeting date.\n\nSave Collection Sheet:\n\nThis Api allows the loan officer to perform bulk repayments of individual loans and deposit of mandatory savings on a given meeting date.","operationId":"generateCollectionSheet","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"command","in":"query","description":"command","required":false,"type":"string"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostCollectionSheetRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostCollectionSheetResponse"}}}}},"/floatingrates/{floatingRateId}":{"get":{"tags":["Floating Rates"],"summary":"Retrieve Floating Rate","description":"Retrieves Floating Rate","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"floatingRateId","in":"path","description":"floatingRateId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetFloatingRatesFloatingRateIdResponse"}}}},"put":{"tags":["Floating Rates"],"summary":"Update Floating Rate","description":"Updates new Floating Rate. Rate Periods in the past cannot be modified. All the future rateperiods would be replaced with the new ratePeriods data sent.","operationId":"updateFloatingRate","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"floatingRateId","in":"path","description":"floatingRateId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutFloatingRatesFloatingRateIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PutFloatingRatesFloatingRateIdResponse"}}}}},"/floatingrates":{"get":{"tags":["Floating Rates"],"summary":"List Floating Rates","description":"Lists Floating Rates","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/GetFloatingRatesResponse"}}}}},"post":{"tags":["Floating Rates"],"summary":"Create a new Floating Rate","description":"Creates a new Floating Rate\nMandatory Fields: name\nOptional Fields: isBaseLendingRate, isActive, ratePeriods","operationId":"createFloatingRate","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostFloatingRatesRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostFloatingRatesResponse"}}}}},"/funds/{fundId}":{"get":{"tags":["Funds"],"summary":"Retrieve a Fund","description":"Returns the details of a Fund.\n\nExample Requests:\n\nfunds/1","operationId":"retreiveFund","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"fundId","in":"path","description":"fundId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetFundsResponse"}}}},"put":{"tags":["Funds"],"summary":"Update a Fund","description":"Updates the details of a fund.","operationId":"updateFund","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"fundId","in":"path","description":"fundId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutFundsFundIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PutFundsFundIdResponse"}}}}},"/funds":{"get":{"tags":["Funds"],"summary":"Retrieve Funds","description":"Returns the list of funds.\n\nExample Requests:\n\nfunds","operationId":"retrieveFunds","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/GetFundsResponse"}}}}},"post":{"tags":["Funds"],"summary":"Create a Fund","description":"Creates a Fund","operationId":"createFund","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostFundsRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostFundsResponse"}}}}},"/centers/{centerId}":{"get":{"tags":["Centers"],"summary":"Retrieve a Center","description":"Retrieves a Center\n\nExample Requests:\n\n\n\ncenters/1\n\n\n\ncenters/1?associations=groupMembers","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"centerId","in":"path","description":"centerId","required":true,"type":"integer","format":"int64"},{"name":"staffInSelectedOfficeOnly","in":"query","description":"staffInSelectedOfficeOnly","required":false,"type":"boolean","default":false}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetCentersCenterIdResponse"}}}},"post":{"tags":["Centers"],"summary":"Activate a Center | Generate Collection Sheet | Save Collection Sheet | Close a Center | Associate Groups | Disassociate Groups","description":"Activate a Center:\n\nCenters can be created in a Pending state. This API exists to enable center activation. If the center happens to be already active, this API will result in an error.\n\nClose a Center:\n\nCenters can be closed if they don't have any non-closed groups or saving accounts. If the Center has any active groups or savings accounts, this API will result in an error.\n\nAssociate Groups:\n\nThis API allows associating existing groups to a center. The groups are listed from the office to which the center is associated. If group(s) is already associated with a center, this API will result in an error.\n\nDisassociate Groups:\n\nThis API allows to disassociate groups from a center.\n\nGenerate Collection Sheet:\n\nThis Api retrieves repayment details of all jlg loans under a center as on a specified meeting date.\n\nSave Collection Sheet:\n\nThis Api allows the loan officer to perform bulk repayments of JLG loans for a center on a given meeting date.\n\nShowing Request/Response for Close a Center","operationId":"activate","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"centerId","in":"path","description":"centerId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command","required":false,"type":"string"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostCentersCenterIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostCentersCenterIdResponse"}}}},"put":{"tags":["Centers"],"summary":"Update a Center","description":"Updates a Center","operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"centerId","in":"path","description":"centerId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutCentersCenterIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PutCentersCenterIdResponse"}}}},"delete":{"tags":["Centers"],"summary":"Delete a Center","description":"A Center can be deleted if it is in pending state and has no association - groups, loans or savings","operationId":"delete","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"centerId","in":"path","description":"centerId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/DeleteCentersCenterIdResponse"}}}}},"/centers/template":{"get":{"tags":["Centers"],"summary":"Retrieve a Center Template","description":"Retrieves a Center Template\n\nExample Requests:\n\n\n\ncenters/template\n\n\n\ncenters/template?officeId=2","operationId":"retrieveTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"command","in":"query","description":"command","required":false,"type":"string"},{"name":"officeId","in":"query","description":"officeId","required":false,"type":"integer","format":"int64"},{"name":"staffInSelectedOfficeOnly","in":"query","description":"staffInSelectedOfficeOnly","required":false,"type":"boolean","default":false}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetCentersTemplateResponse"}}}}},"/centers/{centerId}/accounts":{"get":{"tags":["Centers"],"summary":"Retrieve Center accounts overview","description":"An example of how a savings summary for a Center can be provided. This is requested in a specific use case of the reference application.\n\nIt is quite reasonable to add resources like this to simplify User Interface development.\n\n\n\nExample Requests:\n\n\n\ncenters/9/accounts","operationId":"retrieveGroupAccount","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"centerId","in":"path","description":"centerId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetCentersCenterIdAccountsResponse"}}}}},"/centers/downloadtemplate":{"get":{"tags":["Centers"],"operationId":"getCentersTemplate","produces":["application/vnd.ms-excel"],"parameters":[{"name":"officeId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"staffId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"dateFormat","in":"query","required":false,"type":"string"}],"responses":{"default":{"description":"successful operation"}}}},"/centers/uploadtemplate":{"post":{"tags":["Centers"],"operationId":"postCentersTemplate","consumes":["multipart/form-data"],"parameters":[{"name":"file","in":"formData","required":false,"type":"file"},{"name":"locale","in":"formData","required":false,"type":"string"},{"name":"dateFormat","in":"formData","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/centers":{"get":{"tags":["Centers"],"summary":"List Centers","description":"The default implementation supports pagination and sorting with the default pagination size set to 200 records. The parameter limit with value -1 will return all entries.\n\nExample Requests:\n\n\n\ncenters\n\n\n\ncenters?fields=name,officeName,joinedDate\n\n\n\ncenters?offset=10&limit=50\n\n\n\ncenters?orderBy=name&sortOrder=DESC","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"sqlSearch","in":"query","description":"sqlSearch","required":false,"type":"string"},{"name":"officeId","in":"query","description":"officeId","required":false,"type":"integer","format":"int64"},{"name":"staffId","in":"query","description":"staffId","required":false,"type":"integer","format":"int64"},{"name":"externalId","in":"query","description":"externalId","required":false,"type":"string"},{"name":"name","in":"query","description":"name","required":false,"type":"string"},{"name":"underHierarchy","in":"query","description":"underHierarchy","required":false,"type":"string"},{"name":"paged","in":"query","description":"paged","required":false,"type":"boolean"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","description":"orderBy","required":false,"type":"string"},{"name":"sortOrder","in":"query","description":"sortOrder","required":false,"type":"string"},{"name":"meetingDate","in":"query","description":"meetingDate","required":false,"type":"string"},{"name":"dateFormat","in":"query","description":"dateFormat","required":false,"type":"string"},{"name":"locale","in":"query","description":"locale","required":false,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetCentersResponse"}}}},"post":{"tags":["Centers"],"summary":"Create a Center","description":"Creates a Center\n\nMandatory Fields: name, officeId, active, activationDate (if active=true)\n\nOptional Fields: externalId, staffId, groupMembers","operationId":"create","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostCentersRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostCentersResponse"}}}}},"/groups/{groupId}":{"get":{"tags":["Groups"],"summary":"Retrieve a Group","description":"Retrieve group information.\n\nExample Requests:\n\n\n\ngroups/1\n\n\n\ngroups/1?associations=clientMembers","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"groupId","in":"path","description":"groupId","required":true,"type":"integer","format":"int64"},{"name":"staffInSelectedOfficeOnly","in":"query","description":"staffInSelectedOfficeOnly","required":false,"type":"boolean","default":false},{"name":"roleId","in":"query","description":"roleId","required":false,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetGroupsGroupIdResponse"}}}},"post":{"tags":["Groups"],"summary":"Activate a Group | Associate Clients | Disassociate Clients | Transfer Clients across groups | Generate Collection Sheet | Save Collection Sheet | Unassign a Staff | Assign a Staff | Close a Group | Unassign a Role | Update a Role","description":"Activate a Group:\n\nGroups can be created in a Pending state. This API exists to enable group activation.\n\n\n\nIf the group happens to be already active this API will result in an error.\n\nMandatory Fields: activationDate\n\nAssociate Clients:\n\nThis API allows to associate existing clients to a group.\n\n\n\nThe clients are listed from the office to which the group is associated.\n\n\n\nIf client(s) is already associated with group then API will result in an error.\n\nMandatory Fields: clientMembers\n\nDisassociate Clients:\n\nThis API allows to disassociate clients from a group.\n\n\n\nDisassociating a client with active joint liability group loans results in an error.\n\nMandatory Fields: clientMembers\n\nTransfer Clients across groups:\n\nThis API allows to transfer clients from one group to another\n\nMandatory Fields: destinationGroupId and clients\n\nOptional Fields: inheritDestinationGroupLoanOfficer (defaults to true) and transferActiveLoans (defaults to true)\n\nGenerate Collection Sheet:\n\nThis API retrieves repayment details of all jlg loans of all members of a group on a specified meeting date.\n\nMandatory Fields: calendarId and transactionDate\n\nSave Collection Sheet:\n\nThis api allows the loan officer to perform bulk repayments of JLG loans for a group on its meeting date.\n\nMandatory Fields: calendarId, transactionDate, actualDisbursementDate\n\nOptional Fields: clientsAttendance, bulkRepaymentTransaction, bulkDisbursementTransactions\n\nUnassign a Staff:\n\nAllows you to unassign the Staff.\n\nMandatory Fields: staffId\n\nAssign a Staff:\n\nAllows you to assign Staff to an existing Group.\n\n\n\nThe selected Staff should be belong to the same office (or an office higher up in the hierarchy) as this groupMandatory Fields: staffId\n\nOptional Fields: inheritStaffForClientAccounts (Optional: Boolean if true all members of the group (i.e all clients with active loans and savings ) will inherit the staffId)\n\nClose a Group:\n\nThis API exists to close a group. Groups can be closed if they don't have any non-closed clients/loans/savingsAccounts.\n\n\n\nIf the group has any active clients/loans/savingsAccount, this API will result in an error.Assign a Role:\n\nAllows you to assign a Role to an existing member of a group.\n\n\n\nWe can define the different roles applicable to group members by adding code values to the pre-defined system code GROUPROLE. Example:Group leader etc.\n\nMandatory Fields: clientId, role\n\nUnassign a Role:\n\nAllows you to unassign Roles associated tp Group members.\n\nUpdate a Role:\n\nAllows you to update the member Role.\n\nMandatory Fields: role\n\nShowing request/response for Transfer Clients across groups","operationId":"activateOrGenerateCollectionSheet","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"groupId","in":"path","description":"groupId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command","required":false,"type":"string"},{"name":"roleId","in":"query","description":"roleId","required":false,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostGroupsGroupIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostGroupsGroupIdResponse"}}}},"put":{"tags":["Groups"],"summary":"Update a Group","description":"Updates a Group","operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"groupId","in":"path","description":"groupId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutGroupsGroupIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PutGroupsGroupIdResponse"}}}},"delete":{"tags":["Groups"],"summary":"Delete a Group","description":"A group can be deleted if it is in pending state and has no associations - clients, loans or savings","operationId":"delete","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"groupId","in":"path","description":"groupId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/DeleteGroupsGroupIdResponse"}}}}},"/groups/template":{"get":{"tags":["Groups"],"summary":"Retrieve Group Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\n\n\nField Defaults\n\nAllowed Value Lists\n\nExample Requests:\n\n\n\ngroups/template\n\n\n\ngroups/template?officeId=2\n\n\n\ngroups/template?centerId=1\n\n\n\ngroups/template?centerId=1&staffInSelectedOfficeOnly=true","operationId":"retrieveTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"officeId","in":"query","description":"officeId","required":false,"type":"integer","format":"int64"},{"name":"center","in":"query","description":"center","required":false,"type":"boolean"},{"name":"centerId","in":"query","description":"centerId","required":false,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command","required":false,"type":"string"},{"name":"staffInSelectedOfficeOnly","in":"query","description":"staffInSelectedOfficeOnly","required":false,"type":"boolean","default":false}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetGroupsTemplateResponse"}}}}},"/groups/{groupId}/command/unassign_staff":{"post":{"tags":["Groups"],"summary":"Unassign a Staff","description":"Allows you to unassign the Staff.\n\nMandatory Fields: staffId","operationId":"unassignLoanOfficer","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"groupId","in":"path","description":"groupId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostGroupsGroupIdCommandUnassignStaffRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostGroupsGroupIdCommandUnassignStaffResponse"}}}}},"/groups/{groupId}/accounts":{"get":{"tags":["Groups"],"summary":"Retrieve Group accounts overview","description":"Retrieves details of all Loan and Savings accounts associated with this group.\n\n\n\nExample Requests:\n\n\n\ngroups/1/accounts\n\n\n\n\n\ngroups/1/accounts?fields=loanAccounts,savingsAccounts,memberLoanAccounts,\n\nmemberSavingsAccounts","operationId":"retrieveAccounts","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"groupId","in":"path","description":"groupId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetGroupsGroupIdAccountsResponse"}}}}},"/groups/downloadtemplate":{"get":{"tags":["Groups"],"operationId":"getGroupsTemplate","produces":["application/vnd.ms-excel"],"parameters":[{"name":"officeId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"staffId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"dateFormat","in":"query","required":false,"type":"string"}],"responses":{"default":{"description":"successful operation"}}}},"/groups/uploadtemplate":{"post":{"tags":["Groups"],"operationId":"postGroupTemplate","consumes":["multipart/form-data"],"parameters":[{"name":"file","in":"formData","required":false,"type":"file"},{"name":"locale","in":"formData","required":false,"type":"string"},{"name":"dateFormat","in":"formData","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/groups":{"get":{"tags":["Groups"],"summary":"List Groups","description":"The default implementation of listing Groups returns 200 entries with support for pagination and sorting. Using the parameter limit with value -1 returns all entries.\n\nExample Requests:\n\n\n\ngroups\n\n\n\ngroups?fields=name,officeName,joinedDate\n\n\n\ngroups?offset=10&limit=50\n\n\n\ngroups?orderBy=name&sortOrder=DESC","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"sqlSearch","in":"query","description":"sqlSearch","required":false,"type":"string"},{"name":"officeId","in":"query","description":"officeId","required":false,"type":"integer","format":"int64"},{"name":"staffId","in":"query","description":"staffId","required":false,"type":"integer","format":"int64"},{"name":"externalId","in":"query","description":"externalId","required":false,"type":"string"},{"name":"name","in":"query","description":"name","required":false,"type":"string"},{"name":"underHierarchy","in":"query","description":"underHierarchy","required":false,"type":"string"},{"name":"paged","in":"query","description":"paged","required":false,"type":"boolean"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","description":"orderBy","required":false,"type":"string"},{"name":"sortOrder","in":"query","description":"sortOrder","required":false,"type":"string"},{"name":"orphansOnly","in":"query","description":"orphansOnly","required":false,"type":"boolean"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetGroupsResponse"}}}},"post":{"tags":["Groups"],"summary":"Create a Group","description":"Creates a Group\n\nMandatory Fields: name, officeId, active, activationDate (if active=true)\n\nOptional Fields: externalId, staffId, clientMembers","operationId":"create","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostGroupsRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostGroupsResponse"}}}}},"/interestratecharts/{chartId}/chartslabs/{chartSlabId}":{"get":{"tags":["Interest Rate Slab (A.K.A interest bands)"],"summary":"Retrieve a Slab","description":"Retrieve a slab associated with an Interest rate chart\n\nExample Requests:\n\ninterestratecharts/1/chartslabs/1\n","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"chartId","in":"path","description":"chartId","required":true,"type":"integer","format":"int64"},{"name":"chartSlabId","in":"path","description":"chartSlabId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetInterestRateChartsChartIdChartSlabsResponse"}}}},"put":{"tags":["Interest Rate Slab (A.K.A interest bands)"],"summary":"Update a Slab","description":"It updates the Slab from chart","operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"chartId","in":"path","description":"chartId","required":true,"type":"integer","format":"int64"},{"name":"chartSlabId","in":"path","description":"chartSlabId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutInterestRateChartsChartIdChartSlabsChartSlabIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PutInterestRateChartsChartIdChartSlabsChartSlabIdResponse"}}}},"delete":{"tags":["Interest Rate Slab (A.K.A interest bands)"],"summary":"Delete a Slab","description":"Delete a Slab from a chart","operationId":"delete","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"chartId","in":"path","description":"chartId","required":true,"type":"integer","format":"int64"},{"name":"chartSlabId","in":"path","description":"chartSlabId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/DeleteInterestRateChartsChartIdChartSlabsResponse"}}}}},"/interestratecharts/{chartId}/chartslabs/template":{"get":{"tags":["Interest Rate Slab (A.K.A interest bands)"],"operationId":"template","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/interestratecharts/{chartId}/chartslabs":{"get":{"tags":["Interest Rate Slab (A.K.A interest bands)"],"summary":"Retrieve all Slabs","description":"Retrieve list of slabs associated with a chart\n\nExample Requests:\n\ninterestratecharts/1/chartslabs","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"chartId","in":"path","description":"chartId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/GetInterestRateChartsChartIdChartSlabsResponse"}}}}},"post":{"tags":["Interest Rate Slab (A.K.A interest bands)"],"summary":"Create a Slab","description":"Creates a new interest rate slab for an interest rate chart.\nMandatory Fields\nperiodType, fromPeriod, annualInterestRate\nOptional Fields\ntoPeriod and description\nExample Requests:\n\ninterestratecharts/1/chartslabs","operationId":"create","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"chartId","in":"path","description":"chartId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostInterestRateChartsChartIdChartSlabsRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostInterestRateChartsChartIdChartSlabsResponse"}}}}},"/interestratecharts/{chartId}":{"get":{"tags":["Interest Rate Chart"],"summary":"Retrieve a Chart","description":"It retrieves the Interest Rate Chart\nExample Requests:\n\ninterestratecharts/1","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"chartId","in":"path","description":"chartId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetInterestRateChartsResponse"}}}},"put":{"tags":["Interest Rate Chart"],"summary":"Update a Chart","description":"It updates the Chart.","operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"chartId","in":"path","description":"chartId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutInterestRateChartsChartIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PutInterestRateChartsChartIdResponse"}}}},"delete":{"tags":["Interest Rate Chart"],"summary":"Delete a Chart","description":"It deletes the chart","operationId":"delete","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"chartId","in":"path","description":"chartId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/DeleteInterestRateChartsChartIdResponse"}}}}},"/interestratecharts/template":{"get":{"tags":["Interest Rate Chart"],"summary":"Retrieve Chart Details Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for creating a chart. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\nExample Request:\n\ninterestratecharts/template","operationId":"template","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetInterestRateChartsTemplateResponse"}}}}},"/interestratecharts":{"get":{"tags":["Interest Rate Chart"],"summary":"Retrieve all Charts","description":"Retrieve list of charts associated with a term deposit product(FD or RD).\nExample Requests:\n\ninterestratecharts?productId=1","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"productId","in":"query","description":"productId","required":false,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/GetInterestRateChartsResponse"}}}}},"post":{"tags":["Interest Rate Chart"],"summary":"Create a Chart","description":"Creates a new chart which can be attached to a term deposit products (FD or RD).","operationId":"create","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostInterestRateChartsRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostInterestRateChartsResponse"}}}}},"/loans/{loanId}/charges/{chargeId}":{"get":{"tags":["Loan Charges"],"summary":"Retrieve a Loan Charge","description":"Retrieves Loan Charge according to the Loan ID and Charge IDExample Requests:\n\n/loans/1/charges/1\n\n\n/loans/1/charges/1?fields=name,amountOrPercentage","operationId":"retrieveLoanCharge","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"loanId","in":"path","description":"loanId","required":true,"type":"integer","format":"int64"},{"name":"chargeId","in":"path","description":"chargeId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetLoansLoanIdChargesChargeIdResponse"}}}},"post":{"tags":["Loan Charges"],"summary":"Pay Loan Charge","description":"Loan Charge will be paid if the loan is linked with a savings account","operationId":"executeLoanCharge","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"loanId","in":"path","description":"loanId","required":true,"type":"integer","format":"int64"},{"name":"chargeId","in":"path","description":"chargeId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command","required":false,"type":"string"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostLoansLoanIdChargesChargeIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostLoansLoanIdChargesChargeIdResponse"}}}},"put":{"tags":["Loan Charges"],"summary":"Update a Loan Charge","description":"Currently Loan Charges may be updated only if the Loan is not yet approved","operationId":"updateLoanCharge","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"loanId","in":"path","description":"loanId","required":true,"type":"integer","format":"int64"},{"name":"chargeId","in":"path","description":"chargeId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutLoansLoanIdChargesChargeIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PutLoansLoanIdChargesChargeIdResponse"}}}},"delete":{"tags":["Loan Charges"],"summary":"Delete a Loan Charge","description":"Note: Currently, A Loan Charge may only be removed from Loans that are not yet approved.","operationId":"deleteLoanCharge","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"loanId","in":"path","description":"loanId","required":true,"type":"integer","format":"int64"},{"name":"chargeId","in":"path","description":"chargeId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/DeleteLoansLoanIdChargesChargeIdResponse"}}}}},"/loans/{loanId}/charges/template":{"get":{"tags":["Loan Charges"],"summary":"Retrieve Loan Charges Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\nExample Request:\n\nloans/1/charges/template\n\n","operationId":"retrieveTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"loanId","in":"path","description":"loanId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetLoansLoanIdChargesTemplateResponse"}}}}},"/loans/{loanId}/charges":{"get":{"tags":["Loan Charges"],"summary":"List Loan Charges","description":"It lists all the Loan Charges specific to a Loan \n\nExample Requests:\n\nloans/1/charges\n\n\nloans/1/charges?fields=name,amountOrPercentage","operationId":"retrieveAllLoanCharges","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"loanId","in":"path","description":"loanId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/GetLoansLoanIdChargesChargeIdResponse"}}}}},"post":{"tags":["Loan Charges"],"summary":"Create a Loan Charge","description":"It Creates a Loan Charge","operationId":"executeLoanCharge","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"loanId","in":"path","description":"loanId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command","required":false,"type":"string"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostLoansLoanIdChargesRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostLoansLoanIdChargesResponse"}}}}},"/loans/{loanId}/schedule":{"post":{"tags":["Loan Rescheduling"],"summary":"Calculate loan repayment schedule based on Loan term variations | Updates loan repayment schedule based on Loan term variations | Updates loan repayment schedule by removing Loan term variations","description":"Calculate loan repayment schedule based on Loan term variations:\n\nMandatory Fields: exceptions,locale,dateFormat\n\nUpdates loan repayment schedule based on Loan term variations:\n\nMandatory Fields: exceptions,locale,dateFormat\n\nUpdates loan repayment schedule by removing Loan term variations:\n\nIt updates the loan repayment schedule by removing Loan term variations\n\nShowing request/response for 'Updates loan repayment schedule by removing Loan term variations'","operationId":"calculateLoanScheduleOrSubmitVariableSchedule","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"loanId","in":"path","description":"loanId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command","required":false,"type":"string"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostLoansLoanIdScheduleRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostLoansLoanIdScheduleResponse"}}}}},"/loans/{loanId}/transactions/{transactionId}":{"get":{"tags":["Loan Transactions"],"summary":"Retrieve a Transaction Details","description":"Retrieves a Transaction Details\n\nExample Request:\n\nloans/5/transactions/3","operationId":"retrieveTransaction","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"loanId","in":"path","description":"loanId","required":true,"type":"integer","format":"int64"},{"name":"transactionId","in":"path","description":"transactionId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetLoansLoanIdTransactionsTransactionIdResponse"}}}},"post":{"tags":["Loan Transactions"],"summary":"Adjust a Transaction","description":"Note: there is no need to specify command={transactionType} parameter.\n\nMandatory Fields: transactionDate, transactionAmount","operationId":"adjustLoanTransaction","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"loanId","in":"path","description":"loanId","required":true,"type":"integer","format":"int64"},{"name":"transactionId","in":"path","description":"transactionId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostLoansLoanIdTransactionsTransactionIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostLoansLoanIdTransactionsTransactionIdResponse"}}}}},"/loans/{loanId}/transactions/template":{"get":{"tags":["Loan Transactions"],"summary":"Retrieve Loan Transaction Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\n\nExample Request:\n\nloans/1/transactions/template?command=repayment","operationId":"retrieveTransactionTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"loanId","in":"path","description":"loanId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command","required":false,"type":"string"},{"name":"dateFormat","in":"query","description":"dateFormat","required":false,"type":"string"},{"name":"transactionDate","in":"query","description":"transactionDate","required":false,"type":"string"},{"name":"locale","in":"query","description":"locale","required":false,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetLoansLoanIdTransactionsTemplateResponse"}}}}},"/loans/{loanId}/transactions":{"post":{"tags":["Loan Transactions"],"summary":"Make a Repayment | Make a Refund of an Active Loan by Cash | Foreclosure of an Active Loan | Waive Interest | Write-off Loan | Make Recovery Payment | Undo Loan Write-off Transaction","description":"Make Recovery Payment:\n\nThis API allows collecting recovery payments for written-off loans","operationId":"executeLoanTransaction","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"loanId","in":"path","description":"loanId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command","required":false,"type":"string"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostLoansLoanIdTransactionsRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostLoansLoanIdTransactionsResponse"}}}}},"/loans/{loanId}/template":{"get":{"tags":["Loans"],"operationId":"retrieveApprovalTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"loanId","in":"path","description":"loanId","required":true,"type":"integer","format":"int64"},{"name":"templateType","in":"query","description":"templateType","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/loans/{loanId}":{"get":{"tags":["Loans"],"summary":"Retrieve a Loan","description":"Note: template=true parameter doesn't apply to this resource.Example Requests:\n\nloans/1\n\n\nloans/1?fields=id,principal,annualInterestRate\n\n\nloans/1?associations=all\n\nloans/1?associations=all&exclude=guarantors\n\n\nloans/1?fields=id,principal,annualInterestRate&associations=repaymentSchedule,transactions","operationId":"retrieveLoan","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"loanId","in":"path","description":"loanId","required":true,"type":"integer","format":"int64"},{"name":"staffInSelectedOfficeOnly","in":"query","description":"staffInSelectedOfficeOnly","required":false,"type":"boolean","default":false}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetLoansLoanIdResponse"}}}},"post":{"tags":["Loans"],"summary":"Approve Loan Application | Recover Loan Guarantee | Undo Loan Application Approval | Assign a Loan Officer | Unassign a Loan Officer | Reject Loan Application | Applicant Withdraws from Loan Application | Disburse Loan Disburse Loan To Savings Account | Undo Loan Disbursal","description":"Approve Loan Application:\nMandatory Fields: approvedOnDate\nOptional Fields: approvedLoanAmount and expectedDisbursementDate\nApproves the loan application\n\nRecover Loan Guarantee:\nRecovers the loan guarantee\n\nUndo Loan Application Approval:\nUndoes the Loan Application Approval\n\nAssign a Loan Officer:\nAllows you to assign Loan Officer for existing Loan.\n\nUnassign a Loan Officer:\nAllows you to unassign the Loan Officer.\n\nReject Loan Application:\nMandatory Fields: rejectedOnDate\nAllows you to reject the loan application\n\nApplicant Withdraws from Loan Application:\nMandatory Fields: withdrawnOnDate\nAllows the applicant to withdraw the loan application\n\nDisburse Loan:\nMandatory Fields: actualDisbursementDate\nOptional Fields: transactionAmount and fixedEmiAmount\nDisburses the Loan\n\nDisburse Loan To Savings Account:\nMandatory Fields: actualDisbursementDate\nOptional Fields: transactionAmount and fixedEmiAmount\nDisburses the loan to Saving Account\n\nUndo Loan Disbursal:\nUndoes the Loan Disbursal\nShowing request and response for Assign a Loan Officer","operationId":"stateTransitions","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"loanId","in":"path","description":"loanId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command","required":false,"type":"string"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostLoansLoanIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostLoansLoanIdResponse"}}}},"put":{"tags":["Loans"],"summary":"Modify a loan application","description":"Loan application can only be modified when in 'Submitted and pending approval' state. Once the application is approved, the details cannot be changed using this method.","operationId":"modifyLoanApplication","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"loanId","in":"path","description":"loanId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutLoansLoanIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PutLoansLoanIdResponse"}}}},"delete":{"tags":["Loans"],"summary":"Delete a Loan Application","description":"Note: Only loans in \"Submitted and awaiting approval\" status can be deleted.","operationId":"deleteLoanApplication","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"loanId","in":"path","description":"loanId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/DeleteLoansLoanIdResponse"}}}}},"/loans":{"get":{"tags":["Loans"],"summary":"List Loans","description":"The list capability of loans can support pagination and sorting.\nExample Requests:\n\nloans\n\nloans?fields=accountNo\n\nloans?offset=10&limit=50\n\nloans?orderBy=accountNo&sortOrder=DESC","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"sqlSearch","in":"query","description":"sqlSearch","required":false,"type":"string"},{"name":"externalId","in":"query","description":"externalId","required":false,"type":"string"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","description":"orderBy","required":false,"type":"string"},{"name":"sortOrder","in":"query","description":"sortOrder","required":false,"type":"string"},{"name":"accountNo","in":"query","description":"accountNo","required":false,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetLoansResponse"}}}},"post":{"tags":["Loans"],"summary":"Calculate loan repayment schedule | Submit a new Loan Application","description":"It calculates the loan repayment Schedule\nSubmits a new loan application\nMandatory Fields: clientId, productId, principal, loanTermFrequency, loanTermFrequencyType, loanType, numberOfRepayments, repaymentEvery, repaymentFrequencyType, interestRatePerPeriod, amortizationType, interestType, interestCalculationPeriodType, transactionProcessingStrategyId, expectedDisbursementDate, submittedOnDate, loanType\nOptional Fields: graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, linkAccountId, allowPartialPeriodInterestCalcualtion, fixedEmiAmount, maxOutstandingLoanBalance, disbursementData, graceOnArrearsAgeing, createStandingInstructionAtDisbursement (requires linkedAccountId if set to true)\nAdditional Mandatory Fields if interest recalculation is enabled for product and Rest frequency not same as repayment period: recalculationRestFrequencyDate\nAdditional Mandatory Fields if interest recalculation with interest/fee compounding is enabled for product and compounding frequency not same as repayment period: recalculationCompoundingFrequencyDate\nAdditional Mandatory Field if Entity-Datatable Check is enabled for the entity of type loan: datatables","operationId":"calculateLoanScheduleOrSubmitLoanApplication","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"command","in":"query","description":"command","required":false,"type":"string"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostLoansRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostLoansResponse"}}}}},"/loans/downloadtemplate":{"get":{"tags":["Loans"],"operationId":"getLoansTemplate","produces":["application/vnd.ms-excel"],"parameters":[{"name":"officeId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"staffId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"dateFormat","in":"query","required":false,"type":"string"}],"responses":{"default":{"description":"successful operation"}}}},"/loans/uploadtemplate":{"post":{"tags":["Loans"],"operationId":"postLoanTemplate","consumes":["multipart/form-data"],"parameters":[{"name":"file","in":"formData","required":false,"type":"file"},{"name":"locale","in":"formData","required":false,"type":"string"},{"name":"dateFormat","in":"formData","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/loans/repayments/downloadtemplate":{"get":{"tags":["Loans"],"operationId":"getLoanRepaymentTemplate","produces":["application/vnd.ms-excel"],"parameters":[{"name":"officeId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"dateFormat","in":"query","required":false,"type":"string"}],"responses":{"default":{"description":"successful operation"}}}},"/loans/repayments/uploadtemplate":{"post":{"tags":["Loans"],"operationId":"postLoanRepaymentTemplate","consumes":["multipart/form-data"],"parameters":[{"name":"file","in":"formData","required":false,"type":"file"},{"name":"locale","in":"formData","required":false,"type":"string"},{"name":"dateFormat","in":"formData","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/loans/template":{"get":{"tags":["Loans"],"summary":"Retrieve Loan Details Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\nExample Requests:\n\nloans/template?templateType=individual&clientId=1\n\n\nloans/template?templateType=individual&clientId=1&productId=1","operationId":"template","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"query","description":"clientId","required":false,"type":"integer","format":"int64"},{"name":"groupId","in":"query","description":"groupId","required":false,"type":"integer","format":"int64"},{"name":"productId","in":"query","description":"productId","required":false,"type":"integer","format":"int64"},{"name":"templateType","in":"query","description":"templateType","required":false,"type":"string"},{"name":"staffInSelectedOfficeOnly","in":"query","description":"staffInSelectedOfficeOnly","required":false,"type":"boolean","default":false},{"name":"activeOnly","in":"query","description":"activeOnly","required":false,"type":"boolean","default":false}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetLoansTemplateResponse"}}}}},"/loanproducts/{productId}":{"get":{"tags":["Loan Products"],"summary":"Retrieve a Loan Product","description":"Retrieves a Loan Product\n\nExample Requests:\n\nloanproducts/1\n\n\nloanproducts/1?template=true\n\n\nloanproducts/1?fields=name,description,numberOfRepayments","operationId":"retrieveLoanProductDetails","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"productId","in":"path","description":"productId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetLoanProductsProductIdResponse"}}}},"put":{"tags":["Loan Products"],"summary":"Update a Loan Product","description":"Updates a Loan Product","operationId":"updateLoanProduct","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"productId","in":"path","description":"productId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutLoanProductsProductIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PutLoanProductsProductIdResponse"}}}}},"/loanproducts/template":{"get":{"tags":["Loan Products"],"summary":"Retrieve Loan Product Details Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\nExample Request:\n\nloanproducts/template","operationId":"retrieveTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"isProductMixTemplate","in":"query","description":"isProductMixTemplate","required":false,"type":"boolean"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetLoanProductsTemplateResponse"}}}}},"/loanproducts":{"get":{"tags":["Loan Products"],"summary":"List Loan Products","description":"Lists Loan Products\n\nExample Requests:\n\nloanproducts\n\n\nloanproducts?fields=name,description,interestRateFrequencyType,amortizationType","operationId":"retrieveAllLoanProducts","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/GetLoanProductsResponse"}}}}},"post":{"tags":["Loan Products"],"summary":"Create a Loan Product","description":"Depending of the Accounting Rule (accountingRule) selected, additional fields with details of the appropriate Ledger Account identifiers would need to be passed in.\n\nRefer MifosX Accounting Specs Draft for more details regarding the significance of the selected accounting rule\n\nMandatory Fields: name, shortName, currencyCode, digitsAfterDecimal, inMultiplesOf, principal, numberOfRepayments, repaymentEvery, repaymentFrequencyType, interestRatePerPeriod, interestRateFrequencyType, amortizationType, interestType, interestCalculationPeriodType, transactionProcessingStrategyId, accountingRule, isInterestRecalculationEnabled, daysInYearType, daysInMonthType\n\nOptional Fields: inArrearsTolerance, graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, graceOnArrearsAgeing, charges, paymentChannelToFundSourceMappings, feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, includeInBorrowerCycle, useBorrowerCycle,principalVariationsForBorrowerCycle, numberOfRepaymentVariationsForBorrowerCycle, interestRateVariationsForBorrowerCycle, multiDisburseLoan,maxTrancheCount, outstandingLoanBalance,overdueDaysForNPA,holdGuaranteeFunds, principalThresholdForLastInstalment, accountMovesOutOfNPAOnlyOnArrearsCompletion, canDefineInstallmentAmount, installmentAmountInMultiplesOf, allowAttributeOverrides, allowPartialPeriodInterestCalcualtion\n\nAdditional Mandatory Fields for Cash(2) based accounting: fundSourceAccountId, loanPortfolioAccountId, interestOnLoanAccountId, incomeFromFeeAccountId, incomeFromPenaltyAccountId, writeOffAccountId, transfersInSuspenseAccountId, overpaymentLiabilityAccountId\n\nAdditional Mandatory Fields for periodic (3) and upfront (4)accrual accounting: fundSourceAccountId, loanPortfolioAccountId, interestOnLoanAccountId, incomeFromFeeAccountId, incomeFromPenaltyAccountId, writeOffAccountId, receivableInterestAccountId, receivableFeeAccountId, receivablePenaltyAccountId, transfersInSuspenseAccountId, overpaymentLiabilityAccountId\n\nAdditional Mandatory Fields if interest recalculation is enabled(true): interestRecalculationCompoundingMethod, rescheduleStrategyMethod, recalculationRestFrequencyType\n\nAdditional Optional Fields if interest recalculation is enabled(true): isArrearsBasedOnOriginalSchedule, preClosureInterestCalculationStrategy\n\nAdditional Optional Fields if interest recalculation is enabled(true) and recalculationRestFrequencyType is not same as repayment period: recalculationRestFrequencyInterval, recalculationRestFrequencyDate\n\nAdditional Optional Fields if interest recalculation is enabled(true) and interestRecalculationCompoundingMethod is enabled: recalculationCompoundingFrequencyType\n\nAdditional Optional Fields if interest recalculation is enabled(true) and interestRecalculationCompoundingMethod is enabled and recalculationCompoundingFrequencyType is not same as repayment period: recalculationCompoundingFrequencyInterval, recalculationCompoundingFrequencyDate\n\nAdditional Mandatory Fields if Hold Guarantee funds is enabled(true): mandatoryGuarantee\n\nAdditional Optional Fields if Hold Guarantee funds is enabled(true): minimumGuaranteeFromOwnFunds,minimumGuaranteeFromGuarantor","operationId":"createLoanProduct","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostLoanProductsRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostLoanProductsResponse"}}}}},"/{resourceType}/{resourceId}/notes/{noteId}":{"get":{"tags":["Notes"],"summary":"Retrieve a Resource Note","description":"Retrieves a Resource Note\n\nExample Requests:\n\nclients/1/notes/76\n\n\ngroups/1/notes/20\n\n\nclients/1/notes/76?fields=note,createdOn,createdByUsername\n\n\ngroups/1/notes/20?fields=note,createdOn,createdByUsername","operationId":"retrieveNote","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"resourceType","in":"path","description":"resourceType","required":true,"type":"string"},{"name":"resourceId","in":"path","description":"resourceId","required":true,"type":"integer","format":"int64"},{"name":"noteId","in":"path","description":"noteId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetResourceTypeResourceIdNotesNoteIdResponse"}}}},"put":{"tags":["Notes"],"summary":"Update a Resource Note","description":"Updates a Resource Note","operationId":"updateNote","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"resourceType","in":"path","description":"resourceType","required":true,"type":"string"},{"name":"resourceId","in":"path","description":"resourceId","required":true,"type":"integer","format":"int64"},{"name":"noteId","in":"path","description":"noteId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutResourceTypeResourceIdNotesNoteIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PutResourceTypeResourceIdNotesNoteIdResponse"}}}},"delete":{"tags":["Notes"],"summary":"Delete a Resource Note","description":"Deletes a Resource Note","operationId":"deleteNote","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"resourceType","in":"path","description":"resourceType","required":true,"type":"string"},{"name":"resourceId","in":"path","description":"resourceId","required":true,"type":"integer","format":"int64"},{"name":"noteId","in":"path","description":"noteId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/DeleteResourceTypeResourceIdNotesNoteIdResponse"}}}}},"/{resourceType}/{resourceId}/notes":{"get":{"tags":["Notes"],"summary":"Retrieve a Resource's Notes","description":"Retrieves a Resource's Notes\n\nNote: Notes are returned in descending createOn order.\n\nExample Requests:\n\nclients/2/notes\n\n\ngroups/2/notes?fields=note,createdOn,createdByUsername","operationId":"retrieveNotesByResource","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"resourceType","in":"path","description":"resourceType","required":true,"type":"string"},{"name":"resourceId","in":"path","description":"resourceId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/GetResourceTypeResourceIdNotesResponse"}}}}},"post":{"tags":["Notes"],"summary":"Add a Resource Note","description":"Adds a new note to a supported resource.\n\nExample Requests:\n\nclients/1/notes\n\n\ngroups/1/notes","operationId":"addNewNote","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"resourceType","in":"path","description":"resourceType","required":true,"type":"string"},{"name":"resourceId","in":"path","description":"resourceId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostResourceTypeResourceIdNotesRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostResourceTypeResourceIdNotesResponse"}}}}},"/paymenttypes/{paymentTypeId}":{"get":{"tags":["Payment Type"],"summary":"Retrieve a Payment Type","description":"Retrieves a payment type","operationId":"retrieveOnePaymentType","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[{"name":"paymentTypeId","in":"path","description":"paymentTypeId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetPaymentTypesPaymentTypeIdResponse"}}}},"put":{"tags":["Payment Type"],"summary":"Update a Payment Type","description":"Updates a Payment Type","operationId":"updatePaymentType","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"paymentTypeId","in":"path","description":"paymentTypeId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutPaymentTypesPaymentTypeIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PutPaymentTypesPaymentTypeIdResponse"}}}},"delete":{"tags":["Payment Type"],"summary":"Delete a Payment Type","description":"Deletes payment type","operationId":"deleteCode","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"paymentTypeId","in":"path","description":"paymentTypeId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/DeletePaymentTypesPaymentTypeIdResponse"}}}}},"/paymenttypes":{"get":{"tags":["Payment Type"],"summary":"Retrieve all Payment Types","description":"Retrieve list of payment types","operationId":"getAllPaymentTypes","consumes":["text/html","application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/GetPaymentTypesResponse"}}}}},"post":{"tags":["Payment Type"],"summary":"Create a Payment Type","description":"Creates a new Payment type\n\nMandatory Fields: name\n\nOptional Fields: Description, isCashPayment,Position","operationId":"createPaymentType","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostPaymentTypesRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostPaymentTypesResponse"}}}}},"/products/{type}/{productId}":{"get":{"tags":["Products"],"summary":"Retrieve a Share Product","description":"Retrieves a Share Product\n\nExample Requests:\n\nproducts/share/1\n\n\nproducts/share/1?template=true","operationId":"retrieveProduct","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"productId","in":"path","description":"productId","required":true,"type":"integer","format":"int64"},{"name":"type","in":"path","description":"type","required":true,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetProductsTypeProductIdResponse"}}}},"post":{"tags":["Products"],"operationId":"handleCommands","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"type","in":"path","description":"type","required":true,"type":"string"},{"name":"productId","in":"path","description":"productId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"put":{"tags":["Products"],"summary":"Update a Share Product","description":"Updates a Share Product","operationId":"updateProduct","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"type","in":"path","description":"type","required":true,"type":"string"},{"name":"productId","in":"path","description":"productId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutProductsTypeProductIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PutProductsTypeProductIdResponse"}}}}},"/products/{type}/template":{"get":{"tags":["Products"],"operationId":"retrieveTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"type","in":"path","description":"type","required":true,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/products/{type}":{"get":{"tags":["Products"],"summary":"List Share Products","description":"Lists Share Products\n\nMandatory Fields: limit, offset\n\nExample Requests:\n\nshareproducts","operationId":"retrieveAllProducts","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"type","in":"path","description":"type","required":true,"type":"string"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetProductsTypeResponse"}}}},"post":{"tags":["Products"],"summary":"Create a Share Product","description":"Creates a Share Product\n\nMandatory Fields: name, shortName, description, currencyCode, digitsAfterDecimal,inMultiplesOf, locale, totalShares, unitPrice, nominalShares,allowDividendCalculationForInactiveClients,accountingRule\n\nMandatory Fields for Cash based accounting (accountingRule = 2): shareReferenceId, shareSuspenseId, shareEquityId, incomeFromFeeAccountId\n\nOptional Fields: sharesIssued, minimumShares, maximumShares, minimumActivePeriodForDividends, minimumactiveperiodFrequencyType, lockinPeriodFrequency, lockinPeriodFrequencyType, marketPricePeriods, chargesSelected","operationId":"createProduct","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"type","in":"path","description":"type","required":true,"type":"string"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostProductsTypeRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostProductsTypeResponse"}}}}},"/fixeddepositaccounts/{accountId}":{"get":{"tags":["Fixed Deposit Account"],"summary":"Retrieve a fixed deposit application/account","description":"Retrieves a fixed deposit application/account\n\nExample Requests :\n\n\n\nfixeddepositaccounts/1\n\nfixeddepositaccounts/1?associations=all","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountId","in":"path","description":"accountId","required":true,"type":"integer","format":"int64"},{"name":"staffInSelectedOfficeOnly","in":"query","description":"staffInSelectedOfficeOnly","required":false,"type":"boolean","default":false},{"name":"chargeStatus","in":"query","description":"chargeStatus","required":false,"type":"string","default":"all"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetFixedDepositAccountsAccountIdResponse"}}}},"post":{"tags":["Fixed Deposit Account"],"summary":"Approve fixed deposit application | Undo approval fixed deposit application | Reject fixed deposit application | Withdraw fixed deposit application | Activate a fixed deposit account | Close a fixed deposit account | Premature Close a fixed deposit account | Calculate Premature amount on Fixed deposit account | Calculate Interest on Fixed Deposit Account | Post Interest on Fixed Deposit Account","description":"Approve fixed deposit application:\n\nApproves fixed deposit application so long as its in 'Submitted and pending approval' state.\n\nUndo approval fixed deposit application:\n\nWill move 'approved' fixed deposit application back to 'Submitted and pending approval' state.\n\nReject fixed deposit application:\n\nRejects fixed deposit application so long as its in 'Submitted and pending approval' state.\n\nWithdraw fixed deposit application:\n\nUsed when an applicant withdraws from the fixed deposit application. It must be in 'Submitted and pending approval' state.\n\nClose a fixed deposit account:\n\nResults in a Matured fixed deposit account being converted into a 'closed' fixed deposit account.\n\nPremature Close a fixed deposit account:\n\nResults in an Active fixed deposit account being converted into a 'Premature Closed' fixed deposit account with options to withdraw prematured amount. (premature amount is calculated using interest rate chart applicable along with penal interest if any.)\n\nCalculate Premature amount on Fixed deposit account:\n\nCalculate premature amount on fixed deposit account till premature close date. Premature amount is calculated based on interest chart and penal interest applicable.\n\nCalculate Interest on Fixed Deposit Account:\n\nCalculates interest earned on a fixed deposit account based on todays date. It does not attempt to post or credit the interest on the account. That is responsibility of the Post Interest API that will likely be called by overnight process.\n\nPost Interest on Fixed Deposit Account:\n\nCalculates and Posts interest earned on a fixed deposit account based on today's date and whether an interest posting or crediting event is due.\n\nShowing request/response for Calculate Interest on Fixed Deposit Account","operationId":"handleCommands","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountId","in":"path","description":"accountId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command","required":false,"type":"string"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostFixedDepositAccountsAccountIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostFixedDepositAccountsAccountIdResponse"}}}},"put":{"tags":["Fixed Deposit Account"],"summary":"Modify a fixed deposit application","description":"Fixed deposit application can only be modified when in 'Submitted and pending approval' state. Once the application is approved, the details cannot be changed using this method. Specific api endpoints will be created to allow change of interest detail such as rate, compounding period, posting period etc","operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountId","in":"path","description":"accountId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutFixedDepositAccountsAccountIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PutFixedDepositAccountsAccountIdResponse"}}}},"delete":{"tags":["Fixed Deposit Account"],"summary":"Delete a fixed deposit application","description":"At present we support hard delete of fixed deposit application so long as its in 'Submitted and pending approval' state. One the application is moves past this state, it is not possible to do a 'hard' delete of the application or the account. An API endpoint will be added to close/de-activate the fixed deposit account.","operationId":"delete","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountId","in":"path","description":"accountId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/DeleteFixedDepositAccountsAccountIdResponse"}}}}},"/fixeddepositaccounts":{"get":{"tags":["Fixed Deposit Account"],"summary":"List Fixed deposit applications/accounts","description":"Lists Fixed Deposit Accounts\n\nExample Requests:\n\n\n\nfixeddepositaccounts\n\n\n\nfixeddepositaccounts?fields=name","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"paged","in":"query","description":"paged","required":false,"type":"boolean"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","description":"orderBy","required":false,"type":"string"},{"name":"sortOrder","in":"query","description":"sortOrder","required":false,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/GetFixedDepositAccountsResponse"}}}}},"post":{"tags":["Fixed Deposit Account"],"summary":"Submit new fixed deposit application","description":"Submits a new fixed deposit applicationMandatory Fields: clientId or groupId, productId, submittedOnDate, depositAmount, depositPeriod, depositPeriodFrequencyId\n\nOptional Fields: accountNo, externalId, fieldOfficerId,linkAccountId(if provided initial deposit amount will be collected from this account),transferInterestToSavings(By enabling this flag all interest postings will be transferred to linked saving account )","operationId":"submitApplication","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostFixedDepositAccountsRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostFixedDepositAccountsResponse"}}}}},"/fixeddepositaccounts/{accountId}/template":{"get":{"tags":["Fixed Deposit Account"],"operationId":"accountClosureTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountId","in":"path","description":"accountId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/fixeddepositaccounts/downloadtemplate":{"get":{"tags":["Fixed Deposit Account"],"operationId":"getFixedDepositTemplate","produces":["application/vnd.ms-excel"],"parameters":[{"name":"officeId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"staffId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"dateFormat","in":"query","required":false,"type":"string"}],"responses":{"default":{"description":"successful operation"}}}},"/fixeddepositaccounts/uploadtemplate":{"post":{"tags":["Fixed Deposit Account"],"operationId":"postFixedDepositTemplate","consumes":["multipart/form-data"],"parameters":[{"name":"file","in":"formData","required":false,"type":"file"},{"name":"locale","in":"formData","required":false,"type":"string"},{"name":"dateFormat","in":"formData","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/fixeddepositaccounts/transaction/downloadtemplate":{"get":{"tags":["Fixed Deposit Account"],"operationId":"getFixedDepositTransactionTemplate","produces":["application/vnd.ms-excel"],"parameters":[{"name":"officeId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"dateFormat","in":"query","required":false,"type":"string"}],"responses":{"default":{"description":"successful operation"}}}},"/fixeddepositaccounts/transaction/uploadtemplate":{"post":{"tags":["Fixed Deposit Account"],"operationId":"postFixedDepositTransactionTemplate","consumes":["multipart/form-data"],"parameters":[{"name":"file","in":"formData","required":false,"type":"file"},{"name":"locale","in":"formData","required":false,"type":"string"},{"name":"dateFormat","in":"formData","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/fixeddepositaccounts/template":{"get":{"tags":["Fixed Deposit Account"],"summary":"Retrieve Fixed Deposit Account Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for fixed deposit applications. The template data returned consists of any or all of:\n\n\n\nField Defaults\n\nAllowed Value ListsExample Requests:\n\n\n\nfixeddepositaccounts/template?clientId=1","operationId":"template","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"query","description":"clientId","required":false,"type":"integer","format":"int64"},{"name":"groupId","in":"query","description":"groupId","required":false,"type":"integer","format":"int64"},{"name":"productId","in":"query","description":"productId","required":false,"type":"integer","format":"int64"},{"name":"staffInSelectedOfficeOnly","in":"query","description":"staffInSelectedOfficeOnly","required":false,"type":"boolean","default":false}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetFixedDepositAccountsTemplateResponse"}}}}},"/fixeddepositproducts/{productId}":{"get":{"tags":["Fixed Deposit Product"],"summary":"Retrieve a Fixed Deposit Product","description":"Retrieves a Fixed Deposit Product\n\nExample Requests:\n\nfixeddepositproducts/1\n\n\nfixeddepositproducts/1?template=true\n\n\nfixeddepositproducts/1?fields=name,description","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"productId","in":"path","description":"productId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetFixedDepositProductsProductIdResponse"}}}},"put":{"tags":["Fixed Deposit Product"],"summary":"Update a Fixed Deposit Product","description":"Updates a Fixed Deposit Product","operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"productId","in":"path","description":"productId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutFixedDepositProductsProductIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PutFixedDepositProductsProductIdResponse"}}}},"delete":{"tags":["Fixed Deposit Product"],"summary":"Delete a Fixed Deposit Product","description":"Deletes a Fixed Deposit Product","operationId":"delete","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"productId","in":"path","description":"productId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/DeleteFixedDepositProductsProductIdResponse"}}}}},"/fixeddepositproducts/template":{"get":{"tags":["Fixed Deposit Product"],"operationId":"retrieveTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/fixeddepositproducts":{"get":{"tags":["Fixed Deposit Product"],"summary":"List Fixed Deposit Products","description":"Lists Fixed Deposit Products\n\nExample Requests:\n\nfixeddepositproducts\n\n\nfixeddepositproducts?fields=name","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/GetFixedDepositProductsResponse"}}}}},"post":{"tags":["Fixed Deposit Product"],"summary":"Create a Fixed Deposit Product","description":"Creates a Fixed Deposit Product\n\nMandatory Fields: name, shortName, description, currencyCode, digitsAfterDecimal,inMultiplesOf, interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType, minDepositTerm, minDepositTermTypeId, accountingRule\n\nOptional Fields: lockinPeriodFrequency, lockinPeriodFrequencyType, maxDepositTerm, maxDepositTermTypeId, inMultiplesOfDepositTerm, inMultiplesOfDepositTermTypeId, preClosurePenalApplicable, preClosurePenalInterest, preClosurePenalInterestOnTypeId, feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, charges, charts, , withHoldTax, taxGroupId\n\n\nMandatory Fields for Cash based accounting (accountingRule = 2): savingsReferenceAccountId, savingsControlAccountId, interestOnSavingsAccountId, incomeFromFeeAccountId, transfersInSuspenseAccountId, incomeFromPenaltyAccountId","operationId":"create","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostFixedDepositProductsRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostFixedDepositProductsResponse"}}}}},"/recurringdepositaccounts/{recurringDepositAccountId}/transactions/{transactionId}":{"get":{"tags":["Recurring Deposit Account Transactions"],"summary":"Retrieve Recurring Deposit Account Transaction","description":"Retrieves Recurring Deposit Account Transaction\n\nExample Requests:\n\nrecurringdepositaccounts/1/transactions/1","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"recurringDepositAccountId","in":"path","description":"recurringDepositAccountId","required":true,"type":"integer","format":"int64"},{"name":"transactionId","in":"path","description":"transactionId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetRecurringDepositAccountsRecurringDepositAccountIdTransactionsTransactionIdResponse"}}}},"post":{"tags":["Recurring Deposit Account Transactions"],"summary":"Adjust Transaction | Undo transaction","description":"Adjust Transaction:\n\nThis command modifies the given transaction.\n\nUndo transaction:\n\nThis command reverses the given transaction.\n\nShowing request/response for 'Adjust Transaction'","operationId":"handleTransactionCommands","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"recurringDepositAccountId","in":"path","description":"recurringDepositAccountId","required":true,"type":"integer","format":"int64"},{"name":"transactionId","in":"path","description":"transactionId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command","required":false,"type":"string"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostRecurringDepositAccountsRecurringDepositAccountIdTransactionsRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostRecurringDepositAccountsRecurringDepositAccountIdTransactionsTransactionIdResponse"}}}}},"/recurringdepositaccounts/{recurringDepositAccountId}/transactions/template":{"get":{"tags":["Recurring Deposit Account Transactions"],"summary":"Retrieve Recurring Deposit Account Transaction Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\nExample Requests:\n\nrecurringdepositaccounts/1/transactions/template?command=deposit\n\nrecurringdepositaccounts/1/transactions/template?command=withdrawal","operationId":"retrieveTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"recurringDepositAccountId","in":"path","description":"recurringDepositAccountId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command","required":false,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetRecurringDepositAccountsRecurringDepositAccountIdTransactionsTemplateResponse"}}}}},"/recurringdepositaccounts/{recurringDepositAccountId}/transactions":{"post":{"tags":["Recurring Deposit Account Transactions"],"summary":"Deposit Transaction | Withdrawal Transaction","description":"Deposit Transaction:\n\nUsed for a deposit transaction\n\nWithdrawal Transaction:\n\nUsed for a Withdrawal Transaction\n\nShowing request/response for Deposit Transaction","operationId":"transaction","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"recurringDepositAccountId","in":"path","description":"recurringDepositAccountId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command","required":false,"type":"string"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostRecurringDepositAccountsRecurringDepositAccountIdTransactionsRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostRecurringDepositAccountsRecurringDepositAccountIdTransactionsResponse"}}}}},"/recurringdepositaccounts/{accountId}":{"get":{"tags":["Recurring Deposit Account"],"summary":"Retrieve a recurring deposit application/account","description":"Retrieves a recurring deposit application/account\n\nExample Requests :\n\nrecurringdepositaccounts/1\n\n\nrecurringdepositaccounts/1?associations=all","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountId","in":"path","description":"accountId","required":true,"type":"integer","format":"int64"},{"name":"staffInSelectedOfficeOnly","in":"query","description":"staffInSelectedOfficeOnly","required":false,"type":"boolean","default":false},{"name":"chargeStatus","in":"query","description":"chargeStatus","required":false,"type":"string","default":"all"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetRecurringDepositAccountsAccountIdResponse"}}}},"post":{"tags":["Recurring Deposit Account"],"summary":"Approve recurring deposit application | Undo approval recurring deposit application | Reject recurring deposit application | Withdraw recurring deposit application | Activate a recurring deposit account | Update the recommended deposit amount for a recurring deposit account | Close a recurring deposit account | Premature Close a recurring deposit account | Calculate Premature amount on Recurring deposit account | Calculate Interest on recurring Deposit Account | Post Interest on recurring Deposit Account","description":"Approve recurring deposit application:\n\nApproves recurring deposit application so long as its in 'Submitted and pending approval' state.\n\nUndo approval recurring deposit application:\n\nWill move 'approved' recurring deposit application back to 'Submitted and pending approval' state.\n\nReject recurring deposit application\n\nRejects recurring deposit application so long as its in 'Submitted and pending approval' state.\n\nWithdraw recurring deposit application:\n\nUsed when an applicant withdraws from the recurring deposit application. It must be in 'Submitted and pending approval' state.\n\nActivate a recurring deposit account:\n\nResults in an approved recurring deposit application being converted into an 'active' recurring deposit account.\n\nUpdate the recommended deposit amount for a recurring deposit account:\n\nUpdates the recommended deposit amount for a RD account as on the effective date.\n\nClose a recurring deposit account\n\nResults in a Matured recurring deposit account being converted into a 'closed' recurring deposit account.\n\nOn account close allowed actions are.Premature Close a recurring deposit account:\n\nResults in an Active recurring deposit account being converted into a 'Premature Closed' recurring deposit account with options to withdraw prematured amount. (premature amount is calculated using interest rate chart applicable along with penal interest if any.)\n\nOn account premature closure allowed actions are.\n\nCalculate Premature amount on Recurring deposit account:\n\nCalculate premature amount on recurring deposit till premature close date. Premature amount is calculated based on interest chart and penal interest applicable if any.\n\nCalculate Interest on recurring Deposit Account:\n\nCalculates interest earned on a recurring deposit account based on todays date. It does not attempt to post or credit the interest on the account. That is responsibility of the Post Interest API that will likely be called by overnight process.\n\nPost Interest on recurring Deposit Account:\n\nCalculates and Posts interest earned on a recurring deposit account based on todays date and whether an interest posting or crediting event is due.\n\nShowing request/response for 'Post Interest on recurring Deposit Account'","operationId":"handleCommands","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountId","in":"path","description":"accountId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command","required":false,"type":"string"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostRecurringDepositAccountsAccountIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostRecurringDepositAccountsAccountIdResponse"}}}},"put":{"tags":["Recurring Deposit Account"],"summary":"Modify a recurring deposit application","description":"Recurring deposit application can only be modified when in 'Submitted and pending approval' state. Once the application is approved, the details cannot be changed using this method. Specific api endpoints will be created to allow change of interest detail such as rate, compounding period, posting period etc","operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountId","in":"path","description":"accountId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutRecurringDepositAccountsAccountIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PutRecurringDepositAccountsAccountIdResponse"}}}},"delete":{"tags":["Recurring Deposit Account"],"summary":"Delete a recurring deposit application","description":"At present we support hard delete of recurring deposit application so long as its in 'Submitted and pending approval' state. One the application is moves past this state, it is not possible to do a 'hard' delete of the application or the account. An API endpoint will be added to close/de-activate the recurring deposit account.","operationId":"delete","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountId","in":"path","description":"accountId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/DeleteRecurringDepositAccountsResponse"}}}}},"/recurringdepositaccounts":{"get":{"tags":["Recurring Deposit Account"],"summary":"List Recurring deposit applications/accounts","description":"Lists Recurring deposit applications/accounts\n\nExample Requests:\n\nrecurringdepositaccounts\n\n\nrecurringdepositaccounts?fields=name","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"paged","in":"query","description":"paged","required":false,"type":"boolean"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","description":"orderBy","required":false,"type":"string"},{"name":"sortOrder","in":"query","description":"sortOrder","required":false,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/GetRecurringDepositAccountsResponse"}}}}},"post":{"tags":["Recurring Deposit Account"],"summary":"Submit new recurring deposit application","description":"Submits new recurring deposit application\n\nMandatory Fields: clientId or groupId, productId, submittedOnDate, depositAmount, depositPeriod, depositPeriodFrequencyId\n\nOptional Fields: accountNo, externalId, fieldOfficerId,linkAccountId(if provided initial deposit amount will be collected from this account),transferInterestToSavings(By enabling this flag all interest postings will be transferred to linked saving account )\n\nInherited from Product (if not provided): interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType, lockinPeriodFrequency, lockinPeriodFrequencyType, preClosurePenalApplicable, preClosurePenalInterest, preClosurePenalInterestOnTypeId, charts, withHoldTax","operationId":"submitApplication","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostRecurringDepositAccountsRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostRecurringDepositAccountsResponse"}}}}},"/recurringdepositaccounts/downloadtemplate":{"get":{"tags":["Recurring Deposit Account"],"operationId":"getRecurringDepositTemplate","produces":["application/vnd.ms-excel"],"parameters":[{"name":"officeId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"staffId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"dateFormat","in":"query","required":false,"type":"string"}],"responses":{"default":{"description":"successful operation"}}}},"/recurringdepositaccounts/uploadtemplate":{"post":{"tags":["Recurring Deposit Account"],"operationId":"postRecurringDepositTemplate","consumes":["multipart/form-data"],"parameters":[{"name":"file","in":"formData","required":false,"type":"file"},{"name":"locale","in":"formData","required":false,"type":"string"},{"name":"dateFormat","in":"formData","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/recurringdepositaccounts/transactions/downloadtemplate":{"get":{"tags":["Recurring Deposit Account"],"operationId":"getRecurringDepositTransactionTemplate","produces":["application/vnd.ms-excel"],"parameters":[{"name":"officeId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"dateFormat","in":"query","required":false,"type":"string"}],"responses":{"default":{"description":"successful operation"}}}},"/recurringdepositaccounts/transactions/uploadtemplate":{"post":{"tags":["Recurring Deposit Account"],"operationId":"postRecurringDepositTransactionsTemplate","consumes":["multipart/form-data"],"parameters":[{"name":"file","in":"formData","required":false,"type":"file"},{"name":"locale","in":"formData","required":false,"type":"string"},{"name":"dateFormat","in":"formData","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/recurringdepositaccounts/{accountId}/template":{"get":{"tags":["Recurring Deposit Account"],"operationId":"accountClosureTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountId","in":"path","description":"accountId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/recurringdepositaccounts/template":{"get":{"tags":["Recurring Deposit Account"],"summary":"Retrieve recurring Deposit Account Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for recurring deposit applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\n\nExample Requests:\n\nrecurringdepositaccounts/template?clientId=1\n\n\nrecurringdepositaccounts/template?clientId=1&productId=1","operationId":"template","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"query","description":"clientId","required":false,"type":"integer","format":"int64"},{"name":"groupId","in":"query","description":"groupId","required":false,"type":"integer","format":"int64"},{"name":"productId","in":"query","description":"productId","required":false,"type":"integer","format":"int64"},{"name":"staffInSelectedOfficeOnly","in":"query","description":"staffInSelectedOfficeOnly","required":false,"type":"boolean","default":false}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetRecurringDepositAccountsTemplateResponse"}}}}},"/recurringdepositproducts/{productId}":{"get":{"tags":["Recurring Deposit Product"],"summary":"Retrieve a Recurring Deposit Product","description":"Retrieves a Recurring Deposit Product\n\nExample Requests:\n\nrecurringdepositproducts/1\n\n\nrecurringdepositproducts/1?template=true\n\n\nrecurringdepositproducts/1?fields=name,description","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"productId","in":"path","description":"productId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetRecurringDepositProductsProductIdResponse"}}}},"put":{"tags":["Recurring Deposit Product"],"summary":"Update a Recurring Deposit Product","description":"Updates a Recurring Deposit Product","operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"productId","in":"path","description":"productId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutRecurringDepositProductsRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PutRecurringDepositProductsResponse"}}}},"delete":{"tags":["Recurring Deposit Product"],"summary":"Delete a Recurring Deposit Product","description":"Deletes a Recurring Deposit Product","operationId":"delete","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"productId","in":"path","description":"productId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/DeleteRecurringDepositProductsProductIdResponse"}}}}},"/recurringdepositproducts/template":{"get":{"tags":["Recurring Deposit Product"],"operationId":"retrieveTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/recurringdepositproducts":{"get":{"tags":["Recurring Deposit Product"],"summary":"List Recuring Deposit Products","description":"Lists Recuring Deposit Products\n\nExample Requests:\n\nrecurringdepositproducts\n\n\nrecurringdepositproducts?fields=name","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/GetRecurringDepositProductsResponse"}}}}},"post":{"tags":["Recurring Deposit Product"],"summary":"Create a Recurring Deposit Product","description":"Creates a Recurring Deposit Product\n\nMandatory Fields: name, shortName, description, currencyCode, digitsAfterDecimal,inMultiplesOf, interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType, minDepositTerm, minDepositTermTypeId, recurringDepositFrequency, recurringDepositFrequencyTypeId, accountingRule, depositAmount\n\nMandatory Fields for Cash based accounting (accountingRule = 2): savingsReferenceAccountId, savingsControlAccountId, interestOnSavingsAccountId, incomeFromFeeAccountId, transfersInSuspenseAccountId, incomeFromPenaltyAccountId\n\nOptional Fields: lockinPeriodFrequency, lockinPeriodFrequencyType, maxDepositTerm, maxDepositTermTypeId, inMultiplesOfDepositTerm, inMultiplesOfDepositTermTypeId, preClosurePenalApplicable, preClosurePenalInterest, preClosurePenalInterestOnTypeId, feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, charges, charts, minDepositAmount, maxDepositAmount, withHoldTax, taxGroupId","operationId":"create","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostRecurringDepositProductsRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostRecurringDepositProductsResponse"}}}}},"/savingsaccounts/{savingsAccountId}/charges/template":{"get":{"tags":["Savings Charges"],"summary":"Retrieve Savings Charges Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\nExample Request:\n\nsavingsaccounts/1/charges/template","operationId":"retrieveTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"savingsAccountId","in":"path","description":"savingsAccountId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetSavingsAccountsSavingsAccountIdChargesTemplateResponse"}}}}},"/savingsaccounts/{savingsAccountId}/charges":{"get":{"tags":["Savings Charges"],"summary":"List Savings Charges","description":"Lists Savings Charges\n\nExample Requests:\n\nsavingsaccounts/1/charges\n\nsavingsaccounts/1/charges?chargeStatus=all\n\nsavingsaccounts/1/charges?chargeStatus=inactive\n\nsavingsaccounts/1/charges?chargeStatus=active\n\nsavingsaccounts/1/charges?fields=name,amountOrPercentage","operationId":"retrieveAllSavingsAccountCharges","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"savingsAccountId","in":"path","description":"savingsAccountId","required":true,"type":"integer","format":"int64"},{"name":"chargeStatus","in":"query","description":"chargeStatus","required":false,"type":"string","default":"all"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/GetSavingsAccountsSavingsAccountIdChargesResponse"}}}}},"post":{"tags":["Savings Charges"],"summary":"Create a Savings account Charge","description":"Creates a Savings account Charge\n\nMandatory Fields for Savings account Charges: chargeId, amount\n\nchargeId, amount, dueDate, dateFormat, locale\n\nchargeId, amount, feeOnMonthDay, monthDayFormat, locale","operationId":"addSavingsAccountCharge","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"savingsAccountId","in":"path","description":"savingsAccountId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostSavingsAccountsSavingsAccountIdChargesRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostSavingsAccountsSavingsAccountIdChargesResponse"}}}}},"/savingsaccounts/{savingsAccountId}/charges/{savingsAccountChargeId}":{"get":{"tags":["Savings Charges"],"summary":"Retrieve a Savings account Charge","description":"Retrieves a Savings account Charge\n\nExample Requests:\n\n/savingsaccounts/1/charges/5\n\n\n/savingsaccounts/1/charges/5?fields=name,amountOrPercentage","operationId":"retrieveSavingsAccountCharge","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"savingsAccountId","in":"path","description":"savingsAccountId","required":true,"type":"integer","format":"int64"},{"name":"savingsAccountChargeId","in":"path","description":"savingsAccountChargeId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse"}}}},"post":{"tags":["Savings Charges"],"summary":"Pay a Savings account Charge | Waive off a Savings account Charge | Inactivate a Savings account Charge","description":"Pay a Savings account Charge:\n\nAn active charge will be paid when savings account is active and having sufficient balance.\n\nWaive off a Savings account Charge:\n\nOutstanding charge amount will be waived off.\n\nInactivate a Savings account Charge:\n\nA charge will be allowed to inactivate when savings account is active and not having any dues as of today. If charge is overpaid, corresponding charge payment transactions will be reversed.\n\nShowing request/response for 'Pay a Savings account Charge'","operationId":"payOrWaiveSavingsAccountCharge","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"savingsAccountId","in":"path","description":"savingsAccountId","required":true,"type":"integer","format":"int64"},{"name":"savingsAccountChargeId","in":"path","description":"savingsAccountChargeId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command","required":false,"type":"string"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse"}}}},"put":{"tags":["Savings Charges"],"summary":"Update a Savings account Charge","description":"Currently Savings account Charges may be updated only if the Savings account is not yet approved.","operationId":"updateSavingsAccountCharge","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"savingsAccountId","in":"path","description":"savingsAccountId","required":true,"type":"integer","format":"int64"},{"name":"savingsAccountChargeId","in":"path","description":"savingsAccountChargeId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PutSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse"}}}},"delete":{"tags":["Savings Charges"],"summary":"Delete a Savings account Charge","description":"Note: Currently, A Savings account Charge may only be removed from Savings that are not yet approved.","operationId":"deleteSavingsAccountCharge","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"savingsAccountId","in":"path","description":"savingsAccountId","required":true,"type":"integer","format":"int64"},{"name":"savingsAccountChargeId","in":"path","description":"savingsAccountChargeId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/DeleteSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse"}}}}},"/savingsaccounts/{accountId}":{"get":{"tags":["Savings Account"],"summary":"Retrieve a savings application/account","description":"Retrieves a savings application/account\n\nExample Requests :\n\nsavingsaccounts/1\n\n\nsavingsaccounts/1?associations=all","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountId","in":"path","description":"accountId","required":true,"type":"integer","format":"int64"},{"name":"staffInSelectedOfficeOnly","in":"query","description":"staffInSelectedOfficeOnly","required":false,"type":"boolean","default":false},{"name":"chargeStatus","in":"query","description":"chargeStatus","required":false,"type":"string","default":"all"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetSavingsAccountsAccountIdResponse"}}}},"post":{"tags":["Savings Account"],"summary":"Approve savings application | Undo approval savings application | Assign Savings Officer | Unassign Savings Officer | Reject savings application | Withdraw savings application | Activate a savings account | Close a savings account | Calculate Interest on Savings Account | Post Interest on Savings Account | Block Savings Account | Unblock Savings Account | Block Savings Account Credit transactions | Unblock Savings Account Credit transactions | Block Savings Account Debit transactions | Unblock Savings Account debit transactions","description":"Approve savings application:\n\nApproves savings application so long as its in 'Submitted and pending approval' state.\n\nUndo approval savings application:\n\nWill move 'approved' savings application back to 'Submitted and pending approval' state.\n\nAssign Savings Officer:\n\nAllows you to assign Savings Officer for existing Savings Account.\n\nUnassign Savings Officer:\n\nAllows you to unassign the Savings Officer.\n\nReject savings application:\n\nRejects savings application so long as its in 'Submitted and pending approval' state.\n\nWithdraw savings application:\n\nUsed when an applicant withdraws from the savings application. It must be in 'Submitted and pending approval' state.\n\nActivate a savings account:\n\nResults in an approved savings application being converted into an 'active' savings account.\n\nClose a savings account:\n\nResults in an Activated savings application being converted into an 'closed' savings account.\n\nclosedOnDate is closure date of savings account\n\nwithdrawBalance is a boolean value, true value of this field performs a withdrawal transaction with account's running balance.\n\nMandatory Fields: dateFormat,locale,closedOnDate\n\nOptional Fields: note, withdrawBalance, paymentTypeId, accountNumber, checkNumber, routingCode, receiptNumber, bankNumber\n\nCalculate Interest on Savings Account:\n\nCalculates interest earned on a savings account based on todays date. It does not attempt to post or credit the interest on the account. That is responsibility of the Post Interest API that will likely be called by overnight process.\n\nPost Interest on Savings Account:\n\nCalculates and Posts interest earned on a savings account based on today's date and whether an interest posting or crediting event is due.\n\nBlock Savings Account:\n\nBlocks Savings account from all types of credit and debit transactions\n\nUnblock Savings Account:\n\nUnblock a blocked account. On unblocking account, user can perform debit and credit transactions\n\nBlock Savings Account Credit transactions:\n\nSavings account will be blocked from all types of credit transactions.\n\nUnblock Savings Account Credit transactions:\n\nIt unblocks the Saving account's credit operations. Now all types of credits can be transacted to Savings account\n\nBlock Savings Account Debit transactions:\n\nAll types of debit operations from Savings account wil be blocked\n\nUnblock Savings Account debit transactions:\n\nIt unblocks the Saving account's debit operations. Now all types of debits can be transacted from Savings account\n\nShowing request/response for 'Unassign Savings Officer'","operationId":"handleCommands","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountId","in":"path","description":"accountId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command","required":false,"type":"string"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostSavingsAccountsAccountIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostSavingsAccountsAccountIdResponse"}}}},"put":{"tags":["Savings Account"],"summary":"Modify a savings application | Modify savings account withhold tax applicability","description":"Modify a savings application:\n\nSavings application can only be modified when in 'Submitted and pending approval' state. Once the application is approved, the details cannot be changed using this method. Specific api endpoints will be created to allow change of interest detail such as rate, compounding period, posting period etc\n\nModify savings account withhold tax applicability:\n\nSavings application's withhold tax can be modified when in 'Active' state. Once the application is activated, can modify the account withhold tax to post tax or vice-versaShowing request/response for 'Modify a savings application'","operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountId","in":"path","description":"accountId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command","required":false,"type":"string"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutSavingsAccountsAccountIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PutSavingsAccountsAccountIdResponse"}}}},"delete":{"tags":["Savings Account"],"summary":"Delete a savings application","description":"At present we support hard delete of savings application so long as its in 'Submitted and pending approval' state. One the application is moves past this state, it is not possible to do a 'hard' delete of the application or the account. An API endpoint will be added to close/de-activate the savings account.","operationId":"delete","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountId","in":"path","description":"accountId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/DeleteSavingsAccountsAccountIdResponse"}}}}},"/savingsaccounts":{"get":{"tags":["Savings Account"],"summary":"List savings applications/accounts","description":"Lists savings applications/accounts\n\nExample Requests:\n\nsavingsaccounts\n\n\nsavingsaccounts?fields=name","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"sqlSearch","in":"query","description":"sqlSearch","required":false,"type":"string"},{"name":"externalId","in":"query","description":"externalId","required":false,"type":"string"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","description":"orderBy","required":false,"type":"string"},{"name":"sortOrder","in":"query","description":"sortOrder","required":false,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetSavingsAccountsResponse"}}}},"post":{"tags":["Savings Account"],"summary":"Submit new savings application","description":"Submits new savings application\n\nMandatory Fields: clientId or groupId, productId, submittedOnDate\n\nOptional Fields: accountNo, externalId, fieldOfficerId\n\nInherited from Product (if not provided): nominalAnnualInterestRate, interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType, minRequiredOpeningBalance, lockinPeriodFrequency, lockinPeriodFrequencyType, withdrawalFeeForTransfers, allowOverdraft, overdraftLimit, withHoldTax\n\nAdditional Mandatory Field if Entity-Datatable Check is enabled for the entity of type Savings: datatables","operationId":"submitApplication","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostSavingsAccountsRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostSavingsAccountsResponse"}}}}},"/savingsaccounts/downloadtemplate":{"get":{"tags":["Savings Account"],"operationId":"getSavingsTemplate","produces":["application/vnd.ms-excel"],"parameters":[{"name":"officeId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"staffId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"dateFormat","in":"query","required":false,"type":"string"}],"responses":{"default":{"description":"successful operation"}}}},"/savingsaccounts/uploadtemplate":{"post":{"tags":["Savings Account"],"operationId":"postSavingsTemplate","consumes":["multipart/form-data"],"parameters":[{"name":"file","in":"formData","required":false,"type":"file"},{"name":"locale","in":"formData","required":false,"type":"string"},{"name":"dateFormat","in":"formData","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/savingsaccounts/transactions/downloadtemplate":{"get":{"tags":["Savings Account"],"operationId":"getSavingsTransactionTemplate","produces":["application/vnd.ms-excel"],"parameters":[{"name":"officeId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"dateFormat","in":"query","required":false,"type":"string"}],"responses":{"default":{"description":"successful operation"}}}},"/savingsaccounts/transactions/uploadtemplate":{"post":{"tags":["Savings Account"],"operationId":"postSavingsTransactionTemplate","consumes":["multipart/form-data"],"parameters":[{"name":"file","in":"formData","required":false,"type":"file"},{"name":"locale","in":"formData","required":false,"type":"string"},{"name":"dateFormat","in":"formData","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/savingsaccounts/template":{"get":{"tags":["Savings Account"],"summary":"Retrieve Savings Account Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\n\nExample Requests:\n\nsavingsaccounts/template?clientId=1\n\n\nsavingsaccounts/template?clientId=1&productId=1","operationId":"template","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"query","description":"clientId","required":false,"type":"integer","format":"int64"},{"name":"groupId","in":"query","description":"groupId","required":false,"type":"integer","format":"int64"},{"name":"productId","in":"query","description":"productId","required":false,"type":"integer","format":"int64"},{"name":"staffInSelectedOfficeOnly","in":"query","description":"staffInSelectedOfficeOnly","required":false,"type":"boolean","default":false}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetSavingsAccountsTemplateResponse"}}}}},"/savingsproducts/{productId}":{"get":{"tags":["Savings Product"],"summary":"Retrieve a Savings Product","description":"Retrieves a Savings Product\n\nExample Requests:\n\nsavingsproducts/1\n\nsavingsproducts/1?template=true\n\nsavingsproducts/1?fields=name,description","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"productId","in":"path","description":"productId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetSavingsProductsProductIdResponse"}}}},"put":{"tags":["Savings Product"],"summary":"Update a Savings Product","description":"Updates a Savings Product","operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"productId","in":"path","description":"productId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutSavingsProductsProductIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PutSavingsProductsProductIdResponse"}}}},"delete":{"tags":["Savings Product"],"summary":"Delete a Savings Product","description":"Deletes a Savings Product","operationId":"delete","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"productId","in":"path","description":"productId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/DeleteSavingsProductsProductIdResponse"}}}}},"/savingsproducts/template":{"get":{"tags":["Savings Product"],"summary":"Retrieve Savings Product Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\nExample Request:\n\nsavingsproducts/template","operationId":"retrieveTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetSavingsProductsTemplateResponse"}}}}},"/savingsproducts":{"get":{"tags":["Savings Product"],"summary":"List Savings Products","description":"Lists Savings Products\n\nExample Requests:\n\nsavingsproducts\n\nsavingsproducts?fields=name","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/GetSavingsProductsResponse"}}}}},"post":{"tags":["Savings Product"],"summary":"Create a Savings Product","description":"Creates a Savings Product\n\nMandatory Fields: name, shortName, description, currencyCode, digitsAfterDecimal,inMultiplesOf, nominalAnnualInterestRate, interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType,accountingRule\n\nMandatory Fields for Cash based accounting (accountingRule = 2): savingsReferenceAccountId, savingsControlAccountId, interestOnSavingsAccountId, incomeFromFeeAccountId, transfersInSuspenseAccountId, incomeFromPenaltyAccountId\n\nOptional Fields: minRequiredOpeningBalance, lockinPeriodFrequency, lockinPeriodFrequencyType, withdrawalFeeForTransfers, paymentChannelToFundSourceMappings, feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, charges, allowOverdraft, overdraftLimit, minBalanceForInterestCalculation,withHoldTax,taxGroupId","operationId":"create","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostSavingsProductsRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostSavingsProductsResponse"}}}}},"/self/beneficiaries/tpt/template":{"get":{"tags":["Beneficiary Third Party Transfer"],"summary":"Beneficiary Third Party Transfer Template","description":"Returns Account Type enumerations. Self User is expected to know office name and account number to be able to add beneficiary.\n\nExample Requests:\n\n/self/beneficiaries/tpt/template","operationId":"template","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetSelfBeneficiariesTPTTemplateResponse"}}}}},"/self/beneficiaries/tpt":{"get":{"tags":["Beneficiary Third Party Transfer"],"summary":"Get All TPT Beneficiary","description":"Api to get all third party beneficiary linked to current user.\n\nExample Requests:\n\n/self/beneficiaries/tpt","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/GetSelfBeneficiariesTPTResponse"}}}}},"post":{"tags":["Beneficiary Third Party Transfer"],"summary":"Add TPT Beneficiary","description":"Api to add third party beneficiary linked to current user.\n\nParameter Definitions\n\nname : Nick name for beneficiary, should be unique for an self service user\n\nofficeName : Office Name of beneficiary(not id)\n\naccountNumber : Account Number of beneficiary(not id)\n\ntransferLimit : Each transfer initiated to this account will not exceed this amount\n\nExample Requests:\n\n/self/beneficiaries/tpt\n\nMandatory Fields: name, officeName, accountNumber, accountType\n\nOptional Fields: transferLimit","operationId":"add","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostSelfBeneficiariesTPTRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostSelfBeneficiariesTPTResponse"}}}}},"/self/beneficiaries/tpt/{beneficiaryId}":{"put":{"tags":["Beneficiary Third Party Transfer"],"summary":"Update TPT Beneficiary","description":"Api to update third party beneficiary linked to current user.\n\nExample Requests:\n\n/self/beneficiaries/tpt/{beneficiaryId}\n\nOptional Fields: name, transferLimit","operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"beneficiaryId","in":"path","description":"beneficiaryId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutSelfBeneficiariesTPTBeneficiaryIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PutSelfBeneficiariesTPTBeneficiaryIdResponse"}}}},"delete":{"tags":["Beneficiary Third Party Transfer"],"summary":"Delete TPT Beneficiary","description":"Api to delete third party beneficiary linked to current user.\n\nExample Requests:\n\n/self/beneficiaries/tpt/{beneficiaryId}","operationId":"delete","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"beneficiaryId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/DeleteSelfBeneficiariesTPTBeneficiaryIdResponse"}}}}},"/self/clients/{clientId}":{"get":{"tags":["Self Client"],"summary":"Retrieve a Client","description":"Retrieves a Client\n\nExample Requests:\n\nself/clients/1\n\nself/clients/1?fields=id,displayName,officeName","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","description":"clientId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetSelfClientsClientIdResponse"}}}}},"/self/clients/{clientId}/images":{"get":{"tags":["Self Client"],"summary":"Retrieve Client Image","description":"Optional arguments are identical to those of Get Image associated with an Entity (Binary file)\n\nExample Requests:\n\nself/clients/1/images","operationId":"retrieveImage","consumes":["text/plain","text/html","application/json"],"produces":["text/plain"],"parameters":[{"name":"clientId","in":"path","description":"clientId","required":true,"type":"integer","format":"int64"},{"name":"maxWidth","in":"query","required":false,"type":"integer","format":"int32","x-example":"maxWidth"},{"name":"maxHeight","in":"query","required":false,"type":"integer","format":"int32","x-example":"maxHeight"},{"name":"output","in":"query","required":false,"type":"string","x-example":"output"}],"responses":{"200":{"description":"OK"}}},"post":{"tags":["Self Client"],"operationId":"addNewClientImage","consumes":["multipart/form-data"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"Content-Length","in":"header","required":false,"type":"integer","format":"int64"},{"name":"file","in":"formData","required":false,"type":"file"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"delete":{"tags":["Self Client"],"operationId":"deleteClientImage","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/self/clients/{clientId}/charges":{"get":{"tags":["Self Client"],"summary":"List Client Charges","description":"The list capability of client charges supports pagination.\n\nExample Requests:\n\nself/clients/1/charges\n\nself/clients/1/charges?offset=0&limit=5","operationId":"retrieveAllClientCharges","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","description":"clientId","required":true,"type":"integer","format":"int64"},{"name":"chargeStatus","in":"query","description":"chargeStatus","required":false,"type":"string","default":"all"},{"name":"pendingPayment","in":"query","description":"pendingPayment","required":false,"type":"boolean"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetSelfClientsClientIdChargesResponse"}}}}},"/self/clients/{clientId}/charges/{chargeId}":{"get":{"tags":["Self Client"],"summary":"Retrieve a Client Charge","description":"Retrieves a Client Charge\n\nExample Requests:\n\nself/clients/1/charges/1\n\n\nself/clients/1/charges/1?fields=name,id","operationId":"retrieveClientCharge","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","description":"clientId","required":true,"type":"integer","format":"int64"},{"name":"chargeId","in":"path","description":"chargeId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetSelfClientsClientIdChargesChargeIdResponse"}}}}},"/self/clients/{clientId}/accounts":{"get":{"tags":["Self Client"],"summary":"Retrieve client accounts overview","description":"An example of how a loan portfolio summary can be provided. This is requested in a specific use case of the community application.\nIt is quite reasonable to add resources like this to simplify User Interface development.\n\nExample Requests:\n\nself/clients/1/accounts\n\n\nself/clients/1/accounts?fields=loanAccounts,savingsAccounts","operationId":"retrieveAssociatedAccounts","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","description":"clientId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetSelfClientsClientIdAccountsResponse"}}}}},"/self/clients/{clientId}/obligeedetails":{"get":{"tags":["Self Client"],"operationId":"retrieveObligeeDetails","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/self/clients/{clientId}/transactions":{"get":{"tags":["Self Client"],"summary":"List Client Transactions","description":"The list capability of client transaction can support pagination.\n\nExample Requests:\n\nself/clients/189/transactions\n\nself/clients/189/transactions?offset=10&limit=50","operationId":"retrieveAllClientTransactions","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","description":"clientId","required":true,"type":"integer","format":"int64"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetSelfClientsClientIdTransactionsResponse"}}}}},"/self/clients/{clientId}/transactions/{transactionId}":{"get":{"tags":["Self Client"],"summary":"Retrieve a Client Transaction","description":"Retrieves a Client TransactionExample Requests:\n\nself/clients/1/transactions/1\n\n\nself/clients/1/transactions/1?fields=id,officeName","operationId":"retrieveClientTransaction","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","description":"clientId","required":true,"type":"integer","format":"int64"},{"name":"transactionId","in":"path","description":"transactionId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetSelfClientsClientIdTransactionsTransactionIdResponse"}}}}},"/self/clients":{"get":{"tags":["Self Client"],"summary":"List Clients associated to the user","description":"The list capability of clients can support pagination and sorting.\n\nExample Requests:\n\nself/clients\n\nself/clients?fields=displayName,officeName\n\nself/clients?offset=10&limit=50\n\nself/clients?orderBy=displayName&sortOrder=DESC","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"displayName","in":"query","description":"displayName","required":false,"type":"string"},{"name":"firstName","in":"query","description":"firstName","required":false,"type":"string"},{"name":"lastName","in":"query","description":"lastName","required":false,"type":"string"},{"name":"offset","in":"query","description":"offset","required":false,"type":"integer","format":"int32"},{"name":"limit","in":"query","description":"limit","required":false,"type":"integer","format":"int32"},{"name":"orderBy","in":"query","description":"orderBy","required":false,"type":"string"},{"name":"sortOrder","in":"query","description":"sortOrder","required":false,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetSelfClientsResponse"}}}}},"/self/loans/{loanId}/transactions/{transactionId}":{"get":{"tags":["Self Loans"],"summary":"Retrieve a Loan Transaction Details","description":"Retrieves a Loan Transaction DetailsExample Request:\n\nself/loans/5/transactions/3","operationId":"retrieveTransaction","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"loanId","in":"path","description":"loanId","required":true,"type":"integer","format":"int64"},{"name":"transactionId","in":"path","description":"transactionId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetSelfLoansLoanIdTransactionsTransactionIdResponse"}}}}},"/self/loans/{loanId}/charges":{"get":{"tags":["Self Loans"],"summary":"List Loan Charges","description":"Lists loan Charges\n\nExample Requests:\n\nself/loans/1/charges\n\n\nself/loans/1/charges?fields=name,amountOrPercentage","operationId":"retrieveAllLoanCharges","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"loanId","in":"path","description":"loanId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/GetSelfLoansLoanIdChargesResponse"}}}}}},"/self/loans/{loanId}/charges/{chargeId}":{"get":{"tags":["Self Loans"],"summary":"Retrieve a Loan Charge","description":"Retrieves a Loan Charge\n\nExample Requests:\n\nself/loans/1/charges/1\n\n\nself/loans/1/charges/1?fields=name,amountOrPercentage","operationId":"retrieveLoanCharge","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"loanId","in":"path","description":"loanId","required":true,"type":"integer","format":"int64"},{"name":"chargeId","in":"path","description":"chargeId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetSelfLoansLoanIdChargesResponse"}}}}},"/self/loans/{loanId}":{"get":{"tags":["Self Loans"],"summary":"Retrieve a Loan","description":"Retrieves a Loan\n\nExample Requests:\n\nself/loans/1\n\n\nself/loans/1?fields=id,principal,annualInterestRate\n\n\nself/loans/1?fields=id,principal,annualInterestRate&associations=repaymentSchedule,transactions","operationId":"retrieveLoan","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"loanId","in":"path","description":"loanId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetSelfLoansLoanIdResponse"}}}},"post":{"tags":["Self Loans"],"summary":"Applicant Withdraws from Loan Application","description":"Applicant Withdraws from Loan Application\n\nMandatory Fields: withdrawnOnDate","operationId":"stateTransitions","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"loanId","in":"path","description":"loanId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command","required":false,"type":"string"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostSelfLoansLoanIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostSelfLoansLoanIdResponse"}}}},"put":{"tags":["Self Loans"],"summary":"Update a Loan Application","description":"Loan application can only be modified when in 'Submitted and pending approval' state. Once the application is approved, the details cannot be changed using this method.","operationId":"modifyLoanApplication","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"loanId","in":"path","description":"loanId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutSelfLoansLoanIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PutSelfLoansLoanIdResponse"}}}}},"/self/loans":{"post":{"tags":["Self Loans"],"summary":"Calculate Loan Repayment Schedule | Submit a new Loan Application","description":"Calculate Loan Repayment Schedule:\n\nCalculates Loan Repayment Schedule\n\nMandatory Fields: productId, principal, loanTermFrequency, loanTermFrequencyType, numberOfRepayments, repaymentEvery, repaymentFrequencyType, interestRatePerPeriod, amortizationType, interestType, interestCalculationPeriodType, expectedDisbursementDate, transactionProcessingStrategyId\n\nSubmit a new Loan Application:\n\nMandatory Fields: clientId, productId, principal, loanTermFrequency, loanTermFrequencyType, loanType, numberOfRepayments, repaymentEvery, repaymentFrequencyType, interestRatePerPeriod, amortizationType, interestType, interestCalculationPeriodType, transactionProcessingStrategyId, expectedDisbursementDate, submittedOnDate, loanType\n\nAdditional Mandatory Fields if interest recalculation is enabled for product and Rest frequency not same as repayment period: recalculationRestFrequencyDate\n\nAdditional Mandatory Fields if interest recalculation with interest/fee compounding is enabled for product and compounding frequency not same as repayment period: recalculationCompoundingFrequencyDate\n\nAdditional Mandatory Field if Entity-Datatable Check is enabled for the entity of type loan: datatables\n\nOptional Fields: graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, linkAccountId, allowPartialPeriodInterestCalcualtion, fixedEmiAmount, maxOutstandingLoanBalance, disbursementData, graceOnArrearsAgeing, createStandingInstructionAtDisbursement (requires linkedAccountId if set to true)\n\nShowing request/response for 'Submit a new Loan Application'","operationId":"calculateLoanScheduleOrSubmitLoanApplication","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"command","in":"query","description":"command","required":false,"type":"string"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostSelfLoansRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostSelfLoansResponse"}}}}},"/self/loans/{loanId}/guarantors":{"get":{"tags":["Self Loans"],"operationId":"retrieveGuarantorDetails","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"loanId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/self/loans/template":{"get":{"tags":["Self Loans"],"summary":"Retrieve Loan Details Template","description":"Retrieves Loan Details Template\n\nThis is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\n\nExample Requests:\n\nself/loans/template?templateType=individual&clientId=1\n\n\nself/loans/template?templateType=individual&clientId=1&productId=1","operationId":"template","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"query","description":"clientId","required":false,"type":"integer","format":"int64"},{"name":"productId","in":"query","description":"productId","required":false,"type":"integer","format":"int64"},{"name":"templateType","in":"query","description":"templateType","required":false,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetSelfLoansTemplateResponse"}}}}},"/self/savingsaccounts/{accountId}/transactions/{transactionId}":{"get":{"tags":["Self Savings Account"],"summary":"Retrieve Savings Account Transaction","description":"Retrieves Savings Account Transaction\n\nExample Requests:\n\nself/savingsaccounts/1/transactions/1","operationId":"retrieveSavingsTransaction","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountId","in":"path","description":"accountId","required":true,"type":"integer","format":"int64"},{"name":"transactionId","in":"path","description":"transactionId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetSelfSavingsAccountsAccountIdTransactionsTransactionIdResponse"}}}}},"/self/savingsaccounts/{accountId}":{"get":{"tags":["Self Savings Account"],"summary":"Retrieve a savings account","description":"Retrieves a savings account\n\nExample Requests :\n\nself/savingsaccounts/1\n\n\nself/savingsaccounts/1?associations=transactions","operationId":"retrieveSavings","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountId","in":"path","description":"accountId","required":true,"type":"integer","format":"int64"},{"name":"chargeStatus","in":"query","description":"chargeStatus","required":false,"type":"string","default":"all"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetSelfSavingsAccountsResponse"}}}},"put":{"tags":["Self Savings Account"],"operationId":"modifySavingsAccountApplication","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountId","in":"path","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","required":false,"type":"string"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/self/savingsaccounts/{accountId}/charges":{"get":{"tags":["Self Savings Account"],"summary":"List Savings Charges","description":"Lists Savings Charges\n\nExample Requests:\n\nself/savingsaccounts/1/charges\n\nself/savingsaccounts/1/charges?chargeStatus=inactive\n\nself/savingsaccounts/1/charges?fields=name,amountOrPercentage","operationId":"retrieveAllSavingsAccountCharges","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountId","in":"path","description":"accountId","required":true,"type":"integer","format":"int64"},{"name":"chargeStatus","in":"query","description":"chargeStatus","required":false,"type":"string","default":"all"}],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/GetSelfSavingsAccountsAccountIdChargesResponse"}}}}}},"/self/savingsaccounts/{accountId}/charges/{savingsAccountChargeId}":{"get":{"tags":["Self Savings Account"],"summary":"Retrieve a Savings account Charge","description":"Retrieves a Savings account Charge\n\nExample Requests:\n\nself/savingsaccounts/1/charges/5\n\n\nself/savingsaccounts/1/charges/5?fields=name,amountOrPercentage","operationId":"retrieveSavingsAccountCharge","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"accountId","in":"path","description":"accountId","required":true,"type":"integer","format":"int64"},{"name":"savingsAccountChargeId","in":"path","description":"savingsAccountChargeId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetSelfSavingsAccountsAccountIdChargesSavingsAccountChargeIdResponse"}}}}},"/self/savingsaccounts":{"post":{"tags":["Self Savings Account"],"operationId":"submitSavingsAccountApplication","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"command","in":"query","required":false,"type":"string"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/self/savingsaccounts/template":{"get":{"tags":["Self Savings Account"],"operationId":"template","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"productId","in":"query","required":false,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/self/authentication":{"post":{"tags":["Self Authentication"],"summary":"Verify authentication","description":"Authenticates the credentials provided and returns the set roles and permissions allowed.\n\nPlease visit this link for more info - https://demo.openmf.org/api-docs/apiLive.htm#selfbasicauth","operationId":"authenticate","produces":["application/json"],"parameters":[{"name":"username","in":"query","description":"username","required":false,"type":"string"},{"name":"password","in":"query","description":"password","required":false,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostSelfAuthenticationResponse"}}}}},"/self/user":{"put":{"tags":["Self User"],"summary":"Update User","description":"This API can be used by Self Service user to update their own user information. Currently, \"password\" and \"repeatPassword\" are the only parameters accepted.","operationId":"update","parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutSelfUserRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PutSelfUserResponse"}}}}},"/self/userdetails":{"get":{"tags":["Self User Details"],"summary":"Fetch authenticated user details","description":"Checks the Authentication and returns the set roles and permissions allowed\n\nFor more info visit this link - https://demo.openmf.org/api-docs/apiLive.htm#selfoauth","operationId":"fetchAuthenticatedUserData","produces":["application/json"],"parameters":[{"name":"access_token","in":"query","description":"äccess_token","required":false,"type":"string"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetSelfUserDetailsResponse"}}}}},"/taxes/component/template":{"get":{"tags":["Tax Components"],"operationId":"retrieveTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/taxes/component":{"get":{"tags":["Tax Components"],"summary":"List Tax Components","description":"List Tax Components","operationId":"retrieveAllTaxComponents","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/GetTaxesComponentsResponse"}}}}},"post":{"tags":["Tax Components"],"summary":"Create a new Tax Component","description":"Creates a new Tax Component\n\nMandatory Fields: name, percentage\n\nOptional Fields: debitAccountType, debitAcountId, creditAccountType, creditAcountId, startDate","operationId":"createTaxCompoent","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostTaxesComponentsRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostTaxesComponentsResponse"}}}}},"/taxes/component/{taxComponentId}":{"get":{"tags":["Tax Components"],"summary":"Retrieve Tax Component","description":"Retrieve Tax Component","operationId":"retrieveTaxComponent","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"taxComponentId","in":"path","description":"taxComponentId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetTaxesComponentsResponse"}}}},"put":{"tags":["Tax Components"],"summary":"Update Tax Component","description":"Updates Tax component. Debit and credit account details cannot be modified. All the future tax components would be replaced with the new percentage.","operationId":"updateTaxCompoent","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"taxComponentId","in":"path","description":"taxComponentId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutTaxesComponentsTaxComponentIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PutTaxesComponentsTaxComponentIdResponse"}}}}},"/taxes/group":{"get":{"tags":["Tax Group"],"summary":"List Tax Group","description":"List Tax Group","operationId":"retrieveAllTaxGroups","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"$ref":"#/definitions/GetTaxesGroupResponse"}}}}},"post":{"tags":["Tax Group"],"summary":"Create a new Tax Group","description":"Create a new Tax Group\nMandatory Fields: name and taxComponents\nMandatory Fields in taxComponents: taxComponentId\nOptional Fields in taxComponents: id, startDate and endDate","operationId":"createTaxGroup","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostTaxesGroupRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PostTaxesGroupResponse"}}}}},"/taxes/group/template":{"get":{"tags":["Tax Group"],"operationId":"retrieveTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/taxes/group/{taxGroupId}":{"get":{"tags":["Tax Group"],"summary":"Retrieve Tax Group","description":"Retrieve Tax Group","operationId":"retrieveTaxGroup","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"taxGroupId","in":"path","description":"taxGroupId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/GetTaxesGroupResponse"}}}},"put":{"tags":["Tax Group"],"summary":"Update Tax Group","description":"Updates Tax Group. Only end date can be up-datable and can insert new tax components.","operationId":"updateTaxGroup","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"taxGroupId","in":"path","description":"taxGroupId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutTaxesGroupTaxGroupIdRequest"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/PutTaxesGroupTaxGroupIdResponse"}}}}},"/surveys/{surveyId}/lookuptables":{"get":{"tags":["SPM API - LookUp Table"],"summary":"List all Lookup Table entries","description":"List all Lookup Table entries for a survey.","operationId":"fetchLookupTables","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"surveyId","in":"path","description":"Enter surveyId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/LookupTableData"}}}}},"post":{"tags":["SPM API - LookUp Table"],"summary":"Create a Lookup Table entry","description":"Add a new netry to a survey.\n\nMandatory Fields\nkey, score, validFrom, validTo","operationId":"createLookupTable","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"surveyId","in":"path","description":"Enter surveyId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"$ref":"#/definitions/LookupTableData"}}],"responses":{"200":{"description":"OK"}}}},"/surveys/{surveyId}/lookuptables/{key}":{"get":{"tags":["SPM API - LookUp Table"],"summary":"Retrieve a Lookup Table entry","description":"Retrieve a Lookup Table entry for a survey.","operationId":"findLookupTable","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"surveyId","in":"path","description":"Enter surveyId","required":true,"type":"integer","format":"int64"},{"name":"key","in":"path","description":"Enter key","required":true,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/LookupTableData"}}}}},"/surveys/scorecards/{surveyId}":{"get":{"tags":["SPM - Scorecards"],"summary":"List all Scorecard entries","description":"List all Scorecard entries for a survey.","operationId":"findBySurvey","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"surveyId","in":"path","description":"Enter surveyId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/Scorecard"}}}}},"post":{"tags":["SPM - Scorecards"],"summary":"Create a Scorecard entry","description":"Add a new netry to a survey.\n\nMandatory Fields\nclientId, createdOn, questionId, responseId, staffId","operationId":"createScorecard","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"surveyId","in":"path","description":"Enter surveyId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"$ref":"#/definitions/ScorecardData"}}],"responses":{"200":{"description":"OK"}}}},"/surveys/scorecards/{surveyId}/clients/{clientId}":{"get":{"tags":["SPM - Scorecards"],"operationId":"findBySurveyAndClient","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"surveyId","in":"path","description":"Enter surveyId","required":true,"type":"integer","format":"int64"},{"name":"clientId","in":"path","description":"Enter clientId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"array","items":{"$ref":"#/definitions/ScorecardData"}},"headers":{}}}}},"/surveys/scorecards/clients/{clientId}":{"get":{"tags":["SPM - Scorecards"],"operationId":"findByClient","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"clientId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"array","items":{"$ref":"#/definitions/ScorecardData"}},"headers":{}}}}},"/surveys":{"get":{"tags":["SPM - Serveys"],"summary":"List all Surveys","description":"","operationId":"fetchAllSurveys","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"isActive","in":"query","required":false,"type":"boolean"}],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/SurveyData"}}}}},"post":{"tags":["SPM - Serveys"],"summary":"Create a Survey","description":"Adds a new survey to collect client related data.\n\nMandatory Fields\n\ncountryCode, key, name, questions, responses, sequenceNo, text, value","operationId":"createSurvey","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"Create survey","required":false,"schema":{"$ref":"#/definitions/SurveyData"}}],"responses":{"200":{"description":"OK"}}}},"/surveys/{id}":{"get":{"tags":["SPM - Serveys"],"summary":"Retrieve a Survey","description":"","operationId":"findSurvey","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","description":"Enter id","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/SurveyData"}}}},"post":{"tags":["SPM - Serveys"],"summary":"Deactivate Survey","description":"","operationId":"activateOrDeactivateSurvey","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","required":false,"type":"string"}],"responses":{"200":{"description":"OK"}}},"put":{"tags":["SPM - Serveys"],"operationId":"editSurvey","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"id","in":"path","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"$ref":"#/definitions/SurveyData"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/templates/{templateId}":{"get":{"tags":["User Generated Documents"],"summary":"Retrieve a UGD","description":"Example Requests:\n\ntemplates/1","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"templateId","in":"path","description":"templateId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetTemplatesTemplateIdResponse"}}}},"post":{"tags":["User Generated Documents"],"operationId":"mergeTemplate","consumes":["application/json"],"produces":["text/html"],"parameters":[{"name":"templateId","in":"path","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}},"put":{"tags":["User Generated Documents"],"summary":"Update a UGD","description":"","operationId":"saveTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"templateId","in":"path","description":"templateId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutTemplatesTemplateIdRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutTemplatesTemplateIdResponse"}}}},"delete":{"tags":["User Generated Documents"],"summary":"Delete a UGD","description":"","operationId":"deleteTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"templateId","in":"path","description":"templateId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteTemplatesTemplateIdResponse"}}}}},"/templates":{"get":{"tags":["User Generated Documents"],"summary":"Retrieve all UGDs","description":"Example Requests:\n\ntemplates\n\nIt is also possible to get specific UGDs by entity and type:\n\ntemplates?type=0&entity=0\n[Entity: Id]\n\n\n\n\n\nclient: 0, loan: 1\n\n[Type: Id]\n\n\n\nDocument: 0, E-Mail (not yet): 1, SMS: 2","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"typeId","in":"query","description":"typeId","required":false,"type":"integer","default":-1,"format":"int32"},{"name":"entityId","in":"query","description":"entityId","required":false,"type":"integer","default":-1,"format":"int32"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetTemplatesResponse"}}}},"post":{"tags":["User Generated Documents"],"summary":"Add a UGD","description":"Adds a new UGD.\n\nMandatory Fields\nname\n\n\n\nExample Requests:\n\ntemplates/1","operationId":"createTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostTemplatesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostTemplatesResponse"}}}}},"/templates/{templateId}/template":{"get":{"tags":["User Generated Documents"],"operationId":"getTemplateByTemplate","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"templateId","in":"path","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/templates/template":{"get":{"tags":["User Generated Documents"],"summary":"Retrieve UGD Details Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for UGDs. The UGD data returned consists of any or all of:\n\nARGUMENTS\nname String entity String type String text String optional mappers Mapper optional\nExample Request:\n\ntemplates/template","operationId":"template","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetTemplatesTemplateResponse"}}}}},"/passwordpreferences":{"get":{"tags":["Password preferences"],"operationId":"retrieve","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetPasswordPreferencesTemplateResponse"}}}},"put":{"tags":["Password preferences"],"summary":"Update password preferences","description":"","operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutPasswordPreferencesTemplateRequest"}}],"responses":{"200":{"description":""}}}},"/passwordpreferences/template":{"get":{"tags":["Password preferences"],"summary":"List Application Password validation policies","description":"ARGUMENTS\nExample Requests:\n\npasswordpreferences","operationId":"template","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetPasswordPreferencesTemplateResponse"}}}}}},"/permissions":{"get":{"tags":["Permissions"],"summary":"List Application Permissions","description":"ARGUMENTS\nmakerCheckerableoptional, Values are true, false. Default is false.\nIf makerCheckerable=false or not supplied then a list of application permissions is returned. The \"selected\" attribute is always true in this case.\n\nIf makerCheckerable=true then the \"selected\" attribute shows whether the permission is enabled for Maker Check functionality.\n\nNote: Each Apache Fineract transaction is associated with a permission.\n\nExample Requests:\n\npermissions\n\n\npermissions?makerCheckerable=true\n\n\npermissions?fields=grouping,code","operationId":"retrieveAllPermissions","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetPermissionsResponse"}}}}},"put":{"tags":["Permissions"],"summary":"Enable/Disable Permissions for Maker Checker","description":"","operationId":"updatePermissionsDetails","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutPermissionsRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/CommandProcessingResult"}}}}},"/roles/{roleId}":{"get":{"tags":["Roles"],"summary":"Retrieve a Role","description":"Example Requests:\n\nroles/1\n\n\nroles/1?fields=name","operationId":"retrieveRole","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roleId","in":"path","description":"roleId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetRolesRoleIdResponse"}}}},"post":{"tags":["Roles"],"summary":"Enable Role | Disable Role","description":"Description : Enable role in case role is disabled. | Disable the role in case role is not associated with any users.\n\n\n\n\n\nExample Request: https://DomainName/api/v1/roles/{roleId}?command=enable\n\n\n\n\n\nhttps://DomainName/api/v1/roles/{roleId}?command=disable","operationId":"actionsOnRoles","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roleId","in":"path","description":"roleId","required":true,"type":"integer","format":"int64"},{"name":"command","in":"query","description":"command","required":false,"type":"string"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostRolesRoleIdResponse"}}}},"put":{"tags":["Roles"],"summary":"Update a Role","description":"","operationId":"updateRole","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roleId","in":"path","description":"roleId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutRolesRoleIdRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutRolesRoleIdResponse"}}}},"delete":{"tags":["Roles"],"summary":"Delete a Role","description":"Description : Delete the role in case role is not associated with any users.","operationId":"deleteRole","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roleId","in":"path","description":"roleId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteRolesRoleIdResponse"}}}}},"/roles":{"get":{"tags":["Roles"],"summary":"List Roles","description":"Example Requests:\n\nroles\n\n\nroles?fields=name","operationId":"retrieveAllRoles","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetRolesResponse"}}}}},"post":{"tags":["Roles"],"summary":"Create a New Role","description":"Mandatory Fields\nname, description","operationId":"createRole","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostRolesRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostRolesResponse"}}}}},"/roles/{roleId}/permissions":{"get":{"tags":["Roles"],"summary":"Retrieve a Role's Permissions","description":"Example Requests:\n\nroles/1/permissions","operationId":"retrieveRolePermissions","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roleId","in":"path","description":"roleId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetRolesRoleIdPermissionsResponse"}}}},"put":{"tags":["Roles"],"summary":"Update a Role's Permissions","description":"","operationId":"updateRolePermissions","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roleId","in":"path","description":"roleId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutRolesRoleIdPermissionsRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutRolesRoleIdPermissionsResponse"}}}}},"/users/{userId}":{"get":{"tags":["Users"],"summary":"Retrieve a User","description":"Example Requests:\n\nusers/1\n\n\nusers/1?template=true\n\n\nusers/1?fields=username,officeName","operationId":"retrieveOne","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","description":"userId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetUsersUserIdResponse"}}}},"put":{"tags":["Users"],"summary":"Update a User","description":"When updating a password you must provide the repeatPassword parameter also.","operationId":"update","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","description":"userId","required":true,"type":"integer","format":"int64"},{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PutUsersUserIdRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PutUsersUserIdResponse"}}}},"delete":{"tags":["Users"],"summary":"Delete a User","description":"Removes the user and the associated roles and permissions.","operationId":"delete","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"userId","in":"path","description":"userId","required":true,"type":"integer","format":"int64"}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/DeleteUsersUserIdResponse"}}}}},"/users/downloadtemplate":{"get":{"tags":["Users"],"operationId":"getUserTemplate","produces":["application/vnd.ms-excel"],"parameters":[{"name":"officeId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"staffId","in":"query","required":false,"type":"integer","format":"int64"},{"name":"dateFormat","in":"query","required":false,"type":"string"}],"responses":{"default":{"description":"successful operation"}}}},"/users/uploadtemplate":{"post":{"tags":["Users"],"operationId":"postUsersTemplate","consumes":["multipart/form-data"],"parameters":[{"name":"file","in":"formData","required":false,"type":"file"},{"name":"locale","in":"formData","required":false,"type":"string"},{"name":"dateFormat","in":"formData","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"type":"string"},"headers":{}}}}},"/users/template":{"get":{"tags":["Users"],"summary":"Retrieve User Details Template","description":"This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n\nField Defaults\nAllowed Value Lists\nExample Request:\n\nusers/template","operationId":"template","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/GetUsersTemplateResponse"}}}}},"/users":{"get":{"tags":["Users"],"summary":"Retrieve list of users","description":"Example Requests:\n\nusers\n\n\nusers?fields=id,username,email,officeName","operationId":"retrieveAll","consumes":["application/json"],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"","schema":{"type":"array","items":{"$ref":"#/definitions/GetUsersResponse"}}}}},"post":{"tags":["Users"],"summary":"Create a User","description":"Adds new application user.\n\nNote: Password information is not required (or processed). Password details at present are auto-generated and then sent to the email account given (which is why it can take a few seconds to complete).\n\nMandatory Fields: \nusername, firstname, lastname, email, officeId, roles, sendPasswordToEmail\n\nOptional Fields: \nstaffId,passwordNeverExpires,isSelfServiceUser,clients","operationId":"create","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"body","required":true,"schema":{"$ref":"#/definitions/PostUsersRequest"}}],"responses":{"200":{"description":"","schema":{"$ref":"#/definitions/PostUsersResponse"}}}}}},"definitions":{"runaccrualsRequest":{"type":"object","required":["tillDate"],"properties":{"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"tillDate":{"type":"string","example":"04 June 2014"}}},"GetGLClosureResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":7},"officeId":{"type":"integer","format":"int64","example":1},"officeName":{"type":"string","example":"Head Office"},"closingDate":{"type":"string","format":"date","example":"2013,1,2"},"deleted":{"type":"boolean","example":false},"createdDate":{"type":"string","format":"date","example":"2013,1,3"},"lastUpdatedDate":{"type":"string","format":"date","example":"2013,1,3"},"createdByUserId":{"type":"integer","format":"int64","example":1},"createdByUsername":{"type":"string","example":"mifos"},"lastUpdatedByUserId":{"type":"integer","format":"int64","example":1},"lastUpdatedByUsername":{"type":"string","example":"mifos"},"comments":{"type":"string","example":"closed"}}},"PostGlClosuresResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"resourceId":{"type":"integer","format":"int64","example":9}}},"PostGLCLosuresRequest":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"closingDate":{"type":"string","format":"date","example":"06 December 2012"},"comments":{"type":"string","example":"The accountants are heading for a carribean vacation"},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"}}},"PutGlClosuresResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"resourceId":{"type":"integer","format":"int64","example":9},"comments":{"type":"string","example":"All transactions verified by Johnny Cash"}}},"PutGlClosuresRequest":{"type":"object","properties":{"comments":{"type":"string","example":"All transactions verified by Johnny Cash"}}},"DeleteGlClosuresResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"resourceId":{"type":"integer","format":"int64","example":9}}},"PostFinancialActivityAccountsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PostFinancialActivityAccountsRequest":{"type":"object","properties":{"financialActivityId":{"type":"integer","format":"int64","example":200},"glAccountId":{"type":"integer","format":"int64","example":2}}},"PutFinancialActivityAccountsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1},"comments":{"$ref":"#/definitions/PutFinancialActivityAccountscommentsSwagger"}}},"PutFinancialActivityAccountscommentsSwagger":{"type":"object","properties":{"glAccountId":{"type":"integer","format":"int64","example":1}}},"CodeValueData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"active":{"type":"boolean"},"mandatory":{"type":"boolean"}}},"EnumOptionData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"code":{"type":"string"},"value":{"type":"string"}}},"FinancialActivityData":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"name":{"type":"string"},"mappedGLAccountType":{"type":"string","enum":["ASSET","LIABILITY","EQUITY","INCOME","EXPENSE"]}}},"GLAccountData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"glCode":{"type":"string"},"type":{"$ref":"#/definitions/EnumOptionData"},"tagId":{"$ref":"#/definitions/CodeValueData"},"rowIndex":{"type":"integer","format":"int32"},"typeId":{"type":"integer","format":"int32"}}},"GetFinancialActivityAccountsResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"financialActivityData":{"$ref":"#/definitions/FinancialActivityData"},"glAccountData":{"$ref":"#/definitions/GLAccountData"}}},"DeleteFinancialActivityAccountsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PostGLAccountsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":22}}},"PostGLAccountsRequest":{"type":"object","properties":{"name":{"type":"string","example":"Cash at Bangalore"},"glCode":{"type":"string","example":"100001"},"manualEntriesAllowed":{"type":"boolean","example":true},"type":{"type":"string","example":"1"},"tagId":{"type":"string","example":"10"},"parentId":{"type":"integer","format":"int64","example":1},"usage":{"example":"1","$ref":"#/definitions/EnumOptionData"},"description":{"type":"string","example":"Desc"}}},"PutGLAccountsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1},"changes":{"$ref":"#/definitions/PutGLAccountsResponsechangesSwagger"}}},"PutGLAccountsResponsechangesSwagger":{"type":"object","properties":{"name":{"type":"string","example":"Cash at Bangalore"}}},"PutGLAccountsRequest":{"type":"object","properties":{"name":{"type":"string","example":"Cash at Bangalore"}}},"GetGLAccountsTemplateResponse":{"type":"object","properties":{"disabled":{"type":"boolean","example":false},"manualEntriesAllowed":{"type":"boolean","example":true},"type":{"$ref":"#/definitions/EnumOptionData"},"usage":{"$ref":"#/definitions/EnumOptionData"},"accountTypeOptions":{"type":"array","items":{"$ref":"#/definitions/EnumOptionData"}},"usageOptions":{"type":"array","items":{"$ref":"#/definitions/EnumOptionData"}},"assetHeaderAccountOptions":{"type":"array","items":{"$ref":"#/definitions/GLAccountData"}},"liabilityHeaderAccountOptions":{"type":"array","items":{"$ref":"#/definitions/GLAccountData"}},"equityHeaderAccountOptions":{"type":"array","items":{"$ref":"#/definitions/GLAccountData"}},"expenseHeaderAccountOptions":{"type":"array","items":{"$ref":"#/definitions/GLAccountData"}},"allowedAssetsTagOptions":{"type":"array","items":{"$ref":"#/definitions/CodeValueData"}},"allowedLiabilitiesTagOptions":{"type":"array","items":{"$ref":"#/definitions/CodeValueData"}},"allowedEquityTagOptions":{"type":"array","items":{"$ref":"#/definitions/CodeValueData"}},"allowedIncomeTagOptions":{"type":"array","items":{"$ref":"#/definitions/CodeValueData"}},"allowedExpensesTagOptions":{"type":"array","items":{"$ref":"#/definitions/CodeValueData"}}}},"GetGLAccountsResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":16},"name":{"type":"string","example":"Cash"},"parentId":{"type":"integer","format":"int64","example":1},"glCode":{"type":"string","example":"100001"},"disabled":{"type":"boolean","example":false},"manualEntriesAllowed":{"type":"boolean","example":true},"type":{"$ref":"#/definitions/EnumOptionData"},"usage":{"$ref":"#/definitions/EnumOptionData"},"description":{"type":"string","example":"Desc"},"nameDecorated":{"type":"string","example":"....Cash"},"tagId":{"$ref":"#/definitions/CodeValueData"},"organizationRunningBalance":{"type":"integer","format":"int64","example":118437}}},"DeleteGLAccountsRequest":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1}}},"JournalEntryData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"officeId":{"type":"integer","format":"int64"},"glAccountId":{"type":"integer","format":"int64"},"glAccountType":{"$ref":"#/definitions/EnumOptionData"},"transactionDate":{"type":"string","format":"date"},"entryType":{"$ref":"#/definitions/EnumOptionData"},"amount":{"type":"number"},"transactionId":{"type":"string"},"rowIndex":{"type":"integer","format":"int32"}}},"PostJournalEntriesResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","description":"1"},"transactionId":{"type":"string","description":"RS9MCISID4WK1ZM"}}},"JournalEntryCommand":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64"},"transactionDate":{"type":"string","format":"date"},"comments":{"type":"string"},"referenceNumber":{"type":"string"},"accountingRuleId":{"type":"integer","format":"int64"},"credits":{"type":"array","items":{"$ref":"#/definitions/SingleDebitOrCreditEntryCommand"}},"debits":{"type":"array","items":{"$ref":"#/definitions/SingleDebitOrCreditEntryCommand"}}}},"SingleDebitOrCreditEntryCommand":{"type":"object","properties":{"glAccountId":{"type":"integer","format":"int64"},"amount":{"type":"number"},"comments":{"type":"string"},"parametersPassedInRequest":{"type":"array","uniqueItems":true,"items":{"type":"string"}},"commentsChanged":{"type":"boolean"},"glAccountIdChanged":{"type":"boolean"},"glAmountChanged":{"type":"boolean"}}},"PostJournalEntriesTransactionIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","description":"1"}}},"PostJournalEntriesTransactionIdRequest":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","description":"1"}}},"PostProvisioningEntriesResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PostProvisioningEntriesRequest":{"type":"object","properties":{"date":{"type":"string","example":"16 October 2015"},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"createjournalentries":{"type":"string","example":"true"},"provisioningentry":{"type":"string"},"entries":{"type":"string"}}},"PutProvisioningEntriesResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PutProvisioningEntriesRequest":{"type":"object","properties":{"command":{"type":"string","example":"recreateprovisioningentry"}}},"ProvisioningEntryData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"createdDate":{"type":"string","format":"date-time"}}},"LoanProductProvisioningEntryData":{"type":"object","properties":{"historyId":{"type":"integer","format":"int64"},"officeId":{"type":"integer","format":"int64"},"currencyCode":{"type":"string"},"productId":{"type":"integer","format":"int64"},"categoryId":{"type":"integer","format":"int64"},"overdueInDays":{"type":"integer","format":"int64"},"percentage":{"type":"number"},"liablityAccount":{"type":"integer","format":"int64"},"expenseAccount":{"type":"integer","format":"int64"},"criteriaId":{"type":"integer","format":"int64"},"outstandingBalance":{"type":"number"}}},"GetAccountRulesTemplateResponse":{"type":"object","properties":{"systemDefined":{"type":"boolean","example":false},"allowedOffices":{"type":"array","items":{"$ref":"#/definitions/OfficeData"}},"allowedAccounts":{"type":"array","items":{"$ref":"#/definitions/GLAccountData"}}}},"OfficeData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"openingDate":{"type":"string","format":"date"},"hierarchy":{"type":"string"},"rowIndex":{"type":"integer","format":"int32"}}},"AccountingTagRuleData":{"type":"object","properties":{"tag":{"$ref":"#/definitions/CodeValueData"}}},"GetAccountRulesResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"officeId":{"type":"integer","format":"int64"},"officeName":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"systemDefined":{"type":"boolean"},"allowMultipleDebitEntries":{"type":"boolean"},"allowMultipleCreditEntries":{"type":"boolean"},"creditTags":{"type":"array","items":{"$ref":"#/definitions/AccountingTagRuleData"}},"debitTags":{"type":"array","items":{"$ref":"#/definitions/AccountingTagRuleData"}}}},"AccountingRuleData":{"type":"object","properties":{"creditTags":{"type":"array","items":{"$ref":"#/definitions/AccountingTagRuleData"}},"debitTags":{"type":"array","items":{"$ref":"#/definitions/AccountingTagRuleData"}}}},"PostAccountingRulesResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"resourceId":{"type":"integer","format":"int64","example":1}}},"PostAccountingRulesRequest":{"type":"object","properties":{"name":{"type":"string","example":"test"},"officeId":{"type":"integer","format":"int64","example":1},"accountToDebit":{"type":"integer","format":"int64","example":21},"accountToCredit":{"type":"integer","format":"int64","example":9},"description":{"type":"string","example":"Employee salary"}}},"PutAccountingRulesResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1},"changes":{"$ref":"#/definitions/PutAccountingRulesResponsechangesSwagger"}}},"PutAccountingRulesResponsechangesSwagger":{"type":"object","properties":{"name":{"type":"string","example":"Employee Salary posting rule"}}},"PutAccountingRulesRequest":{"type":"object","properties":{"name":{"type":"string","example":"Employee Salary posting rule"}}},"DeleteAccountingRulesResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"BatchResponse":{"type":"object","properties":{"requestId":{"type":"integer","format":"int64"},"statusCode":{"type":"integer","format":"int32"},"headers":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/Header"}},"body":{"type":"string"}}},"Header":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}},"PostBatchesRequest":{"type":"object","properties":{"requestId":{"type":"integer","format":"int64","example":1},"relativeUrl":{"type":"string","example":"clients"},"method":{"type":"string","example":"POST"},"headers":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/Header"}},"reference":{"type":"integer","format":"int64","example":1},"body":{"$ref":"#/definitions/PostBodyRequestSwagger"}}},"PostBodyRequestSwagger":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"firstname":{"type":"string","example":"\"Petra\""},"lastname":{"type":"string","example":"\"Yton\""},"externalId":{"type":"string","example":"\"ex_externalId1\""},"dateFormat":{"type":"string","example":"\"dd MMMM yyyy\""},"locale":{"type":"string","example":"\"en\""},"active":{"type":"boolean","example":true},"activationDate":{"type":"string","example":"\"04 March 2009\""},"submittedOnDate":{"type":"string","example":"\"04 March 2009\""}}},"GetMakerCheckerResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"actionName":{"type":"string"},"entityName":{"type":"string"},"resourceId":{"type":"integer","format":"int64"},"subresourceId":{"type":"integer","format":"int64"},"maker":{"type":"string"},"madeOnDate":{"type":"string","format":"date-time"},"checker":{"type":"string"},"checkedOnDate":{"type":"string","format":"date-time"},"processingResult":{"type":"string"},"commandAsJson":{"type":"string"},"officeName":{"type":"string"},"groupLevelName":{"type":"string"},"groupName":{"type":"string"},"clientName":{"type":"string"},"loanAccountNo":{"type":"string"},"savingsAccountNo":{"type":"string"},"clientId":{"type":"integer","format":"int64"},"loanId":{"type":"integer","format":"int64"},"url":{"type":"string"}}},"AppUserData":{"type":"object","properties":{"rowIndex":{"type":"integer","format":"int32"},"selfServiceUser":{"type":"boolean"}}},"GetMakerCheckersSearchTemplateResponse":{"type":"object","properties":{"appUsers":{"type":"array","items":{"$ref":"#/definitions/AppUserData"}},"actionNames":{"type":"array","items":{"type":"string"}},"entityNames":{"type":"array","items":{"type":"string"}},"processingResults":{"type":"array","items":{"$ref":"#/definitions/ProcessingResultLookup"}}}},"ProcessingResultLookup":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"processingResult":{"type":"string"}}},"PostMakerCheckersResponse":{"type":"object","properties":{"auditId":{"type":"integer","format":"int64","example":1}}},"GetAccountNumberFormatsIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":2},"accountType":{"$ref":"#/definitions/EnumOptionData"},"prefixType":{"$ref":"#/definitions/EnumOptionData"}}},"GetAccountNumberFormatsResponseTemplate":{"type":"object","properties":{"accountTypeOptions":{"type":"array","items":{"$ref":"#/definitions/EnumOptionData"}},"prefixTypeOptions":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/definitions/EnumOptionData"}}}}},"PutAccountNumberFormatsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":2},"changes":{"$ref":"#/definitions/PutAccountNumberFormatschangesSwagger"}}},"PutAccountNumberFormatschangesSwagger":{"type":"object","properties":{"prefixType":{"type":"integer","format":"int64","example":"OFFICE_NAME"}}},"PutAccountNumberFormatsRequest":{"type":"object","properties":{"prefixType":{"type":"integer","format":"int64","example":1}}},"DeleteAccountNumberFormatsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":2}}},"PostAccountNumberFormatsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":4}}},"PostAccountNumberFormatsRequest":{"type":"object","properties":{"accountType":{"type":"integer","format":"int64","example":1},"prefixType":{"type":"integer","format":"int64","example":101}}},"PutCachechangesSwagger":{"type":"object","properties":{"cacheType":{"type":"integer","format":"int64","example":2}}},"PutCachesResponse":{"type":"object","properties":{"cacheType":{"$ref":"#/definitions/PutCachechangesSwagger"}}},"PutCachesRequest":{"type":"object","properties":{"cacheType":{"type":"integer","format":"int64","example":2}}},"GetCachesResponse":{"type":"object","properties":{"cacheType":{"$ref":"#/definitions/EnumOptionData"},"enabled":{"type":"boolean"}}},"CommandWrapper":{"type":"object","properties":{"groupId":{"type":"integer","format":"int64"},"clientId":{"type":"integer","format":"int64"},"loanId":{"type":"integer","format":"int64"},"savingsId":{"type":"integer","format":"int64"},"entityName":{"type":"string"},"taskPermissionName":{"type":"string"},"entityId":{"type":"integer","format":"int64"},"subentityId":{"type":"integer","format":"int64"},"href":{"type":"string"},"json":{"type":"string"},"transactionId":{"type":"string"},"productId":{"type":"integer","format":"int64"},"creditBureauId":{"type":"integer","format":"int64"},"organisationCreditBureauId":{"type":"integer","format":"int64"},"create":{"type":"boolean"},"createDatatable":{"type":"boolean"},"deleteDatatable":{"type":"boolean"},"updateDatatable":{"type":"boolean"},"datatableResource":{"type":"boolean"},"deleteOneToOne":{"type":"boolean"},"noteResource":{"type":"boolean"},"cacheResource":{"type":"boolean"},"updateOperation":{"type":"boolean"},"delete":{"type":"boolean"},"deleteOperation":{"type":"boolean"},"surveyResource":{"type":"boolean"},"registerSurvey":{"type":"boolean"},"fullFilSurvey":{"type":"boolean"},"workingDaysResource":{"type":"boolean"},"passwordPreferencesResource":{"type":"boolean"},"permissionResource":{"type":"boolean"},"userResource":{"type":"boolean"},"currencyResource":{"type":"boolean"},"deleteMultiple":{"type":"boolean"},"updateOneToOne":{"type":"boolean"},"updateMultiple":{"type":"boolean"},"registerDatatable":{"type":"boolean"},"loanDisburseDetailResource":{"type":"boolean"},"updateDisbursementDate":{"type":"boolean"},"update":{"type":"boolean"}}},"GetCodeValuesDataResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Passport"},"description":{"type":"string","example":"Passport information"},"position":{"type":"integer","format":"int32","example":0}}},"PostCodeValueDataResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":4}}},"PostCodeValuesDataRequest":{"type":"object","properties":{"name":{"type":"string","example":"Passport"},"description":{"type":"string","example":"Passport information"},"position":{"type":"integer","format":"int32","example":0}}},"PutCodeValueDataResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":4},"changes":{"$ref":"#/definitions/PutCodeValuechangesSwagger"}}},"PutCodeValuechangesSwagger":{"type":"object","properties":{"name":{"type":"string","example":"Passport"},"description":{"type":"string","example":"Passport information"},"position":{"type":"integer","format":"int32","example":0}}},"PutCodeValuesDataRequest":{"type":"object","properties":{"name":{"type":"string","example":"Passport"},"description":{"type":"string","example":"Passport information"},"position":{"type":"integer","format":"int32","example":0}}},"DeleteCodeValueDataResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":4}}},"GetCodesResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Education"},"systemDefined":{"type":"boolean","example":true}}},"PostCodesResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":4}}},"PostCodesRequest":{"type":"object","properties":{"name":{"type":"string","example":"MyNewCode"}}},"PutCodesApichangesSwagger":{"type":"object","properties":{"name":{"type":"string","example":"MyNewCode(changed)"}}},"PutCodesResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":4},"changes":{"$ref":"#/definitions/PutCodesApichangesSwagger"}}},"PutCodesRequest":{"type":"object","properties":{"name":{"type":"string","example":"MyNewCode(changed)"}}},"DeleteCodesResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":4}}},"ExternalServicesPropertiesData":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}}},"PutExternalServiceRequest":{"type":"object","properties":{"username":{"type":"string","example":"test@mifos.org"},"password":{"type":"string","example":"XXXX"}}},"GetGlobalConfigurationsResponse":{"type":"object","properties":{"globalConfiguration":{"type":"array","items":{"$ref":"#/definitions/GlobalConfigurationPropertyData"}}}},"GlobalConfigurationPropertyData":{"type":"object","properties":{"name":{"type":"string"},"enabled":{"type":"boolean"},"value":{"type":"integer","format":"int64"},"dateValue":{"type":"string","format":"date-time"},"id":{"type":"integer","format":"int64"},"description":{"type":"string"},"trapDoor":{"type":"boolean"}}},"PutGlobalConfigurationsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":4},"changes":{"$ref":"#/definitions/PutGlobalConfigurationsResponsechangesSwagger"}}},"PutGlobalConfigurationsResponsechangesSwagger":{"type":"object","properties":{"enabled":{"type":"boolean","example":true}}},"PutGlobalConfigurationsRequest":{"type":"object","properties":{"enabled":{"type":"boolean","example":true},"value":{"type":"integer","format":"int64","example":2}}},"GetDataTablesResponse":{"type":"object","properties":{"appTableName":{"type":"string","example":"m_client"},"datatableName":{"type":"string","example":"extra_client_details"},"column":{"type":"array","items":{"$ref":"#/definitions/ResultsetColumnHeaderData"}}}},"ResultsetColumnHeaderData":{"type":"object","properties":{"columnName":{"type":"string"},"columnType":{"type":"string"},"columnLength":{"type":"integer","format":"int64"},"columnDisplayType":{"type":"string"},"columnCode":{"type":"string"},"optional":{"type":"boolean"},"string":{"type":"boolean"},"dateDisplayType":{"type":"boolean"},"dateTimeDisplayType":{"type":"boolean"},"integerDisplayType":{"type":"boolean"},"decimalDisplayType":{"type":"boolean"},"booleanDisplayType":{"type":"boolean"},"codeValueDisplayType":{"type":"boolean"},"codeLookupDisplayType":{"type":"boolean"},"mandatory":{"type":"boolean"}}},"PostDataTablesResponse":{"type":"object","properties":{"resourceIdentifier":{"type":"string","example":"extra_client_details"}}},"PostDataTablesRequest":{"type":"object","properties":{"applicationTableName":{"type":"string","example":"m_client"},"registeredTableName":{"type":"string","example":"extra_client_details"},"multiRow":{"type":"boolean","example":true},"columnHeaderData":{"type":"array","items":{"$ref":"#/definitions/ResultsetColumnHeaderData"}}}},"PutDataTablesResponse":{"type":"object","properties":{"resourceIdentifier":{"type":"string","example":"extra_client_details"}}},"PutDataTablesRequest":{"type":"object","properties":{"appTableName":{"type":"string","example":"m_client"},"dropColumns":{"type":"array","items":{"$ref":"#/definitions/PutDataTablesRequestDropColumns"}},"addColumns":{"type":"array","items":{"$ref":"#/definitions/PutDataTablesRequestAddColumns"}},"ChangeColumns":{"type":"array","items":{"$ref":"#/definitions/PutDataTablesRequestChangeColumns"}}}},"PutDataTablesRequestAddColumns":{"type":"object","properties":{"name":{"type":"string","example":"Question"},"type":{"type":"string","example":"Dropdown"},"code":{"type":"string","example":"Gender"},"mandatory":{"type":"boolean","example":true}}},"PutDataTablesRequestChangeColumns":{"type":"object","properties":{"name":{"type":"string","example":"Question"},"newName":{"type":"string","example":"Question 2"},"code":{"type":"string","example":"Gender"},"newCode":{"type":"string","example":"Gender2"},"mandatory":{"type":"boolean","example":true}}},"PutDataTablesRequestDropColumns":{"type":"object","properties":{"name":{"type":"string","example":"Gender_cd_Question"}}},"DeleteDataTablesResponse":{"type":"object","properties":{"resourceIdentifier":{"type":"string","example":"extra_client_details"}}},"PostDataTablesRegisterDatatableAppTable":{"type":"object"},"GetDataTablesAppTableIdResponse":{"type":"object","properties":{"columnHeaders":{"type":"array","items":{"$ref":"#/definitions/ResultsetColumnHeaderData"}},"data":{"type":"array","items":{"$ref":"#/definitions/ResultsetRowData"}}}},"ResultsetRowData":{"type":"object","properties":{"row":{"type":"array","items":{"type":"string"}}}},"PostDataTablesAppTableIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PostDataTablesAppTableIdRequest":{"type":"object","properties":{"BusinessDescription":{"type":"string","example":"Livestock sales"},"Comment":{"type":"string","example":"First comment made"},"Education_cv":{"type":"string","example":"Primary"},"Gender_cd":{"type":"integer","format":"int64","example":6},"HighestRatePaid":{"type":"number","format":"double","example":8.5},"NextVisit":{"type":"string","example":"01 October 2012"},"YearsinBusiness":{"type":"integer","format":"int64","example":5},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"locale":{"type":"string","example":"en"}}},"PutDataTablesAppTableIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1},"changes":{"$ref":"#/definitions/PutDataTablesAppTableIdResponseChanges"}}},"PutDataTablesAppTableIdResponseChanges":{"type":"object","properties":{"BusinessDescription":{"type":"string","example":"Livestock sales updated"}}},"PutDataTablesAppTableIdRequest":{"type":"object","properties":{"BusinessDescription":{"type":"string","example":"Livestock sales updated"}}},"PutDataTablesAppTableIdDatatableIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PutDataTablesAppTableIdDatatableIdRequest":{"type":"object","properties":{"DateOfBirth":{"type":"string","example":"01 June 1982"},"Education_cdHighest":{"type":"integer","format":"int64","example":5},"Name":{"type":"string","example":"June"},"OtherNotes":{"type":"string","example":"More notes"},"PointsScore":{"type":"integer","format":"int64","example":20},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"locale":{"type":"string","example":"en"}}},"DeleteDataTablesDatatableAppTableIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"DeleteDataTablesDatatableAppTableIdDatatableIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PostEntityDatatableChecksTemplateResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PostEntityDatatableChecksTemplateRequest":{"type":"object","properties":{"entity":{"type":"string","example":"m_loan"},"status":{"type":"integer","format":"int64","example":100},"datatableName":{"type":"string","example":"Additional Details"},"productId":{"type":"integer","format":"int64","example":1}}},"DeleteEntityDatatableChecksTemplateResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"AppUser":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"email":{"type":"string"},"username":{"type":"string"},"firstname":{"type":"string"},"lastname":{"type":"string"},"password":{"type":"string"},"accountNonExpired":{"type":"boolean"},"accountNonLocked":{"type":"boolean"},"credentialsNonExpired":{"type":"boolean"},"enabled":{"type":"boolean"},"deleted":{"type":"boolean"},"office":{"$ref":"#/definitions/Office"},"staff":{"$ref":"#/definitions/Staff"},"roles":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/Role"}},"lastTimePasswordUpdated":{"type":"string","format":"date-time"},"passwordNeverExpires":{"type":"boolean"},"appUserClientMappings":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/AppUserClientMapping"}},"authorities":{"type":"array","items":{"$ref":"#/definitions/GrantedAuthority"}},"selfServiceUser":{"type":"boolean"},"staffId":{"type":"integer","format":"int64"},"staffDisplayName":{"type":"string"},"notEnabled":{"type":"boolean"},"new":{"type":"boolean"}}},"AppUserClientMapping":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"client":{"$ref":"#/definitions/Client"},"new":{"type":"boolean"}}},"Charge":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"amount":{"type":"number"},"currencyCode":{"type":"string"},"chargeTimeType":{"type":"integer","format":"int32"},"chargeCalculation":{"type":"integer","format":"int32"},"chargePaymentMode":{"type":"integer","format":"int32"},"feeInterval":{"type":"integer","format":"int32"},"penalty":{"type":"boolean"},"active":{"type":"boolean"},"deleted":{"type":"boolean"},"minCap":{"type":"number"},"maxCap":{"type":"number"},"account":{"$ref":"#/definitions/GLAccount"},"taxGroup":{"$ref":"#/definitions/TaxGroup"},"disbursementCharge":{"type":"boolean"},"savingsCharge":{"type":"boolean"},"feeOnMonthDay":{"$ref":"#/definitions/MonthDay"},"annualFee":{"type":"boolean"},"monthlyFee":{"type":"boolean"},"overdueInstallment":{"type":"boolean"},"allowedLoanChargeTime":{"type":"boolean"},"allowedClientChargeTime":{"type":"boolean"},"allowedSavingsChargeTime":{"type":"boolean"},"loanCharge":{"type":"boolean"},"clientCharge":{"type":"boolean"},"allowedSavingsChargeCalculationType":{"type":"boolean"},"allowedClientChargeCalculationType":{"type":"boolean"},"percentageOfApprovedAmount":{"type":"boolean"},"percentageOfDisbursementAmount":{"type":"boolean"},"new":{"type":"boolean"}}},"ChargeData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"penalty":{"type":"boolean"},"currency":{"$ref":"#/definitions/CurrencyData"},"overdueInstallmentCharge":{"type":"boolean"}}},"Chronology":{"type":"object","properties":{"zone":{"$ref":"#/definitions/DateTimeZone"}}},"Client":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"office":{"$ref":"#/definitions/Office"},"transferToOffice":{"$ref":"#/definitions/Office"},"image":{"$ref":"#/definitions/Image"},"status":{"type":"integer","format":"int32"},"firstname":{"type":"string"},"middlename":{"type":"string"},"lastname":{"type":"string"},"displayName":{"type":"string"},"externalId":{"type":"string"},"staff":{"$ref":"#/definitions/Staff"},"groups":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/Group"}},"accountNumberRequiresAutoGeneration":{"type":"boolean"},"closureDate":{"type":"string","format":"date"},"withdrawalDate":{"type":"string","format":"date"},"submittedOnDate":{"type":"string","format":"date"},"legalForm":{"type":"integer","format":"int32"},"reopenedDate":{"type":"string","format":"date"},"pending":{"type":"boolean"},"withdrawn":{"type":"boolean"},"transferInProgress":{"type":"boolean"},"transferOnHold":{"type":"boolean"},"transferInProgressOrOnHold":{"type":"boolean"},"notPending":{"type":"boolean"},"activationLocalDate":{"type":"string","format":"date"},"officeJoiningLocalDate":{"type":"string","format":"date"},"notStaff":{"type":"boolean"},"rejectedDate":{"type":"string","format":"date"},"active":{"type":"boolean"},"closed":{"type":"boolean"},"rejected":{"type":"boolean"},"notActive":{"type":"boolean"},"new":{"type":"boolean"}}},"CurrencyData":{"type":"object","properties":{"name":{"type":"string"}}},"DatatableCheckStatusData":{"type":"object"},"DatatableChecksData":{"type":"object"},"DateTimeField":{"type":"object","properties":{"durationField":{"$ref":"#/definitions/DurationField"},"rangeDurationField":{"$ref":"#/definitions/DurationField"},"leapDurationField":{"$ref":"#/definitions/DurationField"},"minimumValue":{"type":"integer","format":"int32"},"maximumValue":{"type":"integer","format":"int32"},"lenient":{"type":"boolean"},"name":{"type":"string"},"type":{"$ref":"#/definitions/DateTimeFieldType"},"supported":{"type":"boolean"}}},"DateTimeFieldType":{"type":"object","properties":{"durationType":{"$ref":"#/definitions/DurationFieldType"},"rangeDurationType":{"$ref":"#/definitions/DurationFieldType"},"name":{"type":"string"}}},"DateTimeZone":{"type":"object","properties":{"fixed":{"type":"boolean"},"id":{"type":"string"}}},"DurationField":{"type":"object","properties":{"unitMillis":{"type":"integer","format":"int64"},"precise":{"type":"boolean"},"name":{"type":"string"},"type":{"$ref":"#/definitions/DurationFieldType"},"supported":{"type":"boolean"}}},"DurationFieldType":{"type":"object","properties":{"name":{"type":"string"}}},"FloatingRate":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"floatingRatePeriods":{"type":"array","items":{"$ref":"#/definitions/FloatingRatePeriod"}},"createdBy":{"$ref":"#/definitions/AppUser"},"modifiedBy":{"$ref":"#/definitions/AppUser"},"createdOn":{"type":"string","format":"date-time"},"modifiedOn":{"type":"string","format":"date-time"},"baseLendingRate":{"type":"boolean"},"active":{"type":"boolean"},"new":{"type":"boolean"}}},"FloatingRatePeriod":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"fromDate":{"type":"string","format":"date-time"},"interestRate":{"type":"number"},"createdBy":{"$ref":"#/definitions/AppUser"},"modifiedBy":{"$ref":"#/definitions/AppUser"},"createdOn":{"type":"string","format":"date-time"},"modifiedOn":{"type":"string","format":"date-time"},"floatingRatesId":{"$ref":"#/definitions/FloatingRate"},"differentialToBaseLendingRate":{"type":"boolean"},"active":{"type":"boolean"},"new":{"type":"boolean"}}},"FundData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}}},"GLAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"children":{"type":"array","items":{"$ref":"#/definitions/GLAccount"}},"name":{"type":"string"},"glCode":{"type":"string"},"disabled":{"type":"boolean"},"manualEntriesAllowed":{"type":"boolean"},"type":{"type":"integer","format":"int32"},"usage":{"type":"integer","format":"int32"},"headerAccount":{"type":"boolean"},"detailAccount":{"type":"boolean"},"new":{"type":"boolean"}}},"GetEntityDatatableChecksTemplateResponse":{"type":"object","properties":{"entities":{"type":"array","items":{"type":"string"}},"statusClient":{"type":"array","items":{"$ref":"#/definitions/DatatableCheckStatusData"}},"statusGroup":{"type":"array","items":{"$ref":"#/definitions/DatatableCheckStatusData"}},"statusSavings":{"type":"array","items":{"$ref":"#/definitions/DatatableCheckStatusData"}},"statusLoans":{"type":"array","items":{"$ref":"#/definitions/DatatableCheckStatusData"}},"datatables":{"type":"array","items":{"$ref":"#/definitions/DatatableChecksData"}},"loanProductDatas":{"type":"array","items":{"$ref":"#/definitions/LoanProductData"}},"savingsProductDatas":{"type":"array","items":{"$ref":"#/definitions/SavingsProductData"}}}},"GrantedAuthority":{"type":"object","properties":{"authority":{"type":"string"}}},"Group":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"office":{"$ref":"#/definitions/Office"},"staff":{"$ref":"#/definitions/Staff"},"parent":{"$ref":"#/definitions/Group"},"groupLevel":{"$ref":"#/definitions/GroupLevel"},"clientMembers":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/Client"}},"submittedOnDate":{"type":"string","format":"date"},"accountNumberRequiresAutoGeneration":{"type":"boolean"},"pending":{"type":"boolean"},"transferInProgress":{"type":"boolean"},"transferOnHold":{"type":"boolean"},"transferInProgressOrOnHold":{"type":"boolean"},"notPending":{"type":"boolean"},"activationLocalDate":{"type":"string","format":"date"},"group":{"type":"boolean"},"center":{"type":"boolean"},"childGroup":{"type":"boolean"},"activeClientMembers":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/Client"}},"active":{"type":"boolean"},"closed":{"type":"boolean"},"notActive":{"type":"boolean"},"new":{"type":"boolean"}}},"GroupLevel":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"parentId":{"type":"integer","format":"int64"},"superParent":{"type":"boolean"},"levelName":{"type":"string"},"recursable":{"type":"boolean"},"group":{"type":"boolean"},"center":{"type":"boolean"},"new":{"type":"boolean"}}},"Image":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"location":{"type":"string"},"storageType":{"type":"integer","format":"int32"},"new":{"type":"boolean"}}},"LoanProduct":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"shortName":{"type":"string"},"loanProductRelatedDetail":{"$ref":"#/definitions/LoanProductRelatedDetail"},"includeInBorrowerCycle":{"type":"boolean"},"startDate":{"type":"string","format":"date"},"closeDate":{"type":"string","format":"date"},"externalId":{"type":"string"},"minimumDaysBetweenDisbursalAndFirstRepayment":{"type":"integer","format":"int32"},"productInterestRecalculationDetails":{"$ref":"#/definitions/LoanProductInterestRecalculationDetails"},"loanProductGuaranteeDetails":{"$ref":"#/definitions/LoanProductGuaranteeDetails"},"principalThresholdForLastInstallment":{"type":"number"},"installmentAmountInMultiplesOf":{"type":"integer","format":"int32"},"floatingRates":{"$ref":"#/definitions/LoanProductFloatingRates"},"equalAmortization":{"type":"boolean"},"multiDisburseLoan":{"type":"boolean"},"interestRecalculationEnabled":{"type":"boolean"},"numberOfRepayments":{"type":"integer","format":"int32"},"nominalInterestRatePerPeriod":{"type":"number"},"interestPeriodFrequencyType":{"type":"string","enum":["DAYS","WEEKS","MONTHS","YEARS","INVALID"]},"accountingType":{"type":"integer","format":"int32"},"linkedToFloatingInterestRate":{"type":"boolean"},"cashBasedAccountingEnabled":{"type":"boolean"},"upfrontAccrualAccountingEnabled":{"type":"boolean"},"accountingDisabled":{"type":"boolean"},"periodicAccrualAccountingEnabled":{"type":"boolean"},"holdGuaranteeFundsEnabled":{"type":"boolean"},"accrualBasedAccountingEnabled":{"type":"boolean"},"minNominalInterestRatePerPeriod":{"type":"number"},"maxNominalInterestRatePerPeriod":{"type":"number"},"minNumberOfRepayments":{"type":"integer","format":"int32"},"maxNumberOfRepayments":{"type":"integer","format":"int32"},"repaymentStrategy":{"$ref":"#/definitions/LoanTransactionProcessingStrategy"},"loanProductCharges":{"type":"array","items":{"$ref":"#/definitions/Charge"}},"loanProductConfigurableAttributes":{"$ref":"#/definitions/LoanProductConfigurableAttributes"},"principalAmount":{"$ref":"#/definitions/Money"},"minPrincipalAmount":{"$ref":"#/definitions/Money"},"maxPrincipalAmount":{"$ref":"#/definitions/Money"},"arrearsBasedOnOriginalSchedule":{"type":"boolean"},"currency":{"$ref":"#/definitions/MonetaryCurrency"},"new":{"type":"boolean"}}},"LoanProductBorrowerCycleVariationData":{"type":"object","properties":{"borrowerCycleNumber":{"type":"integer","format":"int32"},"paramType":{"type":"string","enum":["INVALID","PRINCIPAL","INTERESTRATE","REPAYMENT"]},"valueConditionType":{"type":"string","enum":["INVALID","EQUAL","GREATERTHAN"]},"defaultValue":{"type":"number"}}},"LoanProductConfigurableAttributes":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"loanProduct":{"$ref":"#/definitions/LoanProduct"},"amortizationBoolean":{"type":"boolean"},"interestMethodBoolean":{"type":"boolean"},"transactionProcessingStrategyBoolean":{"type":"boolean"},"interestCalcPeriodBoolean":{"type":"boolean"},"arrearsToleranceBoolean":{"type":"boolean"},"repaymentEveryBoolean":{"type":"boolean"},"graceOnPrincipalAndInterestPaymentBoolean":{"type":"boolean"},"graceOnArrearsAgingBoolean":{"type":"boolean"},"new":{"type":"boolean"}}},"LoanProductData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"description":{"type":"string"},"fundId":{"type":"integer","format":"int64"},"fundName":{"type":"string"},"startDate":{"type":"string","format":"date"},"closeDate":{"type":"string","format":"date"},"currency":{"$ref":"#/definitions/CurrencyData"},"principal":{"type":"number"},"minPrincipal":{"type":"number"},"maxPrincipal":{"type":"number"},"numberOfRepayments":{"type":"integer","format":"int32"},"minNumberOfRepayments":{"type":"integer","format":"int32"},"maxNumberOfRepayments":{"type":"integer","format":"int32"},"repaymentEvery":{"type":"integer","format":"int32"},"repaymentFrequencyType":{"$ref":"#/definitions/EnumOptionData"},"interestRatePerPeriod":{"type":"number"},"minInterestRatePerPeriod":{"type":"number"},"maxInterestRatePerPeriod":{"type":"number"},"interestRateFrequencyType":{"$ref":"#/definitions/EnumOptionData"},"annualInterestRate":{"type":"number"},"interestRateDifferential":{"type":"number"},"minDifferentialLendingRate":{"type":"number"},"defaultDifferentialLendingRate":{"type":"number"},"maxDifferentialLendingRate":{"type":"number"},"amortizationType":{"$ref":"#/definitions/EnumOptionData"},"interestType":{"$ref":"#/definitions/EnumOptionData"},"interestCalculationPeriodType":{"$ref":"#/definitions/EnumOptionData"},"allowPartialPeriodInterestCalcualtion":{"type":"boolean"},"inArrearsTolerance":{"type":"number"},"transactionProcessingStrategyId":{"type":"integer","format":"int64"},"transactionProcessingStrategyName":{"type":"string"},"graceOnPrincipalPayment":{"type":"integer","format":"int32"},"recurringMoratoriumOnPrincipalPeriods":{"type":"integer","format":"int32"},"graceOnInterestPayment":{"type":"integer","format":"int32"},"graceOnInterestCharged":{"type":"integer","format":"int32"},"graceOnArrearsAgeing":{"type":"integer","format":"int32"},"daysInMonthType":{"$ref":"#/definitions/EnumOptionData"},"daysInYearType":{"$ref":"#/definitions/EnumOptionData"},"interestRecalculationData":{"$ref":"#/definitions/LoanProductInterestRecalculationData"},"principalVariationsForBorrowerCycle":{"type":"array","items":{"$ref":"#/definitions/LoanProductBorrowerCycleVariationData"}},"interestRateVariationsForBorrowerCycle":{"type":"array","items":{"$ref":"#/definitions/LoanProductBorrowerCycleVariationData"}},"numberOfRepaymentVariationsForBorrowerCycle":{"type":"array","items":{"$ref":"#/definitions/LoanProductBorrowerCycleVariationData"}},"fundOptions":{"type":"array","items":{"$ref":"#/definitions/FundData"}},"repaymentFrequencyTypeOptions":{"type":"array","items":{"$ref":"#/definitions/EnumOptionData"}},"interestRateFrequencyTypeOptions":{"type":"array","items":{"$ref":"#/definitions/EnumOptionData"}},"amortizationTypeOptions":{"type":"array","items":{"$ref":"#/definitions/EnumOptionData"}},"interestTypeOptions":{"type":"array","items":{"$ref":"#/definitions/EnumOptionData"}},"interestCalculationPeriodTypeOptions":{"type":"array","items":{"$ref":"#/definitions/EnumOptionData"}},"chargeOptions":{"type":"array","items":{"$ref":"#/definitions/ChargeData"}},"multiDisburseLoan":{"type":"boolean"},"outstandingLoanBalance":{"type":"number"},"compoundingToBePostedAsTransaction":{"type":"boolean"},"equalAmortization":{"type":"boolean"},"interestRecalculationEnabled":{"type":"boolean"},"floatingInterestRateCalculationAllowed":{"type":"boolean"},"linkedToFloatingInterestRates":{"type":"boolean"},"variableInstallmentsAllowed":{"type":"boolean"},"getloanProductConfigurableAttributes":{"$ref":"#/definitions/LoanProductConfigurableAttributes"},"minimumGapBetweenInstallments":{"type":"integer","format":"int32"},"maximumGapBetweenInstallments":{"type":"integer","format":"int32"}}},"LoanProductFloatingRates":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"loanProduct":{"$ref":"#/definitions/LoanProduct"},"floatingRate":{"$ref":"#/definitions/FloatingRate"},"interestRateDifferential":{"type":"number"},"minDifferentialLendingRate":{"type":"number"},"defaultDifferentialLendingRate":{"type":"number"},"maxDifferentialLendingRate":{"type":"number"},"floatingInterestRateCalculationAllowed":{"type":"boolean"},"new":{"type":"boolean"}}},"LoanProductGuaranteeDetails":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"mandatoryGuarantee":{"type":"number"},"minimumGuaranteeFromOwnFunds":{"type":"number"},"minimumGuaranteeFromGuarantor":{"type":"number"},"new":{"type":"boolean"}}},"LoanProductInterestRecalculationData":{"type":"object","properties":{"interestRecalculationCompoundingType":{"$ref":"#/definitions/EnumOptionData"},"rescheduleStrategyType":{"$ref":"#/definitions/EnumOptionData"},"recalculationRestFrequencyType":{"$ref":"#/definitions/EnumOptionData"},"recalculationRestFrequencyInterval":{"type":"integer","format":"int32"},"recalculationRestFrequencyNthDay":{"$ref":"#/definitions/EnumOptionData"},"recalculationRestFrequencyWeekday":{"$ref":"#/definitions/EnumOptionData"},"recalculationRestFrequencyOnDay":{"type":"integer","format":"int32"},"recalculationCompoundingFrequencyType":{"$ref":"#/definitions/EnumOptionData"},"recalculationCompoundingFrequencyInterval":{"type":"integer","format":"int32"},"recalculationCompoundingFrequencyNthDay":{"$ref":"#/definitions/EnumOptionData"},"recalculationCompoundingFrequencyWeekday":{"$ref":"#/definitions/EnumOptionData"},"recalculationCompoundingFrequencyOnDay":{"type":"integer","format":"int32"},"compoundingToBePostedAsTransaction":{"type":"boolean"}}},"LoanProductInterestRecalculationDetails":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"interestRecalculationCompoundingMethod":{"type":"integer","format":"int32"},"rescheduleStrategyMethod":{"type":"integer","format":"int32"},"restFrequencyType":{"type":"string","enum":["INVALID","SAME_AS_REPAYMENT_PERIOD","DAILY","WEEKLY","MONTHLY"]},"restInterval":{"type":"integer","format":"int32"},"restFrequencyNthDay":{"type":"integer","format":"int32"},"restFrequencyWeekday":{"type":"integer","format":"int32"},"restFrequencyOnDay":{"type":"integer","format":"int32"},"compoundingFrequencyType":{"type":"string","enum":["INVALID","SAME_AS_REPAYMENT_PERIOD","DAILY","WEEKLY","MONTHLY"]},"compoundingInterval":{"type":"integer","format":"int32"},"compoundingFrequencyNthDay":{"type":"integer","format":"int32"},"compoundingFrequencyWeekday":{"type":"integer","format":"int32"},"compoundingFrequencyOnDay":{"type":"integer","format":"int32"},"isCompoundingToBePostedAsTransaction":{"type":"boolean"},"arrearsBasedOnOriginalSchedule":{"type":"boolean"},"new":{"type":"boolean"}}},"LoanProductRelatedDetail":{"type":"object","properties":{"currency":{"$ref":"#/definitions/MonetaryCurrency"},"principal":{"$ref":"#/definitions/Money"},"nominalInterestRatePerPeriod":{"type":"number"},"interestPeriodFrequencyType":{"type":"string","enum":["DAYS","WEEKS","MONTHS","YEARS","INVALID"]},"annualNominalInterestRate":{"type":"number"},"interestMethod":{"type":"string","enum":["DECLINING_BALANCE","FLAT","INVALID"]},"interestCalculationPeriodMethod":{"type":"string","enum":["DAILY","SAME_AS_REPAYMENT_PERIOD","INVALID"]},"allowPartialPeriodInterestCalcualtion":{"type":"boolean"},"repayEvery":{"type":"integer","format":"int32"},"repaymentPeriodFrequencyType":{"type":"string","enum":["DAYS","WEEKS","MONTHS","YEARS","INVALID"]},"numberOfRepayments":{"type":"integer","format":"int32"},"graceOnPrincipalPayment":{"type":"integer","format":"int32"},"graceOnInterestPayment":{"type":"integer","format":"int32"},"amortizationMethod":{"type":"string","enum":["EQUAL_PRINCIPAL","EQUAL_INSTALLMENTS","INVALID"]},"inArrearsTolerance":{"$ref":"#/definitions/Money"},"graceOnArrearsAgeing":{"type":"integer","format":"int32"},"equalAmortization":{"type":"boolean"},"interestRecalculationEnabled":{"type":"boolean"},"graceOnDueDate":{"type":"integer","format":"int32"},"arrearsTolerance":{"type":"number"}}},"LoanTransactionProcessingStrategy":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"standardStrategy":{"type":"boolean"},"heavensfamilyStrategy":{"type":"boolean"},"earlyPaymentStrategy":{"type":"boolean"},"creocoreStrategy":{"type":"boolean"},"indianRBIStrategy":{"type":"boolean"},"principalInterestPenaltiesFeesOrderStrategy":{"type":"boolean"},"interestPrincipalPenaltiesFeesOrderStrategy":{"type":"boolean"},"new":{"type":"boolean"}}},"MonetaryCurrency":{"type":"object","properties":{"code":{"type":"string"},"digitsAfterDecimal":{"type":"integer","format":"int32"},"currencyInMultiplesOf":{"type":"integer","format":"int32"}}},"Money":{"type":"object","properties":{"currencyCode":{"type":"string"},"currencyDigitsAfterDecimal":{"type":"integer","format":"int32"},"amount":{"type":"number"},"amountDefaultedToNullIfZero":{"type":"number"},"currencyInMultiplesOf":{"type":"integer","format":"int32"},"lessThanZero":{"type":"boolean"},"zero":{"type":"boolean"},"currency":{"$ref":"#/definitions/MonetaryCurrency"},"greaterThanZero":{"type":"boolean"}}},"MonthDay":{"type":"object","properties":{"monthOfYear":{"type":"integer","format":"int32"},"dayOfMonth":{"type":"integer","format":"int32"},"fieldTypes":{"type":"array","items":{"$ref":"#/definitions/DateTimeFieldType"}},"chronology":{"$ref":"#/definitions/Chronology"},"values":{"type":"array","items":{"type":"integer","format":"int32"}},"fields":{"type":"array","items":{"$ref":"#/definitions/DateTimeField"}}}},"Office":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"parent":{"$ref":"#/definitions/Office"},"name":{"type":"string"},"hierarchy":{"type":"string"},"openingLocalDate":{"type":"string","format":"date"},"new":{"type":"boolean"}}},"Permission":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"grouping":{"type":"string"},"code":{"type":"string"},"new":{"type":"boolean"}}},"Role":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"disabled":{"type":"boolean"},"permissions":{"type":"array","items":{"$ref":"#/definitions/Permission"}},"enabled":{"type":"boolean"},"new":{"type":"boolean"}}},"SavingsProductData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"currency":{"$ref":"#/definitions/CurrencyData"},"nominalAnnualInterestRate":{"type":"number"},"interestCompoundingPeriodType":{"$ref":"#/definitions/EnumOptionData"},"interestPostingPeriodType":{"$ref":"#/definitions/EnumOptionData"},"interestCalculationType":{"$ref":"#/definitions/EnumOptionData"},"interestCalculationDaysInYearType":{"$ref":"#/definitions/EnumOptionData"},"minRequiredOpeningBalance":{"type":"number"},"lockinPeriodFrequency":{"type":"integer","format":"int32"},"lockinPeriodFrequencyType":{"$ref":"#/definitions/EnumOptionData"},"withdrawalFeeForTransfers":{"type":"boolean"},"allowOverdraft":{"type":"boolean"},"overdraftLimit":{"type":"number"},"minRequiredBalance":{"type":"number"},"depositAccountType":{"type":"string"}}},"Staff":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"loanOfficer":{"type":"boolean"},"active":{"type":"boolean"},"image":{"$ref":"#/definitions/Image"},"notLoanOfficer":{"type":"boolean"},"notActive":{"type":"boolean"},"new":{"type":"boolean"}}},"TaxComponent":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"createdBy":{"$ref":"#/definitions/AppUser"},"createdDate":{"type":"string","format":"date-time"},"lastModifiedBy":{"$ref":"#/definitions/AppUser"},"lastModifiedDate":{"type":"string","format":"date-time"},"percentage":{"type":"number"},"debitAccountType":{"type":"integer","format":"int32"},"debitAcount":{"$ref":"#/definitions/GLAccount"},"creditAccountType":{"type":"integer","format":"int32"},"creditAcount":{"$ref":"#/definitions/GLAccount"},"taxComponentHistories":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/TaxComponentHistory"}},"taxGroupMappings":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/TaxGroupMappings"}},"new":{"type":"boolean"}}},"TaxComponentHistory":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"createdBy":{"$ref":"#/definitions/AppUser"},"createdDate":{"type":"string","format":"date-time"},"lastModifiedBy":{"$ref":"#/definitions/AppUser"},"lastModifiedDate":{"type":"string","format":"date-time"},"percentage":{"type":"number"},"new":{"type":"boolean"}}},"TaxGroup":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"createdBy":{"$ref":"#/definitions/AppUser"},"createdDate":{"type":"string","format":"date-time"},"lastModifiedBy":{"$ref":"#/definitions/AppUser"},"lastModifiedDate":{"type":"string","format":"date-time"},"name":{"type":"string"},"taxGroupMappings":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/TaxGroupMappings"}},"new":{"type":"boolean"}}},"TaxGroupMappings":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"createdBy":{"$ref":"#/definitions/AppUser"},"createdDate":{"type":"string","format":"date-time"},"lastModifiedBy":{"$ref":"#/definitions/AppUser"},"lastModifiedDate":{"type":"string","format":"date-time"},"taxComponent":{"$ref":"#/definitions/TaxComponent"},"endDate":{"type":"string","format":"date-time"},"new":{"type":"boolean"}}},"GetEntityDatatableChecksResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"entity":{"type":"string"},"status":{"$ref":"#/definitions/EnumOptionData"},"datatableName":{"type":"string"},"systemDefined":{"type":"boolean"},"order":{"type":"integer","format":"int64"},"productId":{"type":"integer","format":"int64"},"productName":{"type":"string"}}},"DeleteReportsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":132}}},"PutReportResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":132},"changes":{"$ref":"#/definitions/PutReportResponseChanges"}}},"PutReportResponseChanges":{"type":"object","properties":{"reportName":{"type":"string","example":"Changed New Report"},"reportParameters":{"type":"array","items":{"$ref":"#/definitions/ReportParameterData"}}}},"ReportParameterData":{"type":"object"},"PutReportRequest":{"type":"object","properties":{"reportName":{"type":"string","example":"Completely New Report"},"reportParameters":{"type":"array","items":{"$ref":"#/definitions/ReportParameterData"}}}},"GetReportsResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"reportName":{"type":"string","example":"Client Listing"},"reportType":{"type":"string","example":"Table"},"reportSubType":{"type":"string"},"reportCategory":{"type":"string","example":"Client"},"description":{"type":"string","example":"Individual Client Report Lists the small number of defined fields on the client table. Would expect to copy this report and add any one to one additional data for specific tenant needs. Can be run for any size MFI but you expect it only to be run within a branch for larger ones. Depending on how many columns are displayed, there is probably is a limit of about 20/50k clients returned for html display (export to excel doesnt have that client browser/memory impact)."},"reportSql":{"type":"string"},"coreReport":{"type":"boolean","example":true},"useReport":{"type":"boolean","example":true},"reportParameters":{"type":"array","items":{"$ref":"#/definitions/ReportParameterData"}}}},"GetReportsTemplateResponse":{"type":"object","properties":{"allowedReportTypes":{"type":"array","items":{"type":"string"}},"allowedReportSubTypes":{"type":"array","items":{"type":"string"}},"allowedParameters":{"type":"array","items":{"$ref":"#/definitions/ReportParameterData"}}}},"PostReportsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":132}}},"PostRepostRequest":{"type":"object","properties":{"reportName":{"type":"string","example":"Completely New Report"},"reportType":{"type":"string","example":"Table"},"reportSubType":{"type":"string"},"reportCategory":{"type":"string","example":"Loan"},"description":{"type":"string","example":"Just An Example"},"reportSql":{"type":"string","example":"select 'very good sql' as AComment"},"reportParameters":{"type":"array","items":{"$ref":"#/definitions/ReportParameterData"}}}},"GetReportNameResponse":{"type":"object","properties":{"columnHeaders":{"$ref":"#/definitions/ResultsetColumnHeaderData"},"row":{"$ref":"#/definitions/ResultsetRowData"}}},"GetEntityTypeEntityIdDocumentsResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"parentEntityType":{"type":"string","example":"clients"},"parentEntityId":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Client Details Form"},"fileName":{"type":"string","example":"CGAP.pdf"},"size":{"type":"integer","format":"int64","example":5246719},"type":{"type":"string","example":"application/pdf"},"description":{"type":"string","example":"A signed form signed by new member"},"location":{"type":"string"},"storageType":{"type":"integer","format":"int32"}}},"PostEntityTypeEntityIdDocumentsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":3},"resourceIdentifier":{"type":"string","example":"3"}}},"PutEntityTypeEntityIdDocumentsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":3},"changes":{"$ref":"#/definitions/PutEntityTypeEntityIdDocumentsResponseChangesSwagger"},"resourceIdentifier":{"type":"string","example":"3"}}},"PutEntityTypeEntityIdDocumentsResponseChangesSwagger":{"type":"object"},"DeleteEntityTypeEntityIdDocumentsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":3},"changes":{"$ref":"#/definitions/PutEntityTypeEntityIdDocumentsResponseChangesSwagger"},"resourceIdentifier":{"type":"string","example":"3"}}},"PostHookResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":4}}},"Event":{"type":"object","properties":{"actionName":{"type":"string"},"entityName":{"type":"string"}}},"Field":{"type":"object","properties":{"fieldName":{"type":"string"},"fieldValue":{"type":"string"},"fieldType":{"type":"string"}}},"PostHookRequest":{"type":"object","properties":{"name":{"type":"string","example":"Web"},"isActive":{"type":"boolean","example":true},"displayName":{"type":"string","example":"Kremlin"},"templateId":{"type":"integer","format":"int64","example":1},"events":{"type":"array","items":{"$ref":"#/definitions/Event"}},"config":{"type":"array","items":{"$ref":"#/definitions/Field"}}}},"PutHookResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":4},"changes":{"$ref":"#/definitions/PutHookResponseChangesSwagger"}}},"PutHookResponseChangesSwagger":{"type":"object","properties":{"displayName":{"type":"string","example":"Kremlin"},"events":{"type":"array","example":"1","items":{"$ref":"#/definitions/Event"}},"config":{"type":"array","items":{"$ref":"#/definitions/Field"}}}},"PutHookRequest":{"type":"object","properties":{"name":{"type":"string","example":"Web"},"isActive":{"type":"boolean","example":true},"displayName":{"type":"string","example":"Kremlin"},"templateId":{"type":"integer","format":"int64","example":1},"events":{"type":"array","items":{"$ref":"#/definitions/Event"}},"config":{"type":"array","items":{"$ref":"#/definitions/Field"}}}},"GetHookResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Web"},"displayName":{"type":"string","example":"Kremlin"},"isActive":{"type":"boolean","example":true},"createdAt":{"type":"string","format":"date","example":"[2014, 9, 16]"},"updatedAt":{"type":"string","format":"date","example":"[2014, 9, 16]"},"templateId":{"type":"integer","format":"int64","example":1},"templateName":{"type":"string","example":"My UGD"},"events":{"type":"array","items":{"$ref":"#/definitions/Event"}},"config":{"type":"array","items":{"$ref":"#/definitions/Field"}}}},"DeleteHookResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":4}}},"GetHookTemplateResponse":{"type":"object","properties":{"templates":{"type":"array","items":{"$ref":"#/definitions/HookTemplateData"}},"groupings":{"type":"array","items":{"$ref":"#/definitions/Grouping"}}}},"Grouping":{"type":"object","properties":{"name":{"type":"string"}}},"HookTemplateData":{"type":"object","properties":{"serviceId":{"type":"integer","format":"int64"}}},"GetSchedulerResponse":{"type":"object","properties":{"active":{"type":"boolean","example":true}}},"GetJobsResponse":{"type":"object","properties":{"jobId":{"type":"integer","format":"int64","example":1},"displayName":{"type":"string","example":"Update loan Summary"},"nextRunTime":{"type":"string","format":"date-time"},"initializingError":{"type":"string"},"cronExpression":{"type":"string","example":"0 0 22 1/1 * ? *"},"active":{"type":"boolean","example":false},"currentlyRunning":{"type":"boolean","example":false},"lastRunHistory":{"$ref":"#/definitions/JobDetailHistoryData"}}},"JobDetailHistoryData":{"type":"object"},"GetJobsJobIDJobRunHistoryResponse":{"type":"object","properties":{"totalFilteredRecords":{"type":"integer","format":"int32","example":8},"pageItems":{"type":"array","items":{"$ref":"#/definitions/JobDetailHistoryDataSwagger"}}}},"JobDetailHistoryDataSwagger":{"type":"object","properties":{"version":{"type":"integer","format":"int64","example":1},"jobRunStartTime":{"type":"string","format":"date-time","example":"Jul 16, 2013 12:00:00 PM"},"jobRunEndTime":{"type":"string","format":"date-time","example":"Jul 16, 2013 12:00:00 PM"},"status":{"type":"string","example":"success"},"triggerType":{"type":"string","example":"cron"}}},"PutJobsJobsIDRequest":{"type":"object","properties":{"displayName":{"type":"string","example":"Update loan Summary"},"cronExpression":{"type":"string","example":"0 0 22 1/1 * ? *"},"active":{"type":"boolean","example":false}}},"DeleteReportMailingJobsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"DeleteReportMailingJobsRequest":{"type":"object"},"GetReportMailingJobsResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Client Numbers Report"},"description":{"type":"string","example":"Client Numbers Report"},"startDateTime":{"type":"string","format":"date-time","example":"1469627093000"},"recurrence":{"type":"string"},"timeline":{"$ref":"#/definitions/ReportMailingJobTimelineData"},"emailRecipients":{"type":"string","example":"info@musonisystem.com"},"emailSubject":{"type":"string","example":"Client Numbers Report"},"emailMessage":{"type":"string","example":"Client Numbers Report"},"emailAttachmentFileFormat":{"$ref":"#/definitions/EnumOptionData"},"stretchyReport":{"$ref":"#/definitions/ReportData"},"stretchyReportParamMap":{"type":"string","example":"{\"startDate\":\"2016-07-01\",\"endDate\":\"2016-08-02\",\"selectOffice\":\"1\",\"environementUrl\":\"environementUrl\"}"},"nextRunDateTime":{"type":"string","format":"date-time","example":"1469627093000"},"numberOfRuns":{"type":"integer","format":"int32","example":0},"isActive":{"type":"boolean","example":true},"runAsUserId":{"type":"integer","format":"int64","example":1}}},"ReportData":{"type":"object"},"ReportMailingJobTimelineData":{"type":"object"},"GetReportMailingJobsTemplate":{"type":"object","properties":{"isActive":{"type":"boolean","example":true},"emailAttachmentFileFormatOptions":{"type":"array","items":{"$ref":"#/definitions/EnumOptionData"}},"stretchyReportParamDateOptions":{"type":"array","items":{"$ref":"#/definitions/EnumOptionData"}}}},"PostReportMailingJobsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PostReportMailingJobsRequest":{"type":"object","properties":{"locale":{"type":"string","example":"en_GB"},"dateFormat":{"type":"string","example":"dd-MM-yyyy HH:mm:ss"},"name":{"type":"string","example":"Client Numbers Report"},"description":{"type":"string","example":"Client Numbers Report"},"startDateTime":{"type":"string","format":"date-time","example":"1469627093000"},"stretchyReportId":{"type":"integer","format":"int64","example":120},"emailRecipients":{"type":"string","example":"info@musonisystem.com"},"emailSubject":{"type":"string","example":"Client Numbers Report"},"emailMessage":{"type":"string","example":"Client Numbers Report"},"recurrence":{"type":"string","example":"FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,WE,FR"},"isActive":{"type":"boolean","example":true},"stretchyReportParamMap":{"type":"string","example":"{\"startDate\":\"2016-07-01\",\"endDate\":\"2016-08-02\",\"selectOffice\":\"1\",\"environementUrl\":\"environementUrl\"}"}}},"PutReportMailingJobsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1},"changes":{"$ref":"#/definitions/PutReportMailingJobsResponseChanges"}}},"PutReportMailingJobsResponseChanges":{"type":"object","properties":{"startDateTime":{"type":"string","format":"date-time","example":"10-08-2016 23:30:00"}}},"PutReportMailingJobsRequest":{"type":"object","properties":{"locale":{"type":"string","example":"en_GB"},"dateFormat":{"type":"string","example":"dd-MM-yyyy HH:mm:ss"},"startDateTime":{"type":"string","format":"date-time","example":"10-08-2016 23:30:00"}}},"ReportMailingJobRunHistoryData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"reportMailingJobId":{"type":"integer","format":"int64"},"startDateTime":{"type":"string","format":"date-time"},"endDateTime":{"type":"string","format":"date-time"},"status":{"type":"string"},"errorMessage":{"type":"string"},"errorLog":{"type":"string"}}},"PostAuthenticationResponse":{"type":"object","properties":{"username":{"type":"string","example":"mifos"},"userId":{"type":"integer","format":"int64","example":1},"base64EncodedAuthenticationKey":{"type":"string","example":"bWlmb3M6cGFzc3dvcmQ="},"authenticated":{"type":"boolean","example":true},"officeId":{"type":"integer","format":"int64","example":1},"officeName":{"type":"string","example":"Head Office"},"staffId":{"type":"integer","format":"int64","example":1},"staffDisplayName":{"type":"string","example":"Director, Program"},"organisationalRole":{"$ref":"#/definitions/EnumOptionData"},"roles":{"type":"array","items":{"$ref":"#/definitions/RoleData"}},"permissions":{"type":"array","example":"ALL_FUNCTIONS","items":{"type":"string"}}}},"RoleData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}}},"GetUserDetailsResponse":{"type":"object","properties":{"username":{"type":"string","example":"mifos"},"userId":{"type":"integer","format":"int64","example":1},"accessToken":{"type":"string","example":"bWlmb3M6cGFzc3dvcmQ="},"authenticated":{"type":"boolean","example":true},"officeId":{"type":"integer","format":"int64","example":1},"officeName":{"type":"string","example":"Head Office"},"staffId":{"type":"integer","format":"int64","example":1},"staffDisplayName":{"type":"string","example":"mifosStaffDisplayName"},"organisationalRole":{"$ref":"#/definitions/EnumOptionData"},"roles":{"type":"array","items":{"$ref":"#/definitions/RoleData"}},"permissions":{"type":"array","example":"ALL_FUNCTIONS","items":{"type":"string"}}}},"PostSurveySurveyNameApptableIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":2},"clientId":{"type":"integer","format":"int64","example":87},"resourceId":{"type":"integer","format":"int64","example":87}}},"PostSurveySurveyNameApptableIdRequest":{"type":"object","properties":{"ppi_household_members_cd_q1_householdmembers":{"type":"integer","format":"int64","example":167},"ppi_highestschool_cd_q2_highestschool":{"type":"integer","format":"int64","example":174},"ppi_businessoccupation_cd_q3_businessoccupation":{"type":"integer","format":"int64","example":180},"ppi_habitablerooms_cd_q4_habitablerooms":{"type":"integer","format":"int64","example":184},"ppi_floortype_cd_q5_floortype":{"type":"integer","format":"int64","example":188},"ppi_lightingsource_cd_q6_lightingsource":{"type":"integer","format":"int64","example":190},"ppi_irons_cd_q7_irons":{"type":"integer","format":"int64","example":193},"ppi_mosquitonets_cd_q8_mosquitonets":{"type":"integer","format":"int64","example":195},"ppi_towels_cd_q9_towels":{"type":"integer","format":"int64","example":198},"ppi_fryingpans_cd_q10_fryingpans":{"type":"integer","format":"int64","example":201},"Date":{"type":"string","format":"date-time","example":"2014-12-02 20:30:00"},"dateFormat":{"type":"string","format":"date-time","example":"Y-m-d H:i:s"},"locale":{"type":"string","example":"en_GB"}}},"GetSurveyResponse":{"type":"object","properties":{"datatableData":{"$ref":"#/definitions/GetSurveyResponseDatatableData"},"enabled":{"type":"boolean","example":false}}},"GetSurveyResponseDatatableData":{"type":"object","properties":{"applicationTableName":{"type":"string","example":"m_client"},"registeredTableName":{"type":"string","example":"ppi_kenya_2005"},"columnHeaderData":{"type":"array","items":{"$ref":"#/definitions/ResultsetColumnHeaderData"}}}},"GetHolidaysResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Good Friday"},"fromDate":{"type":"string","format":"date","example":"[2013, 10, 26]"},"toDate":{"type":"string","format":"date","example":"[2013, 10, 26]"},"repaymentsRescheduledTo":{"type":"string","format":"date","example":"[2013, 10, 27]"},"officeId":{"type":"integer","format":"int64","example":1},"status":{"$ref":"#/definitions/EnumOptionData"}}},"PostHolidaysHolidayIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PostHolidaysHolidayIdRequest":{"type":"object"},"PostHolidaysResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PostHolidaysRequest":{"type":"object","properties":{"name":{"type":"string","example":"Good Friday"},"description":{"type":"string","example":"Good Friday"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"locale":{"type":"string","example":"en"},"fromDate":{"type":"string","format":"date","example":"25 October 2013"},"toDate":{"type":"string","format":"date","example":"25 October 2013"},"repaymentsRescheduledTo":{"type":"string","format":"date","example":"26 October 2013"},"offices":{"type":"array","items":{"$ref":"#/definitions/PostHolidaysRequestOffices"}}}},"PostHolidaysRequestOffices":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1}}},"PutHolidaysHolidayIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1},"changes":{"$ref":"#/definitions/PutHolidaysHolidayIdResponseChanges"}}},"PutHolidaysHolidayIdResponseChanges":{"type":"object","properties":{"name":{"type":"string","example":"Independence day"},"description":{"type":"string","example":"Holiday for Independence day celebration"}}},"PutHolidaysHolidayIdRequest":{"type":"object","properties":{"name":{"type":"string","example":"Independence day"},"description":{"type":"string","example":"Holiday for Independence day celebration"}}},"DeleteHolidaysHolidayIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PutCurrenciesResponse":{"type":"object","properties":{"currencies":{"type":"string","example":"[\"KES\",\n \"BND\",\n \"LBP\",\n \"GHC\",\n \"USD\",\n \"XOF\",\n \"AED\",\n \"AMD\"]"}}},"PutCurrenciesRequest":{"type":"object","properties":{"currencies":{"type":"string","example":"[\"KES\",\n \"BND\",\n \"LBP\",\n \"GHC\",\n \"USD\",\n \"XOF\",\n \"AED\",\n \"AMD\"]"}}},"GetCurrenciesResponse":{"type":"object","properties":{"selectedCurrencyOptions":{"type":"array","items":{"$ref":"#/definitions/CurrencyData"}},"currencyOptions":{"type":"array","items":{"$ref":"#/definitions/CurrencyData"}}}},"PutOfficesOfficeIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":3},"resourceId":{"type":"integer","format":"int64","example":3},"changes":{"$ref":"#/definitions/PutOfficesOfficeIdResponseChanges"}}},"PutOfficesOfficeIdResponseChanges":{"type":"object","properties":{"name":{"type":"string","example":"Name is updated"}}},"PutOfficesOfficeIdRequest":{"type":"object","properties":{"name":{"type":"string","example":"Name is updated"}}},"GetOfficesResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Head Office"},"nameDecorated":{"type":"string","example":"Head Office"},"externalId":{"type":"string","example":"1"},"openingDate":{"type":"string","format":"date","example":"[2009, 1, 1]"},"hierarchy":{"type":"string","example":"."}}},"GetOfficesTemplateResponse":{"type":"object","properties":{"openingDate":{"type":"string","format":"date","example":"[2009, 1, 1]"},"allowedParents":{"type":"array","items":{"$ref":"#/definitions/GetOfficesResponse"}}}},"PostOfficesResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":3},"resourceId":{"type":"integer","format":"int64","example":3}}},"PostOfficesRequest":{"type":"object","properties":{"name":{"type":"string","example":"Good Friday"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"locale":{"type":"string","example":"en"},"openingDate":{"type":"string","format":"date","example":"01 July 2007"},"parentId":{"type":"integer","format":"int64","example":2},"externalId":{"type":"string","example":"SYS54-88"}}},"GetProvisioningCriteriaCriteriaIdResponse":{"type":"object","properties":{"criteriaId":{"type":"integer","format":"int64","example":1},"criteriaName":{"type":"string","example":"High Risk Products Criteria"},"createdBy":{"type":"string","example":"mifos"},"loanProducts":{"type":"array","items":{"$ref":"#/definitions/LoanProductData"}},"provisioningcriteria":{"type":"array","items":{"$ref":"#/definitions/ProvisioningCriteriaDefinitionData"}}}},"ProvisioningCriteriaDefinitionData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"categoryId":{"type":"integer","format":"int64"},"categoryName":{"type":"string"},"minAge":{"type":"integer","format":"int64"},"maxAge":{"type":"integer","format":"int64"},"provisioningPercentage":{"type":"number"},"liabilityAccount":{"type":"integer","format":"int64"},"liabilityCode":{"type":"string"},"expenseAccount":{"type":"integer","format":"int64"},"expenseCode":{"type":"string"}}},"GetProvisioningCriteriaResponse":{"type":"object","properties":{"criteriaId":{"type":"integer","format":"int64","example":1},"criteriaName":{"type":"string","example":"High Risk Products Criteria"},"createdBy":{"type":"string","example":"mifos"}}},"PostProvisioningCriteriaResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PostProvisioningCriteriaRequest":{"type":"object","properties":{"criteriaName":{"type":"string","example":"High Risk Products Criteria"},"loanProducts":{"type":"array","items":{"$ref":"#/definitions/LoanProductData"}},"provisioningcriteria":{"type":"array","items":{"$ref":"#/definitions/ProvisioningCriteriaDefinitionData"}}}},"PutProvisioningCriteriaResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1},"changes":{"$ref":"#/definitions/PutProvisioningCriteriaResponseChanges"}}},"PutProvisioningCriteriaResponseChanges":{"type":"object","properties":{"criteriaName":{"type":"string","example":"High Risk Products Criteria"}}},"PutProvisioningCriteriaRequest":{"type":"object","properties":{"criteriaName":{"type":"string","example":"High Risk Products Criteria"},"loanProducts":{"type":"array","items":{"$ref":"#/definitions/LoanProductData"}},"provisioningcriteria":{"type":"array","items":{"$ref":"#/definitions/ProvisioningCriteriaDefinitionData"}}}},"DeleteProvisioningCriteriaResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PutStaffResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"resourceId":{"type":"integer","format":"int64","example":1}}},"PutStaffRequest":{"type":"object","properties":{"isLoanOfficer":{"type":"boolean","example":false},"externalId":{"type":"string","example":"17Hbb"}}},"GetStaffResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"firstname":{"type":"string","example":"John"},"lastname":{"type":"string","example":"Doe"},"displayName":{"type":"string","example":"Doe, John"},"officeId":{"type":"integer","format":"int64","example":1},"officeName":{"type":"string","example":"Head Office"},"isLoanOfficer":{"type":"boolean","example":true},"externalId":{"type":"string","example":"17H"},"isActive":{"type":"boolean","example":false},"joiningDate":{"type":"string","format":"date","example":"[2009,8,1]"}}},"PostStaffResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"resourceId":{"type":"integer","format":"int64","example":1}}},"PostStaffRequest":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"firstname":{"type":"string","example":"John"},"lastname":{"type":"string","example":"Doe"},"isLoanOfficer":{"type":"boolean","example":true},"externalId":{"type":"string","example":"17H"},"mobileNo":{"type":"string","example":"+353851239876"},"isActive":{"type":"boolean","example":true},"joiningDate":{"type":"string","format":"date","example":"01 January 2009"},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"}}},"GetTellersResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":3},"officeId":{"type":"integer","format":"int64","example":1},"debitAccountId":{"type":"integer","format":"int64","example":0},"creditAccountId":{"type":"integer","format":"int64","example":0},"name":{"type":"string","example":"Teller3"},"startDate":{"type":"string","format":"date","example":"[2015,2,1]"},"status":{"type":"string","example":"ACTIVE","enum":["INVALID","PENDING","ACTIVE","INACTIVE","CLOSED"]},"officeName":{"type":"string","example":"Head Office"}}},"PostTellersResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"resourceId":{"type":"integer","format":"int64","example":5}}},"PostTellersRequest":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Teller3"},"description":{"type":"string","example":"cash handling"},"status":{"type":"string","example":"ACTIVE","enum":["INVALID","PENDING","ACTIVE","INACTIVE","CLOSED"]},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd-MM-yyyy"},"startDate":{"type":"string","format":"date","example":"01 February 2015"}}},"PutTellersResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"resourceId":{"type":"integer","format":"int64","example":5},"changes":{"$ref":"#/definitions/PutTellersResponseChanges"}}},"PutTellersResponseChanges":{"type":"object","properties":{"description":{"type":"string","example":"teller cash handling"},"endDate":{"type":"string","format":"date","example":"28 February 2015"},"startDate":{"type":"string","format":"date","example":"01 February 2015"},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd-MM-yyyy"}}},"PutTellersRequest":{"type":"object","properties":{"name":{"type":"string","example":"Teller3"},"officeId":{"type":"integer","format":"int64","example":1},"description":{"type":"string","example":"teller cash handling"},"status":{"type":"string","example":"ACTIVE","enum":["INVALID","PENDING","ACTIVE","INACTIVE","CLOSED"]},"endDate":{"type":"string","format":"date","example":"28 February 2015"},"startDate":{"type":"string","format":"date","example":"01 February 2015"},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd-MM-yyyy"}}},"CashierData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"tellerId":{"type":"integer","format":"int64"},"officeId":{"type":"integer","format":"int64"},"staffId":{"type":"integer","format":"int64"},"description":{"type":"string"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"},"startTime":{"type":"string"},"endTime":{"type":"string"},"officeName":{"type":"string"},"tellerName":{"type":"string"},"staffName":{"type":"string"},"fullDay":{"type":"boolean"}}},"GetTellersTellerIdCashiersResponse":{"type":"object","properties":{"tellerId":{"type":"integer","format":"int64","example":1},"tellerName":{"type":"string","example":"Teller1"},"officeId":{"type":"integer","format":"int64","example":1},"officeName":{"type":"string","example":"Head Office"},"cashiers":{"type":"array","items":{"$ref":"#/definitions/CashierData"}}}},"GetTellersTellerIdCashiersCashierIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"tellerId":{"type":"integer","format":"int64","example":1},"staffId":{"type":"integer","format":"int64","example":1},"description":{"type":"string"},"startDate":{"type":"string","format":"date","example":"Feb 20, 2015 12:00:00 AM"},"endDate":{"type":"string","format":"date","example":"Feb 27, 2015 12:00:00 AM"},"isFullDay":{"type":"boolean","example":true},"startTime":{"type":"string"},"endTime":{"type":"string"},"tellerName":{"type":"string","example":"Teller1"},"staffName":{"type":"string","example":"Staff1, Test"}}},"GetTellersTellerIdCashiersTemplateResponse":{"type":"object","properties":{"tellerId":{"type":"integer","format":"int64","example":1},"tellerName":{"type":"string","example":"Teller1"},"officeId":{"type":"integer","format":"int64","example":1},"officeName":{"type":"string","example":"Head Office"},"staffOptions":{"type":"array","items":{"$ref":"#/definitions/StaffData"}}}},"StaffData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"firstname":{"type":"string"},"lastname":{"type":"string"},"displayName":{"type":"string"},"officeId":{"type":"integer","format":"int64"},"officeName":{"type":"string"},"joiningDate":{"type":"string","format":"date"},"rowIndex":{"type":"integer","format":"int32"}}},"PostTellersTellerIdCashiersResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1},"subResourceId":{"type":"integer","format":"int64","example":2}}},"PostTellersTellerIdCashiersRequest":{"type":"object","properties":{"endDate":{"type":"string","format":"date","example":"28 February 2015"},"description":{"type":"string","example":"teller cash handling"},"isFullDay":{"type":"boolean","example":true},"staffId":{"type":"integer","format":"int64","example":3},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd-MM-yyyy"},"startDate":{"type":"string","format":"date","example":"01 February 2015"}}},"PutTellersTellerIdCashiersCashierIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1},"subResourceId":{"type":"integer","format":"int64","example":2},"changes":{"$ref":"#/definitions/PutTellersTellerIdCashiersCashierIdResponseChanges"}}},"PutTellersTellerIdCashiersCashierIdResponseChanges":{"type":"object","properties":{"endDate":{"type":"string","format":"date","example":"25 February 2015"},"description":{"type":"string","example":"Cashier updated."},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd-MM-yyyy"}}},"PutTellersTellerIdCashiersCashierIdRequest":{"type":"object","properties":{"endDate":{"type":"string","format":"date","example":"25 February 2015"},"description":{"type":"string","example":"Cashier updated."},"isFullDay":{"type":"boolean","example":true},"staffId":{"type":"integer","format":"int64","example":1},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd-MM-yyyy"},"startDate":{"type":"string","format":"date","example":"01 February 2015"}}},"DeleteTellersTellerIdCashiersCashierIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PostTellersTellerIdCashiersCashierIdAllocateResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1},"subResourceId":{"type":"integer","format":"int64","example":4}}},"PostTellersTellerIdCashiersCashierIdAllocateRequest":{"type":"object","properties":{"currencyCode":{"type":"string","example":"USD"},"txnAmount":{"type":"number","example":5000.0},"txnNote":{"type":"string","example":"allocating cash"},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd-MM-yyyy"},"txnDate":{"type":"string","format":"date-time","example":"01 February 2015"}}},"PostTellersTellerIdCashiersCashierIdSettleResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1},"subResourceId":{"type":"integer","format":"int64","example":5}}},"PostTellersTellerIdCashiersCashierIdSettleRequest":{"type":"object","properties":{"currencyCode":{"type":"string","example":"USD"},"txnAmount":{"type":"number","example":2000.0},"txnNote":{"type":"string","example":"cash settlement"},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd-MM-yyyy"},"txnDate":{"type":"string","format":"date-time","example":"20 February 2015"}}},"CashierTxnType":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"value":{"type":"string"}}},"GetTellersTellerIdCashiersCashiersIdTransactionsResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":8},"cashierId":{"type":"integer","format":"int64","example":15},"txnType":{"$ref":"#/definitions/CashierTxnType"},"txnAmount":{"type":"number","example":1000.0},"txnDate":{"type":"string","format":"date-time","example":"Feb 25, 2015 12:00:00 AM"},"entityId":{"type":"integer","format":"int64","example":2},"entityType":{"type":"string","example":"loans"},"txnNote":{"type":"string","example":"Disbursement, Loan:2-000000002,Client:1-Test 1"},"createdDate":{"type":"string","format":"date-time","example":"Feb 25, 2015 12:00:00 AM"},"officeId":{"type":"integer","format":"int64","example":1},"officeName":{"type":"string","example":"Head Office"},"tellerId":{"type":"integer","format":"int64","example":0},"cashierName":{"type":"string","example":"B, Ramesh"}}},"CashierTransactionData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"cashierId":{"type":"integer","format":"int64"},"txnType":{"$ref":"#/definitions/CashierTxnType"},"txnAmount":{"type":"number"},"txnDate":{"type":"string","format":"date-time"},"entityId":{"type":"integer","format":"int64"},"entityType":{"type":"string"},"txnNote":{"type":"string"},"createdDate":{"type":"string","format":"date-time"},"officeId":{"type":"integer","format":"int64"},"officeName":{"type":"string"},"tellerId":{"type":"integer","format":"int64"},"tellerName":{"type":"string"},"cashierName":{"type":"string"},"cashierData":{"$ref":"#/definitions/CashierData"},"startDate":{"type":"string","format":"date-time"},"endDate":{"type":"string","format":"date-time"}}},"GetTellersTellerIdCashiersCashiersIdSummaryAndTransactionsResponse":{"type":"object","properties":{"sumCashAllocation":{"type":"number","example":7000.0},"sumInwardCash":{"type":"number","example":0.0},"sumOutwardCash":{"type":"number","example":0.0},"sumCashSettlement":{"type":"number","example":50.0},"netCash":{"type":"number","example":6950.0},"officeName":{"type":"string","example":"Head Office"},"tellerId":{"type":"integer","format":"int64","example":1},"tellerName":{"type":"string","example":"Teller1"},"cashierId":{"type":"integer","format":"int64","example":1},"cashierName":{"type":"string","example":"Staff1, Test"},"cashierTransactions":{"$ref":"#/definitions/PageCashierTransactionData"}}},"Page":{"type":"object","properties":{"totalFilteredRecords":{"type":"integer","format":"int32"},"pageItems":{"type":"array","items":{"type":"object"}}}},"PageCashierTransactionData":{"type":"object","properties":{"totalFilteredRecords":{"type":"integer","format":"int32"},"pageItems":{"type":"array","items":{"$ref":"#/definitions/CashierTransactionData"}}}},"GetTellersTellerIdCashiersCashiersIdTransactionsTemplateResponse":{"type":"object","properties":{"cashierId":{"type":"integer","format":"int64","example":1},"officeName":{"type":"string","example":"Head Office"},"tellerId":{"type":"integer","format":"int64","example":0},"tellerName":{"type":"string","example":"Teller1"},"cashierName":{"type":"string","example":"Staff1, Test"},"cashierData":{"$ref":"#/definitions/CashierData"},"startDate":{"type":"string","format":"date","example":"Feb 20, 2015 12:00:00 AM"},"endDate":{"type":"string","format":"date","example":"Feb 27, 2015 12:00:00 AM"},"currencyOptions":{"type":"array","items":{"$ref":"#/definitions/CurrencyData"}}}},"GetWorkingDaysTemplateResponse":{"type":"object","properties":{"repaymentRescheduleOptions":{"type":"array","items":{"$ref":"#/definitions/EnumOptionData"}}}},"GetWorkingDaysResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"recurrence":{"type":"string","example":"FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR"},"repaymentRescheduleType":{"$ref":"#/definitions/EnumOptionData"},"extendTermForDailyRepayments":{"type":"boolean","example":true}}},"PutWorkingDaysResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PutWorkingDaysRequest":{"type":"object","properties":{"recurrence":{"type":"string","example":"FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR"},"locale":{"type":"string","example":"en"},"repaymentRescheduleType":{"example":"4","$ref":"#/definitions/EnumOptionData"},"extendTermForDailyRepayments":{"type":"boolean","example":true}}},"GetAccountTransfersFromAccountType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"accountType.savings"},"value":{"type":"string","example":"Savings Account"}}},"GetAccountTransfersFromClientOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"displayName":{"type":"string","example":"Small shop"},"officeId":{"type":"integer","format":"int32","example":1},"officeName":{"type":"string","example":"HO"}}},"GetAccountTransfersPageItems":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"reversed":{"type":"boolean","example":false},"currency":{"$ref":"#/definitions/GetAccountTransfersPageItemsCurrency"},"transferAmount":{"type":"number","format":"float","example":200.0},"transferDate":{"type":"string","format":"date","example":"[2013, 4, 1]"},"transferDescription":{"type":"string","example":"pay off loan from savings."},"fromOffice":{"$ref":"#/definitions/GetAccountTransfersPageItemsFromOffice"},"fromClient":{"$ref":"#/definitions/GetAccountTransfersFromClientOptions"},"fromAccountType":{"$ref":"#/definitions/GetAccountTransfersFromAccountType"},"fromAccount":{"$ref":"#/definitions/GetAccountTransfersPageItemsFromAccount"},"toOffice":{"$ref":"#/definitions/GetAccountTransfersPageItemsFromOffice"},"toClient":{"$ref":"#/definitions/GetAccountTransfersFromClientOptions"},"toAccountType":{"$ref":"#/definitions/GetAccountTransfersPageItemsToAccountType"},"toAccount":{"$ref":"#/definitions/GetAccountTransfersPageItemsFromAccount"}}},"GetAccountTransfersPageItemsCurrency":{"type":"object","properties":{"code":{"type":"string","example":"USD"},"name":{"type":"string","example":"US Dollar"},"decimalPlaces":{"type":"integer","format":"int32","example":2},"displaySymbol":{"type":"string","example":"$"},"nameCode":{"type":"string","example":"currency.USD"},"displayLabel":{"type":"string","example":"US Dollar ($)"}}},"GetAccountTransfersPageItemsFromAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"accountNo":{"type":"integer","format":"int64","example":1}}},"GetAccountTransfersPageItemsFromOffice":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"HO"}}},"GetAccountTransfersPageItemsToAccountType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"accountType.loan"},"value":{"type":"string","example":"Loan Account"}}},"GetAccountTransfersClientClassification":{"type":"object"},"GetAccountTransfersClientType":{"type":"object"},"GetAccountTransfersGender":{"type":"object"},"GetAccountTransfersGroups":{"type":"object"},"GetAccountTransfersStatus":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":300},"code":{"type":"string","example":"clientStatusType.active"},"value":{"type":"string","example":"Active"}}},"GetAccountTransfersTemplateRefundByTransferCurrency":{"type":"object","properties":{"code":{"type":"string","example":"USD"},"name":{"type":"string","example":"US Dollar"},"decimalPlaces":{"type":"integer","format":"int32","example":0},"inMultiplesOf":{"type":"integer","format":"int32","example":0},"displaySymbol":{"type":"string","example":"$"},"nameCode":{"type":"string","example":"currency.USD"},"displayLabel":{"type":"string","example":"US Dollar ($)"}}},"GetAccountTransfersTemplateRefundByTransferFromAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"accountNo":{"type":"integer","format":"int64","example":2},"clientId":{"type":"integer","format":"int32","example":1},"clientName":{"type":"string","example":"Daniel Owusu"},"productId":{"type":"integer","format":"int32","example":1},"productName":{"type":"string","example":"CTRL"},"fieldOfficerId":{"type":"integer","format":"int32","example":0},"currency":{"$ref":"#/definitions/GetAccountTransfersTemplateRefundByTransferCurrency"},"amtForTransfer":{"type":"number","format":"float","example":130.0}}},"GetAccountTransfersTemplateRefundByTransferFromAccountOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"accountNo":{"type":"integer","format":"int64","example":2},"clientId":{"type":"integer","format":"int32","example":1},"clientName":{"type":"string","example":"Daniel Owusu"},"productId":{"type":"integer","format":"int32","example":1},"productName":{"type":"string","example":"CTRL"},"fieldOfficerId":{"type":"integer","format":"int32","example":0},"currency":{"$ref":"#/definitions/GetAccountTransfersTemplateRefundByTransferCurrency"}}},"GetAccountTransfersTemplateRefundByTransferFromClient":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"accountNo":{"type":"integer","format":"int64","example":1},"status":{"$ref":"#/definitions/GetAccountTransfersStatus"},"active":{"type":"boolean","example":true},"activationDate":{"type":"string","format":"date","example":"[2012, 2, 1]"},"firstname":{"type":"string","example":"Daniel"},"lastname":{"type":"string","example":"Owusu"},"displayName":{"type":"string","example":"Daniel Owusu"},"gender":{"$ref":"#/definitions/GetAccountTransfersGender"},"clientType":{"$ref":"#/definitions/GetAccountTransfersClientType"},"clientClassification":{"$ref":"#/definitions/GetAccountTransfersClientClassification"},"officeId":{"type":"integer","format":"int32","example":1},"officeName":{"type":"string","example":"Head Office"},"timeline":{"$ref":"#/definitions/GetAccountTransfersTimeline"},"groups":{"$ref":"#/definitions/GetAccountTransfersGroups"}}},"GetAccountTransfersTemplateRefundByTransferFromClientOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"displayName":{"type":"string","example":"Daniel Owusu"},"officeId":{"type":"integer","format":"int32","example":1},"officeName":{"type":"string","example":"Head Office"}}},"GetAccountTransfersTemplateRefundByTransferFromOffice":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"Head Office"},"nameDecorated":{"type":"string","example":"Head Office"},"externalId":{"type":"integer","format":"int32","example":1},"openingDate":{"type":"string","format":"date","example":"[2009, 1, 1]"},"hierarchy":{"type":"string","example":"."}}},"GetAccountTransfersTemplateRefundByTransferFromOfficeOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"Head Office"},"nameDecorated":{"type":"string","example":"Head Office"}}},"GetAccountTransfersTemplateRefundByTransferResponse":{"type":"object","properties":{"currency":{"$ref":"#/definitions/GetAccountTransfersTemplateRefundByTransferCurrency"},"transferAmount":{"type":"number","format":"float","example":130.0},"transferDate":{"type":"string","format":"date","example":"[2014, 11, 1]"},"fromOffice":{"$ref":"#/definitions/GetAccountTransfersTemplateRefundByTransferFromOffice"},"fromClient":{"$ref":"#/definitions/GetAccountTransfersTemplateRefundByTransferFromClient"},"fromAccountType":{"$ref":"#/definitions/GetAccountTransfersPageItemsToAccountType"},"fromAccount":{"$ref":"#/definitions/GetAccountTransfersTemplateRefundByTransferFromAccount"},"toOffice":{"$ref":"#/definitions/GetAccountTransfersTemplateRefundByTransferFromOffice"},"toClient":{"$ref":"#/definitions/GetAccountTransfersTemplateRefundByTransferToClient"},"toAccountType":{"$ref":"#/definitions/GetAccountTransfersFromAccountType"},"toAccount":{"$ref":"#/definitions/GetAccountTransfersTemplateRefundByTransferToAccount"},"fromOfficeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetAccountTransfersTemplateRefundByTransferFromOfficeOptions"}},"fromClientOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetAccountTransfersTemplateRefundByTransferFromClientOptions"}},"fromAccountTypeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetAccountTransfersFromAccountType"}},"fromAccountOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetAccountTransfersTemplateRefundByTransferFromAccountOptions"}},"toOfficeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetAccountTransfersTemplateRefundByTransferFromOfficeOptions"}},"toClientOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetAccountTransfersTemplateRefundByTransferFromClientOptions"}},"toAccountTypeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetAccountTransfersFromAccountType"}},"toAccountOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetAccountTransfersTemplateRefundByTransferToAccount"}}}},"GetAccountTransfersTemplateRefundByTransferToAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"accountNo":{"type":"integer","format":"int64","example":1},"clientId":{"type":"integer","format":"int32","example":1},"clientName":{"type":"string","example":"Daniel Owusu"},"productId":{"type":"integer","format":"int32","example":1},"productName":{"type":"string","example":"TEST"},"fieldOfficerId":{"type":"integer","format":"int32","example":0},"currency":{"$ref":"#/definitions/GetAccountTransfersTemplateRefundByTransferCurrency"}}},"GetAccountTransfersTemplateRefundByTransferToClient":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"displayName":{"type":"string","example":"Daniel Owusu"},"officeId":{"type":"integer","format":"int32","example":1},"officeName":{"type":"string","example":"Head Office"}}},"GetAccountTransfersTimeline":{"type":"object","properties":{"submittedOnDate":{"type":"string","format":"date","example":"[2012, 2, 1]"},"submittedByUsername":{"type":"string","example":"mifos"},"submittedByFirstname":{"type":"string","example":"App"},"submittedByLastname":{"type":"string","example":"Administrator"},"activatedOnDate":{"type":"string","format":"date","example":"[2012, 2, 1]"},"activatedByUsername":{"type":"string","example":"mifos"},"activatedByFirstname":{"type":"string","example":"App"},"activatedByLastname":{"type":"string","example":"Administrator"}}},"PostAccountTransfersRefundByTransferResponse":{"type":"object","properties":{"savingsId":{"type":"integer","format":"int32","example":1},"resourceId":{"type":"integer","format":"int32","example":1}}},"PostAccountTransfersRefundByTransferRequest":{"type":"object","properties":{"fromAccountId":{"type":"integer","format":"int32","example":2},"fromAccountType":{"type":"integer","format":"int32","example":1},"toOfficeId":{"type":"integer","format":"int32","example":1},"toClientId":{"type":"integer","format":"int32","example":1},"toAccountType":{"type":"integer","format":"int32","example":2},"toAccountId":{"type":"integer","format":"int32","example":1},"transferAmount":{"type":"number","format":"float","example":130.0},"transferDate":{"type":"string","example":"31 October 2014"},"transferDescription":{"type":"string","example":"Transfer refund to my savings account"},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"fromClientId":{"type":"integer","format":"int32","example":1},"fromOfficeId":{"type":"integer","format":"int32","example":1}}},"GetAccountTransfersFromAccountTypeOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"accountType.savings"},"value":{"type":"string","example":"Savings Account"}}},"GetAccountTransfersFromOffice":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"HO"},"nameDecorated":{"type":"string","example":"HO"},"externalId":{"type":"integer","format":"int32","example":1},"openingDate":{"type":"string","format":"date","example":"[2009, 1, 1]"},"hierarchy":{"type":"string","example":"."}}},"GetAccountTransfersFromOfficeOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"HO"},"nameDecorated":{"type":"string","example":"HO"}}},"GetAccountTransfersTemplateResponse":{"type":"object","properties":{"transferAmount":{"type":"integer","format":"int64","example":0},"transferDate":{"type":"string","format":"date","example":"[2013, 8, 15]"},"fromOffice":{"$ref":"#/definitions/GetAccountTransfersFromOffice"},"fromAccountType":{"$ref":"#/definitions/GetAccountTransfersFromAccountType"},"fromOfficeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetAccountTransfersFromOfficeOptions"}},"fromClientOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetAccountTransfersFromClientOptions"}},"fromAccountTypeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetAccountTransfersFromAccountTypeOptions"}},"toOfficeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetAccountTransfersToOfficeOptions"}},"toAccountTypeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetAccountTransfersToAccountTypeOptions"}}}},"GetAccountTransfersToAccountTypeOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"accountType.savings"},"value":{"type":"string","example":"Savings Account"}}},"GetAccountTransfersToOfficeOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"HO"},"nameDecorated":{"type":"string","example":"HO"}}},"GetAccountTransfersResponse":{"type":"object","properties":{"totalFilteredRecords":{"type":"integer","format":"int32","example":4},"pageItems":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetAccountTransfersPageItems"}}}},"PostAccountTransfersResponse":{"type":"object","properties":{"savingsId":{"type":"integer","format":"int32","example":1},"resourceId":{"type":"integer","format":"int32","example":1}}},"PostAccountTransfersRequest":{"type":"object","properties":{"fromOfficeId":{"type":"integer","format":"int32","example":1},"fromClientId":{"type":"integer","format":"int32","example":1},"fromAccountType":{"type":"integer","format":"int32","example":2},"fromAccountId":{"type":"integer","format":"int32","example":1},"toOfficeId":{"type":"integer","format":"int32","example":1},"toClientId":{"type":"integer","format":"int32","example":1},"toAccountType":{"type":"integer","format":"int32","example":2},"toAccountId":{"type":"integer","format":"int32","example":2},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"locale":{"type":"string","example":"en"},"transferDate":{"type":"string","example":"01 August 2011"},"transferAmount":{"type":"number","format":"float","example":112.45},"transferDescription":{"type":"string","example":"A description of the transfer"}}},"GetFromAccountStandingInstructionSwagger":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":14},"accountNo":{"type":"integer","format":"int64","example":14},"productId":{"type":"integer","format":"int64","example":1},"productName":{"type":"string","example":"savings old"}}},"GetFromAccountTypeStandingInstructionSwagger":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"accountType.savings"},"value":{"type":"string","example":"Savings Account"}}},"GetFromClientStandingInstructionSwagger":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"displayName":{"type":"string","example":"Test test"},"officeId":{"type":"integer","format":"int64","example":1},"officeName":{"type":"string","example":"Head Office"}}},"GetFromOfficeStandingInstructionSwagger":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Head Office"}}},"GetInstructionTypeStandingInstructionSwagger":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"standingInstructionType.fixed"},"value":{"type":"string","example":"Fixed"}}},"GetPriorityStandingInstructionSwagger":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":3},"code":{"type":"string","example":"standingInstructionPriority.medium"},"value":{"type":"string","example":"Medium Priority"}}},"GetRecurrenceFrequencyStandingInstructionSwagger":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"frequencyperiodFrequencyType.months"},"value":{"type":"string","example":"Months"}}},"GetRecurrenceTypeStandingInstructionSwagger":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"accountTransferRecurrenceType.periodic"},"value":{"type":"string","example":"Periodic Recurrence"}}},"GetStandingInstructionsStandingInstructionIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"accountDetailId":{"type":"integer","format":"int64","example":6},"name":{"type":"string","example":"test standing"},"fromOffice":{"$ref":"#/definitions/GetFromOfficeStandingInstructionSwagger"},"fromClient":{"$ref":"#/definitions/GetFromClientStandingInstructionSwagger"},"fromAccountType":{"$ref":"#/definitions/GetFromAccountTypeStandingInstructionSwagger"},"fromAccount":{"$ref":"#/definitions/GetFromAccountStandingInstructionSwagger"},"toOffice":{"$ref":"#/definitions/GetToOfficeStandingInstructionSwagger"},"toClient":{"$ref":"#/definitions/GetToClientStandingInstructionSwagger"},"toAccountType":{"$ref":"#/definitions/GetToAccountTypeStandingInstructionSwagger"},"toAccount":{"$ref":"#/definitions/GetToAccountStandingInstructionSwagger"},"transferType":{"$ref":"#/definitions/GetTransferTypeStandingInstructionSwagger"},"priority":{"$ref":"#/definitions/GetPriorityStandingInstructionSwagger"},"instructionType":{"$ref":"#/definitions/GetInstructionTypeStandingInstructionSwagger"},"status":{"$ref":"#/definitions/GetStatusStandingInstructionSwagger"},"amount":{"type":"number","format":"float","example":150.0},"validFrom":{"type":"string","format":"date","example":"[2014, 4, 3]"},"recurrenceType":{"$ref":"#/definitions/GetRecurrenceTypeStandingInstructionSwagger"},"recurrenceFrequency":{"$ref":"#/definitions/GetRecurrenceFrequencyStandingInstructionSwagger"},"recurrenceInterval":{"type":"integer","format":"int32","example":1},"recurrenceOnMonthDay":{"type":"string","format":"date","example":"[4, 3]"}}},"GetStatusStandingInstructionSwagger":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"standingInstructionStatus.deleted"},"value":{"type":"string","example":"Deleted"}}},"GetToAccountStandingInstructionSwagger":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":3},"accountNo":{"type":"integer","format":"int64","example":3},"productId":{"type":"integer","format":"int64","example":4},"productName":{"type":"string","example":"account overdraft"}}},"GetToAccountTypeStandingInstructionSwagger":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"accountType.savings"},"value":{"type":"string","example":"Savings Account"}}},"GetToClientStandingInstructionSwagger":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"displayName":{"type":"string","example":"Test test"},"officeId":{"type":"integer","format":"int64","example":1},"officeName":{"type":"string","example":"Head Office"}}},"GetToOfficeStandingInstructionSwagger":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Head Office"}}},"GetTransferTypeStandingInstructionSwagger":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"accountTransferType.account.transfer"},"value":{"type":"string","example":"Account Transfer"}}},"GetFromAccountTypeOptionsResponseStandingInstructionSwagger":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":2},"code":{"type":"string","example":"accountType.savings"},"value":{"type":"string","example":"Savings Account"}}},"GetFromAccountTypeResponseStandingInstructionSwagger":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":2},"code":{"type":"string","example":"accountType.savings"},"value":{"type":"string","example":"Savings Account"}}},"GetFromClientOptionsResponseStandingInstructionSwagger":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"displayName":{"type":"string","example":"Client_FirstName_2VRAG Client_LastName_9QCY"},"officeId":{"type":"integer","format":"int64","example":1},"officeName":{"type":"string","example":"Head Office"}}},"GetFromOfficeOptionsResponseStandingInstructionSwagger":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Head Office"},"nameDecorated":{"type":"string","example":"Head Office"}}},"GetFromOfficeResponseStandingInstructionSwagger":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Head Office"},"decoratedName":{"type":"string","example":"Head Office"},"externalId":{"type":"integer","format":"int32","example":1},"openingDate":{"type":"string","format":"date","example":"[2009, 1, 1]"},"hierarchy":{"type":"string","example":"."}}},"GetInstructionTypeOptionsResponseStandingInstructionSwagger":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"standingInstructionType.fixed"},"value":{"type":"string","example":"Fixed"}}},"GetPriorityOptionsResponseStandingInstructionSwagger":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"standingInstructionPriority.urgent"},"value":{"type":"string","example":"Urgent Priority"}}},"GetRecurrenceFrequencyOptionsResponseStandingInstructionSwagger":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":0},"code":{"type":"string","example":"frequencyperiodFrequencyType.days"},"value":{"type":"string","example":"Days"}}},"GetRecurrenceTypeOptionsResponseStandingInstructionSwagger":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"accountTransferRecurrenceType.periodic"},"value":{"type":"string","example":"Periodic Recurrence"}}},"GetStandingInstructionsTemplateResponse":{"type":"object","properties":{"fromOffice":{"$ref":"#/definitions/GetFromOfficeResponseStandingInstructionSwagger"},"fromAccountType":{"$ref":"#/definitions/GetFromAccountTypeResponseStandingInstructionSwagger"},"fromOfficeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetFromOfficeOptionsResponseStandingInstructionSwagger"}},"fromClientOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetFromClientOptionsResponseStandingInstructionSwagger"}},"fromAccountTypeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetFromAccountTypeOptionsResponseStandingInstructionSwagger"}},"toOfficeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetToOfficeOptionsResponseStandingInstructionSwagger"}},"toAccountTypeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetToAccountTypeOptionsResponseStandingInstructionSwagger"}},"transferTypeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetTransferTypeOptionsResponseStandingInstructionSwagger"}},"statusOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetStatusOptionsResponseStandingInstructionSwagger"}},"instructionTypeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetInstructionTypeOptionsResponseStandingInstructionSwagger"}},"priorityOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetPriorityOptionsResponseStandingInstructionSwagger"}},"recurrenceTypeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetRecurrenceTypeOptionsResponseStandingInstructionSwagger"}},"recurrenceFrequencyOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetRecurrenceFrequencyOptionsResponseStandingInstructionSwagger"}}}},"GetStatusOptionsResponseStandingInstructionSwagger":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"standingInstructionStatus.active"},"value":{"type":"string","example":"Active"}}},"GetToAccountTypeOptionsResponseStandingInstructionSwagger":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"accountType.loan"},"value":{"type":"string","example":"Loan Account"}}},"GetToOfficeOptionsResponseStandingInstructionSwagger":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"Head Office"},"nameDecorated":{"type":"string","example":"Head Office"}}},"GetTransferTypeOptionsResponseStandingInstructionSwagger":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"accountTransferType.account.transfer"},"value":{"type":"string","example":"Account Transfer"}}},"GetPageItemsStandingInstructionSwagger":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"accountDetailId":{"type":"integer","format":"int64","example":6},"name":{"type":"string","example":"test standing"},"fromOffice":{"$ref":"#/definitions/GetFromOfficeStandingInstructionSwagger"},"fromClient":{"$ref":"#/definitions/GetFromClientStandingInstructionSwagger"},"fromAccountType":{"$ref":"#/definitions/GetFromAccountTypeStandingInstructionSwagger"},"fromAccount":{"$ref":"#/definitions/GetFromAccountStandingInstructionSwagger"},"toOffice":{"$ref":"#/definitions/GetToOfficeStandingInstructionSwagger"},"toClient":{"$ref":"#/definitions/GetToClientStandingInstructionSwagger"},"toAccountType":{"$ref":"#/definitions/GetToAccountTypeStandingInstructionSwagger"},"toAccount":{"$ref":"#/definitions/GetToAccountStandingInstructionSwagger"},"transferType":{"$ref":"#/definitions/GetTransferTypeStandingInstructionSwagger"},"priority":{"$ref":"#/definitions/GetPriorityStandingInstructionSwagger"},"instructionType":{"$ref":"#/definitions/GetInstructionTypeStandingInstructionSwagger"},"status":{"$ref":"#/definitions/GetStatusStandingInstructionSwagger"},"amount":{"type":"number","format":"float","example":150.0},"validFrom":{"type":"string","format":"date","example":"[2014, 4, 3]"},"recurrenceType":{"$ref":"#/definitions/GetRecurrenceTypeStandingInstructionSwagger"},"recurrenceFrequency":{"$ref":"#/definitions/GetRecurrenceFrequencyStandingInstructionSwagger"},"recurrenceInterval":{"type":"integer","format":"int32","example":1},"recurrenceOnMonthDay":{"type":"string","format":"date","example":"[4, 3]"}}},"GetStandingInstructionsResponse":{"type":"object","properties":{"totalFilteredRecords":{"type":"integer","format":"int32","example":2},"pageItems":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetPageItemsStandingInstructionSwagger"}}}},"PutStandingInstructionsStandingInstructionIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":20},"changes":{"$ref":"#/definitions/PutUpdateStandingInstructionChanges"}}},"PutUpdateStandingInstructionChanges":{"type":"object","properties":{"recurrenceInterval":{"type":"integer","format":"int32","example":2}}},"PutStandingInstructionsStandingInstructionIdRequest":{"type":"object","properties":{"recurrenceInterval":{"type":"integer","format":"int32","example":2}}},"PostStandingInstructionsResponse":{"type":"object","properties":{"clientId":{"type":"integer","format":"int64","example":1},"resourceId":{"type":"integer","format":"int32","example":65}}},"PostStandingInstructionsRequest":{"type":"object","properties":{"fromOfficeId":{"type":"integer","format":"int64","example":1},"fromClientId":{"type":"integer","format":"int64","example":1},"fromAccountType":{"type":"integer","format":"int32","example":2},"name":{"type":"string","example":"standing instruction"},"transferType":{"type":"integer","format":"int32","example":1},"priority":{"type":"integer","format":"int32","example":2},"status":{"type":"integer","format":"int32","example":1},"fromAccountId":{"type":"integer","format":"int64","example":1},"toOfficeId":{"type":"integer","format":"int64","example":1},"toClientId":{"type":"integer","format":"int64","example":1},"toAccountType":{"type":"integer","format":"int32","example":2},"toAccountId":{"type":"integer","format":"int64","example":3},"instructionType":{"type":"integer","format":"int32","example":1},"amount":{"type":"integer","format":"int32","example":221},"validFrom":{"type":"string","example":"08 April 2014"},"recurrenceType":{"type":"integer","format":"int32","example":1},"recurrenceInterval":{"type":"integer","format":"int32","example":1},"recurrenceFrequency":{"type":"integer","format":"int32","example":2},"locale":{"type":"string","description":"en"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"recurrenceOnMonthDay":{"type":"string","example":"02 April"},"monthDayFormat":{"type":"string","example":"dd MMMM"}}},"GetStandingInstructionHistoryFromAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":2},"accountNo":{"type":"integer","format":"int64","example":2},"productId":{"type":"integer","format":"int64","example":1},"productName":{"type":"string","example":"General Savings"}}},"GetStandingInstructionHistoryPageItemsFromClient":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"displayName":{"type":"string","example":"Test client"},"officeId":{"type":"integer","format":"int64","example":1},"officeName":{"type":"string","example":"Head Office"}}},"GetStandingInstructionHistoryPageItemsResponse":{"type":"object","properties":{"standingInstructionId":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"ACC Transfer"},"fromOffice":{"$ref":"#/definitions/GetFromOfficeStandingInstructionSwagger"},"fromClient":{"$ref":"#/definitions/GetStandingInstructionHistoryPageItemsFromClient"},"fromAccountType":{"$ref":"#/definitions/GetFromAccountTypeStandingInstructionSwagger"},"fromAccount":{"$ref":"#/definitions/GetStandingInstructionHistoryFromAccount"},"toAccountType":{"$ref":"#/definitions/GetToAccountTypeStandingInstructionSwagger"},"toAccount":{"$ref":"#/definitions/GetStandingInstructionHistoryToAccount"},"toOffice":{"$ref":"#/definitions/GetToOfficeStandingInstructionSwagger"},"toClient":{"$ref":"#/definitions/GetStandingInstructionHistoryToClient"},"amount":{"type":"number","format":"float","example":10.0},"status":{"type":"string","example":"success"},"executionTime":{"type":"string","format":"date","example":"[2014, 6, 30]"},"errorLog":{"type":"string","example":" "}}},"GetStandingInstructionHistoryToAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"accountNo":{"type":"integer","format":"int64","example":1},"productId":{"type":"integer","format":"int64","example":1},"productName":{"type":"string","example":"General Savings"}}},"GetStandingInstructionHistoryToClient":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"displayName":{"type":"string","example":"Test client"},"officeId":{"type":"integer","format":"int64","example":1},"officeName":{"type":"string","example":"Head Office"}}},"GetStandingInstructionRunHistoryResponse":{"type":"object","properties":{"totalFilteredRecords":{"type":"integer","format":"int32","example":2},"pageItems":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetStandingInstructionHistoryPageItemsResponse"}}}},"GetAccountsChargesCurrency":{"type":"object","properties":{"code":{"type":"string","example":"USD"},"name":{"type":"string","example":"US Dollar"},"decimalPlaces":{"type":"integer","format":"int32","example":2},"displaySymbol":{"type":"string","example":"$"},"nameCode":{"type":"string","example":"currency.USD"},"displayLabel":{"type":"string","example":"US Dollar ($)"}}},"GetAccountsPageItems":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"accountNo":{"type":"integer","format":"int64","example":1},"clientId":{"type":"integer","format":"int32","example":1},"clientName":{"type":"string","example":"Client Name"},"productId":{"type":"integer","format":"int32","example":1},"productName":{"type":"string","example":"Share Product Name"},"status":{"$ref":"#/definitions/GetAccountsTypeStatus"},"timeline":{"$ref":"#/definitions/GetAccountsTypeTimeline"},"currency":{"$ref":"#/definitions/GetAccountsChargesCurrency"},"purchasedShares":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetAccountsTypePurchasedShares"}},"summary":{"$ref":"#/definitions/GetAccountsTypeSummary"}}},"GetAccountsTypePurchasedShares":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"purchasedDate":{"type":"string","example":"01 May 2013"},"numberOfShares":{"type":"integer","format":"int32","example":10},"purchasedPrice":{"type":"integer","format":"int32","example":5}}},"GetAccountsTypeResponse":{"type":"object","properties":{"totalFilteredRecords":{"type":"integer","format":"int32","example":1},"pageItems":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetAccountsPageItems"}}}},"GetAccountsTypeStatus":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":100},"code":{"type":"string","example":"shareAccountStatusType.submitted.and.pending.approval"},"value":{"type":"string","example":"Submitted and pending approval"},"submittedAndPendingApproval":{"type":"boolean","example":true},"approved":{"type":"boolean","example":false},"rejected":{"type":"boolean","example":false},"active":{"type":"boolean","example":false},"closed":{"type":"boolean","example":false}}},"GetAccountsTypeSummary":{"type":"object","properties":{"currency":{"$ref":"#/definitions/GetAccountsChargesCurrency"}}},"GetAccountsTypeTimeline":{"type":"object","properties":{"submittedOnDate":{"type":"string","format":"date","example":"[2013, 3, 1]"}}},"PostAccountsTypeAccountIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":5}}},"PostAccountsRequestedShares":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":35}}},"PostAccountsTypeAccountIdRequest":{"type":"object","properties":{"requestedShares":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/PostAccountsRequestedShares"}}}},"GetAccountsChargeCalculationType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"chargeCalculationType.flat"},"value":{"type":"string","example":"Flat"}}},"GetAccountsChargeTimeType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":13},"code":{"type":"string","example":"chargeTimeType.activation"},"value":{"type":"string","example":"Share Account Activate"}}},"GetAccountsCharges":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":9},"chargeId":{"type":"integer","format":"int32","example":20},"accountId":{"type":"integer","format":"int32","example":2},"name":{"type":"string","example":"Share Account Activation Flat"},"chargeTimeType":{"$ref":"#/definitions/GetAccountsChargeTimeType"},"chargeCalculationType":{"$ref":"#/definitions/GetAccountsChargeCalculationType"},"percentage":{"type":"number","format":"double","example":0.0},"amountPercentageAppliedTo":{"type":"number","format":"double","example":0.0},"currency":{"$ref":"#/definitions/GetAccountsChargesCurrency"},"amount":{"type":"number","format":"float","example":1.0},"amountPaid":{"type":"number","format":"float","example":1.0},"amountWaived":{"type":"number","format":"float","example":0.0},"amountWrittenOff":{"type":"number","format":"float","example":0.0},"amountOutstanding":{"type":"number","format":"float","example":0.0},"amountOrPercentage":{"type":"number","format":"float","example":1.0},"isActive":{"type":"boolean","example":true}}},"GetAccountsCurrency":{"type":"object","properties":{"code":{"type":"string","example":"USD"},"name":{"type":"string","example":"US Dollar"},"decimalPlaces":{"type":"integer","format":"int32","example":2},"inMultiplesOf":{"type":"integer","format":"int32","example":100},"displaySymbol":{"type":"string","example":"$"},"nameCode":{"type":"string","example":"currency.USD"},"displayLabel":{"type":"string","example":"US Dollar ($)"}}},"GetAccountsLockPeriodTypeEnum":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":0},"code":{"type":"string","example":"savings.lockin.sharePeriodFrequencyType.days"},"value":{"type":"string","example":"Days"}}},"GetAccountsPurchasedShares":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":6},"accountId":{"type":"integer","format":"int32","example":2},"purchasedDate":{"type":"string","format":"date","example":"[2016, 4, 1]"},"numberOfShares":{"type":"integer","format":"int32","example":10},"purchasedPrice":{"type":"number","format":"double","example":0.5},"status":{"$ref":"#/definitions/GetAccountsPurchasedSharesStatus"},"type":{"$ref":"#/definitions/GetAccountsPurchasedSharesType"},"amount":{"type":"number","format":"double","example":5.05},"chargeAmount":{"type":"number","format":"double","example":0.05},"amountPaid":{"type":"number","format":"double","example":5.05}}},"GetAccountsPurchasedSharesStatus":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":300},"code":{"type":"string","example":"purchasedSharesStatusType.approved"},"value":{"type":"string","example":"Approved"}}},"GetAccountsPurchasedSharesType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":500},"code":{"type":"string","example":"purchasedSharesType.purchased"},"value":{"type":"string","example":"Purchase"}}},"GetAccountsStatus":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":300},"code":{"type":"string","example":"shareAccountStatusType.active"},"value":{"type":"string","example":"Active"},"submittedAndPendingApproval":{"type":"boolean","example":false},"approved":{"type":"boolean","example":false},"rejected":{"type":"boolean","example":false},"active":{"type":"boolean","example":true},"closed":{"type":"boolean","example":false}}},"GetAccountsSummary":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"accountNo":{"type":"integer","format":"int64","example":2},"totalApprovedShares":{"type":"integer","format":"int32","example":1},"totalPendingForApprovalShares":{"type":"integer","format":"int32","example":0},"productId":{"type":"integer","format":"int32","example":1},"productName":{"type":"string","example":"Conflux Share Product"},"status":{"$ref":"#/definitions/GetAccountsStatus"},"timeline":{"$ref":"#/definitions/GetAccountsTimeline"},"currency":{"$ref":"#/definitions/GetAccountsCurrency"}}},"GetAccountsTimeline":{"type":"object","properties":{"submittedOnDate":{"type":"string","format":"date","example":"[2016, 4, 1]"},"submittedByUsername":{"type":"string","example":"mifos"},"submittedByFirstname":{"type":"string","example":"App"},"submittedByLastname":{"type":"string","example":"Administrator"},"approvedDate":{"type":"string","format":"date","example":"[2016, 4, 1]"},"approvedByUsername":{"type":"string","example":"mifos"},"approvedByFirstname":{"type":"string","example":"App"},"approvedByLastname":{"type":"string","example":"Administrator"},"activatedDate":{"type":"string","format":"date","example":"[2016, 4, 1]"}}},"GetAccountsTypeAccountIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"accountNo":{"type":"integer","format":"int64","example":2},"savingsAccountNumber":{"type":"integer","format":"int64","example":13},"clientId":{"type":"integer","format":"int32","example":7},"clientName":{"type":"string","example":"Client_FirstName_2KX8C Client_LastName_NWNG"},"productId":{"type":"integer","format":"int32","example":1},"productName":{"type":"string","example":"Share Product"},"status":{"$ref":"#/definitions/GetAccountsStatus"},"timeline":{"$ref":"#/definitions/GetAccountsTimeline"},"currency":{"$ref":"#/definitions/GetAccountsCurrency"},"summary":{"$ref":"#/definitions/GetAccountsSummary"},"purchasedShares":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetAccountsPurchasedShares"}},"savingsAccountId":{"type":"integer","format":"int32","example":13},"currentMarketPrice":{"type":"integer","format":"int32","example":5},"lockinPeriod":{"type":"integer","format":"int32","example":1},"lockPeriodTypeEnum":{"$ref":"#/definitions/GetAccountsLockPeriodTypeEnum"},"minimumActivePeriod":{"type":"integer","format":"int32","example":1},"minimumActivePeriodTypeEnum":{"$ref":"#/definitions/GetAccountsLockPeriodTypeEnum"},"allowDividendCalculationForInactiveClients":{"type":"boolean","example":true},"charges":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetAccountsCharges"}},"dividends":{"type":"array","items":{"type":"string"}}}},"PostAccountsTypeResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1}}},"PostAccountsCharges":{"type":"object","properties":{"chargeId":{"type":"integer","format":"int32","example":20},"amount":{"type":"integer","format":"int32","example":1}}},"PostAccountsTypeRequest":{"type":"object","properties":{"clientId":{"type":"integer","format":"int32","example":7},"productId":{"type":"integer","format":"int32","example":1},"requestedShares":{"type":"integer","format":"int32","example":100},"externalId":{"type":"integer","format":"int32","example":1},"submittedDate":{"type":"string","example":"01 May 2016"},"minimumActivePeriod":{"type":"integer","format":"int32","example":1},"minimumActivePeriodFrequencyType":{"type":"integer","format":"int32","example":0},"lockinPeriodFrequency":{"type":"integer","format":"int32","example":1},"lockinPeriodFrequencyType":{"type":"integer","format":"int32","example":0},"applicationDate":{"type":"string","example":"01 May 2016"},"allowDividendCalculationForInactiveClients":{"type":"boolean","example":true},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"charges":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/PostAccountsCharges"}},"savingsAccountId":{"type":"integer","format":"int32","example":13}}},"PutAccountsChanges":{"type":"object","properties":{"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"applicationDate":{"type":"string","example":"01 April 2016"},"requestedShares":{"type":"integer","format":"int32","example":20},"locale":{"type":"string","example":"en"}}},"PutAccountsTypeAccountIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1},"changes":{"$ref":"#/definitions/PutAccountsChanges"}}},"PutAccountsTypeAccountIdRequest":{"type":"object","properties":{"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"applicationDate":{"type":"string","example":"01 April 2016"},"requestedShares":{"type":"integer","format":"int32","example":20}}},"GetAccountsTypeProductOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"Share Product"},"shortName":{"type":"string","example":"SP"},"totalShares":{"type":"integer","format":"int64","example":100}}},"GetAccountsTypeTemplateResponse":{"type":"object","properties":{"clientId":{"type":"integer","format":"int32","example":7},"clientName":{"type":"string","example":"Client Name"},"productOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetAccountsTypeProductOptions"}}}},"GetFieldConfigurationEntityResponse":{"type":"object","properties":{"fieldConfigurationId":{"type":"integer","format":"int32","example":1},"entity":{"type":"string","example":"ADDRESS"},"subentity":{"type":"string","example":"CLIENT"},"field":{"type":"string","example":"addressType"},"is_enabled":{"type":"string","example":"true"},"is_mandatory":{"type":"string","example":"false"},"validation_regex":{"type":"string","example":" "}}},"DeleteChargesChargeIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1}}},"GetChargesAppliesToResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"chargeAppliesTo.loan"},"value":{"type":"string","example":"Loan"}}},"GetChargesCalculationTypeResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"chargeCalculationType.flat"},"value":{"type":"string","example":"Flat"}}},"GetChargesCurrencyResponse":{"type":"object","properties":{"code":{"type":"string","example":"USD"},"name":{"type":"string","example":"US Dollar"},"decimalPlaces":{"type":"integer","format":"int32","example":2},"displaySymbol":{"type":"string","example":"$"},"nameCode":{"type":"string","example":"currency.USD"},"displayLabel":{"type":"string","example":"US Dollar ($)"}}},"GetChargesPaymentModeResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"chargepaymentmode.accounttransfer"},"value":{"type":"string","example":"Account Transfer"}}},"GetChargesResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Loan Service fee"},"active":{"type":"string","example":"true"},"penalty":{"type":"string","example":"false"},"currency":{"$ref":"#/definitions/GetChargesCurrencyResponse"},"amount":{"type":"number","format":"float","example":230.56},"chargeTimeType":{"$ref":"#/definitions/GetChargesTimeTypeResponse"},"chargeAppliesTo":{"$ref":"#/definitions/GetChargesAppliesToResponse"},"chargeCalculationType":{"$ref":"#/definitions/GetChargesCalculationTypeResponse"},"chargePaymentMode":{"$ref":"#/definitions/GetChargesPaymentModeResponse"}}},"GetChargesTimeTypeResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"chargeTimeType.disbursement"},"value":{"type":"string","example":"Disbursement"}}},"GetChargesTemplateFeeFrequencyOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":0},"code":{"type":"string","example":"loanTermFrequency.periodFrequencyType.days"},"value":{"type":"string","example":"Days"}}},"GetChargesTemplateLoanChargeCalculationTypeOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"chargeCalculationType.flat"},"value":{"type":"string","example":"Flat"}}},"GetChargesTemplateLoanChargeTimeTypeOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"chargeTimeType.specifiedDueDate"},"value":{"type":"string","example":"Specified due date"}}},"GetChargesTemplateResponse":{"type":"object","properties":{"active":{"type":"string","example":"false"},"penalty":{"type":"string","example":"false"},"currencyOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetChargesCurrencyResponse"}},"chargeCalculationTypeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetChargesCalculationTypeResponse"}},"chargeAppliesToOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetChargesAppliesToResponse"}},"chargeTimeTypeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetChargesTimeTypeResponse"}},"chargePaymentModeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetChargesPaymentModeResponse"}},"loanChargeCalculationTypeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetChargesTemplateLoanChargeCalculationTypeOptions"}},"loanChargeTimeTypeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetChargesTemplateLoanChargeTimeTypeOptions"}},"savingsChargeCalculationTypeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetChargesTemplateLoanChargeCalculationTypeOptions"}},"savingsChargeTimeTypeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetChargesTemplateLoanChargeTimeTypeOptions"}},"feeFrequencyOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetChargesTemplateFeeFrequencyOptions"}}}},"PostChargesResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1}}},"PostChargesRequest":{"type":"object","properties":{"name":{"type":"string","example":"Loan Service fee"},"chargeAppliesTo":{"type":"integer","format":"int32","example":1},"currencyCode":{"type":"string","example":"USD"},"locale":{"type":"string","example":"en"},"amount":{"type":"number","format":"float","example":230.56},"chargeTimeType":{"type":"integer","format":"int32","example":1},"chargeCalculationType":{"type":"integer","format":"int32","example":1},"chargePaymentMode":{"type":"integer","format":"int32","example":1},"active":{"type":"string","example":"true"}}},"PutChargesChargeIdRequest":{"type":"object","properties":{"name":{"type":"string","example":"Loan service fee(changed)"}}},"PutChargesChargeIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1},"changes":{"$ref":"#/definitions/PutChargesChargeIdRequest"}}},"GetClientClientIdAddressesResponse":{"type":"object","properties":{"client_id":{"type":"integer","format":"int64","example":111755},"addressType":{"type":"string","example":"PERMANENT ADDRESS"},"addressId":{"type":"integer","format":"int32","example":14},"addressTypeId":{"type":"integer","format":"int32","example":804},"isActive":{"type":"boolean","example":false},"street":{"type":"string","example":"anki's home"},"addressLine1":{"type":"string","example":"test123"},"addressLine2":{"type":"string","example":"iuyt"},"addressLine3":{"type":"string","example":" "},"townVillage":{"type":"string","example":" "},"city":{"type":"string","example":"mumbai"},"countyDistrict":{"type":"string","example":" "},"stateProvinceId":{"type":"integer","format":"int32","example":801},"countryName":{"type":"string","example":"UNITED STATES"},"stateName":{"type":"string","example":"GUJRAT"},"countryId":{"type":"integer","format":"int32","example":807},"postalCode":{"type":"integer","format":"int64","example":400095},"createdBy":{"type":"string","example":" "},"updatedBy":{"type":"string","example":" "}}},"PostClientClientIdAddressesResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":15}}},"PostClientClientIdAddressesRequest":{"type":"object","properties":{"street":{"type":"string","example":"Ipca"},"addressLine1":{"type":"string","example":"Kandivali"},"addressLine2":{"type":"string","example":"plot47"},"addressLine3":{"type":"string","example":"charkop"},"city":{"type":"string","example":"Mumbai"},"stateProvinceId":{"type":"integer","format":"int32","example":800},"countryId":{"type":"integer","format":"int32","example":802},"postalCode":{"type":"integer","format":"int64","example":400064}}},"PutClientClientIdAddressesResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":67}}},"PutClientClientIdAddressesRequest":{"type":"object","properties":{"addressId":{"type":"integer","format":"int32","example":67},"street":{"type":"string","example":"goldensource"}}},"GetClientChargeCalculationType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"chargeCalculationType.flat"},"value":{"type":"string","example":"Flat"}}},"GetClientChargeCurrency":{"type":"object","properties":{"code":{"type":"string","example":"USD"},"name":{"type":"string","example":"US Dollar"},"decimalPlaces":{"type":"integer","format":"int32","example":2},"displaySymbol":{"type":"string","example":"$"},"nameCode":{"type":"string","example":"currency.USD"},"displayLabel":{"type":"string","example":"US Dollar ($)"}}},"GetClientChargeTimeType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"chargeTimeType.specifiedDueDate"},"value":{"type":"string","example":"Specified due date"}}},"GetClientsChargesPageItems":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":3},"clientId":{"type":"integer","format":"int32","example":1},"chargeId":{"type":"integer","format":"int32","example":5},"name":{"type":"string","example":"Client Fee 1"},"chargeTimeType":{"$ref":"#/definitions/GetClientChargeTimeType"},"dueDate":{"type":"string","format":"date","example":"[2015, 8, 17]"},"chargeCalculationType":{"$ref":"#/definitions/GetClientChargeCalculationType"},"currency":{"$ref":"#/definitions/GetClientChargeCurrency"},"amount":{"type":"number","example":100.0},"amountPaid":{"type":"number","example":0.0},"amountWaived":{"type":"number","example":100.0},"amountWrittenOff":{"type":"number","example":0.0},"amountOutstanding":{"type":"number","example":0.0},"penalty":{"type":"boolean","example":true},"isActive":{"type":"boolean","example":true},"isPaid":{"type":"boolean","example":false},"isWaived":{"type":"boolean","example":true}}},"GetClientsClientIdChargesResponse":{"type":"object","properties":{"totalFilteredRecords":{"type":"integer","format":"int32","example":4},"pageItems":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetClientsChargesPageItems"}}}},"PostClientsClientIdChargesResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":1},"chargeId":{"type":"integer","format":"int32","example":189},"resourceId":{"type":"integer","format":"int32","example":164}}},"PostClientsClientIdChargesRequest":{"type":"object","properties":{"amount":{"type":"integer","format":"int32","example":100},"chargeId":{"type":"integer","format":"int32","example":226},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"dueDate":{"type":"string","example":"01 September 2015"},"locale":{"type":"string","example":"en"}}},"PostClientsClientIdChargesChargeIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":1},"clientId":{"type":"integer","format":"int32","example":189},"resourceId":{"type":"integer","format":"int32","example":157},"transactionId":{"type":"integer","format":"int32","example":221}}},"PostClientsClientIdChargesChargeIdRequest":{"type":"object","properties":{"amount":{"type":"integer","format":"int32","example":200},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"transactionDate":{"type":"string","example":"01 September 2015"}}},"DeleteClientsClientIdChargesChargeIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":1},"clientId":{"type":"integer","format":"int32","example":189},"resourceId":{"type":"integer","format":"int32","example":164}}},"PostClientsClientIdIdentifiersResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":1},"clientId":{"type":"integer","format":"int32","example":1},"resourceId":{"type":"integer","format":"int32","example":3}}},"PostClientsClientIdIdentifiersRequest":{"type":"object","properties":{"documentTypeId":{"type":"integer","format":"int32","example":1},"documentKey":{"type":"string","example":"KA-54677"},"description":{"type":"string","example":"Document has been verified"}}},"GetClientsClientIdIdentifiersResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"clientId":{"type":"integer","format":"int32","example":1},"documentType":{"$ref":"#/definitions/GetClientsDocumentType"},"documentKey":{"type":"string","example":"12345"},"description":{"type":"string","example":"Issued in the year 2--7"}}},"GetClientsDocumentType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":3},"name":{"type":"string","example":"Drivers License"}}},"PutClientsClientIdIdentifiersIdentifierIdRequest":{"type":"object","properties":{"documentTypeId":{"type":"integer","format":"int32","example":4},"documentKey":{"type":"string","example":"KA-94667"},"description":{"type":"string","example":"Document has been updated"}}},"PutClientsClientIdIdentifiersIdentifierIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":1},"clientId":{"type":"integer","format":"int32","example":1},"resourceId":{"type":"integer","format":"int32","example":3},"changes":{"$ref":"#/definitions/PutClientsClientIdIdentifiersIdentifierIdRequest"}}},"DeleteClientsClientIdIdentifiersIdentifierIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":1},"clientId":{"type":"integer","format":"int32","example":1},"resourceId":{"type":"integer","format":"int32","example":3}}},"GetClientsAllowedDocumentTypes":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"Passport"},"position":{"type":"integer","format":"int32","example":0}}},"GetClientsClientIdIdentifiersTemplateResponse":{"type":"object","properties":{"allowedDocumentTypes":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetClientsAllowedDocumentTypes"}}}},"GetClientTransactionsCurrency":{"type":"object","properties":{"code":{"type":"string","example":"USD"},"name":{"type":"string","example":"US Dollar"},"decimalPlaces":{"type":"integer","format":"int32","example":2},"displaySymbol":{"type":"string","example":"$"},"nameCode":{"type":"string","example":"currency.USD"},"displayLabel":{"type":"string","example":"US Dollar ($)"}}},"GetClientsClientIdTransactionsResponse":{"type":"object","properties":{"totalFilteredRecords":{"type":"integer","format":"int32","example":20},"pageItems":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetClientsPageItems"}}}},"GetClientsClientIdTransactionsType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"clientTransactionType.payCharge"},"value":{"type":"string","example":"PAY_CHARGE"}}},"GetClientsPageItems":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":226},"officeId":{"type":"integer","format":"int32","example":1},"officeName":{"type":"string","example":"Head Office"},"type":{"$ref":"#/definitions/GetClientsClientIdTransactionsType"},"date":{"type":"string","format":"date","example":"[2015, 9, 2]"},"currency":{"$ref":"#/definitions/GetClientTransactionsCurrency"},"amount":{"type":"number","format":"double","example":22.0},"submittedOnDate":{"type":"string","format":"date","example":"[2015, 9, 2]"},"reversed":{"type":"boolean","example":false}}},"GetClientsClientIdTransactionsTransactionIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"officeId":{"type":"integer","format":"int32","example":1},"officeName":{"type":"string","example":"Head Office"},"type":{"$ref":"#/definitions/GetClientsClientIdTransactionsType"},"date":{"type":"string","format":"date","example":"[2015, 8, 17]"},"currency":{"$ref":"#/definitions/GetClientTransactionsCurrency"},"amount":{"type":"number","example":60.0},"submittedOnDate":{"type":"string","format":"date","example":"[2015, 8, 17]"},"reversed":{"type":"boolean","example":true}}},"PostClientsClientIdTransactionsTransactionIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":1},"clientId":{"type":"integer","format":"int32","example":189},"resourceId":{"type":"integer","format":"int32","example":222}}},"GetClientsClientIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":27},"accountNo":{"type":"integer","format":"int64","example":27},"status":{"$ref":"#/definitions/GetClientsClientIdStatus"},"active":{"type":"boolean","example":true},"activationDate":{"type":"string","format":"date","example":"[2013, 1, 1]"},"firstname":{"type":"string","example":"savings"},"lastname":{"type":"string","example":"test"},"displayName":{"type":"string","example":"savings test"},"officeId":{"type":"integer","format":"int32","example":1},"officeName":{"type":"string","example":"Head Office"},"timeline":{"$ref":"#/definitions/GetClientsTimeline"},"savingsProductId":{"type":"integer","format":"int32","example":4},"savingsProductName":{"type":"string","example":"account overdraft"},"groups":{"type":"array","example":"[]","items":{"type":"string"}}}},"GetClientsClientIdStatus":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":300},"code":{"type":"string","example":"clientStatusType.active"},"value":{"type":"string","example":"Active"}}},"GetClientsTimeline":{"type":"object","properties":{"submittedOnDate":{"type":"string","format":"date","example":"[2013, 1, 1]"},"submittedByUsername":{"type":"string","example":"mifos"},"submittedByFirstname":{"type":"string","example":"App"},"submittedByLastname":{"type":"string","example":"Administrator"},"activatedOnDate":{"type":"string","format":"date","example":"[2013, 1, 1]"},"activatedByUsername":{"type":"string","example":"mifos"},"activatedByFirstname":{"type":"string","example":"App"},"activatedByLastname":{"type":"string","example":"Administrator"}}},"PostClientsClientIdResponse":{"type":"object","properties":{"clientId":{"type":"integer","format":"int32","example":2},"resourceId":{"type":"integer","format":"int32","example":2}}},"PostClientsClientIdRequest":{"type":"object","properties":{"note":{"type":"string","example":"We cannot accept transfers of clients having loans with less than 1 repayment left"}}},"GetClientsColumnHeaderData":{"type":"object","properties":{"columnName":{"type":"string","example":"client_id"},"columnType":{"type":"string","example":"bigint"},"columnLength":{"type":"integer","format":"int32","example":0},"columnDisplayType":{"type":"string","example":"INTEGER"},"isColumnNullable":{"type":"boolean","example":false},"isColumnPrimaryKey":{"type":"boolean","example":true},"columnValues":{"type":"array","example":"[]","items":{"type":"string"}}}},"GetClientsDataTables":{"type":"object","properties":{"applicationTableName":{"type":"string","example":"m_client"},"registeredTableName":{"type":"string","example":"Address Details"},"columnHeaderData":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetClientsColumnHeaderData"}}}},"GetClientsOfficeOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"Head Office"},"nameDecorated":{"type":"string","example":"Head Office"}}},"GetClientsSavingProductOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":4},"name":{"type":"string","example":"account overdraft"},"withdrawalFeeForTransfers":{"type":"boolean","example":false},"allowOverdraft":{"type":"boolean","example":false}}},"GetClientsStaffOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"firstname":{"type":"string","example":"xyz"},"lastname":{"type":"string","example":"sjs"},"displayName":{"type":"string","example":"sjs, xyz"},"officeId":{"type":"integer","format":"int32","example":1},"officeName":{"type":"string","example":"Head Office"},"isLoanOfficer":{"type":"boolean","example":true},"isActive":{"type":"boolean","example":true}}},"GetClientsTemplateResponse":{"type":"object","properties":{"activationDate":{"type":"string","format":"date","example":"[2014, 3, 4]"},"officeId":{"type":"integer","format":"int32","example":1},"officeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetClientsOfficeOptions"}},"staffOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetClientsStaffOptions"}},"savingProductOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetClientsSavingProductOptions"}},"datatables":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetClientsDataTables"}}}},"GetClientsClientIdAccountsResponse":{"type":"object","properties":{"loanAccounts":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetClientsLoanAccounts"}},"savingsAccounts":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetClientsSavingsAccounts"}}}},"GetClientsLoanAccounts":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"accountNo":{"type":"integer","format":"int64","example":1},"externalId":{"type":"integer","format":"int32","example":456},"productId":{"type":"integer","format":"int32","example":1},"productName":{"type":"string","example":"TestOne"},"status":{"$ref":"#/definitions/GetClientsLoanAccountsStatus"},"loanType":{"$ref":"#/definitions/GetClientsLoanAccountsType"},"loanCycle":{"type":"integer","format":"int32","example":1}}},"GetClientsLoanAccountsStatus":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":300},"code":{"type":"string","example":"loanStatusType.active"},"value":{"type":"string","example":"Active"},"pendingApproval":{"type":"boolean","example":false},"waitingForDisbursal":{"type":"boolean","example":false},"active":{"type":"boolean","example":true},"closedObligationsMet":{"type":"boolean","example":false},"closedWrittenOff":{"type":"boolean","example":false},"closedRescheduled":{"type":"boolean","example":false},"closed":{"type":"boolean","example":false},"overpaid":{"type":"boolean","example":false}}},"GetClientsLoanAccountsType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"loanType.individual"},"value":{"type":"string","example":"Individual"}}},"GetClientsSavingsAccounts":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":7},"accountNo":{"type":"integer","format":"int64","example":7},"productId":{"type":"integer","format":"int32","example":2},"productName":{"type":"string","example":"Other product"},"status":{"$ref":"#/definitions/GetClientsSavingsAccountsStatus"},"currency":{"$ref":"#/definitions/GetClientsSavingsAccountsCurrency"}}},"GetClientsSavingsAccountsCurrency":{"type":"object","properties":{"code":{"type":"string","example":"USD"},"name":{"type":"string","example":"US Dollar"},"decimalPlaces":{"type":"integer","format":"int32","example":2},"displaySymbol":{"type":"string","example":"$"},"nameCode":{"type":"string","example":"currency.USD"},"displayLabel":{"type":"string","example":"US Dollar ($)"}}},"GetClientsSavingsAccountsStatus":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":100},"code":{"type":"string","example":"savingsAccountStatusType.submitted.and.pending.approval"},"value":{"type":"string","example":"Submitted and pending approval"},"submittedAndPendingApproval":{"type":"boolean","example":true},"approved":{"type":"boolean","example":false},"rejected":{"type":"boolean","example":false},"withdrawnByApplicant":{"type":"boolean","example":false},"active":{"type":"boolean","example":false},"closed":{"type":"boolean","example":false}}},"GetClientStatus":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":100},"code":{"type":"string","example":"clientStatusType.pending"},"value":{"type":"string","example":"Pending"}}},"GetClientsPageItemsResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"accountNo":{"type":"string","example":"000000002"},"status":{"$ref":"#/definitions/GetClientStatus"},"active":{"type":"boolean","example":false},"fullname":{"type":"string","example":"Home Farm Produce"},"displayName":{"type":"string","example":"Home Farm Produce"},"officeId":{"type":"integer","format":"int32","example":1},"officeName":{"type":"string","example":"Head Office"}}},"GetClientsResponse":{"type":"object","properties":{"totalFilteredRecords":{"type":"integer","format":"int32","example":2},"pageItems":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetClientsPageItemsResponse"}}}},"PutClientsClientIdRequest":{"type":"object","properties":{"externalId":{"type":"string","example":"786444UUUYYH7"}}},"PutClientsClientIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":1},"clientId":{"type":"integer","format":"int32","example":1},"resourceId":{"type":"integer","format":"int32","example":1},"changes":{"$ref":"#/definitions/PutClientsClientIdRequest"}}},"DeleteClientsClientIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":1},"clientId":{"type":"integer","format":"int32","example":3},"resourceId":{"type":"integer","format":"int32","example":3}}},"DeleteClientsClientIdRequest":{"type":"object"},"PostClientsResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":1},"groupId":{"type":"integer","format":"int32","example":1},"clientId":{"type":"integer","format":"int32","example":2},"resourceId":{"type":"integer","format":"int32","example":2}}},"PostClientsRequest":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":1},"fullname":{"type":"string","example":"Client of group"},"groupId":{"type":"integer","format":"int32","example":1},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"locale":{"type":"string","example":"en"},"active":{"type":"boolean","example":true},"activationDate":{"type":"string","example":"04 March 2009"}}},"GetCollateralsTemplateAllowedTypes":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":9},"name":{"type":"string","example":"Silver"},"position":{"type":"integer","format":"int32","example":0}}},"GetLoansLoanIdCollateralsTemplateResponse":{"type":"object","properties":{"allowedCollateralTypes":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetCollateralsTemplateAllowedTypes"}}}},"GetCollateralCurrencyResponse":{"type":"object","properties":{"code":{"type":"string","example":"USD"},"name":{"type":"string","example":"US Dollar"},"decimalPlaces":{"type":"integer","format":"int32","example":2},"displaySymbol":{"type":"string","example":"$"},"nameCode":{"type":"string","example":"currency.USD"},"displayLabel":{"type":"string","example":"US Dollar ($)"}}},"GetCollateralTypeResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":8},"name":{"type":"string","example":"Gold"}}},"GetLoansLoanIdCollateralsResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12},"type":{"$ref":"#/definitions/GetCollateralTypeResponse"},"value":{"type":"integer","format":"int64","example":50000},"description":{"type":"string","example":"24 Carat Gold chain weighing 12 grams"},"currency":{"$ref":"#/definitions/GetCollateralCurrencyResponse"}}},"PostLoansLoanIdCollateralsResponse":{"type":"object","properties":{"loanId":{"type":"integer","format":"int32","example":1},"resourceId":{"type":"integer","format":"int32","example":12}}},"PostLoansLoanIdCollateralsRequest":{"type":"object","properties":{"collateralTypeId":{"type":"integer","format":"int32","example":9}}},"PutLoansLoanIdCollateralsCollateralIdResponse":{"type":"object","properties":{"loanId":{"type":"integer","format":"int32","example":1},"resourceId":{"type":"integer","format":"int32","example":12},"changes":{"$ref":"#/definitions/PutLoansLoandIdCollateralsCollateralIdRequest"}}},"PutLoansLoandIdCollateralsCollateralIdRequest":{"type":"object","properties":{"description":{"type":"string","example":"22 Carat Gold chain weighing 12 grams"}}},"DeleteLoansLoanIdCollateralsCollateralIdResponse":{"type":"object","properties":{"loanId":{"type":"integer","format":"int32","example":1},"resourceId":{"type":"integer","format":"int32","example":12}}},"PostCollectionSheetChanges":{"type":"object","properties":{"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"loanTransactions":{"type":"array","example":"[15]","items":{"type":"integer","format":"int32"}},"SavingsTransactions":{"type":"array","example":"[]","items":{"type":"integer","format":"int32"}}}},"PostCollectionSheetResponse":{"type":"object","properties":{"groupId":{"type":"integer","format":"int32","example":10},"resourceId":{"type":"integer","format":"int32","example":10},"changes":{"$ref":"#/definitions/PostCollectionSheetChanges"}}},"PostCollectionSheetBulkRepaymentTransactions":{"type":"object","properties":{"loanId":{"type":"integer","format":"int32","example":10},"transactionAmount":{"type":"number","format":"double","example":1221.36},"paymentTypeId":{"type":"integer","format":"int32","example":19},"receiptNumber":{"type":"integer","format":"int64","example":1245356}}},"PostCollectionSheetRequest":{"type":"object","properties":{"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"locale":{"type":"string","example":"en"},"transactionDate":{"type":"string","example":"04 May 2014"},"actualDisbursementDate":{"type":"string","example":"04 May 2014"},"bulkDisbursementTransactions":{"type":"array","items":{"type":"integer","format":"int32"}},"bulkRepaymentTransactions":{"$ref":"#/definitions/PostCollectionSheetBulkRepaymentTransactions"},"bulkSavingsDueTransactions":{"type":"array","items":{"type":"integer","format":"int32"}}}},"GetFloatingRatesFloatingRateIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"Floating Rate 1"},"isBaseLendingRate":{"type":"boolean","example":true},"isActive":{"type":"boolean","example":true},"createdBy":{"type":"string","example":"mifos"},"createdOn":{"type":"string","example":"Nov 18, 2015"},"modifiedBy":{"type":"string","example":"mifos"},"modifiedOn":{"type":"string","example":"Nov 18, 2015"},"ratePeriods":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetFloatingRatesRatePeriods"}}}},"GetFloatingRatesRatePeriods":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"fromDate":{"type":"string","example":"Dec 15, 2015"},"interestRate":{"type":"number","format":"double","example":11.0},"isDifferentialToBaseLendingRate":{"type":"boolean","example":false},"isActive":{"type":"boolean","example":true},"createdBy":{"type":"string","example":"mifos"},"createdOn":{"type":"string","example":"Nov 18, 2015"},"modifiedBy":{"type":"string","example":"mifos"},"modifiedOn":{"type":"string","example":"Nov 18, 2015"}}},"PostFloatingRatesRatePeriods":{"type":"object","properties":{"fromDate":{"type":"string","example":"19 November 2015"},"interestRate":{"type":"number","format":"double","example":10.0},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"}}},"PutFloatingRatesChanges":{"type":"object","properties":{"ratePeriods":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/PostFloatingRatesRatePeriods"}}}},"PutFloatingRatesFloatingRateIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1},"changes":{"$ref":"#/definitions/PutFloatingRatesChanges"}}},"PutFloatingRatesFloatingRateIdRequest":{"type":"object","properties":{"name":{"type":"string","example":"Floating Rate 1"},"isBaseLendingRate":{"type":"boolean","example":true},"isActive":{"type":"boolean","example":true},"ratePeriods":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/PostFloatingRatesRatePeriods"}}}},"PostFloatingRatesResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1}}},"PostFloatingRatesRequest":{"type":"object","properties":{"name":{"type":"string","example":"Floating Rate 1"},"isBaseLendingRate":{"type":"boolean","example":true},"isActive":{"type":"boolean","example":true},"ratePeriods":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/PostFloatingRatesRatePeriods"}}}},"GetFloatingRatesResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"Floating Rate 1"},"isBaseLendingRate":{"type":"boolean","example":true},"isActive":{"type":"boolean","example":true},"createdBy":{"type":"string","example":"mifos"},"createdOn":{"type":"string","example":"Nov 18, 2015"},"modifiedBy":{"type":"string","example":"mifos"},"modifiedOn":{"type":"string","example":"Nov 18, 2015"}}},"PutFundsFundIdRequest":{"type":"object","properties":{"name":{"type":"string","example":"EU Agri Fund (2010-2020)"}}},"PutFundsFundIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1},"changes":{"$ref":"#/definitions/PutFundsFundIdRequest"}}},"GetFundsResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"EU Agri Fund"}}},"PostFundsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1}}},"PostFundsRequest":{"type":"object","properties":{"name":{"type":"string","example":"EU Agri Fund"}}},"GetCentersCenterIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":8},"status":{"$ref":"#/definitions/GetCentersStatus"},"active":{"type":"boolean","example":false},"name":{"type":"string","example":"First Center (No groups)"},"officeId":{"type":"integer","format":"int32","example":1},"officeName":{"type":"string","example":"Head Office"},"hierarchy":{"type":"string","example":".8."}}},"GetCentersStatus":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":100},"code":{"type":"string","example":"groupingStatusType.pending"},"value":{"type":"string","example":"Pending"}}},"PostCentersCenterIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1}}},"PostCentersCenterIdRequest":{"type":"object","properties":{"closureReasonId":{"type":"integer","format":"int32","example":32},"closureDate":{"type":"string","example":"05 May 2014"},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"}}},"GetCentersOfficeOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"Head Office"},"nameDecorated":{"type":"string","example":"Head Office"}}},"GetCentersStaffOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"displayName":{"type":"string","example":"D, Mary"}}},"GetCentersTemplateResponse":{"type":"object","properties":{"active":{"type":"boolean","example":false},"activationDate":{"type":"string","format":"date","example":"[2013, 4, 18]"},"officeId":{"type":"integer","format":"int32","example":2},"officeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetCentersOfficeOptions"}},"staffOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetCentersStaffOptions"}}}},"GetCentersAccountType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"accountType.group"},"value":{"type":"string","example":"Group"}}},"GetCentersCenterIdAccountsResponse":{"type":"object","properties":{"savingsAccounts":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetCentersSavingsAccounts"}}}},"GetCentersCenterIdCurrency":{"type":"object","properties":{"code":{"type":"string","example":"USD"},"name":{"type":"string","example":"US Dollar"},"decimalPlaces":{"type":"integer","format":"int32","example":2},"inMultiplesOf":{"type":"integer","format":"int32","example":0},"displaySymbol":{"type":"string","example":"$"},"nameCode":{"type":"string","example":"currency.USD"},"displayLabel":{"type":"string","example":"US Dollar ($)"}}},"GetCentersCenterIdStatus":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":100},"code":{"type":"string","example":"savingsAccountStatusType.submitted.and.pending.approval"},"value":{"type":"string","example":"Submitted and pending approval"},"submittedAndPendingApproval":{"type":"boolean","example":true},"approved":{"type":"boolean","example":false},"rejected":{"type":"boolean","example":false},"withdrawnByApplicant":{"type":"boolean","example":false},"active":{"type":"boolean","example":false},"closed":{"type":"boolean","example":false},"prematureClosed":{"type":"boolean","example":false},"transferInProgress":{"type":"boolean","example":false},"transferOnHold":{"type":"boolean","example":false}}},"GetCentersDepositType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":100},"code":{"type":"string","example":"depositAccountType.savingsDeposit"},"value":{"type":"string","example":"Savings"}}},"GetCentersSavingsAccounts":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":16},"accountNo":{"type":"integer","format":"int64","example":16},"productId":{"type":"integer","format":"int32","example":1},"productName":{"type":"string","example":"Voluntary savings"},"status":{"$ref":"#/definitions/GetCentersCenterIdStatus"},"currency":{"$ref":"#/definitions/GetCentersCenterIdCurrency"},"accountType":{"$ref":"#/definitions/GetCentersAccountType"},"timeline":{"$ref":"#/definitions/GetCentersTimeline"},"depositType":{"$ref":"#/definitions/GetCentersDepositType"}}},"GetCentersTimeline":{"type":"object","properties":{"submittedOnDate":{"type":"string","format":"date","example":"[2014, 5, 1]"},"submittedByUsername":{"type":"string","example":"mifos"},"submittedByFirstname":{"type":"string","example":"App"},"submittedByLastname":{"type":"string","example":"Administrator"}}},"GetCentersPageItems":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"status":{"$ref":"#/definitions/GetCentersStatus"},"active":{"type":"boolean","example":false},"name":{"type":"string","example":"Center 1"},"officeId":{"type":"integer","format":"int32","example":1},"officeName":{"type":"string","example":"Head Office"},"hierarchy":{"type":"string","example":".2."}}},"GetCentersResponse":{"type":"object","properties":{"totalFilteredRecords":{"type":"integer","format":"int32","example":2},"pageItems":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetCentersPageItems"}}}},"PutCentersCenterIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":1},"groupId":{"type":"integer","format":"int32","example":8},"resourceId":{"type":"integer","format":"int32","example":8},"changes":{"$ref":"#/definitions/PutCentersChanges"}}},"PutCentersChanges":{"type":"object","properties":{"name":{"type":"string","example":"First Center (No groups) - modified"}}},"PutCentersCenterIdRequest":{"type":"object","properties":{"name":{"type":"string","example":"First Center (No groups)"}}},"DeleteCentersCenterIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1},"changes":{"$ref":"#/definitions/DeleteCentersChanges"}}},"DeleteCentersChanges":{"type":"object"},"PostCentersResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":1},"groupId":{"type":"integer","format":"int32","example":8},"resourceId":{"type":"integer","format":"int32","example":8}}},"PostCentersRequest":{"type":"object","properties":{"name":{"type":"string","example":"First Center (No groups)"},"officeId":{"type":"integer","format":"int32","example":1},"active":{"type":"boolean","example":false}}},"GetGroupsGroupIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"First Group"},"externalId":{"type":"string","example":"000-1A"},"officeId":{"type":"integer","format":"int32","example":1},"officeName":{"type":"string","example":"Head Office"},"hierarchy":{"type":"string","example":".1."},"timeline":{"$ref":"#/definitions/GetGroupsGroupIdTimeline"}}},"GetGroupsGroupIdTimeline":{"type":"object","properties":{"activatedOnDate":{"type":"string","format":"date","example":"[2013, 11, 14]"},"activatedByUsername":{"type":"string","example":"mifos"},"activatedByFirstname":{"type":"string","example":"App"},"activatedByLastname":{"type":"string","example":"Administrator"}}},"GetGroupsTemplateClientOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"displayName":{"type":"string","example":"Petra Yton"},"officeId":{"type":"integer","format":"int32","example":1},"officeName":{"type":"string","example":"Head Office"}}},"GetGroupsTemplateColumnHeaderData":{"type":"object","properties":{"columnName":{"type":"string","example":"group_id"},"columnType":{"type":"string","example":"bigint"},"columnLength":{"type":"integer","format":"int32","example":0},"columnDisplayType":{"type":"string","example":"INTEGER"},"isColumnNullable":{"type":"boolean","example":false},"isColumnPrimaryKey":{"type":"boolean","example":true},"columnValues":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetGroupsTemplateColumnValues"}}}},"GetGroupsTemplateColumnValues":{"type":"object"},"GetGroupsTemplateDatatables":{"type":"object","properties":{"applicationTableName":{"type":"string","example":"m_group"},"registeredTableName":{"type":"string","example":"Group Activation Data"},"columnHeaderData":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetGroupsTemplateColumnHeaderData"}}}},"GetGroupsTemplateOfficeOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"Head Office"},"nameDecorated":{"type":"string","example":"Head Office"}}},"GetGroupsTemplateResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":1},"officeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetGroupsTemplateOfficeOptions"}},"staffOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetGroupsTemplateStaffOptions"}},"clientOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetGroupsTemplateClientOptions"}},"datatables":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetGroupsTemplateDatatables"}}}},"GetGroupsTemplateStaffOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"displayName":{"type":"string","example":"C, Mike"}}},"PostGroupsGroupIdCommandUnassignStaffChanges":{"type":"object"},"PostGroupsGroupIdCommandUnassignStaffResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":1},"groupId":{"type":"integer","format":"int32","example":1},"resourceId":{"type":"integer","format":"int32","example":1},"changes":{"$ref":"#/definitions/PostGroupsGroupIdCommandUnassignStaffChanges"}}},"PostGroupsGroupIdCommandUnassignStaffRequest":{"type":"object","properties":{"staffId":{"type":"integer","format":"int32","example":1}}},"PostGroupsGroupIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1}}},"PostGroupsGroupIdClients":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1}}},"PostGroupsGroupIdRequest":{"type":"object","properties":{"destinationGroupId":{"type":"integer","format":"int32","example":2},"clients":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/PostGroupsGroupIdClients"}}}},"GetGroupsGroupIdAccountsLoanAccounts":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":3},"accountNo":{"type":"integer","format":"int64","example":3},"productId":{"type":"integer","format":"int32","example":3},"productName":{"type":"string","example":"daily product"},"status":{"$ref":"#/definitions/GetGroupsGroupIdAccountsStatus"},"loanType":{"$ref":"#/definitions/GetGroupsGroupIdAccountsLoanType"}}},"GetGroupsGroupIdAccountsLoanType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"accountType.group"},"value":{"type":"string","example":"Group"}}},"GetGroupsGroupIdAccountsMemberLoanAccounts":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":4},"accountNo":{"type":"integer","format":"int64","example":4},"productId":{"type":"integer","format":"int32","example":1},"productName":{"type":"string","example":"testLoan"},"status":{"$ref":"#/definitions/GetGroupsGroupIdAccountsMemberLoanStatus"},"loanType":{"$ref":"#/definitions/GetGroupsGroupIdAccountsMemberLoanType"}}},"GetGroupsGroupIdAccountsMemberLoanStatus":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":200},"code":{"type":"string","example":"loanStatusType.approved"},"value":{"type":"string","example":"Approved"},"pendingApproval":{"type":"boolean","example":false},"waitingForDisbursal":{"type":"boolean","example":true},"active":{"type":"boolean","example":false},"closedObligationsMet":{"type":"boolean","example":false},"closedWrittenOff":{"type":"boolean","example":false},"closedRescheduled":{"type":"boolean","example":false},"closed":{"type":"boolean","example":false},"overpaid":{"type":"boolean","example":false}}},"GetGroupsGroupIdAccountsMemberLoanType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":3},"code":{"type":"string","example":"accountType.jlg"},"value":{"type":"string","example":"JLG"}}},"GetGroupsGroupIdAccountsMemberSavingsAccounts":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":3},"accountNo":{"type":"integer","format":"int64","example":3},"productId":{"type":"integer","format":"int32","example":1},"productName":{"type":"string","example":"p_sav"},"status":{"$ref":"#/definitions/GetGroupsGroupIdAccountsSavingStatus"},"currency":{"$ref":"#/definitions/GetGroupsGroupIdAccountsSavingCurrency"},"accountType":{"$ref":"#/definitions/GetGroupsGroupIdAccountsMemberLoanType"}}},"GetGroupsGroupIdAccountsResponse":{"type":"object","properties":{"loanAccounts":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetGroupsGroupIdAccountsLoanAccounts"}},"savingsAccounts":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetGroupsGroupIdAccountsSavingAccounts"}},"memberLoanAccounts":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetGroupsGroupIdAccountsMemberLoanAccounts"}},"memberSavingsAccounts":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetGroupsGroupIdAccountsMemberSavingsAccounts"}}}},"GetGroupsGroupIdAccountsSavingAccountType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"accountType.group"},"value":{"type":"string","example":"Group"}}},"GetGroupsGroupIdAccountsSavingAccounts":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":9},"accountNo":{"type":"integer","format":"int64","example":9},"productId":{"type":"integer","format":"int32","example":1},"productName":{"type":"string","example":"p_sav"},"status":{"$ref":"#/definitions/GetGroupsGroupIdAccountsSavingStatus"},"currency":{"$ref":"#/definitions/GetGroupsGroupIdAccountsSavingCurrency"},"accountType":{"$ref":"#/definitions/GetGroupsGroupIdAccountsSavingAccountType"}}},"GetGroupsGroupIdAccountsSavingCurrency":{"type":"object","properties":{"code":{"type":"string","example":"USD"},"name":{"type":"string","example":"US Dollar"},"decimalPlaces":{"type":"integer","format":"int32","example":2},"displaySymbol":{"type":"string","example":"$"},"nameCode":{"type":"string","example":"currency.USD"},"displayLabel":{"type":"string","example":"US Dollar ($)"}}},"GetGroupsGroupIdAccountsSavingStatus":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":100},"code":{"type":"string","example":"savingsAccountStatusType.submitted.and.pending.approval"},"value":{"type":"string","example":"Submitted and pending approval"},"submittedAndPendingApproval":{"type":"boolean","example":true},"approved":{"type":"boolean","example":false},"rejected":{"type":"boolean","example":false},"withdrawnByApplicant":{"type":"boolean","example":false},"active":{"type":"boolean","example":false},"closed":{"type":"boolean","example":false}}},"GetGroupsGroupIdAccountsStatus":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":100},"code":{"type":"string","example":"loanStatusType.submitted.and.pending.approval"},"value":{"type":"string","example":"Submitted and pending approval"},"pendingApproval":{"type":"boolean","example":true},"waitingForDisbursal":{"type":"boolean","example":false},"active":{"type":"boolean","example":false},"closedObligationsMet":{"type":"boolean","example":false},"closedWrittenOff":{"type":"boolean","example":false},"closedRescheduled":{"type":"boolean","example":false},"closed":{"type":"boolean","example":false},"overpaid":{"type":"boolean","example":false}}},"GetGroupsPageItems":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":4},"name":{"type":"string","example":"AnotherGroup"},"status":{"$ref":"#/definitions/GetGroupsStatus"},"active":{"type":"boolean","example":false},"officeId":{"type":"integer","format":"int32","example":1},"officeName":{"type":"string","example":"Head Office"},"hierarchy":{"type":"string","example":".4."}}},"GetGroupsResponse":{"type":"object","properties":{"totalFilteredRecords":{"type":"integer","format":"int32","example":2},"pageItems":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetGroupsPageItems"}}}},"GetGroupsStatus":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":100},"code":{"type":"string","example":"clientStatusType.pending"},"value":{"type":"string","example":"Pending"}}},"PutGroupsGroupIdChanges":{"type":"object","properties":{"name":{"type":"string","example":"First Group (changed)"}}},"PutGroupsGroupIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":1},"groupId":{"type":"integer","format":"int32","example":1},"resourceId":{"type":"integer","format":"int32","example":1},"changes":{"$ref":"#/definitions/PutGroupsGroupIdChanges"}}},"PutGroupsGroupIdRequest":{"type":"object","properties":{"name":{"type":"string","example":"First Group (changed)"}}},"DeleteGroupsGroupIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":1},"groupId":{"type":"integer","format":"int32","example":2},"resourceId":{"type":"integer","format":"int32","example":2}}},"PostGroupsResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":1},"groupId":{"type":"integer","format":"int32","example":2},"resourceId":{"type":"integer","format":"int32","example":2}}},"PostGroupsRequest":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"Pending Group"},"active":{"type":"boolean","example":false}}},"GetInterestRateChartsChartIdChartSlabsAttributeName":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"integer","format":"int32","example":"InterestIncentiveAttributeName.gender"},"value":{"type":"integer","format":"int32","example":"Gender"}}},"GetInterestRateChartsChartIdChartSlabsConditionType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"integer","format":"int32","example":"incentiveConditionType.equal"},"value":{"type":"integer","format":"int32","example":"equal"}}},"GetInterestRateChartsChartIdChartSlabsEntityType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"integer","format":"int32","example":"InterestIncentiveEntityType.customer"},"value":{"type":"integer","format":"int32","example":"Customer"}}},"GetInterestRateChartsChartIdChartSlabsIncentiveType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":3},"code":{"type":"integer","format":"int32","example":"InterestIncentiveType.incentive"},"value":{"type":"integer","format":"int32","example":"Incentive"}}},"GetInterestRateChartsChartIdChartSlabsIncentives":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"entityType":{"$ref":"#/definitions/GetInterestRateChartsChartIdChartSlabsEntityType"},"attributeName":{"$ref":"#/definitions/GetInterestRateChartsChartIdChartSlabsAttributeName"},"conditionType":{"$ref":"#/definitions/GetInterestRateChartsChartIdChartSlabsConditionType"},"attributeValue":{"type":"integer","format":"int32","example":11},"attributeValueDesc":{"type":"string","example":"FEMALE"},"incentiveType":{"$ref":"#/definitions/GetInterestRateChartsChartIdChartSlabsIncentiveType"},"amount":{"type":"number","format":"float","example":-1.0}}},"GetInterestRateChartsChartIdChartSlabsResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"description":{"type":"string","example":"5% interest from 1 day till 180 days of deposit"},"periodTypes":{"$ref":"#/definitions/GetInterestRateChartsTemplatePeriodTypes"},"fromPeriod":{"type":"integer","format":"int32","example":1},"toPeriod":{"type":"integer","format":"int32","example":180},"annualInterestRate":{"type":"number","format":"double","example":5.0},"currency":{"$ref":"#/definitions/GetInterestRateChartsCurrency"},"incentives":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetInterestRateChartsChartIdChartSlabsIncentives"}}}},"GetInterestRateChartsCurrency":{"type":"object","properties":{"code":{"type":"string","example":"USD"},"name":{"type":"string","example":"US Dollar"},"decimalPlaces":{"type":"integer","format":"int32","example":2},"displaySymbol":{"type":"string","example":"$"},"nameCode":{"type":"string","example":"currency.USD"},"displayLabel":{"type":"string","example":"US Dollar ($)"}}},"GetInterestRateChartsTemplatePeriodTypes":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":0},"code":{"type":"string","example":"interestChartPeriodType.days"},"value":{"type":"string","example":"Days"}}},"PutInterestRateChartsChartIdChartSlabsChartSlabIdRequest":{"type":"object","properties":{"annualInterestRate":{"type":"number","format":"double","example":6.0},"description":{"type":"string","example":"Interest rate changed to 6%"}}},"PutInterestRateChartsChartIdChartSlabsChartSlabIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1},"changes":{"$ref":"#/definitions/PutInterestRateChartsChartIdChartSlabsChartSlabIdRequest"}}},"DeleteInterestRateChartsChartIdChartSlabsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1}}},"PostInterestRateChartsChartIdChartSlabsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1}}},"PostInterestRateChartsChartIdChartSlabsIncentives":{"type":"object","properties":{"entityType":{"type":"integer","format":"int32","example":2},"attributeName":{"type":"integer","format":"int32","example":2},"conditionType":{"type":"integer","format":"int32","example":2},"attributeValue":{"type":"integer","format":"int32","example":11},"incentiveType":{"type":"integer","format":"int32","example":2},"amount":{"type":"number","format":"float","example":-1.0}}},"PostInterestRateChartsChartIdChartSlabsRequest":{"type":"object","properties":{"periodType":{"type":"integer","format":"int32","example":0},"fromPeriod":{"type":"integer","format":"int32","example":1},"toPeriod":{"type":"integer","format":"int32","example":180},"annualInterestRate":{"type":"number","format":"double","example":5.0},"description":{"type":"string","example":"5% interest from 1 day till 180 days of deposit"},"locale":{"type":"string","example":"en"},"incentives":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/PostInterestRateChartsChartIdChartSlabsIncentives"}}}},"GetInterestRateChartsChartSlabs":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"periodTypes":{"$ref":"#/definitions/GetInterestRateChartsTemplatePeriodTypes"},"fromPeriod":{"type":"integer","format":"int32","example":1},"annualInterestRate":{"type":"integer","format":"int32","example":6},"currency":{"$ref":"#/definitions/GetInterestRateChartsCurrency"}}},"GetInterestRateChartsResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"fromDate":{"type":"string","format":"date","example":"[2014, 1, 1]"},"savingsProductId":{"type":"integer","format":"int32","example":1},"savingsProductName":{"type":"string","example":"Fixed Deposit Product 001"},"chartSlabs":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetInterestRateChartsChartSlabs"}}}},"GetInterestRateChartsTemplateResponse":{"type":"object","properties":{"periodTypes":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetInterestRateChartsTemplatePeriodTypes"}}}},"PutInterestRateChartsChartIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1}}},"PutInterestRateChartsChartIdRequest":{"type":"object","properties":{"name":{"type":"string","example":"Interest rate chart for 2014"},"description":{"type":"string","example":"Interest rate chart for 2014"}}},"DeleteInterestRateChartsChartIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1}}},"PostInterestRateChartsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1}}},"PostInterestRateChartsRequest":{"type":"object","properties":{"name":{"type":"string","example":"Chart - 2014"},"description":{"type":"string","example":"This chart is applicable for year 2014"},"type":{"type":"string","example":"Document"},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"fromDate":{"type":"string","example":"01 Jan 2014"}}},"PutLoansLoanIdChargesChargeIdRequest":{"type":"object","properties":{"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"locale":{"type":"string","example":"en"},"amount":{"type":"number","format":"float","example":60.0},"dueDate":{"type":"string","example":"27 March 2013"}}},"PutLoansLoanIdChargesChargeIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"clientId":{"type":"integer","format":"int64","example":1},"loanId":{"type":"integer","format":"int64","example":1},"resourceId":{"type":"integer","format":"int32","example":6},"changes":{"$ref":"#/definitions/PutLoansLoanIdChargesChargeIdRequest"}}},"GetLoanChargeCalculationType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"chargeCalculationType.flat"},"value":{"type":"string","example":"Flat"}}},"GetLoanChargeCurrency":{"type":"object","properties":{"code":{"type":"string","example":"USD"},"name":{"type":"string","example":"US Dollar"},"decimalPlaces":{"type":"integer","format":"int32","example":2},"displaySymbol":{"type":"string","example":"$"},"nameCode":{"type":"string","example":"currency.USD"},"displayLabel":{"type":"string","example":"US Dollar ($)"}}},"GetLoanChargeTemplateChargeAppliesTo":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":"1 "},"code":{"type":"string","example":"chargeAppliesTo.loan"},"value":{"type":"string","example":"Loan"}}},"GetLoanChargeTemplateChargeOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"Collection fee"},"active":{"type":"boolean","example":true},"penalty":{"type":"boolean","example":false},"currency":{"$ref":"#/definitions/GetLoanChargeCurrency"},"amount":{"type":"number","format":"float","example":100.0},"chargeTimeType":{"$ref":"#/definitions/GetLoanChargeTemplateChargeTimeType"},"chargeAppliesTo":{"$ref":"#/definitions/GetLoanChargeTemplateChargeAppliesTo"},"chargeCalculationType":{"$ref":"#/definitions/GetLoanChargeCalculationType"}}},"GetLoanChargeTemplateChargeTimeType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"chargeTimeType.specifiedDueDate"},"value":{"type":"string","example":"Specified due date"}}},"GetLoansLoanIdChargesTemplateResponse":{"type":"object","properties":{"amountPaid":{"type":"number","format":"float","example":0.0},"amountWaived":{"type":"number","format":"float","example":0.0},"amountWrittenOff":{"type":"number","format":"float","example":0.0},"chargeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetLoanChargeTemplateChargeOptions"}},"penalty":{"type":"boolean","example":false}}},"GetLoanChargeTimeType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"chargeTimeType.disbursement"},"value":{"type":"string","example":"Disbursement"}}},"GetLoansLoanIdChargesChargeIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"chargeId":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"Loan Processing fee"},"chargeTimeType":{"$ref":"#/definitions/GetLoanChargeTimeType"},"chargeCalculationType":{"$ref":"#/definitions/GetLoanChargeCalculationType"},"percentage":{"type":"number","format":"double","example":0.0},"amountPercentageAppliedTo":{"type":"number","format":"double","example":0.0},"currency":{"$ref":"#/definitions/GetLoanChargeCurrency"},"amount":{"type":"number","format":"float","example":100.0},"amountPaid":{"type":"number","format":"float","example":0.0},"amountWaived":{"type":"number","format":"float","example":0.0},"amountWrittenOff":{"type":"number","format":"float","example":0.0},"amountOutstanding":{"type":"number","format":"float","example":100.0},"amountOrPercentage":{"type":"number","format":"float","example":100.0},"penalty":{"type":"boolean","example":false}}},"PostLoansLoanIdChargesChargeIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"clientId":{"type":"integer","format":"int64","example":1},"loanId":{"type":"integer","format":"int64","example":6},"savingsId":{"type":"integer","format":"int64","example":1},"resourceId":{"type":"integer","format":"int32","example":12}}},"PostLoansLoanIdChargesChargeIdRequest":{"type":"object","properties":{"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"locale":{"type":"string","example":"en"},"transactionDate":{"type":"string","example":"19 September 2013"}}},"PostLoansLoanIdChargesResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"clientId":{"type":"integer","format":"int64","example":1},"loanId":{"type":"integer","format":"int64","example":1},"resourceId":{"type":"integer","format":"int32","example":31}}},"PostLoansLoanIdChargesRequest":{"type":"object","properties":{"chargeId":{"type":"integer","format":"int32","example":2},"locale":{"type":"string","example":"en"},"amount":{"type":"number","format":"float","example":100.0},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"dueDate":{"type":"string","example":"29 April 2013"}}},"DeleteLoansLoanIdChargesChargeIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"clientId":{"type":"integer","format":"int64","example":1},"loanId":{"type":"integer","format":"int64","example":1},"resourceId":{"type":"integer","format":"int32","example":2}}},"PostLoanChanges":{"type":"object","properties":{"removedEntityIds":{"type":"array","example":"[21, 22]","items":{"type":"integer","format":"int32"}}}},"PostLoansLoanIdScheduleResponse":{"type":"object","properties":{"loanId":{"type":"integer","format":"int32","example":1},"changes":{"$ref":"#/definitions/PostLoanChanges"}}},"PostLoansLoanIdScheduleRequest":{"type":"object"},"GetLoansCurrency":{"type":"object","properties":{"code":{"type":"string","example":"USD"},"name":{"type":"string","example":"US Dollar"},"decimalPlaces":{"type":"integer","format":"int32","example":2},"displaySymbol":{"type":"string","example":"$"},"nameCode":{"type":"string","example":"currency.USD"},"displayLabel":{"type":"string","example":"US Dollar ($)"}}},"GetLoansLoanIdTransactionsTransactionIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":3},"type":{"$ref":"#/definitions/GetLoansType"},"date":{"type":"string","format":"date","example":"[2012, 5, 14]"},"manuallyReversed":{"type":"boolean","example":false},"currency":{"$ref":"#/definitions/GetLoansCurrency"},"amount":{"type":"number","format":"double","example":559.88},"interestPortion":{"type":"number","format":"double","example":559.88}}},"GetLoansType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"loanTransactionType.repayment"},"value":{"type":"string","example":"Repayment"},"disbursement":{"type":"boolean","example":false},"repaymentAtDisbursement":{"type":"boolean","example":false},"repayment":{"type":"boolean","example":true},"contra":{"type":"boolean","example":false},"waiveInterest":{"type":"boolean","example":false},"waiveCharges":{"type":"boolean","example":false},"writeOff":{"type":"boolean","example":false},"recoveryRepayment":{"type":"boolean","example":false}}},"GetLoansLoanIdTransactionsTemplateResponse":{"type":"object","properties":{"transactionType":{"$ref":"#/definitions/GetLoansTransactionType"},"date":{"type":"string","format":"date","example":"[2009, 8, 1]"},"total":{"$ref":"#/definitions/GetLoansTotal"}}},"GetLoansTotal":{"type":"object","properties":{"currencyCode":{"type":"string","example":"XOF"},"digitsAfterDecimal":{"type":"integer","format":"int32","example":0},"inMultiplesOf":{"type":"integer","format":"int32","example":0},"amount":{"type":"number","format":"float","example":471.0},"defaultName":{"type":"string","example":"CFA Franc BCEAO"},"nameCode":{"type":"string","example":"currency.XOF"},"displaySymbol":{"type":"string","example":"CFA"},"zero":{"type":"boolean","example":false},"greaterThanZero":{"type":"boolean","example":true},"displaySymbolValue":{"type":"string","example":"471 CFA"}}},"GetLoansTransactionType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"loanTransactionType.repayment"},"value":{"type":"string","example":"Repayment"}}},"PostLoansLoanIdTransactionsResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":1},"clientId":{"type":"integer","format":"int32","example":1},"resourceId":{"type":"integer","format":"int32","example":22}}},"PostLoansLoanIdTransactionsRequest":{"type":"object"},"PostLoansLoanIdTransactionsTransactionIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":16}}},"PostLoansLoanIdTransactionsTransactionIdRequest":{"type":"object","properties":{"locale":{"type":"string","example":"en_GB"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"transactionDate":{"type":"string","example":"25 May 2012"},"transactionAmount":{"type":"number","format":"double","example":"50,000.00"},"note":{"type":"string","example":"An optional note about why your adjusting or changing the transaction."}}},"GetLoansLoanIdAmortizationType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"amortizationType.equal.installments"},"value":{"type":"string","example":"Equal installments"}}},"GetLoansLoanIdChargeCalculationType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"chargeCalculationType.percent.of.amount"},"value":{"type":"string","example":"% Amount"}}},"GetLoansLoanIdChargePaymentMode":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":0},"code":{"type":"string","example":"chargepaymentmode.regular"},"value":{"type":"string","example":"Regular"}}},"GetLoansLoanIdChargeTimeType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":9},"code":{"type":"string","example":"chargeTimeType.overdueInstallment"},"value":{"type":"string","example":"overdue fees"}}},"GetLoansLoanIdCurrency":{"type":"object","properties":{"code":{"type":"string","example":"UGX"},"name":{"type":"string","example":"Uganda Shilling"},"decimalPlaces":{"type":"integer","format":"int32","example":2},"displaySymbol":{"type":"string","example":"USh"},"nameCode":{"type":"string","example":"currency.UGX"},"displayLabel":{"type":"string","example":"Uganda Shilling (USh)"}}},"GetLoansLoanIdDisbursementDetails":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":71},"expectedDisbursementDate":{"type":"string","format":"date","example":"[2013, 11, 1]"},"principal":{"type":"number","format":"float","example":22000.0},"approvedPrincipal":{"type":"number","format":"float","example":22000.0}}},"GetLoansLoanIdEmiVariations":{"type":"object"},"GetLoansLoanIdFeeFrequency":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"feeFrequencyperiodFrequencyType.weeks"},"value":{"type":"string","example":"Weeks"}}},"GetLoansLoanIdInterestCalculationPeriodType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"interestCalculationPeriodType.same.as.repayment.period"},"value":{"type":"string","example":"Same as repayment period"}}},"GetLoansLoanIdInterestRateFrequencyType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":3},"code":{"type":"string","example":"interestRateFrequency.periodFrequencyType.years"},"value":{"type":"string","example":"Per year"}}},"GetLoansLoanIdInterestType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"interestType.flat"},"value":{"type":"string","example":"Flat"}}},"GetLoansLoanIdLinkedAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"accountNo":{"type":"integer","format":"int64","example":1}}},"GetLoansLoanIdLoanType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"loanType.individual"},"value":{"type":"string","example":"Individual"}}},"GetLoansLoanIdOverdueCharges":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":20},"name":{"type":"string","example":"overdraft penality"},"active":{"type":"boolean","example":true},"penalty":{"type":"boolean","example":true},"currency":{"$ref":"#/definitions/GetLoanCurrency"},"amount":{"type":"number","format":"float","example":3.0},"chargeTimeType":{"$ref":"#/definitions/GetLoansLoanIdChargeTimeType"},"chargeAppliesTo":{"$ref":"#/definitions/GetLoanChargeTemplateChargeAppliesTo"},"chargeCalculationType":{"$ref":"#/definitions/GetLoansLoanIdChargeCalculationType"},"chargePaymentMode":{"$ref":"#/definitions/GetLoansLoanIdChargePaymentMode"},"feeInterval":{"type":"integer","format":"int32","example":2},"feeFrequency":{"$ref":"#/definitions/GetLoansLoanIdFeeFrequency"}}},"GetLoansLoanIdRepaymentFrequencyType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"repaymentFrequency.periodFrequencyType.months"},"value":{"type":"string","example":"Months"}}},"GetLoansLoanIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"accountNo":{"type":"integer","format":"int64","example":1},"status":{"$ref":"#/definitions/GetLoansLoanIdStatus"},"clientId":{"type":"integer","format":"int32","example":1},"clientName":{"type":"string","example":"Kampala first Client"},"clientOfficeId":{"type":"integer","format":"int32","example":2},"loanProductId":{"type":"integer","format":"int32","example":1},"loanProductName":{"type":"string","example":"Kampala Product (with cash accounting)"},"loanProductDescription":{"type":"string","example":"Typical Kampala loan product with cash accounting enabled for testing."},"loanPurposeId":{"type":"integer","format":"int32","example":22},"loanPurposeName":{"type":"string","example":"option.HousingImprovement"},"loanOfficerId":{"type":"integer","format":"int32","example":2},"loanOfficerName":{"type":"string","example":"LoanOfficer, Kampala"},"loanType":{"$ref":"#/definitions/GetLoansLoanIdLoanType"},"currency":{"$ref":"#/definitions/GetLoansLoanIdCurrency"},"principal":{"type":"integer","format":"int64","example":1000000},"termFrequency":{"type":"integer","format":"int32","example":12},"termPeriodFrequencyType":{"$ref":"#/definitions/GetLoansLoanIdTermPeriodFrequencyType"},"numberOfRepayments":{"type":"integer","format":"int32","example":12},"repaymentEvery":{"type":"integer","format":"int32","example":1},"repaymentFrequencyType":{"$ref":"#/definitions/GetLoansLoanIdRepaymentFrequencyType"},"interestRatePerPeriod":{"type":"integer","format":"int32","example":24},"interestRateFrequencyType":{"$ref":"#/definitions/GetLoansLoanIdInterestRateFrequencyType"},"annualInterestRate":{"type":"integer","format":"int32","example":24},"amortizationType":{"$ref":"#/definitions/GetLoansLoanIdAmortizationType"},"interestType":{"$ref":"#/definitions/GetLoansLoanIdInterestType"},"interestCalculationPeriodType":{"$ref":"#/definitions/GetLoansLoanIdInterestCalculationPeriodType"},"transactionProcessingStrategyId":{"type":"integer","format":"int32","example":2},"timeline":{"$ref":"#/definitions/GetLoansLoanIdTimeline"},"summary":{"$ref":"#/definitions/GetLoansLoanIdSummary"}}},"GetLoansLoanIdStatus":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":300},"code":{"type":"string","example":"loanStatusType.active"},"value":{"type":"string","example":"Active"},"pendingApproval":{"type":"boolean","example":false},"waitingForDisbursal":{"type":"boolean","example":false},"active":{"type":"boolean","example":true},"closedObligationsMet":{"type":"boolean","example":false},"closedWrittenOff":{"type":"boolean","example":false},"closedRescheduled":{"type":"boolean","example":false},"closed":{"type":"boolean","example":false},"overpaid":{"type":"boolean","example":false}}},"GetLoansLoanIdSummary":{"type":"object","properties":{"currency":{"$ref":"#/definitions/GetLoansLoanIdCurrency"},"principalDisbursed":{"type":"integer","format":"int64","example":1000000},"principalPaid":{"type":"integer","format":"int64","example":0},"principalWrittenOff":{"type":"integer","format":"int64","example":0},"principalOutstanding":{"type":"integer","format":"int64","example":1000000},"principalOverdue":{"type":"number","format":"double","example":833333.3},"interestCharged":{"type":"integer","format":"int64","example":240000},"interestPaid":{"type":"integer","format":"int64","example":0},"interestWaived":{"type":"integer","format":"int64","example":0},"interestWrittenOff":{"type":"integer","format":"int64","example":0},"interestOutstanding":{"type":"integer","format":"int64","example":240000},"interestOverdue":{"type":"integer","format":"int64","example":200000},"feeChargesCharged":{"type":"integer","format":"int64","example":18000},"feeChargesDueAtDisbursementCharged":{"type":"integer","format":"int64","example":0},"feeChargesPaid":{"type":"integer","format":"int64","example":0},"feeChargesWaived":{"type":"integer","format":"int64","example":0},"feeChargesWrittenOff":{"type":"integer","format":"int64","example":0},"feeChargesOutstanding":{"type":"integer","format":"int64","example":18000},"feeChargesOverdue":{"type":"integer","format":"int64","example":15000},"penaltyChargesCharged":{"type":"integer","format":"int64","example":0},"penaltyChargesPaid":{"type":"integer","format":"int64","example":0},"penaltyChargesWaived":{"type":"integer","format":"int64","example":0},"penaltyChargesWrittenOff":{"type":"integer","format":"int64","example":0},"penaltyChargesOutstanding":{"type":"integer","format":"int64","example":0},"penaltyChargesOverdue":{"type":"integer","format":"int64","example":0},"totalExpectedRepayment":{"type":"integer","format":"int64","example":1258000},"totalRepayment":{"type":"integer","format":"int64","example":0},"totalExpectedCostOfLoan":{"type":"integer","format":"int64","example":258000},"totalCostOfLoan":{"type":"integer","format":"int64","example":0},"totalWaived":{"type":"integer","format":"int64","example":0},"totalWrittenOff":{"type":"integer","format":"int64","example":0},"totalOutstanding":{"type":"integer","format":"int64","example":1258000},"totalOverdue":{"type":"number","format":"double","example":1048333.3},"overdueSinceDate":{"type":"string","format":"date","example":"[2012, 5, 10]"},"linkedAccount":{"$ref":"#/definitions/GetLoansLoanIdLinkedAccount"},"disbursementDetails":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetLoansLoanIdDisbursementDetails"}},"fixedEmiAmount":{"type":"number","format":"float","example":1100.0},"maxOutstandingLoanBalance":{"type":"integer","format":"int64","example":35000},"canDisburse":{"type":"boolean","example":false},"emiAmountVariations":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetLoansLoanIdEmiVariations"}},"inArrears":{"type":"boolean","example":true},"isNPA":{"type":"boolean","example":false},"overdueCharges":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetLoansLoanIdOverdueCharges"}}}},"GetLoansLoanIdTermPeriodFrequencyType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"termFrequency.periodFrequencyType.months"},"value":{"type":"string","example":"Months"}}},"GetLoansLoanIdTimeline":{"type":"object","properties":{"submittedOnDate":{"type":"string","format":"date","example":"[2012, 4, 3]"},"submittedByUsername":{"type":"string","example":"admin"},"submittedByFirstname":{"type":"string","example":"App"},"submittedByLastname":{"type":"string","example":"Administrator"},"approvedOnDate":{"type":"string","format":"date","example":"[2012, 4, 3]"},"approvedByUsername":{"type":"string","example":"admin"},"approvedByFirstname":{"type":"string","example":"App"},"approvedByLastname":{"type":"string","example":"Administrator"},"expectedDisbursementDate":{"type":"string","format":"date","example":"[2012, 4, 10]"},"actualDisbursementDate":{"type":"string","format":"date","example":"[2012, 4, 10]"},"disbursedByUsername":{"type":"string","example":"admin"},"disbursedByFirstname":{"type":"string","example":"App"},"disbursedByLastname":{"type":"string","example":"Administrator"},"expectedMaturityDate":{"type":"string","format":"date","example":"[2012, 4, 10]"}}},"PostLoansRepaymentSchedulePeriods":{"type":"object","properties":{"period":{"type":"integer","format":"int32","example":0},"dueDate":{"type":"string","format":"date","example":"[2011, 9, 20]"},"principalDisbursed":{"type":"integer","format":"int64","example":100000},"principalLoanBalanceOutstanding":{"type":"integer","format":"int64","example":100000},"feeChargesDue":{"type":"integer","format":"int64","example":0},"feeChargesOutstanding":{"type":"integer","format":"int64","example":0},"totalOriginalDueForPeriod":{"type":"integer","format":"int64","example":0},"totalDueForPeriod":{"type":"integer","format":"int64","example":0},"totalOutstandingForPeriod":{"type":"integer","format":"int64","example":0},"totalOverdue":{"type":"integer","format":"int64","example":0},"totalActualCostOfLoanForPeriod":{"type":"integer","format":"int64","example":0}}},"PostLoansResponse":{"type":"object","properties":{"currency":{"$ref":"#/definitions/GetLoansLoanIdCurrency"},"loanTermInDays":{"type":"integer","format":"int32","example":366},"totalPrincipalDisbursed":{"type":"integer","format":"int64","example":100000},"totalPrincipalExpected":{"type":"integer","format":"int64","example":100000},"totalPrincipalPaid":{"type":"integer","format":"int64","example":0},"totalInterestCharged":{"type":"number","format":"double","example":13471.52},"totalFeeChargesCharged":{"type":"integer","format":"int64","example":0},"totalPenaltyChargesCharged":{"type":"integer","format":"int64","example":0},"totalWaived":{"type":"integer","format":"int64","example":0},"totalWrittenOff":{"type":"integer","format":"int64","example":0},"totalRepaymentExpected":{"type":"number","format":"double","example":113471.52},"totalRepayment":{"type":"integer","format":"int64","example":0},"totalOutstanding":{"type":"integer","format":"int64","example":0},"periods":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/PostLoansRepaymentSchedulePeriods"}}}},"PostLoansRequest":{"type":"object","properties":{"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"locale":{"type":"string","example":"en_GB"},"productId":{"type":"integer","format":"int32","example":1},"principal":{"type":"number","format":"double","example":"100,000.00"},"loanTermFrequency":{"type":"integer","format":"int32","example":12},"loanTermFrequencyType":{"type":"integer","format":"int32","example":2},"numberOfRepayments":{"type":"integer","format":"int32","example":12},"repaymentEvery":{"type":"integer","format":"int32","example":1},"repaymentFrequencyType":{"type":"integer","format":"int32","example":2},"interestRatePerPeriod":{"type":"integer","format":"int32","example":2},"amortizationType":{"type":"integer","format":"int32","example":1},"interestType":{"type":"integer","format":"int32","example":0},"interestCalculationPeriodType":{"type":"integer","format":"int32","example":1},"expectedDisbursementDate":{"type":"string","example":"20 September 2011"},"transactionProcessingStrategyId":{"type":"integer","format":"int32","example":2}}},"PutLoansLoanIdChanges":{"type":"object","properties":{"principal":{"type":"integer","format":"int64","example":5000},"locale":{"type":"string","example":"en"}}},"PutLoansLoanIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":2},"clientId":{"type":"integer","format":"int32","example":1},"loanId":{"type":"integer","format":"int32","example":1},"resourceId":{"type":"integer","format":"int32","example":1},"changes":{"$ref":"#/definitions/PutLoansLoanIdChanges"}}},"PutLoansLoanIdRequest":{"type":"object","properties":{"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"productId":{"type":"integer","format":"int32","example":1},"principal":{"type":"integer","format":"int64","example":5000},"loanTermFrequency":{"type":"integer","format":"int32","example":10},"loanTermFrequencyType":{"type":"integer","format":"int32","example":0},"numberOfRepayments":{"type":"integer","format":"int32","example":10},"repaymentEvery":{"type":"integer","format":"int32","example":1},"repaymentFrequencyType":{"type":"integer","format":"int32","example":0},"interestRatePerPeriod":{"type":"integer","format":"int32","example":2},"interestType":{"type":"integer","format":"int32","example":0},"interestCalculationPeriodType":{"type":"integer","format":"int32","example":0},"amortizationType":{"type":"integer","format":"int32","example":1},"expectedDisbursementDate":{"type":"string","example":"04 March 2014"},"transactionProcessingStrategyId":{"type":"integer","format":"int32","example":1}}},"DeleteLoansLoanIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":1},"clientId":{"type":"integer","format":"int32","example":1},"loanId":{"type":"integer","format":"int32","example":1},"resourceId":{"type":"integer","format":"int32","example":1}}},"PostLoansLoanIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":2},"clientId":{"type":"integer","format":"int32","example":6},"loanId":{"type":"integer","format":"int32","example":3},"resourceId":{"type":"integer","format":"int32","example":3}}},"PostLoansLoanIdRequest":{"type":"object","properties":{"toLoanOfficerId":{"type":"integer","format":"int32","example":2},"assignmentDate":{"type":"string","example":"02 September 2014"},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"fromLoanOfficerId":{"type":"integer","format":"int32"}}},"GetLoansTemplateProductOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"Kampala Product (with cash accounting)"}}},"GetLoansTemplateResponse":{"type":"object","properties":{"clientId":{"type":"integer","format":"int64","example":1},"clientName":{"type":"string","example":"Kampala first Client"},"clientOfficeId":{"type":"integer","format":"int32","example":2},"timeline":{"$ref":"#/definitions/GetLoansTemplateTimeline"},"productOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetLoansTemplateProductOptions"}}}},"GetLoansTemplateTimeline":{"type":"object","properties":{"expectedDisbursementDate":{"type":"string","format":"date","example":"[2013, 3, 8]"}}},"GetLoansResponse":{"type":"object","properties":{"totalFilteredRecords":{"type":"integer","format":"int32","example":1},"pageItems":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetLoansLoanIdResponse"}}}},"PutLoanChanges":{"type":"object","properties":{"principal":{"type":"number","format":"double","example":"70,000.00"},"locale":{"type":"string","example":"en_GB"}}},"PutLoanProductsProductIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1},"changes":{"$ref":"#/definitions/PutLoanChanges"}}},"PutLoanProductsProductIdRequest":{"type":"object","properties":{"locale":{"type":"string","example":"en_GB"},"principal":{"type":"number","format":"double","example":"70,000.00"}}},"GetLoanProductsAccountingMappingOptions":{"type":"object","properties":{"liabilityAccountOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetLoanProductsLiabilityAccountOptions"}},"assetAccountOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetLoanProductsAssetAccountOptions"}},"expenseAccountOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetLoanProductsExpenseAccountOptions"}},"incomeAccountOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetLoanProductsIncomeAccountOptions"}}}},"GetLoanProductsAccountingRule":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"accountingRuleType.cash"},"value":{"type":"string","example":"CASH BASED"}}},"GetLoanProductsAmortizationType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"amortizationType.equal.installments"},"value":{"type":"string","example":"Equal installments"}}},"GetLoanProductsAssetAccountOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"name":{"type":"string","example":"Loan portfolio"},"glCode":{"type":"integer","format":"int32","example":2},"disabled":{"type":"boolean","example":false},"manualEntriesAllowed":{"type":"boolean","example":true},"type":{"$ref":"#/definitions/GetLoanProductsLiabilityType"},"usage":{"$ref":"#/definitions/GetLoanProductsLiabilityUsage"},"nameDecorated":{"type":"string","example":"Loan portfolio"},"tagId":{"$ref":"#/definitions/GetLoanProductsLiabilityTagId"},"organizationRunningBalance":{"type":"integer","format":"int32","example":60000}}},"GetLoanProductsChargeAppliesTo":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":"1 "},"code":{"type":"string","example":"chargeAppliesTo.loan"},"value":{"type":"string","example":"Loan"}}},"GetLoanProductsChargeOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":5},"name":{"type":"string","example":"des charges"},"active":{"type":"boolean","example":true},"penalty":{"type":"boolean","example":false},"currency":{"$ref":"#/definitions/GetLoanProductsCurrencyOptions"},"amount":{"type":"integer","format":"int64","example":100},"chargeTimeType":{"$ref":"#/definitions/GetLoanChargeTimeType"},"chargeAppliesTo":{"$ref":"#/definitions/GetLoanProductsChargeAppliesTo"},"chargeCalculationType":{"$ref":"#/definitions/GetLoanChargeCalculationType"},"chargePaymentMode":{"$ref":"#/definitions/GetLoansChargePaymentMode"}}},"GetLoanProductsCurrencyOptions":{"type":"object","properties":{"code":{"type":"string","example":"USD"},"name":{"type":"string","example":"US Dollar"},"decimalPlaces":{"type":"integer","format":"int32","example":2},"displaySymbol":{"type":"string","example":"$"},"nameCode":{"type":"string","example":"currency.USD"},"displayLabel":{"type":"string","example":"US Dollar ($)"}}},"GetLoanProductsDaysInYearTemplateType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"DaysInYearType.actual"},"value":{"type":"string","example":"Actual"}}},"GetLoanProductsExpenseAccountOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":10},"name":{"type":"string","example":"loans written off 2"},"glCode":{"type":"integer","format":"int32","example":12},"disabled":{"type":"boolean","example":false},"manualEntriesAllowed":{"type":"boolean","example":true},"type":{"$ref":"#/definitions/GetLoanProductsExpenseType"},"usage":{"$ref":"#/definitions/GetLoanProductsLiabilityUsage"},"nameDecorated":{"type":"string","example":"loans written off 2"},"tagId":{"$ref":"#/definitions/GetLoanProductsLiabilityTagId"},"organizationRunningBalance":{"type":"integer","format":"int32","example":0}}},"GetLoanProductsExpenseType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":5},"code":{"type":"string","example":"accountType.expense"},"value":{"type":"string","example":"EXPENSE"}}},"GetLoanProductsIncomeAccountOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":4},"name":{"type":"string","example":"income from interest"},"glCode":{"type":"integer","format":"int32","example":4},"disabled":{"type":"boolean","example":false},"manualEntriesAllowed":{"type":"boolean","example":true},"type":{"$ref":"#/definitions/GetLoanProductsIncomeType"},"usage":{"$ref":"#/definitions/GetLoanProductsLiabilityUsage"},"nameDecorated":{"type":"string","example":"income from interest"},"tagId":{"$ref":"#/definitions/GetLoanProductsLiabilityTagId"},"organizationRunningBalance":{"type":"integer","format":"int32","example":19}}},"GetLoanProductsIncomeType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":4},"code":{"type":"string","example":"accountType.income"},"value":{"type":"string","example":"INCOME"}}},"GetLoanProductsInterestRateTemplateFrequencyType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"interestRateFrequency.periodFrequencyType.months"},"value":{"type":"string","example":"Per month"}}},"GetLoanProductsInterestRecalculationCompoundingFrequencyType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"interestRecalculationFrequencyType.same.as.repayment.period"},"value":{"type":"string","example":"Same as repayment period"}}},"GetLoanProductsInterestRecalculationCompoundingType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"interestRecalculationCompoundingMethod.fee"},"value":{"type":"string","example":"Fee"}}},"GetLoanProductsInterestRecalculationTemplateData":{"type":"object","properties":{"interestRecalculationCompoundingType":{"$ref":"#/definitions/GetLoanProductsInterestRecalculationCompoundingType"},"rescheduleStrategyType":{"$ref":"#/definitions/GetLoanProductsRescheduleStrategyType"},"preClosureInterestCalculationStrategy":{"$ref":"#/definitions/GetLoanProductsPreClosureInterestCalculationStrategy"}}},"GetLoanProductsInterestTemplateType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":0},"code":{"type":"string","example":"interestType.declining.balance"},"value":{"type":"string","example":"Declining Balance"}}},"GetLoanProductsLiabilityAccountOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":11},"name":{"type":"string","example":"over payment"},"glCode":{"type":"integer","format":"int32","example":13},"disabled":{"type":"boolean","example":false},"manualEntriesAllowed":{"type":"boolean","example":true},"type":{"$ref":"#/definitions/GetLoanProductsLiabilityType"},"usage":{"$ref":"#/definitions/GetLoanProductsLiabilityUsage"},"nameDecorated":{"type":"string","example":"over payment"},"tagId":{"$ref":"#/definitions/GetLoanProductsLiabilityTagId"},"organizationRunningBalance":{"type":"integer","format":"int32","example":0}}},"GetLoanProductsLiabilityTagId":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":0}}},"GetLoanProductsLiabilityType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"accountType.liability"},"value":{"type":"string","example":"LIABILITY"}}},"GetLoanProductsLiabilityUsage":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"accountUsage.detail"},"value":{"type":"string","example":"DETAIL"}}},"GetLoanProductsPaymentTypeOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":10},"name":{"type":"string","example":"check"},"position":{"type":"integer","format":"int32","example":1}}},"GetLoanProductsPreClosureInterestCalculationStrategy":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"loanPreClosureInterestCalculationStrategy.tillPreClosureDate"},"value":{"type":"string","example":"Till preclose Date"}}},"GetLoanProductsRepaymentTemplateFrequencyType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"repaymentFrequency.periodFrequencyType.months"},"value":{"type":"string","example":"Months"}}},"GetLoanProductsRescheduleStrategyType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"loanRescheduleStrategyMethod.reduce.number.of.installments"},"value":{"type":"string","example":"Reduce number of installments"}}},"GetLoanProductsTemplateCurrency":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"decimalPlaces":{"type":"integer","format":"int32","example":0},"inMultiplesOf":{"type":"integer","format":"int32","example":0},"displaySymbol":{"type":"string"},"nameCode":{"type":"string"},"displayLabel":{"type":"string","example":"[]"}}},"GetLoanProductsTemplateResponse":{"type":"object","properties":{"includeInBorrowerCycle":{"type":"boolean","example":false},"useBorrowerCycle":{"type":"boolean","example":false},"currency":{"$ref":"#/definitions/GetLoanProductsTemplateCurrency"},"repaymentFrequencyType":{"$ref":"#/definitions/GetLoanProductsRepaymentTemplateFrequencyType"},"interestRateFrequencyType":{"$ref":"#/definitions/GetLoanProductsInterestRateTemplateFrequencyType"},"amortizationType":{"$ref":"#/definitions/GetLoanProductsAmortizationType"},"interestType":{"$ref":"#/definitions/GetLoanProductsInterestTemplateType"},"interestCalculationPeriodType":{"$ref":"#/definitions/GetLoansProductsInterestCalculationPeriodType"},"principalVariationsForBorrowerCycle":{"type":"array","example":"[]","items":{"type":"integer","format":"int32"}},"interestRateVariationsForBorrowerCycle":{"type":"array","example":"[]","items":{"type":"integer","format":"int32"}},"numberOfRepaymentVariationsForBorrowerCycle":{"type":"array","example":"[]","items":{"type":"integer","format":"int32"}},"accountingRule":{"$ref":"#/definitions/GetLoanProductsAccountingRule"},"daysInMonthType":{"$ref":"#/definitions/GetLoansProductsDaysInMonthTemplateType"},"daysInYearType":{"$ref":"#/definitions/GetLoanProductsDaysInYearTemplateType"},"isInterestRecalculationEnabled":{"type":"boolean","example":false},"interestRecalculationData":{"$ref":"#/definitions/GetLoanProductsInterestRecalculationTemplateData"},"paymentTypeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetLoanProductsPaymentTypeOptions"}},"currencyOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetLoanProductsCurrencyOptions"}},"repaymentFrequencyTypeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetLoanProductsRepaymentTemplateFrequencyType"}},"preClosureInterestCalculationStrategyOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetLoanProductsPreClosureInterestCalculationStrategy"}},"interestRateFrequencyTypeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetLoanProductsInterestRateTemplateFrequencyType"}},"amortizationTypeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetLoanProductsAmortizationType"}},"interestTypeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetLoanProductsInterestTemplateType"}},"interestCalculationPeriodTypeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetLoansProductsInterestCalculationPeriodType"}},"transactionProcessingStrategyOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetLoanProductsTransactionProcessingStrategyOptions"}},"chargeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetLoanProductsChargeOptions"}},"accountingRuleOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetLoanProductsAccountingRule"}},"accountingMappingOptions":{"$ref":"#/definitions/GetLoanProductsAccountingMappingOptions"},"valueConditionTypeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetLoanProductsValueConditionTypeOptions"}},"daysInMonthTypeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetLoansProductsDaysInMonthTemplateType"}},"daysInYearTypeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetLoanProductsInterestTemplateType"}},"interestRecalculationCompoundingTypeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetLoanProductsInterestRecalculationCompoundingType"}},"rescheduleStrategyTypeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetLoanProductsRescheduleStrategyType"}},"interestRecalculationFrequencyTypeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetLoanProductsInterestRecalculationCompoundingFrequencyType"}}}},"GetLoanProductsTransactionProcessingStrategyOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"mifos-standard-strategy"},"name":{"type":"string","example":"Penalties, Fees, Interest, Principal order"}}},"GetLoanProductsValueConditionTypeOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"mifos-standard-strategyLoanProductValueConditionType.equal"},"value":{"type":"string","example":"equals"}}},"GetLoansChargePaymentMode":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":0},"code":{"type":"string","example":"chargepaymentmode.regular"},"value":{"type":"string","example":"Regular"}}},"GetLoansProductsDaysInMonthTemplateType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"DaysInMonthType.actual"},"value":{"type":"string","example":"Actual"}}},"GetLoansProductsInterestCalculationPeriodType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"interestCalculationPeriodType.same.as.repayment.period"},"value":{"type":"string","example":"Same as repayment period"}}},"PostLoanProductsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":3}}},"PostLoanProductsRequest":{"type":"object","properties":{"name":{"type":"string","example":"LP Accrual Accounting"},"shortName":{"type":"string","example":"LPAA"},"currencyCode":{"type":"string","example":"USD"},"locale":{"type":"string","example":"en_GB"},"digitsAfterDecimal":{"type":"integer","format":"int32","example":2},"inMultiplesOf":{"type":"integer","format":"int32","example":0},"principal":{"type":"number","format":"double","example":"100,000.00"},"numberOfRepayments":{"type":"integer","format":"int32","example":12},"repaymentEvery":{"type":"integer","format":"int32","example":1},"repaymentFrequencyType":{"type":"integer","format":"int32","example":2},"transactionProcessingStrategyId":{"type":"integer","format":"int32","example":1},"interestRatePerPeriod":{"type":"number","format":"double","example":1.75},"interestRateFrequencyType":{"type":"integer","format":"int32","example":2},"amortizationType":{"type":"integer","format":"int32","example":1},"interestType":{"type":"integer","format":"int32","example":0},"interestCalculationPeriodType":{"type":"integer","format":"int32","example":1},"daysInMonthType":{"type":"integer","format":"int32","example":1},"daysInYearType":{"type":"integer","format":"int32","example":1},"isInterestRecalculationEnabled":{"type":"boolean","example":false},"accountingRule":{"type":"integer","format":"int32","example":3},"fundSourceAccountId":{"type":"integer","format":"int32","example":4},"loanPortfolioAccountId":{"type":"integer","format":"int32","example":8},"receivableInterestAccountId":{"type":"integer","format":"int32","example":9},"receivableFeeAccountId":{"type":"integer","format":"int32","example":11},"receivablePenaltyAccountId":{"type":"integer","format":"int32","example":10},"interestOnLoanAccountId":{"type":"integer","format":"int32","example":34},"incomeFromFeeAccountId":{"type":"integer","format":"int32","example":37},"incomeFromPenaltyAccountId":{"type":"integer","format":"int32","example":35},"overpaymentLiabilityAccountId":{"type":"integer","format":"int32","example":2},"writeOffAccountId":{"type":"integer","format":"int32","example":41}}},"GetLoanAccountingMappings":{"type":"object","properties":{"fundSourceAccount":{"$ref":"#/definitions/GetLoanFundSourceAccount"},"loanPortfolioAccount":{"$ref":"#/definitions/GetLoanPortfolioAccount"},"transfersInSuspenseAccount":{"$ref":"#/definitions/GetLoanTransfersInSuspenseAccount"},"interestOnLoanAccount":{"$ref":"#/definitions/GetLoanInterestOnLoanAccount"},"incomeFromFeeAccount":{"$ref":"#/definitions/GetLoanIncomeFromFeeAccount"},"incomeFromPenaltyAccount":{"$ref":"#/definitions/GetLoanIncomeFromPenaltyAccount"},"writeOffAccount":{"$ref":"#/definitions/GetLoanWriteOffAccount"},"overpaymentLiabilityAccount":{"$ref":"#/definitions/GetLoanOverpaymentLiabilityAccount"}}},"GetLoanCharge":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"flat install"},"active":{"type":"boolean","example":false},"penalty":{"type":"boolean","example":false}}},"GetLoanFeeToIncomeAccountMappings":{"type":"object","properties":{"charge":{"$ref":"#/definitions/GetLoanCharge"},"incomeAccount":{"$ref":"#/definitions/GetLoanIncomeFromFeeAccount"}}},"GetLoanFundSourceAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"fund source"},"glCode":{"type":"integer","format":"int32","example":1}}},"GetLoanIncomeFromFeeAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":8},"name":{"type":"string","example":"income from fees 2"},"glCode":{"type":"integer","format":"int32","example":10}}},"GetLoanIncomeFromPenaltyAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":9},"name":{"type":"string","example":"income from penalities 2"},"glCode":{"type":"integer","format":"int32","example":11}}},"GetLoanInterestOnLoanAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":4},"name":{"type":"string","example":"income from interest"},"glCode":{"type":"integer","format":"int32","example":4}}},"GetLoanOverpaymentLiabilityAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":11},"name":{"type":"string","example":"over payment"},"glCode":{"type":"integer","format":"int32","example":13}}},"GetLoanPaymentChannelToFundSourceMappings":{"type":"object","properties":{"paymentType":{"$ref":"#/definitions/GetLoanPaymentType"},"fundSourceAccount":{"$ref":"#/definitions/GetLoanFundSourceAccount"}}},"GetLoanPaymentType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":10},"name":{"type":"string","example":"check"}}},"GetLoanPortfolioAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"name":{"type":"string","example":"Loan portfolio"},"glCode":{"type":"integer","format":"int32","example":2}}},"GetLoanProductsCurrency":{"type":"object","properties":{"code":{"type":"string","example":"USD"},"name":{"type":"string","example":"US Dollar"},"decimalPlaces":{"type":"integer","format":"int32","example":2},"inMultiplesOf":{"type":"integer","format":"int32","example":0},"displaySymbol":{"type":"string","example":"$"},"nameCode":{"type":"string","example":"currency.USD"},"displayLabel":{"type":"string","example":"US Dollar ($)"}}},"GetLoanProductsInterestRateFrequencyType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":3},"code":{"type":"string","example":"interestRateFrequency.periodFrequencyType.years"},"value":{"type":"string","example":"Per year"}}},"GetLoanProductsParamType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"LoanProductParamType.principal"},"value":{"type":"string","example":"principal"}}},"GetLoanProductsPrincipalVariationsForBorrowerCycle":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":21},"borrowerCycleNumber":{"type":"integer","format":"int32","example":1},"paramType":{"$ref":"#/definitions/GetLoanProductsParamType"},"valueConditionType":{"$ref":"#/definitions/GetLoanProductsValueConditionType"},"minValue":{"type":"number","format":"float","example":2000.0},"maxValue":{"type":"number","format":"float","example":20000.0},"defaultValue":{"type":"number","format":"float","example":15000.0}}},"GetLoanProductsProductIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":11},"name":{"type":"string","example":"advanced accounting"},"shortName":{"type":"string","example":"ad11"},"includeInBorrowerCycle":{"type":"boolean","example":true},"useBorrowerCycle":{"type":"boolean","example":true},"status":{"type":"string","example":"loanProduct.active"},"currency":{"$ref":"#/definitions/GetLoanProductsCurrency"},"principal":{"type":"number","format":"float","example":10000.0},"minPrincipal":{"type":"number","format":"float","example":2000.0},"maxPrincipal":{"type":"number","format":"float","example":15000.0},"numberOfRepayments":{"type":"integer","format":"int32","example":7},"repaymentEvery":{"type":"integer","format":"int32","example":7},"repaymentFrequencyType":{"$ref":"#/definitions/GetLoanProductsRepaymentFrequencyType"},"interestRatePerPeriod":{"type":"number","format":"float","example":5.0},"interestRateFrequencyType":{"$ref":"#/definitions/GetLoanProductsInterestRateFrequencyType"},"annualInterestRate":{"type":"number","format":"float","example":60.0},"amortizationType":{"$ref":"#/definitions/GetLoanProductsAmortizationType"},"interestType":{"$ref":"#/definitions/GetLoanProductsInterestTemplateType"},"interestCalculationPeriodType":{"$ref":"#/definitions/GetLoansProductsInterestCalculationPeriodType"},"transactionProcessingStrategyId":{"type":"integer","format":"int32","example":1},"transactionProcessingStrategyName":{"type":"string","example":"Mifos style"},"charges":{"type":"array","example":"[]","items":{"type":"integer","format":"int32"}},"productsPrincipalVariationsForBorrowerCycle":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetLoanProductsPrincipalVariationsForBorrowerCycle"}},"interestRateVariationsForBorrowerCycle":{"type":"array","example":"[]","items":{"type":"integer","format":"int32"}},"numberOfRepaymentVariationsForBorrowerCycle":{"type":"array","example":"[]","items":{"type":"integer","format":"int32"}},"accountingRule":{"$ref":"#/definitions/GetLoanProductsAccountingRule"},"accountingMappings":{"$ref":"#/definitions/GetLoanAccountingMappings"},"paymentChannelToFundSourceMappings":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetLoanPaymentChannelToFundSourceMappings"}},"feeToIncomeAccountMappings":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetLoanFeeToIncomeAccountMappings"}},"multiDisburseLoan":{"type":"boolean","example":true},"maxTrancheCount":{"type":"integer","format":"int32","example":3},"outstandingLoanBalance":{"type":"number","format":"float","example":36000.0},"overdueDaysForNPA":{"type":"integer","format":"int32","example":2},"principalThresholdForLastInstalment":{"type":"integer","format":"int32","example":50}}},"GetLoanProductsRepaymentFrequencyType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":0},"code":{"type":"string","example":"repaymentFrequency.periodFrequencyType.days"},"value":{"type":"string","example":"Days"}}},"GetLoanProductsValueConditionType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"LoanProductValueConditionType.equal"},"value":{"type":"string","example":"equals"}}},"GetLoanTransfersInSuspenseAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":3},"name":{"type":"string","example":"transfers"},"glCode":{"type":"integer","format":"int32","example":3}}},"GetLoanWriteOffAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":10},"name":{"type":"string","example":"loans written off 2"},"glCode":{"type":"integer","format":"int32","example":12}}},"GetLoanProductsInterestRecalculationData":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":3},"productId":{"type":"integer","format":"int32","example":1},"interestRecalculationCompoundingType":{"$ref":"#/definitions/GetLoanProductsInterestRecalculationCompoundingType"},"interestRecalculationCompoundingFrequencyType":{"$ref":"#/definitions/GetLoanProductsInterestRecalculationCompoundingFrequencyType"},"rescheduleStrategyType":{"$ref":"#/definitions/GetLoanProductsRescheduleStrategyType"},"recalculationRestFrequencyType":{"$ref":"#/definitions/GetLoanProductsInterestRecalculationCompoundingFrequencyType"},"preClosureInterestCalculationStrategy":{"$ref":"#/definitions/GetLoanProductsPreClosureInterestCalculationStrategy"},"isArrearsBasedOnOriginalSchedule":{"type":"boolean","example":true}}},"GetLoanProductsInterestType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"interestType.flat"},"value":{"type":"string","example":"Flat"}}},"GetLoanProductsResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"personal loan product"},"shortName":{"type":"string","example":"pe1"},"includeInBorrowerCycle":{"type":"boolean","example":false},"useBorrowerCycle":{"type":"boolean","example":false},"startDate":{"type":"string","format":"date","example":"[2013, 9, 2]"},"endDate":{"type":"string","format":"date","example":"[2014, 2, 7]"},"status":{"type":"string","example":"loanProduct.active"},"currency":{"$ref":"#/definitions/GetLoanProductsCurrency"},"principal":{"type":"number","format":"float","example":10000.0},"minPrincipal":{"type":"number","format":"float","example":5000.0},"maxPrincipal":{"type":"number","format":"float","example":15000.0},"numberOfRepayments":{"type":"integer","format":"int32","example":10},"minNumberOfRepayments":{"type":"integer","format":"int32","example":5},"maxNumberOfRepayments":{"type":"integer","format":"int32","example":15},"repaymentEvery":{"type":"integer","format":"int32","example":7},"repaymentFrequencyType":{"$ref":"#/definitions/GetLoanProductsRepaymentFrequencyType"},"interestRatePerPeriod":{"type":"number","format":"float","example":15.0},"interestRateFrequencyType":{"$ref":"#/definitions/GetLoanProductsInterestRateFrequencyType"},"annualInterestRate":{"type":"number","format":"float","example":15.0},"amortizationType":{"$ref":"#/definitions/GetLoanProductsAmortizationType"},"interestType":{"$ref":"#/definitions/GetLoanProductsInterestType"},"interestCalculationPeriodType":{"$ref":"#/definitions/GetLoansProductsInterestCalculationPeriodType"},"transactionProcessingStrategyId":{"type":"integer","format":"int32","example":1},"transactionProcessingStrategyName":{"type":"string","example":"Mifos style"},"principalVariationsForBorrowerCycle":{"type":"array","example":"[]","items":{"type":"integer","format":"int32"}},"interestRateVariationsForBorrowerCycle":{"type":"array","example":"[]","items":{"type":"integer","format":"int32"}},"numberOfRepaymentVariationsForBorrowerCycle":{"type":"array","example":"[]","items":{"type":"integer","format":"int32"}},"daysInMonthType":{"$ref":"#/definitions/GetLoansProductsDaysInMonthType"},"daysInYearType":{"$ref":"#/definitions/GetLoansProductsDaysInYearType"},"isInterestRecalculationEnabled":{"type":"boolean","example":true},"interestRecalculationData":{"$ref":"#/definitions/GetLoanProductsInterestRecalculationData"},"accountingRule":{"$ref":"#/definitions/GetLoanProductsAccountingRule"},"principalThresholdForLastInstalment":{"type":"integer","format":"int32","example":0}}},"GetLoansProductsDaysInMonthType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":30},"code":{"type":"string","example":"DaysInMonthType.days360"},"value":{"type":"string","example":"30 Days"}}},"GetLoansProductsDaysInYearType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":360},"code":{"type":"string","example":"DaysInYearType.days360"},"value":{"type":"string","example":"360 Days"}}},"PutNotesChanges":{"type":"object","properties":{"note":{"type":"string","example":"a note about the client"}}},"PutResourceTypeResourceIdNotesNoteIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":1},"clientId":{"type":"integer","format":"int32","example":1},"resourceId":{"type":"integer","format":"int32","example":76},"changes":{"$ref":"#/definitions/PutNotesChanges"}}},"PutResourceTypeResourceIdNotesNoteIdRequest":{"type":"object","properties":{"note":{"type":"string","example":"a note about the client"}}},"DeleteResourceTypeResourceIdNotesNoteIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":76}}},"GetNotesNoteType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":100},"code":{"type":"string","example":"noteType.client"},"value":{"type":"string","example":"Client note"}}},"GetResourceTypeResourceIdNotesNoteIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":76},"clientId":{"type":"integer","format":"int32","example":1},"noteType":{"$ref":"#/definitions/GetNotesNoteType"},"note":{"type":"string","example":"a note about the client"},"createdById":{"type":"integer","format":"int32","example":1},"createdByUsername":{"type":"string","example":"mifos"},"createdOn":{"type":"string","format":"date-time","example":"1359463135000"},"updatedById":{"type":"integer","format":"int32","example":1},"updatedByUsername":{"type":"string","example":"mifos"},"updatedOn":{"type":"string","format":"date-time","example":"1359463135000"}}},"PostResourceTypeResourceIdNotesResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":1},"clientId":{"type":"integer","format":"int32","example":1},"resourceId":{"type":"integer","format":"int32","example":76}}},"PostResourceTypeResourceIdNotesRequest":{"type":"object","properties":{"note":{"type":"string","example":"a note about the client"}}},"GetResourceTypeResourceIdNotesResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"clientId":{"type":"integer","format":"int32","example":1},"noteType":{"$ref":"#/definitions/GetNotesNoteType"},"note":{"type":"string","example":"First note edited"},"createdById":{"type":"integer","format":"int32","example":1},"createdByUsername":{"type":"string","example":"mifos"},"createdOn":{"type":"string","format":"date-time","example":"1342498505000"},"updatedById":{"type":"integer","format":"int32","example":1},"updatedByUsername":{"type":"string","example":"mifos"},"updatedOn":{"type":"string","format":"date-time","example":"1342498517000"}}},"DeletePaymentTypesPaymentTypeIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":13}}},"GetPaymentTypesResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":24},"name":{"type":"string","example":"PTC"},"description":{"type":"string","example":"Cash"},"isCashPayment":{"type":"boolean","example":true},"position":{"type":"integer","format":"int32","example":0}}},"GetPaymentTypesPaymentTypeIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":13},"name":{"type":"string","example":"cash"},"description":{"type":"string","example":"cash Payment"},"isCashPayment":{"type":"boolean","example":true},"position":{"type":"integer","format":"int32","example":1}}},"PostPaymentTypesResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1}}},"PostPaymentTypesRequest":{"type":"object","properties":{"name":{"type":"string","example":"cash"},"description":{"type":"string","example":"cash payment type"},"isCashPayment":{"type":"boolean","example":true},"position":{"type":"integer","format":"int32","example":1}}},"PutPaymentTypesPaymentTypeIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":13}}},"PutPaymentTypesPaymentTypeIdRequest":{"type":"object","properties":{"name":{"type":"string","example":"mPay"},"description":{"type":"string","example":"not a cash payment type"},"isCashPayment":{"type":"boolean","example":false},"position":{"type":"integer","format":"int32","example":3}}},"PutProductsChanges":{"type":"object","properties":{"description":{"type":"string","example":"Share Product Description."},"unitPrice":{"type":"number","format":"double","example":5.0},"locale":{"type":"string","example":"en"}}},"PutProductsTypeProductIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1},"changes":{"$ref":"#/definitions/PutProductsChanges"}}},"PutProductsTypeProductIdRequest":{"type":"object","properties":{"description":{"type":"string","example":"Share Product Description."},"locale":{"type":"string","example":"en"},"unitPrice":{"type":"number","format":"double","example":5.0}}},"GetAssetType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"accountType.asset"},"value":{"type":"string","example":"ASSET"}}},"GetChargeAppliesTo":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":4},"code":{"type":"string","example":"chargeAppliesTo.shares"},"value":{"type":"string","example":"Shares"}}},"GetChargeCalculationType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"chargeCalculationType.flat"},"value":{"type":"string","example":"Flat"}}},"GetChargePaymentMode":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":0},"code":{"type":"string","example":"chargepaymentmode.regular"},"value":{"type":"string","example":"Regular"}}},"GetChargeTimeType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":13},"code":{"type":"string","example":"chargeTimeType.activation"},"value":{"type":"string","example":"Share Account Activate"}}},"GetChargesCurrency":{"type":"object","properties":{"code":{"type":"string","example":"USD"},"name":{"type":"string","example":"US Dollar"},"decimalPlaces":{"type":"integer","format":"int32","example":2},"displaySymbol":{"type":"string","example":"$"},"nameCode":{"type":"string","example":"currency.USD"},"displayLabel":{"type":"string","example":"US Dollar ($)"}}},"GetEquityType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":3},"code":{"type":"string","example":"accountType.equity"},"value":{"type":"string","example":"EQUITY"}}},"GetIncomeFromFeeAccountId":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":14},"name":{"type":"string","example":"ACCOUNT_NAME_1FJBQ"},"glCode":{"type":"string","example":"INCOME_OY1461237869836"}}},"GetIncomeType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"accountType.income"},"value":{"type":"string","example":"INCOME"}}},"GetLockPeriodTypeEnum":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":0},"value":{"type":"string","example":"Days"}}},"GetProductsAccountingMappingOptions":{"type":"object","properties":{"liabilityAccountOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetProductsLiabilityAccountOptions"}},"assetAccountOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetProductsAssetAccountOptions"}},"incomeAccountOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetProductsIncomeAccountOptions"}},"equityAccountOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetProductsEquityAccountOptions"}}}},"GetProductsAccountingMappings":{"type":"object","properties":{"shareReferenceId":{"$ref":"#/definitions/GetShareReferenceId"},"incomeFromFeeAccountId":{"$ref":"#/definitions/GetIncomeFromFeeAccountId"},"shareEquityId":{"$ref":"#/definitions/GetShareEquityId"},"shareSuspenseId":{"$ref":"#/definitions/GetShareSuspenseId"}}},"GetProductsAccountingRule":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"accountingRuleType.cash"},"value":{"type":"string","example":"CASH BASED"}}},"GetProductsAssetAccountOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"ACCOUNT_NAME_1FJBQ"},"glCode":{"type":"string","example":"ASSET_ED1461237837829"},"disabled":{"type":"boolean","example":false},"manualEntriesAllowed":{"type":"boolean","example":true},"type":{"$ref":"#/definitions/GetAssetType"},"usage":{"$ref":"#/definitions/GetProductsLiabilityUsage"},"description":{"type":"string","example":"DEFAULT_DESCRIPTION"},"nameDecorated":{"type":"string","example":"ACCOUNT_NAME_1FJBQ"},"tagId":{"$ref":"#/definitions/GetProductsTagId"}}},"GetProductsCharges":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":20},"name":{"type":"string","example":"Share Account Activation Flat"},"active":{"type":"boolean","example":true},"penalty":{"type":"boolean","example":false},"currency":{"$ref":"#/definitions/GetChargesCurrency"},"amount":{"type":"integer","format":"int32","example":1},"chargeTimeType":{"$ref":"#/definitions/GetChargeTimeType"},"chargeAppliesTo":{"$ref":"#/definitions/GetChargeAppliesTo"},"chargeCalculationType":{"$ref":"#/definitions/GetChargeCalculationType"},"chargePaymentMode":{"$ref":"#/definitions/GetChargePaymentMode"}}},"GetProductsCurrency":{"type":"object","properties":{"code":{"type":"string","example":"USD"},"name":{"type":"string","example":"US Dollar"},"decimalPlaces":{"type":"integer","format":"int32","example":2},"inMultiplesOf":{"type":"integer","format":"int32","example":100},"displaySymbol":{"type":"string","example":"$"},"nameCode":{"type":"string","example":"currency.USD"},"displayLabel":{"type":"string","example":"US Dollar ($)"}}},"GetProductsEquityAccountOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":66},"name":{"type":"string","example":"Equity Account"},"glCode":{"type":"string","example":"EQUITY1"},"disabled":{"type":"boolean","example":false},"manualEntriesAllowed":{"type":"boolean","example":true},"type":{"$ref":"#/definitions/GetEquityType"},"usage":{"$ref":"#/definitions/GetProductsLiabilityUsage"},"nameDecorated":{"type":"string","example":"Equity Account"},"tagId":{"$ref":"#/definitions/GetProductsTagId"}}},"GetProductsIncomeAccountOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"name":{"type":"string","example":"ACCOUNT_NAME_1FJBQ"},"glCode":{"type":"string","example":"INCOME_9O1461237838422"},"disabled":{"type":"boolean","example":false},"manualEntriesAllowed":{"type":"boolean","example":true},"type":{"$ref":"#/definitions/GetIncomeType"},"usage":{"$ref":"#/definitions/GetProductsLiabilityUsage"},"description":{"type":"string","example":"DEFAULT_DESCRIPTION"},"nameDecorated":{"type":"string","example":"ACCOUNT_NAME_1FJBQ"},"tagId":{"$ref":"#/definitions/GetProductsTagId"}}},"GetProductsLiabilityAccountOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":4},"name":{"type":"string","example":"ACCOUNT_NAME_1FJBQ"},"glCode":{"type":"string","example":"LIABILITY_2T1461237838897"},"disabled":{"type":"boolean","example":false},"manualEntriesAllowed":{"type":"boolean","example":true},"type":{"$ref":"#/definitions/GetProductsLiabilityType"},"usage":{"$ref":"#/definitions/GetProductsLiabilityUsage"},"description":{"type":"string","example":"DEFAULT_DESCRIPTION"},"nameDecorated":{"type":"string","example":"ACCOUNT_NAME_1FJBQ"},"tagId":{"$ref":"#/definitions/GetProductsTagId"}}},"GetProductsLiabilityType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"accountType.liability"},"value":{"type":"string","example":"LIABILITY"}}},"GetProductsLiabilityUsage":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"accountUsage.detail"},"value":{"type":"string","example":"DETAIL"}}},"GetProductsMarketPrice":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":4},"fromDate":{"type":"string","example":"Feb 1, 2016"},"shareValue":{"type":"integer","format":"int32","example":1}}},"GetProductsMinimumActivePeriodFrequencyTypeOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":0},"code":{"type":"string","example":"savings.lockin.sharePeriodFrequencyType.days"},"value":{"type":"string","example":"Days"}}},"GetProductsTagId":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":0},"isActive":{"type":"boolean","example":false}}},"GetProductsTypeProductIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"Share Product"},"shortName":{"type":"string","example":"SP"},"description":{"type":"string","example":"SP"},"currency":{"$ref":"#/definitions/GetProductsCurrency"},"totalShares":{"type":"integer","format":"int32","example":100},"totalSharesIssued":{"type":"integer","format":"int32","example":50},"unitPrice":{"type":"integer","format":"int32","example":1},"shareCapital":{"type":"integer","format":"int32","example":50},"minimumShares":{"type":"integer","format":"int32","example":1},"nominalShares":{"type":"integer","format":"int32","example":10},"maximumShares":{"type":"integer","format":"int32","example":50},"marketPrice":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetProductsMarketPrice"}},"charges":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetProductsCharges"}},"allowDividendCalculationForInactiveClients":{"type":"boolean","example":true},"lockinPeriod":{"type":"integer","format":"int32","example":1},"lockPeriodTypeEnum":{"$ref":"#/definitions/GetLockPeriodTypeEnum"},"minimumActivePeriod":{"type":"integer","format":"int32","example":1},"minimumActivePeriodForDividendsTypeEnum":{"$ref":"#/definitions/GetLockPeriodTypeEnum"},"accountingRule":{"$ref":"#/definitions/GetProductsAccountingRule"},"accountingMappings":{"$ref":"#/definitions/GetProductsAccountingMappings"},"currencyOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetChargesCurrency"}},"chargeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetProductsCharges"}},"minimumActivePeriodFrequencyTypeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetProductsMinimumActivePeriodFrequencyTypeOptions"}},"lockinPeriodFrequencyTypeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetProductsMinimumActivePeriodFrequencyTypeOptions"}},"accountingMappingOptions":{"$ref":"#/definitions/GetProductsAccountingMappingOptions"}}},"GetShareEquityId":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":66},"name":{"type":"string","example":"Equity Account"},"glCode":{"type":"string","example":"EQUITY1"}}},"GetShareReferenceId":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"ACCOUNT_NAME_1FJBQ"},"glCode":{"type":"string","example":"ASSET_ED1461237837829"}}},"GetShareSuspenseId":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":8},"name":{"type":"string","example":"ACCOUNT_NAME_1FJBQ"},"glCode":{"type":"string","example":"LIABILITY_MA1461237860198"}}},"GetProductsPageItems":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"Share Product"},"shortName":{"type":"string","example":"Share Product Description"},"totalShares":{"type":"integer","format":"int32","example":100}}},"GetProductsTypeResponse":{"type":"object","properties":{"totalFilteredRecords":{"type":"integer","format":"int32","example":1},"pageItems":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetProductsPageItems"}}}},"PostProductsTypeResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1}}},"PostProductsChargesSelected":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":20}}},"PostProductsMarketPricePeriods":{"type":"object","properties":{"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"fromDate":{"type":"string","example":"04 May 2016"},"shareValue":{"type":"integer","format":"int32","example":2}}},"PostProductsTypeRequest":{"type":"object","properties":{"name":{"type":"string","example":"Share Product"},"shortName":{"type":"string","example":"SP"},"description":{"type":"string","example":"Description"},"currencyCode":{"type":"string","example":"USD"},"digitsAfterDecimal":{"type":"integer","format":"int32","example":2},"inMultiplesOf":{"type":"integer","format":"int32","example":1},"locale":{"type":"string","example":"en"},"totalShares":{"type":"integer","format":"int32","example":1000},"sharesIssued":{"type":"integer","format":"int32","example":1000},"unitPrice":{"type":"integer","format":"int32","example":1},"minimumShares":{"type":"integer","format":"int32","example":10},"nominalShares":{"type":"integer","format":"int32","example":20},"maximumShares":{"type":"integer","format":"int32","example":30},"minimumActivePeriodForDividends":{"type":"integer","format":"int32","example":1},"minimumactiveperiodFrequencyType":{"type":"integer","format":"int32","example":0},"lockinPeriodFrequency":{"type":"integer","format":"int32","example":1},"lockinPeriodFrequencyType":{"type":"integer","format":"int32","example":1},"allowDividendCalculationForInactiveClients":{"type":"boolean","example":true},"marketPricePeriods":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/PostProductsMarketPricePeriods"}},"chargesSelected":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/PostProductsChargesSelected"}},"accountingRule":{"type":"integer","format":"int32","example":1}}},"GetFixedDepositAccountsAccountChart":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":4},"fromDate":{"type":"string","format":"date","example":"[2013, 10, 2]"},"accountId":{"type":"integer","format":"int32","example":5},"accountNumber":{"type":"integer","format":"int64","example":"FD000023"},"chartSlabs":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetFixedDepositAccountsChartSlabs"}},"periodTypes":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetFixedDepositAccountsPeriodTypes"}}}},"GetFixedDepositAccountsAccountChartCurrency":{"type":"object","properties":{"code":{"type":"string","example":"USD"},"name":{"type":"string","example":"US Dollar"},"decimalPlaces":{"type":"integer","format":"int32","example":2},"displaySymbol":{"type":"string","example":"$"},"nameCode":{"type":"string","example":"currency.USD"},"displayLabel":{"type":"string","example":"US Dollar ($)"}}},"GetFixedDepositAccountsAccountIdCurrency":{"type":"object","properties":{"code":{"type":"string","example":"USD"},"name":{"type":"string","example":"US Dollar"},"decimalPlaces":{"type":"integer","format":"int32","example":2},"inMultiplesOf":{"type":"integer","format":"int32","example":1},"displaySymbol":{"type":"string","example":"$"},"nameCode":{"type":"string","example":"currency.USD"},"displayLabel":{"type":"string","example":"US Dollar ($)"}}},"GetFixedDepositAccountsAccountIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"accountNo":{"type":"integer","format":"int64","example":"FD000023"},"externalId":{"type":"string","example":"FD-23"},"clientId":{"type":"integer","format":"int32","example":1},"clientName":{"type":"string","example":"Sangamesh N"},"savingsProductId":{"type":"integer","format":"int32","example":3},"savingsProductName":{"type":"string","example":"FD01"},"fieldOfficerId":{"type":"integer","format":"int32","example":0},"status":{"$ref":"#/definitions/GetFixedDepositAccountsStatus"},"timeline":{"$ref":"#/definitions/GetFixedDepositAccountsTimeline"},"currency":{"$ref":"#/definitions/GetFixedDepositAccountsAccountIdCurrency"},"interestCompoundingPeriodType":{"$ref":"#/definitions/GetFixedDepositAccountsInterestCompoundingPeriodType"},"interestPostingPeriodType":{"$ref":"#/definitions/GetFixedDepositAccountsInterestPostingPeriodType"},"interestCalculationType":{"$ref":"#/definitions/GetFixedDepositAccountsInterestCalculationType"},"interestCalculationDaysInYearType":{"$ref":"#/definitions/GetFixedDepositAccountsInterestCalculationDaysInYearType"},"interestFreePeriodApplicable":{"type":"boolean","example":false},"preClosurePenalApplicable":{"type":"boolean","example":false},"minDepositTerm":{"type":"integer","format":"int32","example":3},"maxDepositTerm":{"type":"integer","format":"int32","example":4},"minDepositTermType":{"$ref":"#/definitions/GetFixedDepositAccountsMinDepositTermType"},"maxDepositTermType":{"$ref":"#/definitions/GetFixedDepositAccountsMaxDepositTermType"},"depositAmount":{"type":"number","format":"float","example":5000.0},"maturityAmount":{"type":"number","format":"float","example":5140.25},"maturityDate":{"type":"string","format":"date","example":"[2014, 9, 1]"},"depositPeriod":{"type":"integer","format":"int32","example":6},"depositPeriodFrequency":{"$ref":"#/definitions/GetFixedDepositAccountsDepositPeriodFrequency"},"summary":{"$ref":"#/definitions/GetFixedDepositAccountsAccountIdSummary"},"accountChart":{"$ref":"#/definitions/GetFixedDepositAccountsAccountChart"}}},"GetFixedDepositAccountsAccountIdSummary":{"type":"object","properties":{"currency":{"$ref":"#/definitions/GetFixedDepositAccountsAccountIdCurrency"},"accountBalance":{"type":"number","format":"float","example":0.0}}},"GetFixedDepositAccountsChartSlabs":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":13},"periodType":{"$ref":"#/definitions/GetFixedDepositAccountsPeriodType"},"fromPeriod":{"type":"integer","format":"int32","example":181},"toPeriod":{"type":"integer","format":"int32","example":365},"annualInterestRate":{"type":"number","format":"double","example":5.5},"currency":{"$ref":"#/definitions/GetFixedDepositAccountsAccountChartCurrency"}}},"GetFixedDepositAccountsDepositPeriodFrequency":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"deposit.period.savingsPeriodFrequencyType.months"},"value":{"type":"string","example":"Months"}}},"GetFixedDepositAccountsInterestCalculationDaysInYearType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":365},"code":{"type":"string","example":"savingsInterestCalculationDaysInYearType.days365"},"value":{"type":"string","example":"365 Days"}}},"GetFixedDepositAccountsInterestCalculationType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"savingsInterestCalculationType.dailybalance"},"value":{"type":"string","example":"Daily Balance"}}},"GetFixedDepositAccountsInterestCompoundingPeriodType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":4},"code":{"type":"string","example":"savings.interest.period.savingsCompoundingInterestPeriodType.monthly"},"value":{"type":"string","example":"Monthly"}}},"GetFixedDepositAccountsInterestPostingPeriodType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":4},"code":{"type":"string","example":"savings.interest.posting.period.savingsPostingInterestPeriodType.monthly"},"value":{"type":"string","example":"Monthly"}}},"GetFixedDepositAccountsMaxDepositTermType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":3},"code":{"type":"string","example":"deposit.term.savingsPeriodFrequencyType.years"},"value":{"type":"string","example":"Years"}}},"GetFixedDepositAccountsMinDepositTermType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"deposit.term.savingsPeriodFrequencyType.months"},"value":{"type":"string","example":"Months"}}},"GetFixedDepositAccountsPeriodType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":0},"code":{"type":"string","example":"interestChartPeriodType.days"},"value":{"type":"string","example":"Days"}}},"GetFixedDepositAccountsPeriodTypes":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":0},"code":{"type":"string","example":"interestChartPeriodType.days"},"value":{"type":"string","example":"Days"}}},"GetFixedDepositAccountsStatus":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":100},"code":{"type":"string","example":"savingsAccountStatusType.submitted.and.pending.approval"},"value":{"type":"string","example":"Submitted and pending approval"},"submittedAndPendingApproval":{"type":"boolean","example":true},"approved":{"type":"boolean","example":false},"rejected":{"type":"boolean","example":false},"withdrawnByApplicant":{"type":"boolean","example":false},"active":{"type":"boolean","example":false},"closed":{"type":"boolean","example":false},"prematureClosed":{"type":"boolean","example":false},"transferInProgress":{"type":"boolean","example":false},"transferOnHold":{"type":"boolean","example":false}}},"GetFixedDepositAccountsTimeline":{"type":"object","properties":{"submittedOnDate":{"type":"string","format":"date","example":"[2014, 3, 1]"},"submittedByUsername":{"type":"string","example":"mifos"},"submittedByFirstname":{"type":"string","example":"App"},"submittedByLastname":{"type":"string","example":"Administrator"}}},"PostFixedDepositAccountsAccountIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":1},"clientId":{"type":"integer","format":"int32","example":1},"savingsId":{"type":"integer","format":"int32","example":1},"resourceId":{"type":"integer","format":"int32","example":1}}},"PostFixedDepositAccountsAccountIdRequest":{"type":"object"},"PostFixedDepositAccountsResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":2},"clientId":{"type":"integer","format":"int32","example":1},"savingsId":{"type":"integer","format":"int32","example":1},"resourceId":{"type":"integer","format":"int32","example":1}}},"PostFixedDepositAccountsRequest":{"type":"object","properties":{"clientId":{"type":"integer","format":"int32","example":1},"productId":{"type":"integer","format":"int32","example":1},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"submittedOnDate":{"type":"string","example":"01 March 2014"},"depositAmount":{"type":"number","format":"float","example":5000.0},"depositPeriod":{"type":"integer","format":"int32","example":6},"depositPeriodFrequencyId":{"type":"integer","format":"int32","example":2}}},"GetFixedDepositAccountsProductOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"Passbook Savings"}}},"GetFixedDepositAccountsTemplateResponse":{"type":"object","properties":{"clientId":{"type":"integer","format":"int32","example":1},"clientName":{"type":"string","example":"small business"},"productOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetFixedDepositAccountsProductOptions"}}}},"GetFixedDepositAccountsCurrency":{"type":"object","properties":{"code":{"type":"string","example":"USD"},"name":{"type":"string","example":"US Dollar"},"decimalPlaces":{"type":"integer","format":"int32","example":2},"inMultiplesOf":{"type":"integer","format":"int32","example":1},"displaySymbol":{"type":"string","example":"$"},"nameCode":{"type":"string","example":"currency.USD"},"displayLabel":{"type":"string","example":"US Dollar ($)"}}},"GetFixedDepositAccountsResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"accountNo":{"type":"integer","format":"int64","example":1},"clientId":{"type":"integer","format":"int32","example":1},"clientName":{"type":"string","example":"Sangamesh N"},"savingsProductId":{"type":"integer","format":"int32","example":3},"savingsProductName":{"type":"string","example":"FD01"},"fieldOfficerId":{"type":"integer","format":"int32","example":0},"status":{"$ref":"#/definitions/GetFixedDepositAccountsStatus"},"timeline":{"$ref":"#/definitions/GetFixedDepositAccountsTimeline"},"currency":{"$ref":"#/definitions/GetFixedDepositAccountsCurrency"},"interestCompoundingPeriodType":{"$ref":"#/definitions/GetFixedDepositAccountsInterestCompoundingPeriodType"},"interestPostingPeriodType":{"$ref":"#/definitions/GetFixedDepositAccountsInterestPostingPeriodType"},"interestCalculationType":{"$ref":"#/definitions/GetFixedDepositAccountsInterestCalculationType"},"interestCalculationDaysInYearType":{"$ref":"#/definitions/GetFixedDepositAccountsInterestCalculationDaysInYearType"},"summary":{"$ref":"#/definitions/GetFixedDepositAccountsSummary"},"interestFreePeriodApplicable":{"type":"boolean","example":false},"preClosurePenalApplicable":{"type":"boolean","example":false},"minDepositTerm":{"type":"integer","format":"int32","example":3},"maxDepositTerm":{"type":"integer","format":"int32","example":4},"minDepositTermType":{"$ref":"#/definitions/GetFixedDepositAccountsMinDepositTermType"},"maxDepositTermType":{"$ref":"#/definitions/GetFixedDepositAccountsMaxDepositTermType"},"depositAmount":{"type":"number","format":"float","example":5000.0},"maturityAmount":{"type":"number","format":"float","example":5140.25},"maturityDate":{"type":"string","format":"date","example":"[2014, 9, 1]"},"depositPeriod":{"type":"integer","format":"int32","example":6},"depositPeriodFrequency":{"$ref":"#/definitions/GetFixedDepositAccountsDepositPeriodFrequency"}}},"GetFixedDepositAccountsSummary":{"type":"object","properties":{"currency":{"$ref":"#/definitions/GetFixedDepositAccountsCurrency"},"accountBalance":{"type":"number","format":"float","example":0.0}}},"PutFixedDepositAccountsAccountIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":2},"clientId":{"type":"integer","format":"int32","example":1},"savingsId":{"type":"integer","format":"int32","example":1},"resourceId":{"type":"integer","format":"int32","example":1},"changes":{"$ref":"#/definitions/PutFixedDepositAccountsChanges"}}},"PutFixedDepositAccountsChanges":{"type":"object","properties":{"depositAmount":{"type":"number","format":"float","example":6000.0},"locale":{"type":"string","example":"en"}}},"PutFixedDepositAccountsAccountIdRequest":{"type":"object","properties":{"locale":{"type":"string","example":"en"},"depositAmount":{"type":"number","format":"float","example":6000.0}}},"DeleteFixedDepositAccountsAccountIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":1},"clientId":{"type":"integer","format":"int32","example":1},"resourceId":{"type":"integer","format":"int32","example":1}}},"GetFixedDepositProductsInterestCalculationDaysInYearType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":365},"code":{"type":"string","example":"savingsInterestCalculationDaysInYearType.days365"},"value":{"type":"string","example":"365 Days"}}},"GetFixedDepositProductsInterestCalculationType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"savingsInterestCalculationType.dailybalance"},"value":{"type":"string","example":"Daily Balance"}}},"GetFixedDepositProductsInterestPostingPeriodType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":4},"code":{"type":"string","example":"savings.interest.posting.period.savingsPostingInterestPeriodType.monthly"},"value":{"type":"string","example":"Monthly"}}},"GetFixedDepositProductsProductIdAccountingMappings":{"type":"object","properties":{"savingsReferenceAccount":{"$ref":"#/definitions/GetFixedDepositProductsProductIdSavingsReferenceAccount"},"incomeFromFeeAccount":{"$ref":"#/definitions/GetFixedDepositProductsProductIdIncomeFromFeeAccount"},"incomeFromPenaltyAccount":{"$ref":"#/definitions/GetFixedDepositProductsProductIdIncomeFromPenaltyAccount"},"interestOnSavingsAccount":{"$ref":"#/definitions/GetFixedDepositProductsProductIdInterestOnSavingsAccount"},"savingsControlAccount":{"$ref":"#/definitions/GetFixedDepositProductsProductIdSavingsControlAccount"},"transfersInSuspenseAccount":{"$ref":"#/definitions/GetFixedDepositProductsProductIdTransfersInSuspenseAccount"}}},"GetFixedDepositProductsProductIdActiveChart":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":8},"fromDate":{"type":"string","format":"date","example":"[2014, 1, 1]"},"savingsProductId":{"type":"integer","format":"int32","example":8},"savingsProductName":{"type":"string","example":"Fixed deposit product"},"chartSlabs":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetFixedDepositProductsProductIdChartSlabs"}},"periodTypes":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetFixedDepositProductsProductIdPeriodType"}}}},"GetFixedDepositProductsProductIdChartSlabs":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":18},"description":{"type":"string","example":"from 0 to 90 days"},"periodType":{"$ref":"#/definitions/GetFixedDepositProductsProductIdPeriodType"},"fromPeriod":{"type":"integer","format":"int32","example":0},"toPeriod":{"type":"integer","format":"int32","example":90},"annualInterestRate":{"type":"number","format":"double","example":4.5},"currency":{"$ref":"#/definitions/GetFixedDepositProductsProductIdCurrency"}}},"GetFixedDepositProductsProductIdCurrency":{"type":"object","properties":{"code":{"type":"string","example":"USD"},"name":{"type":"string","example":"US Dollar"},"decimalPlaces":{"type":"integer","format":"int32","example":2},"displaySymbol":{"type":"string","example":"$"},"nameCode":{"type":"string","example":"currency.USD"},"displayLabel":{"type":"string","example":"US Dollar ($)"}}},"GetFixedDepositProductsProductIdFeeToIncomeAccountMappings":{"type":"object","properties":{"charge":{"$ref":"#/definitions/GetFixedDepositProductsProductIdFeeToIncomeAccountMappingsCharge"},"incomeAccount":{"$ref":"#/definitions/GetFixedDepositProductsProductIdFeeToIncomeAccountMappingsIncomeAccount"}}},"GetFixedDepositProductsProductIdFeeToIncomeAccountMappingsCharge":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":11},"name":{"type":"string","example":"sav charge"},"active":{"type":"boolean","example":false},"penalty":{"type":"boolean","example":false}}},"GetFixedDepositProductsProductIdFeeToIncomeAccountMappingsIncomeAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":16},"name":{"type":"string","example":"income from savings fee"},"glCode":{"type":"integer","format":"int32","example":24}}},"GetFixedDepositProductsProductIdIncomeFromFeeAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":16},"name":{"type":"string","example":"income from savings fee"},"glCode":{"type":"integer","format":"int32","example":24}}},"GetFixedDepositProductsProductIdIncomeFromPenaltyAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":17},"name":{"type":"string","example":"income from sav penalties"},"glCode":{"type":"integer","format":"int32","example":25}}},"GetFixedDepositProductsProductIdInterestCompoundingPeriodType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"savings.interest.period.savingsCompoundingInterestPeriodType.daily"},"value":{"type":"string","example":"Daily"}}},"GetFixedDepositProductsProductIdInterestOnSavingsAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":15},"name":{"type":"string","example":"interest on savings"},"glCode":{"type":"integer","format":"int32","example":23}}},"GetFixedDepositProductsProductIdMaxDepositTermType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":3},"code":{"type":"string","example":"deposit.term.savingsPeriodFrequencyType.years"},"value":{"type":"string","example":"Years"}}},"GetFixedDepositProductsProductIdMinDepositTermType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"deposit.term.savingsPeriodFrequencyType.weeks"},"value":{"type":"string","example":"Weeks"}}},"GetFixedDepositProductsProductIdPenaltyToIncomeAccountMappings":{"type":"object","properties":{"charge":{"$ref":"#/definitions/GetFixedDepositProductsProductIdPenaltyToIncomeAccountMappingsCharge"},"incomeAccount":{"$ref":"#/definitions/GetFixedDepositProductsProductIdIncomeFromPenaltyAccount"}}},"GetFixedDepositProductsProductIdPenaltyToIncomeAccountMappingsCharge":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12},"name":{"type":"string","example":"sav 2"},"active":{"type":"boolean","example":false},"penalty":{"type":"boolean","example":true}}},"GetFixedDepositProductsProductIdPeriodType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"interestChartPeriodType.weeks"},"value":{"type":"string","example":"Weeks"}}},"GetFixedDepositProductsProductIdPreClosurePenalInterestOnType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"preClosurePenalInterestOnType.wholeTerm"},"value":{"type":"string","example":"Whole term"}}},"GetFixedDepositProductsProductIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"Fixed deposit product"},"shortName":{"type":"string","example":"FD01"},"description":{"type":"string","example":"Daily compounding using Daily Balance, 5% per year, 365 days in year"},"currency":{"$ref":"#/definitions/GetFixedDepositProductsProductIdCurrency"},"interestCompoundingPeriodType":{"$ref":"#/definitions/GetFixedDepositProductsProductIdInterestCompoundingPeriodType"},"interestPostingPeriodType":{"$ref":"#/definitions/GetFixedDepositProductsInterestPostingPeriodType"},"interestCalculationType":{"$ref":"#/definitions/GetFixedDepositProductsInterestCalculationType"},"interestCalculationDaysInYearType":{"$ref":"#/definitions/GetFixedDepositProductsInterestCalculationDaysInYearType"},"accountingMappings":{"$ref":"#/definitions/GetFixedDepositProductsProductIdAccountingMappings"},"feeToIncomeAccountMappings":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetFixedDepositProductsProductIdFeeToIncomeAccountMappings"}},"penaltyToIncomeAccountMappings":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetFixedDepositProductsProductIdPenaltyToIncomeAccountMappings"}},"preClosurePenalApplicable":{"type":"boolean","example":true},"preClosurePenalInterest":{"type":"number","format":"double","example":1.75},"preClosurePenalInterestOnType":{"$ref":"#/definitions/GetFixedDepositProductsProductIdPreClosurePenalInterestOnType"},"minDepositTerm":{"type":"integer","format":"int32","example":1},"minDepositTermType":{"$ref":"#/definitions/GetFixedDepositProductsProductIdMinDepositTermType"},"maxDepositTerm":{"type":"integer","format":"int32","example":5},"maxDepositTermType":{"$ref":"#/definitions/GetFixedDepositProductsProductIdMaxDepositTermType"},"activeChart":{"$ref":"#/definitions/GetFixedDepositProductsProductIdActiveChart"}}},"GetFixedDepositProductsProductIdSavingsControlAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":13},"name":{"type":"string","example":"savings ref tool kit"},"glCode":{"type":"integer","format":"int32","example":21}}},"GetFixedDepositProductsProductIdSavingsReferenceAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12},"name":{"type":"string","example":"savings ref"},"glCode":{"type":"integer","format":"int32","example":20}}},"GetFixedDepositProductsProductIdTransfersInSuspenseAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":14},"name":{"type":"string","example":"saving transfers"},"glCode":{"type":"integer","format":"int32","example":22}}},"GetFixedDepositProductsAccountingRule":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"accountingRuleType.none"},"value":{"type":"string","example":"NONE"}}},"GetFixedDepositProductsCurrency":{"type":"object","properties":{"code":{"type":"string","example":"USD"},"name":{"type":"string","example":"US Dollar"},"decimalPlaces":{"type":"integer","format":"int32","example":2},"inMultiplesOf":{"type":"integer","format":"int32","example":1},"displaySymbol":{"type":"string","example":"$"},"nameCode":{"type":"string","example":"currency.USD"},"displayLabel":{"type":"string","example":"US Dollar ($)"}}},"GetFixedDepositProductsInterestCompoundingPeriodType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":4},"code":{"type":"string","example":"savings.interest.period.savingsCompoundingInterestPeriodType.monthly"},"value":{"type":"string","example":"Monthly"}}},"GetFixedDepositProductsMaxDepositTermType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":3},"code":{"type":"string","example":"deposit.term.savingsPeriodFrequencyType.years"},"value":{"type":"string","example":"Years"}}},"GetFixedDepositProductsMinDepositTermType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"deposit.term.savingsPeriodFrequencyType.months"},"value":{"type":"string","example":"Months"}}},"GetFixedDepositProductsResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":3},"name":{"type":"string","example":"FD01"},"shortName":{"type":"string","example":"FD01"},"description":{"type":"string","example":"FD01"},"currency":{"$ref":"#/definitions/GetFixedDepositProductsCurrency"},"preClosurePenalApplicable":{"type":"boolean","example":false},"minDepositTerm":{"type":"integer","format":"int32","example":3},"maxDepositTerm":{"type":"integer","format":"int32","example":4},"minDepositTermType":{"$ref":"#/definitions/GetFixedDepositProductsMinDepositTermType"},"maxDepositTermType":{"$ref":"#/definitions/GetFixedDepositProductsMaxDepositTermType"},"nominalAnnualInterestRate":{"type":"number","format":"double","example":0.0},"interestCompoundingPeriodType":{"$ref":"#/definitions/GetFixedDepositProductsInterestCompoundingPeriodType"},"interestPostingPeriodType":{"$ref":"#/definitions/GetFixedDepositProductsInterestPostingPeriodType"},"interestCalculationType":{"$ref":"#/definitions/GetFixedDepositProductsInterestCalculationType"},"interestCalculationDaysInYearType":{"$ref":"#/definitions/GetFixedDepositProductsInterestCalculationDaysInYearType"},"accountingRule":{"$ref":"#/definitions/GetFixedDepositProductsAccountingRule"}}},"PutFixedDepositProductsChanges":{"type":"object","properties":{"description":{"type":"string","example":"Fixed deposit product new offerings"},"minDepositTerm":{"type":"integer","format":"int32","example":5}}},"PutFixedDepositProductsProductIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1},"changes":{"$ref":"#/definitions/PutFixedDepositProductsChanges"}}},"PutFixedDepositProductsProductIdRequest":{"type":"object","properties":{"description":{"type":"string","example":"Fixed deposit product new offerings"},"locale":{"type":"string","example":"en"},"minDepositTerm":{"type":"integer","format":"int32","example":5},"minDepositTermTypeId":{"type":"integer","format":"int32","example":1}}},"DeleteFixedDepositProductsProductIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1}}},"PostFixedDepositProductsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1}}},"PostFixedDepositProductsChartSlabs":{"type":"object","properties":{"description":{"type":"string","example":"from 0 to 90 days"},"periodType":{"type":"integer","format":"int32","example":1},"fromPeriod":{"type":"integer","format":"int32","example":0},"toPeriod":{"type":"integer","format":"int32","example":90},"annualInterestRate":{"type":"number","format":"double","example":4.5}}},"PostFixedDepositProductsCharts":{"type":"object","properties":{"fromDate":{"type":"string","example":"01 Jan 2014"},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"chartSlabs":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/PostFixedDepositProductsChartSlabs"}}}},"PostFixedDepositProductsRequest":{"type":"object","properties":{"name":{"type":"string","example":"Fixed deposit product"},"shortName":{"type":"string","example":"FD01"},"description":{"type":"string","example":"Daily compounding using Daily Balance, 5% per year, 365 days in year"},"currencyCode":{"type":"string","example":"USD"},"digitsAfterDecimal":{"type":"integer","format":"int32","example":2},"inMultiplesOf":{"type":"integer","format":"int32","example":0},"locale":{"type":"string","example":"en"},"interestCompoundingPeriodType":{"type":"integer","format":"int32","example":1},"interestPostingPeriodType":{"type":"integer","format":"int32","example":4},"interestCalculationType":{"type":"integer","format":"int32","example":1},"interestCalculationDaysInYearType":{"type":"integer","format":"int32","example":365},"accountingRule":{"type":"integer","format":"int32","example":1},"preClosurePenalApplicable":{"type":"boolean","example":true},"preClosurePenalInterest":{"type":"number","format":"double","example":1.75},"preClosurePenalInterestOnTypeId":{"type":"integer","format":"int32","example":1},"minDepositTerm":{"type":"integer","format":"int32","example":1},"minDepositTermTypeId":{"type":"integer","format":"int32","example":1},"maxDepositTerm":{"type":"integer","format":"int32","example":5},"maxDepositTermTypeId":{"type":"integer","format":"int32","example":3},"charts":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/PostFixedDepositProductsCharts"}}}},"GetRecurringDepositAccountsRecurringDepositAccountIdTransactionsTransactionIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"transactionType":{"$ref":"#/definitions/GetRecurringTransactionsTransactionType"},"accountId":{"type":"integer","format":"int32","example":1},"accountNo":{"type":"string","example":"000000001"},"date":{"type":"string","format":"date","example":"[2013, 8, 7]"},"currency":{"$ref":"#/definitions/GetRecurringTransactionsCurrency"},"paymentDetailData":{"$ref":"#/definitions/GetRecurringPaymentDetailData"},"amount":{"type":"number","format":"float","example":5000.0},"runningBalance":{"type":"integer","format":"int32","example":0},"reversed":{"type":"boolean","example":true}}},"GetRecurringPaymentDetailData":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":62},"paymentType":{"$ref":"#/definitions/GetRecurringPaymentType"},"accountNumber":{"type":"integer","format":"int32"},"checkNumber":{"type":"integer","format":"int32"},"routingCode":{"type":"integer","format":"int32"},"receiptNumber":{"type":"integer","format":"int32"},"bankNumber":{"type":"integer","format":"int32"}}},"GetRecurringPaymentType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":11},"name":{"type":"string","example":"cash"}}},"GetRecurringTransactionsCurrency":{"type":"object","properties":{"code":{"type":"string","example":"USD"},"name":{"type":"string","example":"US Dollar"},"decimalPlaces":{"type":"integer","format":"int32","example":2},"inMultiplesOf":{"type":"integer","format":"int32","example":0},"displaySymbol":{"type":"string","example":"$"},"nameCode":{"type":"string","example":"currency.USD"},"displayLabel":{"type":"string","example":"US Dollar ($)"}}},"GetRecurringTransactionsTransactionType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"savingsAccountTransactionType.withdrawal"},"value":{"type":"string","example":"Withdrawal"},"deposit":{"type":"boolean","example":false},"withdrawal":{"type":"boolean","example":true},"interestPosting":{"type":"boolean","example":false},"feeDeduction":{"type":"boolean","example":false}}},"GetRecurringCurrency":{"type":"object","properties":{"code":{"type":"string","example":"USD"},"name":{"type":"string","example":"US Dollar"},"decimalPlaces":{"type":"integer","format":"int32","example":4},"inMultiplesOf":{"type":"integer","format":"int32","example":100},"displaySymbol":{"type":"string","example":"$"},"nameCode":{"type":"string","example":"currency.USD"},"displayLabel":{"type":"string","example":"US Dollar ($)"}}},"GetRecurringDepositAccountsRecurringDepositAccountIdTransactionsTemplateResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"transactionType":{"$ref":"#/definitions/GetRecurringTransactionType"},"accountId":{"type":"integer","format":"int32","example":1},"accountNo":{"type":"string","example":"000000001"},"date":{"type":"string","format":"date","example":"[2014, 6, 25]"},"currency":{"$ref":"#/definitions/GetRecurringCurrency"},"amount":{"type":"number","example":100000.0},"reversed":{"type":"boolean","example":false},"paymentTypeOptions":{"type":"array","example":"[]","items":{"type":"integer","format":"int32"}}}},"GetRecurringTransactionType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"savingsAccountTransactionType.deposit"},"value":{"type":"string","example":"Deposit"},"deposit":{"type":"boolean","example":true},"withdrawal":{"type":"boolean","example":false},"interestPosting":{"type":"boolean","example":false},"feeDeduction":{"type":"boolean","example":false},"initiateTransfer":{"type":"boolean","example":false},"approveTransfer":{"type":"boolean","example":false},"withdrawTransfer":{"type":"boolean","example":false},"rejectTransfer":{"type":"boolean","example":false},"overdraftInterest":{"type":"boolean","example":false},"writtenoff":{"type":"boolean","example":false},"overdraftFee":{"type":"boolean","example":true}}},"PostRecurringChanges":{"type":"object","properties":{"accountNumber":{"type":"string","example":"acc123"},"checkNumber":{"type":"string","example":"che123"},"routingCode":{"type":"string","example":"rou123"},"receiptNumber":{"type":"string","example":"rec123"},"bankNumber":{"type":"string","example":"ban123"}}},"PostRecurringDepositAccountsRecurringDepositAccountIdTransactionsTransactionIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":1},"clientId":{"type":"integer","format":"int32","example":2},"savingsId":{"type":"integer","format":"int32","example":1},"resourceId":{"type":"integer","format":"int32","example":48},"changes":{"$ref":"#/definitions/PostRecurringChanges"}}},"PostRecurringDepositAccountsRecurringDepositAccountIdTransactionsRequest":{"type":"object","properties":{"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"transactionDate":{"type":"string","example":"27 May 2013"},"transactionAmount":{"type":"number","format":"double","example":500.0},"paymentTypeId":{"type":"integer","format":"int32","example":14},"accountNumber":{"type":"string","example":"acc123"},"checkNumber":{"type":"string","example":"che123"},"routingCode":{"type":"string","example":"rou123"},"receiptNumber":{"type":"string","example":"rec123"},"bankNumber":{"type":"string","example":"ban123"}}},"PostRecurringDepositAccountsRecurringDepositAccountIdTransactionsResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":1},"clientId":{"type":"integer","format":"int32","example":2},"savingsId":{"type":"integer","format":"int32","example":1},"resourceId":{"type":"integer","format":"int32","example":47},"changes":{"$ref":"#/definitions/PostRecurringChanges"}}},"GetRecurringDepositAccountsAccountChart":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":4},"fromDate":{"type":"string","format":"date","example":"[2013, 10, 2]"},"accountId":{"type":"integer","format":"int32","example":5},"accountNumber":{"type":"integer","format":"int64","example":"RD000023"},"chartSlabs":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetRecurringDepositAccountsChartSlabs"}},"periodTypes":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetRecurringDepositAccountsPeriodTypes"}}}},"GetRecurringDepositAccountsAccountChartCurrency":{"type":"object","properties":{"code":{"type":"string","example":"USD"},"name":{"type":"string","example":"US Dollar"},"decimalPlaces":{"type":"integer","format":"int32","example":2},"displaySymbol":{"type":"string","example":"$"},"nameCode":{"type":"string","example":"currency.USD"},"displayLabel":{"type":"string","example":"US Dollar ($)"}}},"GetRecurringDepositAccountsAccountIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"accountNo":{"type":"integer","format":"int64","example":"RD000023"},"externalId":{"type":"string","example":"RD-23"},"clientId":{"type":"integer","format":"int32","example":1},"clientName":{"type":"string","example":"Sangamesh N"},"savingsProductId":{"type":"integer","format":"int32","example":3},"savingsProductName":{"type":"string","example":"RD01"},"fieldOfficerId":{"type":"integer","format":"int32","example":0},"status":{"$ref":"#/definitions/GetRecurringDepositAccountsStatus"},"timeline":{"$ref":"#/definitions/GetRecurringDepositAccountsTimeline"},"currency":{"$ref":"#/definitions/GetRecurringDepositAccountsCurrency"},"interestCompoundingPeriodType":{"$ref":"#/definitions/GetRecurringDepositAccountsInterestCompoundingPeriodType"},"interestPostingPeriodType":{"$ref":"#/definitions/GetRecurringDepositAccountsInterestPostingPeriodType"},"interestCalculationType":{"$ref":"#/definitions/GetRecurringDepositAccountsInterestCalculationType"},"interestCalculationDaysInYearType":{"$ref":"#/definitions/GetRecurringDepositAccountsInterestCalculationDaysInYearType"},"preClosurePenalApplicable":{"type":"boolean","example":false},"minDepositTerm":{"type":"integer","format":"int32","example":3},"maxDepositTerm":{"type":"integer","format":"int32","example":4},"minDepositTermType":{"$ref":"#/definitions/GetRecurringDepositAccountsMinDepositTermType"},"maxDepositTermType":{"$ref":"#/definitions/GetRecurringDepositAccountsMaxDepositTermType"},"recurringDepositAmount":{"type":"integer","format":"int32","example":100},"recurringDepositFrequency":{"type":"integer","format":"int32","example":1},"expectedFirstDepositOnDate":{"type":"string","format":"date","example":"[2014, 4, 2]"},"recurringDepositFrequencyType":{"$ref":"#/definitions/GetRecurringDepositAccountsRecurringDepositFrequencyType"},"depositPeriod":{"type":"integer","format":"int32","example":6},"depositPeriodFrequency":{"$ref":"#/definitions/GetRecurringDepositAccountsDepositPeriodFrequency"},"summary":{"$ref":"#/definitions/GetRecurringDepositAccountsSummary"},"accountChart":{"$ref":"#/definitions/GetRecurringDepositAccountsAccountChart"}}},"GetRecurringDepositAccountsChartSlabs":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":13},"periodType":{"$ref":"#/definitions/GetRecurringDepositAccountsPeriodType"},"fromPeriod":{"type":"integer","format":"int32","example":181},"toPeriod":{"type":"integer","format":"int32","example":365},"annualInterestRate":{"type":"number","format":"double","example":5.5},"currency":{"$ref":"#/definitions/GetRecurringDepositAccountsAccountChartCurrency"}}},"GetRecurringDepositAccountsCurrency":{"type":"object","properties":{"code":{"type":"string","example":"USD"},"name":{"type":"string","example":"US Dollar"},"decimalPlaces":{"type":"integer","format":"int32","example":2},"inMultiplesOf":{"type":"integer","format":"int32","example":1},"displaySymbol":{"type":"string","example":"$"},"nameCode":{"type":"string","example":"currency.USD"},"displayLabel":{"type":"string","example":"US Dollar ($)"}}},"GetRecurringDepositAccountsDepositPeriodFrequency":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"deposit.period.savingsPeriodFrequencyType.months"},"value":{"type":"string","example":"Months"}}},"GetRecurringDepositAccountsInterestCalculationDaysInYearType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":365},"code":{"type":"string","example":"savingsInterestCalculationDaysInYearType.days365"},"value":{"type":"string","example":"365 Days"}}},"GetRecurringDepositAccountsInterestCalculationType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"savingsInterestCalculationType.dailybalance"},"value":{"type":"string","example":"Daily Balance"}}},"GetRecurringDepositAccountsInterestCompoundingPeriodType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":4},"code":{"type":"string","example":"savings.interest.period.savingsCompoundingInterestPeriodType.monthly"},"value":{"type":"string","example":"Monthly"}}},"GetRecurringDepositAccountsInterestPostingPeriodType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":4},"code":{"type":"string","example":"savings.interest.posting.period.savingsPostingInterestPeriodType.monthly"},"value":{"type":"string","example":"Monthly"}}},"GetRecurringDepositAccountsMaxDepositTermType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":3},"code":{"type":"string","example":"deposit.term.savingsPeriodFrequencyType.years"},"value":{"type":"string","example":"Years"}}},"GetRecurringDepositAccountsMinDepositTermType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"deposit.term.savingsPeriodFrequencyType.months"},"value":{"type":"string","example":"Months"}}},"GetRecurringDepositAccountsPeriodType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":0},"code":{"type":"string","example":"interestChartPeriodType.days"},"value":{"type":"string","example":"Days"}}},"GetRecurringDepositAccountsPeriodTypes":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":0},"code":{"type":"string","example":"interestChartPeriodType.days"},"value":{"type":"string","example":"Days"}}},"GetRecurringDepositAccountsRecurringDepositFrequencyType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"recurring.deposit.savingsPeriodFrequencyType.months"},"value":{"type":"string","example":"Months"}}},"GetRecurringDepositAccountsStatus":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":100},"code":{"type":"string","example":"savingsAccountStatusType.submitted.and.pending.approval"},"value":{"type":"string","example":"Submitted and pending approval"},"submittedAndPendingApproval":{"type":"boolean","example":true},"approved":{"type":"boolean","example":false},"rejected":{"type":"boolean","example":false},"withdrawnByApplicant":{"type":"boolean","example":false},"active":{"type":"boolean","example":false},"closed":{"type":"boolean","example":false},"prematureClosed":{"type":"boolean","example":false},"transferInProgress":{"type":"boolean","example":false},"transferOnHold":{"type":"boolean","example":false}}},"GetRecurringDepositAccountsSummary":{"type":"object","properties":{"currency":{"$ref":"#/definitions/GetRecurringDepositAccountsCurrency"},"accountBalance":{"type":"number","format":"float","example":0.0}}},"GetRecurringDepositAccountsTimeline":{"type":"object","properties":{"submittedOnDate":{"type":"string","format":"date","example":"[2014, 3, 1]"},"submittedByUsername":{"type":"string","example":"mifos"},"submittedByFirstname":{"type":"string","example":"App"},"submittedByLastname":{"type":"string","example":"Administrator"}}},"PostRecurringDepositAccountsAccountIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":1},"clientId":{"type":"integer","format":"int32","example":1},"savingsId":{"type":"integer","format":"int32","example":1},"resourceId":{"type":"integer","format":"int32","example":1}}},"PostRecurringDepositAccountsAccountIdRequest":{"type":"object"},"PostRecurringDepositAccountsResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":2},"clientId":{"type":"integer","format":"int32","example":1},"savingsId":{"type":"integer","format":"int32","example":1},"resourceId":{"type":"integer","format":"int32","example":1}}},"PostRecurringDepositAccountsRequest":{"type":"object","properties":{"clientId":{"type":"integer","format":"int32","example":1},"productId":{"type":"integer","format":"int32","example":1},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"submittedOnDate":{"type":"string","example":"02 June 2014"},"depositPeriod":{"type":"integer","format":"int32","example":20},"depositPeriodFrequencyId":{"type":"integer","format":"int32","example":1},"depositAmount":{"type":"number","format":"float","example":10000.0},"isCalendarInherited":{"type":"boolean","example":false},"recurringFrequency":{"type":"integer","format":"int32","example":2},"recurringFrequencyType":{"type":"integer","format":"int32","example":1},"mandatoryRecommendedDepositAmount":{"type":"integer","format":"int64","example":2000}}},"GetRecurringDepositAccountsTemplateResponse":{"type":"object","properties":{"clientId":{"type":"integer","format":"int32","example":1},"clientName":{"type":"string","example":"small business"},"productOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetRecurringProductOptions"}}}},"GetRecurringProductOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"Passbook Savings"}}},"GetRecurringDepositAccountsResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"accountNo":{"type":"integer","format":"int64","example":1},"clientId":{"type":"integer","format":"int32","example":1},"clientName":{"type":"string","example":"Sangamesh N"},"savingsProductId":{"type":"integer","format":"int32","example":3},"savingsProductName":{"type":"string","example":"RD01"},"fieldOfficerId":{"type":"integer","format":"int32","example":0},"status":{"$ref":"#/definitions/GetRecurringDepositAccountsStatus"},"timeline":{"$ref":"#/definitions/GetRecurringDepositAccountsTimeline"},"currency":{"$ref":"#/definitions/GetRecurringDepositAccountsCurrency"},"interestCompoundingPeriodType":{"$ref":"#/definitions/GetRecurringDepositAccountsInterestCompoundingPeriodType"},"interestPostingPeriodType":{"$ref":"#/definitions/GetRecurringDepositAccountsInterestPostingPeriodType"},"interestCalculationType":{"$ref":"#/definitions/GetRecurringDepositAccountsInterestCalculationType"},"interestCalculationDaysInYearType":{"$ref":"#/definitions/GetRecurringDepositAccountsInterestCalculationDaysInYearType"},"summary":{"$ref":"#/definitions/GetRecurringDepositAccountsSummary"},"depositAmount":{"type":"number","format":"float","example":1150.0},"maturityAmount":{"type":"number","format":"float","example":252.59},"maturityDate":{"type":"string","format":"date","example":"[2014, 4, 3]"},"recurringDepositAmount":{"type":"integer","format":"int32","example":100},"recurringDepositFrequency":{"type":"integer","format":"int32","example":1},"recurringDepositFrequencyType":{"$ref":"#/definitions/GetRecurringDepositAccountsRecurringDepositFrequencyType"},"preClosurePenalApplicable":{"type":"boolean","example":false},"minDepositTerm":{"type":"integer","format":"int32","example":3},"maxDepositTerm":{"type":"integer","format":"int32","example":4},"minDepositTermType":{"$ref":"#/definitions/GetRecurringDepositAccountsMinDepositTermType"},"maxDepositTermType":{"$ref":"#/definitions/GetRecurringDepositAccountsMaxDepositTermType"},"depositPeriod":{"type":"integer","format":"int32","example":6},"depositPeriodFrequency":{"$ref":"#/definitions/GetRecurringDepositAccountsDepositPeriodFrequency"}}},"PutRecurringDepositAccountsAccountIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":2},"clientId":{"type":"integer","format":"int32","example":1},"savingsId":{"type":"integer","format":"int32","example":1},"resourceId":{"type":"integer","format":"int32","example":1},"changes":{"$ref":"#/definitions/PutRecurringDepositAccountsChanges"}}},"PutRecurringDepositAccountsChanges":{"type":"object","properties":{"depositAmount":{"type":"integer","format":"int32","example":6000},"locale":{"type":"string","example":"en"}}},"PutRecurringDepositAccountsAccountIdRequest":{"type":"object","properties":{"locale":{"type":"string","example":"en"},"depositAmount":{"type":"integer","format":"int32","example":6000}}},"DeleteRecurringDepositAccountsResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":1},"clientId":{"type":"integer","format":"int32","example":1},"resourceId":{"type":"integer","format":"int32","example":1}}},"GetRecurringDepositProductsInterestCalculationDaysInYearType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":365},"code":{"type":"string","example":"savingsInterestCalculationDaysInYearType.days365"},"value":{"type":"string","example":"365 Days"}}},"GetRecurringDepositProductsInterestCalculationType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"savingsInterestCalculationType.dailybalance"},"value":{"type":"string","example":"Daily Balance"}}},"GetRecurringDepositProductsInterestPostingPeriodType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":4},"code":{"type":"string","example":"savings.interest.posting.period.savingsPostingInterestPeriodType.monthly"},"value":{"type":"string","example":"Monthly"}}},"GetRecurringDepositProductsProductIdAccountingMappings":{"type":"object","properties":{"savingsReferenceAccount":{"$ref":"#/definitions/GetRecurringDepositProductsProductIdSavingsReferenceAccount"},"incomeFromFeeAccount":{"$ref":"#/definitions/GetRecurringDepositProductsProductIdIncomeFromFeeAccount"},"incomeFromPenaltyAccount":{"$ref":"#/definitions/GetRecurringDepositProductsProductIdIncomeFromPenaltyAccount"},"interestOnSavingsAccount":{"$ref":"#/definitions/GetRecurringDepositProductsProductIdInterestOnSavingsAccount"},"savingsControlAccount":{"$ref":"#/definitions/GetRecurringDepositProductsProductIdSavingsControlAccount"},"transfersInSuspenseAccount":{"$ref":"#/definitions/GetRecurringDepositProductsProductIdTransfersInSuspenseAccount"}}},"GetRecurringDepositProductsProductIdActiveChart":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":8},"fromDate":{"type":"string","format":"date","example":"[2014, 1, 1]"},"savingsProductId":{"type":"integer","format":"int32","example":8},"savingsProductName":{"type":"string","example":"Recurring deposit product"},"chartSlabs":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetRecurringDepositProductsProductIdChartSlabs"}},"periodTypes":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetRecurringDepositProductsProductIdPeriodType"}}}},"GetRecurringDepositProductsProductIdChartSlabs":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":18},"description":{"type":"string","example":"from 0 to 90 days"},"periodType":{"$ref":"#/definitions/GetRecurringDepositProductsProductIdPeriodType"},"fromPeriod":{"type":"integer","format":"int32","example":0},"toPeriod":{"type":"integer","format":"int32","example":90},"annualInterestRate":{"type":"number","format":"double","example":4.5},"currency":{"$ref":"#/definitions/GetRecurringDepositProductsProductIdCurrency"}}},"GetRecurringDepositProductsProductIdCurrency":{"type":"object","properties":{"code":{"type":"string","example":"USD"},"name":{"type":"string","example":"US Dollar"},"decimalPlaces":{"type":"integer","format":"int32","example":2},"displaySymbol":{"type":"string","example":"$"},"nameCode":{"type":"string","example":"currency.USD"},"displayLabel":{"type":"string","example":"US Dollar ($)"}}},"GetRecurringDepositProductsProductIdFeeToIncomeAccountMappings":{"type":"object","properties":{"charge":{"$ref":"#/definitions/GetRecurringDepositProductsProductIdFeeToIncomeAccountMappingsCharge"},"incomeAccount":{"$ref":"#/definitions/GetRecurringDepositProductsProductIdFeeToIncomeAccountMappingsIncomeAccount"}}},"GetRecurringDepositProductsProductIdFeeToIncomeAccountMappingsCharge":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":11},"name":{"type":"string","example":"sav charge"},"active":{"type":"boolean","example":false},"penalty":{"type":"boolean","example":false}}},"GetRecurringDepositProductsProductIdFeeToIncomeAccountMappingsIncomeAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":16},"name":{"type":"string","example":"income from savings fee"},"glCode":{"type":"integer","format":"int32","example":24}}},"GetRecurringDepositProductsProductIdIncomeFromFeeAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":16},"name":{"type":"string","example":"income from savings fee"},"glCode":{"type":"integer","format":"int32","example":24}}},"GetRecurringDepositProductsProductIdIncomeFromPenaltyAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":17},"name":{"type":"string","example":"income from sav penalties"},"glCode":{"type":"integer","format":"int32","example":25}}},"GetRecurringDepositProductsProductIdInterestCompoundingPeriodType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"savings.interest.period.savingsCompoundingInterestPeriodType.daily"},"value":{"type":"string","example":"Daily"}}},"GetRecurringDepositProductsProductIdInterestOnSavingsAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":15},"name":{"type":"string","example":"interest on savings"},"glCode":{"type":"integer","format":"int32","example":23}}},"GetRecurringDepositProductsProductIdMaxDepositTermType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":3},"code":{"type":"string","example":"deposit.term.savingsPeriodFrequencyType.years"},"value":{"type":"string","example":"Years"}}},"GetRecurringDepositProductsProductIdMinDepositTermType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"deposit.term.savingsPeriodFrequencyType.weeks"},"value":{"type":"string","example":"Weeks"}}},"GetRecurringDepositProductsProductIdPenaltyToIncomeAccountMappings":{"type":"object","properties":{"charge":{"$ref":"#/definitions/GetRecurringDepositProductsProductIdPenaltyToIncomeAccountMappingsCharge"},"incomeAccount":{"$ref":"#/definitions/GetRecurringDepositProductsProductIdIncomeFromPenaltyAccount"}}},"GetRecurringDepositProductsProductIdPenaltyToIncomeAccountMappingsCharge":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12},"name":{"type":"string","example":"sav 2"},"active":{"type":"boolean","example":false},"penalty":{"type":"boolean","example":true}}},"GetRecurringDepositProductsProductIdPeriodType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"interestChartPeriodType.weeks"},"value":{"type":"string","example":"Weeks"}}},"GetRecurringDepositProductsProductIdPreClosurePenalInterestOnType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"preClosurePenalInterestOnType.wholeTerm"},"value":{"type":"string","example":"Whole term"}}},"GetRecurringDepositProductsProductIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"Recurring deposit product"},"shortName":{"type":"string","example":"RD01"},"description":{"type":"string","example":"Daily compounding using Daily Balance, 5% per year, 365 days in year"},"currency":{"$ref":"#/definitions/GetRecurringDepositProductsProductIdCurrency"},"interestCompoundingPeriodType":{"$ref":"#/definitions/GetRecurringDepositProductsProductIdInterestCompoundingPeriodType"},"interestPostingPeriodType":{"$ref":"#/definitions/GetRecurringDepositProductsInterestPostingPeriodType"},"interestCalculationType":{"$ref":"#/definitions/GetRecurringDepositProductsInterestCalculationType"},"interestCalculationDaysInYearType":{"$ref":"#/definitions/GetRecurringDepositProductsInterestCalculationDaysInYearType"},"accountingMappings":{"$ref":"#/definitions/GetRecurringDepositProductsProductIdAccountingMappings"},"feeToIncomeAccountMappings":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetRecurringDepositProductsProductIdFeeToIncomeAccountMappings"}},"penaltyToIncomeAccountMappings":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetRecurringDepositProductsProductIdPenaltyToIncomeAccountMappings"}},"recurringDepositFrequency":{"type":"integer","format":"int32","example":1},"recurringDepositFrequencyType":{"$ref":"#/definitions/GetRecurringDepositProductsRecurringDepositFrequencyType"},"preClosurePenalApplicable":{"type":"boolean","example":true},"preClosurePenalInterest":{"type":"number","format":"double","example":1.75},"preClosurePenalInterestOnType":{"$ref":"#/definitions/GetRecurringDepositProductsProductIdPreClosurePenalInterestOnType"},"minDepositTerm":{"type":"integer","format":"int32","example":1},"minDepositTermType":{"$ref":"#/definitions/GetRecurringDepositProductsProductIdMinDepositTermType"},"maxDepositTerm":{"type":"integer","format":"int32","example":5},"maxDepositTermType":{"$ref":"#/definitions/GetRecurringDepositProductsProductIdMaxDepositTermType"},"activeChart":{"$ref":"#/definitions/GetRecurringDepositProductsProductIdActiveChart"}}},"GetRecurringDepositProductsProductIdSavingsControlAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":13},"name":{"type":"string","example":"savings ref tool kit"},"glCode":{"type":"integer","format":"int32","example":21}}},"GetRecurringDepositProductsProductIdSavingsReferenceAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12},"name":{"type":"string","example":"savings ref"},"glCode":{"type":"integer","format":"int32","example":20}}},"GetRecurringDepositProductsProductIdTransfersInSuspenseAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":14},"name":{"type":"string","example":"saving transfers"},"glCode":{"type":"integer","format":"int32","example":22}}},"GetRecurringDepositProductsRecurringDepositFrequencyType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"recurring.deposit.savingsPeriodFrequencyType.months"},"value":{"type":"string","example":"Months"}}},"GetRecurringDepositProductsAccountingRule":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"accountingRuleType.none"},"value":{"type":"string","example":"NONE"}}},"GetRecurringDepositProductsCurrency":{"type":"object","properties":{"code":{"type":"string","example":"USD"},"name":{"type":"string","example":"US Dollar"},"decimalPlaces":{"type":"integer","format":"int32","example":2},"inMultiplesOf":{"type":"integer","format":"int32","example":1},"displaySymbol":{"type":"string","example":"$"},"nameCode":{"type":"string","example":"currency.USD"},"displayLabel":{"type":"string","example":"US Dollar ($)"}}},"GetRecurringDepositProductsInterestCompoundingPeriodType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":4},"code":{"type":"string","example":"savings.interest.period.savingsCompoundingInterestPeriodType.monthly"},"value":{"type":"string","example":"Monthly"}}},"GetRecurringDepositProductsMaxDepositTermType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":3},"code":{"type":"string","example":"deposit.term.savingsPeriodFrequencyType.years"},"value":{"type":"string","example":"Years"}}},"GetRecurringDepositProductsMinDepositTermType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"deposit.term.savingsPeriodFrequencyType.months"},"value":{"type":"string","example":"Months"}}},"GetRecurringDepositProductsResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":3},"name":{"type":"string","example":"RD01"},"shortName":{"type":"string","example":"RD01"},"description":{"type":"string","example":"RD01"},"currency":{"$ref":"#/definitions/GetRecurringDepositProductsCurrency"},"recurringDepositFrequency":{"type":"integer","format":"int32","example":1},"recurringDepositFrequencyType":{"$ref":"#/definitions/GetRecurringDepositProductsRecurringDepositFrequencyType"},"preClosurePenalApplicable":{"type":"boolean","example":false},"minDepositTerm":{"type":"integer","format":"int32","example":3},"maxDepositTerm":{"type":"integer","format":"int32","example":4},"minDepositTermType":{"$ref":"#/definitions/GetRecurringDepositProductsMinDepositTermType"},"maxDepositTermType":{"$ref":"#/definitions/GetRecurringDepositProductsMaxDepositTermType"},"nominalAnnualInterestRate":{"type":"number","format":"double","example":0.0},"interestCompoundingPeriodType":{"$ref":"#/definitions/GetRecurringDepositProductsInterestCompoundingPeriodType"},"interestPostingPeriodType":{"$ref":"#/definitions/GetRecurringDepositProductsInterestPostingPeriodType"},"interestCalculationType":{"$ref":"#/definitions/GetRecurringDepositProductsInterestCalculationType"},"interestCalculationDaysInYearType":{"$ref":"#/definitions/GetRecurringDepositProductsInterestCalculationDaysInYearType"},"accountingRule":{"$ref":"#/definitions/GetRecurringDepositProductsAccountingRule"}}},"PutRecurringDepositProductsChanges":{"type":"object","properties":{"description":{"type":"string","example":"Recurring deposit product new offerings"},"minDepositTerm":{"type":"integer","format":"int32","example":5}}},"PutRecurringDepositProductsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1},"changes":{"$ref":"#/definitions/PutRecurringDepositProductsChanges"}}},"PutRecurringDepositProductsRequest":{"type":"object","properties":{"description":{"type":"string","example":"Recurring deposit product new offerings"},"locale":{"type":"string","example":"en"},"minDepositTerm":{"type":"integer","format":"int32","example":5},"minDepositTermTypeId":{"type":"integer","format":"int32","example":1}}},"DeleteRecurringDepositProductsProductIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1}}},"PostRecurringDepositProductsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1}}},"PostRecurringDepositProductsChartSlabs":{"type":"object","properties":{"description":{"type":"string","example":"from 0 to 90 days"},"periodType":{"type":"integer","format":"int32","example":1},"fromPeriod":{"type":"integer","format":"int32","example":0},"toPeriod":{"type":"integer","format":"int32","example":90},"annualInterestRate":{"type":"number","format":"double","example":4.5}}},"PostRecurringDepositProductsCharts":{"type":"object","properties":{"fromDate":{"type":"string","example":"01 Jan 2014"},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"chartSlabs":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/PostRecurringDepositProductsChartSlabs"}}}},"PostRecurringDepositProductsRequest":{"type":"object","properties":{"name":{"type":"string","example":"Recurring deposit product"},"shortName":{"type":"string","example":"RD01"},"description":{"type":"string","example":"Daily compounding using Daily Balance, 5% per year, 365 days in year"},"currencyCode":{"type":"string","example":"USD"},"digitsAfterDecimal":{"type":"integer","format":"int32","example":2},"inMultiplesOf":{"type":"integer","format":"int32","example":0},"locale":{"type":"string","example":"en"},"interestCompoundingPeriodType":{"type":"integer","format":"int32","example":1},"interestPostingPeriodType":{"type":"integer","format":"int32","example":4},"interestCalculationType":{"type":"integer","format":"int32","example":1},"interestCalculationDaysInYearType":{"type":"integer","format":"int32","example":365},"accountingRule":{"type":"integer","format":"int32","example":1},"recurringDepositFrequency":{"type":"integer","format":"int32","example":1},"recurringDepositFrequencyTypeId":{"type":"integer","format":"int32","example":2},"preClosurePenalApplicable":{"type":"boolean","example":true},"preClosurePenalInterest":{"type":"number","format":"double","example":1.75},"preClosurePenalInterestOnTypeId":{"type":"integer","format":"int32","example":1},"minDepositTerm":{"type":"integer","format":"int32","example":1},"minDepositTermTypeId":{"type":"integer","format":"int32","example":1},"maxDepositTerm":{"type":"integer","format":"int32","example":5},"maxDepositTermTypeId":{"type":"integer","format":"int32","example":3},"depositAmount":{"type":"integer","format":"int64","example":10000},"minDepositAmount":{"type":"integer","format":"int64","example":100},"maxDepositAmount":{"type":"integer","format":"int64","example":1000000},"charts":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/PostRecurringDepositProductsCharts"}}}},"GetChargesAppliesTo":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"chargeAppliesTo.savings"},"value":{"type":"string","example":"Savings"}}},"GetChargesChargeCalculationType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"chargeCalculationType.flat"},"value":{"type":"string","example":"Flat"}}},"GetSavingsAccountsSavingsAccountIdChargesTemplateResponse":{"type":"object","properties":{"amountPaid":{"type":"number","format":"float","example":0.0},"amountWaived":{"type":"number","format":"float","example":0.0},"amountWrittenOff":{"type":"number","format":"float","example":0.0},"chargeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetSavingsChargesOptions"}},"penalty":{"type":"boolean","example":false}}},"GetSavingsChargesChargeTimeType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"chargeTimeType.specifiedDueDate"},"value":{"type":"string","example":"Specified due date"}}},"GetSavingsChargesOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"name":{"type":"string","example":"Passbook Fee"},"active":{"type":"boolean","example":true},"penalty":{"type":"boolean","example":false},"currency":{"$ref":"#/definitions/GetChargesCurrencyResponse"},"amount":{"type":"number","format":"float","example":100.0},"chargeTimeType":{"$ref":"#/definitions/GetSavingsChargesChargeTimeType"},"chargesAppliesTo":{"$ref":"#/definitions/GetChargesAppliesTo"},"chargeCalculationType":{"$ref":"#/definitions/GetChargesChargeCalculationType"}}},"GetChargesChargeTimeType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"chargeTimeType.specifiedDueDate"},"value":{"type":"string","example":"Specified due date"}}},"GetSavingsAccountsSavingsAccountIdChargesResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"chargeId":{"type":"integer","format":"int32","example":3},"accountId":{"type":"integer","format":"int32","example":57},"name":{"type":"string","example":"Savings account maintenance fee"},"chargeTimeType":{"$ref":"#/definitions/GetChargesChargeTimeType"},"chargeCalculationType":{"$ref":"#/definitions/GetChargesChargeCalculationType"},"percentage":{"type":"number","format":"double","example":0.0},"amountPercentageAppliedTo":{"type":"number","format":"double","example":0.0},"currency":{"$ref":"#/definitions/GetChargesCurrencyResponse"},"amount":{"type":"number","format":"float","example":100.0},"amountPaid":{"type":"number","format":"float","example":0.0},"amountWaived":{"type":"number","format":"float","example":0.0},"amountWrittenOff":{"type":"number","format":"float","example":0.0},"amountOutstanding":{"type":"number","format":"float","example":100.0},"amountOrPercentage":{"type":"number","format":"float","example":100.0},"penalty":{"type":"boolean","example":false}}},"GetSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"chargeId":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"Passbook fee"},"chargeTimeType":{"$ref":"#/definitions/GetChargesChargeTimeType"},"chargeCalculationType":{"$ref":"#/definitions/GetChargesChargeCalculationType"},"percentage":{"type":"number","format":"double","example":0.0},"amountPercentageAppliedTo":{"type":"number","format":"double","example":0.0},"currency":{"$ref":"#/definitions/GetChargesCurrencyResponse"},"amount":{"type":"number","format":"float","example":100.0},"amountPaid":{"type":"number","format":"float","example":0.0},"amountWaived":{"type":"number","format":"float","example":0.0},"amountWrittenOff":{"type":"number","format":"float","example":0.0},"amountOutstanding":{"type":"number","format":"float","example":100.0},"amountOrPercentage":{"type":"number","format":"float","example":100.0},"penalty":{"type":"boolean","example":false}}},"PostSavingsAccountsSavingsAccountIdChargesResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":1},"clientId":{"type":"integer","format":"int32","example":1},"savingsId":{"type":"integer","format":"int32","example":1},"resourceId":{"type":"integer","format":"int32","example":6}}},"PostSavingsAccountsSavingsAccountIdChargesRequest":{"type":"object","properties":{"chargeId":{"type":"integer","format":"int32","example":2},"locale":{"type":"string","example":"en"},"amount":{"type":"number","format":"float","example":100.0},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"dueDate":{"type":"string","example":"29 April 2013"}}},"PutSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":1},"clientId":{"type":"integer","format":"int32","example":1},"savingsId":{"type":"integer","format":"int32","example":1},"resourceId":{"type":"integer","format":"int32","example":6},"changes":{"$ref":"#/definitions/PutSavingsChanges"}}},"PutSavingsChanges":{"type":"object","properties":{"description":{"type":"string","example":"Passbook Savings Lite."},"interestRate":{"type":"number","format":"double","example":5.73},"locale":{"type":"string","example":"en"}}},"PutSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdRequest":{"type":"object","properties":{"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"locale":{"type":"string","example":"en"},"amount":{"type":"number","format":"float","example":60.0},"dueDate":{"type":"string","example":"27 March 2013"}}},"PostSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":1},"clientId":{"type":"integer","format":"int32","example":1},"savingsId":{"type":"integer","format":"int32","example":1},"resourceId":{"type":"integer","format":"int32","example":2}}},"PostSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdRequest":{"type":"object","properties":{"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"locale":{"type":"string","example":"en"},"amount":{"type":"number","format":"float","example":60.0},"dueDate":{"type":"string","example":"12 September 2013"}}},"DeleteSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":1},"clientId":{"type":"integer","format":"int32","example":1},"savingsId":{"type":"integer","format":"int32","example":1},"resourceId":{"type":"integer","format":"int32","example":2}}},"GetSavingsAccountsAccountIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"accountNo":{"type":"string","example":"000000001"},"clientId":{"type":"integer","format":"int32","example":1},"clientName":{"type":"string","example":"small business"},"savingsProductId":{"type":"integer","format":"int32","example":1},"savingsProductName":{"type":"string","example":"Passbook Savings"},"fieldOfficerId":{"type":"integer","format":"int32","example":0},"status":{"$ref":"#/definitions/GetSavingsStatus"},"timeline":{"$ref":"#/definitions/GetSavingsTimeline"},"currency":{"$ref":"#/definitions/GetSavingsCurrency"},"nominalAnnualInterestRate":{"type":"number","format":"double","example":5.0},"interestCompoundingPeriodType":{"$ref":"#/definitions/GetSavingsInterestCompoundingPeriodType"},"interestPostingPeriodType":{"$ref":"#/definitions/GetSavingsInterestPostingPeriodType"},"interestCalculationType":{"$ref":"#/definitions/GetSavingsInterestCalculationType"},"interestCalculationDaysInYearType":{"$ref":"#/definitions/GetSavingsInterestCalculationDaysInYearType"},"summary":{"$ref":"#/definitions/GetSavingsAccountsSummary"}}},"GetSavingsAccountsSummary":{"type":"object","properties":{"currency":{"$ref":"#/definitions/GetSavingsCurrency"},"accountBalance":{"type":"integer","format":"int32","example":0},"availableBalance":{"type":"integer","format":"int32","example":0}}},"GetSavingsCurrency":{"type":"object","properties":{"code":{"type":"string","example":"USD"},"name":{"type":"string","example":"US Dollar"},"decimalPlaces":{"type":"integer","format":"int32","example":2},"displaySymbol":{"type":"string","example":"$"},"nameCode":{"type":"string","example":"currency.USD"},"displayLabel":{"type":"string","example":"US Dollar ($)"}}},"GetSavingsInterestCalculationDaysInYearType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":365},"code":{"type":"string","example":"savingsInterestCalculationDaysInYearType.days365"},"value":{"type":"string","example":"365 Days"}}},"GetSavingsInterestCalculationType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"savingsInterestCalculationType.dailybalance"},"value":{"type":"string","example":"Daily Balance"}}},"GetSavingsInterestCompoundingPeriodType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"savings.interest.period.savingsCompoundingInterestPeriodType.daily"},"value":{"type":"string","example":"Daily"}}},"GetSavingsInterestPostingPeriodType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":4},"code":{"type":"string","example":"savings.interest.posting.period.savingsPostingInterestPeriodType.monthly"},"value":{"type":"string","example":"Monthly"}}},"GetSavingsStatus":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":100},"code":{"type":"string","example":"savingsAccountStatusType.submitted.and.pending.approval"},"value":{"type":"string","example":"Submitted and pending approval"},"submittedAndPendingApproval":{"type":"boolean","example":true},"approved":{"type":"boolean","example":false},"rejected":{"type":"boolean","example":false},"withdrawnByApplicant":{"type":"boolean","example":false},"active":{"type":"boolean","example":false},"closed":{"type":"boolean","example":false}}},"GetSavingsTimeline":{"type":"object","properties":{"submittedOnDate":{"type":"string","format":"date","example":"[2013, 3, 1]"}}},"PostSavingsAccountsAccountIdChanges":{"type":"object"},"PostSavingsAccountsAccountIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":2},"clientId":{"type":"integer","format":"int32","example":8},"resourceId":{"type":"integer","format":"int32","example":8},"changes":{"$ref":"#/definitions/PostSavingsAccountsAccountIdChanges"}}},"PostSavingsAccountsAccountIdRequest":{"type":"object","properties":{"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"locale":{"type":"string","example":"en"},"unassignedDate":{"type":"string","example":"05 September 2014"}}},"PostSavingsAccountsResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":2},"clientId":{"type":"integer","format":"int32","example":1},"savingsId":{"type":"integer","format":"int32","example":1},"resourceId":{"type":"integer","format":"int32","example":1}}},"PostSavingsAccountsRequest":{"type":"object","properties":{"clientId":{"type":"integer","format":"int32","example":1},"productId":{"type":"integer","format":"int32","example":1},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"submittedOnDate":{"type":"string","example":"01 March 2011"}}},"GetSavingsAccountsTemplateResponse":{"type":"object","properties":{"clientId":{"type":"integer","format":"int32","example":1},"clientName":{"type":"string","example":"small business"},"productOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetSavingsProductOptions"}}}},"GetSavingsProductOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"Passbook Savings"}}},"GetSavingsAccountsResponse":{"type":"object","properties":{"totalFilteredRecords":{"type":"integer","format":"int32","example":1},"pageItems":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetSavingsPageItems"}}}},"GetSavingsPageItems":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"accountNo":{"type":"string","example":"000000001"},"clientId":{"type":"integer","format":"int32","example":1},"clientName":{"type":"string","example":"small business"},"savingsProductId":{"type":"integer","format":"int32","example":1},"savingsProductName":{"type":"string","example":"Passbook Savings"},"fieldOfficerId":{"type":"integer","format":"int32","example":0},"status":{"$ref":"#/definitions/GetSavingsStatus"},"timeline":{"$ref":"#/definitions/GetSavingsTimeline"},"currency":{"$ref":"#/definitions/GetSavingsCurrency"},"nominalAnnualInterestRate":{"type":"number","format":"double","example":5.0},"interestCompoundingPeriodType":{"$ref":"#/definitions/GetSavingsInterestCompoundingPeriodType"},"interestPostingPeriodType":{"$ref":"#/definitions/GetSavingsInterestPostingPeriodType"},"interestCalculationType":{"$ref":"#/definitions/GetSavingsInterestCalculationType"},"interestCalculationDaysInYearType":{"$ref":"#/definitions/GetSavingsInterestCalculationDaysInYearType"},"summary":{"$ref":"#/definitions/GetSavingsSummary"}}},"GetSavingsSummary":{"type":"object","properties":{"currency":{"$ref":"#/definitions/GetSavingsCurrency"},"accountBalance":{"type":"integer","format":"int32","example":0}}},"PutSavingsAccountsAccountIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":2},"clientId":{"type":"integer","format":"int32","example":1},"savingsId":{"type":"integer","format":"int32","example":1},"resourceId":{"type":"integer","format":"int32","example":1},"changes":{"$ref":"#/definitions/PutSavingsAccountsChanges"}}},"PutSavingsAccountsChanges":{"type":"object","properties":{"nominalAnnualInterestRate":{"type":"number","format":"double","example":5.9999999999},"locale":{"type":"string","example":"en"}}},"PutSavingsAccountsAccountIdRequest":{"type":"object","properties":{"locale":{"type":"string","example":"en"},"nominalAnnualInterestRate":{"type":"number","format":"double","example":5.9999999999}}},"DeleteSavingsAccountsAccountIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":1},"clientId":{"type":"integer","format":"int32","example":1},"resourceId":{"type":"integer","format":"int32","example":1}}},"GetSavingsProductsAccountingMappings":{"type":"object","properties":{"savingsReferenceAccount":{"$ref":"#/definitions/GetSavingsProductsSavingsReferenceAccount"},"incomeFromFeeAccount":{"$ref":"#/definitions/GetSavingsProductsIncomeFromFeeAccount"},"incomeFromPenaltyAccount":{"$ref":"#/definitions/GetSavingsProductsIncomeFromPenaltyAccount"},"interestOnSavingsAccount":{"$ref":"#/definitions/GetSavingsProductsInterestOnSavingsAccount"},"savingsControlAccount":{"$ref":"#/definitions/GetSavingsProductsSavingsControlAccount"},"transfersInSuspenseAccount":{"$ref":"#/definitions/GetSavingsProductsTransfersInSuspenseAccount"}}},"GetSavingsProductsAccountingRule":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"accountingRuleType.cash"},"value":{"type":"string","example":"CASH BASED"}}},"GetSavingsProductsFeeToIncomeAccountMappings":{"type":"object","properties":{"charge":{"$ref":"#/definitions/GetSavingsProductsFeeToIncomeAccountMappingsCharge"},"incomeAccount":{"$ref":"#/definitions/GetSavingsProductsFeeToIncomeAccountMappingsIncomeAccount"}}},"GetSavingsProductsFeeToIncomeAccountMappingsCharge":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":11},"name":{"type":"string","example":"sav charge"},"active":{"type":"boolean","example":false},"penalty":{"type":"boolean","example":false}}},"GetSavingsProductsFeeToIncomeAccountMappingsIncomeAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":16},"name":{"type":"string","example":"income from savings fee"},"glCode":{"type":"integer","format":"int32","example":24}}},"GetSavingsProductsFundSourceAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12},"name":{"type":"string","example":"savings ref"},"glCode":{"type":"integer","format":"int32","example":20}}},"GetSavingsProductsIncomeFromFeeAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":16},"name":{"type":"string","example":"income from savings fee"},"glCode":{"type":"integer","format":"int32","example":24}}},"GetSavingsProductsIncomeFromPenaltyAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":17},"name":{"type":"string","example":"income from sav penalties"},"glCode":{"type":"integer","format":"int32","example":25}}},"GetSavingsProductsInterestCalculationDaysInYearType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":365},"code":{"type":"string","example":"savingsInterestCalculationDaysInYearType.days365"},"value":{"type":"string","example":"365 Days"}}},"GetSavingsProductsInterestCalculationType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"savingsInterestCalculationType.dailybalance"},"value":{"type":"string","example":"Daily Balance"}}},"GetSavingsProductsInterestCompoundingPeriodType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"savings.interest.period.savingsCompoundingInterestPeriodType.daily"},"value":{"type":"string","example":"Daily"}}},"GetSavingsProductsInterestOnSavingsAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":15},"name":{"type":"string","example":"interest on savings"},"glCode":{"type":"integer","format":"int32","example":23}}},"GetSavingsProductsInterestPostingPeriodType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":4},"code":{"type":"string","example":"savings.interest.posting.period.savingsPostingInterestPeriodType.monthly"},"value":{"type":"string","example":"Monthly"}}},"GetSavingsProductsPaymentChannelToFundSourceMappings":{"type":"object","properties":{"paymentType":{"$ref":"#/definitions/GetSavingsProductsPaymentType"},"fundSourceAccount":{"$ref":"#/definitions/GetSavingsProductsFundSourceAccount"}}},"GetSavingsProductsPaymentType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":10},"name":{"type":"string","example":"check"}}},"GetSavingsProductsPenaltyToIncomeAccountMappings":{"type":"object","properties":{"charge":{"$ref":"#/definitions/GetSavingsProductsPenaltyToIncomeAccountMappingsCharge"},"incomeAccount":{"$ref":"#/definitions/GetSavingsProductsIncomeFromPenaltyAccount"}}},"GetSavingsProductsPenaltyToIncomeAccountMappingsCharge":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12},"name":{"type":"string","example":"sav 2"},"active":{"type":"boolean","example":false},"penalty":{"type":"boolean","example":true}}},"GetSavingsProductsProductIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"savings product"},"shortName":{"type":"string","example":"sa1"},"description":{"type":"string","example":"gtasga"},"currency":{"$ref":"#/definitions/GetSavingsCurrency"},"nominalAnnualInterestRate":{"type":"number","example":5.0},"interestCompoundingPeriodType":{"$ref":"#/definitions/GetSavingsProductsInterestCompoundingPeriodType"},"interestPostingPeriodType":{"$ref":"#/definitions/GetSavingsProductsInterestPostingPeriodType"},"interestCalculationType":{"$ref":"#/definitions/GetSavingsProductsInterestCalculationType"},"interestCalculationDaysInYearType":{"$ref":"#/definitions/GetSavingsProductsInterestCalculationDaysInYearType"},"withdrawalFeeForTransfers":{"type":"boolean","example":false},"accountingRule":{"$ref":"#/definitions/GetSavingsProductsAccountingRule"},"accountingMappings":{"$ref":"#/definitions/GetSavingsProductsAccountingMappings"},"paymentChannelToFundSourceMappings":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetSavingsProductsPaymentChannelToFundSourceMappings"}},"feeToIncomeAccountMappings":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetSavingsProductsFeeToIncomeAccountMappings"}},"penaltyToIncomeAccountMappings":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetSavingsProductsPenaltyToIncomeAccountMappings"}},"charges":{"type":"array","example":"[]","items":{"type":"integer","format":"int32"}}}},"GetSavingsProductsSavingsControlAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":13},"name":{"type":"string","example":"savings ref tool kit"},"glCode":{"type":"integer","format":"int32","example":21}}},"GetSavingsProductsSavingsReferenceAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":12},"name":{"type":"string","example":"savings ref"},"glCode":{"type":"integer","format":"int32","example":20}}},"GetSavingsProductsTransfersInSuspenseAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":14},"name":{"type":"string","example":"saving transfers"},"glCode":{"type":"integer","format":"int32","example":22}}},"GetSavingsAssetLiabilityType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"accountType.asset"},"value":{"type":"string","example":"ASSET"}}},"GetSavingsAssetTagId":{"type":"object"},"GetSavingsChargeCalculationType":{"type":"object","properties":{"code":{"type":"string","example":"chargeCalculationType.flat"},"id":{"type":"integer","format":"int32","example":1},"value":{"type":"string","example":"Flat"}}},"GetSavingsChargePaymentMode":{"type":"object","properties":{"code":{"type":"string","example":"chargepaymentmode.regular"},"id":{"type":"integer","format":"int32","example":0},"value":{"type":"string","example":"chargepaymentmode.regular"}}},"GetSavingsChargeTimeType":{"type":"object","properties":{"code":{"type":"string","example":"chargeTimeType.specifiedDueDate"},"id":{"type":"integer","format":"int32","example":1},"value":{"type":"string","example":"Specified due date"}}},"GetSavingsProductsAccountingMappingOptions":{"type":"object","properties":{"liabilityAccountOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetSavingsProductsLiabilityAccountOptions"}},"assetAccountOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetSavingsProductsAssetAccountOptions"}},"expenseAccountOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetSavingsProductsExpenseAccountOptions"}},"incomeAccountOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetSavingsProductsIncomeAccountOptions"}}}},"GetSavingsProductsAssetAccountOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"name":{"type":"string","example":"Cash"},"glCode":{"type":"integer","format":"int32","example":100001},"disabled":{"type":"boolean","example":false},"manualEntriesAllowed":{"type":"boolean","example":true},"type":{"$ref":"#/definitions/GetSavingsAssetLiabilityType"},"usage":{"$ref":"#/definitions/GetSavingsProductsLiabilityUsage"},"tagId":{"$ref":"#/definitions/GetSavingsAssetTagId"}}},"GetSavingsProductsChargeAppliesTo":{"type":"object","properties":{"code":{"type":"string","example":"chargeAppliesTo.savings"},"id":{"type":"integer","format":"int32","example":2},"value":{"type":"string","example":"Savings"}}},"GetSavingsProductsChargeOptions":{"type":"object","properties":{"active":{"type":"boolean","example":true},"amount":{"type":"integer","format":"int64","example":200},"chargeAppliesTo":{"$ref":"#/definitions/GetSavingsProductsChargeAppliesTo"},"chargeCalculationType":{"$ref":"#/definitions/GetSavingsChargeCalculationType"},"chargePaymentMode":{"$ref":"#/definitions/GetSavingsChargePaymentMode"},"chargeTimeType":{"$ref":"#/definitions/GetSavingsChargeTimeType"},"currency":{"$ref":"#/definitions/GetSavingsCurrency"},"id":{"type":"integer","format":"int32","example":4},"name":{"type":"string","example":"Savings charge 1"},"penalty":{"type":"boolean","example":false}}},"GetSavingsProductsExpenseAccountOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":6},"name":{"type":"string","example":"Write Off Expenses"},"glCode":{"type":"integer","format":"int32","example":60001},"disabled":{"type":"boolean","example":false},"manualEntriesAllowed":{"type":"boolean","example":true},"type":{"$ref":"#/definitions/GetSavingsProductsExpenseType"},"usage":{"$ref":"#/definitions/GetSavingsProductsLiabilityUsage"},"tagId":{"$ref":"#/definitions/GetSavingsAssetTagId"}}},"GetSavingsProductsExpenseType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":5},"code":{"type":"string","example":"accountType.expense"},"value":{"type":"string","example":"EXPENSE"}}},"GetSavingsProductsIncomeAccountOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":3},"name":{"type":"string","example":"income from interest"},"glCode":{"type":"integer","format":"int32","example":40001},"disabled":{"type":"boolean","example":false},"manualEntriesAllowed":{"type":"boolean","example":true},"type":{"$ref":"#/definitions/GetSavingsProductsIncomeType"},"usage":{"$ref":"#/definitions/GetSavingsProductsLiabilityUsage"},"tagId":{"$ref":"#/definitions/GetSavingsAssetTagId"}}},"GetSavingsProductsIncomeType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":4},"code":{"type":"string","example":"accountType.income"},"value":{"type":"string","example":"INCOME"}}},"GetSavingsProductsLiabilityAccountOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":15},"name":{"type":"string","example":"Savings Control"},"glCode":{"type":"integer","format":"int32","example":50001},"disabled":{"type":"boolean","example":false},"manualEntriesAllowed":{"type":"boolean","example":true},"type":{"$ref":"#/definitions/GetSavingsProductsLiabilityType"},"usage":{"$ref":"#/definitions/GetSavingsProductsLiabilityUsage"},"nameDecorated":{"type":"string","example":"Savings Control"},"tagId":{"$ref":"#/definitions/GetSavingsProductsLiabilityTagId"}}},"GetSavingsProductsLiabilityTagId":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":0}}},"GetSavingsProductsLiabilityType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"accountType.liability"},"value":{"type":"string","example":"LIABILITY"}}},"GetSavingsProductsLiabilityUsage":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"accountUsage.detail"},"value":{"type":"string","example":"DETAIL"}}},"GetSavingsProductsLockinPeriodFrequencyTypeOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":0},"code":{"type":"string","example":"savings.lockin.savingsPeriodFrequencyType.days"},"value":{"type":"string","example":"Days"}}},"GetSavingsProductsPaymentTypeOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":14},"name":{"type":"string","example":"Wire Transfer"},"position":{"type":"integer","format":"int32","example":0}}},"GetSavingsProductsTemplateAccountingRule":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"accountingRuleType.none"},"value":{"type":"string","example":"NONE"}}},"GetSavingsProductsTemplateResponse":{"type":"object","properties":{"currency":{"$ref":"#/definitions/GetSavingsCurrency"},"interestCompoundingPeriodType":{"$ref":"#/definitions/GetSavingsProductsInterestCompoundingPeriodType"},"interestPostingPeriodType":{"$ref":"#/definitions/GetSavingsProductsInterestPostingPeriodType"},"interestCalculationType":{"$ref":"#/definitions/GetSavingsProductsInterestCalculationType"},"interestCalculationDaysInYearType":{"$ref":"#/definitions/GetSavingsProductsInterestCalculationDaysInYearType"},"accountingRule":{"$ref":"#/definitions/GetSavingsProductsTemplateAccountingRule"},"currencyOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetSavingsCurrency"}},"interestCompoundingPeriodTypeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetSavingsProductsInterestCompoundingPeriodType"}},"interestPostingPeriodTypeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetSavingsProductsInterestPostingPeriodType"}},"interestCalculationTypeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetSavingsProductsInterestCalculationType"}},"interestCalculationDaysInYearTypeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetSavingsProductsInterestCalculationDaysInYearType"}},"lockinPeriodFrequencyTypeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetSavingsProductsLockinPeriodFrequencyTypeOptions"}},"withdrawalFeeTypeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetSavingsProductsWithdrawalFeeTypeOptions"}},"paymentTypeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetSavingsProductsPaymentTypeOptions"}},"accountingRuleOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetSavingsProductsTemplateAccountingRule"}},"accountingMappingOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetSavingsProductsAccountingMappingOptions"}},"chargeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetSavingsProductsChargeOptions"}}}},"GetSavingsProductsWithdrawalFeeTypeOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"savingsWithdrawalFeesType.flat"},"value":{"type":"string","example":"Flat"}}},"GetSavingsProductsResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"Savings product"},"shortName":{"type":"string","example":"sa1"},"description":{"type":"string","example":"gtasga"},"currency":{"$ref":"#/definitions/GetSavingsCurrency"},"nominalAnnualInterestRate":{"type":"number","example":5.0},"interestCompoundingPeriodType":{"$ref":"#/definitions/GetSavingsProductsInterestCompoundingPeriodType"},"interestPostingPeriodType":{"$ref":"#/definitions/GetSavingsProductsInterestPostingPeriodType"},"interestCalculationType":{"$ref":"#/definitions/GetSavingsProductsInterestCalculationType"},"interestCalculationDaysInYearType":{"$ref":"#/definitions/GetSavingsProductsInterestCalculationDaysInYearType"},"withdrawalFeeForTransfers":{"type":"boolean","example":false},"accountingRule":{"$ref":"#/definitions/GetSavingsProductsAccountingRule"}}},"PutSavingsProductsProductIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1},"changes":{"$ref":"#/definitions/PutSavingsChanges"}}},"PutSavingsProductsProductIdRequest":{"type":"object","properties":{"description":{"type":"string","example":"Passbook Savings Lite."},"locale":{"type":"string","example":"en"},"interestRate":{"type":"number","format":"double","example":5.73}}},"DeleteSavingsProductsProductIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1}}},"PostSavingsProductsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1}}},"PostSavingsCharges":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1}}},"PostSavingsProductsRequest":{"type":"object","properties":{"name":{"type":"string","example":"Passbook Savings"},"shortName":{"type":"string","example":"PBSV"},"description":{"type":"string","example":"Daily compounding using Daily Balance, 5% per year, 365 days in year"},"currencyCode":{"type":"string","example":"USD"},"digitsAfterDecimal":{"type":"integer","format":"int32","example":2},"inMultiplesOf":{"type":"integer","format":"int32","example":0},"locale":{"type":"string","example":"en"},"nominalAnnualInterestRate":{"type":"number","format":"double","example":5.0},"interestCompoundingPeriodType":{"type":"integer","format":"int32","example":1},"interestPostingPeriodType":{"type":"integer","format":"int32","example":4},"interestCalculationType":{"type":"integer","format":"int32","example":1},"interestCalculationDaysInYearType":{"type":"integer","format":"int32","example":365},"accountingRule":{"type":"integer","format":"int32","example":1},"charges":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/PostSavingsCharges"}}}},"GetSelfBeneficiariesAccountOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"accountType.savings"},"value":{"type":"string","example":"Savings Account"}}},"GetSelfBeneficiariesTPTTemplateResponse":{"type":"object","properties":{"accountTypeOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetSelfBeneficiariesAccountOptions"}}}},"GetSelfBeneficiariesTPTResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"Client2Savings"},"officeName":{"type":"string","example":"Test Office"},"clientName":{"type":"string","example":"FN2 LN2"},"accountType":{"$ref":"#/definitions/GetSelfBeneficiariesAccountOptions"},"accountNumber":{"type":"integer","format":"int64","example":2},"transferLimit":{"type":"integer","format":"int32","example":0}}},"PostSelfBeneficiariesTPTResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":5}}},"PostSelfBeneficiariesTPTRequest":{"type":"object","properties":{"locale":{"type":"string","example":"en_GB"},"name":{"type":"string","example":"beneficiary nick name"},"officeName":{"type":"string","example":"HEAD OFFICE"},"accountNumber":{"type":"integer","format":"int64","example":1},"accountType":{"type":"integer","format":"int32","example":1},"transferLimit":{"type":"integer","format":"int32","example":1000}}},"PutSelfBeneficiariesChanges":{"type":"object","properties":{"transferLimit":{"type":"integer","format":"int32","example":1000},"name":{"type":"string","example":"Client22"}}},"PutSelfBeneficiariesTPTBeneficiaryIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":5},"changes":{"$ref":"#/definitions/PutSelfBeneficiariesChanges"}}},"PutSelfBeneficiariesTPTBeneficiaryIdRequest":{"type":"object","properties":{"name":{"type":"string","example":"beneficiary nick name"},"transferLimit":{"type":"integer","format":"int32","example":1000}}},"DeleteSelfBeneficiariesTPTBeneficiaryIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":5}}},"GetSelfClientsClientIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":27},"accountNo":{"type":"integer","format":"int64","example":27},"status":{"$ref":"#/definitions/GetSelfClientsStatus"},"active":{"type":"boolean","example":true},"activationDate":{"type":"string","format":"date","example":"[2013, 1, 1]"},"firstname":{"type":"string","example":"savings"},"lastname":{"type":"string","example":"test"},"displayName":{"type":"string","example":"savings test"},"officeId":{"type":"integer","format":"int32","example":1},"officeName":{"type":"string","example":"Head Office"},"timeline":{"$ref":"#/definitions/GetSelfClientsTimeline"},"savingsProductId":{"type":"integer","format":"int32","example":4},"savingsProductName":{"type":"string","example":"account overdraft"},"groups":{"type":"array","items":{"type":"string"}}}},"GetSelfClientsStatus":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":300},"code":{"type":"string","example":"clientStatusType.active"},"value":{"type":"string","example":"Active"}}},"GetSelfClientsTimeline":{"type":"object","properties":{"submittedOnDate":{"type":"string","format":"date","example":"[2013, 1, 1]"},"submittedByUsername":{"type":"string","example":"mifos"},"submittedByFirstname":{"type":"string","example":"App"},"submittedByLastname":{"type":"string","example":"Administrator"},"activatedOnDate":{"type":"string","format":"date","example":"[2013, 1, 1]"},"activatedByUsername":{"type":"string","example":"mifos"},"activatedByFirstname":{"type":"string","example":"App"},"activatedByLastname":{"type":"string","example":"Administrator"}}},"GetSelfClientsChargeCalculationType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"chargeCalculationType.flat"},"value":{"type":"string","example":"Flat"}}},"GetSelfClientsChargeTimeType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"chargeTimeType.specifiedDueDate"},"value":{"type":"string","example":"Specified due date"}}},"GetSelfClientsChargesPageItems":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":5},"clientId":{"type":"integer","format":"int32","example":1},"chargeId":{"type":"integer","format":"int32","example":6},"name":{"type":"string","example":"Client Fees 2"},"chargeTimeType":{"$ref":"#/definitions/GetSelfClientsChargeTimeType"},"dueDate":{"type":"string","format":"date","example":"[2015, 9, 1]"},"chargeCalculationType":{"$ref":"#/definitions/GetSelfClientsChargeCalculationType"},"currency":{"$ref":"#/definitions/GetSelfClientsSavingsAccountsCurrency"},"amount":{"type":"number","format":"float","example":550.0},"amountPaid":{"type":"number","format":"float","example":0.0},"amountWaived":{"type":"number","format":"float","example":0.0},"amountWrittenOff":{"type":"number","format":"float","example":0.0},"amountOutstanding":{"type":"number","format":"float","example":550.0},"penalty":{"type":"boolean","example":false},"isActive":{"type":"boolean","example":true},"isPaid":{"type":"boolean","example":false},"isWaived":{"type":"boolean","example":false}}},"GetSelfClientsClientIdChargesResponse":{"type":"object","properties":{"totalFilteredRecords":{"type":"integer","format":"int32","example":4},"pageItems":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetSelfClientsChargesPageItems"}}}},"GetSelfClientsSavingsAccountsCurrency":{"type":"object","properties":{"code":{"type":"string","example":"USD"},"name":{"type":"string","example":"US Dollar"},"decimalPlaces":{"type":"integer","format":"int32","example":2},"displaySymbol":{"type":"string","example":"$"},"nameCode":{"type":"string","example":"currency.USD"},"displayLabel":{"type":"string","example":"US Dollar ($)"}}},"GetSelfClientsClientIdChargesChargeIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":3},"clientId":{"type":"integer","format":"int32","example":1},"chargeId":{"type":"integer","format":"int32","example":5},"name":{"type":"string","example":"Client Fee 1"},"chargeTimeType":{"$ref":"#/definitions/GetSelfClientsChargeTimeType"},"dueDate":{"type":"string","format":"date","example":"[2015, 8, 17]"},"chargeCalculationType":{"$ref":"#/definitions/GetSelfClientsChargeCalculationType"},"currency":{"$ref":"#/definitions/GetSelfClientsSavingsAccountsCurrency"},"amount":{"type":"number","format":"float","example":100.0},"amountPaid":{"type":"number","format":"float","example":0.0},"amountWaived":{"type":"number","format":"float","example":100.0},"amountWrittenOff":{"type":"number","format":"float","example":0.0},"amountOutstanding":{"type":"number","format":"float","example":0.0},"penalty":{"type":"boolean","example":true},"isActive":{"type":"boolean","example":true},"isPaid":{"type":"boolean","example":false},"isWaived":{"type":"boolean","example":true}}},"GetSelfClientsClientIdAccountsResponse":{"type":"object","properties":{"loanAccounts":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetSelfClientsLoanAccounts"}},"savingsAccounts":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetSelfClientsSavingsAccounts"}}}},"GetSelfClientsLoanAccounts":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"accountNo":{"type":"integer","format":"int64","example":1},"externalId":{"type":"integer","format":"int32","example":456},"productId":{"type":"integer","format":"int32","example":1},"productName":{"type":"string","example":"TestOne"},"status":{"$ref":"#/definitions/GetSelfClientsLoanAccountsStatus"},"loanType":{"$ref":"#/definitions/GetSelfClientsLoanAccountsType"},"loanCycle":{"type":"integer","format":"int32","example":1}}},"GetSelfClientsLoanAccountsStatus":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":300},"code":{"type":"string","example":"loanStatusType.active"},"value":{"type":"string","example":"Active"},"pendingApproval":{"type":"boolean","example":false},"waitingForDisbursal":{"type":"boolean","example":false},"active":{"type":"boolean","example":true},"closedObligationsMet":{"type":"boolean","example":false},"closedWrittenOff":{"type":"boolean","example":false},"closedRescheduled":{"type":"boolean","example":false},"closed":{"type":"boolean","example":false},"overpaid":{"type":"boolean","example":false}}},"GetSelfClientsLoanAccountsType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"loanType.individual"},"value":{"type":"string","example":"Individual"}}},"GetSelfClientsSavingsAccounts":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":7},"accountNo":{"type":"integer","format":"int64","example":7},"productId":{"type":"integer","format":"int32","example":2},"productName":{"type":"string","example":"Other product"},"status":{"$ref":"#/definitions/GetSelfClientsSavingsAccountsStatus"},"currency":{"$ref":"#/definitions/GetSelfClientsSavingsAccountsCurrency"}}},"GetSelfClientsSavingsAccountsStatus":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":100},"code":{"type":"string","example":"savingsAccountStatusType.submitted.and.pending.approval"},"value":{"type":"string","example":"Submitted and pending approval"},"submittedAndPendingApproval":{"type":"boolean","example":true},"approved":{"type":"boolean","example":false},"rejected":{"type":"boolean","example":false},"withdrawnByApplicant":{"type":"boolean","example":false},"active":{"type":"boolean","example":false},"closed":{"type":"boolean","example":false}}},"GetSelfClientsClientIdTransactionsPageItems":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":226},"officeId":{"type":"integer","format":"int32","example":1},"officeName":{"type":"string","example":"Head Office"},"type":{"$ref":"#/definitions/GetSelfClientsClientIdTransactionsType"},"date":{"type":"string","format":"date","example":"[2015, 9, 2]"},"currency":{"$ref":"#/definitions/GetSelfClientsSavingsAccountsCurrency"},"amount":{"type":"number","format":"double","example":22.0},"submittedOnDate":{"type":"string","format":"date","example":"[2015, 9, 2]"},"reversed":{"type":"boolean","example":false}}},"GetSelfClientsClientIdTransactionsResponse":{"type":"object","properties":{"totalFilteredRecords":{"type":"integer","format":"int32","example":20},"pageItems":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetSelfClientsClientIdTransactionsPageItems"}}}},"GetSelfClientsClientIdTransactionsType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"clientTransactionType.payCharge"},"value":{"type":"string","example":"PAY_CHARGE"}}},"GetSelfClientsClientIdTransactionsTransactionIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"officeId":{"type":"integer","format":"int32","example":1},"officeName":{"type":"string","example":"Head Office"},"type":{"$ref":"#/definitions/GetSelfClientsClientIdTransactionsType"},"date":{"type":"string","format":"date","example":"[2015, 8, 17]"},"currency":{"$ref":"#/definitions/GetSelfClientsSavingsAccountsCurrency"},"amount":{"type":"number","format":"float","example":60.0},"submittedOnDate":{"type":"string","format":"date","example":"[2015, 8, 19]"},"reversed":{"type":"boolean","example":true}}},"GetSelfClientsPageItems":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"accountNo":{"type":"integer","format":"int64","example":1},"status":{"$ref":"#/definitions/GetSelfClientsStatus"},"active":{"type":"boolean","example":true},"activationDate":{"type":"string","format":"date","example":"[2013, 3, 1]"},"fullname":{"type":"string","example":"Small shop"},"displayName":{"type":"string","example":"Small shop"},"officeId":{"type":"integer","format":"int32","example":1},"officeName":{"type":"string","example":"Head Office"}}},"GetSelfClientsResponse":{"type":"object","properties":{"totalFilteredRecords":{"type":"integer","format":"int32","example":2},"pageItems":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetSelfClientsPageItems"}}}},"GetLoanCurrency":{"type":"object","properties":{"code":{"type":"string","example":"USD"},"name":{"type":"string","example":"US Dollar"},"decimalPlaces":{"type":"integer","format":"int32","example":2},"displaySymbol":{"type":"string","example":"$"},"nameCode":{"type":"string","example":"currency.USD"},"displayLabel":{"type":"string","example":"US Dollar ($)"}}},"GetSelfLoansLoanIdTransactionsTransactionIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":3},"type":{"$ref":"#/definitions/GetSelfLoansLoanIdTransactionsType"},"date":{"type":"string","format":"date","example":"[2012, 5, 14]"},"manuallyReversed":{"type":"boolean","example":false},"currency":{"$ref":"#/definitions/GetLoanCurrency"},"amount":{"type":"number","format":"float","example":559.88},"interestPortion":{"type":"number","format":"float","example":559.88}}},"GetSelfLoansLoanIdTransactionsType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"loanTransactionType.repayment"},"value":{"type":"string","example":"Repayment"},"disbursement":{"type":"boolean","example":false},"repaymentAtDisbursement":{"type":"boolean","example":false},"repayment":{"type":"boolean","example":true},"contra":{"type":"boolean","example":false},"waiveInterest":{"type":"boolean","example":false},"waiveCharges":{"type":"boolean","example":false},"writeOff":{"type":"boolean","example":false},"recoveryRepayment":{"type":"boolean","example":false}}},"GetSelfLoansChargeCalculationType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"chargeCalculationType.flat"},"value":{"type":"string","example":"Flat"}}},"GetSelfLoansChargeTimeType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"chargeTimeType.disbursement"},"value":{"type":"string","example":"Disbursement"}}},"GetSelfLoansLoanIdChargesResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"chargeId":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"Loan Processing fee"},"chargeTimeType":{"$ref":"#/definitions/GetSelfLoansChargeTimeType"},"chargeCalculationType":{"$ref":"#/definitions/GetSelfLoansChargeCalculationType"},"percentage":{"type":"number","format":"double","example":0.0},"amountPercentageAppliedTo":{"type":"number","format":"double","example":0.0},"currency":{"$ref":"#/definitions/GetLoanCurrency"},"amount":{"type":"number","format":"float","example":100.0},"amountPaid":{"type":"number","format":"float","example":0.0},"amountWaived":{"type":"number","format":"float","example":0.0},"amountWrittenOff":{"type":"number","format":"float","example":0.0},"amountOutstanding":{"type":"number","format":"float","example":100.0},"amountOrPercentage":{"type":"number","format":"float","example":100.0},"penalty":{"type":"boolean","example":false}}},"GetSelfLoansLoanIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"accountNo":{"type":"integer","format":"int64","example":1},"status":{"$ref":"#/definitions/GetLoansLoanIdStatus"},"clientId":{"type":"integer","format":"int32","example":1},"clientName":{"type":"string","example":"Kampala first Client"},"clientOfficeId":{"type":"integer","format":"int32","example":2},"loanProductId":{"type":"integer","format":"int32","example":1},"loanProductName":{"type":"string","example":"Kampala Product (with cash accounting)"},"loanProductDescription":{"type":"string","example":"Typical Kampala loan product with cash accounting enabled for testing."},"loanPurposeId":{"type":"integer","format":"int32","example":22},"loanPurposeName":{"type":"string","example":"option.HousingImprovement"},"loanOfficerId":{"type":"integer","format":"int32","example":2},"loanOfficerName":{"type":"string","example":"LoanOfficer, Kampala"},"loanType":{"$ref":"#/definitions/GetLoansLoanIdLoanType"},"currency":{"$ref":"#/definitions/GetLoansLoanIdCurrency"},"principal":{"type":"integer","format":"int64","example":1000000},"termFrequency":{"type":"integer","format":"int32","example":12},"termPeriodFrequencyType":{"$ref":"#/definitions/GetLoansLoanIdTermPeriodFrequencyType"},"numberOfRepayments":{"type":"integer","format":"int32","example":12},"repaymentEvery":{"type":"integer","format":"int32","example":1},"repaymentFrequencyType":{"$ref":"#/definitions/GetLoansLoanIdRepaymentFrequencyType"},"interestRatePerPeriod":{"type":"integer","format":"int32","example":24},"interestRateFrequencyType":{"$ref":"#/definitions/GetLoansLoanIdInterestRateFrequencyType"},"annualInterestRate":{"type":"integer","format":"int32","example":24},"amortizationType":{"$ref":"#/definitions/GetLoansLoanIdAmortizationType"},"interestType":{"$ref":"#/definitions/GetLoansLoanIdInterestType"},"interestCalculationPeriodType":{"$ref":"#/definitions/GetLoansLoanIdInterestCalculationPeriodType"},"transactionProcessingStrategyId":{"type":"integer","format":"int32","example":2},"timeline":{"$ref":"#/definitions/GetLoansLoanIdTimeline"},"summary":{"$ref":"#/definitions/GetLoansLoanIdSummary"}}},"PostSelfLoansResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":1},"clientId":{"type":"integer","format":"int32","example":1},"loanId":{"type":"integer","format":"int32","example":1},"resourceId":{"type":"integer","format":"int32","example":1}}},"PostSelfLoansData":{"type":"object","properties":{"locale":{"type":"string","example":"en"},"Activation_Date":{"type":"string","example":"01 December 2016 00:00"},"dateFormat":{"type":"string","example":"dd MMMM yyyy HH:mm"}}},"PostSelfLoansDatatables":{"type":"object","properties":{"registeredTableName":{"type":"string","example":"Date Loan Field"},"data":{"$ref":"#/definitions/PostSelfLoansData"}}},"PostSelfLoansDisbursementData":{"type":"object","properties":{"expectedDisbursementDate":{"type":"string","example":"01 November 2013"},"principal":{"type":"integer","format":"int64","example":22000},"approvedPrincipal":{"type":"integer","format":"int64","example":22000}}},"PostSelfLoansRequest":{"type":"object","properties":{"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"locale":{"type":"string","example":"en_GB"},"clientId":{"type":"integer","format":"int32","example":1},"productId":{"type":"integer","format":"int32","example":1},"principal":{"type":"number","format":"double","example":"10,000.00"},"loanTermFrequency":{"type":"integer","format":"int32","example":12},"loanTermFrequencyType":{"type":"integer","format":"int32","example":2},"loanType":{"type":"string","example":"individual"},"numberOfRepayments":{"type":"integer","format":"int32","example":10},"repaymentEvery":{"type":"integer","format":"int32","example":1},"repaymentFrequencyType":{"type":"integer","format":"int32","example":2},"interestRatePerPeriod":{"type":"integer","format":"int32","example":10},"amortizationType":{"type":"integer","format":"int32","example":1},"interestType":{"type":"integer","format":"int32","example":0},"interestCalculationPeriodType":{"type":"integer","format":"int32","example":1},"transactionProcessingStrategyId":{"type":"integer","format":"int32","example":1},"expectedDisbursementDate":{"type":"string","example":"10 Jun 2013"},"submittedOnDate":{"type":"string","example":"10 Jun 2013"},"linkAccountId":{"type":"integer","format":"int32","example":1},"fixedEmiAmount":{"type":"integer","format":"int32","example":1100},"maxOutstandingLoanBalance":{"type":"integer","format":"int64","example":35000},"disbursementData":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/PostSelfLoansDisbursementData"}},"datatables":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/PostSelfLoansDatatables"}}}},"PutSelfLoansChanges":{"type":"object","properties":{"principal":{"type":"integer","format":"int64","example":5000},"locale":{"type":"string","example":"en"}}},"PutSelfLoansLoanIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":2},"clientId":{"type":"integer","format":"int32","example":1},"loanId":{"type":"integer","format":"int32","example":1},"resourceId":{"type":"integer","format":"int32","example":1},"changes":{"$ref":"#/definitions/PutSelfLoansChanges"}}},"PutSelfLoansLoanIdRequest":{"type":"object","properties":{"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"productId":{"type":"integer","format":"int32","example":1},"principal":{"type":"integer","format":"int64","example":5000},"loanTermFrequency":{"type":"integer","format":"int32","example":10},"loanTermFrequencyType":{"type":"integer","format":"int32","example":0},"numberOfRepayments":{"type":"integer","format":"int32","example":10},"repaymentEvery":{"type":"integer","format":"int32","example":1},"repaymentFrequencyType":{"type":"integer","format":"int32","example":0},"interestRatePerPeriod":{"type":"integer","format":"int32","example":2},"interestType":{"type":"integer","format":"int32","example":0},"interestCalculationPeriodType":{"type":"integer","format":"int32","example":0},"amortizationType":{"type":"integer","format":"int32","example":1},"expectedDisbursementDate":{"type":"string","example":"04 March 2014"},"transactionProcessingStrategyId":{"type":"integer","format":"int32","example":1}}},"PostSelfLoansLoanIdChanges":{"type":"object","properties":{"status":{"$ref":"#/definitions/PostSelfLoansLoanIdStatus"},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"withdrawnOnDate":{"type":"string","example":"20 September 2011"},"closedOnDate":{"type":"string","example":"20 September 2011"}}},"PostSelfLoansLoanIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":1},"clientId":{"type":"integer","format":"int32","example":1},"loanId":{"type":"integer","format":"int32","example":2},"resourceId":{"type":"integer","format":"int32","example":2},"changes":{"$ref":"#/definitions/PostSelfLoansLoanIdChanges"}}},"PostSelfLoansLoanIdStatus":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":400},"code":{"type":"string","example":"loanStatusType.withdrawn.by.client"},"value":{"type":"string","example":"Withdrawn by applicant"},"pendingApproval":{"type":"boolean","example":false},"waitingForDisbursal":{"type":"boolean","example":false},"active":{"type":"boolean","example":false},"closedObligationsMet":{"type":"boolean","example":false},"closedWrittenOff":{"type":"boolean","example":false},"closedRescheduled":{"type":"boolean","example":false},"closed":{"type":"boolean","example":false},"overpaid":{"type":"boolean","example":false}}},"PostSelfLoansLoanIdRequest":{"type":"object","properties":{"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"withdrawnOnDate":{"type":"string","example":"20 September 2011"},"note":{"type":"string","example":"Reason loan applicant withdrew from application."}}},"GetSelfLoansProductOptions":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"Kampala Product (with cash accounting)"}}},"GetSelfLoansTemplateResponse":{"type":"object","properties":{"clientId":{"type":"integer","format":"int32","example":1},"clientName":{"type":"string","example":"Kampala first Client"},"clientOfficeId":{"type":"integer","format":"int32","example":2},"timeline":{"$ref":"#/definitions/GetSelfLoansTimeline"},"productOptions":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetSelfLoansProductOptions"}}}},"GetSelfLoansTimeline":{"type":"object","properties":{"expectedDisbursementDate":{"type":"string","format":"date","example":"[2013, 3, 8]"}}},"GetSelfSavingsAccountsAccountIdTransactionsTransactionIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"transactionType":{"$ref":"#/definitions/GetSelfSavingsTransactionType"},"accountId":{"type":"integer","format":"int32","example":1},"accountNo":{"type":"integer","format":"int64","example":1},"date":{"type":"string","format":"date","example":"[2013, 8, 7]"},"currency":{"$ref":"#/definitions/GetSelfSavingsTransactionCurrency"},"paymentDetailData":{"$ref":"#/definitions/GetSelfSavingsPaymentDetailData"},"amount":{"type":"integer","format":"int32","example":5000},"runningBalance":{"type":"integer","format":"int32","example":0},"reversed":{"type":"boolean","example":true}}},"GetSelfSavingsPaymentDetailData":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":62},"paymentType":{"$ref":"#/definitions/GetSelfSavingsPaymentType"},"accountNumber":{"type":"integer","format":"int32"},"checkNumber":{"type":"integer","format":"int32"},"routingCode":{"type":"integer","format":"int32"},"receiptNumber":{"type":"integer","format":"int32"},"bankNumber":{"type":"integer","format":"int32"}}},"GetSelfSavingsPaymentType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":11},"name":{"type":"string","example":"cash"}}},"GetSelfSavingsTransactionCurrency":{"type":"object","properties":{"code":{"type":"string","example":"USD"},"name":{"type":"string","example":"US Dollar"},"decimalPlaces":{"type":"integer","format":"int32","example":2},"inMultiplesOf":{"type":"integer","format":"int32","example":0},"displaySymbol":{"type":"string","example":"$"},"nameCode":{"type":"string","example":"currency.USD"},"displayLabel":{"type":"string","example":"US Dollar ($)"}}},"GetSelfSavingsTransactionType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"savingsAccountTransactionType.withdrawal"},"value":{"type":"string","example":"Withdrawal"},"deposit":{"type":"boolean","example":false},"withdrawal":{"type":"boolean","example":true},"interestPosting":{"type":"boolean","example":false},"feeDeduction":{"type":"boolean","example":false}}},"GetSelfSavingsAccountsResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"accountNo":{"type":"integer","format":"int64","example":1},"clientId":{"type":"integer","format":"int32","example":1},"clientName":{"type":"string","example":"small business"},"savingsProductId":{"type":"integer","format":"int32","example":1},"savingsProductName":{"type":"string","example":"Passbook Savings"},"fieldOfficerId":{"type":"integer","format":"int32","example":0},"status":{"$ref":"#/definitions/GetSelfSavingsStatus"},"timeline":{"$ref":"#/definitions/GetSelfSavingsTimeline"},"currency":{"$ref":"#/definitions/GetSelfSavingsCurrency"},"nominalAnnualInterestRate":{"type":"number","format":"double","example":5.0},"interestCompoundingPeriodType":{"$ref":"#/definitions/GetSelfSavingsInterestCompoundingPeriodType"},"interestPostingPeriodType":{"$ref":"#/definitions/GetSelfSavingsInterestPostingPeriodType"},"interestCalculationType":{"$ref":"#/definitions/GetSelfSavingsInterestCalculationType"},"interestCalculationDaysInYearType":{"$ref":"#/definitions/GetSelfSavingsInterestCalculationDaysInYearType"},"summary":{"$ref":"#/definitions/GetSelfSavingsSummary"}}},"GetSelfSavingsCurrency":{"type":"object","properties":{"code":{"type":"string","example":"USD"},"name":{"type":"string","example":"US Dollar"},"decimalPlaces":{"type":"integer","format":"int32","example":2},"displaySymbol":{"type":"string","example":"$"},"nameCode":{"type":"string","example":"currency.USD"},"displayLabel":{"type":"string","example":"US Dollar ($)"}}},"GetSelfSavingsInterestCalculationDaysInYearType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":365},"code":{"type":"string","example":"savingsInterestCalculationDaysInYearType.days365"},"value":{"type":"string","example":"365 Days"}}},"GetSelfSavingsInterestCalculationType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"savingsInterestCalculationType.dailybalance"},"value":{"type":"string","example":"Daily Balance"}}},"GetSelfSavingsInterestCompoundingPeriodType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"savings.interest.period.savingsCompoundingInterestPeriodType.daily"},"value":{"type":"string","example":"Daily"}}},"GetSelfSavingsInterestPostingPeriodType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":4},"code":{"type":"string","example":"savings.interest.posting.period.savingsPostingInterestPeriodType.monthly"},"value":{"type":"string","example":"Monthly"}}},"GetSelfSavingsStatus":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":100},"code":{"type":"string","example":"savingsAccountStatusType.submitted.and.pending.approval"},"value":{"type":"string","example":"Submitted and pending approval"},"submittedAndPendingApproval":{"type":"boolean","example":true},"approved":{"type":"boolean","example":false},"rejected":{"type":"boolean","example":false},"withdrawnByApplicant":{"type":"boolean","example":false},"active":{"type":"boolean","example":false},"closed":{"type":"boolean","example":false}}},"GetSelfSavingsSummary":{"type":"object","properties":{"currency":{"$ref":"#/definitions/GetSelfSavingsCurrency"},"accountBalance":{"type":"integer","format":"int32","example":0}}},"GetSelfSavingsTimeline":{"type":"object","properties":{"submittedOnDate":{"type":"string","format":"date","example":"[2013, 3, 1]"}}},"GetSelfSavingsAccountsAccountIdChargesResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"chargeId":{"type":"integer","format":"int32","example":3},"accountId":{"type":"integer","format":"int32","example":57},"name":{"type":"string","example":"Savings account maintenance fee"},"chargeTimeType":{"$ref":"#/definitions/GetSelfSavingsChargeTimeType"},"chargeCalculationType":{"$ref":"#/definitions/GetSelfSavingsChargeCalculationType"},"percentage":{"type":"number","format":"double","example":0.0},"amountPercentageAppliedTo":{"type":"number","format":"double","example":0.0},"currency":{"$ref":"#/definitions/GetSelfSavingsCurrency"},"amount":{"type":"integer","format":"int32","example":100},"amountPaid":{"type":"integer","format":"int32","example":0},"amountWaived":{"type":"integer","format":"int32","example":0},"amountWrittenOff":{"type":"integer","format":"int32","example":0},"amountOutstanding":{"type":"integer","format":"int32","example":100},"amountOrPercentage":{"type":"integer","format":"int32","example":100},"penalty":{"type":"boolean","example":false}}},"GetSelfSavingsChargeCalculationType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"chargeCalculationType.flat"},"value":{"type":"string","example":"Flat"}}},"GetSelfSavingsChargeTimeType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"code":{"type":"string","example":"chargeTimeType.specifiedDueDate"},"value":{"type":"string","example":"Specified due date"}}},"GetSelfSavingsAccountsAccountIdChargesSavingsAccountChargeIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"chargeId":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"Passbook fee"},"chargeTimeType":{"$ref":"#/definitions/GetSelfSavingsChargeTimeType"},"chargeCalculationType":{"$ref":"#/definitions/GetSelfSavingsChargeCalculationType"},"percentage":{"type":"number","format":"double","example":0.0},"amountPercentageAppliedTo":{"type":"number","format":"double","example":0.0},"currency":{"$ref":"#/definitions/GetSelfSavingsCurrency"},"amount":{"type":"integer","format":"int32","example":100},"amountPaid":{"type":"integer","format":"int32","example":0},"amountWaived":{"type":"integer","format":"int32","example":0},"amountWrittenOff":{"type":"integer","format":"int32","example":0},"amountOutstanding":{"type":"integer","format":"int32","example":100},"amountOrPercentage":{"type":"integer","format":"int32","example":100},"penalty":{"type":"boolean","example":false}}},"GetSelfUserDetailsOrganisationalRole":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":100},"code":{"type":"string","example":"staffOrganisationalRoleType.programDirector"},"value":{"type":"string","example":"Program Director"}}},"GetSelfUserDetailsRoles":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"Super user"},"description":{"type":"string","example":"This role provides all application permissions."}}},"PostSelfAuthenticationResponse":{"type":"object","properties":{"username":{"type":"string","example":"mifos"},"userId":{"type":"integer","format":"int32","example":1},"base64EncodedAuthenticationKey":{"type":"string","example":"bWlmb3M6cGFzc3dvcmQ="},"authenticated":{"type":"boolean","example":true},"officeId":{"type":"integer","format":"int32","example":1},"officeName":{"type":"string","example":"Head Office"},"staffId":{"type":"integer","format":"int32","example":1},"staffDisplayName":{"type":"string","example":"Director, Program"},"organisationalRole":{"$ref":"#/definitions/GetSelfUserDetailsOrganisationalRole"},"roles":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetSelfUserDetailsRoles"}},"permissions":{"type":"array","example":"ALL_FUNCTIONS","items":{"type":"string"}},"isSelfServiceUser":{"type":"boolean","example":true},"clients":{"type":"array","example":"1, 2, 3","items":{"type":"integer","format":"int32"}}}},"PutSelfUserChanges":{"type":"object","properties":{"passwordEncoded":{"type":"string","example":"6a72a630795be86fe926ce540fc45b6b922fe5ba130f185fe806a26b5e5efcdd"}}},"PutSelfUserResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int32","example":1},"resourceId":{"type":"integer","format":"int32","example":6},"changes":{"$ref":"#/definitions/PutSelfUserChanges"}}},"PutSelfUserRequest":{"type":"object","properties":{"password":{"type":"string","example":"Abcd1234"},"repeatPassword":{"type":"string","example":"Abcd1234"}}},"GetSelfUserDetailsResponse":{"type":"object","properties":{"username":{"type":"string","example":"mifos"},"userId":{"type":"integer","format":"int32","example":1},"base64EncodedAuthenticationKey":{"type":"string","example":"bWlmb3M6cGFzc3dvcmQ="},"authenticated":{"type":"boolean","example":true},"officeId":{"type":"integer","format":"int32","example":1},"officeName":{"type":"string","example":"Head Office"},"staffId":{"type":"integer","format":"int32","example":1},"staffDisplayName":{"type":"string","example":"Director, Program"},"organisationalRole":{"$ref":"#/definitions/GetSelfUserDetailsOrganisationalRole"},"roles":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetSelfUserDetailsRoles"}},"permissions":{"type":"array","example":"ALL_FUNCTIONS","items":{"type":"string"}},"isSelfServiceUser":{"type":"boolean","example":true},"clients":{"type":"array","example":"[1, 2, 3]","items":{"type":"integer","format":"int32"}}}},"GetTaxesComponentsCreditAccount":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":4},"name":{"type":"string","example":"ACCOUNT_NAME_7BR9C"},"glCode":{"type":"string","example":"LIABILITY_PA1460364665046"}}},"GetTaxesComponentsCreditAccountType":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":2},"code":{"type":"string","example":"accountType.liability"},"value":{"type":"string","example":"LIABILITY"}}},"GetTaxesComponentsHistories":{"type":"object"},"GetTaxesComponentsResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":1},"name":{"type":"string","example":"tax component 1"},"percentage":{"type":"number","format":"float","example":10.0},"creditAccountType":{"$ref":"#/definitions/GetTaxesComponentsCreditAccountType"},"creditAccount":{"$ref":"#/definitions/GetTaxesComponentsCreditAccount"},"startDate":{"type":"string","format":"date","example":"[2016, 4, 11]"},"taxComponentsHistories":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetTaxesComponentsHistories"}}}},"PostTaxesComponentsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1}}},"PostTaxesComponentsRequest":{"type":"object","properties":{"name":{"type":"string","example":"tax component 1"},"percentage":{"type":"number","format":"float","example":10.0},"creditAccountType":{"type":"integer","format":"int32","example":2},"creditAcountId":{"type":"integer","format":"int32","example":4},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"startDate":{"type":"string","example":"11 April 2016"}}},"PutTaxesComponentsChanges":{"type":"object","properties":{"percentage":{"type":"number","format":"float","example":15.0},"name":{"type":"string","example":"tax component 2"},"startDate":{"type":"string","format":"date","example":"[2016, 4, 15]"}}},"PutTaxesComponentsTaxComponentIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1},"changes":{"$ref":"#/definitions/PutTaxesComponentsChanges"}}},"PutTaxesComponentsTaxComponentIdRequest":{"type":"object","properties":{"name":{"type":"string","example":"tax component 2"},"percentage":{"type":"number","format":"float","example":15.0},"locale":{"type":"string","example":"en"},"dateFormat":{"type":"string","example":"dd MMMM yyyy"},"startDate":{"type":"string","example":"15 April 2016"}}},"PostTaxesGroupResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":1}}},"PostTaxesGroupRequest":{"type":"object","properties":{"name":{"type":"string","example":"tax group 1"},"locale":{"type":"string","example":"en"},"taxComponents":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/PostTaxesGroupTaxComponents"}},"dateFormat":{"type":"string","example":"dd MMMM yyyy"}}},"PostTaxesGroupTaxComponents":{"type":"object","properties":{"taxComponentId":{"type":"integer","format":"int32","example":7},"startDate":{"type":"string","example":"11 April 2016"}}},"GetTaxesGroupResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":7},"name":{"type":"string","example":"tax group 1"},"taxAssociations":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/GetTaxesGroupTaxAssociations"}}}},"GetTaxesGroupTaxAssociations":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":7},"taxComponent":{"$ref":"#/definitions/GetTaxesGroupTaxComponent"},"startDate":{"type":"string","format":"date","example":"[2016, 4, 11]"}}},"GetTaxesGroupTaxComponent":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":7},"name":{"type":"string","example":"tax component 2"}}},"PutTaxesGroupChanges":{"type":"object","properties":{"addComponents":{"type":"array","example":"[6]","items":{"type":"integer","format":"int32"}},"modifiedComponents":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/PutTaxesGroupModifiedComponents"}},"name":{"type":"string","example":"tax group 2"}}},"PutTaxesGroupModifiedComponents":{"type":"object","properties":{"endDate":{"type":"string","example":"Apr 22, 2016 12:00:00 AM"},"taxComponentId":{"type":"integer","format":"int32","example":7}}},"PutTaxesGroupTaxGroupIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int32","example":7},"changes":{"$ref":"#/definitions/PutTaxesGroupChanges"}}},"PutTaxesGroupTaxComponents":{"type":"object","properties":{"id":{"type":"integer","format":"int32","example":7},"taxComponentId":{"type":"integer","format":"int32","example":7},"endDate":{"type":"string","example":"22 April 2016"}}},"PutTaxesGroupTaxGroupIdRequest":{"type":"object","properties":{"name":{"type":"string","example":"tax group 2"},"locale":{"type":"string","example":"en"},"taxComponents":{"type":"array","uniqueItems":true,"items":{"$ref":"#/definitions/PutTaxesGroupTaxComponents"}},"dateFormat":{"type":"string","example":"dd MMMM yyyy"}}},"LookupTableData":{"type":"object","properties":{"key":{"type":"string"},"description":{"type":"string"},"entries":{"type":"array","items":{"$ref":"#/definitions/LookupTableEntry"}}}},"LookupTableEntry":{"type":"object","properties":{"valueFrom":{"type":"integer","format":"int32"},"valueTo":{"type":"integer","format":"int32"},"score":{"type":"number","format":"double"}}},"ScorecardData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"userId":{"type":"integer","format":"int64"},"username":{"type":"string"},"clientId":{"type":"integer","format":"int64"},"surveyId":{"type":"integer","format":"int64"},"surveyName":{"type":"string"},"scorecardValues":{"type":"array","items":{"$ref":"#/definitions/ScorecardValue"}}}},"ScorecardValue":{"type":"object","properties":{"questionId":{"type":"integer","format":"int64"},"responseId":{"type":"integer","format":"int64"},"value":{"type":"integer","format":"int32"},"createdOn":{"type":"string","format":"date-time"}}},"Component":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"survey":{"$ref":"#/definitions/Survey"},"key":{"type":"string"},"text":{"type":"string"},"description":{"type":"string"},"sequenceNo":{"type":"integer","format":"int32"},"new":{"type":"boolean"}}},"Question":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"survey":{"$ref":"#/definitions/Survey"},"responses":{"type":"array","items":{"$ref":"#/definitions/Response"}},"componentKey":{"type":"string"},"key":{"type":"string"},"text":{"type":"string"},"description":{"type":"string"},"sequenceNo":{"type":"integer","format":"int32"},"new":{"type":"boolean"}}},"Response":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"question":{"$ref":"#/definitions/Question"},"text":{"type":"string"},"value":{"type":"integer","format":"int32"},"sequenceNo":{"type":"integer","format":"int32"},"new":{"type":"boolean"}}},"Scorecard":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"survey":{"$ref":"#/definitions/Survey"},"question":{"$ref":"#/definitions/Question"},"response":{"$ref":"#/definitions/Response"},"appUser":{"$ref":"#/definitions/AppUser"},"client":{"$ref":"#/definitions/Client"},"createdOn":{"type":"string","format":"date-time"},"value":{"type":"integer","format":"int32"},"new":{"type":"boolean"}}},"Survey":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"components":{"type":"array","items":{"$ref":"#/definitions/Component"}},"questions":{"type":"array","items":{"$ref":"#/definitions/Question"}},"key":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"countryCode":{"type":"string"},"validFrom":{"type":"string","format":"date-time"},"validTo":{"type":"string","format":"date-time"},"new":{"type":"boolean"}}},"ComponentData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"key":{"type":"string"},"text":{"type":"string"},"description":{"type":"string"},"sequenceNo":{"type":"integer","format":"int32"}}},"QuestionData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"responseDatas":{"type":"array","items":{"$ref":"#/definitions/ResponseData"}},"componentKey":{"type":"string"},"key":{"type":"string"},"text":{"type":"string"},"description":{"type":"string"},"sequenceNo":{"type":"integer","format":"int32"}}},"ResponseData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"text":{"type":"string"},"value":{"type":"integer","format":"int32"},"sequenceNo":{"type":"integer","format":"int32"}}},"SurveyData":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"componentDatas":{"type":"array","items":{"$ref":"#/definitions/ComponentData"}},"questionDatas":{"type":"array","items":{"$ref":"#/definitions/QuestionData"}},"key":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"countryCode":{"type":"string"},"validFrom":{"type":"string","format":"date-time"},"validTo":{"type":"string","format":"date-time"}}},"GetTemplatesTemplateIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Text"},"entity":{"type":"integer","format":"int64","example":1},"type":{"type":"integer","format":"int64","example":0},"text":{"type":"string","example":"This is a loan for {{loan.clientName}}"},"mappers":{"type":"array","items":{"$ref":"#/definitions/TemplateMapper"}}}},"TemplateMapper":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"mapperorder":{"type":"integer","format":"int32"},"mapperkey":{"type":"string"},"mappervalue":{"type":"string"},"new":{"type":"boolean"}}},"PostTemplatesResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PostTemplatesRequest":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Text"},"entity":{"type":"integer","format":"int64","example":1},"type":{"type":"integer","format":"int64","example":0},"text":{"type":"string","example":"This is a loan for {{loan.clientName}}"},"mappers":{"type":"array","items":{"$ref":"#/definitions/TemplateMapper"}}}},"PutTemplatesTemplateIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PutTemplatesTemplateIdRequest":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Text"},"entity":{"type":"integer","format":"int64","example":1},"type":{"type":"integer","format":"int64","example":0},"text":{"type":"string","example":"This is a loan for {{loan.clientName}}"},"mappers":{"type":"array","items":{"$ref":"#/definitions/TemplateMapper"}}}},"DeleteTemplatesTemplateIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"GetTemplatesTemplateResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Text"},"entity":{"type":"integer","format":"int64","example":1},"type":{"type":"integer","format":"int64","example":0},"text":{"type":"string","example":"This is a loan for {{loan.clientName}}"},"mappers":{"type":"array","items":{"$ref":"#/definitions/TemplateMapper"}}}},"GetTemplatesResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Text"},"entity":{"type":"integer","format":"int64","example":1},"type":{"type":"integer","format":"int64","example":0},"text":{"type":"string","example":"This is a loan for {{loan.clientName}}"},"mappers":{"type":"array","items":{"$ref":"#/definitions/TemplateMapper"}}}},"GetPasswordPreferencesTemplateResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"description":{"type":"string","example":"Password must be at least 1 character and not more that 50 characters long"},"active":{"type":"boolean","example":true},"key":{"type":"string","example":"simple"}}},"PutPasswordPreferencesTemplateRequest":{"type":"object","properties":{"validationPolicyId":{"type":"integer","format":"int64","example":1}}},"GetPermissionsResponse":{"type":"object","properties":{"grouping":{"type":"string","example":"authorisation"},"code":{"type":"string","example":"READ_PERMISSION"},"entityName":{"type":"string","example":"PERMISSION"},"actionName":{"type":"string","example":"READ"},"selected":{"type":"boolean","example":true}}},"CommandProcessingResult":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64"},"groupId":{"type":"integer","format":"int64"},"clientId":{"type":"integer","format":"int64"},"loanId":{"type":"integer","format":"int64"},"savingsId":{"type":"integer","format":"int64"},"subResourceId":{"type":"integer","format":"int64"},"transactionId":{"type":"string"},"changes":{"type":"object","additionalProperties":{"type":"object"}},"productId":{"type":"integer","format":"int64"},"rollbackTransaction":{"type":"boolean"}}},"PutPermissionsRequest":{"type":"object","properties":{"permissions":{"type":"string","example":"\"CREATE_GUARANTOR\":true,\n \"CREATE_CLIENT\":true"}}},"PutRolesRoleIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1},"changes":{"$ref":"#/definitions/PutRolesRoleIdResponseChanges"}}},"PutRolesRoleIdResponseChanges":{"type":"object","properties":{"description":{"type":"string","example":"some description(changed)"}}},"PutRolesRoleIdRequest":{"type":"object","properties":{"description":{"type":"string","example":"some description(changed)"}}},"GetRolesResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Super Users"},"description":{"type":"string","example":"This role provides all application permissions."}}},"PostRolesResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"PostRolesRequest":{"type":"object","properties":{"name":{"type":"string","example":"Another Role Name"},"description":{"type":"string","example":"A description outlining the purpose of this role in relation to the application."}}},"GetRolesRoleIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Super Users"},"description":{"type":"string","example":"This role provides all application permissions."}}},"PostRolesRoleIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"GetRolesRoleIdPermissionsResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Super Users"},"description":{"type":"string","example":"This role provides all application permissions."},"permissionUsageData":{"type":"array","items":{"$ref":"#/definitions/GetRolesRoleIdPermissionsResponsePermissionData"}}}},"GetRolesRoleIdPermissionsResponsePermissionData":{"type":"object","properties":{"grouping":{"type":"string","example":"authorisation"},"code":{"type":"string","example":"READ_PERMISSION"},"entityName":{"type":"string","example":"PERMISSION"},"actionName":{"type":"string","example":"READ"},"selected":{"type":"boolean","example":false}}},"PostRolesRoleIdPermissionsResponsePermissions":{"type":"object","properties":{"ALL_FUNCTIONS_READ":{"type":"string","example":"true"}}},"PutRolesRoleIdPermissionsResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":8},"permissions":{"$ref":"#/definitions/PostRolesRoleIdPermissionsResponsePermissions"}}},"PutRolesRoleIdPermissionsRequest":{"type":"object","properties":{"permissions":{"$ref":"#/definitions/PostRolesRoleIdPermissionsResponsePermissions"}}},"DeleteRolesRoleIdResponse":{"type":"object","properties":{"resourceId":{"type":"integer","format":"int64","example":1}}},"GetUsersUserIdResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"username":{"type":"string","example":"mifos"},"officeId":{"type":"integer","format":"int64","example":1},"officeName":{"type":"string","example":"Head Office"},"firstname":{"type":"string","example":"App"},"lastname":{"type":"string","example":"Administrator"},"email":{"type":"string","example":"demomfi@mifos.org"},"passwordNeverExpires":{"type":"boolean","example":false},"staff":{"$ref":"#/definitions/StaffData"},"availableRoles":{"type":"array","items":{"$ref":"#/definitions/RoleData"}},"selectedRoles":{"type":"array","items":{"$ref":"#/definitions/RoleData"}}}},"GetUsersTemplateResponse":{"type":"object","properties":{"allowedOffices":{"type":"array","items":{"$ref":"#/definitions/OfficeData"}},"availableRoles":{"type":"array","items":{"$ref":"#/definitions/RoleData"}}}},"GetUsersResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64","example":1},"username":{"type":"string","example":"mifos"},"officeId":{"type":"integer","format":"int64","example":1},"officeName":{"type":"string","example":"Head Office"},"firstname":{"type":"string","example":"App"},"lastname":{"type":"string","example":"Administrator"},"email":{"type":"string","example":"demomfi@mifos.org"},"passwordNeverExpires":{"type":"boolean","example":false},"staff":{"$ref":"#/definitions/StaffData"},"selectedRoles":{"type":"array","items":{"$ref":"#/definitions/RoleData"}}}},"PutUsersUserIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"resourceId":{"type":"integer","format":"int64","example":11},"changes":{"$ref":"#/definitions/PutUsersUserIdResponseChanges"}}},"PutUsersUserIdResponseChanges":{"type":"object","properties":{"firstname":{"type":"string","example":"Test"},"passwordEncoded":{"type":"string","example":"abc3326b1bb376351c7baeb4175f5e0504e33aadf6a158474a6d71de1befae51"}}},"PutUsersUserIdRequest":{"type":"object","properties":{"firstname":{"type":"string","example":"Test"},"password":{"type":"string","example":"window75"},"repeatPassword":{"type":"string","example":"window75"}}},"DeleteUsersUserIdResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"resourceId":{"type":"integer","format":"int64","example":11},"changes":{"$ref":"#/definitions/DeleteUsersUserIdResponseChanges"}}},"DeleteUsersUserIdResponseChanges":{"type":"object"},"PostUsersResponse":{"type":"object","properties":{"officeId":{"type":"integer","format":"int64","example":1},"resourceId":{"type":"integer","format":"int64","example":11}}},"PostUsersRequest":{"type":"object","properties":{"username":{"type":"string","example":"newuser"},"firstname":{"type":"string","example":"Test"},"lastname":{"type":"string","example":"User"},"email":{"type":"string","example":"whatever@mifos.org"},"officeId":{"type":"integer","format":"int64","example":1},"staffId":{"type":"integer","format":"int64","example":1},"Roles":{"type":"string","example":"[2,3]"},"sendPasswordToEmail":{"type":"boolean","example":true},"isSelfServiceUser":{"type":"boolean","example":true}}}}} \ No newline at end of file From e46dc3230ed306c5ff4ba5f5e7a9365c86f2cfbb Mon Sep 17 00:00:00 2001 From: Sanyam96 Date: Fri, 16 Nov 2018 00:24:31 +0530 Subject: [PATCH 4/4] removed .idea from .gitignore --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 5570147a0..c7f7defc6 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,4 @@ *.war *.ear .gradle -.idea build